diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..cecbd8ec Binary files /dev/null and b/.DS_Store differ diff --git a/.breakpoints b/.breakpoints new file mode 100644 index 00000000..5cc232f0 --- /dev/null +++ b/.breakpoints @@ -0,0 +1,3 @@ +{ + "files": {} +} \ No newline at end of file diff --git a/.classpath b/.classpath new file mode 100644 index 00000000..75b806fd --- /dev/null +++ b/.classpath @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" output="target/classes" path="src/main/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" path="target/generated-sources/annotations"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + <attribute name="ignore_optional_problems" value="true"/> + <attribute name="m2e-apt" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + <attribute name="ignore_optional_problems" value="true"/> + <attribute name="m2e-apt" value="true"/> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 00000000..df1d0727 --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,31 @@ +name: Auto Merge PR +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: {} +jobs: + automerge: + runs-on: ubuntu-latest + steps: + - name: Merging PR + uses: "pascalgn/automerge-action@v0.14.3" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + MERGE_METHOD: "squash" + MERGE_LABELS: "" + MERGE_COMMIT_MESSAGE: "pull-request-title" + MERGE_REQUIRED_APPROVALS: "0" diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml new file mode 100644 index 00000000..cd2d7032 --- /dev/null +++ b/.github/workflows/auto-pr.yml @@ -0,0 +1,31 @@ +name: Merge PR +on: + pull_request: + types: + - labeled + - unlabeled + - synchronize + - opened + - edited + - ready_for_review + - reopened + - unlocked + pull_request_review: + types: + - submitted + check_suite: + types: + - completed + status: {} +jobs: + automerge: + runs-on: ubuntu-latest + steps: + - name: Merging PR + uses: "pascalgn/automerge-action@v0.14.3" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + MERGE_LABELS: "!automerge" + MERGE_METHOD: "merge" + MERGE_COMMIT_MESSAGE: "pull-request-title" + MERGE_REQUIRED_APPROVALS: "0" diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..9902a215 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "UDP_VIDEO_CALLER"] + path = UDP_VIDEO_CALLER + url = https://github.com/Adidem23/UDP_VideoCaller.git diff --git a/.project b/.project new file mode 100644 index 00000000..a2380fe3 --- /dev/null +++ b/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>myartifactid</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> + <filteredResources> + <filter> + <id>1679078569810</id> + <name></name> + <type>30</type> + <matcher> + <id>org.eclipse.core.resources.regexFilterMatcher</id> + <arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> + </matcher> + </filter> + </filteredResources> +</projectDescription> diff --git a/.replit b/.replit new file mode 100644 index 00000000..b5052298 --- /dev/null +++ b/.replit @@ -0,0 +1,64 @@ +compile = "javac -classpath .:target/dependency/* -d . $(find . -type f -name '*.java')" +run = "java -classpath .:target/dependency/* Main" +entrypoint = "Main.java" +hidden = ["**/*.class"] + +[packager] +language = "java" + +[packager.features] +packageSearch = true + +[languages.java] +pattern = "**/*.java" + +[languages.java.languageServer] +start = "jdt-language-server" + +[unitTest] +language = "java" + +[nix] +channel = "stable-22_11" + +[debugger] +support = true + +[debugger.compile] +command = "javac -classpath .:/run_dir/junit-4.12.jar:target/dependency/* -g -d . $(find . -type f -name '*.java')" + +[debugger.interactive] +transport = "localhost:0" +connectTimeout = 60 +startCommand = "java-debug" + +[debugger.interactive.initializeMessage] +command = "initialize" +type = "request" + +[debugger.interactive.initializeMessage.arguments] +adapterID = "cppdbg" +clientID = "replit" +clientName = "replit.com" +columnsStartAt1 = true +linesStartAt1 = true +locale = "en-us" +pathFormat = "path" +supportsInvalidatedEvent = true +supportsProgressReporting = true +supportsRunInTerminalRequest = true +supportsVariablePaging = true +supportsVariableType = true + +[debugger.interactive.launchMessage] +command = "launch" +type = "request" + +[debugger.interactive.launchMessage.arguments] +classPaths = ["."] +mainClass = "Main" + +[deployment] +build = ["javac", "-classpath", ".:target/dependency/*", "-d", ".", "$(find . -type f -name '*.java')"] +run = ["java", "-classpath", ".:target/dependency/*", "Main"] +deploymentTarget = "cloudrun" \ No newline at end of file diff --git a/.settings/org.eclipse.jdt.apt.core.prefs b/.settings/org.eclipse.jdt.apt.core.prefs new file mode 100644 index 00000000..d4313d4b --- /dev/null +++ b/.settings/org.eclipse.jdt.apt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.apt.aptEnabled=false diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..ac8e7500 --- /dev/null +++ b/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 00000000..f897a7f1 --- /dev/null +++ b/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/2048/.gitignore b/2048/.gitignore new file mode 100644 index 00000000..814d83c0 --- /dev/null +++ b/2048/.gitignore @@ -0,0 +1,8 @@ +.DS_Store +Thumbs.db +db.json +*.log +node_modules/ +public/ +.deploy*/ +.history \ No newline at end of file diff --git a/2048/README.md b/2048/README.md new file mode 100644 index 00000000..b9265e24 --- /dev/null +++ b/2048/README.md @@ -0,0 +1,3 @@ +# 2048 project made using HTML CSS Javascript + + diff --git a/2048/css/keyframes.css b/2048/css/keyframes.css new file mode 100644 index 00000000..24d459f3 --- /dev/null +++ b/2048/css/keyframes.css @@ -0,0 +1,30 @@ +@keyframes moveup{ + 0%{ + transform: translateY(0); + opacity: 1; + } + 100%{ + transform: translateY(-150px); + opacity: 0; + } +} +@keyframes appear{ + 0%{ + transform: scale(0); + } + 100%{ + transform: scale(1); + } +} +@keyframes add{ + 0%{ + transform: scale(1); + box-shadow: 0 0 1px red; + } + 50%{ + transform: scale(1.2); + } + 100%{ + transform: scale(1); + } +} \ No newline at end of file diff --git a/2048/css/media.css b/2048/css/media.css new file mode 100644 index 00000000..4a9c685a --- /dev/null +++ b/2048/css/media.css @@ -0,0 +1,55 @@ +@media screen and (max-width:1250px){ + html,body{ + font-size: 15px; + } + .container{ + width: 280px; + } + h1.title{ + font-size: 31px; + } + .score-container, + .best-container{ + padding: 3px 10px; + } + .game-container{ + margin-top: 10px; + width: 280px; + height: 280px; + } + .grid-container, + .tile-container{ + width: 260px; + height: 260px; + } + .grid-row, + .tile{ + height: 22.75%; + } + .grid-cell, + .tile{ + width: 22.75%; + } + .grid-row{ + margin-bottom: 3%; + } + .grid-cell{ + margin-right: 3%; + } + .tile{ + font-size: 35px; + } + .tile[data-val="128"], + .tile[data-val="256"], + .tile[data-val="512"]{ + font-size: 25px; + } + .tile[data-val="1024"], + .tile[data-val="2048"]{ + font-size: 21px; + } + + .pop-container p{ + font-size: 30px; + } +} \ No newline at end of file diff --git a/2048/css/style.css b/2048/css/style.css new file mode 100644 index 00000000..2b0ff70a --- /dev/null +++ b/2048/css/style.css @@ -0,0 +1,329 @@ +@import "../font/clear-sans.css"; + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html, +body { + font-family: "Clear Sans", "Helvetica Neue", Arial, sans-serif; + color: #776e65; + font-size: 18px; + background: rgba(238, 228, 218, 0.5); + overflow: hidden; + height: 100%; +} + +a { + text-decoration: none; + color: inherit; + cursor: pointer; +} + +.container { + position: relative; + margin: 0 auto; + display: flex; + flex-direction: column; + width: 450px; + height: 100vh; + box-sizing: content-box; +} + +.heading { + margin: 20px 0; +} + +.heading { + display: flex; + align-items: center; + justify-content: space-between; + flex-wrap: wrap; +} + +h1.title { + font-size: 74px; + line-height: 66px; + font-weight: bold; +} + +.scores-container { + float: right; +} + +.score-container, +.best-container { + float: left; + padding: 3px 20px; + background: #bbada0; + border-radius: 3px; + font-size: 25px; + font-weight: bold; + color: white; + text-align: center; +} + +.score-container { + position: relative; + margin-right: 15px; + margin-bottom: 5px; +} + +.score-container .title, +.best-container .title { + font-size: 13px; + color: #eee4da; +} + +.score-addition { + position: absolute; + left: 0; + bottom: 0; + width: 100%; + color: rgba(119, 110, 101, 0.9); + z-index: 100; + opacity: 0; + font-size: 1rem; +} + +.score-addition.action { + animation: 2s moveup; +} + +.above-game { + font-size: 0.9rem; +} + +.restart-btn { + margin: 5px 0 0 5px; + float: right; + padding: 0 8px; + background: #8f7a66; + color: white; + height: 40px; + line-height: 40px; + border-radius: 3px; + font-weight: bold; +} + +h2.subtitle { + font-size: 1em; +} + +.game-container { + position: relative; + margin-top: 15px; + width: 450px; + height: 450px; + background: #bbada0; + border-radius: 6px; + touch-action: none; +} + +.grid-container, +.tile-container, +.pop-container { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + width: 426px; + height: 426px; +} + + +.grid-row { + display: flex; + margin-bottom: 2%; +} + +.grid-row, +.tile { + height: 23.5%; +} + +.grid-cell, +.tile { + width: 23.5%; + border-radius: 3px; +} + +.grid-cell { + margin-right: 2%; + background: rgba(238, 228, 218, 0.35); +} + +.grid-cell:nth-of-type(4n) { + margin-right: 0; +} + +.tile { + position: absolute; + display: flex; + align-items: center; + justify-content: center; + font-size: 53px; + font-weight: bold; + background: #eee4da; + transition: all 0.15s ease; +} + +.tile.new-tile { + animation: 0.5s appear; +} + +.tile.addition { + animation: 0.3s add; +} + +.tile[data-val] { + color: #f9f6f2; +} + +.tile[data-val="2"], +.tile[data-val="4"] { + color: #776e65; +} + +.tile[data-val="128"], +.tile[data-val="256"], +.tile[data-val="512"] { + font-size: 45px; +} + +.tile[data-val="1024"], +.tile[data-val="2048"] { + font-size: 33px; +} + +.tile[data-val="4"] { + background: #ede0c8; +} + +.tile[data-val="8"] { + background: #f2b179; +} + +.tile[data-val="16"] { + background: #f59563; +} + +.tile[data-val="32"] { + background: #f67c5f; +} + +.tile[data-val="64"] { + background: #f65e3b; +} + +.tile[data-val="128"] { + background: #edcf72; +} + +.tile[data-val="256"] { + background: #edcc61; + box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.31746), inset 0 0 0 1px rgba(255, 255, 255, 0.19048); +} + +.tile[data-val="512"] { + background: #edc850; + box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.39683), inset 0 0 0 1px rgba(255, 255, 255, 0.2381); +} + +.tile[data-val="1024"] { + background: #edc53f; + box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.47619), inset 0 0 0 1px rgba(255, 255, 255, 0.28571); +} + +.tile[data-val="2048"] { + background: #edc22e; + box-shadow: 0 0 30px 10px rgba(243, 215, 116, 0.55556), inset 0 0 0 1px rgba(255, 255, 255, 0.33333); +} + +.pop-container { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + background: rgba(238, 228, 218, 0.8); + z-index: 100; + opacity: 0; + transition: all 1s ease; +} + +.winning-container p:nth-child(1){ + transform: rotate(90deg); +} + +.winning-container.action p:nth-child(1){ + transform-origin: center; + animation: winning 1.5s infinite; +} + +.failure-container.action p:nth-child(1){ + transform-origin: center; + animation: failure 5s infinite; +} + +@keyframes winning{ + 0%,25%,50%,75%,100%{ + transform: rotate(90deg) translateX(-5px); + } + 12.5%{ + transform: rotate(80deg); + } + 37.5%{ + transform: rotate(70deg); + } + 62.5%{ + transform: rotate(100deg); + } + 87.5%{ + transform: rotate(120deg); + } +} + +@keyframes failure{ + 0%,25%,50%,75%,100%{ + transform: rotate(90deg) scale(0.7,1) rotateX(40deg); + } + 12.5%{ + transform: rotate(90deg); + } + 37.5%{ + transform: rotate(90deg); + } + 62.5%{ + transform: rotate(90deg); + } + 87.5%{ + transform: rotate(90deg); + } +} + +.pop-container.action { + opacity: 1; +} + +.pop-container p { + font-size: 60px; + font-weight: bold; +} + +.footer { + flex: 1; + padding: 10px 0; + text-align: center; + display: flex; + justify-content: space-around; + align-items: flex-end; + font-size: 0.75rem; + color: #333; + opacity: 0.7; +} \ No newline at end of file diff --git a/2048/favicon.ico b/2048/favicon.ico new file mode 100644 index 00000000..22109e04 Binary files /dev/null and b/2048/favicon.ico differ diff --git a/2048/font/ClearSans-Bold-webfont.woff b/2048/font/ClearSans-Bold-webfont.woff new file mode 100644 index 00000000..184a945d Binary files /dev/null and b/2048/font/ClearSans-Bold-webfont.woff differ diff --git a/2048/font/ClearSans-Regular-webfont.woff b/2048/font/ClearSans-Regular-webfont.woff new file mode 100644 index 00000000..9d58858d Binary files /dev/null and b/2048/font/ClearSans-Regular-webfont.woff differ diff --git a/2048/font/clear-sans.css b/2048/font/clear-sans.css new file mode 100644 index 00000000..de2811db --- /dev/null +++ b/2048/font/clear-sans.css @@ -0,0 +1,30 @@ +@font-face { + font-family: "Clear Sans"; + src: url("ClearSans-Light-webfont.eot"); + src: url("ClearSans-Light-webfont.eot?#iefix") format("embedded-opentype"), + url("ClearSans-Light-webfont.svg#clear_sans_lightregular") format("svg"), + url("ClearSans-Light-webfont.woff") format("woff"); + font-weight: 200; + font-style: normal; +} + +@font-face { + font-family: "Clear Sans"; + src: url("ClearSans-Regular-webfont.eot"); + src: url("ClearSans-Regular-webfont.eot?#iefix") format("embedded-opentype"), + url("ClearSans-Regular-webfont.svg#clear_sansregular") format("svg"), + url("ClearSans-Regular-webfont.woff") format("woff"); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: "Clear Sans"; + src: url("ClearSans-Bold-webfont.eot"); + src: url("ClearSans-Bold-webfont.eot?#iefix") format("embedded-opentype"), + url("ClearSans-Bold-webfont.svg#clear_sansbold") format("svg"), + url("ClearSans-Bold-webfont.woff") format("woff"); + font-weight: 700; + font-style: normal; +} + diff --git a/2048/index.html b/2048/index.html new file mode 100644 index 00000000..d8e6919f --- /dev/null +++ b/2048/index.html @@ -0,0 +1,99 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta http-equiv="X-UA-Compatible" content="ie=edge"> + <link rel="stylesheet" href="css/keyframes.css"> + <link rel="stylesheet" href="css/style.css"> + <link rel="stylesheet" href="css/media.css"> + <link rel="shortcut icon" href="./favicon.ico"> + <title>2048</title> +</head> + +<body> + <div class="container"> + <div class="heading"> + <h1 class="title"> + <a href="">2048</a> + </h1> + <div class="scores-container"> + <div class="score-container"> + <p class="title">SCORE</p> + <P class="score">0</P> + <div class="score-addition"> + +4 + </div> + </div> + <div class="best-container"> + <p class="title">BEST</p> + <P class="score">66666</P> + </div> + </div> + </div> + <div class="game-intro"> + <a href="" class="restart-btn">New Game</a> + <h2 class="subtitle"> + Play 2048 Game Online + </h2> + <p class="above-game"> + Join the numbers and get to the <strong>2048</strong> tile! + </p> + </div> + <div class="game-container"> + <div class="grid-container"> + <div class="grid-row"> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + </div> + <div class="grid-row"> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + </div> + <div class="grid-row"> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + </div> + <div class="grid-row"> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + <div class="grid-cell"></div> + </div> + </div> + <div class="tile-container"> + + </div> + <div class="failure-container pop-container"> + <p>:(</span></p> + <p>FIALURE</p> + </div> + <div class="winning-container pop-container"> + <p>:)</p> + <p>WINNING</p> + </div> + </div> + <div class="footer"> + <span> + Crafted with by + @shrey141102<a href="https://github.com/shrey141102/"> -> GitHub</a> + </span> + </div> + </div> + <script src="js/config.js"></script> + <script src="js/data.js"></script> + <script src="js/utils.js"></script> + <script src="js/event.js"></script> + <script src="js/view.js"></script> + <script src="js/game.js"></script> + <script src="js/main.js"></script> +</body> + +</html> \ No newline at end of file diff --git a/2048/js/config.js b/2048/js/config.js new file mode 100644 index 00000000..cdfe9910 --- /dev/null +++ b/2048/js/config.js @@ -0,0 +1,4 @@ +var config = { + bonus_point: 4, + max : 2048, +} \ No newline at end of file diff --git a/2048/js/data.js b/2048/js/data.js new file mode 100644 index 00000000..9239c6ae --- /dev/null +++ b/2048/js/data.js @@ -0,0 +1,37 @@ +var data = { + score: 0, + best: 0, + cell: [ + + ] +} +var indexs = [ + // left + [ + [0, 1, 2, 3], + [4, 5, 6, 7], + [8, 9, 10, 11], + [12, 13, 14, 15], + ], + // top + [ + [0, 4, 8, 12], + [1, 5, 9, 13], + [2, 6, 10, 14], + [3, 7, 11, 15], + ], + // right + [ + [3, 2, 1, 0], + [7, 6, 5, 4], + [11, 10, 9, 8], + [15, 14, 13, 12], + ], + // bottom + [ + [12, 8, 4, 0], + [13, 9, 5, 1], + [14, 10, 6, 2], + [15, 11, 7, 3], + ] +] \ No newline at end of file diff --git a/2048/js/event.js b/2048/js/event.js new file mode 100644 index 00000000..e1233497 --- /dev/null +++ b/2048/js/event.js @@ -0,0 +1,46 @@ +function event(game) { + + var down = false; + + var gameContainer = $('.game-container')[0]; + + on(window, 'keydown', function (e) { + if (down) return; + down = true; + var num = e.keyCode - 37; + if (num >= 0 && num <= 3) { + game.move(num); + } + }); + + on(window, 'keyup', function () { + down = false; + }); + + touchMoveDir(gameContainer, 15, function (dir) { + game.move(dir); + }); + + on($('.restart-btn')[0], 'click', function (e) { + e.preventDefault(); + game.restart(); + }); + + on(window, 'resize', function () { + game.view.resize(); + }); + + // 自动测试 + var autoTest = false; + + if (autoTest) { + (function () { + var timer = setInterval(function () { + var moveInfo = game.move(random(0, 3)); + if (!moveInfo) { + clearInterval(timer); + } + }, 20); + })(); + } +} \ No newline at end of file diff --git a/2048/js/game.js b/2048/js/game.js new file mode 100644 index 00000000..ed532029 --- /dev/null +++ b/2048/js/game.js @@ -0,0 +1,313 @@ +var Game = (function () { + + var cell = data.cell; + var over = false; + var move = false; + + var Game = function (view) { + + }; + Game.prototype = { + init: function (view) { + var _this = this; + this.view = view; + var history = this.getHistory(); + if (history) { + this.restoreHistory(history); + } else { + this.initCell(); + this.start(); + } + this.setBest(); + setTimeout(function () { + _this.view.setup(); + }); + }, + start: function () { + for (var i = 0; i < 2; i++) { + this.randomAddItem(); + } + }, + restart: function () { + var _this = this; + over = false; + this.initCell(); + this.view.restart(); + this.start(); + data.score = 0; + this.save(); + setTimeout(function () { + _this.view.setup(); + }); + }, + save: function () { + localStorage.bestScore = data.best; + localStorage.gameState = JSON.stringify({ + cell: data.cell, + socre: data.score, + }); + }, + winning(){ + over = true; + localStorage.gameState = ''; + this.view.winning(); + }, + checkWinning(){ + var isWinning = cell.find(function(el){ + return el.val === config.max + }); + if (isWinning){ + this.winning(); + } + }, + failure: function () { + over = true; + localStorage.gameState = ''; + this.view.failure(); + }, + checkfailure: function () { + var _this = this; + var same = false; + var called = function (arr, str) { + if (same) return; + same = arr.some(function (el) { + return _this.checkSame(el); + }); + }; + called(this.chunkX(), 'x'); + called(this.chunkY(), 'y'); + setTimeout(function () { + if (!same) { + _this.failure(); + } + }); + }, + checkSame: function (arr, index) { + same = arr.some(function (el, index, arr) { + if (index === arr.length - 1) return; + return el.val === arr[index + 1].val; + return true; + }); + return same; + }, + setBest: function () { + var best = getLocalStorage('bestScore'); + data.best = best || 0; + }, + getHistory: function () { + var gameState = getLocalStorage('gameState'); + if (gameState && gameState.socre && gameState.cell) { + return gameState; + } + }, + restoreHistory: function (history) { + data.cell = history.cell; + data.score = history.socre; + cell = data.cell; + this.view.restoreTile(); + }, + initCell: function () { + for (var i = 0; i < 16; i++) { + cell[i] = { + val: 0, + index: i, + }; + } + }, + addScore: function (score) { + data.score += score; + if (data.best < data.score) { + data.best = data.score; + this.view.updateBest(); + } + this.view.updateScore(score); + }, + chunkX: function () { + var new_cell = []; + for (var i = 0; i < cell.length; i += 4) { + new_cell.push(cell.slice(i, i + 4)); + } + return new_cell; + }, + chunkY: function () { + var arr = this.chunkX(); + var new_cell = [ + [], + [], + [], + [] + ]; + for (var i = 0; i < arr.length; i++) { + for (var j = 0; j < arr[i].length; j++) { + new_cell[j][i] = arr[i][j]; + } + } + return new_cell; + }, + arrayInnerReverse: function (arr) { + arr.forEach(function (el, index) { + arr[index] = el.reverse(); + }); + return arr; + }, + updatePos: function (old_index, index) { + cell[index].val = cell[old_index].val; + cell[old_index].val = 0; + move = true; + return old_index; + }, + updateVal: function (index, val) { + var _this = this; + cell[index].val = val; + setTimeout(function () { + _this.view.updateVal(index); + }, 0); + }, + updateItem: function (old_index, index) { + if (cell[old_index] === cell[index]) return; + var old_index = this.updatePos(old_index, index); + this.view.move(old_index, index); + }, + removeItem: function (index) { + cell[index].val = 0; + this.view.remove(index); + }, + getSum: function (obj, i, j) { + return obj[i].val + obj[j].val; + }, + move: function (dir) { + if (over) return; + var _this = this; + var _score = 0; + var _move = false; + var new_cell = []; + if (dir === 0 || dir === 2) { + new_cell = this.chunkX(); + } else if (dir === 1 || dir === 3) { + new_cell = this.chunkY(); + } + if (dir === 2 || dir === 3) { + new_cell = this.arrayInnerReverse(new_cell); + } + new_cell.forEach(function (arr, index) { + var moveInfo = _this.moving(arr, indexs[dir][index]); + _score += moveInfo.score; + }); + this.addScore(_score); + if (move) { + this.randomAddItem(); + _move = true; + move = false; + } + this.save(); + this.checkWinning(); + if (this.isFull()) { + this.checkfailure(); + } + return { + move: _move, + }; + }, + mergeMove: function (_cell, index, num1, num2, num3) { + var sum = this.getSum(_cell, num1, num2); + this.removeItem(_cell[num1].index); + this.updateItem(_cell[num2].index, index[num3]); + this.updateVal(index[num3], sum); + }, + normalMove: function (_cell, index) { + var _this = this; + _cell.forEach(function (el, i) { + _this.updateItem(_cell[i].index, index[i]); + }); + }, + moving: function (arr, index) { + var _this = this; + var _score = 0; + var _cell = arr.filter(function (el) { + return el.val !== 0; + }); + if (_cell.length === 0) { + return { + score: 0, + } + }; + var calls = [ + function () { + _this.normalMove(_cell, index); + }, + function () { + if (_cell[0].val === _cell[1].val) { + _this.mergeMove(_cell, index, 0, 1, 0); + _score += config.bonus_point; + } else { + _this.normalMove(_cell, index); + } + }, + function () { + if (_cell[0].val === _cell[1].val) { + _this.mergeMove(_cell, index, 0, 1, 0); + _this.updateItem(_cell[2].index, index[1]); + _score += config.bonus_point; + } else if (_cell[1].val === _cell[2].val) { + _this.updateItem(_cell[0].index, index[0]); + _this.mergeMove(_cell, index, 1, 2, 1); + _score += config.bonus_point; + } else { + _this.normalMove(_cell, index); + } + }, + function () { + if (_cell[0].val === _cell[1].val) { + _this.mergeMove(_cell, index, 0, 1, 0); + _score += config.bonus_point; + if (_cell[2].val === _cell[3].val) { + _this.mergeMove(_cell, index, 2, 3, 1); + _score += config.bonus_point; + } else { + _this.updateItem(_cell[2].index, index[1]); + _this.updateItem(_cell[3].index, index[2]); + } + } else if (_cell[1].val === _cell[2].val) { + _this.mergeMove(_cell, index, 1, 2, 1); + _this.updateItem(_cell[3].index, index[2]); + _score += config.bonus_point; + } else if (_cell[2].val === _cell[3].val) { + _this.mergeMove(_cell, index, 2, 3, 2); + _score += config.bonus_point; + } + } + ]; + calls[_cell.length - 1](); + return { + score: _score, + }; + }, + isFull: function () { + var full = cell.filter(function (el) { + return el.val === 0; + }); + return full.length === 0; + }, + randomAddItem: function () { + if (this.isFull()) return; + while (true) { + var index = random(0, data.cell.length - 1); + var exist = data.cell[index].val !== 0; + if (!exist) { + this.addItem(index, 2); + break; + } + } + }, + addItem: function (index, val) { + data.cell[index] = { + val: val, + index: index + }; + this.view.appear(index); + } + }; + + return Game; + +})(); \ No newline at end of file diff --git a/2048/js/main.js b/2048/js/main.js new file mode 100644 index 00000000..5f2d145d --- /dev/null +++ b/2048/js/main.js @@ -0,0 +1,6 @@ +on(window, 'load', function () { + var view = new View(); + var game = new Game(); + game.init(view); + event(game); +}); \ No newline at end of file diff --git a/2048/js/utils.js b/2048/js/utils.js new file mode 100644 index 00000000..188d5d2f --- /dev/null +++ b/2048/js/utils.js @@ -0,0 +1,64 @@ +var log = console.log.bind(console); +var random = function (start, end) { + start = start === void 0 ? 0 : start; + end = end === void 0 ? 1 : end; + end = end + 1; + var rand = Math.random() * (end - start) + start; + return Math.floor(rand); +}; +var $ = function (elem) { + return document.querySelectorAll(elem); +} +var on = function (elem, type, callback) { + elem.addEventListener(type, function (e) { + callback(e); + }); +} + +var indexToPos = function (index) { + return { + x: index % 4, + y: Math.floor(index / 4), + } +} + +var getLocalStorage = function (key) { + return localStorage[key] ? + JSON.parse(localStorage[key]) : null; +} + +var touchMoveDir = function (elem, min, callback) { + var touchPos = { + beforeX: 0, + beforeY: 0, + afterX: 0, + afterY: 0, + } + var move = false; + var dir; + on(elem, 'touchstart', function (e) { + touchPos.beforeX = e.touches[0].clientX; + touchPos.beforeY = e.touches[0].clientY; + }); + on(elem, 'touchmove', function (e) { + move = true; + touchPos.afterX = e.touches[0].clientX; + touchPos.afterY = e.touches[0].clientY; + }); + on(elem, 'touchend', function (e) { + if (!move) return; + var x = touchPos.beforeX - touchPos.afterX; + var y = touchPos.beforeY - touchPos.afterY; + log(x, y); + if (Math.abs(x) < min && Math.abs(y) < min) { + return; + } + if (Math.abs(x) > Math.abs(y)) { + dir = x > 0 ? 0 : 2; + } else { + dir = y > 0 ? 1 : 3; + } + move = false; + callback(dir); + }); +}; \ No newline at end of file diff --git a/2048/js/view.js b/2048/js/view.js new file mode 100644 index 00000000..8f1130bd --- /dev/null +++ b/2048/js/view.js @@ -0,0 +1,126 @@ +var View = (function () { + + var tileContainer = $('.tile-container')[0]; + var scoreContainer = $('.score-container')[0]; + var scoreDom = $('.score-container .score')[0]; + var scoreAddition = $('.score-addition')[0]; + var bestDom = $('.best-container .score')[0]; + var failureContainer = $('.failure-container')[0]; + var winningContainer = $('.winning-container')[0]; + + var View = function () { + + }; + + View.prototype = { + setup: function () { + failureContainer.classList.remove('action'); + winningContainer.classList.remove('action'); + this.updateScore(data.score); + this.updateBest(); + }, + restart: function () { + tileContainer.innerHTML = ""; + }, + resize: function () { + var _this = this; + data.cell.forEach(function (el, index) { + var tile = _this.getTile(index); + if (!tile) return; + var pos = _this.getPos(indexToPos(index)); + _this.setPos(tile, pos); + }); + }, + failure: function () { + failureContainer.classList.add('action'); + }, + winning: function () { + winningContainer.classList.add('action'); + }, + restoreTile: function () { + var _this = this; + data.cell.forEach(function (el, index) { + if (el.val !== 0) { + _this.appear(index); + } + }); + }, + addScoreAnimation: function (score) { + if (!score) return; + scoreAddition.innerHTML = '+' + score; + scoreAddition.classList.add('action'); + setTimeout(function () { + scoreAddition.classList.remove('action'); + }, 500); + }, + updateScore: function (score) { + scoreDom.innerHTML = data.score; + this.addScoreAnimation(score); + }, + updateBest: function () { + bestDom.innerHTML = data.best; + }, + setInfo: function (elem, pos, index) { + elem.style.left = pos.left + 'px'; + elem.style.top = pos.top + 'px'; + elem.setAttribute('data-index', index); + }, + getTile: function (index) { + return $(`.tile[data-index='${index}']`)[0]; + }, + getPos: function (pos) { + var gridCell = $(`.grid-row:nth-child(${pos.y+1}) .grid-cell:nth-child(${pos.x+1})`)[0]; + return { + left: gridCell.offsetLeft, + top: gridCell.offsetTop, + } + }, + setPos: function (elem, pos) { + elem.style.left = pos.left + 'px'; + elem.style.top = pos.top + 'px'; + }, + createTileHTML: function (obj) { + var tile = document.createElement('div'); + tile.className = obj.classNames; + tile.innerHTML = obj.val; + tile.setAttribute('data-index', obj.index); + tile.setAttribute('data-val', obj.val); + this.setPos(tile, obj.pos); + return tile; + }, + appear: function (index) { + var last = data.cell[index]; + var pos = this.getPos(indexToPos(index)); + var newTile = this.createTileHTML({ + val: last.val, + pos: pos, + index: index, + classNames: " tile new-tile", + }); + tileContainer.appendChild(newTile); + }, + remove: function (index) { + var tile = this.getTile(index); + tile.parentElement.removeChild(tile); + }, + move: function (old_index, index) { + var tile = this.getTile(old_index); + var pos = this.getPos(indexToPos(index)); + this.setInfo(tile, pos, index); + }, + updateVal: function (index) { + var tile = this.getTile(index); + var val = data.cell[index].val; + tile.setAttribute('data-val', val); + tile.innerHTML = val; + tile.classList.add('addition'); + setTimeout(function () { + tile.classList.remove('addition'); + tile.classList.remove('new-tile'); + }, 300); + }, + } + + return View; + +})(); \ No newline at end of file diff --git a/4sum.java b/4sum.java new file mode 100644 index 00000000..a1047d56 --- /dev/null +++ b/4sum.java @@ -0,0 +1,30 @@ +class Solution { + public List<List<Integer>> fourSum(int[] nums, int target) { + Arrays.sort(nums); + Set<List<Integer>> s = new HashSet<>(); + List<List<Integer>> output = new ArrayList<>(); + for (int i = 0; i < nums.length; i++) { + for (int j = i + 1; j < nums.length; j++) { + int k = j + 1; + int l = nums.length - 1; + while (k < l) { + long sum = nums[i]; + sum += nums[j]; + sum += nums[k]; + sum += nums[l]; + if (sum == target) { + s.add(Arrays.asList(nums[i], nums[j], nums[k], nums[l])); + k++; + l--; + } else if (sum < target) { + k++; + } else { + l--; + } + } + } + } + output.addAll(s); + return output; + } +} diff --git a/AI Riddle Game/RiddleGame.java b/AI Riddle Game/RiddleGame.java new file mode 100644 index 00000000..0e03fe73 --- /dev/null +++ b/AI Riddle Game/RiddleGame.java @@ -0,0 +1,66 @@ +import java.util.Scanner; + +public class RiddleGame { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + int score = 0; + + // Define an array of riddles and their corresponding answers. + String[] riddles = { + "I speak without a mouth and hear without ears. I have no body, but I come alive with the wind. What am I?", + "The more you take, the more you leave behind. What am I?", + "I'm not alive, but I can grow; I don't have lungs, but I need air; I don't have a mouth, but water kills me. What am I?" + }; + + String[] answers = { + "An echo", + "Footsteps", + "A fire" + }; + + // Define hints for each riddle. + String[] hints = { + "Hint: This thing is known for its ability to reflect sound.", + "Hint: Think about what you leave behind when you walk.", + "Hint: It produces heat and light." + }; + + int numRiddles = riddles.length; + + while (true) { + int randomIndex = (int) (Math.random() * numRiddles); + String selectedRiddle = riddles[randomIndex]; + String correctAnswer = answers[randomIndex]; + String hint = hints[randomIndex]; + + // Display the riddle to the user. + System.out.println("Riddle: " + selectedRiddle); + + // Get user's answer. + String userAnswer = scanner.nextLine(); + + if (userAnswer.equalsIgnoreCase(correctAnswer)) { + System.out.println("Correct!"); + score++; + } else { + // If the answer is incorrect, offer a hint. + System.out.println("Wrong! Would you like a hint? (yes/no)"); + String giveHint = scanner.nextLine().toLowerCase(); + if (giveHint.equals("yes")) { + System.out.println(hint); + } + } + + // Allow the user to continue or exit. + System.out.println("Continue playing? (yes/no)"); + String playAgain = scanner.nextLine().toLowerCase(); + if (!playAgain.equals("yes")) { + break; + } + } + + // Display final score. + System.out.println("Your final score: " + score); + System.out.println("Thanks for playing!"); + } +} diff --git a/ASCII value b/ASCII value new file mode 100644 index 00000000..73c0778e --- /dev/null +++ b/ASCII value @@ -0,0 +1,14 @@ +public class PrintAsciiValueExample1 +{ +public static void main(String[] args) +{ +// character whose ASCII value to be found +char ch1 = 'a'; +char ch2 = 'b'; +// variable that stores the integer value of the character +int asciivalue1 = ch1; +int asciivalue2 = ch2; +System.out.println("The ASCII value of " + ch1 + " is: " + asciivalue1); +System.out.println("The ASCII value of " + ch2 + " is: " + asciivalue2); +} +} diff --git a/ATM interface/README.md b/ATM interface/README.md new file mode 100644 index 00000000..e7caef61 --- /dev/null +++ b/ATM interface/README.md @@ -0,0 +1,3 @@ +# ATM interface program using Java + +A Java program can be written to simulate ATM transactions. The user must choose an option from the possibilities shown on the screen. The choices include those to withdraw money, deposit money, check your balance, and leave. diff --git a/ATM interface/atm.class b/ATM interface/atm.class new file mode 100644 index 00000000..28e450d3 Binary files /dev/null and b/ATM interface/atm.class differ diff --git a/ATM interface/atm.java b/ATM interface/atm.java new file mode 100644 index 00000000..2a327d94 --- /dev/null +++ b/ATM interface/atm.java @@ -0,0 +1,89 @@ +//import required classes and packages +import java.util.Scanner; + +//create ATMExample class to implement the ATM functionality +public class atm +{ + public static boolean validateInputAmount(Integer amount) + { + return amount>0; + } + //main method starts + public static void main(String args[] ) + { + //declare and initialize balance, withdraw, and deposit + int balance = 100000, withdraw, deposit; + + //create scanner class object to get choice of user + Scanner sc = new Scanner(System.in); + + while(true) + { + System.out.println("Automated Teller Machine"); + System.out.println("Choose 1 for Withdraw"); + System.out.println("Choose 2 for Deposit"); + System.out.println("Choose 3 for Check Balance"); + System.out.println("Choose 4 for EXIT"); + System.out.print("Choose the operation you want to perform:"); + + //get choice from user + int choice = sc.nextInt(); + switch(choice) + { + case 1: + System.out.print("Enter money to be withdrawn:"); + + //get the withdrawl money from user + withdraw = sc.nextInt(); + if(!validateInputAmount(withdraw)) + { + System.out.println("Enter amount greater than zero"); + break; + } + + //check whether the balance is greater than or equal to the withdrawal amount + if(balance >= withdraw) + { + //remove the withdrawl amount from the total balance + balance = balance - withdraw; + System.out.println("Please collect your money"); + } + else + { + //show custom error message + System.out.println("Insufficient Balance"); + } + System.out.println(""); + break; + + case 2: + + System.out.print("Enter money to be deposited:"); + + //get deposite amount from te user + deposit = sc.nextInt(); + if(!validateInputAmount(deposit)) + { + System.out.println("Enter amount greater than zero"); + break; + } + + //add the deposit amount to the total balanace + balance = balance + deposit; + System.out.println("Your Money has been successfully depsited"); + System.out.println(""); + break; + + case 3: + //displaying the total balance of the user + System.out.println("Balance : "+balance); + System.out.println(""); + break; + + case 4: + //exit from the menu + System.exit(0); + } + } + } +} diff --git a/ATM/ATM.java b/ATM/ATM.java new file mode 100644 index 00000000..fdffd1ca --- /dev/null +++ b/ATM/ATM.java @@ -0,0 +1,7 @@ + +public class ATM extends OptionMenu { + public static void main(String[] args) { + OptionMenu options = new OptionMenu(); + options.getLogin(); + } +} \ No newline at end of file diff --git a/ATM/Account.java b/ATM/Account.java new file mode 100644 index 00000000..04f5dd0e --- /dev/null +++ b/ATM/Account.java @@ -0,0 +1,110 @@ +import java.text.DecimalFormat; +import java.util.Scanner; + +public class Account { + + private int customerNumber; + private int pinNumber; + private double checkingBalance = 0; + private double savingBalance = 0; + + Scanner input = new Scanner(System.in); + DecimalFormat moneyFormat = new DecimalFormat("'$'###,##0.00"); + + public void setCustomerNumber(int customerNumber){ + this.customerNumber = customerNumber; + } + + public int getCustomerNumber(){ + return customerNumber; + } + + public void setPinNumber(int pinNumber){ + this.pinNumber = pinNumber; + } + + public int getPinNumber(){ + return pinNumber; + } + + public double getCheckingBalance() { + return checkingBalance; + } + + public double getSavingBalance(){ + return savingBalance; + } + + public void calcCheckingWithdraw(double amount){ + checkingBalance = (checkingBalance - amount); + } + + public void calcSavingWithdraw(double amount){ + savingBalance = (savingBalance - amount); + } + + public void calcCheckingDeposit(double amount){ + checkingBalance = (checkingBalance + amount); + } + + public void calcSavingDeposit(double amount){ + savingBalance = (savingBalance + amount); + } + + public void getCheckingWithdrawInput() { + System.out.println("Checking Account balance: " + moneyFormat.format(checkingBalance)); + System.out.print("Amount you want to withdraw from Checking Account: "); + double amount = input.nextDouble(); + + if(checkingBalance - amount >= 0){ + calcCheckingWithdraw(amount); + System.out.println("New Checking Account Balance: " + moneyFormat.format(checkingBalance)); + } + else{ + System.out.println("Not Enough Money to Withdraw"); + } + } + + public void getSavingWithdrawInput() { + System.out.println("Saving Account balance: " + moneyFormat.format(savingBalance)); + System.out.print("Amount you want to withdraw from Saving Account: "); + double amount = input.nextDouble(); + + if(savingBalance - amount >= 0){ + calcSavingWithdraw(amount); + System.out.println("New Saving Account Balance: " + moneyFormat.format(savingBalance)); + } + else{ + System.out.println("Not Enough Money to Withdraw"); + } + } + + public void getCheckingDepositInput(){ + System.out.println("Checking Account Balance: " + moneyFormat.format(checkingBalance)); + System.out.print("Amount you want to deposit to Checking Account: "); + double amount = input.nextDouble(); + + if(checkingBalance + amount >= 0){ + calcCheckingDeposit(amount); + System.out.println("New Checking Account Balance: " + moneyFormat.format(checkingBalance)); + } + else{ + System.out.println("No Money to Deposit"); + } + } + + public void getSavingDepositInput(){ + System.out.println("Saving Account Balance: " + moneyFormat.format(savingBalance)); + System.out.print("Amount you want to deposit to Saving Account: "); + double amount = input.nextDouble(); + + if(checkingBalance + amount >= 0){ + calcSavingDeposit(amount); + System.out.println("New Saving Account Balance: " + moneyFormat.format(savingBalance)); + } + else{ + System.out.println("No Money to Deposit"); + } + } + +} diff --git a/ATM/OptionMenu.java b/ATM/OptionMenu.java new file mode 100644 index 00000000..5658dda9 --- /dev/null +++ b/ATM/OptionMenu.java @@ -0,0 +1,118 @@ +import java.text.DecimalFormat; +import java.util.HashMap; +import java.util.Scanner; + +public class OptionMenu extends Account { + + Scanner menuInput = new Scanner(System.in); + DecimalFormat moneyFormat = new DecimalFormat("'$'###,##0.00"); + + HashMap<Integer, Integer> data = new HashMap<>(); + + public void getLogin() { + int x = 1; + do{ + try{ + data.put(952141, 191904); + data.put(989947, 717976); + + System.out.println("Welcome to ATM"); + System.out.println("Enter your Customer Number"); + setCustomerNumber(menuInput.nextInt()); + + System.out.println("Enter your PIN Number"); + setPinNumber(menuInput.nextInt()); + } + catch(Exception e){ + System.out.println("\nInvalid Characters Only Numbers Allowed\n" + e); + x = 2; + } + + int cn = getCustomerNumber(); + int pn = getPinNumber(); + if(data.containsKey(cn) && data.get(cn) == pn){ + getAccountType(); + } + else{ + System.out.println("\nWrong Customer Number or Wrong PIN Number\n\n"); + } + }while(x == 1); + } + + public void getAccountType() { + System.out.println("Select Account Type you want to Access"); + System.out.println("Type 1 - Checking Account"); + System.out.println("Type 2 - Savings Account"); + System.out.println("Type 3 - Exit"); + + int selection = menuInput.nextInt(); + + switch (selection) { + case 1 -> getChecking(); + case 2 -> getSaving(); + case 3 -> System.out.println("Thank you for using ATM, BYE\n"); + default -> System.out.println("\n Invalid Choice \n"); + } + } + + public void getChecking() { + System.out.println("Checking Account"); + System.out.println("Type 1 - View Balance"); + System.out.println("Type 2 - Withdraw Money"); + System.out.println("Type 3 - Deposit Funds"); + System.out.println("Type 4 - Exit"); + + int selection = menuInput.nextInt(); + + switch (selection) { + case 1 -> { + System.out.println("Checking Account Balance: " + moneyFormat.format(getCheckingBalance())); + getAccountType(); + } + case 2 -> { + getCheckingWithdrawInput(); + getAccountType(); + } + case 3 -> { + getCheckingDepositInput(); + getAccountType(); + } + case 4 -> System.out.println("Thank you for using ATM, Bye"); + default -> { + System.out.println("\nInvalid Choice\n"); + getChecking(); + } + } + } + + public void getSaving() { + System.out.println("Saving Account"); + System.out.println("Type 1 - View Balance"); + System.out.println("Type 2 - Withdraw Money"); + System.out.println("Type 3 - Deposit Funds"); + System.out.println("Type 4 - Exit"); + System.out.print("Choice: "); + + int selection = menuInput.nextInt(); + + switch (selection) { + case 1 -> { + System.out.println("Saving Account Balance: " + moneyFormat.format(getSavingBalance())); + getAccountType(); + } + case 2 -> { + getSavingWithdrawInput(); + getAccountType(); + } + case 3 -> { + getSavingDepositInput(); + getAccountType(); + } + case 4 -> System.out.println("Thank you for using ATM, Bye\n"); + default -> { + System.out.println("\nInvalid Choice\n"); + getChecking(); + } + } + } +} \ No newline at end of file diff --git a/Add Your Code Hs/CI.js b/Add Your Code Hs/CI.js new file mode 100644 index 00000000..7c8bfc2b --- /dev/null +++ b/Add Your Code Hs/CI.js @@ -0,0 +1,16 @@ +function calculateCompoundInterest() { + // Get input values + var principal = parseFloat(document.getElementById("principal").value); + var annualRate = parseFloat(document.getElementById("annualRate").value); + var compoundingFrequency = parseInt(document.getElementById("compoundingFrequency").value); + var years = parseInt(document.getElementById("years").value); + + // Calculate compound interest + var amount = principal * Math.pow(1 + (annualRate / compoundingFrequency), compoundingFrequency * years); + + // Round the result to two decimal places + amount = Math.round(amount * 100) / 100; + + // Display the result + document.getElementById("result").innerHTML = "The final amount after " + years + " years is: $" + amount; +} diff --git a/Add Your Code Hs/Percentage.js b/Add Your Code Hs/Percentage.js new file mode 100644 index 00000000..8c2528a5 --- /dev/null +++ b/Add Your Code Hs/Percentage.js @@ -0,0 +1,11 @@ +function calculatePercentage() { + // Get input values + var number = parseFloat(document.getElementById("number").value); + var percentage = parseFloat(document.getElementById("percentage").value); + + // Calculate the result + var result = (number * percentage) / 100; + + // Display the result + document.getElementById("result").innerHTML = percentage + "% of " + number + " is " + result; +} diff --git a/Add Your Code Hs/SI.html b/Add Your Code Hs/SI.html new file mode 100644 index 00000000..f62b343c --- /dev/null +++ b/Add Your Code Hs/SI.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<html> +<head> + <title>Simple Interest Calculator</title> + <script> + function calculateSimpleInterest() { + // Get principal, rate, and time values from input fields + var principal = parseFloat(document.getElementById("principal").value); + var rate = parseFloat(document.getElementById("rate").value); + var time = parseFloat(document.getElementById("time").value); + + // Calculate simple interest + var interest = (principal * rate * time) / 100; + + // Display the result + document.getElementById("result").innerHTML = "Simple Interest: $" + interest.toFixed(2); + } + </script> +</head> +<body> + <h1>Simple Interest Calculator</h1> + <p>Enter the following details to calculate simple interest:</p> + <form> + <label for="principal">Principal Amount:</label> + <input type="number" id="principal" placeholder="Enter principal amount"><br><br> + + <label for="rate">Rate of Interest:</label> + <input type="number" id="rate" placeholder="Enter rate of interest"><br><br> + + <label for="time">Time (in years):</label> + <input type="number" id="time" placeholder="Enter time in years"><br><br> + + <button type="button" onclick="calculateSimpleInterest()">Calculate</button> + </form> + + <p id="result"></p> +</body> +</html> diff --git a/Add Your Code Hs/html b/Add Your Code Hs/html new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Add Your Code Hs/html @@ -0,0 +1 @@ + diff --git a/Added CGPA Calculator in Java b/Added CGPA Calculator in Java new file mode 100644 index 00000000..2f4f156a --- /dev/null +++ b/Added CGPA Calculator in Java @@ -0,0 +1,47 @@ +import java.util.Scanner; + +class CGPACalculator { + private double[] marks; + + public CGPACalculator(double[] marks) { + this.marks = marks; + } + + public double calculateCGPA() { + double totalGradePoints = 0.0; + for (double mark : marks) { + double grade = mark / 10.0; + totalGradePoints += grade; + } + return totalGradePoints / marks.length; + } + + public double calculatePercentage() { + double cgpa = calculateCGPA(); + return cgpa * 9.5; + } +} + +public class CGPA { + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + System.out.println("Enter the number of subjects:"); + int n = sc.nextInt(); + + double[] marks = new double[n]; + + System.out.println("Enter marks:"); + for (int i = 0; i < n; i++) { + marks[i] = sc.nextDouble(); + } + + CGPACalculator calculator = new CGPACalculator(marks); + + double cgpa = calculator.calculateCGPA(); + System.out.println("CGPA: " + cgpa); + + double percentage = calculator.calculatePercentage(); + System.out.println("Percentage from CGPA: " + percentage); + } +} diff --git a/Added Text Editor in Java b/Added Text Editor in Java new file mode 100644 index 00000000..e53f1194 --- /dev/null +++ b/Added Text Editor in Java @@ -0,0 +1,100 @@ +import javafx.application.Application; +import javafx.stage.Stage; +import javafx.scene.Scene; +import javafx.scene.control.*; +import javafx.scene.layout.BorderPane; +import java.io.*; +import java.util.Scanner; + +public class JavaFXTextEditor extends Application { + private TextArea textArea; + private File currentFile; + + public static void main(String[] args) { + launch(args); + } + + @Override + public void start(Stage primaryStage) { + primaryStage.setTitle("JavaFX Text Editor"); + + textArea = new TextArea(); + textArea.setWrapText(true); + + MenuBar menuBar = createMenuBar(); + + BorderPane layout = new BorderPane(); + layout.setTop(menuBar); + layout.setCenter(textArea); + + Scene scene = new Scene(layout, 800, 600); + primaryStage.setScene(scene); + primaryStage.show(); + } + + private MenuBar createMenuBar() { + MenuBar menuBar = new MenuBar(); + + // File menu + Menu fileMenu = new Menu("File"); + MenuItem newFile = new MenuItem("New"); + MenuItem openFile = new MenuItem("Open"); + MenuItem saveFile = new MenuItem("Save"); + MenuItem exit = new MenuItem("Exit"); + + newFile.setOnAction(e -> newFile()); + openFile.setOnAction(e -> openFile()); + saveFile.setOnAction(e -> saveFile()); + exit.setOnAction(e -> System.exit(0)); + + fileMenu.getItems().addAll(newFile, openFile, saveFile, new SeparatorMenuItem(), exit); + + menuBar.getMenus().add(fileMenu); + + return menuBar; + } + + private void newFile() { + textArea.clear(); + currentFile = null; + } + + private void openFile() { + FileChooser fileChooser = new FileChooser(); + fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("Text Files", "*.txt")); + File selectedFile = fileChooser.showOpenDialog(null); + + if (selectedFile != null) { + currentFile = selectedFile; + try { + Scanner scanner = new Scanner(selectedFile); + StringBuilder content = new StringBuilder(); + while (scanner.hasNext()) { + content.append(scanner.nextLine()).append("\n"); + } + textArea.setText(content.toString()); + scanner.close(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + } + } + + private void saveFile() { + if (currentFile == null) { + FileChooser fileChooser = new FileChooser(); + fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter("Text Files", "*.txt")); + currentFile = fileChooser.showSaveDialog(null); + } + + if (currentFile != null) { + try { + FileWriter writer = new FileWriter(currentFile); + writer.write(textArea.getText()); + writer.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + } +} diff --git a/AddressBook.py b/AddressBook.py new file mode 100644 index 00000000..b7c8ff63 --- /dev/null +++ b/AddressBook.py @@ -0,0 +1,124 @@ +import pickle +import os.path +from tkinter import * # Import tkinter +import tkinter.messagebox + +class Address: + def __init__(self, name, street, city, state, zip): + self.name = name + self.street = street + self.city = city + self.state = state + self.zip = zip + +class AddressBook: + def __init__(self): + window = Tk() # Create a window + window.title("AddressBook") # Set title + + self.nameVar = StringVar() + self.streetVar = StringVar() + self.cityVar = StringVar() + self.stateVar = StringVar() + self.zipVar = StringVar() + + frame1 = Frame(window) + frame1.pack() + Label(frame1, text = "Name").grid(row = 1, + column = 1, sticky = W) + Entry(frame1, textvariable = self.nameVar, + width = 40).grid(row = 1, column = 2) + + frame2 = Frame(window) + frame2.pack() + Label(frame2, text = "Street").grid(row = 1, + column = 1, sticky = W) + Entry(frame2, textvariable = self.streetVar, + width = 40).grid(row = 1, column = 2) + + frame3 = Frame(window) + frame3.pack() + Label(frame3, text = "City", width = 5).grid(row = 1, + column = 1, sticky = W) + Entry(frame3, + textvariable = self.cityVar).grid(row = 1, column = 2) + Label(frame3, text = "State").grid(row = 1, + column = 3, sticky = W) + Entry(frame3, textvariable = self.stateVar, + width = 5).grid(row = 1, column = 4) + Label(frame3, text = "ZIP").grid(row = 1, + column = 5, sticky = W) + Entry(frame3, textvariable = self.zipVar, + width = 5).grid(row = 1, column = 6) + + frame4 = Frame(window) + frame4.pack() + Button(frame4, text = "Add", + command = self.processAdd).grid(row = 1, column = 1) + btFirst = Button(frame4, text = "First", + command = self.processFirst).grid(row = 1, column = 2) + btNext = Button(frame4, text = "Next", + command = self.processNext).grid(row = 1, column = 3) + btPrevious = Button(frame4, text = "Previous", command = + self.processPrevious).grid(row = 1, column = 4) + btLast = Button(frame4, text = "Last", + command = self.processLast).grid(row = 1, column = 5) + + self.addressList = self.loadAddress() + self.current = 0 + + if len(self.addressList) > 0: + self.setAddress() + + window.mainloop() # Create an event loop + + def saveAddress(self): + outfile = open("address.dat", "wb") + pickle.dump(self.addressList, outfile) + tkinter.messagebox.showinfo( + "Address saved", "A new address is saved") + outfile.close() + + def loadAddress(self): + if not os.path.isfile("address.dat"): + return [] # Return an empty list + + try: + infile = open("address.dat", "rb") + addressList = pickle.load(infile) + except EOFError: + addressList = [] + + infile.close() + return addressList + + def processAdd(self): + address = Address(self.nameVar.get(), + self.streetVar.get(), self.cityVar.get(), + self.stateVar.get(), self.zipVar.get()) + self.addressList.append(address) + self.saveAddress() + + def processFirst(self): + self.current = 0 + self.setAddress() + + def processNext(self): + if self.current < len(self.addressList) - 1: + self.current += 1 + self.setAddress() + + def processPrevious(self): + pass # Left as exercise + + def processLast(self): + pass # Left as exercise + + def setAddress(self): + self.nameVar.set(self.addressList[self.current].name) + self.streetVar.set(self.addressList[self.current].street) + self.cityVar.set(self.addressList[self.current].city) + self.stateVar.set(self.addressList[self.current].state) + self.zipVar.set(self.addressList[self.current].zip) + +AddressBook() # Create GUI diff --git a/Admission-counselling-system/.classpath b/Admission-counselling-system/.classpath new file mode 100644 index 00000000..d6d450f0 --- /dev/null +++ b/Admission-counselling-system/.classpath @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="src" path="src"/> + <classpathentry exported="true" kind="lib" path="rs2xml.jar"/> + <classpathentry exported="true" kind="lib" path="sqlitejdbc-v056.jar"/> + <classpathentry kind="output" path="build/classes"/> +</classpath> diff --git a/Admission-counselling-system/.gitignore b/Admission-counselling-system/.gitignore new file mode 100644 index 00000000..68fa45d9 --- /dev/null +++ b/Admission-counselling-system/.gitignore @@ -0,0 +1,2 @@ +/nbproject/private/ +/build/ \ No newline at end of file diff --git a/Admission-counselling-system/.project b/Admission-counselling-system/.project new file mode 100644 index 00000000..ccda3b5f --- /dev/null +++ b/Admission-counselling-system/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>Admission</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/Admission-counselling-system/Choices.png b/Admission-counselling-system/Choices.png new file mode 100644 index 00000000..d59c6a1d Binary files /dev/null and b/Admission-counselling-system/Choices.png differ diff --git a/Admission-counselling-system/My Choice.png b/Admission-counselling-system/My Choice.png new file mode 100644 index 00000000..ea124690 Binary files /dev/null and b/Admission-counselling-system/My Choice.png differ diff --git a/Admission-counselling-system/README.md b/Admission-counselling-system/README.md new file mode 100644 index 00000000..c5b6f111 --- /dev/null +++ b/Admission-counselling-system/README.md @@ -0,0 +1,5 @@ +# Online-Admission-Counselling +This is an addmission counselling system Java Swing. +To run this project u need to install Netbeans with (java 1.8 ) recommended . +Just Clone / Download And run +This Project uses File System as database. diff --git a/Admission-counselling-system/build.xml b/Admission-counselling-system/build.xml new file mode 100644 index 00000000..b040e3d0 --- /dev/null +++ b/Admission-counselling-system/build.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<!-- By default, only the Clean and Build commands use this build script. --> +<!-- Commands such as Run, Debug, and Test only use this build script if --> +<!-- the Compile on Save feature is turned off for the project. --> +<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> +<!-- in the project's Project Properties dialog box.--> +<project name="Admission" default="default" basedir="."> + <description>Builds, tests, and runs the project Admission.</description> + <import file="nbproject/build-impl.xml"/> + <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-jar: called before JAR building + -post-jar: called after JAR building + -post-clean: called after cleaning build products + + (Targets beginning with '-' are not intended to be called on their own.) + + Example of inserting an obfuscator after compilation could look like this: + + <target name="-post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Another way to customize the build is by overriding existing main targets. + The targets of interest are: + + -init-macrodef-javac: defines macro for javac compilation + -init-macrodef-junit: defines macro for junit execution + -init-macrodef-debug: defines macro for class debugging + -init-macrodef-java: defines macro for class execution + -do-jar: JAR building + run: execution of project + -javadoc-build: Javadoc generation + test-report: JUnit report generation + + An example of overriding the target for project execution could look like this: + + <target name="run" depends="Admission-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that the overridden target depends on the jar target and not only on + the compile target as the regular run target does. Again, for a list of available + properties which you can use, check the target you are overriding in the + nbproject/build-impl.xml file. + + --> +</project> diff --git a/Admission-counselling-system/choices.txt b/Admission-counselling-system/choices.txt new file mode 100644 index 00000000..fbf3185a --- /dev/null +++ b/Admission-counselling-system/choices.txt @@ -0,0 +1,16 @@ +5 Choice-1: BENNETT Choice-2: SNU Choice-3: SRM Choice-4: GNIOT Choice-5: AMITY Branch-Choice-1: COMPUTER_SCIENCE Branch-Choice-2: BIOTECH Branch-Choice-3: ECE Branch-Choice-4: MECHANICAL Branch-Choice-5: ECE +2 Choice-1: BENNETT Choice-2: SRM Choice-3: SNU Choice-4: GNIOT Choice-5: AMITY Branch-Choice-1: BIOTECH Branch-Choice-2: CIVIL Branch-Choice-3: MECHANICAL Branch-Choice-4: ECE Branch-Choice-5: COMPUTER_SCIENCE + +2 Choice-1: BENNETT Choice-2: SNU Choice-3: AMITY Choice-4: SRM Choice-5: GNIOT Branch-Choice-1: CIVIL Branch-Choice-2: BIOTECH Branch-Choice-3: MECHANICAL Branch-Choice-4: ECE Branch-Choice-5: COMPUTER_SCIENCE + +3 Choice-1: GNIOT Choice-2: SRM Choice-3: GNIOT Choice-4: BENNETT Choice-5: SNU Branch-Choice-1: MECHANICAL Branch-Choice-2: ECE Branch-Choice-3: CIVIL Branch-Choice-4: MECHANICAL Branch-Choice-5: ECE + +3 Choice-1: SRM Choice-2: GNIOT Choice-3: SRM Choice-4: SNU Choice-5: AMITY Branch-Choice-1: COMPUTER_SCIENCE Branch-Choice-2: MECHANICAL Branch-Choice-3: BIOTECH Branch-Choice-4: CIVIL Branch-Choice-5: BIOTECH + +2 Choice-1: GNIOT Choice-2: SRM Choice-3: SNU Choice-4: BENNETT Choice-5: SRM Branch-Choice-1: COMPUTER_SCIENCE Branch-Choice-2: MECHANICAL Branch-Choice-3: ECE Branch-Choice-4: MECHANICAL Branch-Choice-5: CIVIL + +2 Choice-1: BENNETT Choice-2: GNIOT Choice-3: AMITY Choice-4: SRM Choice-5: AMITY Branch-Choice-1: ECE Branch-Choice-2: MECHANICAL Branch-Choice-3: COMPUTER_SCIENCE Branch-Choice-4: BIOTECH Branch-Choice-5: CIVIL + +2 Choice-1: AMITY Choice-2: GNIOT Choice-3: BENNETT Choice-4: SNU Choice-5: SRM Branch-Choice-1: COMPUTER_SCIENCE Branch-Choice-2: MECHANICAL Branch-Choice-3: ECE Branch-Choice-4: MECHANICAL Branch-Choice-5: BIOTECH + +101 Choice-1: AMITY Choice-2: SNU Choice-3: AMITY Choice-4: SNU Choice-5: SRM Branch-Choice-1: ECE Branch-Choice-2: COMPUTER_SCIENCE Branch-Choice-3: BIOTECH Branch-Choice-4: ECE Branch-Choice-5: CIVIL diff --git a/Admission-counselling-system/dist/Admission.jar b/Admission-counselling-system/dist/Admission.jar new file mode 100644 index 00000000..086407b4 Binary files /dev/null and b/Admission-counselling-system/dist/Admission.jar differ diff --git a/Admission-counselling-system/dist/README.TXT b/Admission-counselling-system/dist/README.TXT new file mode 100644 index 00000000..a7d1532c --- /dev/null +++ b/Admission-counselling-system/dist/README.TXT @@ -0,0 +1,32 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "Admission.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/Admission-counselling-system/dist/lib/AbsoluteLayout.jar b/Admission-counselling-system/dist/lib/AbsoluteLayout.jar new file mode 100644 index 00000000..f5b265cf Binary files /dev/null and b/Admission-counselling-system/dist/lib/AbsoluteLayout.jar differ diff --git a/Admission-counselling-system/dist/lib/rs2xml.jar b/Admission-counselling-system/dist/lib/rs2xml.jar new file mode 100644 index 00000000..75d9c622 Binary files /dev/null and b/Admission-counselling-system/dist/lib/rs2xml.jar differ diff --git a/Admission-counselling-system/dist/lib/sqlitejdbc-v056.jar b/Admission-counselling-system/dist/lib/sqlitejdbc-v056.jar new file mode 100644 index 00000000..f95d90eb Binary files /dev/null and b/Admission-counselling-system/dist/lib/sqlitejdbc-v056.jar differ diff --git a/Admission-counselling-system/f.png b/Admission-counselling-system/f.png new file mode 100644 index 00000000..a27fc08b Binary files /dev/null and b/Admission-counselling-system/f.png differ diff --git a/Admission-counselling-system/manifest.mf b/Admission-counselling-system/manifest.mf new file mode 100644 index 00000000..328e8e5b --- /dev/null +++ b/Admission-counselling-system/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Admission-counselling-system/nbproject/build-impl.xml b/Admission-counselling-system/nbproject/build-impl.xml new file mode 100644 index 00000000..d0167b0d --- /dev/null +++ b/Admission-counselling-system/nbproject/build-impl.xml @@ -0,0 +1,1420 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +*** GENERATED FROM project.xml - DO NOT EDIT *** +*** EDIT ../build.xml INSTEAD *** + +For the purpose of easier reading the script +is divided into following sections: + + - initialization + - compilation + - jar + - execution + - debugging + - javadoc + - test compilation + - test execution + - test debugging + - applet + - cleanup + + --> +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="Admission-impl"> + <fail message="Please build using Ant 1.8.0 or higher."> + <condition> + <not> + <antversion atleast="1.8.0"/> + </not> + </condition> + </fail> + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> + <!-- + ====================== + INITIALIZATION SECTION + ====================== + --> + <target name="-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init" name="-init-private"> + <property file="nbproject/private/config.properties"/> + <property file="nbproject/private/configs/${config}.properties"/> + <property file="nbproject/private/private.properties"/> + </target> + <target depends="-pre-init,-init-private" name="-init-user"> + <property file="${user.properties.file}"/> + <!-- The two properties below are usually overridden --> + <!-- by the active platform. Just a fallback. --> + <property name="default.javac.source" value="1.6"/> + <property name="default.javac.target" value="1.6"/> + </target> + <target depends="-pre-init,-init-private,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> + <property file="nbproject/project.properties"/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> + <property name="platform.java" value="${java.home}/bin/java"/> + <available file="${manifest.file}" property="manifest.available"/> + <condition property="splashscreen.available"> + <and> + <not> + <equals arg1="${application.splash}" arg2="" trim="true"/> + </not> + <available file="${application.splash}"/> + </and> + </condition> + <condition property="main.class.available"> + <and> + <isset property="main.class"/> + <not> + <equals arg1="${main.class}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition property="profile.available"> + <and> + <isset property="javac.profile"/> + <length length="0" string="${javac.profile}" when="greater"/> + <matches pattern="((1\.[89])|9)(\..*)?" string="${javac.source}"/> + </and> + </condition> + <condition property="do.archive"> + <or> + <not> + <istrue value="${jar.archive.disabled}"/> + </not> + <istrue value="${not.archive.disabled}"/> + </or> + </condition> + <condition property="do.mkdist"> + <and> + <isset property="do.archive"/> + <isset property="libs.CopyLibs.classpath"/> + <not> + <istrue value="${mkdist.disabled}"/> + </not> + </and> + </condition> + <condition property="do.archive+manifest.available"> + <and> + <isset property="manifest.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+main.class.available"> + <and> + <isset property="main.class.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+splashscreen.available"> + <and> + <isset property="splashscreen.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+profile.available"> + <and> + <isset property="profile.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="have.tests"> + <or> + <available file="${test.src.dir}"/> + </or> + </condition> + <condition property="have.sources"> + <or> + <available file="${src.dir}"/> + </or> + </condition> + <condition property="netbeans.home+have.tests"> + <and> + <isset property="netbeans.home"/> + <isset property="have.tests"/> + </and> + </condition> + <condition property="no.javadoc.preview"> + <and> + <isset property="javadoc.preview"/> + <isfalse value="${javadoc.preview}"/> + </and> + </condition> + <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> + <property name="javac.compilerargs" value=""/> + <property name="work.dir" value="${basedir}"/> + <condition property="no.deps"> + <and> + <istrue value="${no.dependencies}"/> + </and> + </condition> + <property name="javac.debug" value="true"/> + <property name="javadoc.preview" value="true"/> + <property name="application.args" value=""/> + <property name="source.encoding" value="${file.encoding}"/> + <property name="runtime.encoding" value="${source.encoding}"/> + <property name="manifest.encoding" value="${source.encoding}"/> + <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> + <and> + <isset property="javadoc.encoding"/> + <not> + <equals arg1="${javadoc.encoding}" arg2=""/> + </not> + </and> + </condition> + <property name="javadoc.encoding.used" value="${source.encoding}"/> + <property name="includes" value="**"/> + <property name="excludes" value=""/> + <property name="do.depend" value="false"/> + <condition property="do.depend.true"> + <istrue value="${do.depend}"/> + </condition> + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> + <and> + <isset property="endorsed.classpath"/> + <not> + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> + <isset property="profile.available"/> + </condition> + <condition else="false" property="jdkBug6558476"> + <and> + <matches pattern="1\.[56]" string="${java.specification.version}"/> + <not> + <os family="unix"/> + </not> + </and> + </condition> + <condition else="false" property="javac.fork"> + <or> + <istrue value="${jdkBug6558476}"/> + <istrue value="${javac.external.vm}"/> + </or> + </condition> + <property name="jar.index" value="false"/> + <property name="jar.index.metainf" value="${jar.index}"/> + <property name="copylibs.rebase" value="true"/> + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <property name="java.failonerror" value="true"/> + </target> + <target name="-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> + <fail unless="src.dir">Must set src.dir</fail> + <fail unless="test.src.dir">Must set test.src.dir</fail> + <fail unless="build.dir">Must set build.dir</fail> + <fail unless="dist.dir">Must set dist.dir</fail> + <fail unless="build.classes.dir">Must set build.classes.dir</fail> + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> + <fail unless="dist.jar">Must set dist.jar</fail> + </target> + <target name="-init-macrodef-property"> + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${@{value}}"/> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <mkdir dir="@{apgeneratedsrcdir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <compilerarg value="-processorpath"/> + <compilerarg path="@{processorpath}:${empty.dir}"/> + <compilerarg line="${ap.processors.internal}"/> + <compilerarg line="${annotation.processing.processor.options}"/> + <compilerarg value="-s"/> + <compilerarg path="@{apgeneratedsrcdir}"/> + <compilerarg line="${ap.proc.none.internal}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <sequential> + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </depend> + </sequential> + </macrodef> + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${build.classes.dir}" name="destdir"/> + <sequential> + <fail unless="javac.includes">Must set javac.includes</fail> + <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> + <path> + <filelist dir="@{destdir}" files="${javac.includes}"/> + </path> + <globmapper from="*.java" to="*.class"/> + </pathconvert> + <tempfile deleteonexit="true" property="javac.includesfile.binary"/> + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> + <delete> + <files includesfile="${javac.includesfile.binary}"/> + </delete> + <delete> + <fileset file="${javac.includesfile.binary}"/> + </delete> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target name="-init-test-properties"> + <property name="test.binaryincludes" value="<nothing>"/> + <property name="test.binarytestincludes" value=""/> + <property name="test.binaryexcludes" value=""/> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="Admission" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename Admission -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> + <macrodef name="resolve"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${env.@{value}}"/> + </sequential> + </macrodef> + <macrodef name="profile"> + <attribute default="${main.class}" name="classname"/> + <element name="customize" optional="true"/> + <sequential> + <property environment="env"/> + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <arg line="${application.args}"/> + <classpath> + <path path="${run.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> + </target> + <!-- + end of pre NB7.2 profiling section + --> + <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="name"/> + <attribute default="${debug.classpath}" name="classpath"/> + <attribute default="" name="stopclassname"/> + <sequential> + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </nbjpdastart> + </sequential> + </macrodef> + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${build.classes.dir}" name="dir"/> + <sequential> + <nbjpdareload> + <fileset dir="@{dir}" includes="${fix.classes}"> + <include name="${fix.includes}*.class"/> + </fileset> + </nbjpdareload> + </sequential> + </macrodef> + </target> + <target name="-init-debug-args"> + <property name="version-output" value="java version "${ant.java.version}"/> + <condition property="have-jdk-older-than-1.4"> + <or> + <contains string="${version-output}" substring="java version "1.0"/> + <contains string="${version-output}" substring="java version "1.1"/> + <contains string="${version-output}" substring="java version "1.2"/> + <contains string="${version-output}" substring="java version "1.3"/> + </or> + </condition> + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> + <istrue value="${have-jdk-older-than-1.4}"/> + </condition> + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> + <os family="windows"/> + </condition> + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> + <isset property="debug.transport"/> + </condition> + </target> + <target depends="-init-debug-args" name="-init-macrodef-debug"> + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${debug.classpath}" name="classpath"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-java"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-copylibs"> + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${manifest.file}" name="manifest"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert pathsep=" " property="jar.classpath"> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + <manifest> + <attribute name="Class-Path" value="${jar.classpath}"/> + <customize/> + </manifest> + </copylibs> + </sequential> + </macrodef> + </target> + <target name="-init-presetdef-jar"> + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8"> + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + </jar> + </presetdef> + </target> + <target name="-init-ap-cmdline-properties"> + <property name="annotation.processing.enabled" value="true"/> + <property name="annotation.processing.processors.list" value=""/> + <property name="annotation.processing.processor.options" value=""/> + <property name="annotation.processing.run.all.processors" value="true"/> + <property name="javac.processorpath" value="${javac.classpath}"/> + <property name="javac.test.processorpath" value="${javac.test.classpath}"/> + <condition property="ap.supported.internal" value="true"> + <not> + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> + </not> + </condition> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> + <isfalse value="${annotation.processing.run.all.processors}"/> + </condition> + <condition else="" property="ap.proc.none.internal" value="-proc:none"> + <isfalse value="${annotation.processing.enabled}"/> + </condition> + </target> + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> + <property name="ap.cmd.line.internal" value=""/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> + <!-- + =================== + COMPILATION SECTION + =================== + --> + <target name="-deps-jar-init" unless="built-jar.properties"> + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> + <delete file="${built-jar.properties}" quiet="true"/> + </target> + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> + <echo level="warn" message="Cycle detected: Admission was already built"/> + </target> + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-jar.properties}" verbose="false"/> + <property file="${built-jar.properties}" prefix="already.built.jar."/> + <antcall target="-warn-already-built-jar"/> + <propertyfile file="${built-jar.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> + <target depends="init" name="-check-automatic-build"> + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> + </target> + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> + <antcall target="clean"/> + </target> + <target depends="init,deps-jar" name="-pre-pre-compile"> + <mkdir dir="${build.classes.dir}"/> + </target> + <target name="-pre-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-depend"> + <pathconvert property="build.generated.subdirs"> + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </pathconvert> + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> + <copy todir="${build.classes.dir}"> + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target if="has.persistence.xml" name="-copy-persistence-xml"> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy todir="${build.classes.dir}/META-INF"> + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> + </copy> + </target> + <target name="-post-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> + <target name="-pre-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile/> + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> + </target> + <target name="-post-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> + <!-- + ==================== + JAR BUILDING SECTION + ==================== + --> + <target depends="init" name="-pre-pre-jar"> + <dirname file="${dist.jar}" property="dist.jar.dir"/> + <mkdir dir="${dist.jar.dir}"/> + </target> + <target name="-pre-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <touch file="${tmp.manifest.file}" verbose="false"/> + </target> + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="Main-Class" value="${main.class}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="Profile" value="${javac.profile}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> + <basename file="${application.splash}" property="splashscreen.basename"/> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> + </manifest> + </target> + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs"> + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> + <echo level="info">To run this application from the command line without Ant, try:</echo> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <echo level="info">java -jar "${dist.jar.resolved}"</echo> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> + <j2seproject1:jar manifest="${tmp.manifest.file}"/> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <pathconvert property="run.classpath.with.dist.jar"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> + </pathconvert> + <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}"> + <isset property="main.class.available"/> + </condition> + <condition else="debug" property="jar.usage.level" value="info"> + <isset property="main.class.available"/> + </condition> + <echo level="${jar.usage.level}" message="${jar.usage.message}"/> + </target> + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> + <delete> + <fileset file="${tmp.manifest.file}"/> + </delete> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> + <target name="-post-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> + <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/> + <!-- + ================= + EXECUTION SECTION + ================= + --> + <target depends="init,compile" description="Run a main class." name="run"> + <j2seproject1:java> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject1:java> + </target> + <target name="-do-not-recompile"> + <property name="javac.includes.binary" value=""/> + </target> + <target depends="init,compile-single" name="run-single"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}"/> + </target> + <target depends="init,compile-test-single" name="run-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> + </target> + <!-- + ================= + DEBUGGING SECTION + ================= + --> + <target depends="init" if="netbeans.home" name="-debug-start-debugger"> + <j2seproject1:nbjpdastart name="${debug.class}"/> + </target> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> + </target> + <target depends="init,compile" name="-debug-start-debuggee"> + <j2seproject3:debug> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> + <j2seproject1:nbjpdastart stopclassname="${main.class}"/> + </target> + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}"/> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> + <target depends="init" name="-pre-debug-fix"> + <fail unless="fix.includes">Must set fix.includes</fail> + <property name="javac.includes" value="${fix.includes}.java"/> + </target> + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> + <j2seproject1:nbjpdareload/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> + <!-- + ================= + PROFILING SECTION + ================= + --> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile/> + </target> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="${profile.class}"/> + </target> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </profile> + </target> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + </nbprofiledirect> + <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <test name="${profile.class}"/> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + </junit> + </target> + <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- + =============== + JAVADOC SECTION + =============== + --> + <target depends="init" if="have.sources" name="-javadoc-build"> + <mkdir dir="${dist.javadoc.dir}"/> + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> + <and> + <isset property="endorsed.classpath.cmd.line.arg"/> + <not> + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> + </not> + </and> + </condition> + <condition else="" property="bug5101868workaround" value="*.java"> + <matches pattern="1\.[56](\..*)?" string="${java.version}"/> + </condition> + <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> + <classpath> + <path path="${javac.classpath}"/> + </classpath> + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/*.java"/> + <exclude name="*.java"/> + </fileset> + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> + </javadoc> + <copy todir="${dist.javadoc.dir}"> + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/doc-files/**"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/doc-files/**"/> + </fileset> + </copy> + </target> + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> + <nbbrowse file="${dist.javadoc.dir}/index.html"/> + </target> + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> + <!-- + ========================= + TEST COMPILATION SECTION + ========================= + --> + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> + <mkdir dir="${build.test.classes.dir}"/> + </target> + <target name="-pre-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-test-depend"> + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + </target> + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> + <target name="-pre-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> + <!-- + ======================= + TEST EXECUTION SECTION + ======================= + --> + <target depends="init" if="have.tests" name="-pre-test-run"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/> + </target> + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init" if="have.tests" name="test-report"/> + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> + <target depends="init" if="have.tests" name="-pre-test-run-single"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> + <!-- + ======================= + TEST DEBUGGING SECTION + ======================= + --> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> + <!-- + ========================= + APPLET EXECUTION SECTION + ========================= + --> + <target depends="init,compile-single" name="run-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject1:java classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject1:java> + </target> + <!-- + ========================= + APPLET DEBUGGING SECTION + ========================= + --> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject3:debug classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> + <!-- + =============== + CLEANUP SECTION + =============== + --> + <target name="-deps-clean-init" unless="built-clean.properties"> + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> + <delete file="${built-clean.properties}" quiet="true"/> + </target> + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> + <echo level="warn" message="Cycle detected: Admission was already built"/> + </target> + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-clean.properties}" verbose="false"/> + <property file="${built-clean.properties}" prefix="already.built.clean."/> + <antcall target="-warn-already-built-clean"/> + <propertyfile file="${built-clean.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init" name="-do-clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> + </target> + <target name="-post-clean"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> + <target name="-check-call-dep"> + <property file="${call.built.properties}" prefix="already.built."/> + <condition property="should.call.dep"> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> + </condition> + </target> + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> + <ant antfile="${call.script}" inheritall="false" target="${call.target}"> + <propertyset> + <propertyref prefix="transfer."/> + <mapper from="transfer.*" to="*" type="glob"/> + </propertyset> + </ant> + </target> +</project> diff --git a/Admission-counselling-system/nbproject/genfiles.properties b/Admission-counselling-system/nbproject/genfiles.properties new file mode 100644 index 00000000..70cc4d01 --- /dev/null +++ b/Admission-counselling-system/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=3fa495eb +build.xml.script.CRC32=6c4ba5e8 +build.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=3fa495eb +nbproject/build-impl.xml.script.CRC32=f737ad99 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/Admission-counselling-system/nbproject/project.properties b/Admission-counselling-system/nbproject/project.properties new file mode 100644 index 00000000..8d59df2e --- /dev/null +++ b/Admission-counselling-system/nbproject/project.properties @@ -0,0 +1,81 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=Admission +application.vendor=Hyrex +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Admission.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.rs2xml.jar=rs2xml.jar +file.reference.sqlitejdbc-v056.jar=sqlitejdbc-v056.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.sqlitejdbc-v056.jar}:\ + ${file.reference.rs2xml.jar}:\ + ${libs.absolutelayout.classpath} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=student.information.system.Login +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Admission-counselling-system/nbproject/project.xml b/Admission-counselling-system/nbproject/project.xml new file mode 100644 index 00000000..480d9208 --- /dev/null +++ b/Admission-counselling-system/nbproject/project.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.java.j2seproject</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> + <name>Admission</name> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> + </data> + </configuration> +</project> diff --git a/Admission-counselling-system/output.txt b/Admission-counselling-system/output.txt new file mode 100644 index 00000000..171d369f --- /dev/null +++ b/Admission-counselling-system/output.txt @@ -0,0 +1,5 @@ +xkvn gndlh 22/1/1998 1 poadpiofs@gmail.com 98981100123 dasdg;m; csdondfohnfgo 65 2016001 +Pawan gndlh 22/1/1998 2 poadpiofs@gmail.com 98981100123 dasdg;m; csdondfohnfgo 70 2016001 +Saksham gndlh 22/1/1998 3 poadpiofs@gmail.com 98981100123 dasdg;m; csdondfohnfgo 80 2016001 +Chandra basaa 14/09/98 5 basaaa@gmail.com 321455698 s13,gdfl hsgdgau 98 201310 +yugesh verma 22/1/1996 101 yugesh@gmail.com 6263056779 da sdg;m; csdondfohnfgo zwenlfnsf,,vs 2016001 \ No newline at end of file diff --git a/Admission-counselling-system/rs2xml.jar b/Admission-counselling-system/rs2xml.jar new file mode 100644 index 00000000..75d9c622 Binary files /dev/null and b/Admission-counselling-system/rs2xml.jar differ diff --git a/Admission-counselling-system/sqlitejdbc-v056.jar b/Admission-counselling-system/sqlitejdbc-v056.jar new file mode 100644 index 00000000..f95d90eb Binary files /dev/null and b/Admission-counselling-system/sqlitejdbc-v056.jar differ diff --git a/Admission-counselling-system/src/student/information/system/Audit_details.form b/Admission-counselling-system/src/student/information/system/Audit_details.form new file mode 100644 index 00000000..e756c91c --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/Audit_details.form @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel4" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> + <Component id="jPanel4" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel3"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Login_Record"> + <Font PropertyName="font" name="Adobe Arabic" size="14" style="1"/> + </TitledBorder> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane3" pref="557" max="32767" attributes="0"/> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Component id="jButton1" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jScrollPane3" pref="327" max="32767" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jButton1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane3"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="tbl_3"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="4" rowCount="4"> + <Column editable="true" title="Title 1" type="java.lang.Object"/> + <Column editable="true" title="Title 2" type="java.lang.Object"/> + <Column editable="true" title="Title 3" type="java.lang.Object"/> + <Column editable="true" title="Title 4" type="java.lang.Object"/> + </Table> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/erase-128.png"/> + </Property> + <Property name="text" type="java.lang.String" value="Reset"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel4"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Search"> + <Font PropertyName="font" name="Adobe Arabic" size="14" style="1"/> + </TitledBorder> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel2" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="txt_search" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_search" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="text" type="java.lang.String" value="ID:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_search"> + <Events> + <EventHandler event="keyReleased" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="txt_searchKeyReleased"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Admission-counselling-system/src/student/information/system/Audit_details.java b/Admission-counselling-system/src/student/information/system/Audit_details.java new file mode 100644 index 00000000..fc5fec30 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/Audit_details.java @@ -0,0 +1,281 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; +import javax.swing.JOptionPane; +import java.awt.*; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.Calendar; +import java.util.GregorianCalendar; +import javax.swing.*; +import net.proteanit.sql.DbUtils; + +/** + * + * @author Hyrex + */ +public class Audit_details extends javax.swing.JFrame { +Connection conn=null; +ResultSet rs=null; +PreparedStatement pst=null; + /** + * Creates new form Audit_details + */ + public Audit_details() { + initComponents(); + conn=db.java_db(); + Toolkit toolkit = getToolkit(); + Dimension size = toolkit.getScreenSize(); + setLocation(size.width/2 - getWidth()/2, + size.height/2 - getHeight()/2); + + Update_table3(); + + } + + + private void Update_table3() { + try{ + + + String sql ="select * from Audit"; + + pst=conn.prepareStatement(sql); + rs=pst.executeQuery(); + tbl_3.setModel(DbUtils.resultSetToTableModel(rs)); + + } + catch(Exception e){ + JOptionPane.showMessageDialog(null, e); + } + finally { + + try{ + rs.close(); + pst.close(); + + } + catch(Exception e){ + + } + } + } + + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel3 = new javax.swing.JPanel(); + jScrollPane3 = new javax.swing.JScrollPane(); + tbl_3 = new javax.swing.JTable(); + jButton1 = new javax.swing.JButton(); + jPanel4 = new javax.swing.JPanel(); + jLabel2 = new javax.swing.JLabel(); + txt_search = new javax.swing.JTextField(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setResizable(false); + + jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Login_Record", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Adobe Arabic", 1, 14))); // NOI18N + + tbl_3.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + {null, null, null, null}, + {null, null, null, null}, + {null, null, null, null}, + {null, null, null, null} + }, + new String [] { + "Title 1", "Title 2", "Title 3", "Title 4" + } + )); + jScrollPane3.setViewportView(tbl_3); + + jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/erase-128.png"))); // NOI18N + jButton1.setText("Reset"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 557, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jButton1))) + .addContainerGap()) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 327, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jButton1) + .addGap(6, 6, 6)) + ); + + jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Adobe Arabic", 1, 14))); // NOI18N + + jLabel2.setText("ID:"); + + txt_search.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyReleased(java.awt.event.KeyEvent evt) { + txt_searchKeyReleased(evt); + } + }); + + javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); + jPanel4.setLayout(jPanel4Layout); + jPanel4Layout.setHorizontalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel2) + .addGap(18, 18, 18) + .addComponent(txt_search) + .addContainerGap()) + ); + jPanel4Layout.setVerticalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_search, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel2)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(20, 20, 20) + .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(26, 26, 26) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void txt_searchKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txt_searchKeyReleased + // TODO add your handling code here: + try{ + + String sql ="select * from Audit where emp_id=? "; + + + pst=conn.prepareStatement(sql); + pst.setString(1,txt_search.getText()); + rs=pst.executeQuery(); + tbl_3.setModel(DbUtils.resultSetToTableModel(rs)); + + + + }catch(Exception e){ + JOptionPane.showMessageDialog(null, e); + } + finally { + + try{ + + rs.close(); + pst.close(); + + } + catch(Exception e){ + + } + } + + + + }//GEN-LAST:event_txt_searchKeyReleased + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + + Update_table3(); + txt_search.setText(""); + + }//GEN-LAST:event_jButton1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Audit_details.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Audit_details().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JPanel jPanel4; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JTable tbl_3; + private javax.swing.JTextField txt_search; + // End of variables declaration//GEN-END:variables +} diff --git a/Admission-counselling-system/src/student/information/system/Choice.form b/Admission-counselling-system/src/student/information/system/Choice.form new file mode 100644 index 00000000..e2d8336a --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/Choice.form @@ -0,0 +1,516 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,-43,0,0,3,116"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="CHOICES"> + <Border PropertyName="innerBorder" info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="4"/> + </Border> + <Font PropertyName="font" name="Tahoma" size="24" style="1"/> + </TitledBorder> + </Border> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="40" y="20" width="830" height="670"/> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="23" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> + <Component id="jLabel3" alignment="0" pref="95" max="32767" attributes="0"/> + <Component id="jLabel2" alignment="0" max="32767" attributes="0"/> + </Group> + <Component id="jLabel4" alignment="0" min="-2" pref="82" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="0" min="-2" pref="82" max="-2" attributes="0"/> + <Component id="jLabel6" alignment="0" min="-2" pref="82" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jComboBox1" max="32767" attributes="0"/> + <Component id="jComboBox2" pref="136" max="32767" attributes="0"/> + <Component id="jComboBox3" max="32767" attributes="0"/> + <Component id="jComboBox4" alignment="0" max="32767" attributes="0"/> + <Component id="jComboBox5" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace pref="223" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Component id="jButton1" min="-2" pref="99" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel7" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Component id="jLabel12" alignment="0" max="32767" attributes="0"/> + <Component id="jLabel11" alignment="0" max="32767" attributes="0"/> + <Component id="jLabel10" alignment="0" max="32767" attributes="0"/> + <Component id="jLabel9" alignment="0" max="32767" attributes="0"/> + <Component id="jLabel8" alignment="0" pref="85" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jComboBox6" max="32767" attributes="0"/> + <Component id="jComboBox7" max="32767" attributes="0"/> + <Component id="jComboBox8" alignment="0" max="32767" attributes="0"/> + <Component id="jComboBox9" alignment="0" max="32767" attributes="0"/> + <Component id="jComboBox10" alignment="0" max="32767" attributes="0"/> + </Group> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Component id="Print" min="-2" pref="118" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="23" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="164" max="-2" attributes="0"/> + <Component id="jLabel13" min="-2" pref="126" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="104" max="-2" attributes="0"/> + <Component id="jTextField1" min="-2" pref="125" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jLabel13" pref="36" max="32767" attributes="0"/> + <Component id="jTextField1" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox6" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="49" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox7" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="53" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox8" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="66" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox9" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="63" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jComboBox10" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="61" max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="Print" alignment="3" min="-2" pref="38" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="46" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Select your college"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Choice 1"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="6"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="BENNETT"/> + <StringItem index="2" value="AMITY"/> + <StringItem index="3" value="SNU"/> + <StringItem index="4" value="GNIOT"/> + <StringItem index="5" value="SRM"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Choice 2"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="6"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="BENNETT"/> + <StringItem index="2" value="SNU"/> + <StringItem index="3" value="SRM"/> + <StringItem index="4" value="GNIOT"/> + <StringItem index="5" value="AMITY"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Choice 3"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="6"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="BENNETT"/> + <StringItem index="2" value="AMITY"/> + <StringItem index="3" value="SNU"/> + <StringItem index="4" value="SRM"/> + <StringItem index="5" value="GNIOT"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Choice 4"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="6"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="BENNETT"/> + <StringItem index="2" value="SNU"/> + <StringItem index="3" value="SRM"/> + <StringItem index="4" value="GNIOT"/> + <StringItem index="5" value="AMITY"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Choice 5"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="6"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="BENNETT"/> + <StringItem index="2" value="SNU"/> + <StringItem index="3" value="SRM"/> + <StringItem index="4" value="AMITY"/> + <StringItem index="5" value="GNIOT"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Select your branch"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Choice 1"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="6"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="COMPUTER_SCIENCE"/> + <StringItem index="2" value="ECE"/> + <StringItem index="3" value="MECHANICAL"/> + <StringItem index="4" value="CIVIL"/> + <StringItem index="5" value="BIOTECH"/> + </StringArray> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jComboBox6ActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Choice 2"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox7"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="6"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="COMPUTER_SCIENCE"/> + <StringItem index="2" value="MECHANICAL"/> + <StringItem index="3" value="ECE"/> + <StringItem index="4" value="CIVIL"/> + <StringItem index="5" value="BIOTECH"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Choice 3"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="6"> + <StringItem index="0" value="select"/> + <StringItem index="1" value="COMPUTER_SCIENCE"/> + <StringItem index="2" value="ECE"/> + <StringItem index="3" value="MECHANICAL"/> + <StringItem index="4" value="BIOTECH"/> + <StringItem index="5" value="CIVIL"/> + </StringArray> + </Property> + <Property name="toolTipText" type="java.lang.String" value=""/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Choice 4"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox9"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="6"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="COMPUTER_SCIENCE"/> + <StringItem index="2" value="ECE"/> + <StringItem index="3" value="MECHANICAL"/> + <StringItem index="4" value="CIVIL"/> + <StringItem index="5" value="BIOTECH"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Choice 5"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBox10"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="6"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="COMPUTER_SCIENCE"/> + <StringItem index="2" value="ECE"/> + <StringItem index="3" value="MECHANICAL"/> + <StringItem index="4" value="CIVIL"/> + <StringItem index="5" value="BIOTECH"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="OK"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="Print"> + <Properties> + <Property name="text" type="java.lang.String" value="Print"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="PrintActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Student ID"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField1"> + <Properties> + <Property name="text" type="java.lang.String" value="jTextField1"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField1ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Admission-counselling-system/src/student/information/system/Choice.java b/Admission-counselling-system/src/student/information/system/Choice.java new file mode 100644 index 00000000..a2356733 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/Choice.java @@ -0,0 +1,408 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +import java.awt.Component; +import java.awt.HeadlessException; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.imageio.ImageIO; + +/** + * + */ +public class Choice extends javax.swing.JFrame { + + /** + * Creates new form Choice + */ + public Choice() { + initComponents(); + } + public Choice(String dat){ + initComponents(); + this.jTextField1.setText(dat); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jComboBox1 = new javax.swing.JComboBox<>(); + jLabel3 = new javax.swing.JLabel(); + jComboBox2 = new javax.swing.JComboBox<>(); + jLabel4 = new javax.swing.JLabel(); + jComboBox3 = new javax.swing.JComboBox<>(); + jLabel5 = new javax.swing.JLabel(); + jComboBox4 = new javax.swing.JComboBox<>(); + jLabel6 = new javax.swing.JLabel(); + jComboBox5 = new javax.swing.JComboBox<>(); + jLabel7 = new javax.swing.JLabel(); + jLabel8 = new javax.swing.JLabel(); + jComboBox6 = new javax.swing.JComboBox<>(); + jLabel9 = new javax.swing.JLabel(); + jComboBox7 = new javax.swing.JComboBox<>(); + jLabel10 = new javax.swing.JLabel(); + jComboBox8 = new javax.swing.JComboBox<>(); + jLabel11 = new javax.swing.JLabel(); + jComboBox9 = new javax.swing.JComboBox<>(); + jLabel12 = new javax.swing.JLabel(); + jComboBox10 = new javax.swing.JComboBox<>(); + jButton1 = new javax.swing.JButton(); + Print = new javax.swing.JButton(); + jLabel13 = new javax.swing.JLabel(); + jTextField1 = new javax.swing.JTextField(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 4), "CHOICES", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 24))); // NOI18N + + jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N + jLabel1.setText("Select your college"); + + jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel2.setText("Choice 1"); + + jComboBox1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "BENNETT", "AMITY", "SNU", "GNIOT", "SRM" })); + + jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel3.setText("Choice 2"); + + jComboBox2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "BENNETT", "SNU", "SRM", "GNIOT", "AMITY" })); + + jLabel4.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel4.setText("Choice 3"); + + jComboBox3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jComboBox3.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "BENNETT", "AMITY", "SNU", "SRM", "GNIOT" })); + + jLabel5.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel5.setText("Choice 4"); + + jComboBox4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jComboBox4.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "BENNETT", "SNU", "SRM", "GNIOT", "AMITY" })); + + jLabel6.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel6.setText("Choice 5"); + + jComboBox5.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jComboBox5.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "BENNETT", "SNU", "SRM", "AMITY", "GNIOT" })); + + jLabel7.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N + jLabel7.setText("Select your branch"); + + jLabel8.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel8.setText("Choice 1"); + + jComboBox6.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jComboBox6.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "COMPUTER_SCIENCE", "ECE", "MECHANICAL", "CIVIL", "BIOTECH" })); + jComboBox6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jComboBox6ActionPerformed(evt); + } + }); + + jLabel9.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel9.setText("Choice 2"); + + jComboBox7.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jComboBox7.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "COMPUTER_SCIENCE", "MECHANICAL", "ECE", "CIVIL", "BIOTECH" })); + + jLabel10.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel10.setText("Choice 3"); + + jComboBox8.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jComboBox8.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "select", "COMPUTER_SCIENCE", "ECE", "MECHANICAL", "BIOTECH", "CIVIL" })); + jComboBox8.setToolTipText(""); + + jLabel11.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel11.setText("Choice 4"); + + jComboBox9.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jComboBox9.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "COMPUTER_SCIENCE", "ECE", "MECHANICAL", "CIVIL", "BIOTECH" })); + + jLabel12.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel12.setText("Choice 5"); + + jComboBox10.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jComboBox10.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "COMPUTER_SCIENCE", "ECE", "MECHANICAL", "CIVIL", "BIOTECH" })); + + jButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jButton1.setText("OK"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + Print.setText("Print"); + Print.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + PrintActionPerformed(evt); + } + }); + + jLabel13.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N + jLabel13.setText("Student ID"); + + jTextField1.setText("jTextField1"); + jTextField1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextField1ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(23, 23, 23) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE) + .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jComboBox2, 0, 136, Short.MAX_VALUE) + .addComponent(jComboBox3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jComboBox4, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jComboBox5, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 223, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel7) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 85, Short.MAX_VALUE)) + .addGap(32, 32, 32) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jComboBox6, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jComboBox7, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jComboBox8, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jComboBox9, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jComboBox10, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(26, 26, 26) + .addComponent(Print, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(23, 23, 23)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(164, 164, 164) + .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(104, 104, 104) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(jLabel7)) + .addGap(18, 18, 18) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE) + .addComponent(jTextField1)) + .addGap(29, 29, 29) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel2) + .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel8) + .addComponent(jComboBox6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(49, 49, 49) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel3) + .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel9) + .addComponent(jComboBox7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(53, 53, 53) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel4) + .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel10) + .addComponent(jComboBox8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(66, 66, 66) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel5) + .addComponent(jComboBox4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel11) + .addComponent(jComboBox9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(63, 63, 63) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel6) + .addComponent(jComboBox5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel12) + .addComponent(jComboBox10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 61, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1) + .addComponent(Print, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(46, 46, 46)) + ); + + getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 20, 830, 670)); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jComboBox6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBox6ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jComboBox6ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed +String t1=jTextField1.getText(); + String c1 = jComboBox1.getSelectedItem().toString(); +String c2 = jComboBox2.getSelectedItem().toString(); +String c3 = jComboBox3.getSelectedItem().toString(); +String c4 = jComboBox4.getSelectedItem().toString(); +String c5 = jComboBox5.getSelectedItem().toString(); +String b1 = jComboBox6.getSelectedItem().toString(); +String b2 = jComboBox7.getSelectedItem().toString(); +String b3= jComboBox8.getSelectedItem().toString(); +String b4 = jComboBox9.getSelectedItem().toString(); +String b5 = jComboBox10.getSelectedItem().toString(); + ChoicesData ch; + try { + ch = new ChoicesData(t1,c1,c2,c3,c4,c5,b1,b2,b3,b4,b5); + } catch (HeadlessException ex) { + Logger.getLogger(Choice.class.getName()).log(Level.SEVERE, null, ex); + } catch (IOException ex) { + Logger.getLogger(Choice.class.getName()).log(Level.SEVERE, null, ex); + } + + try { + // TODO add your handling code here: + new CounsellingResult(String.valueOf(this.jTextField1.getText())).setVisible(true); + } catch (FileNotFoundException ex) { + Logger.getLogger(Choice.class.getName()).log(Level.SEVERE, null, ex); + } + this.setVisible(false); + }//GEN-LAST:event_jButton1ActionPerformed +public static BufferedImage getScreenShot(Component component){ +BufferedImage image =new BufferedImage(component.getWidth(),component.getHeight(),BufferedImage.TYPE_INT_RGB); +component.paint(image.getGraphics()); +return image; +} +public static void SaveScreenShot(Component component,String filename)throws Exception{ +BufferedImage img = getScreenShot(component); + ImageIO.write(img, "png", new File(filename));} + private void PrintActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_PrintActionPerformed + // TODO add your handling code here: + try{ // TODO add your handling code here: +SaveScreenShot(jPanel1,"Choices.png"); + } + catch (Exception ex) { + Logger.getLogger(Choice.class.getName()).log(Level.SEVERE, null, ex); + } + }//GEN-LAST:event_PrintActionPerformed + + private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed + try { + // TODO add your handling code here: + new CounsellingResult(String.valueOf(jTextField1.getText())).setVisible(true); + } catch (FileNotFoundException ex) { + Logger.getLogger(Choice.class.getName()).log(Level.SEVERE, null, ex); + } + this.setVisible(false); + }//GEN-LAST:event_jTextField1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Choice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Choice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Choice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Choice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Choice().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton Print; + private javax.swing.JButton jButton1; + private javax.swing.JComboBox<String> jComboBox1; + private javax.swing.JComboBox<String> jComboBox10; + private javax.swing.JComboBox<String> jComboBox2; + private javax.swing.JComboBox<String> jComboBox3; + private javax.swing.JComboBox<String> jComboBox4; + private javax.swing.JComboBox<String> jComboBox5; + private javax.swing.JComboBox<String> jComboBox6; + private javax.swing.JComboBox<String> jComboBox7; + private javax.swing.JComboBox<String> jComboBox8; + private javax.swing.JComboBox<String> jComboBox9; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; + private javax.swing.JPanel jPanel1; + private javax.swing.JTextField jTextField1; + // End of variables declaration//GEN-END:variables +} diff --git a/Admission-counselling-system/src/student/information/system/ChoicesData.java b/Admission-counselling-system/src/student/information/system/ChoicesData.java new file mode 100644 index 00000000..3e7e1e8a --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/ChoicesData.java @@ -0,0 +1,69 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +import java.awt.HeadlessException; +import java.io.FileWriter; +import java.io.IOException; +import java.io.Writer; +import static student.information.system.StudentData.newWriter; + +/** + * + * @author pawan saxena + */ + public class ChoicesData { + public static Writer ChoicesWriter,SortWriter; + + String cChoice1; + String cChoice2; + String cChoice3; + String cChoice4; + String cChoice5; + String bChoice1; + String bChoice2; + String bChoice3; + String bChoice4; + String bChoice5; + + + + ChoicesData(String stud,String cChoice1, String cChoice2, String cChoice3, String cChoice4, String cChoice5, String bChoice1, String bChoice2, String bChoice3, String bChoice4, String bChoice5) throws HeadlessException, IOException { + this.cChoice1 = cChoice1; + this.cChoice2 = cChoice2; + this.cChoice3 = cChoice3; + this.cChoice4 = cChoice4; + this.cChoice5 = cChoice5; + this.bChoice1 = bChoice1; + this.bChoice2 = bChoice2; + this.bChoice3 = bChoice3; + this.bChoice4 = bChoice4; + this.bChoice5 = bChoice5; + Store(stud); + } + +public void Store(String txt) throws IOException{ +ChoicesWriter= new FileWriter("choices.txt",true); + ChoicesWriter.write(System.lineSeparator()); + String value1 = this.cChoice1; + String value2 = this.cChoice2; + String value3 = this.cChoice3; + String value4 = this.cChoice4; + String value5 = this.cChoice5; + String value6 = this.bChoice1; + String value7 = this.bChoice2; + String value8 = this.bChoice3; + String value9= this.bChoice4; + String value10 = this.bChoice5; +ChoicesWriter.write(txt+" Choice-1: "+value1+" Choice-2: "+value2+" Choice-3: "+value3+" Choice-4: "+value4+" Choice-5: "+value5+" Branch-Choice-1: "+value6+" Branch-Choice-2: "+value7+" Branch-Choice-3: "+value8+" Branch-Choice-4: "+value9+" Branch-Choice-5: "+value10+" "); + ChoicesWriter.write(System.lineSeparator()); + + + ChoicesWriter.flush(); + ChoicesWriter.close(); + +} +} diff --git a/Admission-counselling-system/src/student/information/system/CounsellingResult.form b/Admission-counselling-system/src/student/information/system/CounsellingResult.form new file mode 100644 index 00000000..220893eb --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/CounsellingResult.form @@ -0,0 +1,213 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-21,0,0,3,-125"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="3"/> + </Border> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="20" y="20" width="860" height="460"/> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="308" max="-2" attributes="0"/> + <Component id="jLabel2" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="260" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jLabel4" alignment="0" min="-2" pref="160" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="0" min="-2" pref="132" max="-2" attributes="0"/> + <Component id="jLabel5" max="32767" attributes="0"/> + <Component id="jLabel6" alignment="0" max="32767" attributes="0"/> + </Group> + <Component id="jButton1" min="-2" pref="88" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField2" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField1" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField3" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField4" alignment="0" max="32767" attributes="0"/> + <Component id="jButton2" alignment="0" pref="200" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace pref="160" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" min="-2" pref="33" max="-2" attributes="0"/> + <Component id="jLabel2" min="-2" pref="48" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="57" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="39" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel5" min="-2" max="-2" attributes="0"/> + <Component id="jTextField3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <Component id="jTextField4" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="45" max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="COUNSELLING RESULT"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Name"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField1"> + <Properties> + <Property name="text" type="java.lang.String" value="jTextField1"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Student ID"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField2"> + <Properties> + <Property name="text" type="java.lang.String" value="jTextField2"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="College Allotted"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField3"> + <Properties> + <Property name="text" type="java.lang.String" value="jTextField3"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Branch Allotted"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField4"> + <Properties> + <Property name="text" type="java.lang.String" value="jTextField4"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField4ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="ok"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Save as Image"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Admission-counselling-system/src/student/information/system/CounsellingResult.java b/Admission-counselling-system/src/student/information/system/CounsellingResult.java new file mode 100644 index 00000000..cf975be3 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/CounsellingResult.java @@ -0,0 +1,338 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +import java.awt.Component; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.imageio.ImageIO; + +/** + * + * @author HP + */ +public class CounsellingResult extends javax.swing.JFrame { + + /** + * Creates new form CounsellingResult + */ + public CounsellingResult() { + initComponents(); + } + public CounsellingResult(String value) throws FileNotFoundException { + initComponents(); + this.jTextField2.setText(value); + File f = new File("output.txt"); + Scanner sc =new Scanner(f); + while(sc.hasNextLine()){ + String data = sc.nextLine(); +String variable[] = data.split("\\s+"); +String p=variable[3]; + if(p.equals(value)){ + + + this.jTextField1.setText(variable[0]+" "+variable[1]); + + + + + }}} + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jTextField1 = new javax.swing.JTextField(); + jLabel4 = new javax.swing.JLabel(); + jTextField2 = new javax.swing.JTextField(); + jLabel5 = new javax.swing.JLabel(); + jTextField3 = new javax.swing.JTextField(); + jLabel6 = new javax.swing.JLabel(); + jTextField4 = new javax.swing.JTextField(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); + + jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N + jLabel2.setText("COUNSELLING RESULT"); + + jLabel3.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N + jLabel3.setText("Name"); + + jTextField1.setText("jTextField1"); + jTextField1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextField1ActionPerformed(evt); + } + }); + + jLabel4.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N + jLabel4.setText("Student ID"); + + jTextField2.setText("jTextField2"); + jTextField2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextField2ActionPerformed(evt); + } + }); + + jLabel5.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N + jLabel5.setText("College Allotted"); + + jTextField3.setText("jTextField3"); + + jLabel6.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N + jLabel6.setText("Branch Allotted"); + + jTextField4.setText("jTextField4"); + jTextField4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextField4ActionPerformed(evt); + } + }); + + jButton1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jButton1.setText("ok"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jButton2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jButton2.setText("Save as Image"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(308, 308, 308) + .addComponent(jLabel2) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jLabel1)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(260, 260, 260) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(45, 45, 45) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField2) + .addComponent(jTextField1) + .addComponent(jTextField3) + .addComponent(jTextField4) + .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)))) + .addContainerGap(160, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(57, 57, 57) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel3)) + .addGap(29, 29, 29) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel4) + .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(39, 39, 39) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel5) + .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(37, 37, 37) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel6) + .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1) + .addComponent(jButton2)) + .addGap(29, 29, 29)) + ); + + getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 20, 860, 460)); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextField1ActionPerformed + + private void jTextField2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField2ActionPerformed + String val= this.jTextField2.getText(); +String q=""; + File ci=new File("output.txt"); + try { + Scanner c1=new Scanner(ci); + while(c1.hasNextLine()){ + String data = c1.nextLine(); +String variable[] = data.split("\\s+"); +String p=variable[3]; + if(p.equals(val)){ + q=variable[8]; + } + }// TODO add your handling code here: + } catch (FileNotFoundException ex) { + Logger.getLogger(CounsellingResult.class.getName()).log(Level.SEVERE, null, ex); + } + + File choices = new File("choices.txt"); + +Scanner sc = null; + try { + sc = new Scanner(choices); + } catch (FileNotFoundException ex) { + Logger.getLogger(CounsellingResult.class.getName()).log(Level.SEVERE, null, ex); + } +while(sc.hasNextLine()){ + String data = sc.nextLine(); +String variable[] = data.split("\\s+"); +String p=variable[0]; +int k=Integer.parseInt(q); +if(p.equals(val)) + if (k>=90 ){ +jTextField3.setText(variable[2]); +jTextField4.setText(variable[12]); +} + else if (k<90 && k>=80){ +jTextField3.setText(variable[4]); +jTextField4.setText(variable[14]); +} + else if (k>=75&& k<80){ +jTextField3.setText(variable[6]); +jTextField4.setText(variable[16]); +} + else if (k>=70&& k<75){ +jTextField3.setText(variable[8]); +jTextField4.setText(variable[18]); +} + else if (k>=60&& k<70){ +jTextField3.setText(variable[10]); +jTextField4.setText(variable[20]); +} + else{ +jTextField3.setText(" No seat alloted "); +jTextField4.setText(" No seat alloted "); +} + +} + }//GEN-LAST:event_jTextField2ActionPerformed +public static BufferedImage getScreenShot(Component component){ +BufferedImage image =new BufferedImage(component.getWidth(),component.getHeight(),BufferedImage.TYPE_INT_RGB); +component.paint(image.getGraphics()); +return image; +} +public static void SaveScreenShot(Component component,String filename)throws Exception{ +BufferedImage img = getScreenShot(component); + ImageIO.write(img, "png", new File(filename));} + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + + // TODO add your handling code here: + try{ // TODO add your handling code here: +SaveScreenShot(jPanel1,"My Choice.png"); + } + catch (Exception ex) { + Logger.getLogger(Choice.class.getName()).log(Level.SEVERE, null, ex); + } + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + this.setVisible(false); + + // TODO add your handling code here: + + }//GEN-LAST:event_jButton1ActionPerformed + + private void jTextField4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField4ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextField4ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(CounsellingResult.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(CounsellingResult.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(CounsellingResult.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(CounsellingResult.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new CounsellingResult().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JPanel jPanel1; + private javax.swing.JTextField jTextField1; + private javax.swing.JTextField jTextField2; + private javax.swing.JTextField jTextField3; + private javax.swing.JTextField jTextField4; + // End of variables declaration//GEN-END:variables + + +} diff --git a/Admission-counselling-system/src/student/information/system/DbUtils.java b/Admission-counselling-system/src/student/information/system/DbUtils.java new file mode 100644 index 00000000..163dc83e --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/DbUtils.java @@ -0,0 +1,14 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +/** + * + * @author Hyrex + */ +class DbUtils { + +} diff --git a/Admission-counselling-system/src/student/information/system/Emp.java b/Admission-counselling-system/src/student/information/system/Emp.java new file mode 100644 index 00000000..c627c475 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/Emp.java @@ -0,0 +1,17 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +/** + * + * @author AliHyrex + */ +public class Emp { + public static int empId; + + + +} diff --git a/Admission-counselling-system/src/student/information/system/Login.form b/Admission-counselling-system/src/student/information/system/Login.form new file mode 100644 index 00000000..37ca3379 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/Login.form @@ -0,0 +1,174 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <NonVisualComponents> + <Menu class="javax.swing.JMenuBar" name="jMenuBar1"> + <SubComponents> + <Menu class="javax.swing.JMenu" name="txt_date"> + <Properties> + <Property name="text" type="java.lang.String" value="Date"/> + </Properties> + </Menu> + <Menu class="javax.swing.JMenu" name="txt_time"> + <Properties> + <Property name="text" type="java.lang.String" value="Time"/> + </Properties> + </Menu> + </SubComponents> + </Menu> + </NonVisualComponents> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" alignment="0" pref="661" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" alignment="0" pref="433" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Username :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="20" y="280" width="90" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Password :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="20" y="320" width="80" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="Login"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="180" y="390" width="70" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="txt_username"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txt_usernameActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="110" y="270" width="160" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JPasswordField" name="txt_password"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="110" y="310" width="160" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JComboBox" name="txt_combo"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="2"> + <StringItem index="0" value="Admin"/> + <StringItem index="1" value="Student"/> + </StringArray> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txt_comboActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="110" y="350" width="160" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Division :"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="20" y="360" width="70" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/Presentation1.jpg"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="660" height="430"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Admission-counselling-system/src/student/information/system/Login.java b/Admission-counselling-system/src/student/information/system/Login.java new file mode 100644 index 00000000..3f2b1f50 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/Login.java @@ -0,0 +1,290 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.GregorianCalendar; +import javax.swing.JOptionPane; +import com.sun.glass.events.KeyEvent; +import java.awt.*; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.io.Writer; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import javax.swing.*; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.LinkedList; +import java.util.Scanner; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author Hyrex + */ +public class Login extends javax.swing.JFrame { +public static Writer newWriter,SortWriter; + + Connection conn=null; +ResultSet rs=null; +PreparedStatement pst=null; + + /** + * Creates new form Login + */ + public Login() { + initComponents(); + conn=db.java_db(); + Toolkit toolkit = getToolkit(); + Dimension size = toolkit.getScreenSize(); + setLocation(size.width/2 - getWidth()/2, + size.height/2 - getHeight()/2); + currentDate(); + } + public void currentDate (){ + + Calendar cal =new GregorianCalendar(); + int month = cal.get(Calendar.MONTH); + int year = cal.get(Calendar.YEAR); + int day = cal.get(Calendar.DAY_OF_MONTH); + + txt_date.setText((month+1)+"/"+day+"/"+year); + } + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jLabel2 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jButton1 = new javax.swing.JButton(); + txt_username = new javax.swing.JTextField(); + txt_password = new javax.swing.JPasswordField(); + txt_combo = new javax.swing.JComboBox<>(); + jLabel4 = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); + jMenuBar1 = new javax.swing.JMenuBar(); + txt_date = new javax.swing.JMenu(); + txt_time = new javax.swing.JMenu(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setResizable(false); + + jPanel1.setLayout(null); + + jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jLabel2.setForeground(new java.awt.Color(255, 255, 255)); + jLabel2.setText("Username :"); + jPanel1.add(jLabel2); + jLabel2.setBounds(20, 280, 90, 17); + + jLabel3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jLabel3.setForeground(new java.awt.Color(255, 255, 255)); + jLabel3.setText("Password :"); + jPanel1.add(jLabel3); + jLabel3.setBounds(20, 320, 80, 17); + + jButton1.setText("Login"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + jPanel1.add(jButton1); + jButton1.setBounds(180, 390, 70, 30); + + txt_username.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txt_usernameActionPerformed(evt); + } + }); + jPanel1.add(txt_username); + txt_username.setBounds(110, 270, 160, 30); + jPanel1.add(txt_password); + txt_password.setBounds(110, 310, 160, 30); + + txt_combo.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Admin", "Student" })); + txt_combo.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txt_comboActionPerformed(evt); + } + }); + jPanel1.add(txt_combo); + txt_combo.setBounds(110, 350, 160, 30); + + jLabel4.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jLabel4.setForeground(new java.awt.Color(255, 255, 255)); + jLabel4.setText("Division :"); + jPanel1.add(jLabel4); + jLabel4.setBounds(20, 360, 70, 17); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/Presentation1.jpg"))); // NOI18N + jPanel1.add(jLabel1); + jLabel1.setBounds(0, 0, 660, 430); + + txt_date.setText("Date"); + jMenuBar1.add(txt_date); + + txt_time.setText("Time"); + jMenuBar1.add(txt_time); + + setJMenuBar(jMenuBar1); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 661, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + + String access; + access = this.txt_combo.getSelectedItem().toString(); + + + String p=String.valueOf(this.txt_password.getPassword()); + if(access.equals("Admin") && this.txt_username.getText().equals("admin") && p.equals("admin")) { + + + JOptionPane.showMessageDialog(null,"Sucess" ); + MainMenu j = new MainMenu(); + j.setVisible(true); + this.dispose(); + + + Date currentDate = GregorianCalendar.getInstance().getTime(); + DateFormat df = DateFormat.getDateInstance(); + String dateString = df.format(currentDate); + + Date d = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); + String timeString = sdf.format(d); + + String value0 = timeString; + String values = dateString; + + + + this.dispose(); + + + } + else if(access.equals("Student")){ + this.jLabel2.setText("Firstname"); + this.jLabel3.setText("12h Roll No"); + File f=new File("output.txt"); + + + + Scanner sc = null; + try { + sc = new Scanner(f); + } catch (FileNotFoundException ex) { + Logger.getLogger(StudentInformation.class.getName()).log(Level.SEVERE, null, ex); + } +while(sc.hasNextLine()){ + String data = sc.nextLine(); + System.out.println(data); +String variable[] = data.split("\\s+"); +String user=variable[0]; +String perc=variable[3]; + if(perc.equals(String.valueOf(this.txt_password.getPassword())) && user.equals(String.valueOf(this.txt_username.getText()))){ + new StudentInformation(perc).setVisible(true); + this.setVisible(false); + + + } + } + + }//GEN-LAST:event_jButton1ActionPerformed + } + private void txt_usernameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txt_usernameActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txt_usernameActionPerformed + + private void txt_comboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txt_comboActionPerformed + // TODO add your handling code here: +String id1=this.txt_combo.getSelectedItem().toString(); +if(id1.equals("Student")){ + this.jLabel2.setText("Firstname"); + this.jLabel3.setText("12h Roll No"); + +} + }//GEN-LAST:event_txt_comboActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Login().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JMenuBar jMenuBar1; + private javax.swing.JPanel jPanel1; + private javax.swing.JComboBox<String> txt_combo; + private javax.swing.JMenu txt_date; + private javax.swing.JPasswordField txt_password; + private javax.swing.JMenu txt_time; + private javax.swing.JTextField txt_username; + // End of variables declaration//GEN-END:variables +} diff --git a/Admission-counselling-system/src/student/information/system/MainMenu.form b/Admission-counselling-system/src/student/information/system/MainMenu.form new file mode 100644 index 00000000..a2775502 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/MainMenu.form @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <NonVisualComponents> + <Menu class="javax.swing.JMenuBar" name="jMenuBar1"> + <SubComponents> + <Menu class="javax.swing.JMenu" name="jMenu1"> + <Properties> + <Property name="text" type="java.lang.String" value="File"/> + </Properties> + <SubComponents> + <MenuItem class="javax.swing.JMenuItem" name="jMenuItem1"> + <Properties> + <Property name="text" type="java.lang.String" value="Audit"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem1ActionPerformed"/> + </Events> + </MenuItem> + <MenuItem class="javax.swing.JMenuItem" name="jMenuItem2"> + <Properties> + <Property name="text" type="java.lang.String" value="Users"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem2ActionPerformed"/> + </Events> + </MenuItem> + </SubComponents> + </Menu> + </SubComponents> + </Menu> + </NonVisualComponents> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" alignment="0" pref="799" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" alignment="0" pref="529" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/Add.png"/> + </Property> + <Property name="text" type="java.lang.String" value="Student Manager"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="570" y="430" width="190" height="60"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/logout.png"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="750" y="10" width="40" height="30"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/pnbennet.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="800" height="530"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Admission-counselling-system/src/student/information/system/MainMenu.java b/Admission-counselling-system/src/student/information/system/MainMenu.java new file mode 100644 index 00000000..eccc97ab --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/MainMenu.java @@ -0,0 +1,232 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +import java.awt.Dimension; +import java.awt.Toolkit; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.GregorianCalendar; +import javax.swing.JOptionPane; + +/** + * + * @author Hyrex + */ +public class MainMenu extends javax.swing.JFrame { +Connection conn=null; +ResultSet rs=null; +PreparedStatement pst=null; + /** + * Creates new form MainMenu + */ + public MainMenu() { + conn=db.java_db(); + initComponents(); + Toolkit toolkit = getToolkit(); + Dimension size = toolkit.getScreenSize(); + setLocation(size.width/2 - getWidth()/2, + size.height/2 - getHeight()/2); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel1 = new javax.swing.JPanel(); + jButton1 = new javax.swing.JButton(); + jButton5 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + jMenuBar1 = new javax.swing.JMenuBar(); + jMenu1 = new javax.swing.JMenu(); + jMenuItem1 = new javax.swing.JMenuItem(); + jMenuItem2 = new javax.swing.JMenuItem(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setResizable(false); + + jPanel1.setLayout(null); + + jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/Add.png"))); // NOI18N + jButton1.setText("Student Manager"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + jPanel1.add(jButton1); + jButton1.setBounds(570, 430, 190, 60); + + jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/logout.png"))); // NOI18N + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + jPanel1.add(jButton5); + jButton5.setBounds(750, 10, 40, 30); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/pnbennet.png"))); // NOI18N + jPanel1.add(jLabel1); + jLabel1.setBounds(0, 0, 800, 530); + + jMenu1.setText("File"); + + jMenuItem1.setText("Audit"); + jMenuItem1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jMenuItem1ActionPerformed(evt); + } + }); + jMenu1.add(jMenuItem1); + + jMenuItem2.setText("Users"); + jMenuItem2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jMenuItem2ActionPerformed(evt); + } + }); + jMenu1.add(jMenuItem2); + + jMenuBar1.add(jMenu1); + + setJMenuBar(jMenuBar1); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 799, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 529, Short.MAX_VALUE) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + // TODO add your handling code here: + Login j = new Login(); + j.setVisible(true); + this.dispose(); + + + try{ + Date currentDate = GregorianCalendar.getInstance().getTime(); + DateFormat df = DateFormat.getDateInstance(); + String dateString = df.format(currentDate); + + Date d = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); + String timeString = sdf.format(d); + + String value0 = timeString; + String values = dateString; + + + int value = Emp.empId; + String reg = "insert into Audit (emp_id,date,status) values ('"+value+"','"+value0+" / "+values+"','Logged out')"; + pst=conn.prepareStatement(reg); + pst.execute(); + this.dispose(); + }catch (Exception e){ + + JOptionPane.showMessageDialog(null, e); + + } + finally { + + try{ + rs.close(); + pst.close(); + + } + catch(Exception e){ + + } + } + + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + + StudentInformation j= new StudentInformation(); + j.setVisible(true); + + + }//GEN-LAST:event_jButton1ActionPerformed + + private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed + // TODO add your handling code here: + Audit_details j = new Audit_details(); + j.setVisible(true); + }//GEN-LAST:event_jMenuItem1ActionPerformed + + private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed + // TODO add your handling code here: + + users j = new users(); + j.setVisible(true); + }//GEN-LAST:event_jMenuItem2ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(MainMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new MainMenu().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton5; + private javax.swing.JLabel jLabel1; + private javax.swing.JMenu jMenu1; + private javax.swing.JMenuBar jMenuBar1; + private javax.swing.JMenuItem jMenuItem1; + private javax.swing.JMenuItem jMenuItem2; + private javax.swing.JPanel jPanel1; + // End of variables declaration//GEN-END:variables +} diff --git a/Admission-counselling-system/src/student/information/system/Result.form b/Admission-counselling-system/src/student/information/system/Result.form new file mode 100644 index 00000000..3434b1bc --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/Result.form @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="181" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" pref="170" max="-2" attributes="0"/> + <EmptySpace pref="388" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="64" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" pref="36" max="-2" attributes="0"/> + <EmptySpace pref="340" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Dialog" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Name :"/> + </Properties> + </Component> + </SubComponents> +</Form> diff --git a/Admission-counselling-system/src/student/information/system/Result.java b/Admission-counselling-system/src/student/information/system/Result.java new file mode 100644 index 00000000..8b19cbd3 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/Result.java @@ -0,0 +1,95 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +/** + * + * @author pawan saxena + */ +public class Result extends javax.swing.JFrame { + + /** + * Creates new form Result + */ + public Result() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jLabel1.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N + jLabel1.setText(" Name :"); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(181, 181, 181) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(388, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(64, 64, 64) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(340, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Result.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Result.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Result.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Result.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Result().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jLabel1; + // End of variables declaration//GEN-END:variables +} diff --git a/Admission-counselling-system/src/student/information/system/StudentData.java b/Admission-counselling-system/src/student/information/system/StudentData.java new file mode 100644 index 00000000..7f1ea37b --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/StudentData.java @@ -0,0 +1,76 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.io.Writer; +import static student.information.system.Login.newWriter; + +/** + * + * @author pawan saxena + */ +public class StudentData { + public static Writer newWriter,SortWriter; +String firstname; +String lastname; +String dob; +String studId; +String email; +String tel; +String address; +String add2; +String apt; +String pc; +StudentData(String firstname, +String lastname, +String dob, +String studId, +String email, +String tel, +String address, +String add2, +String apt, +String pc) throws IOException, FileNotFoundException, InterruptedException { + + this.firstname=firstname; +this.lastname=lastname; +this.dob=dob; +this.studId=studId; +this.email=email; +this.tel=tel; +this.address=address; +this.add2=add2; +this.apt=apt; +this.pc=pc; +Store(); +} + +public void Store() throws FileNotFoundException, IOException, InterruptedException { + newWriter= new FileWriter("output.txt",true); + newWriter.write(System.lineSeparator()); + String value1 = this.firstname; + String value2 = this.lastname; + String value3 = this.dob; + String value4 = this.studId; + String value5 = this.email; + String value6 = this.tel; + String value7 = this.address; + String value9 = this.add2; + String value10 = this.apt; + String value11 = this.pc; + +newWriter.write(value1+" " + value2+" "+ value3+" "+ value4+" "+ value5+" "+ value6+" "+ value7+" "+ value9+" "+ value10+" "+ value11+" "); + + + newWriter.flush(); + newWriter.close(); + + + } +} diff --git a/Admission-counselling-system/src/student/information/system/StudentInformation.form b/Admission-counselling-system/src/student/information/system/StudentInformation.form new file mode 100644 index 00000000..ce6fb2ab --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/StudentInformation.form @@ -0,0 +1,536 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.9" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <NonVisualComponents> + <Container class="javax.swing.JMenuBar" name="jMenuBar2"> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="true"/> + </Layout> + <SubComponents> + <Menu class="javax.swing.JMenu" name="jMenu1"> + <Properties> + <Property name="text" type="java.lang.String" value="File"/> + </Properties> + </Menu> + <Menu class="javax.swing.JMenu" name="jMenu2"> + <Properties> + <Property name="text" type="java.lang.String" value="Edit"/> + </Properties> + </Menu> + </SubComponents> + </Container> + <Container class="javax.swing.JDialog" name="jDialog1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="400" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <EmptySpace min="0" pref="300" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + </Container> + <Menu class="javax.swing.JMenuBar" name="jMenuBar1"> + <SubComponents> + <Menu class="javax.swing.JMenu" name="File"> + <Properties> + <Property name="text" type="java.lang.String" value="File"/> + </Properties> + <SubComponents> + <MenuItem class="javax.swing.JMenuItem" name="jMenuItem1"> + <Properties> + <Property name="text" type="java.lang.String" value="Attach Image"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jMenuItem1ActionPerformed"/> + </Events> + </MenuItem> + </SubComponents> + </Menu> + <Menu class="javax.swing.JMenu" name="lbl_date"> + <Properties> + <Property name="text" type="java.lang.String" value="Date"/> + </Properties> + </Menu> + <Menu class="javax.swing.JMenu" name="lbl_time"> + <Properties> + <Property name="text" type="java.lang.String" value="Time"/> + </Properties> + </Menu> + </SubComponents> + </Menu> + </NonVisualComponents> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="menuBar" type="java.lang.String" value="jMenuBar1"/> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jPanel5" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="415" max="-2" attributes="0"/> + <Component id="jLabel10" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="txt_emp" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="jPanel5" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel10" alignment="3" max="32767" attributes="0"/> + <Component id="txt_emp" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel3"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Student Information"> + <Font PropertyName="font" name="Adobe Arabic" size="36" style="1"/> + </TitledBorder> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel7" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel11" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="41" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="r_male" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> + <Component id="r_female" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> + <Component id="txt_tel" alignment="0" max="32767" attributes="0"/> + <Component id="txt_email" min="-2" pref="168" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="58" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Component id="txt_surname" alignment="0" max="32767" attributes="0"/> + <Component id="txt_firstname" alignment="1" max="32767" attributes="0"/> + <Component id="txt_dob" alignment="1" max="32767" attributes="0"/> + <Component id="txt_studentid" pref="168" max="32767" attributes="0"/> + </Group> + </Group> + <Group type="103" alignment="0" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="141" max="-2" attributes="0"/> + <Component id="button2" min="-2" pref="168" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel14" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel15" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel16" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="48" pref="48" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="txt_pc" alignment="1" min="-2" pref="168" max="-2" attributes="0"/> + <Group type="103" alignment="0" groupAlignment="1" attributes="0"> + <Component id="txt_apt" min="-2" pref="168" max="-2" attributes="0"/> + <Group type="103" alignment="1" groupAlignment="1" max="-2" attributes="0"> + <Component id="txt_add2" alignment="0" max="32767" attributes="0"/> + <Component id="txt_address" min="-2" pref="168" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </Group> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="57" max="-2" attributes="0"/> + <Component id="jDesktopPane1" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="243" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton3" alignment="1" min="-2" pref="134" max="-2" attributes="0"/> + <Component id="cmd_save" alignment="1" min="-2" pref="134" max="-2" attributes="0"/> + <Component id="jButton1" alignment="1" min="-2" pref="134" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace pref="112" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="jDesktopPane1" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="cmd_save" min="-2" pref="44" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + <Component id="jButton3" min="-2" pref="44" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Component id="jButton1" min="-2" pref="44" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="93" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel5" min="-2" max="-2" attributes="0"/> + <Component id="txt_studentid" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txt_firstname" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel2" min="-2" max="-2" attributes="0"/> + <Component id="txt_surname" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel3" min="-2" max="-2" attributes="0"/> + <Component id="txt_dob" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel11" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="r_male" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="r_female" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_email" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_tel" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_address" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_add2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel14" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_apt" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel15" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel16" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txt_pc" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="39" max="-2" attributes="0"/> + <Component id="button2" min="-2" pref="42" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="text" type="java.lang.String" value="Contact Number :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_tel"> + </Component> + <Component class="javax.swing.JTextField" name="txt_email"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="text" type="java.lang.String" value="Email :"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="text" type="java.lang.String" value="Gender:"/> + </Properties> + </Component> + <Component class="javax.swing.JRadioButton" name="r_male"> + <Properties> + <Property name="text" type="java.lang.String" value="Male"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="r_maleActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="r_female"> + <Properties> + <Property name="text" type="java.lang.String" value="Female"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="r_femaleActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="txt_dob"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="Date of Birth :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_surname"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="text" type="java.lang.String" value="Surname :"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value="First name :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_firstname"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txt_firstnameActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JDesktopPane" name="jDesktopPane1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="lbl_img" pref="231" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="lbl_img" pref="145" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="lbl_img"> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="text" type="java.lang.String" value="Address Line 1 :"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="text" type="java.lang.String" value="Address Line 2 :"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="text" type="java.lang.String" value="12th Percentage"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel16"> + <Properties> + <Property name="text" type="java.lang.String" value="Post Code :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_pc"> + </Component> + <Component class="javax.swing.JTextField" name="txt_apt"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txt_aptActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="txt_add2"> + </Component> + <Component class="javax.swing.JTextField" name="txt_address"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txt_addressActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="cmd_save"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/Save-icon.png"/> + </Property> + <Property name="text" type="java.lang.String" value="Add Record"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cmd_saveActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/erase-128.png"/> + </Property> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/delete_16x16.gif"/> + </Property> + <Property name="text" type="java.lang.String" value="Delete"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="text" type="java.lang.String" value="Student ID :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_studentid"> + </Component> + <Component class="java.awt.Button" name="button2"> + <Properties> + <Property name="label" type="java.lang.String" value="Select Your Choices"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="button2ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="txt_emp"> + <Properties> + <Property name="text" type="java.lang.String" value="emp"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="text" type="java.lang.String" value="Logged in As :"/> + </Properties> + </Component> + <Container class="javax.swing.JPanel" name="jPanel5"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Search"> + <Font PropertyName="font" name="Adobe Arabic" size="14" style="1"/> + </TitledBorder> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="jLabel13" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="txt_search1" min="-2" pref="565" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_search1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel13" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="text" type="java.lang.String" value="Student ID :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_search1"> + <Events> + <EventHandler event="componentRemoved" listener="java.awt.event.ContainerListener" parameters="java.awt.event.ContainerEvent" handler="txt_search1ComponentRemoved"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txt_search1ActionPerformed"/> + <EventHandler event="keyReleased" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="txt_search1KeyReleased"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Admission-counselling-system/src/student/information/system/StudentInformation.java b/Admission-counselling-system/src/student/information/system/StudentInformation.java new file mode 100644 index 00000000..0ce7afaf --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/StudentInformation.java @@ -0,0 +1,903 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +package student.information.system; + +/** + * + * @author Hyrex + */ +import net.proteanit.sql.DbUtils; +import java.awt.*; +import java.awt.image.BufferedImage; +import java.io.BufferedWriter; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; +import java.util.LinkedList; +import java.util.Scanner; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.imageio.ImageIO; +import javax.swing.*; + + + +public class StudentInformation extends javax.swing.JFrame { +Connection conn=null; +ResultSet rs=null; +PreparedStatement pst=null; + /** + * Creates new form Staff_details + */ + public StudentInformation() { + initComponents(); + conn=db.java_db(); + Toolkit toolkit = getToolkit(); + Dimension size = toolkit.getScreenSize(); + setLocation(size.width/2 - getWidth()/2, + size.height/2 - getHeight()/2); + currentDate(); + txt_emp.setText(String.valueOf(Emp.empId).toString()); + } + public StudentInformation(String StudsId) { + initComponents(); + Toolkit toolkit = getToolkit(); + Dimension size = toolkit.getScreenSize(); + setLocation(size.width/2 - getWidth()/2, + size.height/2 - getHeight()/2); + currentDate(); + txt_search1.setText(StudsId); + cmd_save.setVisible(false); + jButton3.setVisible(false); + cmd_save.setEnabled(false); + jButton3.setEnabled(false); + } + + public void currentDate (){ + + Calendar cal =new GregorianCalendar(); + int month = cal.get(Calendar.MONTH); + int year = cal.get(Calendar.YEAR); + int day = cal.get(Calendar.DAY_OF_MONTH); + + lbl_date.setText((month+1)+"/"+day+"/"+year); + + //Time + + int second = cal.get(Calendar.SECOND); + int minute = cal.get(Calendar.MINUTE); + int hour = cal.get(Calendar.HOUR); + + lbl_time.setText(hour+":"+(minute)+":"+second); + + + } + + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jMenuBar2 = new javax.swing.JMenuBar(); + jMenu1 = new javax.swing.JMenu(); + jMenu2 = new javax.swing.JMenu(); + jDialog1 = new javax.swing.JDialog(); + jPanel3 = new javax.swing.JPanel(); + jLabel7 = new javax.swing.JLabel(); + txt_tel = new javax.swing.JTextField(); + txt_email = new javax.swing.JTextField(); + jLabel6 = new javax.swing.JLabel(); + jLabel11 = new javax.swing.JLabel(); + r_male = new javax.swing.JRadioButton(); + r_female = new javax.swing.JRadioButton(); + txt_dob = new javax.swing.JTextField(); + jLabel3 = new javax.swing.JLabel(); + txt_surname = new javax.swing.JTextField(); + jLabel2 = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); + txt_firstname = new javax.swing.JTextField(); + jDesktopPane1 = new javax.swing.JDesktopPane(); + lbl_img = new javax.swing.JLabel(); + jLabel8 = new javax.swing.JLabel(); + jLabel14 = new javax.swing.JLabel(); + jLabel15 = new javax.swing.JLabel(); + jLabel16 = new javax.swing.JLabel(); + txt_pc = new javax.swing.JTextField(); + txt_apt = new javax.swing.JTextField(); + txt_add2 = new javax.swing.JTextField(); + txt_address = new javax.swing.JTextField(); + cmd_save = new javax.swing.JButton(); + jButton1 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jLabel5 = new javax.swing.JLabel(); + txt_studentid = new javax.swing.JTextField(); + button2 = new java.awt.Button(); + txt_emp = new javax.swing.JLabel(); + jLabel10 = new javax.swing.JLabel(); + jPanel5 = new javax.swing.JPanel(); + jLabel13 = new javax.swing.JLabel(); + txt_search1 = new javax.swing.JTextField(); + jMenuBar1 = new javax.swing.JMenuBar(); + File = new javax.swing.JMenu(); + jMenuItem1 = new javax.swing.JMenuItem(); + lbl_date = new javax.swing.JMenu(); + lbl_time = new javax.swing.JMenu(); + + jMenu1.setText("File"); + jMenuBar2.add(jMenu1); + + jMenu2.setText("Edit"); + jMenuBar2.add(jMenu2); + + javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane()); + jDialog1.getContentPane().setLayout(jDialog1Layout); + jDialog1Layout.setHorizontalGroup( + jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 400, Short.MAX_VALUE) + ); + jDialog1Layout.setVerticalGroup( + jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGap(0, 300, Short.MAX_VALUE) + ); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setResizable(false); + + jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Student Information", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Adobe Arabic", 1, 36))); // NOI18N + + jLabel7.setText("Contact Number :"); + + jLabel6.setText("Email :"); + + jLabel11.setText("Gender:"); + + r_male.setText("Male"); + r_male.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + r_maleActionPerformed(evt); + } + }); + + r_female.setText("Female"); + r_female.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + r_femaleActionPerformed(evt); + } + }); + + jLabel3.setText("Date of Birth :"); + + jLabel2.setText("Surname :"); + + jLabel1.setText("First name :"); + + txt_firstname.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txt_firstnameActionPerformed(evt); + } + }); + + jDesktopPane1.setLayer(lbl_img, javax.swing.JLayeredPane.DEFAULT_LAYER); + + javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1); + jDesktopPane1.setLayout(jDesktopPane1Layout); + jDesktopPane1Layout.setHorizontalGroup( + jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jDesktopPane1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(lbl_img, javax.swing.GroupLayout.DEFAULT_SIZE, 231, Short.MAX_VALUE) + .addContainerGap()) + ); + jDesktopPane1Layout.setVerticalGroup( + jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jDesktopPane1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(lbl_img, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE) + .addContainerGap()) + ); + + jLabel8.setText("Address Line 1 :"); + + jLabel14.setText("Address Line 2 :"); + + jLabel15.setText("12th Percentage"); + + jLabel16.setText("Post Code :"); + + txt_apt.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txt_aptActionPerformed(evt); + } + }); + + txt_address.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txt_addressActionPerformed(evt); + } + }); + + cmd_save.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/Save-icon.png"))); // NOI18N + cmd_save.setText("Add Record"); + cmd_save.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmd_saveActionPerformed(evt); + } + }); + + jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/erase-128.png"))); // NOI18N + jButton1.setText("Clear"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/delete_16x16.gif"))); // NOI18N + jButton3.setText("Delete"); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + + jLabel5.setText("Student ID :"); + + button2.setLabel("Select Your Choices"); + button2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + button2ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel6) + .addComponent(jLabel7) + .addComponent(jLabel11)) + .addGap(41, 41, 41) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(r_male) + .addGap(4, 4, 4) + .addComponent(r_female)) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(txt_tel, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txt_email, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1) + .addComponent(jLabel2) + .addComponent(jLabel3) + .addComponent(jLabel5)) + .addGap(58, 58, 58) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(txt_surname, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txt_firstname) + .addComponent(txt_dob) + .addComponent(txt_studentid, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE))) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGap(141, 141, 141) + .addComponent(button2, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createSequentialGroup() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel14) + .addComponent(jLabel15) + .addComponent(jLabel16) + .addComponent(jLabel8)) + .addGap(48, 48, 48) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txt_pc, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(txt_apt, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(txt_add2, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txt_address, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE))))))) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGap(57, 57, 57) + .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGap(243, 243, 243) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jButton3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(cmd_save, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addContainerGap(112, Short.MAX_VALUE)) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(cmd_save, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(32, 32, 32) + .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(37, 37, 37) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(93, 93, 93)) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGap(18, 18, 18) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel5) + .addComponent(txt_studentid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(txt_firstname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel2) + .addComponent(txt_surname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel3) + .addComponent(txt_dob, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel11) + .addComponent(r_male) + .addComponent(r_female)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel6)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_tel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel7)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_address, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel8)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_add2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel14)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_apt, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel15)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel16) + .addComponent(txt_pc, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(39, 39, 39) + .addComponent(button2, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + txt_emp.setText("emp"); + + jLabel10.setText("Logged in As :"); + + jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Adobe Arabic", 1, 14))); // NOI18N + + jLabel13.setText("Student ID :"); + + txt_search1.addContainerListener(new java.awt.event.ContainerAdapter() { + public void componentRemoved(java.awt.event.ContainerEvent evt) { + txt_search1ComponentRemoved(evt); + } + }); + txt_search1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + txt_search1ActionPerformed(evt); + } + }); + txt_search1.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyReleased(java.awt.event.KeyEvent evt) { + txt_search1KeyReleased(evt); + } + }); + + javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); + jPanel5.setLayout(jPanel5Layout); + jPanel5Layout.setHorizontalGroup( + jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel5Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel13) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(txt_search1, javax.swing.GroupLayout.PREFERRED_SIZE, 565, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(8, 8, 8)) + ); + jPanel5Layout.setVerticalGroup( + jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel5Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_search1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel13)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + File.setText("File"); + + jMenuItem1.setText("Attach Image"); + jMenuItem1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jMenuItem1ActionPerformed(evt); + } + }); + File.add(jMenuItem1); + + jMenuBar1.add(File); + + lbl_date.setText("Date"); + jMenuBar1.add(lbl_date); + + lbl_time.setText("Time"); + jMenuBar1.add(lbl_time); + + setJMenuBar(jMenuBar1); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(415, 415, 415) + .addComponent(jLabel10) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(txt_emp)) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createSequentialGroup() + .addGap(6, 6, 6) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(txt_emp)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed + // TODO add your handling code here: + + JFileChooser chooser = new JFileChooser(); + chooser.showOpenDialog(null); + File f = chooser.getSelectedFile(); + + filename =f.getAbsolutePath(); + ImageIcon imageIcon = new ImageIcon(new ImageIcon(filename).getImage().getScaledInstance(lbl_img.getWidth(), lbl_img.getHeight(), Image.SCALE_DEFAULT)); + lbl_img.setIcon(imageIcon); + try { + + File image = new File(filename); + FileInputStream fis = new FileInputStream (image); + ByteArrayOutputStream bos= new ByteArrayOutputStream(); + byte[] buf = new byte[1024]; + + for(int readNum; (readNum=fis.read(buf))!=-1; ){ + + bos.write(buf,0,readNum); + } + person_image=bos.toByteArray(); + } + + catch(Exception e){ + JOptionPane.showMessageDialog(null,e); + + } + + }//GEN-LAST:event_jMenuItem1ActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + + txt_firstname.setText(""); + txt_surname.setText(""); + txt_tel.setText(""); + txt_dob.setText(""); + txt_email.setText(""); + txt_address.setText(""); + + txt_studentid.setText(""); + + txt_add2.setText(""); + txt_pc.setText(""); + txt_apt.setText(""); + lbl_img.setIcon(null); + txt_search1.setText(""); + }//GEN-LAST:event_jButton1ActionPerformed + + private void cmd_saveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmd_saveActionPerformed + // TODO add your handling code here: + int p = JOptionPane.showConfirmDialog(null, "Are you sure you want to add record?","Add Record",JOptionPane.YES_NO_OPTION); + + + if(p==0){ + + String value110 = txt_firstname.getText(); + String value2 = txt_surname.getText(); + String value3 = txt_dob.getText(); + String value4 = txt_studentid.getText(); + String value5 = txt_email.getText(); + String value6 = txt_tel.getText(); + String value7 = txt_address.getText(); + String value9 = txt_add2.getText(); + String value10 = txt_apt.getText(); + String value11 = txt_pc.getText(); + try { + StudentData stud= new StudentData(value110,value2,value3,value4,value5,value6,value7,value9,value10,value11); + } catch (IOException ex) { + Logger.getLogger(StudentInformation.class.getName()).log(Level.SEVERE, null, ex); + } catch (InterruptedException ex) { + Logger.getLogger(StudentInformation.class.getName()).log(Level.SEVERE, null, ex); + } + + + + + + JOptionPane.showMessageDialog(null,"Data is saved successfully"); + + + + + Date currentDate = GregorianCalendar.getInstance().getTime(); + DateFormat df = DateFormat.getDateInstance(); + String dateString = df.format(currentDate); + + Date d = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); + String timeString = sdf.format(d); + + String value0 = timeString; + String value1 = dateString; + String val = txt_emp.getText().toString(); + + + + + } + + }//GEN-LAST:event_cmd_saveActionPerformed + + + + + + + private void txt_aptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txt_aptActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txt_aptActionPerformed + + private void txt_firstnameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txt_firstnameActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txt_firstnameActionPerformed + + private void r_femaleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_r_femaleActionPerformed + // TODO add your handling code here: + gender ="Female"; + r_female.setSelected(true); + r_male.setSelected(false); + + }//GEN-LAST:event_r_femaleActionPerformed + + private void r_maleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_r_maleActionPerformed + // TODO add your handling code here: + gender ="Male"; + r_male.setSelected(true); + r_female.setSelected(false); + }//GEN-LAST:event_r_maleActionPerformed + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + // TODO add your handling code here: + + int p = JOptionPane.showConfirmDialog(null, "Are you sure you want to delete record?","Delete",JOptionPane.YES_NO_OPTION); + if(p==0){ + Date currentDate = GregorianCalendar.getInstance().getTime(); + DateFormat df = DateFormat.getDateInstance(); + String dateString = df.format(currentDate); + + Date d = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); + String timeString = sdf.format(d); + + String value0 = timeString; + String value1 = dateString; + String val = txt_emp.getText().toString(); + + try{ +String notobedel= String.valueOf(txt_studentid.getText()); +File f1 = new File("output.txt"); +BufferedWriter writer; + writer = new BufferedWriter(new FileWriter(f1)); +Scanner sc =new Scanner (f1); +while(sc.hasNextLine()){String data = sc.nextLine(); +String variable[] = data.split("\\s+"); +String da=data.trim(); +String studid=variable[3]; +if(studid.equals(notobedel)){ +continue; +} +writer.write(data+System.lineSeparator()); +writer.close(); +sc.close(); +} + JOptionPane.showMessageDialog(null,"Record Deleted"); + + }catch(Exception e){ + + JOptionPane.showMessageDialog(null, e); + }finally { + + try{ + rs.close(); + pst.close(); + + } + catch(Exception e){ + + } + } + + } + + + }//GEN-LAST:event_jButton3ActionPerformed + + private void txt_search1ComponentRemoved(java.awt.event.ContainerEvent evt) {//GEN-FIRST:event_txt_search1ComponentRemoved + // TODO add your handling code here: + }//GEN-LAST:event_txt_search1ComponentRemoved + + private void txt_search1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txt_search1ActionPerformed + + File f = new File("output.txt"); + + Scanner sc = null; + try { + sc = new Scanner(f); + } catch (FileNotFoundException ex) { + Logger.getLogger(StudentInformation.class.getName()).log(Level.SEVERE, null, ex); + } +while(sc.hasNextLine()){ + String data = sc.nextLine(); +String variable[] = data.split("\\s+"); +String p=variable[3]; + if(p.equals(String.valueOf(this.txt_search1.getText()))){//linear Search + + + this.txt_studentid.setText(variable[3]); + this.txt_firstname.setText(variable[0]); + this.txt_surname.setText(variable[1]); + // this.jcmbDepartment.setText(variable[4]); + this.txt_dob.setText(variable[2]); + this.txt_email.setText(variable[4]); + this.txt_tel.setText(variable[5]); + this.txt_address.setText(variable[6]); + this.txt_add2.setText(variable[7]); + this.txt_apt.setText(variable[8]); + this.txt_pc.setText(variable[9]); + + } + +} + + }//GEN-LAST:event_txt_search1ActionPerformed + + private void txt_search1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txt_search1KeyReleased + // TODO add your handling code here: + try{ + + String sql ="select * from Student_Information where id=? "; + + pst=conn.prepareStatement(sql); + pst.setString(1,txt_search1.getText()); + rs=pst.executeQuery(); + + String add1 =rs.getString("id"); + txt_studentid.setText(add1); + + String add2 =rs.getString("first_name"); + txt_firstname.setText(add2); + + String add3 =rs.getString("surname"); + txt_surname.setText(add3); + + String add4 =rs.getString("Dob"); + txt_dob.setText(add4); + + String add5 =rs.getString("Email"); + txt_email.setText(add5); + + String add6 =rs.getString("Telephone"); + txt_tel.setText(add6); + + String add7 =rs.getString("Address"); + txt_address.setText(add7); + + String add8 =rs.getString("Address2"); + txt_add2.setText(add8); + + String add9 =rs.getString("Apartment"); + txt_apt.setText(add9); + + String add10 =rs.getString("Post_code"); + txt_pc.setText(add10); + + + + + byte[] img = rs.getBytes("Image"); + ImageIcon imageIcon = new ImageIcon(new ImageIcon(img).getImage().getScaledInstance(lbl_img.getWidth(), lbl_img.getHeight(), Image.SCALE_SMOOTH)); + lbl_img.setIcon(imageIcon); + + }catch(Exception e){ + + } + finally { + + try{ + + rs.close(); + pst.close(); + + } + catch(Exception e){ + + } + } + }//GEN-LAST:event_txt_search1KeyReleased + + private void button2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button2ActionPerformed + new Choice(String.valueOf(this.txt_studentid.getText())).setVisible(true); // TODO add your handling code here: + + }//GEN-LAST:event_button2ActionPerformed + + private void txt_addressActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txt_addressActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_txt_addressActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(StudentInformation.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(StudentInformation.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(StudentInformation.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(StudentInformation.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new StudentInformation().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JMenu File; + private java.awt.Button button2; + private javax.swing.JButton cmd_save; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton3; + private javax.swing.JDesktopPane jDesktopPane1; + private javax.swing.JDialog jDialog1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; + private javax.swing.JLabel jLabel15; + private javax.swing.JLabel jLabel16; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JMenu jMenu1; + private javax.swing.JMenu jMenu2; + private javax.swing.JMenuBar jMenuBar1; + private javax.swing.JMenuBar jMenuBar2; + private javax.swing.JMenuItem jMenuItem1; + private javax.swing.JPanel jPanel3; + private javax.swing.JPanel jPanel5; + private javax.swing.JMenu lbl_date; + private javax.swing.JLabel lbl_img; + private javax.swing.JMenu lbl_time; + private javax.swing.JRadioButton r_female; + private javax.swing.JRadioButton r_male; + private javax.swing.JTextField txt_add2; + private javax.swing.JTextField txt_address; + private javax.swing.JTextField txt_apt; + private javax.swing.JTextField txt_dob; + private javax.swing.JTextField txt_email; + private javax.swing.JLabel txt_emp; + private javax.swing.JTextField txt_firstname; + private javax.swing.JTextField txt_pc; + private javax.swing.JTextField txt_search1; + private javax.swing.JTextField txt_studentid; + private javax.swing.JTextField txt_surname; + private javax.swing.JTextField txt_tel; + // End of variables declaration//GEN-END:variables + + private ImageIcon format =null; + //strin filename + String filename = null; + byte[] person_image = null; + + private String gender; + + +} diff --git a/Admission-counselling-system/src/student/information/system/StudentInformationSystem.java b/Admission-counselling-system/src/student/information/system/StudentInformationSystem.java new file mode 100644 index 00000000..3f9f439f --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/StudentInformationSystem.java @@ -0,0 +1,21 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +/** + * + * @author Hyrex + */ +public class StudentInformationSystem { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + } + +} diff --git a/Admission-counselling-system/src/student/information/system/db.java b/Admission-counselling-system/src/student/information/system/db.java new file mode 100644 index 00000000..38dc8b41 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/db.java @@ -0,0 +1,33 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +/** + * + * @author Hyrex + */ +import java.sql.*; +import javax.swing.*; +public class db { + + Connection conn=null; + public static Connection java_db(){ + + try{ + Class.forName("org.sqlite.JDBC"); + Connection conn =DriverManager.getConnection("jdbc:sqlite:studentInfo.sqlite"); + //JOptionPane.showMessageDialog(null, "Connection to database is successful"); + + return conn; + + + }catch (Exception e){ + JOptionPane.showMessageDialog(null, e); + return null; + } + + } +} \ No newline at end of file diff --git a/Admission-counselling-system/src/student/information/system/images/Add.png b/Admission-counselling-system/src/student/information/system/images/Add.png new file mode 100644 index 00000000..04c46166 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/Add.png differ diff --git a/Admission-counselling-system/src/student/information/system/images/Presentation1.jpg b/Admission-counselling-system/src/student/information/system/images/Presentation1.jpg new file mode 100644 index 00000000..74a78a0c Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/Presentation1.jpg differ diff --git a/Admission-counselling-system/src/student/information/system/images/Save-icon.png b/Admission-counselling-system/src/student/information/system/images/Save-icon.png new file mode 100644 index 00000000..fcc18dc7 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/Save-icon.png differ diff --git a/Admission-counselling-system/src/student/information/system/images/Search.png b/Admission-counselling-system/src/student/information/system/images/Search.png new file mode 100644 index 00000000..3838cfc4 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/Search.png differ diff --git a/Admission-counselling-system/src/student/information/system/images/Update.png b/Admission-counselling-system/src/student/information/system/images/Update.png new file mode 100644 index 00000000..c1312686 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/Update.png differ diff --git a/Admission-counselling-system/src/student/information/system/images/attach.png b/Admission-counselling-system/src/student/information/system/images/attach.png new file mode 100644 index 00000000..6310fa18 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/attach.png differ diff --git a/Admission-counselling-system/src/student/information/system/images/bk.jpg b/Admission-counselling-system/src/student/information/system/images/bk.jpg new file mode 100644 index 00000000..9116c7eb Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/bk.jpg differ diff --git a/Admission-counselling-system/src/student/information/system/images/bk2.jpg b/Admission-counselling-system/src/student/information/system/images/bk2.jpg new file mode 100644 index 00000000..ece7844c Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/bk2.jpg differ diff --git a/Admission-counselling-system/src/student/information/system/images/bk3.jpg b/Admission-counselling-system/src/student/information/system/images/bk3.jpg new file mode 100644 index 00000000..65aa2cb2 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/bk3.jpg differ diff --git a/Admission-counselling-system/src/student/information/system/images/bk4.jpg b/Admission-counselling-system/src/student/information/system/images/bk4.jpg new file mode 100644 index 00000000..af404351 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/bk4.jpg differ diff --git a/Admission-counselling-system/src/student/information/system/images/delete_16x16.gif b/Admission-counselling-system/src/student/information/system/images/delete_16x16.gif new file mode 100644 index 00000000..327af2a5 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/delete_16x16.gif differ diff --git a/Admission-counselling-system/src/student/information/system/images/erase-128.png b/Admission-counselling-system/src/student/information/system/images/erase-128.png new file mode 100644 index 00000000..9f86d130 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/erase-128.png differ diff --git a/Admission-counselling-system/src/student/information/system/images/logout.png b/Admission-counselling-system/src/student/information/system/images/logout.png new file mode 100644 index 00000000..35c88106 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/logout.png differ diff --git a/Admission-counselling-system/src/student/information/system/images/pnbennet.png b/Admission-counselling-system/src/student/information/system/images/pnbennet.png new file mode 100644 index 00000000..50fc3ae4 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/pnbennet.png differ diff --git a/Admission-counselling-system/src/student/information/system/images/update icon.png b/Admission-counselling-system/src/student/information/system/images/update icon.png new file mode 100644 index 00000000..3778d945 Binary files /dev/null and b/Admission-counselling-system/src/student/information/system/images/update icon.png differ diff --git a/Admission-counselling-system/src/student/information/system/users.form b/Admission-counselling-system/src/student/information/system/users.form new file mode 100644 index 00000000..3fbb8d45 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/users.form @@ -0,0 +1,266 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="2"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="11" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="27" max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel2"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="cmd_add" alignment="0" max="32767" attributes="0"/> + <Component id="cmd_delete" alignment="0" max="32767" attributes="0"/> + <Component id="cmd_update" alignment="0" max="32767" attributes="0"/> + <Component id="jButton1" max="32767" attributes="0"/> + </Group> + <EmptySpace pref="40" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="48" max="-2" attributes="0"/> + <Component id="cmd_add" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="cmd_update" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="cmd_delete" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton1" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="cmd_add"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/Save-icon.png"/> + </Property> + <Property name="text" type="java.lang.String" value="Add "/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cmd_addActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.TitledBorderInfo"> + <TitledBorder title="Login_Information"> + <Font PropertyName="font" name="Adobe Arabic" size="18" style="1"/> + </TitledBorder> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel5" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Component id="txt_dep" max="32767" attributes="0"/> + <Component id="txt_password" alignment="0" max="32767" attributes="0"/> + <Component id="txt_username" alignment="0" max="32767" attributes="0"/> + <Component id="txt_combo" alignment="0" pref="160" max="32767" attributes="0"/> + <Component id="txt_id" alignment="0" max="32767" attributes="0"/> + </Group> + <EmptySpace pref="42" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace pref="25" max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_combo" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_id" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txt_dep" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_username" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txt_password" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value="Select Users"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_password"> + </Component> + <Component class="javax.swing.JComboBox" name="txt_combo"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="0"/> + </Property> + </Properties> + <Events> + <EventHandler event="popupMenuWillBecomeInvisible" listener="javax.swing.event.PopupMenuListener" parameters="javax.swing.event.PopupMenuEvent" handler="txt_comboPopupMenuWillBecomeInvisible"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="Password"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_username"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="text" type="java.lang.String" value="Username"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="text" type="java.lang.String" value="Id"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_id"> + <Properties> + <Property name="editable" type="boolean" value="false"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="text" type="java.lang.String" value="Division"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txt_dep"> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="cmd_delete"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/delete_16x16.gif"/> + </Property> + <Property name="text" type="java.lang.String" value="Delete"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cmd_deleteActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="cmd_update"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/update icon.png"/> + </Property> + <Property name="text" type="java.lang.String" value="Update"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cmd_updateActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/student/information/system/images/erase-128.png"/> + </Property> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Admission-counselling-system/src/student/information/system/users.java b/Admission-counselling-system/src/student/information/system/users.java new file mode 100644 index 00000000..0b839355 --- /dev/null +++ b/Admission-counselling-system/src/student/information/system/users.java @@ -0,0 +1,471 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package student.information.system; + +/** + * + * @author Hyrex + */ +import java.awt.*; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import javax.swing.*; +public class users extends javax.swing.JFrame { +Connection conn=null; +ResultSet rs=null; +PreparedStatement pst=null; + /** + * Creates new form Users_details + */ + public users() { + initComponents(); + conn=db.java_db(); + Toolkit toolkit = getToolkit(); + Dimension size = toolkit.getScreenSize(); + setLocation(size.width/2 - getWidth()/2, + size.height/2 - getHeight()/2); + Fillcombobox(); + } +private void Fillcombobox(){ + + try { + String sql ="select * from Users"; + pst=conn.prepareStatement(sql); + rs=pst.executeQuery(); + + while(rs.next()) { + String name =rs.getString("username"); + txt_combo.addItem(name); + } + }catch (Exception e){ + + JOptionPane.showMessageDialog(null, e); + } finally { + + try{ + rs.close(); + pst.close(); + + }catch (Exception e){ + + } + } + + } + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel2 = new javax.swing.JPanel(); + cmd_add = new javax.swing.JButton(); + jPanel1 = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + txt_password = new javax.swing.JTextField(); + txt_combo = new javax.swing.JComboBox(); + jLabel3 = new javax.swing.JLabel(); + txt_username = new javax.swing.JTextField(); + jLabel2 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + txt_id = new javax.swing.JTextField(); + jLabel5 = new javax.swing.JLabel(); + txt_dep = new javax.swing.JTextField(); + cmd_delete = new javax.swing.JButton(); + cmd_update = new javax.swing.JButton(); + jButton1 = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + + cmd_add.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/Save-icon.png"))); // NOI18N + cmd_add.setText("Add "); + cmd_add.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmd_addActionPerformed(evt); + } + }); + + jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Login_Information", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Adobe Arabic", 1, 18))); // NOI18N + + jLabel1.setText("Select Users"); + + txt_combo.addPopupMenuListener(new javax.swing.event.PopupMenuListener() { + public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) { + } + public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) { + txt_comboPopupMenuWillBecomeInvisible(evt); + } + public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) { + } + }); + + jLabel3.setText("Password"); + + jLabel2.setText("Username"); + + jLabel4.setText("Id"); + + txt_id.setEditable(false); + + jLabel5.setText("Division"); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING)) + .addGap(29, 29, 29)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(jLabel5) + .addGap(20, 20, 20))) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel4) + .addComponent(jLabel1)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(txt_dep) + .addComponent(txt_password, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txt_username, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txt_combo, javax.swing.GroupLayout.Alignment.LEADING, 0, 160, Short.MAX_VALUE) + .addComponent(txt_id, javax.swing.GroupLayout.Alignment.LEADING)) + .addContainerGap(42, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap(25, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_combo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel1)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_id, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel4)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel5) + .addComponent(txt_dep, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_username, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel2)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txt_password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel3)) + .addContainerGap()) + ); + + cmd_delete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/delete_16x16.gif"))); // NOI18N + cmd_delete.setText("Delete"); + cmd_delete.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmd_deleteActionPerformed(evt); + } + }); + + cmd_update.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/update icon.png"))); // NOI18N + cmd_update.setText("Update"); + cmd_update.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + cmd_updateActionPerformed(evt); + } + }); + + jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/student/information/system/images/erase-128.png"))); // NOI18N + jButton1.setText("Clear"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(18, 18, 18) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(cmd_add, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cmd_delete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cmd_update, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(40, Short.MAX_VALUE)) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(48, 48, 48) + .addComponent(cmd_add) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmd_update) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cmd_delete) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton1)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(28, 28, 28) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(11, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(27, 27, 27) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void cmd_deleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmd_deleteActionPerformed + // TODO add your handling code here: + + int p = JOptionPane.showConfirmDialog(null, "Are you sure you want to delete record?","Delete",JOptionPane.YES_NO_OPTION); + if(p==0){ + String sql ="delete from Users where username=? "; + try{ + pst=conn.prepareStatement(sql); + pst.setString(1, txt_username.getText()); + pst.execute(); + JOptionPane.showMessageDialog(null,"Record Deleted"); + + + }catch(Exception e){ + + JOptionPane.showMessageDialog(null, e); + }finally { + + try{ + rs.close(); + pst.close(); + + } + catch(Exception e){ + + } + } + + } + Fillcombobox(); + }//GEN-LAST:event_cmd_deleteActionPerformed + + private void txt_comboPopupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) {//GEN-FIRST:event_txt_comboPopupMenuWillBecomeInvisible + + String tmp =(String) txt_combo.getSelectedItem(); + String sql="select * from Users where username=?"; + + + try{ + pst=conn.prepareStatement(sql); + pst.setString(1, tmp); + rs=pst.executeQuery(); + + if(rs.next()){ + + String add1 =rs.getString("username"); + txt_username.setText(add1); + + String add2 =rs.getString("password"); + txt_password.setText(add2); + + String add3 =rs.getString("id"); + txt_id.setText(add3); + + String add4 =rs.getString("division"); + txt_dep.setText(add4); + + + } + + }catch (Exception e){ + JOptionPane.showMessageDialog(null, e); + } + finally { + + try{ + rs.close(); + pst.close(); + + } + catch(Exception e){ + + } + }// TODO add your handling code here: + + + }//GEN-LAST:event_txt_comboPopupMenuWillBecomeInvisible + + private void cmd_updateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmd_updateActionPerformed + // TODO add your handling code here: + int p = JOptionPane.showConfirmDialog(null, "Are you sure you want to update record?","Update Record",JOptionPane.YES_NO_OPTION); + if(p==0){ + try{ + + String value1 = txt_id.getText(); + String value2 = txt_username.getText(); + String value3 = txt_password.getText(); + String value4 = txt_dep.getText(); + + + String sql= "update Users set id='"+value1+"', username='"+value2+"', password='"+value3+"',division='"+value4+"' where id='"+value1+"' "; + + pst=conn.prepareStatement(sql); + pst.execute(); + JOptionPane.showMessageDialog(null, "Record Updated"); + + }catch(Exception e){ + JOptionPane.showMessageDialog(null, e); + } + finally { + + try{ + rs.close(); + pst.close(); + + } + catch(Exception e){ + + } + } + } + Fillcombobox(); + }//GEN-LAST:event_cmd_updateActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + // TODO add your handling code here: + txt_username.setText(""); + txt_password.setText(""); + txt_dep.setText(""); + txt_id.setText(""); + }//GEN-LAST:event_jButton1ActionPerformed + + private void cmd_addActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmd_addActionPerformed + int p = JOptionPane.showConfirmDialog(null, "Are you sure you want to add record?","Add Record",JOptionPane.YES_NO_OPTION); + if(p==0){ // TODO add your handling code here: + + try { + + String sql ="insert into Users (username,password,division) values (?,?,?) "; + + pst=conn.prepareStatement(sql); + pst.setString(1,txt_username.getText()); + pst.setString(2,txt_password.getText()); + pst.setString(3,txt_dep.getText()); + + pst.execute(); + JOptionPane.showMessageDialog(null,"Data is saved successfully"); + + } + catch (Exception e) + + { + JOptionPane.showMessageDialog(null,e); + } + finally { + + try{ + rs.close(); + pst.close(); + + } + catch(Exception e){ + + } + } + } + Fillcombobox(); + }//GEN-LAST:event_cmd_addActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(users.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(users.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(users.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(users.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + //</editor-fold> + //</editor-fold> + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new users().setVisible(true); + } + }); + } + + + + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton cmd_add; + private javax.swing.JButton cmd_delete; + private javax.swing.JButton cmd_update; + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JComboBox txt_combo; + private javax.swing.JTextField txt_dep; + private javax.swing.JTextField txt_id; + private javax.swing.JTextField txt_password; + private javax.swing.JTextField txt_username; + // End of variables declaration//GEN-END:variables +} diff --git a/Admission-counselling-system/studentInfo.sqlite b/Admission-counselling-system/studentInfo.sqlite new file mode 100644 index 00000000..3e4485b0 Binary files /dev/null and b/Admission-counselling-system/studentInfo.sqlite differ diff --git a/Age_Frame_Calculator.java b/Age_Frame_Calculator.java new file mode 100644 index 00000000..8e642e9c --- /dev/null +++ b/Age_Frame_Calculator.java @@ -0,0 +1,64 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.time.LocalDate; +import java.time.Period; + +public class AgeCalculatorApp { + public static void main(String[] args) { + SwingUtilities.invokeLater(() -> { + createAndShowGUI(); + }); + } + + private static void createAndShowGUI() { + JFrame frame = new JFrame("Age Calculator"); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + JPanel panel = new JPanel(); + panel.setLayout(new GridLayout(3, 2)); + + JLabel birthDateLabel = new JLabel("Enter Birthdate (yyyy-mm-dd): "); + JTextField birthDateField = new JTextField(); + JLabel ageLabel = new JLabel("Your Age: "); + JLabel ageResult = new JLabel(""); + JLabel remainingDaysLabel = new JLabel("Remaining Days Until Next Birthday: "); + JLabel remainingDaysResult = new JLabel(""); + + JButton calculateButton = new JButton("Calculate"); + + calculateButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String birthDateText = birthDateField.getText(); + LocalDate birthDate = LocalDate.parse(birthDateText); + LocalDate currentDate = LocalDate.now(); + + Period age = Period.between(birthDate, currentDate); + ageResult.setText(age.getYears() + " years, " + age.getMonths() + " months, " + age.getDays() + " days"); + + LocalDate nextBirthday = birthDate.withYear(currentDate.getYear()); + if (nextBirthday.isBefore(currentDate) || nextBirthday.isEqual(currentDate)) { + nextBirthday = nextBirthday.plusYears(1); + } + + Period remainingDays = Period.between(currentDate, nextBirthday); + remainingDaysResult.setText(remainingDays.getDays() + " days"); + } + }); + + panel.add(birthDateLabel); + panel.add(birthDateField); + panel.add(ageLabel); + panel.add(ageResult); + panel.add(remainingDaysLabel); + panel.add(remainingDaysResult); + + frame.getContentPane().add(panel, BorderLayout.CENTER); + frame.getContentPane().add(calculateButton, BorderLayout.SOUTH); + + frame.pack(); + frame.setVisible(true); + } +} diff --git a/AirlineReservationSystem.java b/AirlineReservationSystem.java new file mode 100644 index 00000000..d5dbe903 --- /dev/null +++ b/AirlineReservationSystem.java @@ -0,0 +1,147 @@ +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +class Passenger { + private String name; + private int age; + private String passportNumber; + + public Passenger(String name, int age, String passportNumber) { + this.name = name; + this.age = age; + this.passportNumber = passportNumber; + } + + public String getName() { + return name; + } + + @Override + public String toString() { + return "Name: " + name + ", Age: " + age + ", Passport Number: " + passportNumber; + } +} + +class Flight { + private String flightNumber; + private String destination; + private int availableSeats; + private List<Passenger> passengers; + + public Flight(String flightNumber, String destination, int availableSeats) { + this.flightNumber = flightNumber; + this.destination = destination; + this.availableSeats = availableSeats; + this.passengers = new ArrayList<>(); + } + + public String getFlightNumber() { + return flightNumber; + } + + public String getDestination() { + return destination; + } + + public int getAvailableSeats() { + return availableSeats; + } + + public List<Passenger> getPassengers() { + return passengers; + } + + public boolean bookSeat(Passenger passenger) { + if (availableSeats > 0) { + passengers.add(passenger); + availableSeats--; + return true; + } + return false; + } + + @Override + public String toString() { + return "Flight Number: " + flightNumber + ", Destination: " + destination + ", Available Seats: " + availableSeats; + } +} + +public class AirlineReservationSystem { + private static List<Flight> flights = new ArrayList<>(); + + public static void main(String[] args) { + initializeFlights(); + Scanner scanner = new Scanner(System.in); + + while (true) { + System.out.println("Airline Reservation System Menu:"); + System.out.println("1. List Available Flights"); + System.out.println("2. Book a Flight"); + System.out.println("3. Exit"); + System.out.print("Enter your choice: "); + + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume the newline character + + switch (choice) { + case 1: + listAvailableFlights(); + break; + case 2: + bookAFlight(scanner); + break; + case 3: + System.out.println("Exiting the program. Thank you!"); + scanner.close(); + System.exit(0); + default: + System.out.println("Invalid choice. Please enter a valid option."); + } + } + } + + private static void initializeFlights() { + flights.add(new Flight("F101", "New York", 100)); + flights.add(new Flight("F102", "Los Angeles", 120)); + flights.add(new Flight("F103", "Chicago", 90)); + } + + private static void listAvailableFlights() { + System.out.println("Available Flights:"); + for (Flight flight : flights) { + System.out.println(flight); + } + } + + private static void bookAFlight(Scanner scanner) { + System.out.print("Enter your name: "); + String name = scanner.nextLine(); + System.out.print("Enter your age: "); + int age = scanner.nextInt(); + scanner.nextLine(); // Consume the newline character + System.out.print("Enter your passport number: "); + String passportNumber = scanner.nextLine(); + System.out.print("Enter the flight number you want to book: "); + String flightNumber = scanner.nextLine(); + + Flight selectedFlight = null; + for (Flight flight : flights) { + if (flight.getFlightNumber().equalsIgnoreCase(flightNumber)) { + selectedFlight = flight; + break; + } + } + + if (selectedFlight != null) { + Passenger passenger = new Passenger(name, age, passportNumber); + if (selectedFlight.bookSeat(passenger)) { + System.out.println("Seat booked successfully!"); + } else { + System.out.println("Sorry, the flight is fully booked."); + } + } else { + System.out.println("Invalid flight number. Please enter a valid flight number."); + } + } +} diff --git a/Alaram_clock.java b/Alaram_clock.java new file mode 100644 index 00000000..7786dff3 --- /dev/null +++ b/Alaram_clock.java @@ -0,0 +1,25 @@ +import java.util.Timer; +import java.util.TimerTask; +import java.text.SimpleDateFormat; +import java.util.Date; + +public class AlarmClock { + + public static void main(String[] args) { + // Set the alarm time (24-hour format) + String alarmTime = "15:30"; // Change this to your desired alarm time + + // Create a timer + Timer timer = new Timer(); + + // Define a task to be executed when the alarm time is reached + TimerTask task = new TimerTask() { + public void run() { + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); + String currentTime = sdf.format(new Date()); + if (currentTime.equals(alarmTime)) { + System.out.println("Alarm! It's time to wake up!"); + // You can replace the message with any action you want + } + } + }; diff --git a/Analog Clock.java b/Analog Clock.java new file mode 100644 index 00000000..95c08ec0 --- /dev/null +++ b/Analog Clock.java @@ -0,0 +1,73 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.Calendar; +import java.util.GregorianCalendar; + +public class AnalogClock extends JPanel { + private int radius; + private int centerX; + private int centerY; + + public AnalogClock(int radius) { + this.radius = radius; + this.setPreferredSize(new Dimension(2 * radius, 2 * radius)); + Timer timer = new Timer(1000, new ClockListener()); + timer.start(); + } + + private class ClockListener implements ActionListener { + @Override + public void actionPerformed(ActionEvent e) { + repaint(); + } + } + + private void drawClockHand(Graphics g, int handLength, int angle, int value) { + int x = (int) (centerX + handLength * Math.sin(Math.toRadians(angle))); + int y = (int) (centerY - handLength * Math.cos(Math.toRadians(angle))); + g.drawLine(centerX, centerY, x, y); + if (value != -1) { + g.drawString(Integer.toString(value), x, y); + } + } + + @Override + protected void paintComponent(Graphics g) { + super.paintComponent(g); + centerX = getWidth() / 2; + centerY = getHeight() / 2; + + Calendar now = new GregorianCalendar(); + int hour = now.get(Calendar.HOUR); + int minute = now.get(Calendar.MINUTE); + int second = now.get(Calendar.SECOND); + + g.setColor(Color.BLACK); + g.drawOval(centerX - radius, centerY - radius, 2 * radius, 2 * radius); + g.drawString("12", centerX - 5, centerY - radius + 15); + g.drawString("3", centerX + radius - 10, centerY + 5); + g.drawString("6", centerX - 5, centerY + radius - 5); + g.drawString("9", centerX - radius + 5, centerY + 5); + + int hourAngle = (360 / 12) * (hour % 12) - 90; + int minuteAngle = (360 / 60) * minute - 90; + int secondAngle = (360 / 60) * second - 90; + + g.setColor(Color.BLUE); + drawClockHand(g, (int) (0.5 * radius), hourAngle, hour); + g.setColor(Color.GREEN); + drawClockHand(g, (int) (0.8 * radius), minuteAngle, minute); + g.setColor(Color.RED); + drawClockHand(g, (int) (0.9 * radius), secondAngle, second); + } + + public static void main(String[] args) { + JFrame frame = new JFrame("Analog Clock"); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.add(new AnalogClock(200)); + frame.pack(); + frame.setVisible(true); + } +} diff --git a/AnimationDemo.py b/AnimationDemo.py new file mode 100644 index 00000000..80a05263 --- /dev/null +++ b/AnimationDemo.py @@ -0,0 +1,33 @@ +from tkinter import * # Import tkinter + +class AnimationDemo: + def __init__(self): + window = Tk() # Create a window + window.title("Animation Demo") # Set a title + + width = 250 # Width of the canvas + canvas = Canvas(window, bg = "white", + width = 250, height = 50) + canvas.pack() + + x = 0 # Starting x position + canvas.create_text(x, 30, + text = "Message moving?", tags = "text") + + dx = 3 + while True: + canvas.move("text", dx, 0) # Move text dx unit + canvas.after(100) # Sleep for 100 milliseconds + canvas.update() # Update canvas + if x < width: + x += dx # Get the current position for string + else: + x = 0 # Reset string position to the beginning + canvas.delete("text") + # Redraw text at the beginning + canvas.create_text(x, 30, text = "Message moving?", + tags = "text") + + window.mainloop() # Create an event loop + +AnimationDemo() # Create GUI \ No newline at end of file diff --git a/AppletAnalogClock.java b/AppletAnalogClock.java new file mode 100644 index 00000000..5464e050 --- /dev/null +++ b/AppletAnalogClock.java @@ -0,0 +1,101 @@ +import java.applet.*; +import java.awt.*; +import java.util.*; +import java.text.*; + +public class MyClock extends Applet implements Runnable { + + int width, height; + Thread t = null; + boolean threadSuspended; + int hours=0, minutes=0, seconds=0; + String timeString = ""; + + public void init() { + width = getSize().width; + height = getSize().height; + setBackground( Color.black ); + } + + public void start() { + if ( t == null ) { + t = new Thread( this ); + t.setPriority( Thread.MIN_PRIORITY ); + threadSuspended = false; + t.start(); + } + else { + if ( threadSuspended ) { + threadSuspended = false; + synchronized( this ) { + notify(); + } + } + } + } + + public void stop() { + threadSuspended = true; + } + + public void run() { + try { + while (true) { + + Calendar cal = Calendar.getInstance(); + hours = cal.get( Calendar.HOUR_OF_DAY ); + if ( hours > 12 ) hours -= 12; + minutes = cal.get( Calendar.MINUTE ); + seconds = cal.get( Calendar.SECOND ); + + SimpleDateFormat formatter + = new SimpleDateFormat( "hh:mm:ss", Locale.getDefault() ); + Date date = cal.getTime(); + timeString = formatter.format( date ); + + // Now the thread checks to see if it should suspend itself + if ( threadSuspended ) { + synchronized( this ) { + while ( threadSuspended ) { + wait(); + } + } + } + repaint(); + t.sleep( 1000 ); // interval specified in milliseconds + } + } + catch (Exception e) { } + } + + void drawHand( double angle, int radius, Graphics g ) { + angle -= 0.5 * Math.PI; + int x = (int)( radius*Math.cos(angle) ); + int y = (int)( radius*Math.sin(angle) ); + g.drawLine( width/2, height/2, width/2 + x, height/2 + y ); + } + + void drawWedge( double angle, int radius, Graphics g ) { + angle -= 0.5 * Math.PI; + int x = (int)( radius*Math.cos(angle) ); + int y = (int)( radius*Math.sin(angle) ); + angle += 2*Math.PI/3; + int x2 = (int)( 5*Math.cos(angle) ); + int y2 = (int)( 5*Math.sin(angle) ); + angle += 2*Math.PI/3; + int x3 = (int)( 5*Math.cos(angle) ); + int y3 = (int)( 5*Math.sin(angle) ); + g.drawLine( width/2+x2, height/2+y2, width/2 + x, height/2 + y ); + g.drawLine( width/2+x3, height/2+y3, width/2 + x, height/2 + y ); + g.drawLine( width/2+x2, height/2+y2, width/2 + x3, height/2 + y3 ); + } + + public void paint( Graphics g ) { + g.setColor( Color.gray ); + drawWedge( 2*Math.PI * hours / 12, width/5, g ); + drawWedge( 2*Math.PI * minutes / 60, width/3, g ); + drawHand( 2*Math.PI * seconds / 60, width/2, g ); + g.setColor( Color.white ); + g.drawString( timeString, 10, height-10 ); + } +} diff --git a/AppletCom.java b/AppletCom.java new file mode 100644 index 00000000..371f046f --- /dev/null +++ b/AppletCom.java @@ -0,0 +1,21 @@ +import java.applet.*; +import java.awt.*; +import java.awt.event.*; +public class ContextApplet extends Applet implements ActionListener{ +Button b; + +public void init(){ +b=new Button("Click"); +b.setBounds(50,50,60,50); + +add(b); +b.addActionListener(this); +} + +public void actionPerformed(ActionEvent e){ + +AppletContext ctx=getAppletContext(); +Applet a=ctx.getApplet("app2"); +a.setBackground(Color.yellow); +} +} diff --git a/Ascii_art/README.md b/Ascii_art/README.md new file mode 100644 index 00000000..b7bb3326 --- /dev/null +++ b/Ascii_art/README.md @@ -0,0 +1,30 @@ +# ascii-art + +## Description +This Project will take an image and print out an [ASCII-art](https://en.wikipedia.org/wiki/ASCII_art). + +## About this Project +This project uses [opencv](https://www.opencv.org) to process image and [numpy](https://numpy.org) to manipulate arrays. The Image is numerically coded for different threshold regions it comes under and for each coded regions , a symbol is used for printing it out in the stdout. + +## Usage +Use the Script [make_art.py](https://github.com/Shiny-Akash/python-mini-projects/blob/ascii-art/projects/asciiart/make_art.py) . +In the command line, Enter + +`python3 make_art.py [image_path]` + +Replace the `[image_path]` with the image you want to do ascii-art. By default it takes [sample_image.png](https://github.com/Shiny-Akash/python-mini-projects/blob/ascii-art/projects/asciiart/sample_image.png) + +## Customization +There are two things you can customize in [make_art.py](https://github.com/Shiny-Akash/python-mini-projects/blob/ascii-art/projects/asciiart/make_art.py). + +* `symbols_list` +* `threshold_list` + +Modify the threshold list to take **different threshold values** thereby changing the patterns in the printed image. +Modify the symbols list to substitute **different symbols** in the coded patterns. + +## Sample +Input Image : + +Output : + diff --git a/Ascii_art/make_art.py b/Ascii_art/make_art.py new file mode 100644 index 00000000..f966d676 --- /dev/null +++ b/Ascii_art/make_art.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 + +import cv2 +import numpy as np + +import sys + +symbols_list = ["#", "-", "*", ".", "+", "o"] +threshold_list = [0, 50, 100, 150, 200] + +def print_out_ascii(array): + """prints the coded image with symbols""" + + for row in array: + for e in row: + # select symbol based on the type of coding + print(symbols_list[int(e) % len(symbols_list)], end="") + print() + + +def img_to_ascii(image): + """returns the numeric coded image""" + + # resizing parameters + # adjust these parameters if the output doesn't fit to the screen + height, width = image.shape + new_width = int(width / 20) + new_height = int(height / 40) + + # resize image to fit the printing screen + resized_image = cv2.resize(image, (new_width, new_height),) + + thresh_image = np.zeros(resized_image.shape) + + for i, threshold in enumerate(threshold_list): + # assign corresponding values according to the index of threshold applied + thresh_image[resized_image > threshold] = i + return thresh_image + + +if __name__ == "__main__": + + if len(sys.argv) < 2: + print("Image Path not specified : Using sample_image.png\n") + image_path = "sample_image.png" # default image path + + if len(sys.argv) == 2: + print("Using {} as Image Path\n".format(sys.argv[1])) + image_path = sys.argv[1] + + image = cv2.imread(image_path, 0) # read image + + ascii_art = img_to_ascii(image) + print_out_ascii(ascii_art) diff --git a/Ascii_art/requirements.txt b/Ascii_art/requirements.txt new file mode 100644 index 00000000..eeb7194f --- /dev/null +++ b/Ascii_art/requirements.txt @@ -0,0 +1,2 @@ +opencv-python==4.3.0.36 +numpy==1.19.1 diff --git a/Ascii_art/sample_image.png b/Ascii_art/sample_image.png new file mode 100644 index 00000000..7a0af276 Binary files /dev/null and b/Ascii_art/sample_image.png differ diff --git a/Ascii_art/sample_output.png b/Ascii_art/sample_output.png new file mode 100644 index 00000000..b3b20fee Binary files /dev/null and b/Ascii_art/sample_output.png differ diff --git a/Authentication System b/Authentication System new file mode 100644 index 00000000..56e93223 --- /dev/null +++ b/Authentication System @@ -0,0 +1,47 @@ +import java.util.HashMap; +import java.util.Map; + +public class AuthenticationSystem { + + private Map<String, User> users; + + public AuthenticationSystem() { + this.users = new HashMap<>(); + } + + public void registerUser(User user) { + this.users.put(user.getUsername(), user); + } + + public User login(String username, String password) { + User user = this.users.get(username); + if (user != null && user.isAuthenticated(password)) { + return user; + } else { + return null; + } + } + + public static class User { + + private String username; + private String password; + + public User(String username, String password) { + this.username = username; + this.password = password; + } + + public String getUsername() { + return username; + } + + public String getPassword() { + return password; + } + + public boolean isAuthenticated(String password) { + return this.password.equals(password); + } + } +} diff --git a/AwtMouseListener.java b/AwtMouseListener.java new file mode 100644 index 00000000..4f09c6d9 --- /dev/null +++ b/AwtMouseListener.java @@ -0,0 +1,33 @@ +import java.awt.*; +import java.awt.event.*; +public class MouseListenerExample extends Frame implements MouseListener{ + Label l; + MouseListenerExample(){ + addMouseListener(this); + + l=new Label(); + l.setBounds(20,50,100,20); + add(l); + setSize(300,300); + setLayout(null); + setVisible(true); + } + public void mouseClicked(MouseEvent e) { + l.setText("Mouse Clicked"); + } + public void mouseEntered(MouseEvent e) { + l.setText("Mouse Entered"); + } + public void mouseExited(MouseEvent e) { + l.setText("Mouse Exited"); + } + public void mousePressed(MouseEvent e) { + l.setText("Mouse Pressed"); + } + public void mouseReleased(MouseEvent e) { + l.setText("Mouse Released"); + } +public static void main(String[] args) { + new MouseListenerExample(); +} +} diff --git a/BMI Calculator b/BMI Calculator new file mode 100644 index 00000000..b4bb139e --- /dev/null +++ b/BMI Calculator @@ -0,0 +1,39 @@ + +class Complex{ + int real; + int img; + Complex(){ + + } + Complex(int real,int img){ + this.real=real; + this.img=img; + } + void display() { + System.out.println(real+" + i"+img); + } + Complex add(Complex c1,Complex c2) { + Complex temp=new Complex(); + temp.real=c1.real+c2.real; + temp.img=c1.img+c2.img; + return temp; + + + } + +} +public class q3 { + + public static void main(String[] args) { + Complex c=new Complex(10,20); + Complex c1=new Complex(20,30); + Complex c3=new Complex(); + c3=c1.add(c1, c); + + c1.display(); + c.display(); + c3.display(); + + } + +} diff --git a/BMI.java b/BMI.java new file mode 100644 index 00000000..e97e22a3 --- /dev/null +++ b/BMI.java @@ -0,0 +1,14 @@ +import java.util.Scanner; +public class Example { + public static void main(String args[]) { + Scanner sc = new Scanner(System.in); + System.out.print("Input weight in kilogram: "); + double weight = sc.nextDouble(); + System.out.print(" +Input height in meters: "); + double height = sc.nextDouble(); + double BMI = weight / (height * height); + System.out.print(" +The Body Mass Index (BMI) is " + BMI + " kg/m2"); + } +} diff --git a/BMI.py b/BMI.py new file mode 100644 index 00000000..2c86fc0f --- /dev/null +++ b/BMI.py @@ -0,0 +1,37 @@ +class BMI: + def __init__(self, name, age, weight, height): + self.__name = name + self.__age = age + self.__weight = weight + self.__height = height + + def getBMI(self): + KILOGRAMS_PER_POUND = 0.45359237 + METERS_PER_INCH = 0.0254 + bmi = self.__weight * KILOGRAMS_PER_POUND / \ + ((self.__height * METERS_PER_INCH) * \ + (self.__height * METERS_PER_INCH)) + return round(bmi * 100) / 100 + + def getStatus(self): + bmi = self.getBMI() + if bmi < 18.5: + return "Underweight" + elif bmi < 25: + return "Normal" + elif bmi < 30: + return "Overweight" + else: + return "Obese" + + def getName(self): + return self.__name + + def getAge(self): + return self.__age + + def getWeight(self): + return self.__weight + + def getHeight(self): + return self.__height diff --git a/BMI.pyc b/BMI.pyc new file mode 100644 index 00000000..56b34df0 Binary files /dev/null and b/BMI.pyc differ diff --git a/BMI_calculator.java b/BMI_calculator.java new file mode 100644 index 00000000..c4221550 --- /dev/null +++ b/BMI_calculator.java @@ -0,0 +1,40 @@ +import java.util.Scanner; + +public class BMICalculator { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + System.out.println("BMI Calculator"); + System.out.println("---------------"); + + System.out.print("Enter your weight in kilograms: "); + double weight = scanner.nextDouble(); + + System.out.print("Enter your height in meters: "); + double height = scanner.nextDouble(); + + double bmi = calculateBMI(weight, height); + + System.out.println("\nYour BMI is: " + bmi); + interpretBMI(bmi); + + scanner.close(); + } + + public static double calculateBMI(double weight, double height) { + return weight / (height * height); + } + + public static void interpretBMI(double bmi) { + System.out.print("BMI Interpretation: "); + if (bmi < 18.5) { + System.out.println("Underweight"); + } else if (bmi < 25) { + System.out.println("Normal Weight"); + } else if (bmi < 30) { + System.out.println("Overweight"); + } else { + System.out.println("Obese"); + } + } +} diff --git a/BSTVisualization.java b/BSTVisualization.java new file mode 100644 index 00000000..21a30550 --- /dev/null +++ b/BSTVisualization.java @@ -0,0 +1,540 @@ + +import java.util.*; +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + +public class BSTVisualization extends JFrame implements ActionListener, KeyListener { + // Tree Root Node. + private Node root; + + // private Color color; + private JPanel topPanel, treePanel, infoPanel; + private JPanel topLeftPanel, topRightPanel; + private JButton btnAdd, btnDelete; + private JTextField tf; + private int X = 300, Y = 75; + private Graphics2D g2; + private Rectangle size; + private JLabel labelInorder, labelPreorder, labelPostorder, labelHeight; + private JLabel ansInorder, ansPreorder, ansPostorder, ansHeight; + private FontMetrics fontMatrix; + + //Node Structure + private static class Node { + static int TEXT_WIDTH = 40; + static int TEXT_HEIGHT = 40; + + JLabel data; + Node left; + Node right; + Points p; + + Node(int info) { + data = new JLabel(info + "", SwingConstants.CENTER); + data.setFont(new Font("Arial", Font.BOLD, 20)); + data.setBorder(BorderFactory.createLineBorder(Color.black)); + data.setOpaque(true); + data.setBackground(Color.green); + p = null; + } + } + + //Points structure + private static class Points { + int x1 = 0, x2 = 0, y2 = 0, y1 = 0; + + Points(int x1, int y1, int x2, int y2) { + this.x1 = x1; + this.x2 = x2; + this.y2 = y2; + this.y1 = y1; + } + + public String toString() { + return "x1 = " + x1 + ", y1 = " + y1 + ", x2 = " + x2 + ", y2 = " + y2; + } + } + + // For storing the Height of the root,left and right child height. + private static class Height { + int root, left, right; + + Height() { + this.root = 0; + this.left = 0; + this.right = 0; + } + + Height(int left, int right) { + this.left = left; + this.right = right; + } + + @Override + public String toString() { + return Integer.toString(this.root); + } + } + + public void paint(Graphics g) { + super.paintComponents(g); + + g2 = (Graphics2D) g; + g2.setStroke(new BasicStroke(3.0f)); + + Stack<Node> s = new Stack<>(); + Node curr = root; + Points pts; + int offset = topPanel.getBounds().height; + while (!s.isEmpty() || curr != null) { + while (curr != null) { + s.push(curr); + curr = curr.left; + } + if (!s.isEmpty()) + curr = s.pop(); + pts = curr.p; + g2.drawLine(pts.x1 + 7, pts.y1 + 30 + offset, pts.x2 + 3, pts.y2 + 10 + offset); + curr = curr.right; + } + + // x1 = label.getX()+7 + // y1 = label.getY()+30 + } + + public BSTVisualization() { + // Initialize the frame. + initialize(); + } + + private void initialize() { + + // setLayout(null); // layout + setSize(1200, 700); //frame size + + size = getBounds(); + X = size.width / 2; + + topPanel = new JPanel(new BorderLayout()); + Rectangle top = topPanel.getBounds(); + + topLeftPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 10, 10)); + topPanel.add(topLeftPanel, BorderLayout.WEST); + + topRightPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); + topPanel.add(topRightPanel, BorderLayout.EAST); + + treePanel = new JPanel(null); + treePanel.setPreferredSize(new Dimension(size.width, size.height - 300)); + + infoPanel = new JPanel(); + infoPanel.setLayout(new BoxLayout(infoPanel, BoxLayout.Y_AXIS)); + infoPanel.setPreferredSize(new Dimension(size.width, 200)); + + // Height of BST label + labelHeight = new JLabel("BST Height : "); + labelHeight.setFont(new Font("Calibri", Font.BOLD, 20)); + topLeftPanel.add(labelHeight); + + // Height of BST answer + ansHeight = new JLabel("0"); + ansHeight.setFont(new Font("Calibri", Font.BOLD, 20)); + ansHeight.setPreferredSize(new Dimension(50, 30)); + topLeftPanel.add(ansHeight); + + //For geting data. + tf = new JTextField(""); + tf.setFont(new Font("Arial", Font.BOLD, 20)); + tf.setPreferredSize(new Dimension(150, 30)); + tf.addKeyListener(this); + topRightPanel.add(tf); + + //Add Button + btnAdd = new JButton("Add"); + btnAdd.setFont(new Font("Arial", Font.BOLD, 20)); + // btnAdd.setBounds(size.width - 130, 20, 100, 30); + btnAdd.addActionListener(this); + topRightPanel.add(btnAdd); + + //Delete Button + btnDelete = new JButton("Delete"); + btnDelete.setFont(new Font("Arial", Font.BOLD, 20)); + // btnDelete.setBounds(size.width - 130, 60, 100, 30); + btnDelete.addActionListener(this); + topRightPanel.add(btnDelete); + + // Inorder label + labelInorder = new JLabel("Inorder :"); + labelInorder.setFont(new Font("Times New Roman", Font.BOLD, 20)); + infoPanel.add(labelInorder); + + infoPanel.add(Box.createRigidArea(new Dimension(7, 5))); + + // Inorder traversal answer + ansInorder = new JLabel("BST is empty."); + ansInorder.setFont(new Font("Arial", Font.PLAIN, 18)); + infoPanel.add(ansInorder); + + infoPanel.add(Box.createRigidArea(new Dimension(7, 15))); + + // Preorder label + labelPreorder = new JLabel("Preorder :"); + labelPreorder.setFont(new Font("Times New Roman", Font.BOLD, 20)); + infoPanel.add(labelPreorder); + + infoPanel.add(Box.createRigidArea(new Dimension(7, 5))); + + // Preorder traversal answer + ansPreorder = new JLabel("BST is empty."); + ansPreorder.setFont(new Font("Arial", Font.PLAIN, 18)); + infoPanel.add(ansPreorder); + + infoPanel.add(Box.createRigidArea(new Dimension(7, 15))); + + // Postorder label + labelPostorder = new JLabel("Postorder :"); + labelPostorder.setFont(new Font("Times New Roman", Font.BOLD, 20)); + infoPanel.add(labelPostorder); + + // Postorder traversal answer + ansPostorder = new JLabel("BST is empty."); + ansPostorder.setFont(new Font("Arial", Font.PLAIN, 18)); + infoPanel.add(ansPostorder); + + tf.requestFocusInWindow(); + + add(topPanel, BorderLayout.NORTH); + add(treePanel, BorderLayout.CENTER); + add(infoPanel, BorderLayout.SOUTH); + + setTitle("Binary Search Tree Visualization"); //Title Frame + setResizable(false); + setLocationRelativeTo(null); + setVisible(true); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } + + @Override + public void actionPerformed(ActionEvent evt) { + if (tf.isEnabled()) { + try { + int data = Integer.parseInt(tf.getText()); + if (evt.getSource() == btnAdd) { + add(data); + } else { + delete(data); + } + tf.setText(""); + tf.requestFocusInWindow(); + } catch (Exception e) { + JOptionPane.showMessageDialog(null, "Please Enter Integer."); + } + } + } + + @Override + public void keyTyped(KeyEvent evt) { + char c = evt.getKeyChar(); + if (!tf.isEnabled()) { + return; + } else if (c == 'a' || c == 'A' || c == '\n') { + try { + String data = tf.getText(); + evt.consume(); // Not type 'a' or 'A' character in textfield + if (!data.isEmpty()) { + add(Integer.parseInt(data)); + } else { + throw new Exception(); + } + tf.requestFocusInWindow(); + } catch (Exception e) { + JOptionPane.showMessageDialog(null, "Please Enter Integer."); + } + tf.setText(""); + } else if (c == 'd' || c == 'D') { + try { + String data = tf.getText(); + evt.consume(); // Not type 'd' or 'D' character in textfield + if (!data.isEmpty()) { + delete(Integer.parseInt(data)); + } + tf.requestFocusInWindow(); + } catch (Exception e) { + JOptionPane.showMessageDialog(null, "Please Enter Integer."); + } + tf.setText(""); + } else if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') + evt.consume(); + } + + @Override + public void keyPressed(KeyEvent evt) { + } + + @Override + public void keyReleased(KeyEvent evt) { + } + + //Add element in BST. + public void add(int info) { + Node newNode = new Node(info); + int width = getWidth(newNode); + + if (root == null) { + root = newNode; + newNode.data.setBounds(treePanel.getBounds().width / 2, 10, width, 40); + newNode.p = new Points(0, 0, 0, 0); + } else { + Node curr = root, pre = root; + int currData; + X = treePanel.getBounds().width / 2; + while (curr != null) { + pre = curr; + currData = Integer.parseInt(curr.data.getText()); + if (info == currData) { + JOptionPane.showMessageDialog(null, info + " is already exist."); + return; + } else if (currData > info) { + curr = curr.left; + } else { + curr = curr.right; + } + X /= 2; + } + + currData = Integer.parseInt(pre.data.getText()); + int x = pre.data.getX(); + int y = pre.data.getY(); + Dimension preDimension = pre.data.getSize(); + Dimension currDimension = new Dimension(width, Node.TEXT_HEIGHT); + + if (currData > info) { + pre.left = newNode; + newNode.data.setBounds(x - X, y + Y, width, 40); + // x1=x;y1=y+20;x2=x-X+20;y2=y+Y+20; + newNode.p = new Points(x, y + preDimension.height / 2, x - X + currDimension.width / 2, y + Y + currDimension.height / 2); + } else { + pre.right = newNode; + newNode.data.setBounds(x + X, y + Y, width, 40); + // x1=x+40;y1=y+20;x2=x+X+20;y2=y+Y+20; + newNode.p = new Points(x + preDimension.width, y + preDimension.height / 2, x + X + currDimension.width / 2, y + Y + currDimension.height / 2); + } + } + + // Set all traversal and height of BST + setInfo(); + + // paint(treePanel.getGraphics()); + treePanel.add(newNode.data); + treePanel.validate(); + treePanel.repaint(); + + validate(); + repaint(); + } + + // Delete Node from BST + public void delete(int data) { + if (root == null) { + JOptionPane.showMessageDialog(null, "BST is empty."); + } else { + Node curr = root, pre = root; + + while (curr != null) { + int info = Integer.parseInt(curr.data.getText()); + if (info == data) { + break; + } else if (info > data) { + pre = curr; + curr = curr.left; + } else { + pre = curr; + curr = curr.right; + } + } + + if (curr == null) { // data is not find. + JOptionPane.showMessageDialog(null, data + " is not available."); + return; + } else if (curr.left == null || curr.right == null) { // data has 0 or 1 child + + treePanel.remove(curr.data); + treePanel.validate(); + treePanel.repaint(); + + validate(); + repaint(); + + if (curr != root) { + Node address = curr.left != null ? curr.left : curr.right; + // curr.data>pre.data + int preData = Integer.parseInt(pre.data.getText()); + int currData = Integer.parseInt(curr.data.getText()); + if (currData > preData) { + pre.right = address; + } else { + pre.left = address; + } + } else { + if (curr.left != null) { + root = curr.left; + } else { + root = curr.right; + } + } + + } else { // data has 2 child. + + treePanel.remove(curr.data); + treePanel.validate(); + treePanel.repaint(); + + validate(); + repaint(); + + /* + It set another node depending upon the height of left and right sub tree. + */ + Node nextRoot = null, preRoot = curr; + Height height = calculateHeight(curr); + + /* For taking maximum element from the left Side. */ + if (height.left > height.right) { + nextRoot = curr.left; + while (nextRoot.right != null) { + preRoot = nextRoot; + nextRoot = nextRoot.right; + } + + if (preRoot != curr) { + preRoot.right = nextRoot.left; + } else { + preRoot.left = nextRoot.left; + } + } else { /* For taking minimum element from the right Side.*/ + nextRoot = curr.right; + while (nextRoot.left != null) { + preRoot = nextRoot; + nextRoot = nextRoot.left; + } + + if (preRoot != curr) { + preRoot.left = nextRoot.right; + } else { + preRoot.right = nextRoot.right; + } + } + + curr.data = nextRoot.data; + } + reArrangeNode(root, root, treePanel.getBounds().width / 2); + } + + // Set all traversal and height of BST + setInfo(); + } + + // Set all traversal and height of BST + private void setInfo() { + Height height = calculateHeight(root); + + if (height.root == 0) { + ansInorder.setText("BST is empty."); + ansPostorder.setText("BST is empty."); + ansPreorder.setText("BST is empty."); + } else { + ansInorder.setText(inorder(root)); + ansPostorder.setText(postorder(root)); + ansPreorder.setText(preorder(root)); + } + + ansHeight.setText(height.root + ""); + } + + private int getWidth(Node node) { + fontMatrix = getFontMetrics(node.data.getFont()); + int width = fontMatrix.stringWidth(node.data.getText()); + return width < Node.TEXT_WIDTH ? Node.TEXT_WIDTH : (width + 5); + } + + //Inorder logic + private String inorder(Node root) { + if (root == null) + return ""; + + return inorder(root.left) + root.data.getText() + " " + inorder(root.right); + } + + //Preorder logic + public String preorder(Node root) { + if (root == null) + return ""; + + return root.data.getText() + " " + preorder(root.left) + preorder(root.right); + } + + //Postorder logic + public String postorder(Node root) { + if (root == null) + return ""; + + return postorder(root.left) + postorder(root.right) + root.data.getText() + " "; + } + + // Calculate Height of BST using recursive method. + private Height calculateHeight(Node root) { + if (root == null) { + return new Height(); + } + Height leftChild = calculateHeight(root.left); + Height rightChild = calculateHeight(root.right); + Height current = new Height(leftChild.root, rightChild.root); + current.root = 1 + Math.max(leftChild.root, rightChild.root); + return current; + } + + // Rearrange nodes + private void reArrangeNode(Node node, Node pre, int X) { + if (node == null) + return; + + int width = getWidth(node); + + if (root == node) { + node.data.setBounds(X, 10, width, Node.TEXT_HEIGHT); + } else { + int x = pre.data.getX(); + int y = pre.data.getY(); + Dimension preDimension = pre.data.getSize(); + Dimension currDimension = new Dimension(width, Node.TEXT_HEIGHT); + + int preData = Integer.parseInt(pre.data.getText()); + int nodeData = Integer.parseInt(node.data.getText()); + if (nodeData < preData) { + node.data.setBounds(x - X, y + Y, width, Node.TEXT_HEIGHT); + node.p = new Points(x, y + preDimension.height / 2, x - X + currDimension.width / 2, y + Y + currDimension.height / 2); + } else { + node.data.setBounds(x + X, y + Y, width, Node.TEXT_HEIGHT); + // node.p = new Points(x + 40, y + 20, x + X + 20, y + Y + 20); + node.p = new Points(x + preDimension.width, y + preDimension.height / 2, x + X + currDimension.width / 2, y + Y + currDimension.height / 2); + } + } + + reArrangeNode(node.left, node, X / 2); + reArrangeNode(node.right, node, X / 2); + } + + public static void main(String arg[]) { + BSTVisualization bst = new BSTVisualization(); + + bst.add(500); + bst.add(250); + bst.add(350); + bst.add(200); + bst.add(750); + bst.add(1000); + bst.add(700); + bst.add(740); + } +} diff --git a/Bank.java b/Bank.java new file mode 100644 index 00000000..c040a5f1 --- /dev/null +++ b/Bank.java @@ -0,0 +1,138 @@ +package main; + +import java.util.Scanner; + +class Account{ + + int balance; + int prevTrans; + String custName; + int custId; + Scanner sc =new Scanner(System.in); + + void deposit(int amt1) { + if(amt1 !=0) { + balance= balance+amt1; + prevTrans = amt1; + } + } + + void withdraw(int amt2) { + if(balance !=0) { + balance = balance-amt2; + prevTrans = -amt2; + } + } + + void getPrevTrans() { + + if(prevTrans>0) { + System.out.println("Deposited Amount: "+prevTrans); + } + else if(prevTrans<0) { + System.out.println("Withdrawn Amount: "+Math.abs(prevTrans)); + } + else { + System.out.println("No Previous Transaction "); + } + + } + + void start() { + int z=0; + System.out.println("Greetings "+custName+"\nID : "+custId+"\n"); + System.out.println("What do you wish to do today?\n"); + System.out.println("1. Check Balance\n2. Deposit\n3. Withdraw\n4. View Previous Transaction\n5. Exit \n"); + + do { + System.out.println("******************"); + System.out.println("Enter your choice: "); + System.out.println("******************"); + z=sc.nextInt(); + + switch(z) { + + case 1: + System.out.println("---------------"); + System.out.println("Current Balance : "+balance); + System.out.println("---------------\n"); + break; + + case 2: + System.out.println("------------------------"); + System.out.println("Enter amount to deposit:"); + System.out.println("------------------------"); + int a=sc.nextInt(); + deposit(a); + System.out.println("\n"); + break; + + case 3: + System.out.println("-------------------------"); + System.out.println("Enter amount to withdraw:"); + System.out.println("-------------------------"); + int b=sc.nextInt(); + withdraw(b); + System.out.println("\n"); + break; + + case 4: + System.out.println("-------------------------"); + System.out.println("Previous Transaction : "); + getPrevTrans(); + System.out.println("-------------------------\n"); + break; + + case 5: + System.out.println("*******************************"); + break; + + default: + System.out.println("INVALID INPUT! \nPlease try again "); + break; + } + + }while(z!=5); + System.out.println("Thank you for using our services"); + } +} + + public class Bank { + public static void main(String[] args) { + + + Account b1=new Account(); + b1.custId= 9934823; + b1.custName="Paras Dongre"; + b1.balance= 52000; + + Account b2=new Account(); + b2.custId= 7842464; + b2.custName="Rahul Bhage"; + b2.balance= 72000; + + Account b3=new Account(); + b3.custId= 532568; + b3.custName="Anshul Pagle"; + b3.balance= 34000; + + System.out.println(" WELCOME TO THE PHD BANK"); + System.out.println(" ***********************\nEnter your pin : "); + + Scanner s=new Scanner(System.in); + int pin=s.nextInt(); + + if(pin==1234) { + b1.start(); + } + else if(pin==4321) { + b2.start(); + } + else if(pin==9876) { + b3.start(); + } + else { + System.out.println("Invalid PIN !! Try Again"); + } + } +} diff --git a/Banking.java b/Banking.java new file mode 100644 index 00000000..4e44c979 --- /dev/null +++ b/Banking.java @@ -0,0 +1,150 @@ +import java.util.Scanner; + +class BankDetails { + private String accno; + private String name; + private String acc_type; + private long balance; + Scanner sc = new Scanner(System.in); + + // Method to open a new account + public void openAccount() { + System.out.print("Enter Account No: "); + accno = sc.next(); + System.out.print("Enter Account type: "); + acc_type = sc.next(); + System.out.print("Enter Name: "); + name = sc.next(); + System.out.print("Enter Balance: "); + balance = sc.nextLong(); + } + + // Method to display account details + public void showAccount() { + System.out.println("Name of account holder: " + name); + System.out.println("Account no.: " + accno); + System.out.println("Account type: " + acc_type); + System.out.println("Balance: " + balance); + } + + // Method to deposit money + public void deposit() { + long amt; + System.out.println("Enter the amount you want to deposit: "); + amt = sc.nextLong(); + balance = balance + amt; + } + + // Method to withdraw money + public void withdrawal() { + long amt; + System.out.println("Enter the amount you want to withdraw: "); + amt = sc.nextLong(); + if (balance >= amt) { + balance = balance - amt; + System.out.println("Balance after withdrawal: " + balance); + } else { + System.out.println("Your balance is less than " + amt + "\tTransaction failed...!!"); + } + } + + // Method to search an account number + public boolean search(String ac_no) { + if (accno.equals(ac_no)) { + showAccount(); + return true; + } + return false; + } +} + +public class BankingApp { + public static void main(String arg[]) { + Scanner sc = new Scanner(System.in); + + // Create initial accounts + System.out.print("How many number of customers do you want to input? "); + int n = sc.nextInt(); + BankDetails[] accounts = new BankDetails[n]; + + for (int i = 0; i < accounts.length; i++) { + accounts[i] = new BankDetails(); + accounts[i].openAccount(); + } + + // Main menu loop + int choice; + do { + System.out.println("\n ***Banking System Application***"); + System.out.println("1. Display all account details"); + System.out.println("2. Search by Account number"); + System.out.println("3. Deposit the amount"); + System.out.println("4. Withdraw the amount"); + System.out.println("5. Exit"); + System.out.print("Enter your choice: "); + choice = sc.nextInt(); + + switch (choice) { + case 1: + // Display all account details + for (int i = 0; i < accounts.length; i++) { + accounts[i].showAccount(); + } + break; + case 2: + // Search by Account number + System.out.print("Enter account no. you want to search: "); + String ac_no = sc.next(); + boolean found = false; + for (int i = 0; i < accounts.length; i++) { + found = accounts[i].search(ac_no); + if (found) { + break; + } + } + if (!found) { + System.out.println("Search failed! Account doesn't exist..!!"); + } + break; + case 3: + // Deposit the amount + System.out.print("Enter Account no. : "); + ac_no = sc.next(); + found = false; + for (int i = 0; i < accounts.length; i++) { + found = accounts[i].search(ac_no); + if (found) { + accounts[i].deposit(); + break; + } + } + if (!found) { + System.out.println("Search failed! Account doesn't exist..!!"); + } + break; + case 4: + // Withdraw the amount + System.out.print("Enter Account No : "); + ac_no = sc.next(); + found = false; + for (int i = 0; i < accounts.length; i++) { + found = accounts[i].search(ac_no); + if (found) { + accounts[i].withdrawal(); + break; + } + } + if (!found) { + System.out.println("Search failed! Account doesn't exist..!!"); + } + break; + case 5: + System.out.println("See you soon..."); + break; + default: + System.out.println("Invalid choice! Please select a valid option."); + break; + } + } while (choice != 5); + } +} diff --git a/Basic Jarvis-like AI b/Basic Jarvis-like AI new file mode 100644 index 00000000..697eb217 --- /dev/null +++ b/Basic Jarvis-like AI @@ -0,0 +1,33 @@ +import java.util.Scanner; + +public class Jarvis { + + private SpeechRecognizer speechRecognizer; + private TextToSpeech textToSpeech; + private NaturalLanguageProcessor nlp; + private KnowledgeBase knowledgeBase; + + public Jarvis(SpeechRecognizer speechRecognizer, TextToSpeech textToSpeech, NaturalLanguageProcessor nlp, KnowledgeBase knowledgeBase) { + this.speechRecognizer = speechRecognizer; + this.textToSpeech = textToSpeech; + this.nlp = nlp; + this.knowledgeBase = knowledgeBase; + } + + public void listenAndRespond() { + String userInput = speechRecognizer.recognizeSpeech(); + String response = nlp.processInput(userInput, knowledgeBase); + textToSpeech.speak(response); + } + + public static void main(String[] args) { + SpeechRecognizer speechRecognizer = new GoogleCloudSpeechRecognizer(); + TextToSpeech textToSpeech = new GoogleCloudTextToSpeech(); + NaturalLanguageProcessor nlp = new OpenNLPProcessor(); + KnowledgeBase knowledgeBase = new WikidataKnowledgeBase(); + + Jarvis jarvis = new Jarvis(speechRecognizer, textToSpeech, nlp, knowledgeBase); + + jarvis.listenAndRespond(); + } +} diff --git a/Basic_Bank_System/Basic_Bank_System.java b/Basic_Bank_System/Basic_Bank_System.java new file mode 100644 index 00000000..c8fabad4 --- /dev/null +++ b/Basic_Bank_System/Basic_Bank_System.java @@ -0,0 +1,83 @@ +import java.util.HashMap; +import java.util.Map; +import java.util.Scanner; + +class Bank { + private Map<String, Account> accounts; + + public Bank() { + this.accounts = new HashMap<>(); + } + + public void addAccount(String accountNumber, String customerName, double balance) { + Account account = new Account(accountNumber, customerName, balance); + accounts.put(accountNumber, account); + } + + public void displayAccountInfo(String accountNumber) { + if (accounts.containsKey(accountNumber)) { + Account account = accounts.get(accountNumber); + System.out.println("Account Number: " + account.getAccountNumber()); + System.out.println("Customer Name: " + account.getCustomerName()); + System.out.println("Balance: $" + account.getBalance()); + } else { + System.out.println("Account not found!"); + } + } + + public void performTransaction(String accountNumber, double amount) { + if (accounts.containsKey(accountNumber)) { + Account account = accounts.get(accountNumber); + account.deposit(amount); + System.out.println("Transaction successful. Updated balance: $" + account.getBalance()); + } else { + System.out.println("Account not found!"); + } + } +} + +class Account { + private String accountNumber; + private String customerName; + private double balance; + + public Account(String accountNumber, String customerName, double balance) { + this.accountNumber = accountNumber; + this.customerName = customerName; + this.balance = balance; + } + + public String getAccountNumber() { + return accountNumber; + } + + public String getCustomerName() { + return customerName; + } + + public double getBalance() { + return balance; + } + + public void deposit(double amount) { + balance += amount; + } +} + +public class BankingSystem { + public static void main(String[] args) { + Bank bank = new Bank(); + + // Adding a few accounts + bank.addAccount("101", "John Doe", 1000.0); + bank.addAccount("102", "Jane Smith", 1500.0); + + // Performing transactions + bank.performTransaction("101", 500.0); + bank.performTransaction("103", 200.0); // This account doesn't exist + + // Displaying account information + bank.displayAccountInfo("101"); + bank.displayAccountInfo("102"); + } +} diff --git a/Billing-system/.classpath b/Billing-system/.classpath new file mode 100644 index 00000000..d1ded76c --- /dev/null +++ b/Billing-system/.classpath @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="img"/> + <classpathentry kind="src" path="res"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/Billing-system/.project b/Billing-system/.project new file mode 100644 index 00000000..003b6103 --- /dev/null +++ b/Billing-system/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>RestaurantBillingSystem</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> diff --git a/Billing-system/bin/billingsystem/Login.fxml b/Billing-system/bin/billingsystem/Login.fxml new file mode 100644 index 00000000..93f816d1 --- /dev/null +++ b/Billing-system/bin/billingsystem/Login.fxml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.scene.control.Button?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.control.PasswordField?> +<?import javafx.scene.control.TextField?> +<?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.text.Font?> + +<AnchorPane id="pane" prefHeight="400" prefWidth="600" stylesheets="@login.css" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="billingsystem.MainController"> + <children> + <Button fx:id="login" layoutX="254.0" layoutY="296.0" mnemonicParsing="false" onAction="#handleLogin" prefHeight="24.0" prefWidth="93.0" text="Login"> + <font> + <Font name="System Bold" size="12.0" /> + </font></Button> + <TextField fx:id="user" layoutX="226.0" layoutY="166.0" onAction="#handleLogin" /> + <PasswordField fx:id="pwdFld" layoutX="226.0" layoutY="216.0" onAction="#handleLogin" /> + <Label layoutX="226.0" layoutY="141.0" prefHeight="25.0" prefWidth="149.0" text="Username" textFill="IVORY" /> + <Label layoutX="226.0" layoutY="191.0" prefHeight="25.0" prefWidth="149.0" text="Password" textFill="IVORY" /> + <Label alignment="CENTER" layoutX="151.0" layoutY="52.0" prefHeight="54.0" prefWidth="299.0" text="Restaurant Billing System" textFill="IVORY"> + <font> + <Font name="System Bold" size="20.0" /> + </font> + </Label> + </children> +</AnchorPane> diff --git a/Billing-system/bin/billingsystem/Main.class b/Billing-system/bin/billingsystem/Main.class new file mode 100644 index 00000000..5bf4e430 Binary files /dev/null and b/Billing-system/bin/billingsystem/Main.class differ diff --git a/Billing-system/bin/billingsystem/MainController$1.class b/Billing-system/bin/billingsystem/MainController$1.class new file mode 100644 index 00000000..2d7f941c Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$1.class differ diff --git a/Billing-system/bin/billingsystem/MainController$10.class b/Billing-system/bin/billingsystem/MainController$10.class new file mode 100644 index 00000000..8fc74b4f Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$10.class differ diff --git a/Billing-system/bin/billingsystem/MainController$11.class b/Billing-system/bin/billingsystem/MainController$11.class new file mode 100644 index 00000000..15b60741 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$11.class differ diff --git a/Billing-system/bin/billingsystem/MainController$2$1.class b/Billing-system/bin/billingsystem/MainController$2$1.class new file mode 100644 index 00000000..846737d5 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$2$1.class differ diff --git a/Billing-system/bin/billingsystem/MainController$2$2.class b/Billing-system/bin/billingsystem/MainController$2$2.class new file mode 100644 index 00000000..9aff8034 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$2$2.class differ diff --git a/Billing-system/bin/billingsystem/MainController$2.class b/Billing-system/bin/billingsystem/MainController$2.class new file mode 100644 index 00000000..386fbcad Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$2.class differ diff --git a/Billing-system/bin/billingsystem/MainController$3$1.class b/Billing-system/bin/billingsystem/MainController$3$1.class new file mode 100644 index 00000000..9b4e9479 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$3$1.class differ diff --git a/Billing-system/bin/billingsystem/MainController$3.class b/Billing-system/bin/billingsystem/MainController$3.class new file mode 100644 index 00000000..ea6a0b13 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$3.class differ diff --git a/Billing-system/bin/billingsystem/MainController$4$1.class b/Billing-system/bin/billingsystem/MainController$4$1.class new file mode 100644 index 00000000..6ab0434f Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$4$1.class differ diff --git a/Billing-system/bin/billingsystem/MainController$4$2.class b/Billing-system/bin/billingsystem/MainController$4$2.class new file mode 100644 index 00000000..04e5ce46 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$4$2.class differ diff --git a/Billing-system/bin/billingsystem/MainController$4$3.class b/Billing-system/bin/billingsystem/MainController$4$3.class new file mode 100644 index 00000000..2533bd58 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$4$3.class differ diff --git a/Billing-system/bin/billingsystem/MainController$4.class b/Billing-system/bin/billingsystem/MainController$4.class new file mode 100644 index 00000000..0e7379db Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$4.class differ diff --git a/Billing-system/bin/billingsystem/MainController$5$1.class b/Billing-system/bin/billingsystem/MainController$5$1.class new file mode 100644 index 00000000..2223e115 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$5$1.class differ diff --git a/Billing-system/bin/billingsystem/MainController$5.class b/Billing-system/bin/billingsystem/MainController$5.class new file mode 100644 index 00000000..0a47614e Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$5.class differ diff --git a/Billing-system/bin/billingsystem/MainController$6$1.class b/Billing-system/bin/billingsystem/MainController$6$1.class new file mode 100644 index 00000000..3a6d45f9 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$6$1.class differ diff --git a/Billing-system/bin/billingsystem/MainController$6$2.class b/Billing-system/bin/billingsystem/MainController$6$2.class new file mode 100644 index 00000000..f09f07ad Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$6$2.class differ diff --git a/Billing-system/bin/billingsystem/MainController$6.class b/Billing-system/bin/billingsystem/MainController$6.class new file mode 100644 index 00000000..3f65d731 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$6.class differ diff --git a/Billing-system/bin/billingsystem/MainController$7.class b/Billing-system/bin/billingsystem/MainController$7.class new file mode 100644 index 00000000..7fca743e Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$7.class differ diff --git a/Billing-system/bin/billingsystem/MainController$8.class b/Billing-system/bin/billingsystem/MainController$8.class new file mode 100644 index 00000000..ab023ab0 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$8.class differ diff --git a/Billing-system/bin/billingsystem/MainController$9.class b/Billing-system/bin/billingsystem/MainController$9.class new file mode 100644 index 00000000..932da29a Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController$9.class differ diff --git a/Billing-system/bin/billingsystem/MainController.class b/Billing-system/bin/billingsystem/MainController.class new file mode 100644 index 00000000..5e0deec5 Binary files /dev/null and b/Billing-system/bin/billingsystem/MainController.class differ diff --git a/Billing-system/bin/billingsystem/Order.class b/Billing-system/bin/billingsystem/Order.class new file mode 100644 index 00000000..4576a9c7 Binary files /dev/null and b/Billing-system/bin/billingsystem/Order.class differ diff --git a/Billing-system/bin/billingsystem/Table.class b/Billing-system/bin/billingsystem/Table.class new file mode 100644 index 00000000..6b258a68 Binary files /dev/null and b/Billing-system/bin/billingsystem/Table.class differ diff --git a/Billing-system/bin/billingsystem/User.class b/Billing-system/bin/billingsystem/User.class new file mode 100644 index 00000000..dfcf746f Binary files /dev/null and b/Billing-system/bin/billingsystem/User.class differ diff --git a/Billing-system/bin/billingsystem/login.css b/Billing-system/bin/billingsystem/login.css new file mode 100644 index 00000000..537feecb --- /dev/null +++ b/Billing-system/bin/billingsystem/login.css @@ -0,0 +1,3 @@ +#pane { + -fx-background-image:url('login.jpg'); +} \ No newline at end of file diff --git a/Billing-system/bin/billingsystem/login.jpg b/Billing-system/bin/billingsystem/login.jpg new file mode 100644 index 00000000..7d2fe852 Binary files /dev/null and b/Billing-system/bin/billingsystem/login.jpg differ diff --git a/Billing-system/bin/login.jpg b/Billing-system/bin/login.jpg new file mode 100644 index 00000000..7d2fe852 Binary files /dev/null and b/Billing-system/bin/login.jpg differ diff --git a/Billing-system/bin/main.jpg b/Billing-system/bin/main.jpg new file mode 100644 index 00000000..dad82c17 Binary files /dev/null and b/Billing-system/bin/main.jpg differ diff --git a/Billing-system/bin/main_area.jpg b/Billing-system/bin/main_area.jpg new file mode 100644 index 00000000..2efc0758 Binary files /dev/null and b/Billing-system/bin/main_area.jpg differ diff --git a/Billing-system/bin/systemstyle/Format.class b/Billing-system/bin/systemstyle/Format.class new file mode 100644 index 00000000..9885b718 Binary files /dev/null and b/Billing-system/bin/systemstyle/Format.class differ diff --git a/Billing-system/img/login.jpg b/Billing-system/img/login.jpg new file mode 100644 index 00000000..7d2fe852 Binary files /dev/null and b/Billing-system/img/login.jpg differ diff --git a/Billing-system/img/main.jpg b/Billing-system/img/main.jpg new file mode 100644 index 00000000..dad82c17 Binary files /dev/null and b/Billing-system/img/main.jpg differ diff --git a/Billing-system/img/main_area.jpg b/Billing-system/img/main_area.jpg new file mode 100644 index 00000000..2efc0758 Binary files /dev/null and b/Billing-system/img/main_area.jpg differ diff --git a/Billing-system/src/billingsystem/Login.fxml b/Billing-system/src/billingsystem/Login.fxml new file mode 100644 index 00000000..93f816d1 --- /dev/null +++ b/Billing-system/src/billingsystem/Login.fxml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<?import javafx.scene.control.Button?> +<?import javafx.scene.control.Label?> +<?import javafx.scene.control.PasswordField?> +<?import javafx.scene.control.TextField?> +<?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.text.Font?> + +<AnchorPane id="pane" prefHeight="400" prefWidth="600" stylesheets="@login.css" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="billingsystem.MainController"> + <children> + <Button fx:id="login" layoutX="254.0" layoutY="296.0" mnemonicParsing="false" onAction="#handleLogin" prefHeight="24.0" prefWidth="93.0" text="Login"> + <font> + <Font name="System Bold" size="12.0" /> + </font></Button> + <TextField fx:id="user" layoutX="226.0" layoutY="166.0" onAction="#handleLogin" /> + <PasswordField fx:id="pwdFld" layoutX="226.0" layoutY="216.0" onAction="#handleLogin" /> + <Label layoutX="226.0" layoutY="141.0" prefHeight="25.0" prefWidth="149.0" text="Username" textFill="IVORY" /> + <Label layoutX="226.0" layoutY="191.0" prefHeight="25.0" prefWidth="149.0" text="Password" textFill="IVORY" /> + <Label alignment="CENTER" layoutX="151.0" layoutY="52.0" prefHeight="54.0" prefWidth="299.0" text="Restaurant Billing System" textFill="IVORY"> + <font> + <Font name="System Bold" size="20.0" /> + </font> + </Label> + </children> +</AnchorPane> diff --git a/Billing-system/src/billingsystem/Main.java b/Billing-system/src/billingsystem/Main.java new file mode 100644 index 00000000..e89d85e5 --- /dev/null +++ b/Billing-system/src/billingsystem/Main.java @@ -0,0 +1,118 @@ +package billingsystem; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.util.ArrayList; +import java.util.logging.FileHandler; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.logging.SimpleFormatter; + +import javafx.application.Application; +import javafx.fxml.FXMLLoader; +import javafx.stage.Stage; +import javafx.scene.Parent; +import javafx.scene.Scene; + +/** + * + * @author Jason Li + * @version 1.0 + * @since 19.12.2016 + * + * + * The Class Main. + */ +public class Main extends Application { + + /** The Constant logger. */ + private static final Logger logger = Logger.getLogger(Main.class.getName()); + + /** The fh log. */ + private static FileHandler fhLog; + + /** The user path. */ + private String userPath = "res/users.ser"; + + /** The log path. */ + private String logPath = "res/activity.log"; + + /** The root admin. */ + private final String rootAdmin = "admin"; + + /** The users list. */ + private ArrayList<User> usersList = null; + + /** The jarpath. */ + private String jarpath; + + /* (non-Javadoc) + * @see javafx.application.Application#start(javafx.stage.Stage) + */ + @Override + public void start(Stage primaryStage) { + + try { + fhLog = new FileHandler(logPath, true); + logger.addHandler(fhLog); + SimpleFormatter formatter = new SimpleFormatter(); + fhLog.setFormatter(formatter); + } catch (SecurityException e) { + logger.log(Level.SEVERE, "" + e); + } catch (IOException e) { + logger.log(Level.WARNING, + "Logger could not be set up to log to activity log. Logs will only be displayed in the console. \n" + + e); + } + try { + try { + FileInputStream fileIn = new FileInputStream(userPath); + ObjectInputStream in = new ObjectInputStream(fileIn); + usersList = (ArrayList<User>) in.readObject(); + in.close(); + fileIn.close(); + } catch (IOException i) { + logger.log(Level.INFO, "Root admin account 'admin' created on first time login."); + // Create admin account if not existent + User admin = new User(rootAdmin, "", true); + usersList = new ArrayList<User>(); + usersList.add(admin); + try { + // Create user list with initial admin account + FileOutputStream fileOut = new FileOutputStream(userPath); + ObjectOutputStream out = new ObjectOutputStream(fileOut); + out.writeObject(usersList); + out.close(); + fileOut.close(); + } catch (IOException i2) { + logger.log(Level.WARNING, "" + i2); + } + } + + // Create Login Screen + Parent root = FXMLLoader.load(getClass().getResource("/billingsystem/Login.fxml")); + Scene scene = new Scene(root); + scene.getStylesheets().add(getClass().getResource("login.css").toExternalForm()); + primaryStage.setScene(scene); + primaryStage.setResizable(false); + primaryStage.show(); + fhLog.close(); + + } catch (Exception e) { + logger.log(Level.SEVERE, + "Login Screen file has been deleted or is corrupted. Please restore 'Login.fxml' links. \n" + e); + } + } + + /** + * The main method. + * + * @param args the arguments + */ + public static void main(String[] args) { + launch(args); + } +} diff --git a/Billing-system/src/billingsystem/MainController.java b/Billing-system/src/billingsystem/MainController.java new file mode 100644 index 00000000..da3edd0b --- /dev/null +++ b/Billing-system/src/billingsystem/MainController.java @@ -0,0 +1,1724 @@ +package billingsystem; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.text.DateFormat; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalTime; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.Locale; +import java.util.Optional; +import java.util.Scanner; +import java.util.logging.FileHandler; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.logging.SimpleFormatter; +import java.util.stream.Collectors; + +import javafx.beans.value.ChangeListener; +import javafx.beans.value.ObservableValue; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; +import javafx.event.ActionEvent; +import javafx.event.EventHandler; +import javafx.fxml.FXML; +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.geometry.Rectangle2D; +import javafx.scene.Node; +import javafx.scene.Scene; +import javafx.scene.control.Alert; +import javafx.scene.control.Alert.AlertType; +import javafx.scene.control.Button; +import javafx.scene.control.ButtonBar.ButtonData; +import javafx.scene.control.ButtonType; +import javafx.scene.control.CheckBox; +import javafx.scene.control.ComboBox; +import javafx.scene.control.DatePicker; +import javafx.scene.control.Dialog; +import javafx.scene.control.Label; +import javafx.scene.control.PasswordField; +import javafx.scene.control.ScrollPane; +import javafx.scene.control.ScrollPane.ScrollBarPolicy; +import javafx.scene.control.Separator; +import javafx.scene.control.TextArea; +import javafx.scene.control.TextField; +import javafx.scene.control.Tooltip; +import javafx.scene.input.MouseButton; +import javafx.scene.input.MouseEvent; +import javafx.scene.layout.ColumnConstraints; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.Pane; +import javafx.scene.layout.VBox; +import javafx.stage.FileChooser; +import javafx.stage.Screen; +import javafx.stage.Stage; +import javafx.stage.WindowEvent; + +import systemstyle.Format; + +// TODO: Auto-generated Javadoc +/** + * * @author Jason Li. + * + * @version 1.0 + * @since 19.12.2016 * + * + * + * The Class MainController. + */ +public class MainController { + + /** The login. */ + @FXML + private Button login; + + /** The user. */ + @FXML + private TextField user; + + /** The pwd fld. */ + @FXML + private PasswordField pwdFld; + + /** The users list. */ + private ArrayList<User> usersList; + + /** The current user. */ + private User currentUser; + + /** The Constant userLogger. */ + private static final Logger userLogger = Logger.getLogger(MainController.class.getName() + "_User"); + + /** The fh user. */ + private static FileHandler fhUser; + + /** The Constant logger. */ + private static final Logger logger = Logger.getLogger(MainController.class.getName()); + + /** The fh log. */ + private static FileHandler fhLog; + + /** The file. */ + private File file; + + /** The menubook. */ + private ArrayList<Order> menubook = new ArrayList<Order>(); + + /** The order log. */ + private ArrayList<Order> orderLog = new ArrayList<Order>(); + + /** The full format. */ + private static DateFormat fullFormat = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault()); + + /** The date format. */ + private static DateFormat dateFormat = new SimpleDateFormat("HH:mm dd/MM/yyyy"); + + /** The time format. */ + private static DateFormat timeFormat = new SimpleDateFormat("HH:mm"); + + /** The date time format. */ + private static DateTimeFormatter dateTimeFormat = DateTimeFormatter.ofPattern("HH:mm"); + + /** The user path. */ + private String userPath = "res/users.ser"; + + /** The user log path. */ + private String userLogPath = "res/"; + + /** The log path. */ + private String logPath = "res/activity.log"; + + /** The order log path. */ + private String orderLogPath = "res/orderlog.ser"; + + /** The csv path. */ + private String csvPath = "res/export.csv"; + + /** The menu path. */ + private String menuPath = "res/menubook.ser"; + + /** + * Handle login. + * + * @param evt + * the login event + * + */ + @FXML + private void handleLogin(ActionEvent evt) { + + // Set up general logger + try { + fhLog = new FileHandler(logPath, true); + logger.addHandler(fhLog); + SimpleFormatter formatter = new SimpleFormatter(); + fhLog.setFormatter(formatter); + } catch (SecurityException e) { + logger.log(Level.SEVERE, "" + e); + } catch (IOException e) { + logger.log(Level.WARNING, + "Logger could not be set up to log to activity log. Logs will only be displayed in the console. \n" + + e); + } + + // Load available users for system + try { + FileInputStream fileIn = new FileInputStream(userPath); + ObjectInputStream in = new ObjectInputStream(fileIn); + usersList = (ArrayList<User>) in.readObject(); + in.close(); + fileIn.close(); + } catch (IOException i) { + logger.log(Level.SEVERE, "No user list have been found. Try reloading program. "); + } catch (ClassNotFoundException c) { + logger.log(Level.SEVERE, "" + c); + } + + // Login validation section + // Loop through stored users to see if entered user matches any + boolean matchFound = false; + for (int i = 0; i < usersList.size(); i++) { + String enteredUser = user.getText(); + String storedUser = usersList.get(i).getUserName(); + if (enteredUser.equals(storedUser)) { + String enteredPwd = pwdFld.getText(); + if (enteredPwd.equals(usersList.get(i).getUserPassword())) { + matchFound = true; + currentUser = usersList.get(i); + userLogPath += (currentUser.getUserName() + "_activity.log"); + // Set up user logger + try { + fhUser = new FileHandler(userLogPath, true); + fhUser.setLevel(Level.FINE); + userLogger.setLevel(Level.FINE); + userLogger.addHandler(fhUser); + SimpleFormatter formatter = new SimpleFormatter(); + fhUser.setFormatter(formatter); + } catch (SecurityException e) { + logger.log(Level.SEVERE, "" + e); + } catch (IOException e) { + logger.log(Level.WARNING, + "User activity logger failed to set up. An unlogged user session has been started by " + + currentUser.getUserName()); + logger.log(Level.WARNING, + "Logger could not be set up to log to activity log. Logs will only be displayed in the console. \n" + + e); + } + userLogger.log(Level.FINE, currentUser.getUserName() + " has logged into the system. "); + } + break; + } + } + // Login & password correct + if (matchFound) { + constructMainScreen(); + } + // Else error message + else { + Alert alert = new Alert(AlertType.ERROR); + alert.setTitle("Login failed"); + alert.setHeaderText("Login failed"); + alert.setContentText("Login or password incorrect"); + + alert.showAndWait(); + } + } + + // Main Screen construction section + + /** The v menu. */ + // Variables for Main Screen Menu + private VBox vMenu; + + /** The account. */ + private Button account; + + /** The v manager. */ + // Variables for Manager Menu + private VBox vManager; + + /** The manage users. */ + private Button manageUsers; + + /** The add menubook. */ + private Button addMenubook; + + /** The tbl pane. */ + // Variables for Main Screen Scroll Pane + private Pane tblPane; + + /** The tbl scrl pane. */ + private ScrollPane tblScrlPane; + + /** The lbl. */ + private Table lbl; + + /** The pane height. */ + int paneWidth = 1000, paneHeight = 600; + + /** The btn height. */ + int btnWidth = 125, btnHeight = 35; + + /** The tbl height. */ + int tblWidth = 100, tblHeight = 100; + + /** The v menu width. */ + int vMenuWidth = 200; + + /** The v manager height. */ + int vManagerHeight = 200; + + /** The file chooser. */ + private static FileChooser fileChooser = new FileChooser(); + + /** + * Construct main screen. + */ + private void constructMainScreen() { + + Stage stage = null; + Pane root; + stage = (Stage) login.getScene().getWindow(); + root = new Pane(); + root.setPadding(new Insets(25)); + + // General Menu section + vMenu = new VBox(15); + vMenu.setPadding(new Insets(25)); + // vMenu.setStyle("-fx-background-color: #a0522d;"); + vMenu.setAlignment(Pos.TOP_CENTER); + vMenu.setPrefSize(vMenuWidth, paneHeight); + + account = new Button("Account settings"); + account.setPrefSize(btnWidth, btnHeight); + account.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent at) { + Dialog dialog = new Dialog(); + dialog.setTitle("Account Setting"); + dialog.setHeaderText("Enter new password and click save"); + + GridPane grid = new GridPane(); + grid.setHgap(10); + grid.setVgap(10); + + PasswordField password = new PasswordField(); + password.setPromptText("Password"); + PasswordField passwordConfirm = new PasswordField(); + passwordConfirm.setPromptText("Password"); + + Button save = new Button("Change password"); + save.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent change) { + String passwordSet = password.getText(); + String passwordSetConfirm = passwordConfirm.getText(); + // Check if both fields are filled + if (!(passwordSet.equals("") || (passwordSetConfirm.equals("")))) { + // Check if passwords matched + if (passwordSet.equals(passwordSetConfirm)) { + currentUser.setPassword(passwordSetConfirm); + userLogger.log(Level.FINE, "Successfully changed password."); + + Alert alert = new Alert(AlertType.INFORMATION); + alert.setTitle("Password changed"); + alert.setHeaderText("Password changed"); + alert.setContentText("You have successfully changed your password"); + alert.showAndWait(); + + try { + FileOutputStream fileOut = new FileOutputStream(userPath); + ObjectOutputStream out = new ObjectOutputStream(fileOut); + out.writeObject(usersList); + out.close(); + fileOut.close(); + } catch (IOException i) { + logger.log(Level.SEVERE, "" + i); + } + + } else { + + } + } else { + invalidInputAlert(); + } + } + }); + + grid.add(new Label("Logged in as: "), 0, 0); + grid.add(new Label(currentUser.getUserName()), 1, 0); + grid.add(new Label("New Password:"), 0, 1); + grid.add(password, 1, 1); + grid.add(new Label("Confirm new password:"), 0, 2); + grid.add(passwordConfirm, 1, 2); + grid.add(save, 1, 3); + + ButtonType exit = new ButtonType("Exit", ButtonData.OK_DONE); + dialog.getDialogPane().getButtonTypes().addAll(ButtonType.CANCEL); + + dialog.getDialogPane().setContent(grid); + dialog.showAndWait(); + } + }); + + Button allOrders = new Button("View Order Log"); + allOrders.setPrefSize(btnWidth, btnHeight); + allOrders.setOnAction(new EventHandler<ActionEvent>() { + @Override + @SuppressWarnings("deprecation") + public void handle(ActionEvent ravt) { + Dialog dialog = new Dialog(); + dialog.setTitle("Order Log Manager"); + dialog.setHeaderText("Order Log:"); + + GridPane grid = new GridPane(); + grid.setHgap(10); + grid.setVgap(10); + + grid.add(new Label("Search orders"), 0, 0); + String[] searchColumns = { "Table No.", "Order Name", "From", "Until", "From", "Until", "Comments" }; + // Populating columns + for (int i = 0; i < searchColumns.length; i++) { + Label searchLbl = new Label(searchColumns[i]); + grid.add(searchLbl, i, 1); + } + + // Inner display of all orders + GridPane searchInner = new GridPane(); + Format.innergrid(searchInner); + searchInner.setPrefWidth(400); + searchInner.setMinHeight(200); + String[] searchInnerCol = { "Table No.", "Order Name", "Price", "Quantity", "Total", "Order Datetime", + "Comments" }; + double multiplier = 1; + boolean localRights = currentUser.getUserRights(); + // Create list for selection + ArrayList<Order> selectedList = new ArrayList<Order>(); + // Adjust column width depending on user type + if (localRights) { + multiplier = 0.95; + } + ColumnConstraints scol1 = new ColumnConstraints(); + scol1.setPercentWidth(45 / (searchInnerCol.length - 4) * multiplier); + searchInner.getColumnConstraints().add(scol1); + ColumnConstraints scol2 = new ColumnConstraints(); + scol2.setPercentWidth(25 * multiplier); + searchInner.getColumnConstraints().add(scol2); + ColumnConstraints scol3 = new ColumnConstraints(); + scol3.setPercentWidth(10 * multiplier); + searchInner.getColumnConstraints().add(scol3); + ColumnConstraints scol4 = new ColumnConstraints(); + scol4.setPercentWidth(10 * multiplier); + searchInner.getColumnConstraints().add(scol4); + ColumnConstraints scol5 = new ColumnConstraints(); + scol5.setPercentWidth(10 * multiplier); + searchInner.getColumnConstraints().add(scol5); + ColumnConstraints scol6 = new ColumnConstraints(); + scol6.setPercentWidth(45 / (searchInnerCol.length - 4) * multiplier); + searchInner.getColumnConstraints().add(scol6); + ColumnConstraints scol7 = new ColumnConstraints(); + scol7.setPercentWidth(45 / (searchInnerCol.length - 4) * multiplier); + searchInner.getColumnConstraints().add(scol7); + if (localRights) { + ColumnConstraints scol8 = new ColumnConstraints(); + scol8.setPercentWidth(5); + searchInner.getColumnConstraints().add(scol8); + } + + // Generate search display + ArrayList<Order> localLog = new ArrayList<Order>(orderLog); + for (int i = 0; i < currentTables.size(); i++) { + ArrayList<Order> innerLocal = new ArrayList<Order>(currentTables.get(i).getOrders()); + for (int n = 0; n < innerLocal.size(); n++) { + localLog.add(innerLocal.get(n)); + } + } + ArrayList<Order> displayList = new ArrayList<Order>(localLog); + Collections.reverse(displayList); + refreshSearch(searchInner, displayList, searchInnerCol, selectedList); + ScrollPane searchScroll = new ScrollPane(); + searchScroll.setVbarPolicy(ScrollBarPolicy.ALWAYS); + searchScroll.setFitToWidth(true); + searchScroll.setPrefHeight(200); + searchScroll.setContent(searchInner); + grid.add(searchScroll, 0, 4, searchColumns.length, 1); + + // Populate search fields + ArrayList<String> tblNames = new ArrayList<String>(); + tblNames.add("Any"); + for (int i = 1; i <= 15; i++) { + tblNames.add("Table" + i); + } + ObservableList<String> oTableList = FXCollections.observableArrayList(tblNames); + ComboBox searchTable = new ComboBox(oTableList); + searchTable.getSelectionModel().selectFirst(); + grid.add(searchTable, 0, 2); + + TextField searchName = new TextField(); + grid.add(searchName, 1, 2); + + DatePicker fromDate = new DatePicker(); + fromDate.setPrefWidth(btnWidth); + fromDate.setValue(LocalDate.now().minusDays(1)); + grid.add(fromDate, 2, 2); + + DatePicker untilDate = new DatePicker(); + untilDate.setPrefWidth(btnWidth); + untilDate.setValue(LocalDate.now()); + grid.add(untilDate, 3, 2); + + Date localNow = new Date(); + Date localFrom = (Date) localNow.clone(); + localFrom.setHours(localFrom.getHours() - 1); + TextField fromTime = new TextField(); + fromTime.setText(timeFormat.format(localFrom)); + grid.add(fromTime, 4, 2); + + TextField untilTime = new TextField(); + untilTime.setText(timeFormat.format(localNow)); + grid.add(untilTime, 5, 2); + + TextField searchComments = new TextField(); + grid.add(searchComments, 6, 2); + + Button launchSearch = new Button("Search"); + launchSearch.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent sat) { + // Prepare filled out search fields + String localTbl = (String) searchTable.getValue(); + String localName = searchName.getText(); + LocalDate localFromD; + if (fromDate.getValue() != null) { + // from date - 1 to include current day + localFromD = fromDate.getValue().minusDays(1); + } else { + localFromD = fromDate.getValue(); + } + LocalDate localUntilD; + if (untilDate.getValue() != null) { + // until date + 1 to include current day + localUntilD = untilDate.getValue().plusDays(1); + } else { + localUntilD = untilDate.getValue(); + } + LocalTime localFromT; + if (!fromTime.getText().equals("")) { + localFromT = LocalTime.parse(fromTime.getText(), dateTimeFormat).minusSeconds(1); + } else { + localFromT = null; + } + LocalTime localUntilT; + if (!untilTime.getText().equals("")) { + localUntilT = LocalTime.parse(untilTime.getText(), dateTimeFormat).plusMinutes(1); + } else { + localUntilT = null; + } + String localComments = searchComments.getText(); + if (!(localTbl.isEmpty() && localName.isEmpty() && localComments.isEmpty())) { + ArrayList<Order> searchDisplay = new ArrayList<Order>(displayList); + // Filter for table search value + if (!localTbl.equals("Any")) { + searchDisplay = (ArrayList<Order>) searchDisplay.stream() + .filter(result -> result.getSrcTbl().equals(localTbl)) + .collect(Collectors.toList()); + } + // Filter for order search value + if (!localName.isEmpty()) { + searchDisplay = (ArrayList<Order>) searchDisplay.stream() + .filter(result -> result.getName().equals(localName)) + .collect(Collectors.toList()); + } + // Filter for date intervals + if (!(localFromD == null || localUntilD == null)) { + searchDisplay = (ArrayList<Order>) searchDisplay + .stream().filter(result -> result.getDate().toInstant() + .atZone(ZoneId.systemDefault()).toLocalDate().isAfter(localFromD)) + .collect(Collectors.toList()); + searchDisplay = (ArrayList<Order>) searchDisplay + .stream().filter(result -> result.getDate().toInstant() + .atZone(ZoneId.systemDefault()).toLocalDate().isBefore(localUntilD)) + .collect(Collectors.toList()); + } + // Filter for time intervals + if (!(localFromT == null || localUntilT == null)) { + searchDisplay = (ArrayList<Order>) searchDisplay + .stream().filter(result -> result.getDate().toInstant() + .atZone(ZoneId.systemDefault()).toLocalTime().isAfter(localFromT)) + .collect(Collectors.toList()); + searchDisplay = (ArrayList<Order>) searchDisplay + .stream().filter(result -> result.getDate().toInstant() + .atZone(ZoneId.systemDefault()).toLocalTime().isBefore(localUntilT)) + .collect(Collectors.toList()); + } + // Filter for comments + if (!localComments.isEmpty()) { + searchDisplay = (ArrayList<Order>) searchDisplay.stream() + .filter(result -> result.getComment().equals(localComments)) + .collect(Collectors.toList()); + } + refreshSearch(searchInner, searchDisplay, searchInnerCol, selectedList); + } else { + invalidInputAlert(); + } + } + }); + grid.add(launchSearch, 5, 3); + + // Manager Import Export Section + grid.add(new Label("Import orders to order list"), 2, 5); + Button importOrders = new Button("Import Orders"); + importOrders.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent exporter) { + fileChooser.setTitle("Open Resource File"); + // Set extension filter + FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter("Text delimited files", + "*.txt", "*.csv"); + fileChooser.getExtensionFilters().add(extFilter); + // Using login button simply because showOpenDialog + // requires a stage input + file = fileChooser.showOpenDialog(login.getScene().getWindow()); + if (file != null) { + BufferedReader csvReader = null; + String line = ""; + String delimiter = ","; + try { + csvReader = new BufferedReader(new FileReader(file)); + while ((line = csvReader.readLine()) != null) { + String[] orderProperties = line.split(delimiter); + String impName = orderProperties[0]; + Double impPrice = Double.parseDouble(orderProperties[1]); + int impQnty = Integer.parseInt(orderProperties[2]); + String impTbl = orderProperties[3]; + Double impTotal = Double.parseDouble(orderProperties[4]); + String impComment = orderProperties[5]; + Date impDate = dateFormat.parse(orderProperties[6]); + Order impOrder = new Order(impName, impPrice, impQnty, impTbl, impComment, impDate); + + orderLog.add(impOrder); + displayList.add(0, impOrder); + } + refreshSearch(searchInner, displayList, searchInnerCol, selectedList); + Alert alert = new Alert(AlertType.INFORMATION); + alert.setTitle("Import Success"); + alert.setHeaderText("Import Success"); + alert.setContentText("Orders successfully imported!"); + alert.showAndWait(); + userLogger.log(Level.FINE, currentUser.getUserName() + + " imported order from an external list to order log."); + } catch (IOException e) { + invalidInputAlert(); + } catch (ParseException p) { + invalidInputAlert(); + } catch (Exception ex) { + Alert alert = new Alert(AlertType.ERROR); + alert.setTitle("Import Error"); + alert.setHeaderText("Import Error"); + alert.setContentText( + "Import failed. Check if file content has the appropriate format. If yes and the error remains, consult the error log."); + alert.showAndWait(); + logger.log(Level.WARNING, "Import failed due to " + ex); + } finally { + + if (csvReader != null) { + try { + csvReader.close(); + } catch (IOException ex) { + logger.log(Level.SEVERE, "" + ex); + } + } + } + } + } + }); + + grid.add(importOrders, 2, 6); + grid.add(new Label("Export selected orders as CSV"), 5, 5); + Button exportOrders = new Button("Export Orders"); + exportOrders.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent exporter) { + if (selectedList.size() > 0) { + // Call toCsvRow for every object in list and + // collect in String + String ordersAsCsv = selectedList.stream().map(Order::toCsvRow) + .collect(Collectors.joining(System.getProperty("line.separator"))); + FileWriter csvFw = null; + BufferedWriter csvWriter = null; + try { + csvFw = new FileWriter(csvPath); + csvWriter = new BufferedWriter(csvFw); + csvWriter.write(ordersAsCsv); + + Alert alert = new Alert(AlertType.INFORMATION); + alert.setTitle("Export success"); + alert.setHeaderText("Export success"); + alert.setContentText("Selected orders successfully exported!"); + + alert.showAndWait(); + + } catch (IOException ex) { + logger.log(Level.SEVERE, "" + ex); + } finally { + try { + if (csvWriter != null) + csvWriter.close(); + if (csvFw != null) + csvFw.close(); + } catch (IOException e) { + logger.log(Level.SEVERE, "" + e); + } + } + } else { + Alert alert = new Alert(AlertType.ERROR); + alert.setTitle("Invalid Selection"); + alert.setHeaderText("Invalid Selection"); + alert.setContentText("No selected orders registered. Please select orders to be exported."); + alert.showAndWait(); + } + } + }); + grid.add(exportOrders, 5, 6); + + ButtonType saveButton = new ButtonType("Done", ButtonData.OK_DONE); + dialog.getDialogPane().getButtonTypes().addAll(saveButton); + dialog.getDialogPane().setContent(grid); + Optional<ButtonType> result = dialog.showAndWait(); + if (result.isPresent() && result.get() == saveButton) { + try { + // Creates new order log + FileOutputStream fileOut = new FileOutputStream(orderLogPath); + ObjectOutputStream out = new ObjectOutputStream(fileOut); + out.writeObject(orderLog); + out.close(); + fileOut.close(); + } catch (IOException logX2) { + logger.log(Level.WARNING, "" + logX2); + } + } + } + }); + + vMenu.getChildren().addAll(allOrders, account); + + // Manager menu section, only available if user is admin type + if (currentUser.getUserRights()) { + vMenu.setPrefSize(vMenuWidth, paneHeight - vManagerHeight); + vManager = new VBox(15); + vManager.setPadding(new Insets(25)); + // vManager.setStyle("-fx-background-color: #a0522d;"); + vManager.setAlignment(Pos.TOP_CENTER); + vManager.setPrefSize(vMenuWidth, vManagerHeight - 10); + vManager.setLayoutY(paneHeight - vManagerHeight + 10); + + manageUsers = new Button("Manage Users"); + manageUsers.setPrefSize(btnWidth, btnHeight); + manageUsers.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent useravt) { + Dialog dialog = new Dialog(); + dialog.setTitle("Manage Users"); + dialog.setHeaderText("Choose any of the actions below"); + + GridPane grid = new GridPane(); + grid.setHgap(10); + grid.setVgap(10); + + TextField userName = new TextField(); + ObservableList<String> userTypes = FXCollections.observableArrayList("Standard", "Admin"); + + final ComboBox userSelect = new ComboBox(userTypes); + userSelect.getSelectionModel().selectFirst(); + + GridPane userInner = new GridPane(); + Format.innergrid(userInner); + int userInnerCol = 3; + for (int i = 0; i < userInnerCol; i++) { + ColumnConstraints column = new ColumnConstraints(100); + userInner.getColumnConstraints().add(column); + } + // ArrayList<User> localList = new + // ArrayList<User>(usersList); + refreshUsers(userInner, usersList); + ScrollPane userInnerScrl = new ScrollPane(); + userInnerScrl.setVbarPolicy(ScrollBarPolicy.ALWAYS); + userInnerScrl.setPrefHeight(150); + userInnerScrl.setContent(userInner); + + Button addUser = new Button("Add"); + addUser.setTooltip(new Tooltip("Default password for new user is empty")); + addUser.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent userat) { + if (userName.getText().equals("")) { + invalidInputAlert(); + } else { + String name = userName.getText(); + boolean doubleEntry = false; + // Check if user exists already + for (int j = 0; j < usersList.size(); j++) { + if (usersList.get(j).getUserName().equals(name)) { + doubleEntry = true; + Alert alert = new Alert(AlertType.ERROR); + alert.setTitle("Invalid Input Error"); + alert.setHeaderText("Double Entry Error"); + alert.setContentText("This user already exists! No new user created."); + alert.showAndWait(); + break; + } + } + if (!doubleEntry) { + boolean type; + if (userSelect.getValue().equals("Admin")) { + type = true; + } else { + type = false; + } + User user = new User(name, "", type); + usersList.add(user); + refreshUsers(userInner, usersList); + try { + FileOutputStream fileOut = new FileOutputStream(userPath); + ObjectOutputStream out = new ObjectOutputStream(fileOut); + out.writeObject(usersList); + userLogger.log(Level.FINE, "Added new user " + userName.getText() + " of type " + + userSelect.getValue() + " to the system."); + out.close(); + fileOut.close(); + } catch (IOException i) { + logger.log(Level.SEVERE, "" + i); + } + } + } + } + }); + + grid.add(new Label("User Name"), 0, 0); + grid.add(new Label("User Type"), 1, 0); + grid.add(userName, 0, 1); + grid.add(userSelect, 1, 1); + grid.add(addUser, 2, 1); + grid.add(new Label("Existing users"), 0, 2); + grid.add(userInnerScrl, 0, 3, 3, 1); + + ButtonType saveButton = new ButtonType("Done", ButtonData.OK_DONE); + dialog.getDialogPane().getButtonTypes().addAll(saveButton); + dialog.getDialogPane().setContent(grid); + dialog.showAndWait(); + } + }); + addMenubook = new Button("Menubook"); + addMenubook.setPrefSize(btnWidth, btnHeight); + addMenubook.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent at) { + Dialog dialog = new Dialog(); + dialog.setTitle("Menubook Manager"); + dialog.setHeaderText("Make changes to menubook and click save"); + + GridPane grid = new GridPane(); + grid.setHgap(10); + grid.setVgap(10); + + TextField mnuName = new TextField(); + TextField mnuPrice = new TextField(); + Button addMnu = new Button("Add"); + ArrayList<Order> localList = new ArrayList<Order>(menubook); + addMnu.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent a) { + if (mnuName.getText().equals("") || mnuPrice.getText().equals("")) { + invalidInputAlert(); + } else { + String name = mnuName.getText(); + boolean doubleEntry = false; + // Check if menu exists already + for (int j = 0; j < menubook.size(); j++) { + if (menubook.get(j).getName().equals(name)) { + doubleEntry = true; + Alert alert = new Alert(AlertType.ERROR); + alert.setTitle("Invalid Input Error"); + alert.setHeaderText("Double Entry Error"); + alert.setContentText( + "The item you entered already exists in the menubook. No new item entered."); + alert.showAndWait(); + break; + } + } + if (!doubleEntry) { + try { + // Check if price has more than 2 + // decimals + String numberText = mnuPrice.getText(); + int integerPlaces = numberText.indexOf('.'); + int decimalPlaces; + if (integerPlaces >= 0) { + decimalPlaces = numberText.length() - integerPlaces - 1; + } else { + decimalPlaces = 0; + } + // Check if price is an actual double + Double price = Double.parseDouble(mnuPrice.getText()); + if (price < 0 || decimalPlaces > 2) { + throw new NumberFormatException(); + } + Order newOrder = new Order(name, price); + localList.add(newOrder); + + // Overwrite existing menubook with + // changes + menubook.clear(); + for (int i = 0; i < localList.size(); i++) { + menubook.add(localList.get(i)); + } + // Serialize menubook + try { + FileOutputStream fileOut = new FileOutputStream(menuPath); + ObjectOutputStream out = new ObjectOutputStream(fileOut); + out.writeObject(menubook); + out.close(); + fileOut.close(); + userLogger.log(Level.FINE, + "Added new menu " + mnuName.getText() + " into the system."); + Alert alert = new Alert(AlertType.INFORMATION); + alert.setTitle("Order item added"); + alert.setHeaderText("Order item added"); + alert.setContentText( + "Order item has been successfully added into the menubook and can now be used."); + alert.showAndWait(); + } catch (IOException i) { + logger.log(Level.SEVERE, "" + i); + } + } catch (NumberFormatException n) { + invalidInputAlert(); + } + } + } + } + }); + + Button browseBtn = new Button("Check out existing menubook"); + browseBtn.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent browseat) { + Dialog dialog = new Dialog(); + dialog.setTitle("Menubook"); + dialog.setHeaderText("The following items are in the current menubook"); + + GridPane grid = new GridPane(); + grid.setHgap(10); + grid.setVgap(10); + + TextArea mnuArea = new TextArea(); + mnuArea.setEditable(false); + DecimalFormatSymbols formatSymbols = new DecimalFormatSymbols(Locale.ENGLISH); + DecimalFormat df = new DecimalFormat("##0.00", formatSymbols); + for (int i = 0; i < menubook.size(); i++) { + Order localOrder = menubook.get(i); + mnuArea.appendText("Name: " + localOrder.getName() + ", Price: " + + df.format(localOrder.getPrice()) + "\n"); + } + grid.add(mnuArea, 0, 1); + + ButtonType done = new ButtonType("Done", ButtonData.OK_DONE); + dialog.getDialogPane().getButtonTypes().addAll(done); + + dialog.getDialogPane().setContent(grid); + + Optional<ButtonType> result = dialog.showAndWait(); + } + }); + + grid.add(new Label("Menu Name"), 0, 0); + grid.add(new Label("Menu Price"), 1, 0); + grid.add(mnuName, 0, 1); + grid.add(mnuPrice, 1, 1); + grid.add(addMnu, 2, 1); + grid.add(browseBtn, 0, 2); + + // Set the button types. + ButtonType saveButton = new ButtonType("Done", ButtonData.OK_DONE); + dialog.getDialogPane().getButtonTypes().addAll(saveButton); + + dialog.getDialogPane().setContent(grid); + dialog.showAndWait(); + } + }); + + vManager.getChildren().addAll(manageUsers, addMenubook); + root.getChildren().add(vManager); + } + + // Main screen graphical section + tblPane = new Pane(); + tblPane.setPadding(new Insets(5)); + tblPane.setStyle("-fx-background-image: url('main_area.jpg');"); + // tblPane.setStyle("-fx-background-color: #d2b48c;"); + tblPane.setLayoutX(vMenuWidth + 10); + tblPane.setPrefSize(paneWidth - tblPane.getLayoutX(), paneHeight); + + boolean previousTables; + // Load currently occupied tables from currentTables, if any + try { + FileInputStream fileIn = new FileInputStream(tablePath); + ObjectInputStream in = new ObjectInputStream(fileIn); + currentTables = (ArrayList<Table>) in.readObject(); + in.close(); + fileIn.close(); + previousTables = true; + } catch (Exception x) { + previousTables = false; + } + + // if no previous tables exist, create dummy tables + // else load previous tables + // Format.table(Table lbl, String text, double posX, double posY, int + // width, int height) + if (previousTables) { + for (int i = 0; i < currentTables.size(); i++) { + lbl = currentTables.get(i); + String n = lbl.getName(); + double x = lbl.getX(), y = lbl.getY(); + Format.table(lbl, n, x, y, tblWidth, tblHeight); + handleTable(lbl); + tblPane.getChildren().add(lbl); + } + } + + double posX, posY = 20; + double mainPaneWidth = paneWidth - tblPane.getLayoutX(); + int tblPadding = 40; + int maxPosLine = 5; + int maxTbls = 15; + + for (int i = 0; i < maxTbls; i++) { + String check = "Table" + (i + 1); + boolean exists = false; + for (int j = 0; j < currentTables.size(); j++) { + if (currentTables.get(j).getName().equals(check)) { + exists = true; + break; + } + } + if (!exists) { + lbl = new Table("Table" + (i + 1)); + posX = (tblPadding + (i % maxPosLine) * (tblWidth + tblPadding)); + posY = tblPadding + (i / maxPosLine) * (tblPadding + tblHeight + tblPadding); + Format.table(lbl, ("Table" + (i + 1)), posX, posY, tblWidth, tblHeight); + handleTable(lbl); + tblPane.getChildren().add(lbl); + } + } + + tblScrlPane = new ScrollPane(); + tblScrlPane.setLayoutX(vMenuWidth + 10); + tblScrlPane.setPrefSize(paneWidth - tblScrlPane.getLayoutX(), paneHeight); + tblScrlPane.setContent(tblPane); + root.getChildren().addAll(vMenu, tblScrlPane); + root.setStyle("-fx-background-image: url('main_area.jpg');"); + // create a new scene with root and set the stage + Scene scene = new Scene(root, paneWidth, paneHeight); + // Align center of scene with window center + Rectangle2D screenBounds = Screen.getPrimary().getVisualBounds(); + stage.setX((screenBounds.getWidth() - paneWidth) / 2); + stage.setY((screenBounds.getHeight() - paneHeight) / 2); + stage.setScene(scene); + stage.show(); + + // (De-)Serialize menubook + try { + FileInputStream fileIn = new FileInputStream(menuPath); + ObjectInputStream in = new ObjectInputStream(fileIn); + menubook = (ArrayList<Order>) in.readObject(); + in.close(); + fileIn.close(); + } catch (Exception x) { + Alert alert = new Alert(AlertType.WARNING); + alert.setTitle("Warning"); + alert.setHeaderText("No menubook available"); + alert.setContentText( + "No available menubook has been found. Load menu items or create menu items before using order functionalities."); + alert.showAndWait(); + } + + // (De-)Serialize order log + try { + FileInputStream fileIn = new FileInputStream(orderLogPath); + ObjectInputStream in = new ObjectInputStream(fileIn); + orderLog = (ArrayList<Order>) in.readObject(); + in.close(); + fileIn.close(); + } catch (Exception logX) { + logger.log(Level.INFO, "Order log created as no previous log found."); + try { + // Creates new order log + FileOutputStream fileOut = new FileOutputStream(orderLogPath); + ObjectOutputStream out = new ObjectOutputStream(fileOut); + out.writeObject(orderLog); + out.close(); + fileOut.close(); + } catch (IOException logX2) { + logger.log(Level.WARNING, "" + logX2); + } + } + // Confirm ending session and saving current Tables to a file + scene.getWindow().setOnCloseRequest(new EventHandler<WindowEvent>() { + public void handle(WindowEvent ev) { + Alert alert = new Alert(AlertType.CONFIRMATION); + alert.setTitle("Please confirm"); + alert.setHeaderText("Confirm end of session"); + alert.setContentText("Are you sure you want to log out?"); + + Optional<ButtonType> result = alert.showAndWait(); + if (result.get() == ButtonType.OK) { + if (!(currentTables.isEmpty())) { + serialize(currentTables); + } + try { + // Creates new order log + FileOutputStream fileOut = new FileOutputStream(orderLogPath); + ObjectOutputStream out = new ObjectOutputStream(fileOut); + out.writeObject(orderLog); + out.close(); + fileOut.close(); + } catch (IOException logX2) { + logger.log(Level.WARNING, "" + logX2); + } + userLogger.log(Level.FINE, currentUser.getUserName() + " has logged out."); + fhUser.close(); + fhLog.close(); + // Let Window Closer if OK + } else { + ev.consume(); + } + } + + }); + + } + + /** + * Add table handlers. + * + * @param lbl + * the lbl + */ + // Table constructor section + private void handleTable(Table lbl) { + lbl.setOnMousePressed(tablePressedHandler); + lbl.setOnMouseClicked(tableMenuHandler); + lbl.setTooltip(new Tooltip("Click on table to add order")); + } + + /** The current tables. */ + // Serialization section + private ArrayList<Table> currentTables = new ArrayList<Table>(); + + /** The table path. */ + private final String tablePath = "res/current_tables.ser"; + + /** + * Serialize. + * + * @param currentTables + * the current tables + */ + private void serialize(ArrayList<Table> currentTables) { + try { + FileOutputStream fileOut = new FileOutputStream(tablePath); + ObjectOutputStream out = new ObjectOutputStream(fileOut); + out.writeObject(currentTables); + out.close(); + fileOut.close(); + // Message box "Serialized data is saved in tablePath" + } catch (IOException i) { + logger.log(Level.SEVERE, "" + i); + } + } + + /** The src scene Y. */ + // Table icon movement section + double srcSceneX, srcSceneY; + + /** The src translate Y. */ + double srcTranslateX, srcTranslateY; + + /** The table pressed handler. */ + // get original data + EventHandler<MouseEvent> tablePressedHandler = new EventHandler<MouseEvent>() { + @Override + public void handle(MouseEvent evt) { + srcSceneX = evt.getSceneX(); + srcSceneY = evt.getSceneY(); + srcTranslateX = ((Table) evt.getSource()).getTranslateX(); + srcTranslateY = ((Table) evt.getSource()).getTranslateY(); + } + }; + + /** The table menu handler. */ + // Menu Adding Section + EventHandler<MouseEvent> tableMenuHandler = new EventHandler<MouseEvent>() { + public void handle(MouseEvent evt) { + if (evt.getButton().equals(MouseButton.PRIMARY)) { + + if (evt.getClickCount() == 1) { + Table selectedTbl = ((Table) evt.getSource()); + // Create the custom dialog. + Dialog dialog = new Dialog(); + dialog.setTitle("Table Menu"); + dialog.setHeaderText(selectedTbl.getText() + " Menu"); + + GridPane grid = new GridPane(); + grid.setHgap(10); + grid.setVgap(10); + + int rowNum = 0, lblRow = 0; + + // Num of people + TextField people = new TextField(); + people.setPromptText("Number of people"); + + // Innergrid to display ordered items + ArrayList<Order> localList = new ArrayList<Order>(selectedTbl.getOrders()); + // initializing innergrid before addPane so EventListener + // can refresh innergrid + GridPane innergrid = new GridPane(); + Format.innergrid(innergrid); + innergrid.setPrefWidth(600); + innergrid.setPadding(new Insets(0)); + // Setting columns width + String[] innerColumns = { "Menu Name", "Price", "Qnty", "Total", "Comments", "Time added", + "Cancel Order" }; + ColumnConstraints col1 = new ColumnConstraints(); + col1.setPercentWidth(25); + innergrid.getColumnConstraints().add(col1); + ColumnConstraints col2 = new ColumnConstraints(); + col2.setPercentWidth(5); + innergrid.getColumnConstraints().add(col2); + ColumnConstraints col3 = new ColumnConstraints(); + col3.setPercentWidth(5); + innergrid.getColumnConstraints().add(col3); + ColumnConstraints col4 = new ColumnConstraints(); + col4.setPercentWidth(10); + innergrid.getColumnConstraints().add(col4); + ColumnConstraints col5 = new ColumnConstraints(); + col5.setPercentWidth(20); + innergrid.getColumnConstraints().add(col5); + ColumnConstraints col6 = new ColumnConstraints(); + col6.setPercentWidth(20); + innergrid.getColumnConstraints().add(col6); + ColumnConstraints col7 = new ColumnConstraints(); + col7.setPercentWidth(15); + innergrid.getColumnConstraints().add(col7); + + // Populating columns + for (int i = 0; i < innerColumns.length; i++) { + Label menuLbl = new Label(innerColumns[i]); + innergrid.add(menuLbl, i, 0); + } + + // Put innergrid in ScrollPane + ScrollPane innerScrlPane = new ScrollPane(); + innerScrlPane.setVbarPolicy(ScrollBarPolicy.ALWAYS); + innerScrlPane.setPrefHeight(150); + innerScrlPane.setContent(innergrid); + + // Amount due + Label amount = new Label(); + + // Add Orders section + GridPane addPane = new GridPane(); + String[] addColumns = { "Menu Name", "Quantity", "Comments", "Browse Menu", "Add Order" }; + // Populating columns + for (int i = 0; i < addColumns.length; i++) { + Label menuLbl = new Label(addColumns[i]); + addPane.add(menuLbl, i, 0); + } + addPane.prefWidth(600); + addPane.setHgap(10); + TextField addMenuName = new TextField(); + addMenuName.setPrefWidth(200); + addPane.add(addMenuName, 0, 1); + TextField addMenuQnty = new TextField(); + addMenuQnty.setText("1"); + addMenuQnty.setPrefWidth(40); + addPane.add(addMenuQnty, 1, 1); + TextField addMenuComment = new TextField(); + addMenuComment.setPrefWidth(150); + addPane.add(addMenuComment, 2, 1); + Button addBrowseBtn = new Button("Browse"); + addBrowseBtn.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent browseat) { + Dialog dialog = new Dialog(); + dialog.setTitle("Menubook"); + dialog.setHeaderText("The following items are in the current menubook"); + + GridPane grid = new GridPane(); + grid.setHgap(10); + grid.setVgap(10); + + TextArea mnuArea = new TextArea(); + mnuArea.setEditable(false); + for (int i = 0; i < menubook.size(); i++) { + Order localOrder = menubook.get(i); + mnuArea.appendText( + "Name: " + localOrder.getName() + ", Price: " + localOrder.getPrice() + "\n"); + } + grid.add(mnuArea, 0, 1); + + ButtonType done = new ButtonType("Done", ButtonData.OK_DONE); + dialog.getDialogPane().getButtonTypes().addAll(done); + + dialog.getDialogPane().setContent(grid); + + Optional<ButtonType> result = dialog.showAndWait(); + } + }); + addBrowseBtn.setPrefWidth(80); + addPane.add(addBrowseBtn, 3, 1); + Button addMenuBtn = new Button("Add Menu"); + addMenuBtn.setPrefWidth(80); + addMenuBtn.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent at) { + if (addMenuName.getText().equals("") || addMenuQnty.getText().equals("")) { + invalidInputAlert(); + } else { + // Match text of menubook with entered text, add + // order if match + String mnuName = addMenuName.getText(); + boolean matchFound = false; + for (int i = 0; i < menubook.size(); i++) { + if (mnuName.equals(menubook.get(i).getName())) { + try { + int qnty = Integer.parseInt(addMenuQnty.getText()); + if (qnty < 0) { + throw new NumberFormatException(); + } + String cmt = addMenuComment.getText(); + String srcTbl = selectedTbl.getName(); + Order tblOrder = new Order(menubook.get(i), qnty, cmt, srcTbl); + localList.add(tblOrder); + matchFound = true; + refreshOrders(innergrid, localList, innerColumns, amount); + } catch (NumberFormatException n) { + break; + } + break; + } + } + if (!matchFound) { + invalidInputAlert(); + } + } + } + }); + addPane.add(addMenuBtn, 4, 1); + + // Order List + // Loops through each order at table and fills label with + // each order information + refreshOrders(innergrid, localList, innerColumns, amount); + + Separator separator1 = new Separator(); + + grid.add(new Label("Number of people: "), 0, lblRow++); + grid.add(people, 1, rowNum++); + grid.add(new Label("Add orders: "), 0, lblRow++); + grid.add(addPane, 1, rowNum++); + grid.add(new Label("Current orders: "), 0, lblRow++); + grid.add(innerScrlPane, 1, rowNum++); + lblRow++; + grid.add(separator1, 1, rowNum++); + grid.add(new Label("Total Amount Due"), 0, lblRow++); + grid.add(amount, 1, rowNum); + + // If table exists already, load text information + if (currentTables.contains(selectedTbl)) { + int srcIndex = currentTables.indexOf(selectedTbl); + Table srcTable = currentTables.get(srcIndex); + people.setText(srcTable.getPeople()); + } + + // Set the button types. + ButtonType saveButton = new ButtonType("Save", ButtonData.OK_DONE); + ButtonType bill = new ButtonType("Pay", ButtonData.OK_DONE); + dialog.getDialogPane().getButtonTypes().addAll(saveButton, bill, ButtonType.CANCEL); + dialog.getDialogPane().setContent(grid); + Optional<ButtonType> result = dialog.showAndWait(); + if (result.get() == saveButton) { + // Update Table order list + selectedTbl.setOrders(localList); + // If table exists already, override existing table + if (currentTables.contains(selectedTbl)) { + currentTables.remove(selectedTbl); + } + selectedTbl.setPeople(people.getText()); + currentTables.add(selectedTbl); + userLogger.log(Level.FINE, "Saved changes made at " + selectedTbl.getName()); + + } else if (result.get() == bill) { + for (int i = 0; i < localList.size(); i++) { + orderLog.add(localList.get(i)); + } + selectedTbl.clear(); + currentTables.remove(selectedTbl); + userLogger.log(Level.FINE, "Received payment of table. Orders logged and table cleared."); + } + } + } + } + }; + + /** + * Refresh users. + * + * @param innergrid + * the innergrid + * @param userList + * the user list + */ + private void refreshUsers(GridPane innergrid, ArrayList<User> userList) { + innergrid.getChildren().clear(); + String[] labels = { "Username", "Type", "Activity", "Options" }; + for (int i = 0; i < labels.length; i++) { + Label lbl = new Label(labels[i]); + innergrid.add(lbl, i, 0); + } + for (int i = 1; i <= userList.size(); i++) { + User u = userList.get(i - 1); + String uName = u.getUserName(); + boolean uAdmin = u.getUserRights(); + Label usName = new Label(); + usName.setText(uName); + innergrid.add(usName, 0, i); + Label usType = new Label(); + if (uAdmin) { + usType.setText("Admin"); + } else { + usType.setText("Standard"); + } + innergrid.add(usType, 1, i); + Button viewLog = new Button("View Log"); + viewLog.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent view) { + Dialog dialog = new Dialog(); + dialog.setTitle("User Activity log"); + dialog.setHeaderText("Selected activity log"); + + GridPane grid = new GridPane(); + grid.setHgap(10); + grid.setVgap(10); + + TextArea logArea = new TextArea(); + logArea.setEditable(false); + grid.add(logArea, 0, 1); + int row = innergrid.getRowIndex((Button) view.getSource()); + Label toView = (Label) getNodeByIndex(innergrid, 0, row); + String localPath = ("res/" + toView.getText() + "_activity.log"); + try { + Scanner fileIn = new Scanner(new File(localPath)); + while (fileIn.hasNextLine()) { + logArea.appendText(fileIn.nextLine() + "\n"); + } + fileIn.close(); + } catch (IOException i) { + logger.log(Level.WARNING, + "No activity log for user has been found. User might have deleted his/her log or has never logged in. \n Opening activity log failed due to: \n " + + i); + } + + ButtonType done = new ButtonType("Done", ButtonData.OK_DONE); + dialog.getDialogPane().getButtonTypes().addAll(done); + + dialog.getDialogPane().setContent(grid); + + Optional<ButtonType> result = dialog.showAndWait(); + } + }); + innergrid.add(viewLog, 2, i); + // Disable delete button for root admin (the first user) + if (i > 1) { + Button deleteUser = new Button("Delete"); + deleteUser.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent userdlt) { + // Confirm before deletion of user + Alert alert = new Alert(AlertType.CONFIRMATION); + alert.setTitle("Confirm User Deletion"); + alert.setHeaderText("Confirm User Deletion"); + alert.setContentText("Are you sure you want to delete this user?"); + + Optional<ButtonType> result = alert.showAndWait(); + if (result.get() == ButtonType.OK) { + @SuppressWarnings("static-access") + int row = innergrid.getRowIndex((Button) userdlt.getSource()); + Label toDelete = (Label) getNodeByIndex(innergrid, 0, row); + String toDeleteName = toDelete.getText(); + for (int n = 0; n < userList.size(); n++) { + String userName = userList.get(n).getUserName(); + if (userName.equals(toDeleteName)) { + userList.remove(n); + userLogger.log(Level.FINE, toDeleteName + " has been deleted from the system."); + break; + } + } + refreshUsers(innergrid, userList); + } + } + }); + innergrid.add(deleteUser, 3, i); + } + } + } + + /** + * Refresh search. + * + * @param innergrid + * the innergrid + * @param ordersList + * the orders list + * @param labels + * the labels + * @param selectedList + * the selected list + */ + private void refreshSearch(GridPane innergrid, ArrayList<Order> ordersList, String[] labels, + ArrayList<Order> selectedList) { + innergrid.getChildren().clear(); + for (int i = 0; i < labels.length; i++) { + Label menuLbl = new Label(labels[i]); + innergrid.add(menuLbl, i, 0); + } + // { "Table No.", "Order Name", "Price", "Quantity", "Total", "Order + // Datetime", "Comments" } + DecimalFormatSymbols formatSymbols = new DecimalFormatSymbols(Locale.ENGLISH); + DecimalFormat df = new DecimalFormat("##0.00", formatSymbols); + for (int i = 1; i <= ordersList.size(); i++) { + int localCol = 0; + Order mn = ordersList.get(i - 1); + String mnTbl = mn.getSrcTbl(); + String mnName = mn.getName(); + Double mnPrice = mn.getPrice(); + int mnQnty = mn.getQnty(); + Date mnDate = mn.getDate(); + String mnComment = mn.getComment(); + Label menuTbl = new Label(); + menuTbl.setText(mnTbl); + innergrid.add(menuTbl, localCol++, i); + Label menuName = new Label(); + menuName.setText(mnName); + innergrid.add(menuName, localCol++, i); + Label price = new Label(); + price.setText("" + df.format(mnPrice)); + innergrid.add(price, localCol++, i); + Label qnty = new Label(); + qnty.setText("" + mnQnty); + innergrid.add(qnty, localCol++, i); + Label lineTotal = new Label(); + lineTotal.setText("" + df.format(mnPrice * mnQnty)); + innergrid.add(lineTotal, localCol++, i); + Label timeAdded = new Label(); + timeAdded.setText(dateFormat.format(mnDate)); + innergrid.add(timeAdded, localCol++, i); + Label menuComment = new Label(); + menuComment.setText(mnComment); + innergrid.add(menuComment, localCol++, i); + } + if (currentUser.getUserRights()) { + Label menuLbl = new Label("Select"); + innergrid.add(menuLbl, labels.length, 0); + for (int i = 1; i <= ordersList.size(); i++) { + CheckBox checkBox = new CheckBox(); + checkBox.selectedProperty().addListener(new ChangeListener<Boolean>() { + public void changed(ObservableValue<? extends Boolean> ov, Boolean old_val, Boolean new_val) { + // gets row of checkbox selected + int row = innergrid.getRowIndex(checkBox); + int cols = labels.length; + Node[] toExportNodes = getRowNodesByIndex(innergrid, row, cols); + String[] toExport = new String[toExportNodes.length]; + for (int j = 0; j < toExportNodes.length; j++) { + Label l = (Label) toExportNodes[j]; + String s = l.getText(); + toExport[j] = s; + } + // Create new order here + try { + String expTbl = toExport[0]; + String expName = toExport[1]; + Double expPrice = Double.parseDouble(toExport[2]); + int expQnty = Integer.parseInt(toExport[3]); + Date expDate = dateFormat.parse(toExport[5]); + String expComment = toExport[6]; + Order expOrder = new Order(expName, expPrice, expQnty, expTbl, expComment, expDate); + selectedList.add(expOrder); + } catch (ParseException p) { + logger.log(Level.SEVERE, "" + p); + } + checkBox.setDisable(true); + } + }); + innergrid.add(checkBox, 7, i); + } + } + } + + /** + * Refresh orders. + * + * @param innergrid + * the innergrid + * @param ordersList + * the orders list + * @param labels + * the labels + * @param amount + * the amount + */ + private void refreshOrders(GridPane innergrid, ArrayList<Order> ordersList, String[] labels, Label amount) { + innergrid.getChildren().clear(); + double netAmount = 0.0; + // Recreating labels + for (int i = 0; i < labels.length; i++) { + Label menuLbl = new Label(labels[i]); + innergrid.add(menuLbl, i, 0); + } + DecimalFormatSymbols formatSymbols = new DecimalFormatSymbols(Locale.ENGLISH); + DecimalFormat df = new DecimalFormat("##0.00", formatSymbols); + for (int i = 1; i <= ordersList.size(); i++) { + int localCol = 0; + Order mn = ordersList.get(i - 1); + String mnName = mn.getName(); + Double mnPrice = mn.getPrice(); + int mnQnty = mn.getQnty(); + Date mnDate = mn.getDate(); + String mnComment = mn.getComment(); + Label menuName = new Label(); + menuName.setText(mnName); + innergrid.add(menuName, localCol++, i); + Label price = new Label(); + price.setText("" + df.format(mnPrice)); + innergrid.add(price, localCol++, i); + Label qnty = new Label(); + qnty.setText("" + mnQnty); + innergrid.add(qnty, localCol++, i); + Label lineTotal = new Label(); + lineTotal.setText("" + df.format(mnPrice * mnQnty)); + innergrid.add(lineTotal, localCol++, i); + Label menuComment = new Label(); + menuComment.setText(mnComment); + innergrid.add(menuComment, localCol++, i); + Label timeAdded = new Label(); + timeAdded.setText(dateFormat.format(mnDate)); + innergrid.add(timeAdded, localCol++, i); + Button deleteOrder = new Button("Delete Order"); + deleteOrder.setOnAction(new EventHandler<ActionEvent>() { + @Override + public void handle(ActionEvent avt) { + // Confirm before deletion of order + Alert alert = new Alert(AlertType.CONFIRMATION); + alert.setTitle("Confirm Order Deletion"); + alert.setHeaderText("Confirm Order Deletion"); + alert.setContentText("Are you sure you want to delete this order?"); + + Optional<ButtonType> result = alert.showAndWait(); + if (result.get() == ButtonType.OK) { + @SuppressWarnings("static-access") + int row = innergrid.getRowIndex((Button) avt.getSource()); + Label toDelete = (Label) getNodeByIndex(innergrid, 0, row); + String toDeleteName = toDelete.getText(); + for (int n = 0; n < ordersList.size(); n++) { + String orderName = ordersList.get(n).getName(); + if (orderName.equals(toDeleteName)) { + ordersList.remove(n); + break; + } + } + refreshOrders(innergrid, ordersList, labels, amount); + } + } + }); + innergrid.add(deleteOrder, localCol++, i); + netAmount += (mnPrice * mnQnty); + } + amount.setText("" + df.format(netAmount)); + } + + /** + * Gets the node by index. + * + * @param grid + * the grid + * @param col + * the col + * @param row + * the row + * @return the node by index + */ + private Node getNodeByIndex(GridPane grid, int col, int row) { + for (Node node : grid.getChildren()) { + if (GridPane.getColumnIndex(node) == col && GridPane.getRowIndex(node) == row) { + return node; + } + } + return null; + } + + /** + * Gets the row nodes by index. + * + * @param grid + * the grid + * @param row + * the row + * @param colNum + * the col num + * @return the row nodes by index + */ + private Node[] getRowNodesByIndex(GridPane grid, int row, int colNum) { + Node[] nodes = new Node[colNum]; + int colCount = 0; + for (Node node : grid.getChildren()) { + if (GridPane.getColumnIndex(node) == colCount && GridPane.getRowIndex(node) == row) { + nodes[colCount] = node; + colCount++; + } + if (colCount == colNum) { + return nodes; + } + } + return null; + } + + /** + * Invalid input alert. + */ + private void invalidInputAlert() { + Alert alert = new Alert(AlertType.ERROR); + alert.setTitle("Invalid Input"); + alert.setHeaderText("Invalid Input"); + alert.setContentText("Please enter a valid item. Fields cannot be all empty."); + alert.showAndWait(); + } +} diff --git a/Billing-system/src/billingsystem/Order.java b/Billing-system/src/billingsystem/Order.java new file mode 100644 index 00000000..d3277932 --- /dev/null +++ b/Billing-system/src/billingsystem/Order.java @@ -0,0 +1,170 @@ +package billingsystem; + +import java.io.Serializable; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * + * @author Jason Li + * @version 1.0 + * @since 19.12.2016 + * + * + * + * The Class Order. + */ +public class Order implements Serializable { + + /** The name. */ + private String name; + + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return name; + } + + /** + * Sets the name. + * + * @param name2 the new name + */ + public void setName(String name2) { + this.name = name2; + } + + /** The price. */ + private double price; + + /** + * Gets the price. + * + * @return the price + */ + public double getPrice() { + return price; + } + + /** + * Sets the price. + * + * @param price2 the new price + */ + public void setPrice(double price2) { + this.price = price2; + } + + /** The quantity. */ + private int quantity; + + /** + * Gets the order quantity. + * + * @return the order quantity + */ + public int getQnty() { + return quantity; + } + + /** The date. */ + private Date date; + + /** + * Gets the date. + * + * @return the date + */ + public Date getDate() { + return date; + } + + /** The comment. */ + private String comment; + + /** + * Gets the comment. + * + * @return the comment + */ + public String getComment() { + return comment; + } + + /** The source table. */ + private String sourceTable; + + /** + * Gets the source table. + * + * @return the source table + */ + public String getSrcTbl() { + return sourceTable; + } + + /** + * Return each order as a comma delimited row for csv output. + * + * @return the string + */ + public String toCsvRow() { + DateFormat dateFormat = new SimpleDateFormat("HH:mm dd/MM/yyyy"); + return Stream.of(name, ("" + price), ("" + quantity), ("" + sourceTable), ("" + price*quantity), comment, ("" + dateFormat.format(date))) + .collect(Collectors.joining(",")); + } + + /** + * Instantiates a new order. + * + * @param copyOrder the copy order + * @param qnty the order quantity + * @param comment the comment + * @param sourceTable the source table + */ + public Order(Order copyOrder, int qnty, String comment, String sourceTable) { + this.name = copyOrder.name; + this.price = copyOrder.price; + this.quantity = qnty; + this.comment = comment; + this.sourceTable = sourceTable; + this.date = new Date(); + } + + /** + * Instantiates a new order. + * + * @param name the name + * @param price the price + */ + public Order(String name, double price) { + this.name = name; + this.price = price; + } + + + /** + * Instantiates a new order. + * + * @param name the name + * @param price the price + * @param qnty the qnty + * @param srcTable the src table + * @param comment the comment + * @param date the date + */ + public Order(String name, double price, int qnty, String srcTable, String comment, Date date) { + this.name = name; + this.price = price; + this.quantity = qnty; + this.comment = comment; + this.sourceTable = srcTable; + this.date = date; + } +} diff --git a/Billing-system/src/billingsystem/Table.java b/Billing-system/src/billingsystem/Table.java new file mode 100644 index 00000000..bcfeeb88 --- /dev/null +++ b/Billing-system/src/billingsystem/Table.java @@ -0,0 +1,145 @@ +package billingsystem; + +import java.util.ArrayList; + +import javafx.scene.control.Label; + +/** + * + * @author Jason Li + * @version 1.0 + * @since 19.12.2016 + * + * + * + * The Class Table. + */ +public class Table extends Label implements java.io.Serializable { + + /** The tbl name. */ + private String tblName; + + /** The people. */ + private String people; + + /** The orders. */ + ArrayList<Order> orders = new ArrayList<Order>(); + + /** The pos X. */ + private double posX; + + /** The pos Y. */ + private double posY; + + /** + * Gets the name. + * + * @return the name + */ + public String getName() { + return tblName; + } + + /** + * Gets the orders. + * + * @return the orders + */ + public ArrayList<Order> getOrders() { + return orders; + } + + /** + * Set new X and Y. + * + * @param x the x-position + * @param y the y-position + */ + public void setXY(double x, double y) { + this.posX = x; + this.posY = y; + } + + /** + * Gets the x-position. + * + * @return the x + */ + public double getX() { + return posX; + } + + /** + * Gets the y-position. + * + * @return the y + */ + public double getY() { + return posY; + } + + /** + * Sets the number of people at the table. + * + * @param people - Number of people + */ + public void setPeople(String people) { + this.people = people; + } + + /** + * Gets the number of people at the table. + * + * @return people - Number of people + */ + public String getPeople() { + return people; + } + + /** + * Adds the order. + * + * @param order item the order item + */ + public void addOrder(Order orderItem) { + orders.add(orderItem); + } + + /** + * Sets the orders. + * + * @param set new orders + */ + public void setOrders(ArrayList<Order> setOrders) { + this.orders = setOrders; + } + + /** + * Clear table + */ + public void clear() { + this.people = ""; + this.orders.clear();; + } + + /** + * Instantiates a new table. + * + * @param tblName the table name + */ + public Table(String tblName) { + this.tblName = tblName; + } + + /** + * Instantiates a new table. + * + * @param copyTable - the table to copy + */ + public Table(Table copyTable) { + this.tblName = copyTable.tblName; + this.posX = copyTable.posX; + this.posY = copyTable.posY; + } + +} diff --git a/Billing-system/src/billingsystem/User.java b/Billing-system/src/billingsystem/User.java new file mode 100644 index 00000000..dd0d6c5d --- /dev/null +++ b/Billing-system/src/billingsystem/User.java @@ -0,0 +1,80 @@ +/* + * + */ +package billingsystem; + +import java.io.Serializable; + +/** + * + * + * + * @author Jason Li + * @version 1.0 + * @since 19.12.2016 + * + * + * + * The Class User. + */ +@SuppressWarnings("serial") +public class User implements Serializable { + + /** The user name. */ + private String userName; + + /** The password. */ + private String password; + + /** The admin rights. */ + private boolean adminRights; + + /** + * Instantiates a new user. + * + * @param userName the user name + * @param password the password + * @param adminRights the admin rights + */ + public User(String userName, String password, boolean adminRights) { + this.userName = userName; + this.password = password; + this.adminRights = adminRights; + } + + /** + * Gets the user name. + * + * @return the user name + */ + public String getUserName() { + return userName; + } + + /** + * Gets the user password. + * + * @return the user password + */ + public String getUserPassword() { + return password; + } + + /** + * Sets the password. + * + * @param password the new password + */ + public void setPassword(String password) { + this.password = password; + } + + /** + * Gets the user rights. + * + * @return the user rights + */ + public boolean getUserRights() { + return adminRights; + } +} diff --git a/Billing-system/src/billingsystem/login.css b/Billing-system/src/billingsystem/login.css new file mode 100644 index 00000000..537feecb --- /dev/null +++ b/Billing-system/src/billingsystem/login.css @@ -0,0 +1,3 @@ +#pane { + -fx-background-image:url('login.jpg'); +} \ No newline at end of file diff --git a/Billing-system/src/billingsystem/login.jpg b/Billing-system/src/billingsystem/login.jpg new file mode 100644 index 00000000..7d2fe852 Binary files /dev/null and b/Billing-system/src/billingsystem/login.jpg differ diff --git a/Billing-system/src/systemstyle/Format.java b/Billing-system/src/systemstyle/Format.java new file mode 100644 index 00000000..9834720b --- /dev/null +++ b/Billing-system/src/systemstyle/Format.java @@ -0,0 +1,48 @@ +package systemstyle; + +import billingsystem.Table; +import javafx.event.EventHandler; +import javafx.geometry.Insets; +import javafx.geometry.Pos; +import javafx.scene.Cursor; +import javafx.scene.input.MouseEvent; +import javafx.scene.layout.GridPane; + +/** + * The Class Format manages the styling of the system. + */ +public class Format { + + /** + * Formats the innergrid. + * + * @param innergrid the inner gridpane + */ + public static void innergrid(GridPane innergrid) { + innergrid.setVgap(10); + innergrid.setMinHeight(150); + innergrid.setStyle("-fx-border-color: #A9A9A9;"); + innergrid.setPadding(new Insets(10)); + } + + /** + * Formats the table. + * + * @param lbl the table label + * @param text the table text + * @param posX the table x-position + * @param posY the table y-position + * @param width the table width + * @param height the table height + */ + public static void table(Table lbl, String text, double posX, double posY, int width, int height) { + lbl.setText(text); + lbl.setLayoutX(posX); + lbl.setLayoutY(posY); + lbl.setXY(posX, posY); + lbl.setAlignment(Pos.CENTER); + lbl.setPrefSize(width, height); + lbl.setStyle("-fx-background-color: #3F250B; -fx-text-fill: a9a9a9; -fx-font-weight: bold;"); + lbl.setCursor(Cursor.HAND); + } +} diff --git a/BinaryDecimalConverto/convertor.java b/BinaryDecimalConverto/convertor.java new file mode 100644 index 00000000..21522b61 --- /dev/null +++ b/BinaryDecimalConverto/convertor.java @@ -0,0 +1,33 @@ +import java.util.Scanner; + +public class BinaryDecimalConverter { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + System.out.println("Binary to Decimal and Decimal to Binary Converter"); + System.out.print("Enter 1 to convert Binary to Decimal or 2 to convert Decimal to Binary: "); + int choice = scanner.nextInt(); + + if (choice == 1) { + System.out.print("Enter a binary number: "); + String binaryInput = scanner.next(); + int decimalResult = binaryToDecimal(binaryInput); + System.out.println("Decimal result: " + decimalResult); + } else if (choice == 2) { + System.out.print("Enter a decimal number: "); + int decimalInput = scanner.nextInt(); + String binaryResult = decimalToBinary(decimalInput); + System.out.println("Binary result: " + binaryResult); + } else { + System.out.println("Invalid choice. Please enter 1 for Binary to Decimal or 2 for Decimal to Binary."); + } + } + + public static int binaryToDecimal(String binary) { + return Integer.parseInt(binary, 2); + } + + public static String decimalToBinary(int decimal) { + return Integer.toBinaryString(decimal); + } +} diff --git a/BinaryDecimalConverto/readme.md b/BinaryDecimalConverto/readme.md new file mode 100644 index 00000000..064806c7 --- /dev/null +++ b/BinaryDecimalConverto/readme.md @@ -0,0 +1,20 @@ +# Binary to Decimal and Decimal to Binary Converter + +This is a simple Java program that allows you to convert between Binary and Decimal numbers. + +## How to Use + +1. Compile and run `BinaryDecimalConverter.java`. +2. Choose option 1 to convert Binary to Decimal or option 2 to convert Decimal to Binary. +3. Follow the on-screen instructions to enter the number for conversion. + +## Features + +- Converts Binary to Decimal and Decimal to Binary. +- Simple command-line interface for ease of use. + +## Technologies Used + +- Java + +Feel free to modify the code or integrate it into other Java applications as needed. diff --git a/Binary_Search.java b/Binary_Search.java new file mode 100644 index 00000000..fbebca0c --- /dev/null +++ b/Binary_Search.java @@ -0,0 +1,40 @@ +public class Main{ + + public static int binarySearch(int array[], int left, int right, int item){ + + if (right >= left){ + + // calculation of new mid + int mid = left + (right - left)/2; + + // returns position where found + if (array[mid] == item) + return mid+1; + + // goes to recursive calls in left half + if (array[mid] > item) + return binarySearch(array, left, mid-1, item); + + // goes to recursive calls in right half + else + return binarySearch(array, mid+1, right, item); + } + // if element is not found we return -1 + else + return -1; + } + public static void main(String args[]){ + + int[ ] array = {10, 20, 30, 40, 50, 60, 70, 80}; + int item = 70; + int size = array.length; + + int position = binarySearch(array, 0, size-1, item); + + if(position == -1) + System.out.println("Element not found"); + else + System.out.println("The value " + item + " found at position: " + position); + + } +} diff --git a/Bino.java b/Bino.java new file mode 100644 index 00000000..d2b8d9d3 --- /dev/null +++ b/Bino.java @@ -0,0 +1,52 @@ +import java.util.Scanner; + +class Bino { + int p, m, e, w; + int comb; + Scanner sc = new Scanner(System.in); + + Bino() { + p = 0; + m = 0; + } + + void input() { + System.out.println("Enter the first number (p): "); + p = sc.nextInt(); + System.out.println("Enter the second number (m): "); + m = sc.nextInt(); + System.out.println("Enter the highest power (w): "); + w = sc.nextInt(); + System.out.println("Enter the lowest power (e): "); + e = sc.nextInt(); + } + + int fact(int x) { + int s = 1; + for (int i = 1; i <= x; i++) { + s = s * i; + } + return s; + } + + int compute() { + int a = fact(p); + int b = fact(m); + int k = fact(p - m); + comb = a / (b * k); + return comb; + } + + void bmial() { + int d = compute(); + System.out.print(d + " * " + Math.pow(p, w) + " * " + Math.pow(m, e)); + w--; + e++; + } + + public static void main(String[] args) { + Bino ob = new Bino(); + ob.input(); + ob.bmial(); + } +} diff --git a/BlogBackend-main/README.md b/BlogBackend-main/README.md new file mode 100644 index 00000000..64d90883 --- /dev/null +++ b/BlogBackend-main/README.md @@ -0,0 +1 @@ +# BlogBackend diff --git a/BlogBackend-main/blog-api-com/images/68319588-f3d6-4a3c-9888-e4886d6ae896.jpg b/BlogBackend-main/blog-api-com/images/68319588-f3d6-4a3c-9888-e4886d6ae896.jpg new file mode 100644 index 00000000..c4b1ae33 Binary files /dev/null and b/BlogBackend-main/blog-api-com/images/68319588-f3d6-4a3c-9888-e4886d6ae896.jpg differ diff --git a/BlogBackend-main/blog-api-com/pom.xml b/BlogBackend-main/blog-api-com/pom.xml new file mode 100644 index 00000000..d8f75a46 --- /dev/null +++ b/BlogBackend-main/blog-api-com/pom.xml @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-parent</artifactId> + <version>2.7.1</version> + <relativePath /> <!-- lookup parent from repository --> + </parent> + <groupId>com.suraj.blog</groupId> + <artifactId>blogging-app-apis</artifactId> + <version>0.0.1-SNAPSHOT</version> + <name>demo</name> + <description>Backend api application</description> + <properties> + <java.version>11</java.version> + </properties> + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-devtools</artifactId> + <scope>runtime</scope> + <optional>true</optional> + </dependency> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <scope>runtime</scope> + </dependency> + <dependency> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <optional>true</optional> + </dependency> + <!-- https://mvnrepository.com/artifact/org.modelmapper/modelmapper --> + <dependency> + <groupId>org.modelmapper</groupId> + <artifactId>modelmapper</artifactId> + <version>3.1.0</version> + </dependency> + + <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-validation --> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-validation</artifactId> + </dependency> + + + + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <configuration> + <excludes> + <exclude> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + </exclude> + </excludes> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/BlogApplication.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/BlogApplication.java new file mode 100644 index 00000000..d7c49f11 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/BlogApplication.java @@ -0,0 +1,19 @@ +package com.suraj.blog; + +import org.modelmapper.ModelMapper; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + +@SpringBootApplication +public class BlogApplication { + + public static void main(String[] args) { + SpringApplication.run(BlogApplication.class, args); + } + + @Bean + public ModelMapper modelMapper() { + return new ModelMapper(); + } +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/config/AppConstant.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/config/AppConstant.java new file mode 100644 index 00000000..c204eeef --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/config/AppConstant.java @@ -0,0 +1,8 @@ +package com.suraj.blog.config; + +public class AppConstant { + public static final String PAGE_NUMBER = "0"; + public static final String PAGE_SIZE = "5"; + public static final String SORT_BY = "postId"; + public static final String SORT_DIR = "A"; +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/config/RestURIConstant.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/config/RestURIConstant.java new file mode 100644 index 00000000..a5db4e90 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/config/RestURIConstant.java @@ -0,0 +1,7 @@ +package com.suraj.blog.config; + + + +public class RestURIConstant { + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/CategoryController.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/CategoryController.java new file mode 100644 index 00000000..3f4cb747 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/CategoryController.java @@ -0,0 +1,62 @@ +package com.suraj.blog.controller; + +import java.util.List; + +import javax.validation.Valid; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.suraj.blog.payload.ApiResponse; +import com.suraj.blog.payload.CategoryDTO; +import com.suraj.blog.service.CategoryService; + +@RestController +@RequestMapping("/api/categories/") +public class CategoryController { + + @Autowired + private CategoryService categoryService; + + @PostMapping("/") + public ResponseEntity<CategoryDTO> createCategory(@Valid @RequestBody CategoryDTO categoryDTO) { + CategoryDTO newCategory = this.categoryService.createCategory(categoryDTO); + return new ResponseEntity<CategoryDTO>(newCategory, HttpStatus.CREATED); + } + + @PutMapping("/{catId}") + public ResponseEntity<CategoryDTO> updateCategory(@Valid @RequestBody CategoryDTO categoryDTO, + @PathVariable Integer catId) { + CategoryDTO newCategory = this.categoryService.updateCategory(categoryDTO, catId); + return new ResponseEntity<CategoryDTO>(newCategory, HttpStatus.OK); + } + + @DeleteMapping("/{catId}") + public ResponseEntity<ApiResponse> deleteCategory(@PathVariable Integer catId) { + this.categoryService.delterCategory(catId); + return new ResponseEntity<ApiResponse>(new ApiResponse("Category Deleted Successfully !!", true), + HttpStatus.OK); + } + + @GetMapping("/{catId}") + public ResponseEntity<CategoryDTO> getCategory(@PathVariable Integer catId) { + CategoryDTO category = this.categoryService.getCategory(catId); + return new ResponseEntity<CategoryDTO>(category, HttpStatus.OK); + } + + @GetMapping("/") + public ResponseEntity<List<CategoryDTO>> getAllCategory(){ + List<CategoryDTO> dtos = this.categoryService.getAllCategory(); + return new ResponseEntity<List<CategoryDTO>>(dtos, HttpStatus.OK); + } + + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/CommentController.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/CommentController.java new file mode 100644 index 00000000..2f775355 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/CommentController.java @@ -0,0 +1,34 @@ +package com.suraj.blog.controller; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.suraj.blog.payload.ApiResponse; +import com.suraj.blog.payload.CommentDto; +import com.suraj.blog.service.CommentService; + +@RestController +@RequestMapping("/api") +public class CommentController { + + @Autowired + private CommentService commentService ; + + @PostMapping("/post/{postId}/comments") + public ResponseEntity<CommentDto> createComment(@RequestBody CommentDto comment, @PathVariable Integer postId){ + CommentDto createdComment = this.commentService.createComment(comment, postId); + return new ResponseEntity<CommentDto>(createdComment, HttpStatus.CREATED); + } + + @DeleteMapping("/comments/{commentId}") + public ResponseEntity<ApiResponse> deleteComment(@PathVariable Integer commentId){ + this.commentService.deleteComment(commentId); + return new ResponseEntity<ApiResponse>(new ApiResponse("Comment Deleted Succesfully!", true), HttpStatus.OK); + } +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/PostContoller.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/PostContoller.java new file mode 100644 index 00000000..4bd4831b --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/PostContoller.java @@ -0,0 +1,129 @@ +package com.suraj.blog.controller; + +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + +import javax.servlet.http.HttpServletResponse; + +import org.hibernate.engine.jdbc.StreamUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.multipart.MultipartFile; + +import com.suraj.blog.config.AppConstant; +import com.suraj.blog.payload.ApiResponse; +import com.suraj.blog.payload.PostDto; +import com.suraj.blog.service.FileService; +import com.suraj.blog.service.PostService; + +@RestController +@RequestMapping("/api/") +public class PostContoller { + + @Autowired + private PostService postService; + + @Autowired + private FileService fileService; + + @Value("${project.image}") + private String path; + + @PostMapping("/user/{userId}/category/{categoryId}/posts") + public ResponseEntity<PostDto> createPost(@RequestBody PostDto postDto, @PathVariable Integer userId, + @PathVariable Integer categoryId) { + + PostDto createPost = this.postService.createPost(postDto, userId, categoryId); + return new ResponseEntity<PostDto>(createPost, HttpStatus.CREATED); + } + + @PutMapping("/user/{userId}/category/{categoryId}/posts") + public ResponseEntity<PostDto> updatePost(@RequestBody PostDto postDto, @PathVariable Integer postId) { + + PostDto updatePost = this.postService.updatePost(postDto, postId); + return new ResponseEntity<PostDto>(updatePost, HttpStatus.CREATED); + } + + @GetMapping("/user/{userId}/posts") + public ResponseEntity<List<PostDto>> getPostByUser(@PathVariable Integer userId) { + List<PostDto> posts = this.postService.getPostByUser(userId); + return new ResponseEntity<List<PostDto>>(posts, HttpStatus.OK); + } + + @GetMapping("/category/{categoryId}/posts") + public ResponseEntity<List<PostDto>> getPostByCategory(@PathVariable Integer categoryId) { + List<PostDto> posts = this.postService.getPostByCategory(categoryId); + return new ResponseEntity<List<PostDto>>(posts, HttpStatus.OK); + } + + @GetMapping("/posts/{postId}") + public ResponseEntity<PostDto> getPostById(@PathVariable Integer postId) { + PostDto post = this.postService.getPostById(postId); + return new ResponseEntity<PostDto>(post, HttpStatus.OK); + } + + @GetMapping("/posts") + public ResponseEntity<List<PostDto>> getAllPosts( + @RequestParam(value = "pageNumber", defaultValue = AppConstant.PAGE_NUMBER, required = false) Integer pageNumber, + @RequestParam(value = "pageSize", defaultValue = AppConstant.PAGE_SIZE, required = false ) Integer pageSize, + @RequestParam(value = "sortBy", defaultValue = AppConstant.SORT_BY , required = false)String sortBy, + @RequestParam(value = "sortDir", defaultValue = AppConstant.SORT_DIR, required = false) String sortDir) { + List<PostDto> posts = this.postService.getAllPost(pageNumber, pageSize, sortBy, sortDir); + return new ResponseEntity<>(posts, HttpStatus.OK); + } + + @DeleteMapping("/posts/{postId}") + public ResponseEntity<ApiResponse> deletePost(@PathVariable Integer postId) { + this.postService.deletePost(postId); + return new ResponseEntity<ApiResponse>(new ApiResponse("Post Deleted Successfully", true), HttpStatus.OK); + } + + + //search method + @GetMapping("/posts/search/{keyword}") + public ResponseEntity<List<PostDto>> searchPostByTitle(@PathVariable("keyword") String keyword){ + List<PostDto> posts = this.postService.searchPosts(keyword); + return new ResponseEntity<List<PostDto>>(posts, HttpStatus.OK); + } + + //post image upload + @PostMapping("/post/image/upload/{postId}") + public ResponseEntity<PostDto> uploadPostImage( + @RequestParam("image" )MultipartFile image , + @PathVariable Integer postId + ) throws IOException{ + + PostDto postDto = this.postService.getPostById(postId); + String fileName = this.fileService.uploadImage(path, image); + + postDto.setImageName(fileName); + PostDto updatedPost = this.postService.updatePost(postDto, postId); + return new ResponseEntity<PostDto>(updatedPost, HttpStatus.OK); + } + + + //method to serve file + @GetMapping(value = "post/image/{imageName}", produces = MediaType.IMAGE_JPEG_VALUE) + public void downloadImage( + @PathVariable("imageName")String imageName, + HttpServletResponse response) throws IOException{ + InputStream resourse = this.fileService.getResource(path, imageName); + response.setContentType(MediaType.IMAGE_JPEG_VALUE); + StreamUtils.copy(resourse, response.getOutputStream()); + } + + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/UserController.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/UserController.java new file mode 100644 index 00000000..c1960afa --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/controller/UserController.java @@ -0,0 +1,62 @@ +package com.suraj.blog.controller; + +import java.util.List; + +import javax.validation.Valid; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import com.suraj.blog.payload.ApiResponse; +import com.suraj.blog.payload.UserDTO; +import com.suraj.blog.service.UserService; + +@RestController +@RequestMapping("/api/users") +public class UserController { + + @Autowired + private UserService userService; + + @GetMapping("/") + public ResponseEntity<List<UserDTO>> getAllUsers(){ + return ResponseEntity.ok(this.userService.getAllUsers()); + } + + @GetMapping("/{userId}") + public ResponseEntity<UserDTO> getUser(@PathVariable Integer userId){ + return ResponseEntity.ok(this.userService.getUserById(userId)); + } + + @PostMapping("/") + public ResponseEntity<UserDTO> createUser(@Valid @RequestBody UserDTO userDto){ + UserDTO createdUser = this.userService.createUser(userDto); + return new ResponseEntity<>(createdUser, HttpStatus.CREATED); + } + + @PutMapping("/{userId}") + public ResponseEntity<UserDTO> updateUser(@Valid @RequestBody UserDTO userDTO, @PathVariable Integer userId){ + + UserDTO updatedUser = this.userService.updateUser(userDTO, userId); + + return ResponseEntity.ok(updatedUser); + } + + + @DeleteMapping("/{userId}") + public ResponseEntity<ApiResponse> deleteUser(@PathVariable Integer userId){ + this.userService.deleteUser(userId); + return new ResponseEntity(new ApiResponse("User Deleted Successfully", true) , HttpStatus.OK); + } + + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/CategoryRepo.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/CategoryRepo.java new file mode 100644 index 00000000..e0b03d64 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/CategoryRepo.java @@ -0,0 +1,9 @@ +package com.suraj.blog.dao; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.suraj.blog.entity.Category; + +public interface CategoryRepo extends JpaRepository<Category, Integer> { + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/CommentRepo.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/CommentRepo.java new file mode 100644 index 00000000..86952555 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/CommentRepo.java @@ -0,0 +1,9 @@ +package com.suraj.blog.dao; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.suraj.blog.entity.Comment; + +public interface CommentRepo extends JpaRepository<Comment, Integer>{ + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/PostRepo.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/PostRepo.java new file mode 100644 index 00000000..366293bc --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/PostRepo.java @@ -0,0 +1,17 @@ +package com.suraj.blog.dao; + +import java.util.List; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.suraj.blog.entity.Category; +import com.suraj.blog.entity.Post; +import com.suraj.blog.entity.User; + +public interface PostRepo extends JpaRepository<Post, Integer> { + List<Post> findByUser(User user); + + List<Post> findByCategory(Category category); + + List<Post> findByTitleContaining(String title); +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/UserRepo.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/UserRepo.java new file mode 100644 index 00000000..87efcfe9 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/dao/UserRepo.java @@ -0,0 +1,9 @@ +package com.suraj.blog.dao; + +import org.springframework.data.jpa.repository.JpaRepository; + +import com.suraj.blog.entity.User; + +public interface UserRepo extends JpaRepository<User, Integer> { + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/Category.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/Category.java new file mode 100644 index 00000000..d164d6f2 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/Category.java @@ -0,0 +1,38 @@ +package com.suraj.blog.entity; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Entity +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +public class Category { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer categoryId; + @Column(name = "title", length = 100, nullable =false) + private String categoryTitle; + @Column(name = "description") + private String categoryDescription; + + @OneToMany(mappedBy = "category" , cascade = CascadeType.ALL, fetch = FetchType.LAZY) + private List<Post> posts = new ArrayList<>(); + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/Comment.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/Comment.java new file mode 100644 index 00000000..27ed9663 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/Comment.java @@ -0,0 +1,33 @@ +package com.suraj.blog.entity; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.ManyToOne; +import javax.persistence.Table; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + + +@Entity +@Table(name = "comments") +@Getter +@Setter +@NoArgsConstructor +public class Comment { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private int id; + + private String content; + + @ManyToOne + private Post post; + + + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/Post.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/Post.java new file mode 100644 index 00000000..1f4a3225 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/Post.java @@ -0,0 +1,49 @@ +package com.suraj.blog.entity; + +import java.util.Date; +import java.util.HashSet; +import java.util.Set; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.OneToMany; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Entity +@Getter +@Setter +@NoArgsConstructor +public class Post { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer postId; + @Column(name="post_title", nullable = false, length = 100) + private String title; + + @Column(length = 10000) + private String content; + + private String imageName; + private Date addedDate; + + @ManyToOne + @JoinColumn(name = "categoryId") + private Category category; + + @ManyToOne + private User user; + + @OneToMany(mappedBy = "post", cascade = CascadeType.ALL) + private Set<Comment> comments = new HashSet<Comment>(); + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/User.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/User.java new file mode 100644 index 00000000..9c558d8a --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/entity/User.java @@ -0,0 +1,40 @@ +package com.suraj.blog.entity; + +import java.util.ArrayList; +import java.util.List; + +import javax.persistence.CascadeType; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.OneToMany; +import javax.persistence.Table; + + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Entity +@Table(name = "users") +@Getter +@Setter +@NoArgsConstructor +public class User { + + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private int id; + @Column(nullable = false, length =100) + private String name; + private String email; + private String password; + private String about; + + @OneToMany(mappedBy = "user" , cascade = CascadeType.ALL, fetch = FetchType.LAZY) + private List<Post> posts = new ArrayList<>(); + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/exceptions/GlobalExceptionHandler.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/exceptions/GlobalExceptionHandler.java new file mode 100644 index 00000000..1e859e46 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/exceptions/GlobalExceptionHandler.java @@ -0,0 +1,37 @@ +package com.suraj.blog.exceptions; + +import java.util.HashMap; +import java.util.Map; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.FieldError; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; + +import com.suraj.blog.payload.ApiResponse; + +@RestControllerAdvice +public class GlobalExceptionHandler { + + @ExceptionHandler(ResourceNotFoundException.class) + public ResponseEntity<ApiResponse> resourceNotFoundExHandler(ResourceNotFoundException ex){ + String message = ex.getMessage(); + ApiResponse apiResponse = new ApiResponse(message, false); + return new ResponseEntity<ApiResponse>(apiResponse, HttpStatus.NOT_FOUND); + } + + @ExceptionHandler(MethodArgumentNotValidException.class) + public ResponseEntity<Map<String, String>> methodArgsNotValidExHandler(MethodArgumentNotValidException ex){ + Map<String, String> response = new HashMap<>(); + + ex.getBindingResult().getAllErrors().forEach((error)-> { + String fieldName=((FieldError)error).getField(); + String message = error.getDefaultMessage(); + response.put(fieldName, message); + }); + + return new ResponseEntity<Map<String,String>>(response, HttpStatus.BAD_REQUEST); + } +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/exceptions/ResourceNotFoundException.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/exceptions/ResourceNotFoundException.java new file mode 100644 index 00000000..a59e72c9 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/exceptions/ResourceNotFoundException.java @@ -0,0 +1,21 @@ +package com.suraj.blog.exceptions; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class ResourceNotFoundException extends RuntimeException{ + + String resourceName; + String fieldName; + long fieldValue; + public ResourceNotFoundException(String resourceName, String fieldName, long fieldValue) { + super(String.format("%s not found with %s : %s", resourceName, fieldName, fieldValue)); + this.resourceName = resourceName; + this.fieldName = fieldName; + this.fieldValue = fieldValue; + } + + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/ApiResponse.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/ApiResponse.java new file mode 100644 index 00000000..b924e614 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/ApiResponse.java @@ -0,0 +1,15 @@ +package com.suraj.blog.payload; + +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +public class ApiResponse { + private String message; + private boolean success; +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/CategoryDTO.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/CategoryDTO.java new file mode 100644 index 00000000..32ee399f --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/CategoryDTO.java @@ -0,0 +1,23 @@ +package com.suraj.blog.payload; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@NoArgsConstructor +@Getter +@Setter +public class CategoryDTO { + + private Integer categoryId; + @NotBlank + @Size(min=4, message = "Title cannot be less than 4!!") + private String categoryTitle; + + @NotBlank + @Size(min = 10, message = "Description cannot be less than 10 characters !!!") + private String categoryDescription; +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/CommentDto.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/CommentDto.java new file mode 100644 index 00000000..79f15bee --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/CommentDto.java @@ -0,0 +1,13 @@ +package com.suraj.blog.payload; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class CommentDto { + + private int id; + + private String content; +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/PostDto.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/PostDto.java new file mode 100644 index 00000000..9e5f6caf --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/PostDto.java @@ -0,0 +1,26 @@ +package com.suraj.blog.payload; + +import java.util.HashSet; +import java.util.Set; + +import com.suraj.blog.entity.Comment; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@Getter +@Setter +@NoArgsConstructor +public class PostDto { + + private Integer postId; + private String title; + private String content; + private String imageName; + private String addedDate; + private CategoryDTO category; + private UserDTO user; + private Set<CommentDto> comments=new HashSet<>(); + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/UserDTO.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/UserDTO.java new file mode 100644 index 00000000..2c18b55b --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/payload/UserDTO.java @@ -0,0 +1,27 @@ +package com.suraj.blog.payload; + +import javax.validation.constraints.Email; +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +@NoArgsConstructor +@Getter +@Setter +public class UserDTO { + private int id; + @NotEmpty + @Size(min=4, message = "User name should be min of 4 characters !!") + private String name; + @Email(message = "Please enter valid Email address !!") + private String email; + @NotEmpty + @Size(min=8, max=20, message = "Please Enter password between 8 to 20 chracters !!") + private String password; + @NotEmpty + private String about; +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/CategoryService.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/CategoryService.java new file mode 100644 index 00000000..7e515501 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/CategoryService.java @@ -0,0 +1,20 @@ +package com.suraj.blog.service; + +import java.util.List; + +import com.suraj.blog.payload.CategoryDTO; + +public interface CategoryService { + + CategoryDTO createCategory(CategoryDTO categoryDTO); + + CategoryDTO updateCategory(CategoryDTO categoryDTO, Integer catId); + + void delterCategory(Integer categoryId); + + CategoryDTO getCategory(Integer categoryId); + + List<CategoryDTO> getAllCategory(); + + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/CommentService.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/CommentService.java new file mode 100644 index 00000000..88c86bf7 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/CommentService.java @@ -0,0 +1,10 @@ +package com.suraj.blog.service; + +import com.suraj.blog.payload.CommentDto; + +public interface CommentService { + + CommentDto createComment(CommentDto commentDto, Integer postId); + + void deleteComment(Integer commentId); +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/FileService.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/FileService.java new file mode 100644 index 00000000..e35c9bc8 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/FileService.java @@ -0,0 +1,14 @@ +package com.suraj.blog.service; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; + +import org.springframework.web.multipart.MultipartFile; + +public interface FileService { + + String uploadImage(String path, MultipartFile file) throws IOException; + + InputStream getResource(String path, String fileName) throws FileNotFoundException; +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/PostService.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/PostService.java new file mode 100644 index 00000000..00cef3af --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/PostService.java @@ -0,0 +1,25 @@ +package com.suraj.blog.service; + +import java.util.List; + +import com.suraj.blog.entity.Post; +import com.suraj.blog.payload.PostDto; + +public interface PostService { + + PostDto createPost(PostDto postDto, Integer userId, Integer categoryId); + + PostDto updatePost(PostDto postDto, Integer postId); + + void deletePost(Integer postId); + + List<PostDto> getAllPost(Integer pageNumber, Integer pageSize, String sortBy, String sortDir); + + PostDto getPostById(Integer postId); + + List<PostDto> getPostByCategory(Integer categoryId); + + List<PostDto> getPostByUser(Integer userId); + + List<PostDto> searchPosts(String Keyword); +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/UserService.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/UserService.java new file mode 100644 index 00000000..970a1021 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/UserService.java @@ -0,0 +1,13 @@ +package com.suraj.blog.service; + +import java.util.List; + +import com.suraj.blog.payload.UserDTO; + +public interface UserService { + UserDTO createUser(UserDTO userDTO); + UserDTO updateUser(UserDTO userDTO, Integer userID); + UserDTO getUserById(Integer userId); + List<UserDTO> getAllUsers(); + void deleteUser(Integer userId); +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/CategoryServiceImpl.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/CategoryServiceImpl.java new file mode 100644 index 00000000..c701bbe0 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/CategoryServiceImpl.java @@ -0,0 +1,74 @@ +package com.suraj.blog.service.impl; + +import java.util.List; +import java.util.stream.Collectors; + +import org.modelmapper.ModelMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.suraj.blog.dao.CategoryRepo; +import com.suraj.blog.entity.Category; +import com.suraj.blog.exceptions.ResourceNotFoundException; +import com.suraj.blog.payload.CategoryDTO; +import com.suraj.blog.service.CategoryService; + +@Service +public class CategoryServiceImpl implements CategoryService { + + @Autowired + private CategoryRepo categoryRepo; + + @Autowired + private ModelMapper modelMapper; + + @Override + public CategoryDTO createCategory(CategoryDTO categoryDTO) { + Category category = categoryDtoToEntityt(categoryDTO); + this.categoryRepo.save(category); + CategoryDTO newCategoryDTO = categoryEntityToDto(category); + return newCategoryDTO; + } + + + + @Override + public CategoryDTO updateCategory(CategoryDTO categoryDTO, Integer catId) { + Category category = this.categoryRepo.findById(catId).orElseThrow(()->new ResourceNotFoundException("Category", "categoryId", catId)); + category.setCategoryTitle(categoryDTO.getCategoryTitle()); + category.setCategoryDescription(categoryDTO.getCategoryDescription()); + + Category updatedCategory = this.categoryRepo.save(category); + + return this.categoryEntityToDto(updatedCategory); + } + + @Override + public void delterCategory(Integer catId) { + Category category = this.categoryRepo.findById(catId).orElseThrow(()->new ResourceNotFoundException("Category", "categoryId", catId)); + this.categoryRepo.delete(category); + } + + @Override + public CategoryDTO getCategory(Integer catId) { + Category category = this.categoryRepo.findById(catId).orElseThrow(()->new ResourceNotFoundException("Category", "categoryId", catId)); + return this.categoryEntityToDto(category); + } + + @Override + public List<CategoryDTO> getAllCategory() { + List<Category> categories = this.categoryRepo.findAll(); + List<CategoryDTO> categoryDTOs = categories.stream().map(cat -> this.categoryEntityToDto(cat)).collect(Collectors.toList()); + return categoryDTOs; + } + + public Category categoryDtoToEntityt(CategoryDTO categoryDTO) { + return this.modelMapper.map(categoryDTO, Category.class); + } + + public CategoryDTO categoryEntityToDto(Category category) { + return this.modelMapper.map(category, CategoryDTO.class); + } + + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/CommentServiceImpl.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/CommentServiceImpl.java new file mode 100644 index 00000000..7fa51d4e --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/CommentServiceImpl.java @@ -0,0 +1,43 @@ +package com.suraj.blog.service.impl; + +import org.modelmapper.ModelMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.suraj.blog.dao.CommentRepo; +import com.suraj.blog.dao.PostRepo; +import com.suraj.blog.entity.Comment; +import com.suraj.blog.entity.Post; +import com.suraj.blog.exceptions.ResourceNotFoundException; +import com.suraj.blog.payload.CommentDto; +import com.suraj.blog.payload.PostDto; +import com.suraj.blog.service.CommentService; + +@Service +public class CommentServiceImpl implements CommentService{ + + @Autowired + private PostRepo postRepo; + @Autowired + private CommentRepo commentRepo; + @Autowired + private ModelMapper modelMapper; + + + @Override + public CommentDto createComment(CommentDto commentDto, Integer postId) { + Post post = this.postRepo.findById(postId).orElseThrow(()->new ResourceNotFoundException("Post", "post Id", postId)); + Comment comment = this.modelMapper.map(commentDto, Comment.class); + comment.setPost(post); + Comment savedComment = this.commentRepo.save(comment); + return this.modelMapper.map(savedComment, CommentDto.class); + } + + + @Override + public void deleteComment(Integer commentId) { + Comment comment = this.commentRepo.findById(commentId).orElseThrow(()-> new ResourceNotFoundException("comment", "comment Id", commentId)); + this.commentRepo.delete(comment); + } + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/FileServiceImpl.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/FileServiceImpl.java new file mode 100644 index 00000000..e2e1e2d0 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/FileServiceImpl.java @@ -0,0 +1,52 @@ +package com.suraj.blog.service.impl; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.UUID; + +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import com.suraj.blog.service.FileService; + +@Service +public class FileServiceImpl implements FileService{ + + @Override + public String uploadImage(String path, MultipartFile file) throws IOException { + + //file name + String name = file.getOriginalFilename(); + String randomId = UUID.randomUUID().toString(); + String fileName1= randomId.concat(name.substring(name.lastIndexOf("."))); + + //fullpath + String filePath = path + File.separator + fileName1; + + //create folder if not created + File f = new File(path); + if(!f.exists()) { + f.mkdir(); + } + + //file copy + Files.copy(file.getInputStream(), Paths.get(filePath)); + return fileName1; + } + + @Override + public InputStream getResource(String path, String fileName) throws FileNotFoundException { + + String fullPath = path + File.separator + fileName; + InputStream is = new FileInputStream(fullPath); + + return is; + } + + +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/PostServiceImpl.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/PostServiceImpl.java new file mode 100644 index 00000000..37acebf8 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/PostServiceImpl.java @@ -0,0 +1,143 @@ +package com.suraj.blog.service.impl; + +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +import org.modelmapper.ModelMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; +import org.springframework.stereotype.Service; + +import com.suraj.blog.dao.CategoryRepo; +import com.suraj.blog.dao.PostRepo; +import com.suraj.blog.dao.UserRepo; +import com.suraj.blog.entity.Category; +import com.suraj.blog.entity.Post; +import com.suraj.blog.entity.User; +import com.suraj.blog.exceptions.ResourceNotFoundException; +import com.suraj.blog.payload.PostDto; +import com.suraj.blog.service.PostService; + +@Service +public class PostServiceImpl implements PostService { + + @Autowired + private PostRepo postRepo; + + @Autowired + private UserRepo userRepo; + + @Autowired + private CategoryRepo categoryRepo; + + @Autowired + private ModelMapper modelMapper; + + @Override + public PostDto createPost(PostDto postDto, Integer userId, Integer categoryId) { + User user = this.userRepo.findById(userId) + .orElseThrow(() -> new ResourceNotFoundException("User", "userId", userId)); + + Category category = this.categoryRepo.findById(categoryId) + .orElseThrow(() -> new ResourceNotFoundException("Category", "categoryId", categoryId)); + + Post post = postDtoToEntity(postDto); + post.setImageName("default.png"); + post.setAddedDate(new Date()); + + post.setUser(user); + post.setCategory(category); + + Post newPost = this.postRepo.save(post); + + return postEntityToDto(newPost); + } + + @Override + public PostDto updatePost(PostDto postDto, Integer postId) { + Post post = this.postRepo.findById(postId) + .orElseThrow(() -> new ResourceNotFoundException("Post", "post id", postId)); + post.setTitle(postDto.getTitle()); + post.setContent(postDto.getContent()); + post.setImageName(postDto.getImageName()); + Post updatedPost = this.postRepo.save(post); + return postEntityToDto(updatedPost); + } + + + @Override + public void deletePost(Integer postId) { + Post post = this.postRepo.findById(postId) + .orElseThrow(() -> new ResourceNotFoundException("Post", "post id", postId)); + this.postRepo.delete(post); + + } + + @Override + public List<PostDto> getAllPost(Integer pageNumber, Integer pageSize, String sortBy, String sortDir) { + Sort sort = null; + if(sortDir.equalsIgnoreCase("a")) { + sort = Sort.by(sortBy).ascending(); + }else { + sort = Sort.by(sortBy).descending(); + } + + Pageable p = PageRequest.of(pageNumber, pageSize, sort); + Page<Post> page = this.postRepo.findAll(p); + List<Post> posts = page.getContent(); + List<PostDto> postDtos = posts.stream().map(post -> this.modelMapper.map(post, PostDto.class)) + .collect(Collectors.toList()); + return postDtos; + } + + @Override + public PostDto getPostById(Integer postId) { + Post post = this.postRepo.findById(postId) + .orElseThrow(() -> new ResourceNotFoundException("Post", "post id", postId)); + PostDto postDto = postEntityToDto(post); + return postDto; + } + + @Override + public List<PostDto> getPostByCategory(Integer categoryId) { + Category category = this.categoryRepo.findById(categoryId) + .orElseThrow(() -> new ResourceNotFoundException("Category", "categoryId", categoryId)); + List<Post> posts = this.postRepo.findByCategory(category); + List<PostDto> postDtos = posts.stream().map(post -> this.modelMapper.map(post, PostDto.class)) + .collect(Collectors.toList()); + return postDtos; + } + + @Override + public List<PostDto> getPostByUser(Integer userId) { + User user = this.userRepo.findById(userId) + .orElseThrow(() -> new ResourceNotFoundException("User", "userId", userId)); + List<Post> posts = this.postRepo.findByUser(user); + + List<PostDto> postDtos = posts.stream().map(post -> this.modelMapper.map(post, PostDto.class)) + .collect(Collectors.toList()); + + return postDtos; + } + + @Override + public List<PostDto> searchPosts(String Keyword) { + List<Post> posts = this.postRepo.findByTitleContaining(Keyword); + List<PostDto> postDtos = posts.stream().map(post->postEntityToDto(post)).collect(Collectors.toList()); + return postDtos; + } + + public Post postDtoToEntity(PostDto postDto) { + Post post = this.modelMapper.map(postDto, Post.class); + return post; + } + + public PostDto postEntityToDto(Post post) { + PostDto postDto = this.modelMapper.map(post, PostDto.class); + return postDto; + } +} diff --git a/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/UserServiceImpl.java b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/UserServiceImpl.java new file mode 100644 index 00000000..3beccab7 --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/java/com/suraj/blog/service/impl/UserServiceImpl.java @@ -0,0 +1,82 @@ +package com.suraj.blog.service.impl; + +import java.util.List; +import java.util.stream.Collectors; + +import org.modelmapper.ModelMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.suraj.blog.payload.UserDTO; +import com.suraj.blog.service.UserService; +import com.suraj.blog.dao.UserRepo; +import com.suraj.blog.entity.User; +import com.suraj.blog.exceptions.ResourceNotFoundException; + +@Service +public class UserServiceImpl implements UserService { + + @Autowired + private UserRepo userRepo; + + @Autowired + ModelMapper modelMapper; + + @Override + public UserDTO createUser(UserDTO userDTO) { + User user = this.dtoToUser(userDTO); + User savedUser = this.userRepo.save(user); + return this.usertoUserDTO(savedUser); + + } + + @Override + public UserDTO updateUser(UserDTO userDTO, Integer userId) { + User user = this.userRepo.findById(userId) + .orElseThrow(() -> new ResourceNotFoundException("User", "id", userId)); + user.setEmail(userDTO.getEmail()); + user.setName(userDTO.getName()); + user.setAbout(userDTO.getAbout()); + user.setPassword(userDTO.getPassword()); + + User updatedUser = this.userRepo.save(user); + + UserDTO userDTO1 = this.usertoUserDTO(updatedUser); + return userDTO1; + } + + @Override + public UserDTO getUserById(Integer userId) { + User user = this.userRepo.findById(userId) + .orElseThrow(() -> new ResourceNotFoundException("User", "ID", userId)); + return this.usertoUserDTO(user); + } + + @Override + public List<UserDTO> getAllUsers() { + List<User> users = this.userRepo.findAll(); + List<UserDTO> userDTOs = users.stream().map(user -> this.usertoUserDTO(user)).collect(Collectors.toList()); + + return userDTOs; + } + + @Override + public void deleteUser(Integer userId) { + User user = this.userRepo.findById(userId) + .orElseThrow(() -> new ResourceNotFoundException("User", "id", userId)); + this.userRepo.delete(user); + } + + private User dtoToUser(UserDTO userDTO) { + + User user = this.modelMapper.map(userDTO, User.class); + return user; + + } + + private UserDTO usertoUserDTO(User user) { + UserDTO userDTO = this.modelMapper.map(user, UserDTO.class); + return userDTO; + } + +} diff --git a/BlogBackend-main/blog-api-com/src/main/resources/application.properties b/BlogBackend-main/blog-api-com/src/main/resources/application.properties new file mode 100644 index 00000000..53bda75c --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/main/resources/application.properties @@ -0,0 +1,16 @@ +server.port = 9090 + +#Database Configuration +spring.datasource.url=jdbc:mysql://localhost:3306/blog_app_apis +spring.datasource.username=root +spring.datasource.password=root + +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL8Dialect + +spring.jpa.hibernate.ddl-auto=update +spring.jpa.show-sql=true + +spring.servlet.multipart.max-file-size= 10MB +spring.servlet.multipart.max-request-size = 10MB + +project.image = images/ \ No newline at end of file diff --git a/BlogBackend-main/blog-api-com/src/test/java/com/suraj/blog/DemoApplicationTests.java b/BlogBackend-main/blog-api-com/src/test/java/com/suraj/blog/DemoApplicationTests.java new file mode 100644 index 00000000..31c8963b --- /dev/null +++ b/BlogBackend-main/blog-api-com/src/test/java/com/suraj/blog/DemoApplicationTests.java @@ -0,0 +1,13 @@ +package com.suraj.blog; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class DemoApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/BlogBackend-main/blog-api-com/target/classes/application.properties b/BlogBackend-main/blog-api-com/target/classes/application.properties new file mode 100644 index 00000000..53bda75c --- /dev/null +++ b/BlogBackend-main/blog-api-com/target/classes/application.properties @@ -0,0 +1,16 @@ +server.port = 9090 + +#Database Configuration +spring.datasource.url=jdbc:mysql://localhost:3306/blog_app_apis +spring.datasource.username=root +spring.datasource.password=root + +spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL8Dialect + +spring.jpa.hibernate.ddl-auto=update +spring.jpa.show-sql=true + +spring.servlet.multipart.max-file-size= 10MB +spring.servlet.multipart.max-request-size = 10MB + +project.image = images/ \ No newline at end of file diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/BlogApplication.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/BlogApplication.class new file mode 100644 index 00000000..3162d97f Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/BlogApplication.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/config/AppConstant.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/config/AppConstant.class new file mode 100644 index 00000000..afa9beda Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/config/AppConstant.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/config/RestURIConstant.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/config/RestURIConstant.class new file mode 100644 index 00000000..2c576d81 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/config/RestURIConstant.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/CategoryController.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/CategoryController.class new file mode 100644 index 00000000..baa0aa3c Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/CategoryController.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/CommentController.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/CommentController.class new file mode 100644 index 00000000..7bdf9f52 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/CommentController.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/PostContoller.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/PostContoller.class new file mode 100644 index 00000000..62392216 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/PostContoller.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/UserController.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/UserController.class new file mode 100644 index 00000000..d18b68a9 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/controller/UserController.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/CategoryRepo.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/CategoryRepo.class new file mode 100644 index 00000000..22b9a2b3 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/CategoryRepo.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/CommentRepo.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/CommentRepo.class new file mode 100644 index 00000000..383af67a Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/CommentRepo.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/PostRepo.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/PostRepo.class new file mode 100644 index 00000000..f9b2ad84 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/PostRepo.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/UserRepo.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/UserRepo.class new file mode 100644 index 00000000..b20ad90b Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/dao/UserRepo.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/Category.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/Category.class new file mode 100644 index 00000000..d378b3c4 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/Category.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/Comment.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/Comment.class new file mode 100644 index 00000000..73275dec Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/Comment.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/Post.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/Post.class new file mode 100644 index 00000000..52f1708f Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/Post.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/User.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/User.class new file mode 100644 index 00000000..62ea5781 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/entity/User.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/exceptions/GlobalExceptionHandler.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/exceptions/GlobalExceptionHandler.class new file mode 100644 index 00000000..0773b7c9 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/exceptions/GlobalExceptionHandler.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/exceptions/ResourceNotFoundException.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/exceptions/ResourceNotFoundException.class new file mode 100644 index 00000000..14147ae8 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/exceptions/ResourceNotFoundException.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/ApiResponse.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/ApiResponse.class new file mode 100644 index 00000000..fe9a83ad Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/ApiResponse.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/CategoryDTO.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/CategoryDTO.class new file mode 100644 index 00000000..f9983719 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/CategoryDTO.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/CommentDto.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/CommentDto.class new file mode 100644 index 00000000..eaba5148 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/CommentDto.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/PostDto.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/PostDto.class new file mode 100644 index 00000000..fb2a42c3 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/PostDto.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/UserDTO.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/UserDTO.class new file mode 100644 index 00000000..9c41d366 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/payload/UserDTO.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/CategoryService.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/CategoryService.class new file mode 100644 index 00000000..d4f05fe7 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/CategoryService.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/CommentService.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/CommentService.class new file mode 100644 index 00000000..d494ab1b Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/CommentService.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/FileService.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/FileService.class new file mode 100644 index 00000000..a0a3f008 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/FileService.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/PostService.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/PostService.class new file mode 100644 index 00000000..12eccbec Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/PostService.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/UserService.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/UserService.class new file mode 100644 index 00000000..6eb24778 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/UserService.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/CategoryServiceImpl.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/CategoryServiceImpl.class new file mode 100644 index 00000000..57fee5ed Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/CategoryServiceImpl.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/CommentServiceImpl.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/CommentServiceImpl.class new file mode 100644 index 00000000..ed27179c Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/CommentServiceImpl.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/FileServiceImpl.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/FileServiceImpl.class new file mode 100644 index 00000000..c60f15ff Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/FileServiceImpl.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/PostServiceImpl.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/PostServiceImpl.class new file mode 100644 index 00000000..1d4c3e05 Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/PostServiceImpl.class differ diff --git a/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/UserServiceImpl.class b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/UserServiceImpl.class new file mode 100644 index 00000000..077d7d7e Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/classes/com/suraj/blog/service/impl/UserServiceImpl.class differ diff --git a/BlogBackend-main/blog-api-com/target/test-classes/com/suraj/blog/DemoApplicationTests.class b/BlogBackend-main/blog-api-com/target/test-classes/com/suraj/blog/DemoApplicationTests.class new file mode 100644 index 00000000..cb724fcb Binary files /dev/null and b/BlogBackend-main/blog-api-com/target/test-classes/com/suraj/blog/DemoApplicationTests.class differ diff --git a/BluetoothChatApp b/BluetoothChatApp new file mode 160000 index 00000000..4e154d2d --- /dev/null +++ b/BluetoothChatApp @@ -0,0 +1 @@ +Subproject commit 4e154d2dd7f3710eb0ea04f991897899bcefac8e diff --git a/Board.java b/Board.java new file mode 100644 index 00000000..2f9fbaf8 --- /dev/null +++ b/Board.java @@ -0,0 +1,246 @@ +package com.zetcode; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import javax.swing.ImageIcon; +import javax.swing.JPanel; +import javax.swing.Timer; + +public class Board extends JPanel implements ActionListener { + + private final int B_WIDTH = 300; + private final int B_HEIGHT = 300; + private final int DOT_SIZE = 10; + private final int ALL_DOTS = 900; + private final int RAND_POS = 29; + private final int DELAY = 140; + + private final int x[] = new int[ALL_DOTS]; + private final int y[] = new int[ALL_DOTS]; + + private int dots; + private int apple_x; + private int apple_y; + + private boolean leftDirection = false; + private boolean rightDirection = true; + private boolean upDirection = false; + private boolean downDirection = false; + private boolean inGame = true; + + private Timer timer; + private Image ball; + private Image apple; + private Image head; + + public Board() { + + initBoard(); + } + + private void initBoard() { + + addKeyListener(new TAdapter()); + setBackground(Color.black); + setFocusable(true); + + setPreferredSize(new Dimension(B_WIDTH, B_HEIGHT)); + loadImages(); + initGame(); + } + + private void loadImages() { + + ImageIcon iid = new ImageIcon("src/resources/dot.png"); + ball = iid.getImage(); + + ImageIcon iia = new ImageIcon("src/resources/apple.png"); + apple = iia.getImage(); + + ImageIcon iih = new ImageIcon("src/resources/head.png"); + head = iih.getImage(); + } + + private void initGame() { + + dots = 3; + + for (int z = 0; z < dots; z++) { + x[z] = 50 - z * 10; + y[z] = 50; + } + + locateApple(); + + timer = new Timer(DELAY, this); + timer.start(); + } + + @Override + public void paintComponent(Graphics g) { + super.paintComponent(g); + + doDrawing(g); + } + + private void doDrawing(Graphics g) { + + if (inGame) { + + g.drawImage(apple, apple_x, apple_y, this); + + for (int z = 0; z < dots; z++) { + if (z == 0) { + g.drawImage(head, x[z], y[z], this); + } else { + g.drawImage(ball, x[z], y[z], this); + } + } + + Toolkit.getDefaultToolkit().sync(); + + } else { + + gameOver(g); + } + } + + private void gameOver(Graphics g) { + + String msg = "Game Over"; + Font small = new Font("Helvetica", Font.BOLD, 14); + FontMetrics metr = getFontMetrics(small); + + g.setColor(Color.white); + g.setFont(small); + g.drawString(msg, (B_WIDTH - metr.stringWidth(msg)) / 2, B_HEIGHT / 2); + } + + private void checkApple() { + + if ((x[0] == apple_x) && (y[0] == apple_y)) { + + dots++; + locateApple(); + } + } + + private void move() { + + for (int z = dots; z > 0; z--) { + x[z] = x[(z - 1)]; + y[z] = y[(z - 1)]; + } + + if (leftDirection) { + x[0] -= DOT_SIZE; + } + + if (rightDirection) { + x[0] += DOT_SIZE; + } + + if (upDirection) { + y[0] -= DOT_SIZE; + } + + if (downDirection) { + y[0] += DOT_SIZE; + } + } + + private void checkCollision() { + + for (int z = dots; z > 0; z--) { + + if ((z > 4) && (x[0] == x[z]) && (y[0] == y[z])) { + inGame = false; + } + } + + if (y[0] >= B_HEIGHT) { + inGame = false; + } + + if (y[0] < 0) { + inGame = false; + } + + if (x[0] >= B_WIDTH) { + inGame = false; + } + + if (x[0] < 0) { + inGame = false; + } + + if (!inGame) { + timer.stop(); + } + } + + private void locateApple() { + + int r = (int) (Math.random() * RAND_POS); + apple_x = ((r * DOT_SIZE)); + + r = (int) (Math.random() * RAND_POS); + apple_y = ((r * DOT_SIZE)); + } + + @Override + public void actionPerformed(ActionEvent e) { + + if (inGame) { + + checkApple(); + checkCollision(); + move(); + } + + repaint(); + } + + private class TAdapter extends KeyAdapter { + + @Override + public void keyPressed(KeyEvent e) { + + int key = e.getKeyCode(); + + if ((key == KeyEvent.VK_LEFT) && (!rightDirection)) { + leftDirection = true; + upDirection = false; + downDirection = false; + } + + if ((key == KeyEvent.VK_RIGHT) && (!leftDirection)) { + rightDirection = true; + upDirection = false; + downDirection = false; + } + + if ((key == KeyEvent.VK_UP) && (!downDirection)) { + upDirection = true; + rightDirection = false; + leftDirection = false; + } + + if ((key == KeyEvent.VK_DOWN) && (!upDirection)) { + downDirection = true; + rightDirection = false; + leftDirection = false; + } + } + } +} + diff --git a/BounceBalls.py b/BounceBalls.py new file mode 100644 index 00000000..795f9eb8 --- /dev/null +++ b/BounceBalls.py @@ -0,0 +1,94 @@ +from tkinter import * # Import tkinter +from random import randint + +# Return a random color string in the form #RRGGBB +def getRandomColor(): + color = "#" + for j in range(6): + color += toHexChar(randint(0, 15)) # Add a random digit + return color + +# Convert an integer to a single hex digit in a character +def toHexChar(hexValue): + if 0 <= hexValue <= 9: + return chr(hexValue + ord('0')) + else: # 10 <= hexValue <= 15 + return chr(hexValue - 10 + ord('A')) + +# Define a Ball class +class Ball: + def __init__(self): + self.x = 0 # Starting center position + self.y = 0 + self.dx = 2 # Move right by default + self.dy = 2 # Move down by default + self.radius = 3 # The radius is fixed + self.color = getRandomColor() # Get random color + +class BounceBalls: + def __init__(self): + self.ballList = [] # Create a list for balls + + window = Tk() # Create a window + window.title("Bouncing Balls") # Set a title + + self.width = 350 # Width of the self.canvas + self.height = 150 # Width of the self.canvas + self.canvas = Canvas(window, bg = "white", + width = self.width, height = self.height) + self.canvas.pack() + + frame = Frame(window) + frame.pack() + btStop = Button(frame, text = "Stop", command = self.stop) + btStop.pack(side = LEFT) + btResume = Button(frame, text = "Resume", + command = self.resume) + btResume.pack(side = LEFT) + btAdd = Button(frame, text = "+", command = self.add) + btAdd.pack(side = LEFT) + btRemove = Button(frame, text = "-", command = self.remove) + btRemove.pack(side = LEFT) + + self.sleepTime = 100 # Set a sleep time + self.isStopped = False + self.animate() + + window.mainloop() # Create an event loop + + def stop(self): # Stop animation + self.isStopped = True + + def resume(self): # Resume animation + self.isStopped = False + self.animate() + + def add(self): # Add a new ball + self.ballList.append(Ball()) + + def remove(self): # Remove the last ball + self.ballList.pop() + + def animate(self): # Move the message + while not self.isStopped: + self.canvas.after(self.sleepTime) # Sleep + self.canvas.update() # Update self.canvas + self.canvas.delete("ball") + + for ball in self.ballList: + self.redisplayBall(ball) + + def redisplayBall(self, ball): + if ball.x > self.width or ball.x < 0: + ball.dx = -ball.dx + + if ball.y > self.height or ball.y < 0: + ball.dy = -ball.dy + + ball.x += ball.dx + ball.y += ball.dy + self.canvas.create_oval(ball.x - ball.radius, + ball.y - ball.radius, ball.x + ball.radius, + ball.y + ball.radius, fill = ball.color, tags = "ball") + +BounceBalls() # Create GUI diff --git a/Brick-Breaker-Game/pom.xml b/Brick-Breaker-Game/pom.xml new file mode 100644 index 00000000..64369fe0 --- /dev/null +++ b/Brick-Breaker-Game/pom.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>com.mycompany</groupId> + <artifactId>Brick</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>15</maven.compiler.source> + <maven.compiler.target>15</maven.compiler.target> + </properties> +</project> \ No newline at end of file diff --git a/Brick-Breaker-Game/src/main/java/com/mycompany/brick/GamePlay.java b/Brick-Breaker-Game/src/main/java/com/mycompany/brick/GamePlay.java new file mode 100644 index 00000000..a95373e2 --- /dev/null +++ b/Brick-Breaker-Game/src/main/java/com/mycompany/brick/GamePlay.java @@ -0,0 +1,213 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.mycompany.brick; + +import javax.swing.JPanel; +import javax.swing.Timer; +import java.awt.Graphics2D; +import java.awt.Rectangle; +import java.awt.Graphics; +import java.awt.Color; +import java.awt.Font; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; + +/** + * + * @author chinm + */ +public class GamePlay extends JPanel implements KeyListener, ActionListener { + + private boolean play = false; + private int score = 0; + private int totalbricks = 21; + private Timer Timer; + private int delay = 8; + private int playerX = 310; + private int ballposX = 120; + private int ballposY = 350; + private int ballXdir = -1; + private int ballYdir = -2; + private MapGenerator map; + + public GamePlay() { + map = new MapGenerator(3, 7); + addKeyListener(this); + setFocusable(true); + setFocusTraversalKeysEnabled(false); + Timer = new Timer(delay, this); + Timer.start(); + } + + public void paint(Graphics g) { + g.setColor(Color.black); + g.fillRect(1, 1, 692, 592); + + map.draw((Graphics2D) g); + + g.setColor(Color.yellow); + g.fillRect(0, 0, 3, 592); + g.fillRect(0, 0, 692, 3); + g.fillRect(691, 0, 3, 592); + + g.setColor(Color.white); + g.setFont(new Font("serif", Font.BOLD, 25)); + g.drawString("" + score, 590, 30); + + g.setColor(Color.yellow); + g.fillRect(playerX, 550, 100, 8); + + //ball + g.setColor(Color.GREEN); + g.fillOval(ballposX, ballposY, 20, 20); + + if (ballposY > 570) { + play = false; + ballXdir = 0; + ballYdir = 0; + g.setColor(Color.red); + g.setFont(new Font("serif", Font.BOLD, 30)); + g.drawString(" Game Over Score: " + score, 190, 300); + + g.setFont(new Font("serif", Font.BOLD, 30)); + g.drawString(" Press Enter to Restart", 190, 340); + } + if(totalbricks == 0){ + play = false; + ballYdir = -2; + ballXdir = -1; + g.setColor(Color.red); + g.setFont(new Font("serif",Font.BOLD,30)); + g.drawString(" Game Over: "+score,190,300); + + g.setFont(new Font("serif", Font.BOLD, 30)); + g.drawString(" Press Enter to Restart", 190, 340); + + + } + + g.dispose(); + + + } + + @Override + public void actionPerformed(ActionEvent e) { + Timer.start(); + + if (play) { + if (new Rectangle(ballposX, ballposY, 20, 20).intersects(new Rectangle(playerX, 550, 100, 8))) { + ballYdir = -ballYdir; + } + + A: + for (int i = 0; i < map.map.length; i++) { + for (int j = 0; j < map.map[0].length; j++) { + if (map.map[i][j] > 0) { + int brickX = j * map.bricksWidth + 80; + int brickY = i * map.bricksHeight + 50; + int bricksWidth = map.bricksWidth; + int bricksHeight = map.bricksHeight; + + Rectangle rect = new Rectangle(brickX, brickY, bricksWidth, bricksHeight); + Rectangle ballrect = new Rectangle(ballposX, ballposY, 20, 20); + Rectangle brickrect = rect; + + if (ballrect.intersects(brickrect)) { + map.setBricksValue(0, i, j); + totalbricks--; + score += 5; + if (ballposX + 19 <= brickrect.x || ballposX + 1 >= brickrect.x + bricksWidth) { + ballXdir = -ballXdir; + } else { + ballYdir = -ballYdir; + } + break A; + } + } + + + } + } + + + ballposX += ballXdir; + ballposY += ballYdir; + if (ballposX < 0) { + ballXdir = -ballXdir; + } + if (ballposY < 0) { + ballYdir = -ballYdir; + } + if (ballposX > 670) { + ballXdir = -ballXdir; + } + } + repaint(); + } + + @Override + public void keyTyped(KeyEvent e) { + + } + + + @Override + public void keyReleased(KeyEvent e) { + + } + + @Override + public void keyPressed(KeyEvent e) { + if (e.getKeyCode() == KeyEvent.VK_RIGHT) { + if (playerX >= 600) { + playerX = 600; + } else { + moveRight(); + } + } + if (e.getKeyCode() == KeyEvent.VK_LEFT) { + if (playerX < 10) { + playerX = 10; + } else { + moveLeft(); + } + } + + if (e.getKeyCode() == KeyEvent.VK_ENTER) { + if (!play) { + ballposX = 120; + ballposY = 350; + ballXdir = -1; + ballYdir = -2; + score = 0; + playerX = 310; + totalbricks = 21; + map = new MapGenerator(3, 7); + + repaint(); + } + } + + + } + + public void moveRight () + { + play = true; + playerX += 20; + } + public void moveLeft () + { + play = true; + playerX -= 20; + } + + + +} diff --git a/Brick-Breaker-Game/src/main/java/com/mycompany/brick/MapGenerator.java b/Brick-Breaker-Game/src/main/java/com/mycompany/brick/MapGenerator.java new file mode 100644 index 00000000..1f203c2a --- /dev/null +++ b/Brick-Breaker-Game/src/main/java/com/mycompany/brick/MapGenerator.java @@ -0,0 +1,52 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.mycompany.brick; + +import java.awt.BasicStroke; +import java.awt.Color; +import java.awt.Graphics2D; + +/** + * + * @author chinm + */ +public class MapGenerator { + public int map[][]; + public int bricksWidth; + public int bricksHeight; + public MapGenerator(int row , int col){ + map = new int[row][col]; + for (int[] map1 : map) { + for (int j = 0; j < map[0].length; j++) { + map1[j] = 1; + } + } + bricksWidth = 540/col; + bricksHeight = 150/row; + } + public void draw(Graphics2D g) { + for (int i = 0; i < map.length; i++) { + for (int j = 0; j < map[0].length; j++) { + if (map[i][j] > 0) { + g.setColor(Color.red); + g.fillRect(j * bricksWidth + 80, i * bricksHeight + 50, bricksWidth, bricksHeight); + + g.setStroke(new BasicStroke(3)); + g.setColor(Color.black); + g.drawRect(j * bricksWidth + 80, i * bricksHeight + 50, bricksWidth, bricksHeight); + + } + } + + } + } + public void setBricksValue(int value,int row,int col) + { + map[row][col] = value; + + } + +} diff --git a/Brick-Breaker-Game/src/main/java/com/mycompany/brick/MyApp.java b/Brick-Breaker-Game/src/main/java/com/mycompany/brick/MyApp.java new file mode 100644 index 00000000..f3d826e0 --- /dev/null +++ b/Brick-Breaker-Game/src/main/java/com/mycompany/brick/MyApp.java @@ -0,0 +1,26 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package com.mycompany.brick; + +import javax.swing.JFrame; + +/** + * + * @author chinm + */ +public class MyApp { + public static void main(String[] args) { + JFrame obj = new JFrame(); + GamePlay gameplay = new GamePlay(); + obj.setBounds(10,10,700,600); + obj.setTitle("BrickBreaker"); + obj.setResizable(false); + obj.setVisible(true); + obj.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + obj.add(gameplay); + } + +} diff --git a/Brick-Breaker-Game/target/classes/com/mycompany/brick/GamePlay.class b/Brick-Breaker-Game/target/classes/com/mycompany/brick/GamePlay.class new file mode 100644 index 00000000..c532198d Binary files /dev/null and b/Brick-Breaker-Game/target/classes/com/mycompany/brick/GamePlay.class differ diff --git a/Brick-Breaker-Game/target/classes/com/mycompany/brick/MapGenerator.class b/Brick-Breaker-Game/target/classes/com/mycompany/brick/MapGenerator.class new file mode 100644 index 00000000..5fbb5b15 Binary files /dev/null and b/Brick-Breaker-Game/target/classes/com/mycompany/brick/MapGenerator.class differ diff --git a/Brick-Breaker-Game/target/classes/com/mycompany/brick/MyApp.class b/Brick-Breaker-Game/target/classes/com/mycompany/brick/MyApp.class new file mode 100644 index 00000000..2e211b94 Binary files /dev/null and b/Brick-Breaker-Game/target/classes/com/mycompany/brick/MyApp.class differ diff --git a/Brick-Breaker-Game/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/Brick-Breaker-Game/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 00000000..82fac6fa --- /dev/null +++ b/Brick-Breaker-Game/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,3 @@ +com\mycompany\brick\MapGenerator.class +com\mycompany\brick\MyApp.class +com\mycompany\brick\GamePlay.class diff --git a/Brick-Breaker-Game/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/Brick-Breaker-Game/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 00000000..0f925b0e --- /dev/null +++ b/Brick-Breaker-Game/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,3 @@ +C:\Users\chinm\OneDrive\Documents\NetBeansProjects\Brick\src\main\java\com\mycompany\brick\MyApp.java +C:\Users\chinm\OneDrive\Documents\NetBeansProjects\Brick\src\main\java\com\mycompany\brick\GamePlay.java +C:\Users\chinm\OneDrive\Documents\NetBeansProjects\Brick\src\main\java\com\mycompany\brick\MapGenerator.java diff --git a/Brick-Breaker-Game/target/test-classes/.netbeans_automatic_build b/Brick-Breaker-Game/target/test-classes/.netbeans_automatic_build new file mode 100644 index 00000000..e69de29b diff --git a/Budget Tracker project/.cph/.BudgetTracker.java_16aeda78c6a917d37e3e9161668c0c60.prob b/Budget Tracker project/.cph/.BudgetTracker.java_16aeda78c6a917d37e3e9161668c0c60.prob new file mode 100644 index 00000000..3b117b2b --- /dev/null +++ b/Budget Tracker project/.cph/.BudgetTracker.java_16aeda78c6a917d37e3e9161668c0c60.prob @@ -0,0 +1 @@ +{"name":"Local: BudgetTracker","url":"c:\\Users\\Administrator\\Desktop\\Java-Projects-Collections\\Budget Tracker project\\BudgetTracker.java","tests":[{"id":1696452999127,"input":"","output":""}],"interactive":false,"memoryLimit":1024,"timeLimit":3000,"srcPath":"c:\\Users\\Administrator\\Desktop\\Java-Projects-Collections\\Budget Tracker project\\BudgetTracker.java","group":"local","local":true} \ No newline at end of file diff --git a/Budget Tracker project/BudgetTracker.class b/Budget Tracker project/BudgetTracker.class new file mode 100644 index 00000000..7e5cbd42 Binary files /dev/null and b/Budget Tracker project/BudgetTracker.class differ diff --git a/Budget Tracker project/BudgetTracker.java b/Budget Tracker project/BudgetTracker.java new file mode 100644 index 00000000..144ca617 --- /dev/null +++ b/Budget Tracker project/BudgetTracker.java @@ -0,0 +1,56 @@ +import java.util.Scanner; + +public class BudgetTracker { + private double balance; + + public BudgetTracker() { + balance = 0.0; + } + + public void addIncome(double amount) { + balance += amount; + } + + public void addExpense(double amount) { + balance -= amount; + } + + public double getBalance() { + return balance; + } + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + BudgetTracker tracker = new BudgetTracker(); + + while (true) { + System.out.println("1. Add Income"); + System.out.println("2. Add Expense"); + System.out.println("3. View Balance"); + System.out.println("4. Exit"); + System.out.print("Enter your choice: "); + int choice = scanner.nextInt(); + + switch (choice) { + case 1: + System.out.print("Enter income amount: "); + double income = scanner.nextDouble(); + tracker.addIncome(income); + break; + case 2: + System.out.print("Enter expense amount: "); + double expense = scanner.nextDouble(); + tracker.addExpense(expense); + break; + case 3: + System.out.println("Current Balance: Rs" + tracker.getBalance()); + break; + case 4: + System.out.println("Exiting... Thank you!"); + return; + default: + System.out.println("Invalid choice. Please try again."); + } + } + } +} \ No newline at end of file diff --git a/Bug3524.java b/Bug3524.java new file mode 100644 index 00000000..f03beca7 --- /dev/null +++ b/Bug3524.java @@ -0,0 +1,11 @@ +import java.util.Scanner; +public class Bug3524 { + public static void main(String[] param) { + System.out.println("2021503524 - Mugundh J B - 09/09/23 - 2.20 pm"); + Scanner in = new Scanner(System.in); + System.out.println("Hello. Please type your name:"); + String name = in.nextLine(); + System.out.println("Hello "+name); + System.out.println ("Have a, nice day!"); + } +} diff --git a/CArray.java b/CArray.java new file mode 100644 index 00000000..91611b0a --- /dev/null +++ b/CArray.java @@ -0,0 +1,60 @@ +import java.util.Scanner; +//This class will calculate the max and min values of the array +class TestArray +{ + + int MAX(int[]Arry) + { + int maxValue= Arry[0]; + + for(int i=1;i<Arry.length;i++) + { + if(Arry[i]>maxValue) + { + maxValue=Arry[i]; + } + } + return maxValue;//This method will return the max value present in the array. + } + + int MIN(int[]Arry) + { + int minValue=Arry[0]; + + for(int i=1;i<Arry.length;i++) + { + if(Arry[i]<minValue) + { + minValue=Arry[i]; + } + } + return minValue; + } +} + +public class DifferenceArry +{ + public static void main(String[] args) + { + int n; + + //It creates scanner object + Scanner sc = new Scanner(System.in); + System.out.print("Enter the array elements:" ); + n=sc.nextInt(); + + int arr[]=new int[n]; + + for(int i=0;i<arr.length;i++) + { + System.out.print("Enter ["+(i+1)+"] element :" ); + arr[i]=sc.nextInt(); + } + + TestArray obj=new TestArray(); + System.out.println("Maximum value in the array is :" +obj.MAX(arr)); + System.out.println("Minimum value in the array is :" +obj.MIN(arr)); + int diff=obj.MAX(arr)-obj.MIN(arr); + System.out.print("Difference between max and min elements is : " +diff ); + } +} diff --git a/CPUSchedullingAlgorithm.c b/CPUSchedullingAlgorithm.c new file mode 100644 index 00000000..aacae849 --- /dev/null +++ b/CPUSchedullingAlgorithm.c @@ -0,0 +1,975 @@ +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> + +typedef struct array +{ + int *AT; + int *BT; + int *WT; + int *TAT; + int *CT; +} Array; + +typedef struct readyQueue +{ + int pid; + int BT; + struct readyQueue *next; +} ReadyQueue; + +Array *userInput(int processNum, int *AT, int *BT, Array *ptr) +{ + + printf("Enter the input in the form of 'Arrival Time(AT)' 'Burst Time(BT)'\n"); + for (int i = 0; i < processNum; i++) + { + scanf("%d %d", &AT[i], &BT[i]); + printf("\n"); + } + ptr->AT = AT; + ptr->BT = BT; + return ptr; +} + +Array *sortAT(int *AT, int *BT, int proccessNum, Array *ptr) +{ + bool swapped = false; + for (int i = 0; i < proccessNum - 1; i++) + { + swapped = false; + for (int j = 0; j < proccessNum - i - 1; j++) + { + if (AT[j] > AT[j + 1]) + { + int temp = AT[j]; + AT[j] = AT[j + 1]; + AT[j + 1] = temp; + temp = BT[j]; + BT[j] = BT[j + 1]; + BT[j + 1] = temp; + swapped = true; + } + } + + if (swapped == false) + { + break; + } + } + + ptr->AT = AT; + ptr->BT = BT; + return ptr; +} + +int *calculateWT(int *WT, int processNum, int *AT, int *BT) +{ + WT[0] = 0; + int currentTime = BT[0] + AT[0]; + for (int i = 1; i < processNum; i++) + { + if (AT[i] > currentTime) + { + currentTime = AT[i]; + } + WT[i] = currentTime - AT[i]; + currentTime += BT[i]; + } + return WT; +} + +int *calculateTAT(int *TAT, int processNum, int *BT, int *WT) +{ + for (int i = 0; i < processNum; i++) + { + TAT[i] = WT[i] + BT[i]; + } + + return TAT; +} + +int *calculateCT(int *CT, int proccessNum, int *AT, int *BT, int *WT) +{ + for (int i = 0; i < proccessNum; i++) + { + CT[i] = AT[i] + WT[i] + BT[i]; + } + + return CT; +} + +void display(int *AT, int *BT, int *WT, int *TAT, int *CT, int proccessNum) +{ + printf("AT\t BT\t WT\t TAT\t CT\n"); + float avgWT = 0; + float avgTAT = 0; + float avgCT = 0; + for (int i = 0; i < proccessNum; i++) + { + avgWT += WT[i]; + avgTAT += TAT[i]; + avgCT += CT[i]; + printf("%d\t %d\t %d\t %d\t %d\n", AT[i], BT[i], WT[i], TAT[i], CT[i]); + } + printf("Average WT: %f\n", avgWT / proccessNum); + printf("Average TAT: %f\n", avgTAT / proccessNum); + printf("Average CT: %f\n", avgCT / proccessNum); +} + +Array *dynAlloc(Array *ptr, int processNum) +{ + ptr = (Array *)malloc(sizeof(Array)); + ptr->AT = (int *)malloc(processNum * sizeof(int)); + ptr->BT = (int *)malloc(processNum * sizeof(int)); + ptr->WT = (int *)malloc(processNum * sizeof(int)); + ptr->TAT = (int *)malloc(processNum * sizeof(int)); + ptr->CT = (int *)malloc(processNum * sizeof(int)); + return ptr; +} + +void FCFSNecessaryFunct(int processNum, int *AT, int *BT, int *WT, int *TAT, int *CT, Array *ptr) +{ + ptr = userInput(processNum, ptr->AT, ptr->BT, ptr); + ptr = sortAT(ptr->AT, ptr->BT, processNum, ptr); + ptr->WT = calculateWT(ptr->WT, processNum, ptr->AT, ptr->BT); + ptr->TAT = calculateTAT(ptr->TAT, processNum, ptr->BT, ptr->WT); + ptr->CT = calculateCT(ptr->CT, processNum, ptr->AT, ptr->BT, ptr->WT); + display(ptr->AT, ptr->BT, ptr->WT, ptr->TAT, ptr->CT, processNum); +} + +void FCFS() +{ + int processNum; + printf("Enter the number of processess to be executed\n"); + scanf("%d", &processNum); + Array *ptr; + ptr = dynAlloc(ptr, processNum); + FCFSNecessaryFunct(processNum, ptr->AT, ptr->BT, ptr->WT, ptr->TAT, ptr->CT, ptr); + free(ptr); +} + +int *fillBT2(int processNum, int *BT, int *BT2) +{ + for (int i = 0; i < processNum; i++) + { + BT2[i] = BT[i]; + } + + return BT2; +} + +int findMin(int processNum, int *BT2, int currentTime, int *AT) +{ + int res = 1; + for (int i = 1; i < processNum; i++) + { + if (BT2[i] <= BT2[res] && BT2[i] != -1 && AT[i] <= currentTime) + { + res = i; + } + else if (BT2[res] == -1) + { + res++; + } + } + return res; +} + +int *sjfTAT(int processNum, int *AT, int *CT, int *TAT) +{ + for (int i = 0; i < processNum; i++) + { + TAT[i] = CT[i] - AT[i]; + } + + return TAT; +} + +int *sjfWT(int processNum, int *BT, int *WT, int *TAT) +{ + for (int i = 0; i < processNum; i++) + { + WT[i] = TAT[i] - BT[i]; + } + + return WT; +} + +int *sjfCT(int processNum, int *BT2, int *AT, int *BT, int *CT) +{ + int currentTime = BT2[0] + AT[0]; + CT[0] = currentTime; + BT2[0] = -1; + for (int i = 1; i < processNum; i++) + { + int index = findMin(processNum, BT2, currentTime, AT); + currentTime += BT2[index]; + CT[index] = currentTime; + BT2[index] = -1; + } + return CT; +} + +void SJF() +{ + int proccessNum; + printf("Enter the number of proccesses\n"); + scanf("%d", &proccessNum); + Array *ptr; + ptr = dynAlloc(ptr, proccessNum); + ptr = userInput(proccessNum, ptr->AT, ptr->BT, ptr); + ptr = sortAT(ptr->AT, ptr->BT, proccessNum, ptr); + int *BT2 = (int *)malloc(proccessNum * sizeof(int)); + BT2 = fillBT2(proccessNum, ptr->BT, BT2); + ptr->CT = sjfCT(proccessNum, BT2, ptr->AT, ptr->BT, ptr->CT); + ptr->TAT = sjfTAT(proccessNum, ptr->AT, ptr->CT, ptr->TAT); + ptr->WT = sjfWT(proccessNum, ptr->BT, ptr->WT, ptr->TAT); + display(ptr->AT, ptr->BT, ptr->WT, ptr->TAT, ptr->CT, proccessNum); + free(ptr); +} + +ReadyQueue *enqueue(ReadyQueue *ptr, int data, int pid) +{ + ReadyQueue *newNode = (ReadyQueue *)malloc(sizeof(ReadyQueue)); + newNode->BT = data; + newNode->pid = pid; + newNode->next = NULL; + + if (ptr == NULL) + { + return newNode; + } + else if (data == 0) + { + free(newNode); + return ptr; + } + else + { + ReadyQueue *current = ptr; + while (current->next != NULL) + { + current = current->next; + } + + current->next = newNode; + + return ptr; + } +} + +ReadyQueue *fillList(int *BT, ReadyQueue *list, int processNum) +{ + + for (int i = 0; i < processNum; i++) + { + int pid = i + 1; + list = enqueue(list, BT[i], pid); + } + return list; +} + +ReadyQueue *dequeue(ReadyQueue *ptr) +{ + if (ptr == NULL) + { + return NULL; + } + + ReadyQueue *temp = ptr; + ptr = ptr->next; + free(temp); + return ptr; +} + +int *rrCT(int *CT, int processNum, ReadyQueue *ptr, int TQ, int AT0) +{ + int currentTime = AT0; + while (ptr != NULL) + { + ReadyQueue *temp = ptr; + if (temp->BT > TQ) + { + temp->BT -= TQ; + currentTime += TQ; + ptr = enqueue(temp, temp->BT, temp->pid); + } + else if (temp->BT == 0) + { + CT[temp->pid - 1] = currentTime; + } + else if (temp->BT <= TQ) + { + CT[temp->pid - 1] = currentTime + temp->BT; + currentTime += temp->BT; + } + ptr = dequeue(ptr); + } + + return CT; +} + +int *rrWT(int *WT, int *BT, int *AT, int *CT, int processNum) +{ + for (int i = 0; i < processNum; i++) + { + WT[i] = CT[i] - BT[i] - AT[i]; + } + + return WT; +} + +int *rrTAT(int *BT, int *WT, int *TAT, int processNum) +{ + for (int i = 0; i < processNum; i++) + { + TAT[i] = BT[i] + WT[i]; + } + + return TAT; +} + +void RR() +{ + int TQ, processNum; + printf("Enter the time quantum for each process and the number of processess\n"); + scanf("%d %d", &TQ, &processNum); + Array *ptr; + ptr = dynAlloc(ptr, processNum); + ptr = userInput(processNum, ptr->AT, ptr->BT, ptr); + ptr = sortAT(ptr->AT, ptr->BT, processNum, ptr); + ReadyQueue *rrListFront = (ReadyQueue *)malloc(sizeof(ReadyQueue)); + rrListFront->BT = 0; + rrListFront->pid = 0; + rrListFront->next = NULL; + rrListFront = fillList(ptr->BT, rrListFront, processNum); + ptr->CT = rrCT(ptr->CT, processNum, rrListFront, TQ, ptr->AT[0]); + ptr->WT = rrWT(ptr->WT, ptr->BT, ptr->AT, ptr->CT, processNum); + ptr->TAT = rrTAT(ptr->BT, ptr->WT, ptr->TAT, processNum); + display(ptr->AT, ptr->BT, ptr->WT, ptr->TAT, ptr->CT, processNum); + free(ptr); +} + +int maxAT(int *AT, int processNum) +{ + int res = 0; + for (int i = 1; i < processNum; i++) + { + if (AT[res] < AT[i]) + { + res = i; + } + } + + return AT[res]; +} + +ReadyQueue *leastTime(ReadyQueue *ptr, int currentTime, int *AT, int processNum, int MAX_AT) +{ + ReadyQueue *temp = ptr; + ReadyQueue *res = ptr; + ReadyQueue *temp2 = ptr; + temp2 = temp2->next; + temp = temp->next; + int BT = ptr->BT; + if (currentTime < MAX_AT) + { + for (int i = ptr->pid; i < processNum; i++) + { + if (AT[i] == currentTime && BT > temp->BT) + { + BT = temp->BT; + res = temp; + } + else if (AT[i] > currentTime) + + { + break; + } + temp = temp->next; + } + } + else + { + while (temp != NULL) + { + if (BT > temp->BT) + { + BT = temp->BT; + res = temp; + } + temp = temp->next; + } + } + while (temp2 != NULL) + { + if (AT[temp2->pid - 1] <= currentTime) + { + if (temp2->BT < res->BT) + { + res = temp2; + } + else if (temp2->BT == res->BT && temp2->pid < res->pid) + { + res = temp2; + } + } + temp2 = temp2->next; + } + return res; +} + +ReadyQueue *addFront(ReadyQueue *temp, ReadyQueue *ptr) +{ + if (temp == ptr) + { + return ptr; + } + + ReadyQueue *prev = NULL; + ReadyQueue *current = ptr; + while (current != NULL && current != temp) + { + prev = current; + current = current->next; + } + + if (current == temp) + { + if (prev != NULL) + { + prev->next = temp->next; + } + else + { + ptr = temp->next; + } + + temp->next = ptr; + ptr = temp; + } + + return ptr; +} + +int *strfCT(int *CT, ReadyQueue *ptr, int *AT, int processNum) +{ + + int currentTime = AT[0]; + int MAX_AT = maxAT(AT, processNum); + int i = 0; + while (ptr != NULL) + { + int BT = ptr->BT; + int pid = ptr->pid; + ReadyQueue *temp = ptr; + ReadyQueue *head = ptr; + if (ptr->BT != 0) + { + temp = leastTime(ptr, currentTime, AT, processNum, MAX_AT); + } + if (currentTime > MAX_AT && ptr->BT < temp->BT) + { + CT[ptr->pid - 1] = currentTime + ptr->BT; + ptr = dequeue(ptr); + } + else if (temp->BT == ptr->BT && temp->pid < ptr->pid) + { + ptr = dequeue(ptr); + ptr = enqueue(ptr, BT, pid); + ptr = addFront(temp, ptr); + } + else if (ptr->next == NULL) + { + CT[ptr->pid - 1] = currentTime + ptr->BT; + ptr = dequeue(ptr); + } + else if (ptr->BT == 0) + { + CT[ptr->pid - 1] = currentTime; + ptr = dequeue(ptr); + } + else if (temp->BT < ptr->BT) + { + ptr = dequeue(ptr); + ptr = enqueue(ptr, BT, pid); + ptr = addFront(temp, ptr); + } + else if (temp->BT == ptr->BT) + { + currentTime++; + ptr->BT--; + } + } + return CT; +} + +int *strfWT(int *AT, int *BT, int *CT, int *WT, int processNum) +{ + for (int i = 0; i < processNum; i++) + { + WT[i] = CT[i] - BT[i] - AT[i]; + } + + return WT; +} + +int *strfTAT(int *BT, int *WT, int *TAT, int processNum) +{ + for (int i = 0; i < processNum; i++) + { + TAT[i] = BT[i] + WT[i]; + } + + return TAT; +} + +void STRF() +{ + int processNum; + printf("Enter the number of processess\n"); + scanf("%d", &processNum); + Array *ptr; + ptr = dynAlloc(ptr, processNum); + ptr = userInput(processNum, ptr->AT, ptr->BT, ptr); + ptr = sortAT(ptr->AT, ptr->BT, processNum, ptr); + ReadyQueue *queue = (ReadyQueue *)malloc(sizeof(ReadyQueue)); + queue = NULL; + queue = fillList(ptr->BT, queue, processNum); + ptr->CT = strfCT(ptr->CT, queue, ptr->AT, processNum); + printf("CT = %d\n", ptr->CT[0]); + ptr->WT = strfWT(ptr->AT, ptr->BT, ptr->CT, ptr->WT, processNum); + ptr->TAT = strfTAT(ptr->BT, ptr->WT, ptr->TAT, processNum); + display(ptr->AT, ptr->BT, ptr->WT, ptr->TAT, ptr->CT, processNum); + free(ptr); +} + +typedef struct array2 +{ + int *AT; + int *BT; + int *WT; + int *TAT; + int *CT; + int *priority; +} Array2; + +typedef struct queue +{ + int BT; + int pid; + int prority; + struct queue *next; +} queue; + +Array2 *dynAlloc2(Array2 *ptr, int processNum) +{ + ptr = (Array2 *)malloc(sizeof(Array2)); + ptr->AT = (int *)malloc(processNum * sizeof(int)); + ptr->BT = (int *)malloc(processNum * sizeof(int)); + ptr->WT = (int *)malloc(processNum * sizeof(int)); + ptr->TAT = (int *)malloc(processNum * sizeof(int)); + ptr->CT = (int *)malloc(processNum * sizeof(int)); + ptr->priority = (int *)malloc(processNum * sizeof(int)); + return ptr; +} + +Array2 *userinputPR(Array2 *ptr, int *AT, int *BT, int *priority, int processNum) +{ + printf("Enter the input in the form of 'Priority' 'Arrival Time(AT)' 'Burst Time(BT)'\n"); + for (int i = 0; i < processNum; i++) + { + scanf("%d %d %d", &priority[i], &AT[i], &BT[i]); + printf("\n"); + } + ptr->AT = AT; + ptr->BT = BT; + ptr->priority = priority; + return ptr; +} + +Array2 *sortATPR(int *AT, int *BT, int *priority, int proccessNum, Array2 *ptr) +{ + bool swapped = false; + for (int i = 0; i < proccessNum - 1; i++) + { + swapped = false; + for (int j = 0; j < proccessNum - i - 1; j++) + { + if (AT[j] > AT[j + 1]) + { + int temp = AT[j]; + AT[j] = AT[j + 1]; + AT[j + 1] = temp; + temp = BT[j]; + BT[j] = BT[j + 1]; + BT[j + 1] = temp; + temp = priority[j]; + priority[j] = priority[j + 1]; + priority[j + 1] = temp; + swapped = true; + } + } + + if (swapped == false) + { + break; + } + } + + ptr->AT = AT; + ptr->BT = BT; + ptr->priority = priority; + return ptr; +} + +queue *enqueuePR(queue *ptr, int data, int pid, int priority) +{ + queue *newNode = (queue *)malloc(sizeof(queue)); + newNode->BT = data; + newNode->pid = pid; + newNode->prority = priority; + newNode->next = NULL; + + if (ptr == NULL) + { + return newNode; + } + else if (data == 0) + { + free(newNode); + return ptr; + } + else + { + queue *current = ptr; + while (current->next != NULL) + { + current = current->next; + } + + current->next = newNode; + + return ptr; + } +} + +queue *dequeuePR(queue *ptr) +{ + if (ptr == NULL) + { + return NULL; + } + + queue *temp = ptr; + ptr = ptr->next; + free(temp); + return ptr; +} + +queue *fillListPR(int *BT, int *priority, queue *list, int processNum) +{ + + for (int i = 0; i < processNum; i++) + { + int pid = i + 1; + list = enqueuePR(list, BT[i], pid, priority[i]); + } + return list; +} + +queue *addFrontPR(queue *temp, queue *ptr) +{ + if (temp == ptr) + { + return ptr; + } + + queue *prev = NULL; + queue *current = ptr; + while (current != NULL && current != temp) + { + prev = current; + current = current->next; + } + + if (current == temp) + { + if (prev != NULL) + { + prev->next = temp->next; + } + else + { + ptr = temp->next; + } + + temp->next = ptr; + ptr = temp; + } + + return ptr; +} + +queue *maxPR(queue *ptr, int currentTime, int *AT, int processNum, int MAX_AT) +{ + queue *temp = ptr; + queue *res = ptr; + queue *temp2 = ptr; + temp2 = temp2->next; + temp = temp->next; + int priority = ptr->prority; + if (currentTime < MAX_AT) + { + for (int i = ptr->pid; i < processNum; i++) + { + if (AT[i] == currentTime && priority > temp->prority) + { + priority = temp->prority; + res = temp; + } + else if (AT[i] > currentTime) + + { + break; + } + temp = temp->next; + } + } + else + { + while (temp != NULL) + { + if (priority > temp->prority) + { + priority = temp->prority; + res = temp; + } + temp = temp->next; + } + } + while (temp2 != NULL) + { + if (AT[temp2->pid - 1] <= currentTime) + { + if (temp2->prority < res->prority) + { + res = temp2; + } + else if (temp2->prority == res->prority && temp2->pid < res->pid) + { + res = temp2; + } + } + temp2 = temp2->next; + } + return res; +} + +int *prCT(int *CT, int *AT, queue *ptr, int processNum) +{ + int currentTime = AT[0]; + int MAX_AT = maxAT(AT, processNum); + int i = 0; + while (ptr != NULL) + { + int BT = ptr->BT; + int pid = ptr->pid; + int priority = ptr->prority; + queue *temp = ptr; + if (ptr->BT != 0) + { + temp = maxPR(ptr, currentTime, AT, processNum, MAX_AT); + } + if (currentTime >= MAX_AT && ptr == temp) + { + CT[ptr->pid - 1] = currentTime + ptr->BT; + currentTime += ptr->BT; + ptr = dequeuePR(ptr); + } + else if (temp->prority == ptr->prority && temp->pid < ptr->pid) + { + ptr = dequeuePR(ptr); + ptr = enqueuePR(ptr, BT, pid, priority); + ptr = addFrontPR(temp, ptr); + } + else if (ptr->next == NULL) + { + CT[ptr->pid - 1] = currentTime + ptr->BT; + currentTime += ptr->BT; + ptr = dequeuePR(ptr); + } + else if (ptr->BT == 0) + { + CT[ptr->pid - 1] = currentTime; + currentTime += ptr->BT; + ptr = dequeuePR(ptr); + } + else if (temp->prority < ptr->prority) + { + ptr = dequeuePR(ptr); + ptr = enqueuePR(ptr, BT, pid, priority); + ptr = addFrontPR(temp, ptr); + } + else if (temp->prority == ptr->prority) + { + currentTime++; + ptr->BT--; + } + } + return CT; +} + +int *prWT(int *AT, int *BT, int *CT, int *WT, int processNum) +{ + for (int i = 0; i < processNum; i++) + { + WT[i] = CT[i] - BT[i] - AT[i]; + } + + return WT; +} + +int *prTAT(int *BT, int *WT, int *TAT, int processNum) +{ + for (int i = 0; i < processNum; i++) + { + TAT[i] = BT[i] + WT[i]; + } + + return TAT; +} + +void PR() +{ + int processNum; + printf("Enter the number of proccesses\n"); + scanf("%d", &processNum); + Array2 *ptr = dynAlloc2(ptr, processNum); + ptr = userinputPR(ptr, ptr->AT, ptr->BT, ptr->priority, processNum); + ptr = sortATPR(ptr->AT, ptr->BT, ptr->priority, processNum, ptr); + queue *queue1 = (queue *)malloc(sizeof(queue)); + queue1 = NULL; + queue1 = fillListPR(ptr->BT, ptr->priority, queue1, processNum); + ptr->CT = prCT(ptr->CT, ptr->AT, queue1, processNum); + ptr->WT = prWT(ptr->AT, ptr->BT, ptr->CT, ptr->WT, processNum); + ptr->TAT = prTAT(ptr->BT, ptr->WT, ptr->TAT, processNum); + display(ptr->AT, ptr->BT, ptr->WT, ptr->TAT, ptr->CT, processNum); + free(ptr); +} + +int *nonPRCT(int *CT, int *AT, queue *ptr, int processNum) +{ + int currentTime = AT[0]; + int MAX_AT = maxAT(AT, processNum); + while (ptr != NULL) + { + int BT = ptr->BT; + int pid = ptr->pid; + int priority = ptr->prority; + queue *temp = ptr; + queue *head = ptr; + if (ptr->BT != 0) + { + temp = maxPR(ptr, currentTime, AT, processNum, MAX_AT); + } + if (ptr == temp) + { + CT[ptr->pid - 1] = currentTime + ptr->BT; + currentTime += ptr->BT; + ptr = dequeuePR(ptr); + } + else if (currentTime >= MAX_AT && ptr == temp) + { + CT[ptr->pid - 1] = currentTime + ptr->BT; + currentTime += ptr->BT; + ptr = dequeuePR(ptr); + } + else if (temp->prority < ptr->prority) + { + CT[ptr->pid - 1] = currentTime + ptr->BT; + currentTime += ptr->BT; + ptr = dequeuePR(ptr); + ptr = addFrontPR(temp, ptr); + } + else if (temp->prority == ptr->prority && temp->pid < ptr->pid) + { + CT[ptr->pid - 1] = currentTime + ptr->BT; + currentTime += ptr->BT; + ptr = dequeuePR(ptr); + ptr = addFrontPR(temp, ptr); + } + } + + return CT; +} + +void nonPR() +{ + int processNum; + printf("Enter the number of processess\n"); + scanf("%d", &processNum); + Array2 *ptr; + ptr = dynAlloc2(ptr, processNum); + ptr = userinputPR(ptr, ptr->AT, ptr->BT, ptr->priority, processNum); + ptr = sortATPR(ptr->AT, ptr->BT, ptr->priority, processNum, ptr); + queue *queue1 = (queue *)malloc(sizeof(queue)); + queue1 = NULL; + queue1 = fillListPR(ptr->BT, ptr->priority, queue1, processNum); + ptr->CT = nonPRCT(ptr->CT, ptr->AT, queue1, processNum); + ptr->WT = prWT(ptr->AT, ptr->BT, ptr->CT, ptr->WT, processNum); + ptr->TAT = prTAT(ptr->BT, ptr->WT, ptr->TAT, processNum); + display(ptr->AT, ptr->BT, ptr->WT, ptr->TAT, ptr->CT, processNum); + free(ptr); +} + +void main() +{ + int choice; + char option; + while (choice != 6) + { + printf("Choose the CPU scheduling\n 1.FCFS\n 2.SJF\n 3.RR\n 4.STRF\n 5.PR\n 6.Exit\n"); + scanf("%d", &choice); + + switch (choice) + { + case 1: + FCFS(); + break; + + case 2: + SJF(); + break; + + case 3: + RR(); + break; + + case 4: + STRF(); + break; + + case 5: + printf("Do you want to continue with preemptive Y or N? \n"); + scanf("%c", &option); + scanf("%c", &option); + if (option == 'Y') + { + PR(); + } + else if (option == 'N') + { + nonPR(); + } + break; + + case 6: + break; + + default: + break; + } + } +} diff --git a/Calc.java b/Calc.java new file mode 100644 index 00000000..7c6e8c7b --- /dev/null +++ b/Calc.java @@ -0,0 +1,75 @@ +// Java program for simple calculator + +import java.io.*; +import java.lang.*; +import java.lang.Math; +import java.util.Scanner; +public class BasicCalculator { + + public static void main(String[] args) + { + // stores two numbers + double num1, num2; + + // Take input from the user + Scanner sc = new Scanner(System.in); + + System.out.println("Enter the numbers"); + + // take the inputs + num1 = sc.nextDouble(); + + num2 = sc.nextDouble(); + + System.out.println("Enter the operator (+,-,*,/)"); + + char op = sc.next().charAt(0); + + double o = 0; + + switch (op) { + + // case to add two numbers + case '+': + + o = num1 + num2; + + break; + + // case to subtract two numbers + case '-': + + o = num1 - num2; + + break; + + // case to multiply two numbers + case '*': + + o = num1 * num2; + + break; + + // case to divide two numbers + case '/': + + o = num1 / num2; + + break; + + default: + + System.out.println("You enter wrong input"); + + break; + } + + System.out.println("The final result:"); + + System.out.println(); + + // print the final result + System.out.println(num1 + " " + op + " " + num2 + + " = " + o); + } +} diff --git a/Calculator using Java/.idea/.gitignore b/Calculator using Java/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/Calculator using Java/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Calculator using Java/.idea/misc.xml b/Calculator using Java/.idea/misc.xml new file mode 100644 index 00000000..639900d1 --- /dev/null +++ b/Calculator using Java/.idea/misc.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager"> + <output url="file://$PROJECT_DIR$/out" /> + </component> +</project> \ No newline at end of file diff --git a/Calculator using Java/.idea/modules.xml b/Calculator using Java/.idea/modules.xml new file mode 100644 index 00000000..5e5fbe23 --- /dev/null +++ b/Calculator using Java/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/Calculator using Java.iml" filepath="$PROJECT_DIR$/Calculator using Java.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/Calculator using Java/.idea/vcs.xml b/Calculator using Java/.idea/vcs.xml new file mode 100644 index 00000000..6c0b8635 --- /dev/null +++ b/Calculator using Java/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="$PROJECT_DIR$/.." vcs="Git" /> + </component> +</project> \ No newline at end of file diff --git a/Calculator using Java/Calc.java b/Calculator using Java/Calc.java new file mode 100644 index 00000000..f495f631 --- /dev/null +++ b/Calculator using Java/Calc.java @@ -0,0 +1,170 @@ +package simplejavacalculator; + +import static java.lang.Double.NaN; +import static java.lang.Math.log10; +import static java.lang.Math.pow; + + + + +public class Calculator { + + public enum BiOperatorModes { + + normal, add, minus, multiply, divide , xpowerofy + + } + + public enum MonoOperatorModes { + + square, squareRoot, oneDividedBy, cos, sin, tan ,log , rate, abs + + } + + private double num1, num2; + + private BiOperatorModes mode = BiOperatorModes.normal; + + private double calculateBiImpl() { + + if (mode == BiOperatorModes.normal) { + + return num2; + + } + + if (mode == BiOperatorModes.add) { + + if (num2 != 0) { + + return num1 + num2; + + } + + return num1; + + } + + if (mode == BiOperatorModes.minus) { + + return num1 - num2; + + } + + if (mode == BiOperatorModes.multiply) { + + return num1 * num2; + + } + + if (mode == BiOperatorModes.divide) { + + return num1 / num2; + + } + + if (mode == BiOperatorModes.xpowerofy) { + + return pow(num1,num2); + + } + + // never reach + + throw new Error(); + + } + + public Double calculateBi(BiOperatorModes newMode, Double num) { + + if (mode == BiOperatorModes.normal) { + + num2 = 0.0; + + num1 = num; + + mode = newMode; + + return NaN; + + } else { + + num2 = num; + + num1 = calculateBiImpl(); + + mode = newMode; + + return num1; + + } + + } + + public Double calculateEqual(Double num) { + + return calculateBi(BiOperatorModes.normal, num); + + } + + public Double reset() { + + num2 = 0.0; + + num1 = 0.0; + + mode = BiOperatorModes.normal; + + return NaN; + + } + + public Double calculateMono(MonoOperatorModes newMode, Double num) { + + if (newMode == MonoOperatorModes.square) { + + return num * num; + + } + + if (newMode == MonoOperatorModes.squareRoot) { + + return Math.sqrt(num); + + } + + if (newMode == MonoOperatorModes.oneDividedBy) { + + return 1 / num; + + } + + if (newMode == MonoOperatorModes.cos) { + + return Math.cos(Math.toRadians(num)); + + } + + if (newMode == MonoOperatorModes.sin) { + + return Math.sin(Math.toRadians(num)); + + } + + if (newMode == MonoOperatorModes.tan) { + if (num == 0 || num % 180 == 0) { + return 0.0; + } + if (num % 90 == 0 && num % 180 != 0) { + return NaN; + } + return Math.tan(Math.toRadians(num)); + } + + if (newMode == MonoOperatorModes.log) { + return log10(num); + } + + if (newMode == MonoOperatorModes.rate) { + return num / 100; + } diff --git a/Calculator using Java/Calculator using Java.iml b/Calculator using Java/Calculator using Java.iml new file mode 100644 index 00000000..6aed9d6e --- /dev/null +++ b/Calculator using Java/Calculator using Java.iml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" packagePrefix="simplejavacalculator" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/Calculator using Java/Calculator.java b/Calculator using Java/Calculator.java new file mode 100644 index 00000000..bff77a17 --- /dev/null +++ b/Calculator using Java/Calculator.java @@ -0,0 +1,182 @@ +package simplejavacalculator; + +import static java.lang.Double.NaN; +import static java.lang.Math.log10; +import static java.lang.Math.pow; + + + + +public class Calculator { + + public enum BiOperatorModes { + + normal, add, minus, multiply, divide , xpowerofy + + } + + public enum MonoOperatorModes { + + square, squareRoot, oneDividedBy, cos, sin, tan ,log , rate, abs + + } + + private double num1, num2; + + private BiOperatorModes mode = BiOperatorModes.normal; + + private double calculateBiImpl() { + + if (mode == BiOperatorModes.normal) { + + return num2; + + } + + if (mode == BiOperatorModes.add) { + + if (num2 != 0) { + + return num1 + num2; + + } + + return num1; + + } + + if (mode == BiOperatorModes.minus) { + + return num1 - num2; + + } + + if (mode == BiOperatorModes.multiply) { + + return num1 * num2; + + } + + if (mode == BiOperatorModes.divide) { + + return num1 / num2; + + } + + if (mode == BiOperatorModes.xpowerofy) { + + return pow(num1,num2); + + } + + // never reach + + throw new Error(); + + } + + public Double calculateBi(BiOperatorModes newMode, Double num) { + + if (mode == BiOperatorModes.normal) { + + num2 = 0.0; + + num1 = num; + + mode = newMode; + + return NaN; + + } else { + + num2 = num; + + num1 = calculateBiImpl(); + + mode = newMode; + + return num1; + + } + + } + + public Double calculateEqual(Double num) { + + return calculateBi(BiOperatorModes.normal, num); + + } + + public Double reset() { + + num2 = 0.0; + + num1 = 0.0; + + mode = BiOperatorModes.normal; + + return NaN; + + } + + public Double calculateMono(MonoOperatorModes newMode, Double num) { + + if (newMode == MonoOperatorModes.square) { + + return num * num; + + } + + if (newMode == MonoOperatorModes.squareRoot) { + + return Math.sqrt(num); + + } + + if (newMode == MonoOperatorModes.oneDividedBy) { + + return 1 / num; + + } + + if (newMode == MonoOperatorModes.cos) { + + return Math.cos(Math.toRadians(num)); + + } + + if (newMode == MonoOperatorModes.sin) { + + return Math.sin(Math.toRadians(num)); + + } + + if (newMode == MonoOperatorModes.tan) { + + if (num == 0 || num % 180 == 0) { + + return 0.0; + + } + + if (num % 90 == 0 && num % 180 != 0) { + + return NaN; + + } + + return Math.tan(Math.toRadians(num)); + + } + + if (newMode == MonoOperatorModes.log) { + + return log10(num); + + } + + if (newMode == MonoOperatorModes.rate) { + + return num / 100; + + } diff --git a/Calculator using Java/newfile b/Calculator using Java/newfile new file mode 100644 index 00000000..d1998aba --- /dev/null +++ b/Calculator using Java/newfile @@ -0,0 +1,74 @@ +//Digital Clock mini project + + + +import javax.swing.*; +import java.awt.*; +import java.text.SimpleDateFormat; +import java.util.Calendar; + +public class Clock extends JFrame { + + Calendar calendar; + SimpleDateFormat timeFormat; + SimpleDateFormat dayFormat; + SimpleDateFormat dateFormat; + + JLabel timeLabel; + JLabel dayLabel; + JLabel dateLabel; + String time; + String day; + String date; + Clock() { + this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + this.setTitle("Digital Clock"); + this.setLayout(new FlowLayout()); + this.setSize(350, 220); + this.setResizable(false); + + timeFormat = new SimpleDateFormat("hh:mm:ss a"); + dayFormat=new SimpleDateFormat("EEEE"); + dateFormat=new SimpleDateFormat("dd MMMMM, yyyy"); + timeLabel = new JLabel(); + timeLabel.setFont(new Font("SANS_SERIF", Font.PLAIN, 59)); + timeLabel.setBackground(Color.BLACK); + timeLabel.setForeground(Color.WHITE); + timeLabel.setOpaque(true); + dayLabel=new JLabel(); + dayLabel.setFont(new Font("Ink Free",Font.BOLD,34)); + + dateLabel=new JLabel(); + dateLabel.setFont(new Font("Ink Free",Font.BOLD,30)); + + + this.add(timeLabel); + this.add(dayLabel); + this.add(dateLabel); + this.setVisible(true); + + setTimer(); + } + + public void setTimer() { + while (true) { + time = timeFormat.format(Calendar.getInstance().getTime()); + timeLabel.setText(time); + + day = dayFormat.format(Calendar.getInstance().getTime()); + dayLabel.setText(day); + + date = dateFormat.format(Calendar.getInstance().getTime()); + dateLabel.setText(date); + + try { + Thread.sleep(1000); + } catch (Exception e) { + e.getStackTrace(); + } + } + } + public static void main(String[] args) { + new Clock(); + } +} diff --git a/Calculator-OOPS/Add.java b/Calculator-OOPS/Add.java new file mode 100644 index 00000000..aa44f5f8 --- /dev/null +++ b/Calculator-OOPS/Add.java @@ -0,0 +1,11 @@ +public class Add implements Operate{ + @Override + public Double getResult(Double... numbers){ + Double sum = 0.0; + + for(Double num: numbers){ + sum += num; + } + return sum; + } +} diff --git a/Calculator-OOPS/Calculator.java b/Calculator-OOPS/Calculator.java new file mode 100644 index 00000000..3c7b3f6d --- /dev/null +++ b/Calculator-OOPS/Calculator.java @@ -0,0 +1,50 @@ +import java.util.Arrays; +import java.util.LinkedList; +import java.util.Objects; +import java.util.Queue; + +public class Calculator { + public static void main(String[] args){ + final String inputExp = ReadInput.read(); + + Queue<String> operations; + Queue<String> numbers; + + String[] numbersArr = inputExp.split("[-+*/%]"); +// String[] operArr = inputExp.split("[0-9]+"); + String[] operArr = inputExp.split("\\d+"); + numbers = new LinkedList<>(Arrays.asList(numbersArr)); + operations = new LinkedList<>(Arrays.asList(operArr)); + + Double res = Double.parseDouble(Objects.requireNonNull(numbers.poll())); + + while(!numbers.isEmpty()){ + String opr = operations.poll(); + + Operate operate; + switch(Objects.requireNonNull(opr)){ + case "+": + operate = new Add(); + break; + case "-": + operate = new Sub(); + break; + case "*": + operate = new Multiply(); + break; + case "/": + operate = new Divide(); + break; + case "%": + operate = new Modulus(); + break; + default: + continue; + } + Double num = Double.parseDouble(Objects.requireNonNull(numbers.poll())); + res = operate.getResult(res, num); + } + + System.out.println(res); + } +} \ No newline at end of file diff --git a/Calculator-OOPS/Divide.java b/Calculator-OOPS/Divide.java new file mode 100644 index 00000000..d7e00dd8 --- /dev/null +++ b/Calculator-OOPS/Divide.java @@ -0,0 +1,11 @@ +public class Divide implements Operate { + @Override + public Double getResult(Double... numbers){ + Double div = numbers[0]; + + for(int i=1;i< numbers.length;i++){ + div /= numbers[i]; + } + return div; + } +} diff --git a/Calculator-OOPS/Modulus.java b/Calculator-OOPS/Modulus.java new file mode 100644 index 00000000..0edf4197 --- /dev/null +++ b/Calculator-OOPS/Modulus.java @@ -0,0 +1,11 @@ +public class Modulus implements Operate{ + @Override + public Double getResult(Double... numbers){ + Double mod = numbers[0]; + + for (int i = 1; i < numbers.length; i++) { + mod %= numbers[i]; + } + return mod; + } +} diff --git a/Calculator-OOPS/Multiply.java b/Calculator-OOPS/Multiply.java new file mode 100644 index 00000000..b5f1981a --- /dev/null +++ b/Calculator-OOPS/Multiply.java @@ -0,0 +1,12 @@ +public class Multiply implements Operate { + @Override + public Double getResult(Double... numbers){ + Double mul = 1.0; + + for(Double num: numbers){ + mul *= num; + } + return mul; + } + +} diff --git a/Calculator-OOPS/Operate.java b/Calculator-OOPS/Operate.java new file mode 100644 index 00000000..35f62bd8 --- /dev/null +++ b/Calculator-OOPS/Operate.java @@ -0,0 +1,3 @@ +public interface Operate { + Double getResult(Double... numbers); +} diff --git a/Calculator-OOPS/ReadInput.java b/Calculator-OOPS/ReadInput.java new file mode 100644 index 00000000..9452bb2b --- /dev/null +++ b/Calculator-OOPS/ReadInput.java @@ -0,0 +1,13 @@ +import java.util.Scanner; + +public class ReadInput { + public static String read(){ + Scanner scanner = new Scanner(System.in); + + System.out.println("Input Expression Example: 4*3/2"); + String inputLine = scanner.nextLine(); + + scanner.close(); + return inputLine; + } +} \ No newline at end of file diff --git a/Calculator-OOPS/Sub.java b/Calculator-OOPS/Sub.java new file mode 100644 index 00000000..64842120 --- /dev/null +++ b/Calculator-OOPS/Sub.java @@ -0,0 +1,11 @@ +public class Sub implements Operate{ + @Override + public Double getResult(Double... numbers){ + Double sub = numbers[0]; + + for(int i=1;i< numbers.length;i++){ + sub -= numbers[i]; + } + return sub; + } +} diff --git a/Calculator-project/.DS_Store b/Calculator-project/.DS_Store new file mode 100644 index 00000000..beb3ab12 Binary files /dev/null and b/Calculator-project/.DS_Store differ diff --git a/Calculator-project/.classpath b/Calculator-project/.classpath new file mode 100644 index 00000000..a8965644 --- /dev/null +++ b/Calculator-project/.classpath @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" output="target/classes" path="src/main/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + <attribute name="optional" value="true"/> + </attributes> + </classpathentry> + <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + <attribute name="test" value="true"/> + <attribute name="optional" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" path="target/generated-sources/annotations"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + <attribute name="ignore_optional_problems" value="true"/> + <attribute name="m2e-apt" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + <attribute name="ignore_optional_problems" value="true"/> + <attribute name="m2e-apt" value="true"/> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="target/classes"/> +</classpath> diff --git a/Calculator-project/.gitignore b/Calculator-project/.gitignore new file mode 100644 index 00000000..7667d29a --- /dev/null +++ b/Calculator-project/.gitignore @@ -0,0 +1,7 @@ +# Intellij +.idea/ +out/ +*.iml + +# Maven +target/ \ No newline at end of file diff --git a/Calculator-project/.project b/Calculator-project/.project new file mode 100644 index 00000000..70fea0ab --- /dev/null +++ b/Calculator-project/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>Calculator</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> + <filteredResources> + <filter> + <id>1665915642182</id> + <name></name> + <type>30</type> + <matcher> + <id>org.eclipse.core.resources.regexFilterMatcher</id> + <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> + </matcher> + </filter> + </filteredResources> +</projectDescription> diff --git a/Calculator-project/.settings/org.eclipse.jdt.apt.core.prefs b/Calculator-project/.settings/org.eclipse.jdt.apt.core.prefs new file mode 100644 index 00000000..d4313d4b --- /dev/null +++ b/Calculator-project/.settings/org.eclipse.jdt.apt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.apt.aptEnabled=false diff --git a/Calculator-project/.settings/org.eclipse.jdt.core.prefs b/Calculator-project/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..1b6e1ef2 --- /dev/null +++ b/Calculator-project/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Calculator-project/.settings/org.eclipse.m2e.core.prefs b/Calculator-project/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 00000000..f897a7f1 --- /dev/null +++ b/Calculator-project/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/Calculator-project/LICENSE b/Calculator-project/LICENSE new file mode 100644 index 00000000..879af7cc --- /dev/null +++ b/Calculator-project/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Houari Zegai + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Calculator-project/README.md b/Calculator-project/README.md new file mode 100644 index 00000000..eaaef01e --- /dev/null +++ b/Calculator-project/README.md @@ -0,0 +1,28 @@ +# Calculator App +A very basic calculator application created with Java **Swing**. + +[](LICENSE) + +## Thank You! +Please ⭐️ this repo and share it with others + +### Screenshots +Scientific / Dark | Standard / Colored +:------------------:|:------------------- + |  + +### Requirements 🔧 +* Java version 8 or higher. + +### Installation 🔌 +1. Press the **Fork** button (top right the page) to save copy of this project on your account. + +2. Download the repository files (project) from the download section or clone this project by typing in the bash the following command: + + git clone https://github.com/HouariZegai/Calculator.git +3. Imported it in Intellij IDEA or any other Java IDE. +4. Run the application :D + +### Contributing 💡 +If you want to contribute to this project and make it better with new ideas, your pull request is very welcomed. +If you find any issue just put it in the repository issue section, thank you. diff --git a/Calculator-project/pom.xml b/Calculator-project/pom.xml new file mode 100644 index 00000000..738bf59c --- /dev/null +++ b/Calculator-project/pom.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>com.houari</groupId> + <artifactId>Calculator</artifactId> + <version>1.0-SNAPSHOT</version> + + <properties> + <maven.compiler.source>8</maven.compiler.source> + <maven.compiler.target>8</maven.compiler.target> + </properties> + + <dependencies> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>5.7.0</version> + <scope>test</scope> + </dependency> + </dependencies> +</project> \ No newline at end of file diff --git a/Calculator-project/screenshots/colored.PNG b/Calculator-project/screenshots/colored.PNG new file mode 100644 index 00000000..a30cba6d Binary files /dev/null and b/Calculator-project/screenshots/colored.PNG differ diff --git a/Calculator-project/screenshots/dark.PNG b/Calculator-project/screenshots/dark.PNG new file mode 100644 index 00000000..c4765a71 Binary files /dev/null and b/Calculator-project/screenshots/dark.PNG differ diff --git a/Calculator-project/screenshots/simple.PNG b/Calculator-project/screenshots/simple.PNG new file mode 100644 index 00000000..db749b39 Binary files /dev/null and b/Calculator-project/screenshots/simple.PNG differ diff --git a/Calculator-project/src/.DS_Store b/Calculator-project/src/.DS_Store new file mode 100644 index 00000000..6fbb4b54 Binary files /dev/null and b/Calculator-project/src/.DS_Store differ diff --git a/Calculator-project/src/main/.DS_Store b/Calculator-project/src/main/.DS_Store new file mode 100644 index 00000000..a5860c78 Binary files /dev/null and b/Calculator-project/src/main/.DS_Store differ diff --git a/Calculator-project/src/main/java/.DS_Store b/Calculator-project/src/main/java/.DS_Store new file mode 100644 index 00000000..fea48306 Binary files /dev/null and b/Calculator-project/src/main/java/.DS_Store differ diff --git a/Calculator-project/src/main/java/com/.DS_Store b/Calculator-project/src/main/java/com/.DS_Store new file mode 100644 index 00000000..cbdbe99a Binary files /dev/null and b/Calculator-project/src/main/java/com/.DS_Store differ diff --git a/Calculator-project/src/main/java/com/houarizegai/.DS_Store b/Calculator-project/src/main/java/com/houarizegai/.DS_Store new file mode 100644 index 00000000..0260a203 Binary files /dev/null and b/Calculator-project/src/main/java/com/houarizegai/.DS_Store differ diff --git a/Calculator-project/src/main/java/com/houarizegai/calculator/Calculator.java b/Calculator-project/src/main/java/com/houarizegai/calculator/Calculator.java new file mode 100644 index 00000000..6017df90 --- /dev/null +++ b/Calculator-project/src/main/java/com/houarizegai/calculator/Calculator.java @@ -0,0 +1,626 @@ +package com.houarizegai.calculator; + +import java.awt.Cursor; +import java.awt.Font; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.util.function.Consumer; +import java.util.regex.Pattern; +import java.awt.Color; +import javax.swing.*; +import java.lang.Math; + +public class Calculator { + + private static final int WINDOW_WIDTH = 410; + private static final int WINDOW_HEIGHT = 600; + private static final int BUTTON_WIDTH = 80; + private static final int BUTTON_HEIGHT = 70; + private static final int MARGIN_X = 20; + private static final int MARGIN_Y = 60; + + private JFrame window; // Main window + private JComboBox<String> comboCalcType, comboTheme; + private JTextField inText; // Input + private JButton btnC, btnBack, btnMod, btnDiv, btnMul, btnSub, btnAdd, + btn0, btn1, btn2, btn3, btn4, btn5, btn6, btn7, btn8, btn9, + btnPoint, btnEqual, btnRoot, btnPower, btnLog; + + private char opt = ' '; // Save the operator + private boolean go = true; // For calculate with Opt != (=) + private boolean addWrite = true; // Connect numbers in display + private double val = 0; // Save the value typed for calculation + + /* + Mx Calculator: + X = Row + Y = Column + + +-------------------+ + | +-----------+ | y[0] + | | | | + | +-----------+ | + | | + | C <- % / | y[1] + | 7 8 9 * | y[2] + | 4 5 6 - | y[3] + | 1 2 3 + | y[4] + | . 0 = | y[5] + +-------------------+ + x[0] x[1] x[2] x[3] + + */ + + /* + +-------------------+ + | +-----------+ | y[0] + | | | | + | +-----------+ | + | | + | 0 1 1 3 | y[1] + | 4 5 6 7 | y[2] + | 8 9 10 11 | y[3] + | 12 13 14 15 | y[4] + | 16 17 18 | y[5] + +-------------------+ + x[0] x[1] x[2] x[3] + + */ + + public Calculator() { + window = new JFrame("Calculator"); + window.setSize(WINDOW_WIDTH, WINDOW_HEIGHT); + window.setLocationRelativeTo(null); // Move window to center + + comboTheme = initCombo(new String[]{"Simple", "Colored", "DarkTheme"}, 230, 30, "Theme", themeSwitchEventConsumer); + + comboCalcType = initCombo(new String[]{"Standard", "Scientific"}, 20, 30, "Calculator type", calcTypeSwitchEventConsumer); + + int[] x = {MARGIN_X, MARGIN_X + 90, 200, 290, 380}; + int[] y = {MARGIN_Y, MARGIN_Y + 100, MARGIN_Y + 180, MARGIN_Y + 260, MARGIN_Y + 340, MARGIN_Y + 420}; + + inText = new JTextField("0"); + inText.setBounds(x[0], y[0], 350, 70); + inText.setEditable(false); + inText.setBackground(Color.WHITE); + inText.setFont(new Font("Comic Sans MS", Font.PLAIN, 33)); + window.add(inText); + + btnC = initBtn("C", x[0], y[1], event -> { + repaintFont(); + inText.setText("0"); + opt = ' '; + val = 0; + }); + + btnBack = initBtn("<-", x[1], y[1], event -> { + repaintFont(); + String str = inText.getText(); + StringBuilder str2 = new StringBuilder(); + for (int i = 0; i < (str.length() - 1); i++) { + str2.append(str.charAt(i)); + } + if (str2.toString().equals("")) { + inText.setText("0"); + } else { + inText.setText(str2.toString()); + } + }); + + btnMod = initBtn("%", x[2], y[1], event -> { + repaintFont(); + if (Pattern.matches("([-]?\\d+[.]\\d*)|(\\d+)", inText.getText())) + if (go) { + val = calc(val, inText.getText(), opt); + if (Pattern.matches("[-]?[\\d]+[.][0]*", String.valueOf(val))) { + inText.setText(String.valueOf((int) val)); + } else { + inText.setText(String.valueOf(val)); + } + opt = '%'; + go = false; + addWrite = false; + } + }); + + btnDiv = initBtn("/", x[3], y[1], event -> { + repaintFont(); + if (Pattern.matches("([-]?\\d+[.]\\d*)|(\\d+)", inText.getText())) + if (go) { + val = calc(val, inText.getText(), opt); + if (Pattern.matches("[-]?[\\d]+[.][0]*", String.valueOf(val))) { + inText.setText(String.valueOf((int) val)); + } else { + inText.setText(String.valueOf(val)); + } + opt = '/'; + go = false; + addWrite = false; + } else { + opt = '/'; + } + }); + + btn7 = initBtn("7", x[0], y[2], event -> { + repaintFont(); + if (addWrite) { + if (Pattern.matches("[0]*", inText.getText())) { + inText.setText("7"); + } else { + inText.setText(inText.getText() + "7"); + } + } else { + inText.setText("7"); + addWrite = true; + } + go = true; + }); + + btn8 = initBtn("8", x[1], y[2], event -> { + repaintFont(); + if (addWrite) { + if (Pattern.matches("[0]*", inText.getText())) { + inText.setText("8"); + } else { + inText.setText(inText.getText() + "8"); + } + } else { + inText.setText("8"); + addWrite = true; + } + go = true; + }); + + btn9 = initBtn("9", x[2], y[2], event -> { + repaintFont(); + if (addWrite) { + if (Pattern.matches("[0]*", inText.getText())) { + inText.setText("9"); + } else { + inText.setText(inText.getText() + "9"); + } + } else { + inText.setText("9"); + addWrite = true; + } + go = true; + }); + + btnMul = initBtn("*", x[3], y[2], event -> { + repaintFont(); + if (Pattern.matches("([-]?\\d+[.]\\d*)|(\\d+)", inText.getText())) + if (go) { + val = calc(val, inText.getText(), opt); + if (Pattern.matches("[-]?[\\d]+[.][0]*", String.valueOf(val))) { + inText.setText(String.valueOf((int) val)); + } else { + inText.setText(String.valueOf(val)); + } + opt = '*'; + go = false; + addWrite = false; + } else { + opt = '*'; + } + }); + + btn4 = initBtn("4", x[0], y[3], event -> { + repaintFont(); + if (addWrite) { + if (Pattern.matches("[0]*", inText.getText())) { + inText.setText("4"); + } else { + inText.setText(inText.getText() + "4"); + } + } else { + inText.setText("4"); + addWrite = true; + } + go = true; + }); + + btn5 = initBtn("5", x[1], y[3], event -> { + repaintFont(); + if (addWrite) { + if (Pattern.matches("[0]*", inText.getText())) { + inText.setText("5"); + } else { + inText.setText(inText.getText() + "5"); + } + } else { + inText.setText("5"); + addWrite = true; + } + go = true; + }); + + btn6 = initBtn("6", x[2], y[3], event -> { + repaintFont(); + if (addWrite) { + if (Pattern.matches("[0]*", inText.getText())) { + inText.setText("6"); + } else { + inText.setText(inText.getText() + "6"); + } + } else { + inText.setText("6"); + addWrite = true; + } + go = true; + }); + + btnSub = initBtn("-", x[3], y[3], event -> { + repaintFont(); + if (Pattern.matches("([-]?\\d+[.]\\d*)|(\\d+)", inText.getText())) + if (go) { + val = calc(val, inText.getText(), opt); + if (Pattern.matches("[-]?[\\d]+[.][0]*", String.valueOf(val))) { + inText.setText(String.valueOf((int) val)); + } else { + inText.setText(String.valueOf(val)); + } + + opt = '-'; + go = false; + addWrite = false; + } else { + opt = '-'; + } + }); + + btn1 = initBtn("1", x[0], y[4], event -> { + repaintFont(); + if (addWrite) { + if (Pattern.matches("[0]*", inText.getText())) { + inText.setText("1"); + } else { + inText.setText(inText.getText() + "1"); + } + } else { + inText.setText("1"); + addWrite = true; + } + go = true; + }); + + btn2 = initBtn("2", x[1], y[4], event -> { + repaintFont(); + if (addWrite) { + if (Pattern.matches("[0]*", inText.getText())) { + inText.setText("2"); + } else { + inText.setText(inText.getText() + "2"); + } + } else { + inText.setText("2"); + addWrite = true; + } + go = true; + }); + + btn3 = initBtn("3", x[2], y[4], event -> { + repaintFont(); + if (addWrite) { + if (Pattern.matches("[0]*", inText.getText())) { + inText.setText("3"); + } else { + inText.setText(inText.getText() + "3"); + } + } else { + inText.setText("3"); + addWrite = true; + } + go = true; + }); + + btnAdd = initBtn("+", x[3], y[4], event -> { + repaintFont(); + if (Pattern.matches("([-]?\\d+[.]\\d*)|(\\d+)", inText.getText())) + if (go) { + val = calc(val, inText.getText(), opt); + if (Pattern.matches("[-]?[\\d]+[.][0]*", String.valueOf(val))) { + inText.setText(String.valueOf((int) val)); + } else { + inText.setText(String.valueOf(val)); + } + opt = '+'; + go = false; + addWrite = false; + } else { + opt = '+'; + } + }); + + btnPoint = initBtn(".", x[0], y[5], event -> { + repaintFont(); + if (addWrite) { + if (!inText.getText().contains(".")) { + inText.setText(inText.getText() + "."); + } + } else { + inText.setText("0."); + addWrite = true; + } + go = true; + }); + + btn0 = initBtn("0", x[1], y[5], event -> { + repaintFont(); + if (addWrite) { + if (Pattern.matches("[0]*", inText.getText())) { + inText.setText("0"); + } else { + inText.setText(inText.getText() + "0"); + } + } else { + inText.setText("0"); + addWrite = true; + } + go = true; + }); + + btnEqual = initBtn("=", x[2], y[5], event -> { + if (Pattern.matches("([-]?\\d+[.]\\d*)|(\\d+)", inText.getText())) + if (go) { + val = calc(val, inText.getText(), opt); + if (Pattern.matches("[-]?[\\d]+[.][0]*", String.valueOf(val))) { + inText.setText(String.valueOf((int) val)); + } else { + inText.setText(String.valueOf(val)); + } + opt = '='; + addWrite = false; + } + }); + btnEqual.setSize(2 * BUTTON_WIDTH + 10, BUTTON_HEIGHT); + + btnRoot = initBtn("√", x[4], y[1], event -> { + if (Pattern.matches("([-]?\\d+[.]\\d*)|(\\d+)", inText.getText())) + if (go) { + val = Math.sqrt(Double.parseDouble(inText.getText())); + if (Pattern.matches("[-]?[\\d]+[.][0]*", String.valueOf(val))) { + inText.setText(String.valueOf((int) val)); + } else { + inText.setText(String.valueOf(val)); + } + opt = '√'; + addWrite = false; + } + }); + btnRoot.setVisible(false); + + btnPower = initBtn("pow", x[4], y[2], event -> { + repaintFont(); + if (Pattern.matches("([-]?\\d+[.]\\d*)|(\\d+)", inText.getText())) + if (go) { + val = calc(val, inText.getText(), opt); + if (Pattern.matches("[-]?[\\d]+[.][0]*", String.valueOf(val))) { + inText.setText(String.valueOf((int) val)); + } else { + inText.setText(String.valueOf(val)); + } + opt = '^'; + go = false; + addWrite = false; + } else { + opt = '^'; + } + }); + btnPower.setFont(new Font("Comic Sans MS", Font.PLAIN, 24)); + btnPower.setVisible(false); + + btnLog = initBtn("ln", x[4], y[3], event -> { + if (Pattern.matches("([-]?\\d+[.]\\d*)|(\\d+)", inText.getText())) + if (go) { + val = Math.log(Double.parseDouble(inText.getText())); + if (Pattern.matches("[-]?[\\d]+[.][0]*", String.valueOf(val))) { + inText.setText(String.valueOf((int) val)); + } else { + inText.setText(String.valueOf(val)); + } + opt = 'l'; + addWrite = false; + } + }); + btnLog.setVisible(false); + + window.setLayout(null); + window.setResizable(false); + window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Close button clicked? = End The process + window.setVisible(true); + } + + private JComboBox<String> initCombo(String[] items, int x, int y, String toolTip, Consumer consumerEvent) { + JComboBox<String> combo = new JComboBox<>(items); + combo.setBounds(x, y, 140, 25); + combo.setToolTipText(toolTip); + combo.setCursor(new Cursor(Cursor.HAND_CURSOR)); + combo.addItemListener(consumerEvent::accept); + window.add(combo); + + return combo; + } + + private JButton initBtn(String label, int x, int y, ActionListener event) { + JButton btn = new JButton(label); + btn.setBounds(x, y, BUTTON_WIDTH, BUTTON_HEIGHT); + btn.setFont(new Font("Comic Sans MS", Font.PLAIN, 28)); + btn.setCursor(new Cursor(Cursor.HAND_CURSOR)); + btn.addActionListener(event); + btn.setFocusable(false); + window.add(btn); + + return btn; + } + + public double calc(double x, String input, char opt) { + inText.setFont(inText.getFont().deriveFont(Font.PLAIN)); + double y = Double.parseDouble(input); + switch (opt) { + case '+': + return x + y; + case '-': + return x - y; + case '*': + return x * y; + case '/': + return x / y; + case '%': + return x % y; + case '^': + return Math.pow(x, y); + default: + inText.setFont(inText.getFont().deriveFont(Font.PLAIN)); + return y; + } + } + + private void repaintFont() { + inText.setFont(inText.getFont().deriveFont(Font.PLAIN)); + } + + private Consumer<ItemEvent> calcTypeSwitchEventConsumer = event -> { + if (event.getStateChange() != ItemEvent.SELECTED) return; + + String selectedItem = (String) event.getItem(); + switch (selectedItem) { + case "Standard": + window.setSize(WINDOW_WIDTH, WINDOW_HEIGHT); + btnRoot.setVisible(false); + btnPower.setVisible(false); + btnLog.setVisible(false); + break; + case "Scientific": + window.setSize(WINDOW_WIDTH + 80, WINDOW_HEIGHT); + btnRoot.setVisible(true); + btnPower.setVisible(true); + btnLog.setVisible(true); + break; + } + }; + + private Consumer<ItemEvent> themeSwitchEventConsumer = event -> { + if (event.getStateChange() != ItemEvent.SELECTED) return; + + String selectedTheme = (String) event.getItem(); + switch (selectedTheme) { + case "Simple": + window.getContentPane().setBackground(null); + btnC.setBackground(null); + btnBack.setBackground(null); + btnMod.setBackground(null); + btnDiv.setBackground(null); + btnMul.setBackground(null); + btnSub.setBackground(null); + btnAdd.setBackground(null); + btnRoot.setBackground(null); + btnLog.setBackground(null); + btnPower.setBackground(null); + btnEqual.setBackground(null); + btn0.setBackground(null); + btn1.setBackground(null); + btn2.setBackground(null); + btn3.setBackground(null); + btn4.setBackground(null); + btn5.setBackground(null); + btn6.setBackground(null); + btn7.setBackground(null); + btn8.setBackground(null); + btn9.setBackground(null); + btnPoint.setBackground(null); + + btnC.setForeground(Color.BLACK); + btnBack.setForeground(Color.BLACK); + btnMod.setForeground(Color.BLACK); + btnDiv.setForeground(Color.BLACK); + btnMul.setForeground(Color.BLACK); + btnSub.setForeground(Color.BLACK); + btnAdd.setForeground(Color.BLACK); + btnEqual.setForeground(Color.BLACK); + btnLog.setForeground(Color.BLACK); + btnPower.setForeground(Color.BLACK); + btnRoot.setForeground(Color.BLACK); + break; + case "Colored": + window.getContentPane().setBackground(null); + btnC.setBackground(Color.RED); + btnBack.setBackground(Color.ORANGE); + btnMod.setBackground(Color.GREEN); + btnDiv.setBackground(Color.PINK); + btnMul.setBackground(Color.PINK); + btnSub.setBackground(Color.PINK); + btnAdd.setBackground(Color.PINK); + btnRoot.setBackground(Color.PINK); + btnLog.setBackground(Color.PINK); + btnPower.setBackground(Color.PINK); + btnEqual.setBackground(Color.BLUE); + btn0.setBackground(Color.WHITE); + btn1.setBackground(Color.WHITE); + btn2.setBackground(Color.WHITE); + btn3.setBackground(Color.WHITE); + btn4.setBackground(Color.WHITE); + btn5.setBackground(Color.WHITE); + btn6.setBackground(Color.WHITE); + btn7.setBackground(Color.WHITE); + btn8.setBackground(Color.WHITE); + btn9.setBackground(Color.WHITE); + btnPoint.setBackground(Color.WHITE); + + btnC.setForeground(new Color(255, 0, 0)); + btnBack.setForeground(new Color(255, 255, 0)); + btnMod.setForeground(new Color(0, 128, 0)); + btnDiv.setForeground(new Color(170, 51, 106)); + btnMul.setForeground(new Color(170, 51, 106)); + btnSub.setForeground(new Color(170, 51, 106)); + btnAdd.setForeground(new Color(170, 51, 106)); + btnEqual.setForeground(new Color(0, 0, 139)); + btnLog.setForeground(new Color(170, 51, 106)); + btnPower.setForeground(new Color(170, 51, 106)); + btnRoot.setForeground(new Color(170, 51, 106)); + break; + case "DarkTheme": + final Color primaryDarkColor = new Color(141, 38, 99); + final Color secondaryDarkColor = new Color(171, 171, 171); + + window.getContentPane().setBackground(new Color(68, 68, 68)); + btn0.setBackground(secondaryDarkColor); + btn1.setBackground(secondaryDarkColor); + btn2.setBackground(secondaryDarkColor); + btn3.setBackground(secondaryDarkColor); + btn4.setBackground(secondaryDarkColor); + btn5.setBackground(secondaryDarkColor); + btn6.setBackground(secondaryDarkColor); + btn7.setBackground(secondaryDarkColor); + btn8.setBackground(secondaryDarkColor); + btn9.setBackground(secondaryDarkColor); + btnPoint.setBackground(secondaryDarkColor); + + btnC.setForeground(secondaryDarkColor); + btnBack.setForeground(secondaryDarkColor); + btnMod.setForeground(secondaryDarkColor); + btnDiv.setForeground(secondaryDarkColor); + btnMul.setForeground(secondaryDarkColor); + btnSub.setForeground(secondaryDarkColor); + btnAdd.setForeground(secondaryDarkColor); + btnEqual.setForeground(secondaryDarkColor); + btnLog.setForeground(secondaryDarkColor); + btnPower.setForeground(secondaryDarkColor); + btnRoot.setForeground(secondaryDarkColor); + btnC.setBackground(primaryDarkColor); + btnBack.setBackground(primaryDarkColor); + btnMod.setBackground(primaryDarkColor); + btnDiv.setBackground(primaryDarkColor); + btnMul.setBackground(primaryDarkColor); + btnSub.setBackground(primaryDarkColor); + btnAdd.setBackground(primaryDarkColor); + btnRoot.setBackground(primaryDarkColor); + btnLog.setBackground(primaryDarkColor); + btnPower.setBackground(primaryDarkColor); + btnEqual.setBackground(primaryDarkColor); + } + }; + + public static void main(String[] args) { + new Calculator(); + } +} \ No newline at end of file diff --git a/Calculator-project/src/test/java/com/houarizegai/calculator/CalculatorTest.java b/Calculator-project/src/test/java/com/houarizegai/calculator/CalculatorTest.java new file mode 100644 index 00000000..7ec01158 --- /dev/null +++ b/Calculator-project/src/test/java/com/houarizegai/calculator/CalculatorTest.java @@ -0,0 +1,36 @@ +package com.houarizegai.calculator; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +class CalculatorTest { + + private Calculator calculator; + + @BeforeEach + void setUp() { // Create object before compilation + calculator = new Calculator(); + } + + /* + * testCalc() test method + */ + @Test + void testCalc() { + double first = 3; + String second = "5"; + + try { + Assertions.assertEquals(8, calculator.calc(first, second, '+')); + Assertions.assertEquals(-2, calculator.calc(first, second, '-')); + Assertions.assertEquals(15, calculator.calc(first, second, '*')); + Assertions.assertEquals(0.6, calculator.calc(first, second, '/')); + Assertions.assertEquals(3d, calculator.calc(first, second, '%')); + Assertions.assertEquals(243, calculator.calc(first, second, '^')); + } catch (Exception e) { + e.printStackTrace(); + } + + } +} diff --git a/Calculator.java b/Calculator.java new file mode 100644 index 00000000..f5d22d55 --- /dev/null +++ b/Calculator.java @@ -0,0 +1,61 @@ +// Java program for simple calculator +import java.io.*; +import java.lang.*; +import java.lang.Math; +import java.util.Scanner; + +// Driver class +public class BasicCalculator { + // main function + public static void main(String[] args) + { + // Stores two numbers + double num1, num2; + + // Take input from the user + Scanner sc = new Scanner(System.in); + + System.out.println("Enter the numbers:"); + + // Take the inputs + num1 = sc.nextDouble(); + num2 = sc.nextDouble(); + + System.out.println("Enter the operator (+,-,*,/):"); + + char op = sc.next().charAt(0); + double o = 0; + + switch (op) { + // case to add two numbers + case '+': + o = num1 + num2; + break; + + // case to subtract two numbers + case '-': + o = num1 - num2; + break; + + // case to multiply two numbers + case '*': + o = num1 * num2; + break; + + // case to divide two numbers + case '/': + o = num1 / num2; + break; + + default: + System.out.println("You enter wrong input"); + } + + System.out.println("The final result:"); + System.out.println(); + + // print the final result + System.out.println(num1 + " " + op + " " + num2 + + " = " + o); + } +} diff --git a/Calculator.py b/Calculator.py new file mode 100644 index 00000000..a6b902e3 --- /dev/null +++ b/Calculator.py @@ -0,0 +1,19 @@ +import sys + +# Check number of strings passed +if len(sys.argv) != 4: + print("Usage: python Calculator.py operand1 operator operand2") + sys.exit() + +# Determine the operator +if sys.argv[2][0] == '+': + result = eval(sys.argv[1]) + eval(sys.argv[3]) +elif sys.argv[2][0] == '-': + result = eval(sys.argv[1]) - eval(sys.argv[3]) +elif sys.argv[2][0] == '*': + result = eval(sys.argv[1]) * eval(sys.argv[3]) +elif sys.argv[2][0] == '/': + result = eval(sys.argv[1]) / eval(sys.argv[3]) + +# Display result +print(sys.argv[1], sys.argv[2], sys.argv[3], "=", result) diff --git a/CalculatorAWT.java b/CalculatorAWT.java new file mode 100644 index 00000000..8913bac8 --- /dev/null +++ b/CalculatorAWT.java @@ -0,0 +1,266 @@ +import java.awt.*; +import java.awt.event.*; +class MyCalc extends WindowAdapter implements ActionListener{ + Frame f; +Label l1; +Button b1,b2,b3,b4,b5,b6,b7,b8,b9,b0; +Button badd,bsub,bmult,bdiv,bmod,bcalc,bclr,bpts,bneg,bback; +double xd; +double num1,num2,check; + +MyCalc(){ + f= new Frame("MY CALCULATOR"); +// INSTANTIATING COMPONENETS +l1=new Label(); +l1.setBackground(Color.LIGHT_GRAY); +l1.setBounds(50,50,260,60); + + +b1=new Button("1"); + b1.setBounds(50,340,50,50); +b2=new Button("2"); + b2.setBounds(120,340,50,50); +b3=new Button("3"); + b3.setBounds(190,340,50,50); +b4=new Button("4"); + b4.setBounds(50,270,50,50); +b5=new Button("5"); + b5.setBounds(120,270,50,50); +b6=new Button("6"); + b6.setBounds(190,270,50,50); +b7=new Button("7"); + b7.setBounds(50,200,50,50); +b8=new Button("8"); + b8.setBounds(120,200,50,50); +b9=new Button("9"); + b9.setBounds(190,200,50,50); +b0=new Button("0"); + b0.setBounds(120,410,50,50); +bneg=new Button("+/-"); + bneg.setBounds(50,410,50,50); +bpts=new Button("."); + bpts.setBounds(190,410,50,50); +bback=new Button("back"); + bback.setBounds(120,130,50,50); + +badd=new Button("+"); + badd.setBounds(260,340,50,50); +bsub=new Button("-"); + bsub.setBounds(260,270,50,50); +bmult=new Button("*"); + bmult.setBounds(260,200,50,50); +bdiv=new Button("/"); + bdiv.setBounds(260,130,50,50); +bmod=new Button("%"); + bmod.setBounds(190,130,50,50); +bcalc=new Button("="); + bcalc.setBounds(245,410,65,50); +bclr=new Button("CE"); + bclr.setBounds(50,130,65,50); + + +b1.addActionListener(this); +b2.addActionListener(this); +b3.addActionListener(this); +b4.addActionListener(this); +b5.addActionListener(this); +b6.addActionListener(this); +b7.addActionListener(this); +b8.addActionListener(this); +b9.addActionListener(this); +b0.addActionListener(this); + +bpts.addActionListener(this); +bneg.addActionListener(this); +bback.addActionListener(this); + +badd.addActionListener(this); +bsub.addActionListener(this); +bmult.addActionListener(this); +bdiv.addActionListener(this); +bmod.addActionListener(this); +bcalc.addActionListener(this); +bclr.addActionListener(this); + +f.addWindowListener(this); +//ADDING TO FRAME +f.add(l1); +f.add(b1); f.add(b2); f.add(b3); f.add(b4); f.add(b5);f.add(b6); f.add(b7); f.add(b8);f.add(b9);f.add(b0); + +f.add(badd); f.add(bsub); f.add(bmod); f.add(bmult); f.add(bdiv); f.add(bmod);f.add(bcalc); + +f.add(bclr); f.add(bpts);f.add(bneg); f.add(bback); + +f.setSize(360,500); +f.setLayout(null); +f.setVisible(true); +} + //FOR CLOSING THE WINDOW +public void windowClosing(WindowEvent e) { + f.dispose(); +} + +public void actionPerformed(ActionEvent e){ + String z,zt; + //NUMBER BUTTON +if(e.getSource()==b1){ + zt=l1.getText(); + z=zt+"1"; + l1.setText(z); +} +if(e.getSource()==b2){ +zt=l1.getText(); +z=zt+"2"; +l1.setText(z); +} +if(e.getSource()==b3){ + zt=l1.getText(); + z=zt+"3"; + l1.setText(z); +} +if(e.getSource()==b4){ + zt=l1.getText(); + z=zt+"4"; + l1.setText(z); +} +if(e.getSource()==b5){ + zt=l1.getText(); + z=zt+"5"; + l1.setText(z); +} +if(e.getSource()==b6){ + zt=l1.getText(); + z=zt+"6"; + l1.setText(z); +} +if(e.getSource()==b7){ + zt=l1.getText(); + z=zt+"7"; + l1.setText(z); +} +if(e.getSource()==b8){ + zt=l1.getText(); + z=zt+"8"; + l1.setText(z); +} +if(e.getSource()==b9){ + zt=l1.getText(); + z=zt+"9"; + l1.setText(z); +} +if(e.getSource()==b0){ + zt=l1.getText(); + z=zt+"0"; + l1.setText(z); +} + +if(e.getSource()==bpts){ //ADD DECIMAL PTS + zt=l1.getText(); + z=zt+"."; + l1.setText(z); +} +if(e.getSource()==bneg){ //FOR NEGATIVE + zt=l1.getText(); + z="-"+zt; + l1.setText(z); +} + +if(e.getSource()==bback){ // FOR BACKSPACE + zt=l1.getText(); + try{ + z=zt.substring(0, zt.length()-1); + }catch(StringIndexOutOfBoundsException f){return;} + l1.setText(z); +} + //AIRTHMETIC BUTTON +if(e.getSource()==badd){ //FOR ADDITION + try{ + num1=Double.parseDouble(l1.getText()); + }catch(NumberFormatException f){ + l1.setText("Invalid Format"); + return; + } + z=""; + l1.setText(z); + check=1; +} +if(e.getSource()==bsub){ //FOR SUBTRACTION + try{ + num1=Double.parseDouble(l1.getText()); + }catch(NumberFormatException f){ + l1.setText("Invalid Format"); + return; + } + z=""; + l1.setText(z); + check=2; +} +if(e.getSource()==bmult){ //FOR MULTIPLICATION + try{ + num1=Double.parseDouble(l1.getText()); + }catch(NumberFormatException f){ + l1.setText("Invalid Format"); + return; + } + z=""; + l1.setText(z); + check=3; +} +if(e.getSource()==bdiv){ //FOR DIVISION + try{ + num1=Double.parseDouble(l1.getText()); + }catch(NumberFormatException f){ + l1.setText("Invalid Format"); + return; + } + z=""; + l1.setText(z); + check=4; +} +if(e.getSource()==bmod){ //FOR MOD/REMAINDER + try{ + num1=Double.parseDouble(l1.getText()); + }catch(NumberFormatException f){ + l1.setText("Invalid Format"); + return; + } + z=""; + l1.setText(z); + check=5; +} + //RESULT BUTTON +if(e.getSource()==bcalc){ + try{ + num2=Double.parseDouble(l1.getText()); + }catch(Exception f){ + l1.setText("ENTER NUMBER FIRST "); + return; + } + if(check==1) + xd =num1+num2; + if(check==2) + xd =num1-num2; + if(check==3) + xd =num1*num2; + if(check==4) + xd =num1/num2; + if(check==5) + xd =num1%num2; + l1.setText(String.valueOf(xd)); +} + //FOR CLEARING THE LABEL and Memory +if(e.getSource()==bclr){ + num1=0; + num2=0; + check=0; + xd=0; + z=""; + l1.setText(z); + } + +} +//MAIN METHOD where objects of MyCalc is instantaiated + public static void main(String args[]){ + new MyCalc(); + } +} diff --git a/Calculator_frame.java b/Calculator_frame.java new file mode 100644 index 00000000..1be2261b --- /dev/null +++ b/Calculator_frame.java @@ -0,0 +1,207 @@ +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.awt.event.WindowEvent; +import java.awt.event.WindowListener; +public class Calculator_frame extends Frame implements ActionListener +{ + TextField tf; + Label l1,l2; + Button b1, b2, b3, b4, b5, b6, b7,b8, b9, b0, bA, bM, c, eq, bD, bS; + String s = ""; + + public Calculator_frame() { + l1=new Label("Calculator X"); + l1.setBounds(100,30,100,30); + l1.setFont(new Font("Verdana", Font.BOLD, 15)); + tf = new TextField(); + setSize(300,350); + + tf.setBounds(10, 60, 200, 30); + tf.setText("0"); + tf.setEditable(false); + + b9 = new Button("9"); + b9.setBounds(10,90, 40, 40); + b9.setActionCommand("b9"); + b9.addActionListener(this); + b9.setBackground(Color.LIGHT_GRAY); + + b8 = new Button("8"); + b8.setBounds(50,90, 40, 40); + b8.setActionCommand("b8"); + b8.addActionListener(this); + + b7 = new Button("7"); + b7.setBounds(90,90, 40, 40); + b7.setActionCommand("b7"); + b7.addActionListener(this); + + b6 = new Button("6"); + b6.setBounds(10,130, 40, 40); + b6.setActionCommand("b6"); + b6.addActionListener(this); + + b5 = new Button("5"); + b5.setBounds(50,130, 40, 40); + b5.setActionCommand("b5"); + b5.addActionListener(this); + + b4 = new Button("4"); + b4.setBounds(90,130, 40, 40); + b4.setActionCommand("b4"); + b4.addActionListener(this); + + b3 = new Button("3"); + b3.setBounds(10,170, 40, 40); + b3.setActionCommand("b3"); + b3.addActionListener(this); + + b2 = new Button("2"); + b2.setBounds(50,170, 40, 40); + b2.setActionCommand("b2"); + b2.addActionListener(this); + + b1 = new Button("1"); + b1.setBounds(90,170, 40, 40); + b1.setActionCommand("b1"); + b1.addActionListener(this); + + b0 = new Button("0"); + b0.setBounds(10,210, 40, 40); + b0.setActionCommand("b0"); + b0.addActionListener(this); + + eq = new Button("="); + eq.setBounds(50,210, 80, 40); + eq.setActionCommand("eq"); + eq.addActionListener(this); + + c = new Button("C"); + c.setBounds(130,90, 80, 40); + c.setActionCommand("c"); + c.addActionListener(this); + + bA = new Button("+"); + bA.setBounds(130,130, 40, 40); + bA.setActionCommand("bA"); + bA.addActionListener(this); + + bS = new Button("-"); + bS.setBounds(170,130, 40, 40); + bS.setActionCommand("bS"); + bS.addActionListener(this); + + bM = new Button("X"); + bM.setBounds(130,170, 40, 40); + bM.setActionCommand("bM"); + bM.addActionListener(this); + + bD = new Button("/"); + bD.setBounds(170,170, 40, 40); + bD.setActionCommand("bD"); + bD.addActionListener(this); + l2=new Label("Made By: Rajesh"); + l2.setBounds(10,250,250,40); + add(l1);add(tf);add(b9);add(b8);add(b7);add(b6);add(b5);add(b4);add(b3);add(b2);add(b1);add(b0);add(eq); + add(c);add(bA);add(bS);add(bM);add(bD);add(l2); + + addWindowListener(new WindowListener() { + public void windowOpened(WindowEvent e) {} + public void windowIconified(WindowEvent e) {} + public void windowDeiconified(WindowEvent e) {} + public void windowDeactivated(WindowEvent e) {} + public void windowClosing(WindowEvent e) { dispose();} + public void windowClosed(WindowEvent e) {} + public void windowActivated(WindowEvent e) {} + }); + + addKeyListener(new KeyListener() { + public void keyTyped(KeyEvent e) { + char c=e.getKeyChar(); + switch(c) + { + case '1': s=s.concat("1");tf.setText(s); + break; + } + } + public void keyReleased(KeyEvent e) {} + public void keyPressed(KeyEvent e) {} + + }); + setLayout(null); + setVisible(true); + + } + public int calcString(String a){ + String operators[]=a.split("[0-9]+"); + String operands[]=a.split("\\+|\\-|x|\\/",0); + + /*StringBuffer sb = new StringBuffer(); + for(int i = 0; i < operands.length; i++) { + sb.append(operands[i]); + } + String str = sb.toString(); + System.out.println(str);*/ + + int agregate = Integer.parseInt(operands[0]); + for(int i=1;i<operands.length;i++){ + if(operators[i].equals("+")) + agregate += Integer.parseInt(operands[i]); + if(operators[i].equals("-")) + agregate -= Integer.parseInt(operands[i]); + if(operators[i].equals("x")) + agregate *= Integer.parseInt(operands[i]); + if(operators[i].equals("/")) + agregate /= Integer.parseInt(operands[i]); + } + return agregate; + } + + public void actionPerformed(ActionEvent e) + { + String c=e.getActionCommand(); + switch(c) + { + case "b0" :s=s.concat("0");tf.setText(s); + break; + case "b1" :s=s.concat("1");tf.setText(s); + break; + case "b2" :s=s.concat("2");tf.setText(s); + break; + case "b3" : s+="3";tf.setText(s); + break; + case "b4" : s=s.concat("4");tf.setText(s); + break; + case "b5" : s=s.concat("5");tf.setText(s); + break; + case "b6" : s=s.concat("6");tf.setText(s); + break; + case "b7" : s=s.concat("7");tf.setText(s); + break; + case "b8" : s=s.concat("8");tf.setText(s); + break; + case "b9" : s=s.concat("9");tf.setText(s); + break; + case "c" : tf.setText("0");s=new String(""); + break; + case "eq" : s=Integer.toString(calcString(s));tf.setText(s);s=new String(""); + break; + case "bA" : s=s.concat("+");tf.setText(s); + break; + case "bS" : s=s.concat("-");tf.setText(s); + break; + case "bD" : s=s.concat("/");tf.setText(s); + break; + case "bM" : s=s.concat("x");tf.setText(s); + } + + } + public static void main(String[] args) + { + new Calculator_frame(); + } + +} diff --git a/Calorie Calculator/CalorieCalculator.java b/Calorie Calculator/CalorieCalculator.java new file mode 100644 index 00000000..4dd2f685 --- /dev/null +++ b/Calorie Calculator/CalorieCalculator.java @@ -0,0 +1,115 @@ +import java.util.Scanner; + +public class CalorieCalculator { + + // Constants for BMR formula coefficients and activity multipliers + private static final double MALE_BMR_CONSTANT = 88.362; + private static final double FEMALE_BMR_CONSTANT = 447.593; + private static final double MALE_WEIGHT_COEFFICIENT = 13.397; + private static final double FEMALE_WEIGHT_COEFFICIENT = 9.247; + private static final double MALE_HEIGHT_COEFFICIENT = 4.799; + private static final double FEMALE_HEIGHT_COEFFICIENT = 3.098; + private static final double MALE_AGE_COEFFICIENT = 5.677; + private static final double FEMALE_AGE_COEFFICIENT = 4.330; + + private static final double SEDENTARY_MULTIPLIER = 1.2; + private static final double MODERATE_MULTIPLIER = 1.55; + private static final double ACTIVE_MULTIPLIER = 1.725; + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + // Prompt the user for information + System.out.println("Calorie Calculator"); + + System.out.print("Enter your gender (M/F): "); + String gender = scanner.nextLine().trim().toUpperCase(); + + if (!gender.equals("M") && !gender.equals("F")) { + System.out.println("Invalid gender input. Please enter 'M' or 'F'."); + return; + } + + System.out.print("Enter your age (in years): "); + int age = getValidIntInput(scanner); + + System.out.print("Enter your weight (in kilograms): "); + double weight = getValidDoubleInput(scanner); + + System.out.print("Enter your height (in centimeters): "); + double height = getValidDoubleInput(scanner); + + System.out.print("Enter your activity level (sedentary/moderate/active): "); + String activityLevel = scanner.nextLine().trim().toLowerCase(); + + if (!isValidActivityLevel(activityLevel)) { + System.out.println("Invalid activity level input. Please choose 'sedentary', 'moderate', or 'active'."); + return; + } + + // Calculate BMR + double bmr = calculateBMR(gender, age, weight, height); + + // Calculate daily calorie needs based on activity level + double calorieNeeds = calculateCalorieNeeds(bmr, activityLevel); + + // Display the results + System.out.printf("Your Basal Metabolic Rate (BMR) is: %.0f calories per day.\n", bmr); + System.out.printf("Your estimated daily calorie needs are: %.0f calories per day.\n", calorieNeeds); + + scanner.close(); + } + + // Method to get a valid integer input from the user + private static int getValidIntInput(Scanner scanner) { + while (!scanner.hasNextInt()) { + System.out.println("Invalid input. Please enter a valid integer."); + scanner.next(); // Clear invalid input + } + return scanner.nextInt(); + } + + // Method to get a valid double input from the user + private static double getValidDoubleInput(Scanner scanner) { + while (!scanner.hasNextDouble()) { + System.out.println("Invalid input. Please enter a valid number."); + scanner.next(); // Clear invalid input + } + return scanner.nextDouble(); + } + + // Method to check if the activity level is valid + private static boolean isValidActivityLevel(String activityLevel) { + return activityLevel.equals("sedentary") || activityLevel.equals("moderate") || activityLevel.equals("active"); + } + + // Method to calculate BMR + private static double calculateBMR(String gender, int age, double weight, double height) { + double bmr; + if (gender.equals("M")) { + bmr = MALE_BMR_CONSTANT + (MALE_WEIGHT_COEFFICIENT * weight) + (MALE_HEIGHT_COEFFICIENT * height) - (MALE_AGE_COEFFICIENT * age); + } else { + bmr = FEMALE_BMR_CONSTANT + (FEMALE_WEIGHT_COEFFICIENT * weight) + (FEMALE_HEIGHT_COEFFICIENT * height) - (FEMALE_AGE_COEFFICIENT * age); + } + return bmr; + } + + // Method to calculate calorie needs based on activity level + private static double calculateCalorieNeeds(double bmr, String activityLevel) { + double calorieNeeds; + switch (activityLevel) { + case "sedentary": + calorieNeeds = bmr * SEDENTARY_MULTIPLIER; + break; + case "moderate": + calorieNeeds = bmr * MODERATE_MULTIPLIER; + break; + case "active": + calorieNeeds = bmr * ACTIVE_MULTIPLIER; + break; + default: + throw new IllegalArgumentException("Invalid activity level"); + } + return calorieNeeds; + } +} diff --git a/CandyVendor.java b/CandyVendor.java new file mode 100644 index 00000000..3f9d7fff --- /dev/null +++ b/CandyVendor.java @@ -0,0 +1,68 @@ +import java.util.Scanner; + +public class CandyVendor { + + private int candies; + private int money; + + public CandyVendor(int can) { + this.candies = can; + this.money = 0; + } + + public int buy(int amt) { + if (amt < 1 || candies == 0) { + return 0; + } + + if (amt > candies) { + amt = candies; + } + + candies -= amt; + money += amt; + + return amt; + } + + public void print() { + System.out.println("Candies left: " + candies); + System.out.println("Money collected: " + money); + } + + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + System.out.println("Welcome to the candy vending machine!"); + + int candies = sc.nextInt(); + + CandyVendor vendor = new CandyVendor(candies); + + while (true) { + System.out.println("How much money do you want to insert?"); + + int money = sc.nextInt(); + + int candiesDispensed = vendor.buy(money); + + if (candiesDispensed == 0) { + System.out.println("Not enough candies or money!"); + } else { + System.out.println("Here are your candies!"); + } + + vendor.print(); + + System.out.println("Do you want to buy more candy? (y/n)"); + + String choice = sc.next(); + + if (!choice.equalsIgnoreCase("y")) { + break; + } + } + + sc.close(); + } +} \ No newline at end of file diff --git a/CanvasDemo.py b/CanvasDemo.py new file mode 100644 index 00000000..fe785349 --- /dev/null +++ b/CanvasDemo.py @@ -0,0 +1,76 @@ +from tkinter import * # Import tkinter + +class CanvasDemo: + def __init__(self): + window = Tk() # Create a window + window.title("Canvas Demo") # Set title + + # Place self.canvas in the window + self.canvas = Canvas(window, width = 200, height = 100, + bg = "white") + self.canvas.pack() + + # Place buttons in frame + frame = Frame(window) + frame.pack() + btRectangle = Button(frame, text = "Rectangle", + command = self.displayRect) + btOval = Button(frame, text = "Oval", + command = self.displayOval) + btArc = Button(frame, text = "Arc", + command = self.displayArc) + btPolygon = Button(frame, text = "Polygon", + command = self.displayPolygon) + btLine = Button(frame, text = "Line", + command = self.displayLine) + btString = Button(frame, text = "String", + command = self.displayString) + btClear = Button(frame, text = "Clear", + command = self.clearCanvas) + btRectangle.grid(row = 1, column = 1) + btOval.grid(row = 1, column = 2) + btArc.grid(row = 1, column = 3) + btPolygon.grid(row = 1, column = 4) + btLine.grid(row = 1, column = 5) + btString.grid(row = 1, column = 6) + btClear.grid(row = 1, column = 7) + + window.mainloop() # Create an event loop + + # Display a rectangle + def displayRect(self): + self.canvas.create_rectangle(10, 10, 190, 90, tags = "rect") + + # Display an oval + def displayOval(self): + self.canvas.create_oval(10, 10, 190, 90, fill = "red", + tags = "oval") + + # Display an arc + def displayArc(self): + self.canvas.create_arc(10, 10, 190, 90, start = 0, + extent = 90, width = 8, fill = "red", tags = "arc") + + # Display a polygon + def displayPolygon(self): + self.canvas.create_polygon(10, 10, 190, 90, 30, 50, + tags = "polygon") + + # Display a line + def displayLine(self): + self.canvas.create_line(10, 10, 190, 90, fill = "red", + tags = "line") + self.canvas.create_line(10, 90, 190, 10, width = 9, + arrow = "last", activefill = "blue", tags = "line") + + # Display a string + def displayString(self): + self.canvas.create_text(60, 40, text = "Hi, I am a string", + font = "Times 10 bold underline", tags = "string") + + # Clear drawings + def clearCanvas(self): + self.canvas.delete("rect", "oval", "arc", "polygon", + "line", "string") + +CanvasDemo() # Create GUI \ No newline at end of file diff --git a/Challenge.java b/Challenge.java new file mode 100644 index 00000000..9bcee0e0 --- /dev/null +++ b/Challenge.java @@ -0,0 +1,51 @@ +import java.util.Scanner; +public class Challenge { + static boolean isLeapYear(int n) { + if (n % 100 == 0) { + return (n % 400) == 0; + } else { + return n % 4 == 0; + } + } + static int numLYunsorted(int[] a){ + int count=0; + for (int j : a) { + if (isLeapYear(j)) { + count++; + } + } + return count; + } + public static void main(String[] args){ + Scanner sc = new Scanner(System.in); + + System.out.println("Enter the Lower and Upper range."); + System.out.print("\nlower range:"); + int l=sc.nextInt(); + System.out.print("upper range:"); + int u=sc.nextInt(); +// int res1=numLYrange(l,u); + + System.out.println("Enter no. of years in the sorted list:"); + int n=sc.nextInt(); + int[] arry = new int[n]; + System.out.println("Enter the list of years:"); + for(int i=0;i<n;i++){ + arry[i]=sc.nextInt(); + } + int res1=numLYunsorted(arry); +// int res2=numLYunsorted(arry); + System.out.println("Enter no. of years in the unsorted list:"); + int n1=sc.nextInt(); + int[] arry1 = new int[n1]; + System.out.println("Enter the list of years:"); + for(int i=0;i<n1;i++){ + arry1[i]=sc.nextInt(); + } + int res2=numLYunsorted(arry1); + + System.out.println("The difference in both number of years is:"+(res1-res2)); + + sc.close(); + } +} diff --git a/ChangeClockTime.py b/ChangeClockTime.py new file mode 100644 index 00000000..12235d49 --- /dev/null +++ b/ChangeClockTime.py @@ -0,0 +1,32 @@ +from tkinter import * # Import tkinter +from StillClock import StillClock + +def setNewTime(): + clock.setHour(hour.get()) + clock.setMinute(minute.get()) + clock.setSecond(second.get()) + +window = Tk() # Create a window +window.title("Change Clock Time") # Set title + +clock = StillClock(window) # Create a clock +clock.pack() + +frame = Frame(window) +frame.pack() +Label(frame, text = "Hour: ").pack(side = LEFT) +hour = IntVar() +hour.set(clock.getHour()) +Entry(frame, textvariable = hour, width = 2).pack(side = LEFT) +Label(frame, text = "Minute: ").pack(side = LEFT) +minute = IntVar() +minute.set(clock.getMinute()) +Entry(frame, textvariable = minute, width = 2).pack(side = LEFT) +Label(frame, text = "Second: ").pack(side = LEFT) +second = IntVar() +second.set(clock.getMinute()) +Entry(frame, textvariable = second, width = 2).pack(side = LEFT) +Button(frame, text = "Set New Time", + command = setNewTime).pack(side = LEFT) + +window.mainloop() # Create an event loop \ No newline at end of file diff --git a/ChangeLabelDemo.py b/ChangeLabelDemo.py new file mode 100644 index 00000000..8ef695ae --- /dev/null +++ b/ChangeLabelDemo.py @@ -0,0 +1,47 @@ +from tkinter import * # Import tkinter + +class ChangeLabelDemo: + def __init__(self): + window = Tk() # Create a window + window.title("Change Label Demo") # Set a title + + # Add a label to frame1 + frame1 = Frame(window) # Create and add a frame to window + frame1.pack() + self.lbl = Label(frame1, text = "Programming is fun") + self.lbl.pack() + + # Add a label, an entry, a button, and two radio buttons to frame2 + frame2 = Frame(window) # Create and add a frame to window + frame2.pack() + label = Label(frame2, text = "Enter text: ") + self.msg = StringVar() + entry = Entry(frame2, textvariable = self.msg) + btChangeText = Button(frame2, text = "Change Text", + command = self.processButton) + self.v1 = StringVar() + rbRed = Radiobutton(frame2, text = "Red", bg = "red", + variable = self.v1, value = 'R', + command = self.processRadiobutton) + rbYellow = Radiobutton(frame2, text = "Yellow", + bg = "yellow", variable = self.v1, value = 'Y', + command = self.processRadiobutton) + + label.grid(row = 1, column = 1) + entry.grid(row = 1, column = 2) + btChangeText.grid(row = 1, column = 3) + rbRed.grid(row = 1, column = 4) + rbYellow.grid(row = 1, column = 5) + + window.mainloop() # Create an event loop + + def processRadiobutton(self): + if self.v1.get() == 'R': + self.lbl["fg"] = "red" + elif self.v1.get() == 'Y': + self.lbl["fg"] = "yellow" + + def processButton(self): + self.lbl["text"] = self.msg.get() # New text for the label + +ChangeLabelDemo() # Create GUI diff --git a/Chat Project/Client.java b/Chat Project/Client.java new file mode 100644 index 00000000..52249447 --- /dev/null +++ b/Chat Project/Client.java @@ -0,0 +1,90 @@ +import java.net.Socket; + +import java.net.*; +import java.io.*; + +public class Client { + +Socket socket; + +BufferedReader br; +PrintWriter out; + + +public Client(){ + + + try{ + System.out.println("Sending request to server"); + socket=new Socket("127.0.0.1",7777); + System.out.println("Connection done!!"); + + br = new BufferedReader(new InputStreamReader(socket.getInputStream())); + + out = new PrintWriter(socket.getOutputStream()); + + startReading(); + startWriting(); + +} + catch(Exception e){} +} + +public void startReading(){ + Runnable r1=()->{ + System.out.println("reader started..."); + + try{ + while(true){ + + String msg = br.readLine(); + if(msg.equals("EXIT")){System.out.println("Server terminated the chatting!!"); + socket.close(); + break;} + + System.out.println("Server : "+msg); + + + } + }catch(Exception e){System.out.print("----Connection is Closed----");} + }; + + new Thread(r1).start(); + } + + + + public void startWriting(){ + Runnable r2=()->{ + System.out.println("Writer started..."); + + try{ + while(!socket.isClosed()){ + + BufferedReader br1 = new BufferedReader(new InputStreamReader(System.in)); + + String content=br1.readLine(); + out.println(content); + out.flush(); + + if(content.equals("EXIT")){ + socket.close(); + break; + } + + System.out.print("----Connection is Closed----"); + } + }catch(Exception e){}; + }; + + new Thread(r2).start(); + } + + + + public static void main(String[] args){ + + System.out.println("this is client..."); + new Client(); + } +} diff --git a/Chat Project/Server.java b/Chat Project/Server.java new file mode 100644 index 00000000..59fd32c5 --- /dev/null +++ b/Chat Project/Server.java @@ -0,0 +1,97 @@ +import java.net.*; + +import javax.sound.sampled.SourceDataLine; + +import java.io.*; + +class Server{ + +ServerSocket server; +Socket socket; + +BufferedReader br; +PrintWriter out; + + public Server(){ + try{server = new ServerSocket(7777); + System.out.println("Server is ready to accept connection"); + System.out.println("waiting..."); + socket=server.accept(); + + br = new BufferedReader(new InputStreamReader(socket.getInputStream())); + + out = new PrintWriter(socket.getOutputStream()); + + startReading(); + startWriting(); + + + + + } catch(Exception e ){};} + + +public void startReading(){ + Runnable r1=()->{ + System.out.println("reader started..."); + + try{ + while(true){ + + String msg = br.readLine(); + if(msg.equals("EXIT")){System.out.println("Client terminated the chatting"); + socket.close(); + break;} + + System.out.println("Client : "+msg); + + + } + } catch(Exception e){System.out.print("----Connection is Closed----");} + }; + + new Thread(r1).start(); +} + + + +public void startWriting(){ + Runnable r2=()->{ + System.out.println("Writer started..."); + + try{ + while(!socket.isClosed()){ + + BufferedReader br1 = new BufferedReader(new InputStreamReader(System.in)); + + String content=br1.readLine(); + + out.println(content); + out.flush(); + + if(content.equals("EXIT")){ + socket.close(); + break; + } + + } + } catch(Exception e){System.out.print("----Connection is Closed----");}; + + }; + + new Thread(r2).start(); +} + + + + + + +public static void main(String[] args){ + System.out.println("This is server..going to start server"); + new Server(); +} + + + +} diff --git a/Chat Project/mclient.java b/Chat Project/mclient.java new file mode 100644 index 00000000..412403c3 --- /dev/null +++ b/Chat Project/mclient.java @@ -0,0 +1,43 @@ +import java.util.*; +import java.net.*; +import java.io.*; + +public class mclient { + + public static void main(String s[]) throws Exception { + Socket s1 = null; + String line = null; + DataInputStream br = null; + DataInputStream is = null; + PrintWriter os = null; + try { + s1 = new Socket("localhost", 9999); + br = new DataInputStream(System.in); + is = new DataInputStream(s1.getInputStream()); + os = new PrintWriter(s1.getOutputStream()); + + } catch (IOException e) { + System.err.print("IO Exception"); + + } + System.out.println("Enter data to server (enter QUIT to end) :-> "+s1.getRemoteSocketAddress().toString()); + String res = null; + try { + line = br.readLine(); + while (line.compareTo("QUIT") != 0) { + os.println(line); + os.flush(); + res = is.readLine(); + System.out.println("server response :-> " + res); + line = br.readLine(); + } + is.close(); + os.close(); + br.close(); + s1.close(); + System.out.println("close connection "); + } catch (IOException e) { + System.out.println("socket read error"); + } + } +} diff --git a/Chat Project/mserver.java b/Chat Project/mserver.java new file mode 100644 index 00000000..020e4d0a --- /dev/null +++ b/Chat Project/mserver.java @@ -0,0 +1,63 @@ +import java.util.*; +import java.net.*; +import java.io.*; + +public class mserver { + + public static void main(String s[]) throws Exception { + Socket sa = null; + ServerSocket ss2 = null; + System.out.println("Host starts accepting response "); + try { + ss2 = new ServerSocket(9999); + } catch (IOException e) { + System.out.println("server error"); + } + while (true) { + try { + sa = ss2.accept(); + System.out.println("connetion established by"+ ss2.getInetAddress()); + ServerThread st = new ServerThread(sa); + st.start(); + } catch (Exception e) { + System.out.println("connetion error"); + } + } + } +} + +class ServerThread extends Thread { + String line = null; + DataInputStream is = null; + PrintWriter od = null; + Socket s1 = null; + + public ServerThread(Socket s) { + s1 = s; + } ++ + public void run() { + try { + + is = new DataInputStream(s1.getInputStream()); + od = new PrintWriter(s1.getOutputStream()); + + line = is.readLine(); + + while (!line.equals("QUIT")) { + od.println(line); + od.flush(); + + System.out.println("response to client " + line); + line = is.readLine(); + + } + is.close(); + od.close(); + s1.close(); + + } catch (IOException ie) { + System.out.println("socket close error"); + } + } +} \ No newline at end of file diff --git a/CheckSudokuSolution.py b/CheckSudokuSolution.py new file mode 100644 index 00000000..ed75fd63 --- /dev/null +++ b/CheckSudokuSolution.py @@ -0,0 +1,29 @@ +# Check whether a solution is valid +def isValid(grid): + for i in range(9): + for j in range(9): + if grid[i][j] < 1 or grid[i][j] > 9 \ + or not isValidAt(i, j, grid): + return False + return True # The fixed cells are valid + +# Check whether grid[i][j] is valid in the grid +def isValidAt(i, j, grid): + # Check whether grid[i][j] is valid at the i's row + for column in range(9): + if column != j and grid[i][column] == grid[i][j]: + return False + + # Check whether grid[i][j] is valid at the j's column + for row in range(9): + if row != i and grid[row][j] == grid[i][j]: + return False + + # Check whether grid[i][j] is valid in the 3 by 3 box + for row in range((i // 3) * 3, (i // 3) * 3 + 3): + for col in range((j // 3) * 3, (j // 3) * 3 + 3): + if row != i and col != j and \ + grid[row][col] == grid[i][j]: + return False + + return True # The current value at grid[i][j] is valid diff --git a/CheckSudokuSolution.txt b/CheckSudokuSolution.txt new file mode 100644 index 00000000..ed3d11cf --- /dev/null +++ b/CheckSudokuSolution.txt @@ -0,0 +1,9 @@ +9 6 3 1 7 4 2 5 8 +1 7 8 3 2 5 6 4 9 +2 5 4 6 8 9 7 3 1 +8 2 1 4 3 7 5 9 6 +4 9 6 8 5 2 3 1 7 +7 3 5 9 6 1 8 2 4 +5 8 9 7 1 3 4 6 2 +3 1 7 2 4 6 9 8 5 +6 4 2 5 9 8 1 7 3 \ No newline at end of file diff --git a/ChessBoard.py b/ChessBoard.py new file mode 100644 index 00000000..c5dd1f39 --- /dev/null +++ b/ChessBoard.py @@ -0,0 +1,44 @@ +import turtle + +# Draw chess board borders +turtle.pensize(3) # Set pen thickness to 3 pixels +turtle.penup() # Pull the pen up +turtle.goto(-120, -120) +turtle.pendown() # Pull the pen down +turtle.color("red") + +for i in range(4): + turtle.forward(240) # Draw a line + turtle.left(90) # Turn left 90 degrees + +# Draw chess board inside +turtle.color("black") +for j in range(-120, 90, 60): + for i in range(-120, 120, 60): + turtle.penup() + turtle.goto(i, j) + turtle.pendown() + + # Draw a small rectangle + turtle.begin_fill() + for k in range(4): + turtle.forward(30) # Draw a line + turtle.left(90) # Turn left 90 degrees + turtle.end_fill() + +for j in range(-90, 120, 60): + for i in range(-90, 120, 60): + turtle.penup() + turtle.goto(i, j) + turtle.pendown() + + # Draw a small rectangle + turtle.begin_fill() + for k in range(4): + turtle.forward(30) # Draw a line + turtle.left(90) # Turn left 90 degrees + turtle.end_fill() + +turtle.hideturtle() + +turtle.done() diff --git a/Circular_queue.java b/Circular_queue.java new file mode 100644 index 00000000..c020c8b6 --- /dev/null +++ b/Circular_queue.java @@ -0,0 +1,75 @@ +public class CircularQueue { + private int[] arr; + private int front; + private int rear; + private int capacity; + private int size; + + public CircularQueue(int capacity) { + this.capacity = capacity; + this.arr = new int[capacity]; + this.front = -1; + this.rear = -1; + this.size = 0; + } + + public boolean isEmpty() { + return size == 0; + } + + public boolean isFull() { + return size == capacity; + } + + public void enqueue(int element) { + if (isFull()) { + System.out.println("Queue is full. Cannot enqueue more elements."); + return; + } + + if (isEmpty()) { + front = 0; + } + + rear = (rear + 1) % capacity; + arr[rear] = element; + size++; + } + + public int dequeue() { + if (isEmpty()) { + System.out.println("Queue is empty. Cannot dequeue elements."); + return -1; + } + + int element = arr[front]; + if (front == rear) { + front = -1; + rear = -1; + } else { + front = (front + 1) % capacity; + } + + size--; + + return element; + } + + public int front() { + if (isEmpty()) { + System.out.println("Queue is empty. No front element."); + return -1; + } + + return arr[front]; + } +} + public static void main(String[] args) { + CircularQueue queue = new CircularQueue(5); + queue.enqueue(1); + queue.enqueue(2); + queue.enqueue(3); + + System.out.println(queue.dequeue()); // Output: 1 + System.out.println(queue.front()); // Output: 2 + } diff --git a/Clue Simulator/AssistantJack.class b/Clue Simulator/AssistantJack.class new file mode 100644 index 00000000..1ae7ee13 Binary files /dev/null and b/Clue Simulator/AssistantJack.class differ diff --git a/Clue Simulator/AssistantJack.java b/Clue Simulator/AssistantJack.java new file mode 100644 index 00000000..71315e25 --- /dev/null +++ b/Clue Simulator/AssistantJack.java @@ -0,0 +1,138 @@ + +/** + * AssistantJack.java : will be asked various theories by Detective Jill, + * AssistantJack will then refute the answer or will accept the answer. If + * AssistantJack refutes the answer, you will be notified of 1 part of your + * theory that is incorrect (there may be more than one). + * + * @author Nery Chapeton-Lamas (material from Kevin Lewis) + * @version 1.0 + * + */ + +import java.util.ArrayList; +import java.util.Random; + +public class AssistantJack { + + private int timesAsked; + private Theory correctTheory; + + /** + * The default constructor but will not be called from outside. + */ + private AssistantJack() { + this.timesAsked = 0; + this.correctTheory = null; + } + + /** + * The full constructor, specifying which assistant to use (answer set 1, + * answer set 2, or random). Depending on assistant, a different correct + * Theory object is created. + * + * @param answerSet + * 1 is a fixed answer of 1,1,1 and 2 is a fixed answer of 6,10,6 + * any other integer will be randomly assigned + */ + public AssistantJack(int answerSet) { + this(); + + if (answerSet == 1) { + this.correctTheory = new Theory(1, 1, 1); + } else if (answerSet == 2) { + this.correctTheory = new Theory(6, 10, 6); + } else { + Random random = new Random(); + int weapon = random.nextInt(6) + 1; + int location = random.nextInt(10) + 1; + int person = random.nextInt(6) + 1; + this.correctTheory = new Theory(weapon, location, person); + } + } + + /** + * Creates an assistant Jack with a theory that was passed in. + * + * @param theory + * deep copied object stored as correct theory + */ + public AssistantJack(Theory theory) { + this(); + this.correctTheory = new Theory(theory); + } + + /** + * Will report to the user whether their theory is correct. It will return a + * number that needs to be interpreted (see return). Also keeps track of + * times asked by incrementing every time this method is called + * + * @param weapon + * the weapon used 1 - 6 + * @param location + * the location where it was done 1 - 10 + * @param person + * the person who did it 1 - 6 + * @return 0 if all three are correct, 1 if the weapon is incorrect, 2 if + * the location is incorrect and 3 if the person is incorrect. If + * multiple are incorrect it will randomly select one of the + * incorrect parts and return that. + */ + public int checkAnswer(int weapon, int location, int person) { + ArrayList<Integer> wrongItems = new ArrayList<Integer>(); + + this.timesAsked++; + + // check each part and add to array list appropriately + if (this.correctTheory.getWeapon() != weapon) { + wrongItems.add(1); + } + + if (this.correctTheory.getLocation() != location) { + wrongItems.add(2); + } + + if (this.correctTheory.getPerson() != person) { + wrongItems.add(3); + } + + // return based on incorrect items, if any, in array list + if (wrongItems.size() == 0) { + return 0; + } else if (wrongItems.size() == 1) { + return wrongItems.get(0); + } else { + Random random = new Random(); + int randomSelected = random.nextInt(wrongItems.size()); + return wrongItems.get(randomSelected); + } + } + + /** + * Pass through (convenient) method that converts the theory to numbers and + * sends it to the overloaded method. + * + * @param theory + * a theory of the murder, weapon and location + * + * @return 0 if all three are correct, 1 if the weapon is incorrect, 2 if + * the location is incorrect and 3 if the person is incorrect. If + * multiple are incorrect it will randomly select one of the + * incorrect parts and return that. + */ + public int checkAnswer(Theory theory) { + return this.checkAnswer(theory.getWeapon(), theory.getLocation(), theory.getPerson()); + } + + /** + * Accessor for times your AssistantJack has been asked to check a theory + * + * @return number of times AssistantJack has checkAnswer() been called + */ + public int getTimesAsked() { + return this.timesAsked; + } + + + +} \ No newline at end of file diff --git a/Clue Simulator/DetectiveJill.class b/Clue Simulator/DetectiveJill.class new file mode 100644 index 00000000..e4a343a9 Binary files /dev/null and b/Clue Simulator/DetectiveJill.class differ diff --git a/Clue Simulator/DetectiveJill.java b/Clue Simulator/DetectiveJill.java new file mode 100644 index 00000000..4b5cc608 --- /dev/null +++ b/Clue Simulator/DetectiveJill.java @@ -0,0 +1,62 @@ + +import java.util.Random; +import java.util.Scanner; + +public class DetectiveJill { + + public static void main() { + // DECLARATION + INITIALIZATION + int answerSet, solution, murder, weapon, location; + Theory answer; + AssistantJack jack; + Scanner keyboard = new Scanner(System.in); + Random random = new Random(); + + // INPUT + System.out.print("Which theory would like you like to test? (1, 2, 3[random]): "); + answerSet = keyboard.nextInt(); + keyboard.close(); + + // PROCESSING + jack = new AssistantJack(answerSet); +//START OUR WEAPON LOCATION AND MURDER AT 1 + int weapont = 1, locationt = 1, murdert = 1, total1 = 0; +//CHECK IF 1,1,1 IS CORRECT + solution = jack.checkAnswer(weapont, locationt, murdert); +//IF NOT CONTINUE WITH WHILE LOOP + while(solution != 0){ + //SWITCH BASED OF WHAT JACK SAYS IS WRONG + switch(solution){ + case 1: + //IF WEAPON IS WRONG + weapont++; + break; + case 2: + //IF LOCATION IS WRONG + locationt++; + break; + case 3: + //IF MURDER IS WRONG + murdert++; + break; + } + //CHECK SOLUTION AND IF WRONG, LOOP CONTINUES + solution = jack.checkAnswer(weapont, locationt, murdert); + } + + answer = new Theory(weapont, locationt, murdert); + + + // OUTPUT + System.out.println("Total Checks = " + jack.getTimesAsked() + ", Solution " + answer); + + if (jack.getTimesAsked() > 20) { + System.out.println("FAILED!! You're a horrible Detective...¯\\_(ツ)_/¯"); + } else { + System.out.println("WOW! You might as well be called Batman"); + + } + + } + +} \ No newline at end of file diff --git a/Clue Simulator/Main.class b/Clue Simulator/Main.class new file mode 100644 index 00000000..df9c189b Binary files /dev/null and b/Clue Simulator/Main.class differ diff --git a/Clue Simulator/Main.java b/Clue Simulator/Main.java new file mode 100644 index 00000000..787afb86 --- /dev/null +++ b/Clue Simulator/Main.java @@ -0,0 +1,17 @@ +// package edu.miracosta.cs113; +import java.util.Random; + +import java.util.Scanner; + +public class Main +{ + /** + * Driver method for random guessing approach + * + * @param args not used for driver + */ + public static void main(String[] args) { + DetectiveJill.main(); + + } +} diff --git a/Clue Simulator/RandomClue.class b/Clue Simulator/RandomClue.class new file mode 100644 index 00000000..b3229fe7 Binary files /dev/null and b/Clue Simulator/RandomClue.class differ diff --git a/Clue Simulator/RandomClue.java b/Clue Simulator/RandomClue.java new file mode 100644 index 00000000..cace3e97 --- /dev/null +++ b/Clue Simulator/RandomClue.java @@ -0,0 +1,99 @@ +/** + * RandomClue.java : Your job is to ask your AssistantJack and get the correct + * answer in <= 20 tries. RandomClue is ONE solution to the problem, + * where a set of random numbers is generated every attempt until all three + * random numbers match the solution from the AssistantJack object. + * + * This is a sample solution, a driver using random number implementation. + * You can use this file as a guide to create your own SEPARATE driver for + * your implementation that can solve it in <= 20 times consistently. + * + * @author Nery Chapeton-Lamas (material from Kevin Lewis) + * @version 1.0 + * + */ + +import java.util.Random; +import java.util.Scanner; + +public class RandomClue { + + /* + * ALGORITHM: + * + * PROMPT "Which theory to test? (1, 2, 3[random]): " + * READ answerSet + * INSTANTIATE jack = new AssistantJack(answerSet) + * DO + * weapon = random int between 1 and 6 + * location = random int between 1 and 10 + * murder = random int between 1 and 6 + * solution = jack.checkAnswer(weapon, location, murder) + * WHILE solution != 0 + * + * OUTPUT "Total checks = " + jack.getTimesAsked() + * IF jack.getTimesAsked() is greater than 20 THEN + * OUTPUT "FAILED" + * ELSE + * OUTPUT "PASSED" + * END IF + */ + + /** + * Driver method for random guessing approach + * + * @param args not used for driver + */ + public static void main() { + // DECLARATION + INITIALIZATION + int answerSet, solution, murder, weapon, location; + Theory answer; + AssistantJack jack; + Scanner keyboard = new Scanner(System.in); + Random random = new Random(); + + // INPUT + System.out.print("Which theory would like you like to test? (1, 2, 3[random]): "); + answerSet = keyboard.nextInt(); + keyboard.close(); + + // PROCESSING + jack = new AssistantJack(answerSet); +//START OUR WEAPON LOCATION AND MURDER AT 1 + int weapont = 1, locationt = 1, murdert = 1, total1 = 0; +//CHECK IF 1,1,1 IS CORRECT + solution = jack.checkAnswer(weapont, locationt, murdert); +//IF NOT CONTINUE WITH WHILE LOOP + while(solution != 0){ + //SWITCH BASED OF WHAT JACK SAYS IS WRONG + switch(solution){ + case 1: + weapont++; + break; + case 2: + locationt++; + break; + case 3: + murdert++; + break; + } + + solution = jack.checkAnswer(weapont, locationt, murdert); + } + + answer = new Theory(weapont, locationt, murdert); + + + // OUTPUT + System.out.println("Total Checks = " + jack.getTimesAsked() + ", Solution " + answer); + + if (jack.getTimesAsked() > 20) { + System.out.println("FAILED!! You're a horrible Detective...¯\\_(ツ)_/¯"); + } else { + System.out.println("WOW! You might as well be called Batman"); + + } + + } + +} \ No newline at end of file diff --git a/Clue Simulator/Theory.class b/Clue Simulator/Theory.class new file mode 100644 index 00000000..efd12928 Binary files /dev/null and b/Clue Simulator/Theory.class differ diff --git a/Clue Simulator/Theory.java b/Clue Simulator/Theory.java new file mode 100644 index 00000000..eded42b8 --- /dev/null +++ b/Clue Simulator/Theory.java @@ -0,0 +1,130 @@ +/** + * Theory.java : stores values for weapon, location, and person + * + * @author Nery Chapeton-Lamas (material from Kevin Lewis) + * @version 1.0 + * + */ + +public class Theory { + private int weapon; + private int location; + private int person; + + /** + * Full constructor, specifying each part of theory + * + * @param weapon + * integer representing weapon + * @param location + * integer representing location + * @param person + * integer representing person + * + * @see TheoryItem for values + */ + public Theory(int weapon, int location, int person) { + this.weapon = weapon; + this.location = location; + this.person = person; + } + + /** + * Copy constructor, deep copies Theory object + * + * @param other + * used to get all theory parts and deep copy + */ + public Theory(Theory other) { + this.weapon = other.weapon; + this.location = other.location; + this.person = other.person; + } + + /** + * Accessor for weapon value + * + * @return weapon integer value + */ + public int getWeapon() { + return weapon; + } + + /** + * Mutator for weapon value + * + * @param weapon + * integer value representing weapon + */ + public void setWeapon(int weapon) { + this.weapon = weapon; + } + + /** + * Accessor for location value + * + * @return location integer value + */ + public int getLocation() { + return location; + } + + /** + * Mutator for location value + * + * @param location + * integer value representing location + */ + public void setLocation(int location) { + this.location = location; + } + + /** + * Accessor for person value + * + * @return person integer value + */ + public int getPerson() { + return person; + } + + /** + * Mutator for person value + * + * @param person + * integer value representing person + */ + public void setPerson(int person) { + this.person = person; + } + + /** + * Equals method checks ALL instance variables are equal + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (obj == null || this.getClass() != obj.getClass()) { + return false; + } + + Theory other = (Theory) obj; + + return (this.weapon != other.weapon || this.person != other.person || this.location != other.location); + + } + + /** + * toString representing objects values + * + * @return formatted string of weapon, person, and location + */ + @Override + public String toString() { + return String.format("Theory is: Weapon = %s (%d), Person = %s (%d), Location = %s (%d)", + TheoryItem.getWeaponName(this.weapon), this.weapon, TheoryItem.getPersonName(this.person), this.person, + TheoryItem.getLocationName(this.location), this.location); + } + +} \ No newline at end of file diff --git a/Clue Simulator/TheoryItem.class b/Clue Simulator/TheoryItem.class new file mode 100644 index 00000000..28f69c08 Binary files /dev/null and b/Clue Simulator/TheoryItem.class differ diff --git a/Clue Simulator/TheoryItem.java b/Clue Simulator/TheoryItem.java new file mode 100644 index 00000000..a1a72593 --- /dev/null +++ b/Clue Simulator/TheoryItem.java @@ -0,0 +1,283 @@ +/** + * TheoryItem.java : Convenient class helps to keep track of different kinds of + * murders, locations, and weapons. Constants can be used as limits (1 - + * constant value), static methods mostly used for error checking or translating + * between Strings and integers + * + * @author Nery Chapeton-Lamas (material from Kevin Lewis) + * @version 1.0 + * + */ + +public final class TheoryItem { + + public static final int TOTAL_MURDERS = 6; + public static final int TOTAL_LOCATIONS = 10; + public static final int TOTAL_WEAPONS = 6; + + /** + * Converts location integer to String: Kitchen (1), Ballroom (2), + * Conservatory (3), Billiard (4), Library (5), Study (6), Hall (7), Lounge + * (8), Dining (9), Cellar (10). + * + * @param location + * integer to convert to String + * @return String version of location number, null if invalid integer + */ + public static String getLocationName(int location) { + String locationName = null; + + switch (location) { + case 1: + locationName = "Kitchen"; + break; + case 2: + locationName = "Ballroom"; + break; + case 3: + locationName = "Conservatory"; + break; + case 4: + locationName = "Billiard"; + break; + case 5: + locationName = "Library"; + break; + case 6: + locationName = "Study"; + break; + case 7: + locationName = "Hall"; + break; + case 8: + locationName = "Lounge"; + break; + case 9: + locationName = "Dining"; + break; + case 10: + locationName = "Cellar"; + break; + } + return locationName; + } + + /** + * Converts location String to integer: Kitchen (1), Ballroom (2), + * Conservatory (3), Billiard (4), Library (5), Study (6), Hall (7), Lounge + * (8), Dining (9), Cellar (10). + * + * @param location + * String to convert to integer + * @return integer version of location String, 0 if invalid String + */ + public static int getLocationNumber(String location) { + int locationNumber = 0; + + switch (location.toLowerCase()) { + case "kitchen": + locationNumber = 1; + break; + case "ballroom": + locationNumber = 2; + break; + case "conservatory": + locationNumber = 3; + break; + case "billiard": + locationNumber = 4; + break; + case "library": + locationNumber = 5; + break; + case "study": + locationNumber = 6; + break; + case "hall": + locationNumber = 7; + break; + case "lounge": + locationNumber = 8; + break; + case "dining": + locationNumber = 9; + break; + case "cellar": + locationNumber = 10; + break; + } + return locationNumber; + } + + /** + * Checks validity of location number + * + * @param location + * integer representing location + * @return true if valid (1-10), false otherwise + */ + public static boolean validateLocationNumber(int location) { + return (location >= 1 && location <= 10); + } + + /** + * Converts person integer to String: Ms. Scarlet (1), Colonial Mustard (2), + * Mrs. White (3), Reverend Green (4), Mrs. Peacock (5), Professor Plum (6) + * + * @param person + * integer to convert to String + * @return String version of person number, null if invalid integer + */ + public static String getPersonName(int person) { + String personString = null; + + switch (person) { + case 1: + personString = "Ms. Scarlet"; + break; + case 2: + personString = "Colonial Mustard"; + break; + case 3: + personString = "Mrs. White"; + break; + case 4: + personString = "Reverend Green"; + break; + case 5: + personString = "Mrs. Peacock"; + break; + case 6: + personString = "Professor Plum"; + break; + } + return personString; + } + + /** + * Converts person String to integer: Ms. Scarlet (1), Colonial Mustard (2), + * Mrs. White (3), Reverend Green (4), Mrs. Peacock (5), Professor Plum (6) + * + * @param person + * String to convert to integer + * @return integer version of person String, 0 if invalid String + * + */ + public static int getPersonNumber(String person) { + int personNumber = 0; + + switch (person.toLowerCase()) { + case "ms. scarlet": + personNumber = 1; + break; + case "colonial mustard": + personNumber = 2; + break; + case "mrs. white": + personNumber = 3; + break; + case "reverend green": + personNumber = 4; + break; + case "mrs. peacock": + personNumber = 5; + break; + case "professor plum": + personNumber = 6; + break; + } + return personNumber; + } + + /** + * Checks validity of person number + * + * @param person + * integer representing person + * @return true if valid (1-6), false otherwise + */ + public static boolean validatePersonNumber(int person) { + return (person >= 1 && person <= 6); + } + + /** + * Converts weapon integer to String: rope (1), wrench (2), candlestick (3), + * revolver (4), knife (5), pipe (6) + * + * @param weapon + * integer to convert to String + * @return String version of weapon number, null if invalid integer + */ + public static String getWeaponName(int weapon) { + String weaponString = null; + + switch (weapon) { + case 1: + weaponString = "rope"; + break; + case 2: + weaponString = "wrench"; + break; + case 3: + weaponString = "candlestick"; + break; + case 4: + weaponString = "revolver"; + break; + case 5: + weaponString = "knife"; + break; + case 6: + weaponString = "pipe"; + break; + + } + return weaponString; + } + + /** + * Converts weapon String to integer: rope (1), wrench (2), candlestick (3), + * revolver (4), knife (5), pipe (6) + * + * @param weapon + * String to convert to integer + * @return integer version of weapon number, 0 if invalid String + * + */ + public static int getWeaponNumber(String weapon) { + int weaponNumber = 0; + + switch (weapon.toLowerCase()) { + case "rope": + weaponNumber = 1; + break; + case "wrench": + weaponNumber = 2; + break; + case "candlestick": + weaponNumber = 3; + break; + case "revolver": + weaponNumber = 4; + break; + case "knife": + weaponNumber = 5; + break; + case "pipe": + weaponNumber = 6; + break; + } + return weaponNumber; + } + + /** + * Checks validity of weapon number + * + * @param weapon + * integer representing weapon + * @return true if valid (1-6), false otherwise + */ + public static boolean validateWeaponNumber(int weapon) { + return (weapon >= 1 && weapon <= 6); + } +} diff --git a/Clue Simulator/pom.xml b/Clue Simulator/pom.xml new file mode 100644 index 00000000..56deae15 --- /dev/null +++ b/Clue Simulator/pom.xml @@ -0,0 +1,53 @@ +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>mygroupid</groupId> + <artifactId>myartifactid</artifactId> + <version>0.0-SNAPSHOT</version> + <dependencies> + <dependency> + <groupId>com.googlecode.json-simple</groupId> + <artifactId>json-simple</artifactId> + <version>1.1.1</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-core</artifactId> + <version>1.3</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <type>jar</type> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>de.qaware.maven</groupId> + <artifactId>go-offline-maven-plugin</artifactId> + <version>1.2.5</version> + <configuration> + <dynamicDependencies> + <DynamicDependency> + <groupId>org.apache.maven.surefire</groupId> + <artifactId>surefire-junit4</artifactId> + <version>2.20.1</version> + <classifier></classifier> + <repositoryType>PLUGIN</repositoryType> + </DynamicDependency> + <DynamicDependency> + <groupId>com.querydsl</groupId> + <artifactId>querydsl-apt</artifactId> + <version>4.2.1</version> + <classifier>jpa</classifier> + <repositoryType>MAIN</repositoryType> + </DynamicDependency> + </dynamicDependencies> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file diff --git a/Clue Simulator/replit.nix b/Clue Simulator/replit.nix new file mode 100644 index 00000000..7f7e1291 --- /dev/null +++ b/Clue Simulator/replit.nix @@ -0,0 +1,8 @@ +{ pkgs }: { + deps = [ + pkgs.graalvm17-ce + pkgs.maven + pkgs.replitPackages.jdt-language-server + pkgs.replitPackages.java-debug + ]; +} \ No newline at end of file diff --git a/Clue Simulator/target/dependency/hamcrest-core-1.3.jar b/Clue Simulator/target/dependency/hamcrest-core-1.3.jar new file mode 100644 index 00000000..9d5fe16e Binary files /dev/null and b/Clue Simulator/target/dependency/hamcrest-core-1.3.jar differ diff --git a/Clue Simulator/target/dependency/json-simple-1.1.1.jar b/Clue Simulator/target/dependency/json-simple-1.1.1.jar new file mode 100644 index 00000000..dfd5856d Binary files /dev/null and b/Clue Simulator/target/dependency/json-simple-1.1.1.jar differ diff --git a/Clue Simulator/target/dependency/junit-4.12.jar b/Clue Simulator/target/dependency/junit-4.12.jar new file mode 100644 index 00000000..3a7fc266 Binary files /dev/null and b/Clue Simulator/target/dependency/junit-4.12.jar differ diff --git a/ColorCodeConverter.java b/ColorCodeConverter.java new file mode 100644 index 00000000..7881f082 --- /dev/null +++ b/ColorCodeConverter.java @@ -0,0 +1,53 @@ +import java.util.Scanner; + +public class ColorCodeConverter { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + System.out.println("Color Code Converter"); + System.out.println("1. RGB to HEX"); + System.out.println("2. HEX to RGB"); + System.out.print("Enter your choice (1 or 2): "); + + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume the newline character + + if (choice == 1) { + System.out.print("Enter RGB color (e.g., 255, 0, 0): "); + String rgb = scanner.nextLine(); + String hex = rgbToHex(rgb); + System.out.println("HEX color: " + hex); + } else if (choice == 2) { + System.out.print("Enter HEX color (e.g., #FF0000): "); + String hex = scanner.nextLine(); + String rgb = hexToRgb(hex); + System.out.println("RGB color: " + rgb); + } else { + System.out.println("Invalid choice. Please select 1 or 2."); + } + } + + public static String rgbToHex(String rgb) { + String[] values = rgb.split(","); + if (values.length != 3) { + return "Invalid RGB format"; + } + int r = Integer.parseInt(values[0]); + int g = Integer.parseInt(values[1]); + int b = Integer.parseInt(values[2]); + + return String.format("#%02X%02X%02X", r, g, b); + } + + public static String hexToRgb(String hex) { + if (hex.startsWith("#")) { + hex = hex.substring(1); + } + + int intValue = Integer.parseInt(hex, 16); + int r = (intValue >> 16) & 0xFF; + int g = (intValue >> 8) & 0xFF; + int b = intValue & 0xFF; + + return r + ", " + g + ", " + b; + } +} diff --git a/ColorShapes.py b/ColorShapes.py new file mode 100644 index 00000000..c12ac920 --- /dev/null +++ b/ColorShapes.py @@ -0,0 +1,52 @@ +import turtle + +turtle.pensize(3) # Set pen thickness to 3 pixels +turtle.penup() # Pull the pen up +turtle.goto(-200, -50) +turtle.pendown() # Pull the pen down +turtle.begin_fill() # Begin to fill color in a shape +turtle.color("red") +turtle.circle(40, steps = 3) # Draw a triangle +turtle.end_fill() # Fill the shape + +turtle.penup() +turtle.goto(-100, -50) +turtle.pendown() +turtle.begin_fill() # Begin to fill color in a shape +turtle.color("blue") +turtle.circle(40, steps = 4) # Draw a square +turtle.end_fill() # Fill the shape + +turtle.penup() +turtle.goto(0, -50) +turtle.pendown() +turtle.begin_fill() # Begin to fill color in a shape +turtle.color("green") +turtle.circle(40, steps = 5) # Draw a pentagon +turtle.end_fill() # Fill the shape + +turtle.penup() +turtle.goto(100, -50) +turtle.pendown() +turtle.begin_fill() # Begin to fill color in a shape +turtle.color("yellow") +turtle.circle(40, steps = 6) # Draw a hexagon +turtle.end_fill() # Fill the shape + +turtle.penup() +turtle.goto(200, -50) +turtle.pendown() +turtle.begin_fill() # Begin to fill color in a shape +turtle.color("purple") +turtle.circle(40) # Draw a circle +turtle.end_fill() # Fill the shape + +turtle.color("green") +turtle.penup() +turtle.goto(-100, 50) +turtle.pendown() +turtle.write("Cool Colorful Shapes", + font = ("Times", 18, "bold")) +turtle.hideturtle() + +turtle.done() diff --git a/ComputeLoan.py b/ComputeLoan.py new file mode 100644 index 00000000..59bd4488 --- /dev/null +++ b/ComputeLoan.py @@ -0,0 +1,20 @@ +# Enter yearly interest rate +annualInterestRate = eval(input( + "Enter annual interest rate, e.g., 8.25: ")) +monthlyInterestRate = annualInterestRate / 1200 + +# Enter number of years +numberOfYears = eval(input( + "Enter number of years as an integer, e.g., 5: ")) + +# Enter loan amount +loanAmount = eval(input("Enter loan amount, e.g., 120000.95: ")) + +# Calculate payment +monthlyPayment = loanAmount * monthlyInterestRate / (1 + - 1 / (1 + monthlyInterestRate) ** (numberOfYears * 12)) +totalPayment = monthlyPayment * numberOfYears * 12 + +# Display results +print("The monthly payment is", int(monthlyPayment * 100) / 100) +print("The total payment is", int(totalPayment * 100) /100) diff --git a/Convert_JPEG_to_PNG/README.md b/Convert_JPEG_to_PNG/README.md new file mode 100644 index 00000000..76f0ae26 --- /dev/null +++ b/Convert_JPEG_to_PNG/README.md @@ -0,0 +1,21 @@ +# CONVERT_JPEG_to_PNG + +This project contains a simply python script to change file extension from .jpeg to .png + +## Requirements +Pillow module + +`pip install pillow` + +## Two methods: + +I accomplished this task in two ways +### Using Terminal +- Add the image in jpeg format with name as 'input' in this folder. +- Run converter_terminal.py script +- output image will be generated in this folder + +### Using GUI +Just run the converter_GUI.py script and pick any jpeg image from any location and then press 'Convert Jpeg to Png' + + diff --git a/Convert_JPEG_to_PNG/converter_GUI.py b/Convert_JPEG_to_PNG/converter_GUI.py new file mode 100644 index 00000000..a6d59613 --- /dev/null +++ b/Convert_JPEG_to_PNG/converter_GUI.py @@ -0,0 +1,40 @@ +import tkinter as tk +from tkinter import filedialog +from PIL import Image +root = tk.Tk() # Tkinter window initialized +root.title('Converter') # Title of the window +canvas1 = tk.Canvas(root, width=300, height=250, bg='orange', relief='raised') +canvas1.pack() +label1 = tk.Label(root, text='File Converter', bg='lightsteelblue2') # giving a title to the screen +label1.config(font=('helvetica', 20)) +canvas1.create_window(150, 60, window=label1) +im1 = None # variable to store path of image + + +def getJPG(): + '''Function to get image location and open it with pillow''' + global im1 + import_file_path = filedialog.askopenfilename() + im1 = Image.open(import_file_path) + + +font = ('helvetica', 12, 'bold') +bg = 'royalblue' +fg = 'white' +browseButton_JPG = tk.Button(text=" Import JPEG File ", command=getJPG, bg=bg, fg=fg, font=font) # Browse button +canvas1.create_window(150, 130, window=browseButton_JPG) + + +def convertToPNG(): + '''Function to change file extenstion to png and save it to User's prefered location ''' + global im1 + if im1 is None: + tk.messagebox.showerror("Error", "No File selected") + else: + export_file_path = filedialog.asksaveasfilename(defaultextension='.png') + im1.save(export_file_path) + + +saveAsButton_PNG = tk.Button(text='Convert JPEG to PNG', command=convertToPNG, bg=bg, fg=fg, font=font) # Convert button +canvas1.create_window(150, 180, window=saveAsButton_PNG) +root.mainloop() diff --git a/Convert_JPEG_to_PNG/converter_terminal.py b/Convert_JPEG_to_PNG/converter_terminal.py new file mode 100644 index 00000000..0168b7e1 --- /dev/null +++ b/Convert_JPEG_to_PNG/converter_terminal.py @@ -0,0 +1,3 @@ +from PIL import Image +im1 = Image.open('input.jpeg') # takes input image from present folder +im1.save('output.png') # output image is generated the folder diff --git a/Convert_JPEG_to_PNG/input.jpeg b/Convert_JPEG_to_PNG/input.jpeg new file mode 100644 index 00000000..a850441a Binary files /dev/null and b/Convert_JPEG_to_PNG/input.jpeg differ diff --git a/Convert_JPEG_to_PNG/output.png b/Convert_JPEG_to_PNG/output.png new file mode 100644 index 00000000..121bacc6 Binary files /dev/null and b/Convert_JPEG_to_PNG/output.png differ diff --git a/Correct Number Guess Game/Game.class b/Correct Number Guess Game/Game.class new file mode 100644 index 00000000..6e888ad7 Binary files /dev/null and b/Correct Number Guess Game/Game.class differ diff --git a/Correct Number Guess Game/Game.java b/Correct Number Guess Game/Game.java new file mode 100644 index 00000000..aea14d24 --- /dev/null +++ b/Correct Number Guess Game/Game.java @@ -0,0 +1,55 @@ +import java.util.Random; +import java.util.Scanner; +class Game1{ + private int noofGuesses=0; + public int inputno; + private int Rando; + public Game1(){ + Random rand = new Random(); + int upperbound=100; + Rando= rand.nextInt(upperbound); + } + public void TakeUserinput(){ + System.out.print("Guess a no:"); + Scanner a1 = new Scanner(System.in); + inputno= a1.nextInt(); + a1.close(); //scanner closed + } + public void SetnoofGuesses(int Guesses){ + this.noofGuesses=Guesses; + } + public int GetnoofGuesses(){ + return noofGuesses; + } + + boolean NoofCorrectGuesses(){ + noofGuesses++; + if (inputno==Rando){ + System.out.printf("You guesses the no right: "+ "%d",Rando); + System.out.println(""); + System.out.printf("You guesses in " + "%d" +" attempts",noofGuesses); + System.out.println(""); + return true; + } + else if(inputno>Rando){ + System.out.println("No is greater"); + } + else if(inputno<Rando){ + System.out.println("No is less"); + } + return false; + } +} + +//starting main function +public class Game { + public static void main(String[] args) { + Game1 gaming=new Game1(); + boolean b=false; + while (!b) { + gaming.TakeUserinput(); + b=gaming.NoofCorrectGuesses(); + } + + } +} diff --git a/Correct Number Guess Game/Game1.class b/Correct Number Guess Game/Game1.class new file mode 100644 index 00000000..a8b6a706 Binary files /dev/null and b/Correct Number Guess Game/Game1.class differ diff --git a/Countdown Timer using Python/main.py b/Countdown Timer using Python/main.py new file mode 100644 index 00000000..06c48e22 --- /dev/null +++ b/Countdown Timer using Python/main.py @@ -0,0 +1,15 @@ +import time + +def countdown(t): + while t: + mins, secs = divmod(t, 60) + timer = '{:02d}:{:02d}'.format(mins,secs) + print(timer, end="\r") + time.sleep(1) + t -= 1 + + print('Timer completed!') + +t = input('Enter the time in seconds: ') + +countdown(int(t)) \ No newline at end of file diff --git a/Crypto-Image and Text Encryption Decryption/.DS_Store b/Crypto-Image and Text Encryption Decryption/.DS_Store new file mode 100644 index 00000000..15c93306 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/.DS_Store differ diff --git a/Crypto-Image and Text Encryption Decryption/README.md b/Crypto-Image and Text Encryption Decryption/README.md new file mode 100644 index 00000000..2b390c82 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/README.md @@ -0,0 +1,20 @@ +# Crypto +This project Crypto is basically a tool that is a Text Encryption and Decryption Software that is developed using Netbeans. The aim of this project is to create a GUI(Graphical User Interface.Program that can help users to Encrypt or Decrypt messages of Images easily. + + +Here are some Screenshots of the Software: + + + +This is kind of home page for the user to select either Image Encryption or Image Decryption. + + + + +Text Encryption and Decryption- The method by which information is converted into secret code that hides the information's true meaning is called Text Decryption and the reverse process of converting secret code into plain text is known as Text Decryption + + + + +Image Encryption and Decryption- Image Encryption is the process of encoding secret image with the help of some encryption algorithm in such a way that unauthorized users can't access it and the reverse process is Image Decryption. + diff --git a/Crypto-Image and Text Encryption Decryption/build.xml b/Crypto-Image and Text Encryption Decryption/build.xml new file mode 100644 index 00000000..3ed3d73e --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/build.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<!-- By default, only the Clean and Build commands use this build script. --> +<!-- Commands such as Run, Debug, and Test only use this build script if --> +<!-- the Compile on Save feature is turned off for the project. --> +<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> +<!-- in the project's Project Properties dialog box.--> +<project name="Crypto" default="default" basedir="."> + <description>Builds, tests, and runs the project Crypto.</description> + <import file="nbproject/build-impl.xml"/> + <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-jar: called before JAR building + -post-jar: called after JAR building + -post-clean: called after cleaning build products + + (Targets beginning with '-' are not intended to be called on their own.) + + Example of inserting an obfuscator after compilation could look like this: + + <target name="-post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Another way to customize the build is by overriding existing main targets. + The targets of interest are: + + -init-macrodef-javac: defines macro for javac compilation + -init-macrodef-junit: defines macro for junit execution + -init-macrodef-debug: defines macro for class debugging + -init-macrodef-java: defines macro for class execution + -do-jar: JAR building + run: execution of project + -javadoc-build: Javadoc generation + test-report: JUnit report generation + + An example of overriding the target for project execution could look like this: + + <target name="run" depends="Crypto-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that the overridden target depends on the jar target and not only on + the compile target as the regular run target does. Again, for a list of available + properties which you can use, check the target you are overriding in the + nbproject/build-impl.xml file. + + --> +</project> diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/.netbeans_automatic_build b/Crypto-Image and Text Encryption Decryption/build/classes/.netbeans_automatic_build new file mode 100644 index 00000000..e69de29b diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/.netbeans_update_resources b/Crypto-Image and Text Encryption Decryption/build/classes/.netbeans_update_resources new file mode 100644 index 00000000..e69de29b diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/Images/Home UI.jpg b/Crypto-Image and Text Encryption Decryption/build/classes/Images/Home UI.jpg new file mode 100644 index 00000000..feee2d49 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/Images/Home UI.jpg differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/Images/icons8_back_64px.png b/Crypto-Image and Text Encryption Decryption/build/classes/Images/icons8_back_64px.png new file mode 100644 index 00000000..8208553b Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/Images/icons8_back_64px.png differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/Images/icons8_back_arrow_64px_1.png b/Crypto-Image and Text Encryption Decryption/build/classes/Images/icons8_back_arrow_64px_1.png new file mode 100644 index 00000000..13914376 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/Images/icons8_back_arrow_64px_1.png differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/Images/icons8_help_40px.png b/Crypto-Image and Text Encryption Decryption/build/classes/Images/icons8_help_40px.png new file mode 100644 index 00000000..84a3c50e Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/Images/icons8_help_40px.png differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/Images/imgencryptions.jpg b/Crypto-Image and Text Encryption Decryption/build/classes/Images/imgencryptions.jpg new file mode 100644 index 00000000..34d7671d Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/Images/imgencryptions.jpg differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/Images/textecy.jpg b/Crypto-Image and Text Encryption Decryption/build/classes/Images/textecy.jpg new file mode 100644 index 00000000..738691ee Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/Images/textecy.jpg differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Crypto.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Crypto.class new file mode 100644 index 00000000..878224b3 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Crypto.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$1.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$1.class new file mode 100644 index 00000000..745e5210 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$1.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$2.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$2.class new file mode 100644 index 00000000..16d0a093 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$2.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$3.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$3.class new file mode 100644 index 00000000..f5614421 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$3.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$4.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$4.class new file mode 100644 index 00000000..8d73f4e9 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home$4.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home.class new file mode 100644 index 00000000..3647489d Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home.form b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home.form new file mode 100644 index 00000000..60ed9741 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Home.form @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Crypto"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-85,0,0,2,-108"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Text Encryption & Decryption"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="340" width="240" height="60"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Image Encryption & Decryption"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="360" y="340" width="260" height="60"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e8" green="74" red="5" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/icons8_help_40px.png"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="590" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/Home UI.jpg"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$1.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$1.class new file mode 100644 index 00000000..9535f68d Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$1.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$2.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$2.class new file mode 100644 index 00000000..e5943c09 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$2.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$3.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$3.class new file mode 100644 index 00000000..59b83717 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$3.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$4.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$4.class new file mode 100644 index 00000000..2569477c Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$4.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$5.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$5.class new file mode 100644 index 00000000..3ad50c1e Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$5.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$6.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$6.class new file mode 100644 index 00000000..7d028495 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$6.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$7.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$7.class new file mode 100644 index 00000000..39534a4c Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption$7.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption.class new file mode 100644 index 00000000..aaaa7b48 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption.form b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption.form new file mode 100644 index 00000000..28d8b236 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/Textencryption.form @@ -0,0 +1,156 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Crypto"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-85,0,0,2,-105"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextArea" name="inp"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="80" y="100" width="500" height="230"/> + </Constraint> + </Constraints> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="270" y="220" width="-1" height="-1"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + </Container> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="Encrypt"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="360" width="110" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="text" type="java.lang.String" value="Decrypt"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="360" width="110" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="320" y="360" width="110" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton4"> + <Properties> + <Property name="text" type="java.lang.String" value="Copy to Clipboard"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="460" y="360" width="190" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e8" green="74" red="5" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/icons8_back_arrow_64px_1.png"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="70" height="70"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton6"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e8" green="74" red="5" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/icons8_help_40px.png"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="70" width="70" height="60"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/textecy.jpg"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/f.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/f.class new file mode 100644 index 00000000..c34129f7 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/f.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/icon.png b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/icon.png new file mode 100644 index 00000000..527e7328 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/icon.png differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$1.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$1.class new file mode 100644 index 00000000..7190d4bc Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$1.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$2.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$2.class new file mode 100644 index 00000000..b33eeb96 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$2.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$3.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$3.class new file mode 100644 index 00000000..37f43745 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$3.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$4.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$4.class new file mode 100644 index 00000000..a24a081c Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$4.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$5.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$5.class new file mode 100644 index 00000000..91f01b48 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption$5.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption.class b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption.class new file mode 100644 index 00000000..69161ec6 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption.class differ diff --git a/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption.form b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption.form new file mode 100644 index 00000000..4878dc94 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/build/classes/crypto/imagencryption.form @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Crypto"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-85,0,0,2,-106"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextField" name="inp"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="36" style="0"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="400" y="270" width="180" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="Encrypt"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="150" y="370" width="160" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="text" type="java.lang.String" value="Decrypt"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="360" y="370" width="160" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="36" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Enter Key"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="140" y="260" width="160" height="60"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e8" green="74" red="5" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/icons8_back_arrow_64px_1.png"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="70" height="70"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e8" green="74" red="5" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/icons8_help_40px.png"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="590" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/imgencryptions.jpg"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/Crypto-Image and Text Encryption Decryption/manifest.mf b/Crypto-Image and Text Encryption Decryption/manifest.mf new file mode 100644 index 00000000..328e8e5b --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Crypto-Image and Text Encryption Decryption/nbproject/build-impl.xml b/Crypto-Image and Text Encryption Decryption/nbproject/build-impl.xml new file mode 100644 index 00000000..3b21c9b5 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/nbproject/build-impl.xml @@ -0,0 +1,1771 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +*** GENERATED FROM project.xml - DO NOT EDIT *** +*** EDIT ../build.xml INSTEAD *** + +For the purpose of easier reading the script +is divided into following sections: + + - initialization + - compilation + - jar + - execution + - debugging + - javadoc + - test compilation + - test execution + - test debugging + - applet + - cleanup + + --> +<project xmlns:if="ant:if" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" xmlns:unless="ant:unless" basedir=".." default="default" name="Crypto-impl"> + <fail message="Please build using Ant 1.8.0 or higher."> + <condition> + <not> + <antversion atleast="1.8.0"/> + </not> + </condition> + </fail> + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> + <!-- + ====================== + INITIALIZATION SECTION + ====================== + --> + <target name="-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init" name="-init-private"> + <property file="nbproject/private/config.properties"/> + <property file="nbproject/private/configs/${config}.properties"/> + <property file="nbproject/private/private.properties"/> + </target> + <target depends="-pre-init,-init-private" name="-init-user"> + <property file="${user.properties.file}"/> + <!-- The two properties below are usually overridden --> + <!-- by the active platform. Just a fallback. --> + <property name="default.javac.source" value="1.8"/> + <property name="default.javac.target" value="1.8"/> + </target> + <target depends="-pre-init,-init-private,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> + <property file="nbproject/project.properties"/> + </target> + <target name="-init-modules-supported"> + <condition property="modules.supported.internal" value="true"> + <not> + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/> + </not> + </condition> + </target> + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename"> + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute name="property"/> + <attribute name="sourcepath"/> + <sequential> + <loadresource property="@{property}" quiet="true"> + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/> + <filterchain> + <stripjavacomments/> + <linecontainsregexp> + <regexp pattern="module .* \{"/> + </linecontainsregexp> + <tokenfilter> + <linetokenizer/> + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/> + </tokenfilter> + <striplinebreaks/> + </filterchain> + </loadresource> + </sequential> + </macrodef> + </target> + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties"> + <fail message="Java 9 support requires Ant 1.10.0 or higher."> + <condition> + <not> + <antversion atleast="1.10.0"/> + </not> + </condition> + </fail> + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/> + <condition property="named.module.internal"> + <and> + <isset property="module.name"/> + <length length="0" string="${module.name}" when="greater"/> + </and> + </condition> + <condition property="unnamed.module.internal"> + <not> + <isset property="named.module.internal"/> + </not> + </condition> + <property name="javac.modulepath" value=""/> + <property name="run.modulepath" value="${javac.modulepath}"/> + <property name="module.build.classes.dir" value="${build.classes.dir}"/> + <property name="debug.modulepath" value="${run.modulepath}"/> + <property name="javac.upgrademodulepath" value=""/> + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/> + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'"> + <and> + <isset property="javac.systemmodulepath"/> + <length length="0" string="${javac.systemmodulepath}" when="greater"/> + </and> + </condition> + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/> + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/> + <property name="module.name" value=""/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init"> + <property name="platform.java" value="${java.home}/bin/java"/> + <available file="${manifest.file}" property="manifest.available"/> + <condition property="splashscreen.available"> + <and> + <not> + <equals arg1="${application.splash}" arg2="" trim="true"/> + </not> + <available file="${application.splash}"/> + </and> + </condition> + <condition property="main.class.available"> + <and> + <isset property="main.class"/> + <not> + <equals arg1="${main.class}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition property="profile.available"> + <and> + <isset property="javac.profile"/> + <length length="0" string="${javac.profile}" when="greater"/> + <not> + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/> + </not> + </and> + </condition> + <condition property="do.archive"> + <or> + <not> + <istrue value="${jar.archive.disabled}"/> + </not> + <istrue value="${not.archive.disabled}"/> + </or> + </condition> + <condition property="do.archive+manifest.available"> + <and> + <isset property="manifest.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+main.class.available"> + <and> + <isset property="main.class.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+splashscreen.available"> + <and> + <isset property="splashscreen.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+profile.available"> + <and> + <isset property="profile.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="have.tests"> + <or> + <available file="${test.src.dir}"/> + </or> + </condition> + <condition property="have.sources"> + <or> + <available file="${src.dir}"/> + </or> + </condition> + <condition property="netbeans.home+have.tests"> + <and> + <isset property="netbeans.home"/> + <isset property="have.tests"/> + </and> + </condition> + <condition property="no.javadoc.preview"> + <and> + <isset property="javadoc.preview"/> + <isfalse value="${javadoc.preview}"/> + </and> + </condition> + <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> + <property name="javac.compilerargs" value=""/> + <property name="work.dir" value="${basedir}"/> + <condition property="no.deps"> + <and> + <istrue value="${no.dependencies}"/> + </and> + </condition> + <property name="javac.debug" value="true"/> + <property name="javadoc.preview" value="true"/> + <property name="application.args" value=""/> + <property name="source.encoding" value="${file.encoding}"/> + <property name="runtime.encoding" value="${source.encoding}"/> + <property name="manifest.encoding" value="${source.encoding}"/> + <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> + <and> + <isset property="javadoc.encoding"/> + <not> + <equals arg1="${javadoc.encoding}" arg2=""/> + </not> + </and> + </condition> + <property name="javadoc.encoding.used" value="${source.encoding}"/> + <property name="includes" value="**"/> + <property name="excludes" value=""/> + <property name="do.depend" value="false"/> + <condition property="do.depend.true"> + <istrue value="${do.depend}"/> + </condition> + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> + <and> + <isset property="endorsed.classpath"/> + <not> + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> + <isset property="profile.available"/> + </condition> + <condition else="false" property="jdkBug6558476"> + <and> + <matches pattern="1\.[56]" string="${java.specification.version}"/> + <not> + <os family="unix"/> + </not> + </and> + </condition> + <condition else="false" property="javac.fork"> + <or> + <istrue value="${jdkBug6558476}"/> + <istrue value="${javac.external.vm}"/> + </or> + </condition> + <property name="jar.index" value="false"/> + <property name="jar.index.metainf" value="${jar.index}"/> + <property name="copylibs.rebase" value="true"/> + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <property name="java.failonerror" value="true"/> + </target> + <target name="-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> + <fail unless="src.dir">Must set src.dir</fail> + <fail unless="test.src.dir">Must set test.src.dir</fail> + <fail unless="build.dir">Must set build.dir</fail> + <fail unless="dist.dir">Must set dist.dir</fail> + <fail unless="build.classes.dir">Must set build.classes.dir</fail> + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> + <fail unless="dist.jar">Must set dist.jar</fail> + </target> + <target name="-init-macrodef-property"> + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${@{value}}"/> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.modulepath}" name="modulepath"/> + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${javac.processormodulepath}" name="processormodulepath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/> + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <condition property="warn.excludes.internal"> + <and> + <isset property="named.module.internal"/> + <length length="0" string="@{excludes}" trim="true" when="greater"/> + </and> + </condition> + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <mkdir dir="@{apgeneratedsrcdir}"/> + <condition property="processormodulepath.set"> + <resourcecount count="0" when="greater"> + <path> + <pathelement path="@{processormodulepath}"/> + </path> + </resourcecount> + </condition> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <modulepath> + <path path="@{modulepath}"/> + </modulepath> + <upgrademodulepath> + <path path="@{upgrademodulepath}"/> + </upgrademodulepath> + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/> + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/> + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/> + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/> + <compilerarg line="${ap.processors.internal}"/> + <compilerarg line="${annotation.processing.processor.options}"/> + <compilerarg value="-s"/> + <compilerarg path="@{apgeneratedsrcdir}"/> + <compilerarg line="${ap.proc.none.internal}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.modulepath}" name="modulepath"/> + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <mkdir dir="@{apgeneratedsrcdir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <compilerarg value="-processorpath"/> + <compilerarg path="@{processorpath}:${empty.dir}"/> + <compilerarg line="${ap.processors.internal}"/> + <compilerarg line="${annotation.processing.processor.options}"/> + <compilerarg value="-s"/> + <compilerarg path="@{apgeneratedsrcdir}"/> + <compilerarg line="${ap.proc.none.internal}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.modulepath}" name="modulepath"/> + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <sequential> + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </depend> + </sequential> + </macrodef> + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${build.classes.dir}" name="destdir"/> + <sequential> + <fail unless="javac.includes">Must set javac.includes</fail> + <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> + <path> + <filelist dir="@{destdir}" files="${javac.includes}"/> + </path> + <globmapper from="*.java" to="*.class"/> + </pathconvert> + <tempfile deleteonexit="true" property="javac.includesfile.binary"/> + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> + <delete> + <files includesfile="${javac.includesfile.binary}"/> + </delete> + <delete> + <fileset file="${javac.includesfile.binary}"/> + </delete> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target name="-init-test-properties"> + <property name="test.binaryincludes" value="<nothing>"/> + <property name="test.binarytestincludes" value=""/> + <property name="test.binaryexcludes" value=""/> + </target> + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module"> + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <element name="customizePrototype" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <modulepath> + <path path="${run.test.modulepath}"/> + </modulepath> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-ea"/> + <jvmarg line="${run.test.jvmargs}"/> + <customizePrototype/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal"> + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <element name="customizePrototype" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-ea"/> + <customizePrototype/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-prototype> + <customizePrototype> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <customize/> + </customizePrototype> + </j2seproject3:junit-prototype> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-prototype> + <customizePrototype> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <customize/> + </customizePrototype> + </j2seproject3:junit-prototype> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="Crypto" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customizeDebuggee" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/> + <customizeDebuggee/> + </customize> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename Crypto -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customizeDebuggee> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customizeDebuggee> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customizeDebuggee> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customizeDebuggee> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> + <macrodef name="resolve"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${env.@{value}}"/> + </sequential> + </macrodef> + <macrodef name="profile"> + <attribute default="${main.class}" name="classname"/> + <element name="customize" optional="true"/> + <sequential> + <property environment="env"/> + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <arg line="${application.args}"/> + <classpath> + <path path="${run.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> + </target> + <!-- + end of pre NB7.2 profiling section + --> + <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="name"/> + <attribute default="${debug.modulepath}" name="modulepath"/> + <attribute default="${debug.classpath}" name="classpath"/> + <attribute default="" name="stopclassname"/> + <sequential> + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> + <modulepath> + <path path="@{modulepath}"/> + </modulepath> + <classpath> + <path path="@{classpath}"/> + </classpath> + </nbjpdastart> + </sequential> + </macrodef> + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${build.classes.dir}" name="dir"/> + <sequential> + <nbjpdareload> + <fileset dir="@{dir}" includes="${fix.classes}"> + <include name="${fix.includes}*.class"/> + </fileset> + </nbjpdareload> + </sequential> + </macrodef> + </target> + <target name="-init-debug-args"> + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> + <os family="windows"/> + </condition> + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> + <isset property="debug.transport"/> + </condition> + </target> + <target depends="-init-debug-args" name="-init-macrodef-debug"> + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${module.name}" name="modulename"/> + <attribute default="${main.class}" name="classname"/> + <attribute default="${debug.modulepath}" name="modulepath"/> + <attribute default="${debug.classpath}" name="classpath"/> + <element name="customizeDebuggee" optional="true"/> + <sequential> + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}"> + <customize> + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/> + <customizeDebuggee/> + </customize> + </j2seproject1:java> + </sequential> + </macrodef> + </target> + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${module.name}" name="modulename"/> + <attribute default="${main.class}" name="classname"/> + <attribute default="${run.modulepath}" name="modulepath"/> + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + <modulepath> + <pathelement path="@{modulepath}"/> + <pathelement location="${module.build.classes.dir}"/> + </modulepath> + <upgrademodulepath> + <path path="@{upgrademodulepath}"/> + </upgrademodulepath> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="" name="modulename"/> + <attribute default="${main.class}" name="classname"/> + <attribute default="${run.modulepath}" name="modulepath"/> + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true"> + <classpath> + <path path="@{classpath}"/> + </classpath> + <modulepath> + <path path="@{modulepath}"/> + </modulepath> + <upgrademodulepath> + <path path="@{upgrademodulepath}"/> + </upgrademodulepath> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="" name="modulename"/> + <attribute default="${main.class}" name="classname"/> + <attribute default="" name="modulepath"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/> + <target name="-init-macrodef-copylibs"> + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${manifest.file}" name="manifest"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert pathsep=" " property="jar.classpath"> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + <manifest> + <attribute name="Class-Path" value="${jar.classpath}"/> + <customize/> + </manifest> + </copylibs> + </sequential> + </macrodef> + </target> + <target name="-init-presetdef-jar"> + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8"> + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + </jar> + </presetdef> + </target> + <target name="-init-ap-cmdline-properties"> + <property name="annotation.processing.enabled" value="true"/> + <property name="annotation.processing.processors.list" value=""/> + <property name="annotation.processing.processor.options" value=""/> + <property name="annotation.processing.run.all.processors" value="true"/> + <property name="javac.processorpath" value="${javac.classpath}"/> + <property name="javac.test.processorpath" value="${javac.test.classpath}"/> + <condition property="ap.supported.internal" value="true"> + <not> + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> + </not> + </condition> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> + <isfalse value="${annotation.processing.run.all.processors}"/> + </condition> + <condition else="" property="ap.proc.none.internal" value="-proc:none"> + <isfalse value="${annotation.processing.enabled}"/> + </condition> + </target> + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> + <property name="ap.cmd.line.internal" value=""/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> + <!-- + =================== + COMPILATION SECTION + =================== + --> + <target name="-deps-jar-init" unless="built-jar.properties"> + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> + <delete file="${built-jar.properties}" quiet="true"/> + </target> + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> + <echo level="warn" message="Cycle detected: Crypto was already built"/> + </target> + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-jar.properties}" verbose="false"/> + <property file="${built-jar.properties}" prefix="already.built.jar."/> + <antcall target="-warn-already-built-jar"/> + <propertyfile file="${built-jar.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> + <target depends="init" name="-check-automatic-build"> + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> + </target> + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> + <antcall target="clean"> + <param name="no.dependencies" value="true"/> + </antcall> + </target> + <target depends="init,deps-jar" name="-pre-pre-compile"> + <mkdir dir="${build.classes.dir}"/> + </target> + <target name="-pre-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-depend"> + <pathconvert property="build.generated.subdirs"> + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </pathconvert> + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> + <copy todir="${build.classes.dir}"> + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target if="has.persistence.xml" name="-copy-persistence-xml"> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy todir="${build.classes.dir}/META-INF"> + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> + </copy> + </target> + <target name="-post-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> + <target name="-pre-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile/> + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/> + </target> + <target name="-post-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> + <!-- + ==================== + JAR BUILDING SECTION + ==================== + --> + <target depends="init" name="-pre-pre-jar"> + <dirname file="${dist.jar}" property="dist.jar.dir"/> + <mkdir dir="${dist.jar.dir}"/> + </target> + <target name="-pre-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile" name="-check-module-main-class"> + <pathconvert property="main.class.file"> + <string value="${main.class}"/> + <unpackagemapper from="*" to="*.class"/> + </pathconvert> + <condition property="do.module.main.class"> + <and> + <isset property="main.class.available"/> + <available file="${build.classes.dir}/module-info.class"/> + <available file="${build.classes.dir}/${main.class.file}"/> + <isset property="libs.CopyLibs.classpath"/> + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/> + </and> + </condition> + </target> + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class"> + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/> + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/> + </target> + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <touch file="${tmp.manifest.file}" verbose="false"/> + </target> + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="Main-Class" value="${main.class}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="Profile" value="${javac.profile}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> + <basename file="${application.splash}" property="splashscreen.basename"/> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> + </manifest> + </target> + <target depends="init,compile" name="-check-do-mkdist"> + <condition property="do.mkdist"> + <and> + <isset property="do.archive"/> + <isset property="libs.CopyLibs.classpath"/> + <not> + <istrue value="${mkdist.disabled}"/> + </not> + <not> + <available file="${build.classes.dir}/module-info.class"/> + </not> + </and> + </condition> + </target> + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.mkdist" name="-do-jar-copylibs"> + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> + <echo level="info">To run this application from the command line without Ant, try:</echo> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <echo level="info">java -jar "${dist.jar.resolved}"</echo> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> + <j2seproject1:jar manifest="${tmp.manifest.file}"/> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value=""> + <isset property="named.module.internal"/> + </condition> + <pathconvert property="run.classpath.with.dist.jar"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/> + </pathconvert> + <pathconvert property="run.modulepath.with.dist.jar"> + <path location="${dist.jar.resolved}"/> + <path path="${run.modulepath}"/> + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> + </pathconvert> + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}"> + <isset property="named.module.internal"/> + </condition> + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}"> + <and> + <isset property="modules.supported.internal"/> + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/> + </and> + </condition> + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}"> + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/> + </condition> + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value=""> + <isset property="do.module.main.class"/> + </condition> + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}"> + <isset property="named.module.internal"/> + </condition> + <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java}${jar.usage.message.module.path}${jar.usage.message.class.path}${jar.usage.message.main.class}"> + <isset property="main.class.available"/> + </condition> + <condition else="debug" property="jar.usage.level" value="info"> + <isset property="main.class.available"/> + </condition> + <echo level="${jar.usage.level}" message="${jar.usage.message}"/> + </target> + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> + <delete> + <fileset file="${tmp.manifest.file}"/> + </delete> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> + <target name="-post-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/> + <!-- + ================= + DEPLOY SECTION + ================= + --> + <target name="-pre-deploy"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init" name="-check-jlink"> + <condition property="do.jlink.internal"> + <and> + <istrue value="${do.jlink}"/> + <isset property="do.archive"/> + <isset property="named.module.internal"/> + </and> + </condition> + </target> + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy"> + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/> + <property name="jlink.launcher.name" value="${application.title}"/> + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}"> + <and> + <isset property="jlink.additionalmodules"/> + <length length="0" string="${jlink.additionalmodules}" when="greater"/> + </and> + </condition> + <condition property="jlink.do.strip.internal"> + <and> + <isset property="jlink.strip"/> + <istrue value="${jlink.strip}"/> + </and> + </condition> + <condition property="jlink.do.additionalparam.internal"> + <and> + <isset property="jlink.additionalparam"/> + <length length="0" string="${jlink.additionalparam}" when="greater"/> + </and> + </condition> + <condition property="jlink.do.launcher.internal"> + <and> + <istrue value="${jlink.launcher}"/> + <isset property="main.class.available"/> + </and> + </condition> + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/> + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/> + <exec executable="${platform.jlink}"> + <arg value="--module-path"/> + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/> + <arg value="--add-modules"/> + <arg value="${jlink.add.modules}"/> + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/> + <arg if:set="jlink.do.launcher.internal" value="--launcher"/> + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/> + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/> + <arg value="--output"/> + <arg value="${dist.jlink.output}"/> + </exec> + </target> + <target name="-post-deploy"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/> + <!-- + ================= + EXECUTION SECTION + ================= + --> + <target depends="init,compile" description="Run a main class." name="run"> + <j2seproject1:java> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject1:java> + </target> + <target name="-do-not-recompile"> + <property name="javac.includes.binary" value=""/> + </target> + <target depends="init,compile-single" name="run-single"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}"/> + </target> + <target depends="init,compile-test-single" name="run-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> + </target> + <!-- + ================= + DEBUGGING SECTION + ================= + --> + <target depends="init" if="netbeans.home" name="-debug-start-debugger"> + <j2seproject1:nbjpdastart name="${debug.class}"/> + </target> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> + </target> + <target depends="init,compile" name="-debug-start-debuggee"> + <j2seproject3:debug> + <customizeDebuggee> + <arg line="${application.args}"/> + </customizeDebuggee> + </j2seproject3:debug> + </target> + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> + <j2seproject1:nbjpdastart stopclassname="${main.class}"/> + </target> + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}"/> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> + <target depends="init" name="-pre-debug-fix"> + <fail unless="fix.includes">Must set fix.includes</fail> + <property name="javac.includes" value="${fix.includes}.java"/> + </target> + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> + <j2seproject1:nbjpdareload/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> + <!-- + ================= + PROFILING SECTION + ================= + --> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile/> + </target> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="${profile.class}"/> + </target> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </profile> + </target> + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + </nbprofiledirect> + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods=""> + <customize> + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + </customize> + </j2seproject3:junit> + </target> + <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- + =============== + JAVADOC SECTION + =============== + --> + <target depends="init" if="have.sources" name="-javadoc-build"> + <mkdir dir="${dist.javadoc.dir}"/> + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> + <and> + <isset property="endorsed.classpath.cmd.line.arg"/> + <not> + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> + </not> + </and> + </condition> + <condition else="" property="bug5101868workaround" value="*.java"> + <matches pattern="1\.[56](\..*)?" string="${java.version}"/> + </condition> + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5"> + <and> + <isset property="javadoc.html5"/> + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/> + </and> + </condition> + <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> + <classpath> + <path path="${javac.classpath}"/> + </classpath> + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/*.java"/> + <exclude name="*.java"/> + </fileset> + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> + <arg line="${javadoc.html5.cmd.line.arg}"/> + </javadoc> + <copy todir="${dist.javadoc.dir}"> + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/doc-files/**"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/doc-files/**"/> + </fileset> + </copy> + </target> + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> + <nbbrowse file="${dist.javadoc.dir}/index.html"/> + </target> + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> + <!-- + ========================= + TEST COMPILATION SECTION + ========================= + --> + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> + <mkdir dir="${build.test.classes.dir}"/> + </target> + <target name="-pre-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module"> + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/> + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}"> + <and> + <isset property="test.module.name"/> + <length length="0" string="${test.module.name}" when="greater"/> + </and> + </condition> + <condition else="--patch-module ${module.name}=${test.src.dir} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED"> + <and> + <isset property="test.module.name"/> + <length length="0" string="${test.module.name}" when="greater"/> + </and> + </condition> + </target> + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties"> + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}"> + <and> + <isset property="test.module.name"/> + <length length="0" string="${test.module.name}" when="greater"/> + </and> + </condition> + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/> + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/> + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal"> + <chainedmapper> + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/> + <filtermapper> + <uniqfilter/> + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/> + </filtermapper> + <cutdirsmapper dirs="1"/> + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/> + </chainedmapper> + </pathconvert> + <condition else="--patch-module ${module.name}=${build.test.classes.dir} --add-modules ${module.name} --add-reads ${module.name}=ALL-UNNAMED ${run.test.addexports.internal}" property="run.test.jvmargs" value="--add-modules ${test.module.name} --add-reads ${test.module.name}=ALL-UNNAMED ${run.test.addexports.internal}"> + <and> + <isset property="test.module.name"/> + <length length="0" string="${test.module.name}" when="greater"/> + </and> + </condition> + </target> + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal"> + <property name="javac.test.sourcepath" value="${empty.dir}"/> + <property name="javac.test.compilerargs" value=""/> + <property name="run.test.jvmargs" value=""/> + </target> + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/> + <target if="do.depend.true" name="-compile-test-depend"> + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + </target> + <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${javac.test.sourcepath}" srcdir="${test.src.dir}"> + <customize> + <compilerarg line="${javac.test.compilerargs}"/> + </customize> + </j2seproject3:javac> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> + <target name="-pre-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}, module-info.java" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"> + <customize> + <compilerarg line="${javac.test.compilerargs}"/> + </customize> + </j2seproject3:javac> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> + <!-- + ======================= + TEST EXECUTION SECTION + ======================= + --> + <target depends="init" if="have.tests" name="-pre-test-run"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run"> + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/> + </target> + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init" if="have.tests" name="test-report"/> + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> + <target depends="init" if="have.tests" name="-pre-test-run-single"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> + <!-- + ======================= + TEST DEBUGGING SECTION + ======================= + --> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> + </target> + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> + <target depends="debug-test-method" name="debug-single-method"/> + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> + <!-- + ========================= + APPLET EXECUTION SECTION + ========================= + --> + <target depends="init,compile-single" name="run-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject1:java classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject1:java> + </target> + <!-- + ========================= + APPLET DEBUGGING SECTION + ========================= + --> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject3:debug classname="sun.applet.AppletViewer"> + <customizeDebuggee> + <arg value="${applet.url}"/> + </customizeDebuggee> + </j2seproject3:debug> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> + <!-- + =============== + CLEANUP SECTION + =============== + --> + <target name="-deps-clean-init" unless="built-clean.properties"> + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> + <delete file="${built-clean.properties}" quiet="true"/> + </target> + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> + <echo level="warn" message="Cycle detected: Crypto was already built"/> + </target> + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-clean.properties}" verbose="false"/> + <property file="${built-clean.properties}" prefix="already.built.clean."/> + <antcall target="-warn-already-built-clean"/> + <propertyfile file="${built-clean.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init" name="-do-clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.jlink.output}"/> + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> + </target> + <target name="-post-clean"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> + <target name="-check-call-dep"> + <property file="${call.built.properties}" prefix="already.built."/> + <condition property="should.call.dep"> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> + </condition> + </target> + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> + <ant antfile="${call.script}" inheritall="false" target="${call.target}"> + <propertyset> + <propertyref prefix="transfer."/> + <mapper from="transfer.*" to="*" type="glob"/> + </propertyset> + </ant> + </target> +</project> diff --git a/Crypto-Image and Text Encryption Decryption/nbproject/genfiles.properties b/Crypto-Image and Text Encryption Decryption/nbproject/genfiles.properties new file mode 100644 index 00000000..9af22bf8 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=7f90a431 +build.xml.script.CRC32=a2c5abf7 +build.xml.stylesheet.CRC32=f85dc8f2@1.100.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=7f90a431 +nbproject/build-impl.xml.script.CRC32=31a761c4 +nbproject/build-impl.xml.stylesheet.CRC32=12e0a6c2@1.100.0.48 diff --git a/Crypto-Image and Text Encryption Decryption/nbproject/private/private.properties b/Crypto-Image and Text Encryption Decryption/nbproject/private/private.properties new file mode 100644 index 00000000..38f610ec --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\hakay\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Crypto-Image and Text Encryption Decryption/nbproject/private/private.xml b/Crypto-Image and Text Encryption Decryption/nbproject/private/private.xml new file mode 100644 index 00000000..6807a2ba --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/nbproject/private/private.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> + <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> + <group/> + </open-files> +</project-private> diff --git a/Crypto-Image and Text Encryption Decryption/nbproject/project.properties b/Crypto-Image and Text Encryption Decryption/nbproject/project.properties new file mode 100644 index 00000000..9252cc9d --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/nbproject/project.properties @@ -0,0 +1,87 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Crypto.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath=\ + ${libs.absolutelayout.classpath} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=crypto.Crypto +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Crypto-Image and Text Encryption Decryption/nbproject/project.xml b/Crypto-Image and Text Encryption Decryption/nbproject/project.xml new file mode 100644 index 00000000..7af08779 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/nbproject/project.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.java.j2seproject</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> + <name>Crypto</name> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> + </data> + </configuration> +</project> diff --git a/Crypto-Image and Text Encryption Decryption/src/Images/Home UI.jpg b/Crypto-Image and Text Encryption Decryption/src/Images/Home UI.jpg new file mode 100644 index 00000000..feee2d49 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/src/Images/Home UI.jpg differ diff --git a/Crypto-Image and Text Encryption Decryption/src/Images/icons8_back_64px.png b/Crypto-Image and Text Encryption Decryption/src/Images/icons8_back_64px.png new file mode 100644 index 00000000..8208553b Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/src/Images/icons8_back_64px.png differ diff --git a/Crypto-Image and Text Encryption Decryption/src/Images/icons8_back_arrow_64px_1.png b/Crypto-Image and Text Encryption Decryption/src/Images/icons8_back_arrow_64px_1.png new file mode 100644 index 00000000..13914376 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/src/Images/icons8_back_arrow_64px_1.png differ diff --git a/Crypto-Image and Text Encryption Decryption/src/Images/icons8_help_40px.png b/Crypto-Image and Text Encryption Decryption/src/Images/icons8_help_40px.png new file mode 100644 index 00000000..84a3c50e Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/src/Images/icons8_help_40px.png differ diff --git a/Crypto-Image and Text Encryption Decryption/src/Images/imgencryptions.jpg b/Crypto-Image and Text Encryption Decryption/src/Images/imgencryptions.jpg new file mode 100644 index 00000000..34d7671d Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/src/Images/imgencryptions.jpg differ diff --git a/Crypto-Image and Text Encryption Decryption/src/Images/textecy.jpg b/Crypto-Image and Text Encryption Decryption/src/Images/textecy.jpg new file mode 100644 index 00000000..738691ee Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/src/Images/textecy.jpg differ diff --git a/Crypto-Image and Text Encryption Decryption/src/crypto/Crypto.java b/Crypto-Image and Text Encryption Decryption/src/crypto/Crypto.java new file mode 100644 index 00000000..e3905f51 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/src/crypto/Crypto.java @@ -0,0 +1,21 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package crypto; + +/** + * + * @author SP + */ +public class Crypto { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + } + +} diff --git a/Crypto-Image and Text Encryption Decryption/src/crypto/Home.form b/Crypto-Image and Text Encryption Decryption/src/crypto/Home.form new file mode 100644 index 00000000..60ed9741 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/src/crypto/Home.form @@ -0,0 +1,93 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Crypto"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-85,0,0,2,-108"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Text Encryption & Decryption"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="340" width="240" height="60"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Image Encryption & Decryption"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="360" y="340" width="260" height="60"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e8" green="74" red="5" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/icons8_help_40px.png"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="590" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/Home UI.jpg"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/Crypto-Image and Text Encryption Decryption/src/crypto/Home.java b/Crypto-Image and Text Encryption Decryption/src/crypto/Home.java new file mode 100644 index 00000000..38291ddf --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/src/crypto/Home.java @@ -0,0 +1,138 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package crypto; + +import java.awt.Frame; +import java.awt.Image; +import java.awt.Toolkit; +import javax.swing.JOptionPane; + +/** + * + * @author SP + */ +public class Home extends javax.swing.JFrame { + + /** + * Creates new form Home + */ + public Home() { + initComponents(); + Frame f=new Frame(); + setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("icon.png"))); + this.setLocationRelativeTo(null); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jButton1 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Crypto"); + setResizable(false); + getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton1.setText("Text Encryption & Decryption"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 340, 240, 60)); + + jButton3.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + jButton3.setText("Image Encryption & Decryption"); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 340, 260, 60)); + + jButton2.setBackground(new java.awt.Color(5, 116, 232)); + jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icons8_help_40px.png"))); // NOI18N + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 0, -1, -1)); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/Home UI.jpg"))); // NOI18N + getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1)); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + + new Textencryption().setVisible(true); + + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + new imagencryption().setVisible(true); + }//GEN-LAST:event_jButton3ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + JOptionPane.showMessageDialog(null, "This project, Crypto (Text Encryption and Decryption Software) is developed using NetBeans.\n This project is written in java language. \n The aim of this system was to create a Graphical User Interface program which can \n help user to Encrypt or Decrypt message or Image."); + }//GEN-LAST:event_jButton2ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Home().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JLabel jLabel1; + // End of variables declaration//GEN-END:variables + + +} diff --git a/Crypto-Image and Text Encryption Decryption/src/crypto/Textencryption.form b/Crypto-Image and Text Encryption Decryption/src/crypto/Textencryption.form new file mode 100644 index 00000000..28d8b236 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/src/crypto/Textencryption.form @@ -0,0 +1,156 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Crypto"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-85,0,0,2,-105"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextArea" name="inp"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="80" y="100" width="500" height="230"/> + </Constraint> + </Constraints> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="270" y="220" width="-1" height="-1"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + </Container> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="Encrypt"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="360" width="110" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="text" type="java.lang.String" value="Decrypt"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="170" y="360" width="110" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="320" y="360" width="110" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton4"> + <Properties> + <Property name="text" type="java.lang.String" value="Copy to Clipboard"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="460" y="360" width="190" height="40"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e8" green="74" red="5" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/icons8_back_arrow_64px_1.png"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="70" height="70"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton6"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e8" green="74" red="5" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/icons8_help_40px.png"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="70" width="70" height="60"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/textecy.jpg"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/Crypto-Image and Text Encryption Decryption/src/crypto/Textencryption.java b/Crypto-Image and Text Encryption Decryption/src/crypto/Textencryption.java new file mode 100644 index 00000000..364e68da --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/src/crypto/Textencryption.java @@ -0,0 +1,234 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package crypto; + +import java.awt.Component; +import java.awt.Toolkit; +import java.awt.datatransfer.Clipboard; +import java.awt.datatransfer.StringSelection; +import javax.swing.JOptionPane; + +/** + * + * @author SP + */ +public class Textencryption extends javax.swing.JFrame { + + private Component JFrame; + + /** + * Creates new form Textencryption + */ + public Textencryption() { + initComponents(); + this.setLocationRelativeTo(null); + setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("icon.png"))); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + inp = new javax.swing.JTextArea(); + jScrollPane1 = new javax.swing.JScrollPane(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jButton4 = new javax.swing.JButton(); + jButton5 = new javax.swing.JButton(); + jButton6 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Crypto"); + setResizable(false); + getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + inp.setColumns(20); + inp.setRows(5); + getContentPane().add(inp, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 100, 500, 230)); + getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(270, 220, -1, -1)); + + jButton1.setText("Encrypt"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 360, 110, 40)); + + jButton2.setText("Decrypt"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(170, 360, 110, 40)); + + jButton3.setText("Clear"); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 360, 110, 40)); + + jButton4.setText("Copy to Clipboard"); + jButton4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton4ActionPerformed(evt); + } + }); + getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(460, 360, 190, 40)); + + jButton5.setBackground(new java.awt.Color(5, 116, 232)); + jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icons8_back_arrow_64px_1.png"))); // NOI18N + jButton5.setOpaque(false); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 70, 70)); + + jButton6.setBackground(new java.awt.Color(5, 116, 232)); + jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icons8_help_40px.png"))); // NOI18N + jButton6.setOpaque(false); + jButton6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton6ActionPerformed(evt); + } + }); + getContentPane().add(jButton6, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 70, 70, 60)); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/textecy.jpg"))); // NOI18N + getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1)); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + String s=inp.getText(); + + inp.setText(encryptkey(s)); + Component frame = null; + // TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + String s=inp.getText(); + + inp.setText(decryptkey(s)); + + Component frame = null; + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + inp.setText(" "); + }//GEN-LAST:event_jButton3ActionPerformed + + private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed + StringSelection stringSelection = new StringSelection (inp.getText()); + Clipboard clpbrd = Toolkit.getDefaultToolkit ().getSystemClipboard (); + clpbrd.setContents (stringSelection, null); + JOptionPane.showMessageDialog(JFrame,"Your Message is copied"); + }//GEN-LAST:event_jButton4ActionPerformed + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + this.toBack(); + + +// TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed + JOptionPane.showMessageDialog(null, "This project, Crypto (Text Encryption and Decryption Software) is developed using NetBeans.\n This project is written in java language. \n The aim of this system was to create a Graphical User Interface program which can \n help user to Encrypt or Decrypt message or Image."); + }//GEN-LAST:event_jButton6ActionPerformed + int count=0; + public static String encryptkey(String s1) { +StringBuffer sb=new StringBuffer(); +for(int i=0;i<s1.length();i++){ +char c=s1.charAt(i); +if(i%2==0){ +if(c==122) +{ + c=(char) (c-25); + +} +else{ +c=(char) (c+1);} +sb.append(c);} +else +sb.append(c);} +return sb.toString(); +} + + public static String decryptkey(String s1) { +StringBuffer sb=new StringBuffer(); +for(int i=0;i<s1.length();i++){ +char c=s1.charAt(i); +if(i%2==0){ +if(c==122) +c=(char) (c-25); +else{ +c=(char) (c-1);} +sb.append(c);} +else +sb.append(c);} +return sb.toString(); +} + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Textencryption.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Textencryption.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Textencryption.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Textencryption.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Textencryption().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextArea inp; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton4; + private javax.swing.JButton jButton5; + private javax.swing.JButton jButton6; + private javax.swing.JLabel jLabel1; + private javax.swing.JScrollPane jScrollPane1; + // End of variables declaration//GEN-END:variables +} diff --git a/Crypto-Image and Text Encryption Decryption/src/crypto/f.java b/Crypto-Image and Text Encryption Decryption/src/crypto/f.java new file mode 100644 index 00000000..8e7eb0f0 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/src/crypto/f.java @@ -0,0 +1,14 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package crypto; + +/** + * + * @author SP + */ +class f { + +} diff --git a/Crypto-Image and Text Encryption Decryption/src/crypto/icon.png b/Crypto-Image and Text Encryption Decryption/src/crypto/icon.png new file mode 100644 index 00000000..527e7328 Binary files /dev/null and b/Crypto-Image and Text Encryption Decryption/src/crypto/icon.png differ diff --git a/Crypto-Image and Text Encryption Decryption/src/crypto/imagencryption.form b/Crypto-Image and Text Encryption Decryption/src/crypto/imagencryption.form new file mode 100644 index 00000000..4878dc94 --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/src/crypto/imagencryption.form @@ -0,0 +1,134 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Crypto"/> + <Property name="resizable" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-85,0,0,2,-106"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextField" name="inp"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="36" style="0"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="400" y="270" width="180" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="Encrypt"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="150" y="370" width="160" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="text" type="java.lang.String" value="Decrypt"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="360" y="370" width="160" height="50"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Arial" size="36" style="0"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Enter Key"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="140" y="260" width="160" height="60"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e8" green="74" red="5" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/icons8_back_arrow_64px_1.png"/> + </Property> + <Property name="opaque" type="boolean" value="false"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="70" height="70"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="e8" green="74" red="5" type="rgb"/> + </Property> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/icons8_help_40px.png"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="590" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Images/imgencryptions.jpg"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/Crypto-Image and Text Encryption Decryption/src/crypto/imagencryption.java b/Crypto-Image and Text Encryption Decryption/src/crypto/imagencryption.java new file mode 100644 index 00000000..db6b54fe --- /dev/null +++ b/Crypto-Image and Text Encryption Decryption/src/crypto/imagencryption.java @@ -0,0 +1,203 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package crypto; + +import java.awt.Toolkit; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import javax.swing.JFileChooser; +import javax.swing.JOptionPane; + +/** + * + * @author SP + */ + + +public class imagencryption extends javax.swing.JFrame { + + /** + * Creates new form imagencryption + */ + public imagencryption() { + initComponents(); + this.setLocationRelativeTo(null); + setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("icon.png"))); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + inp = new javax.swing.JTextField(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jLabel2 = new javax.swing.JLabel(); + jButton5 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Crypto"); + setResizable(false); + getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + inp.setFont(new java.awt.Font("Arial", 0, 36)); // NOI18N + getContentPane().add(inp, new org.netbeans.lib.awtextra.AbsoluteConstraints(400, 270, 180, 50)); + + jButton1.setText("Encrypt"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 370, 160, 50)); + + jButton2.setText("Decrypt"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 370, 160, 50)); + + jLabel2.setFont(new java.awt.Font("Arial", 0, 36)); // NOI18N + jLabel2.setForeground(new java.awt.Color(255, 255, 255)); + jLabel2.setText("Enter Key"); + getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 260, 160, 60)); + + jButton5.setBackground(new java.awt.Color(5, 116, 232)); + jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icons8_back_arrow_64px_1.png"))); // NOI18N + jButton5.setOpaque(false); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + getContentPane().add(jButton5, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 70, 70)); + + jButton3.setBackground(new java.awt.Color(5, 116, 232)); + jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icons8_help_40px.png"))); // NOI18N + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 0, -1, -1)); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/imgencryptions.jpg"))); // NOI18N + getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1)); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + String text=inp.getText(); + int temp=Integer.parseInt(text); + operate(temp); + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + String text=inp.getText(); + int temp=Integer.parseInt(text); + operate(temp); // TODO add your handling code here: + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed + this.toBack(); + + // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + JOptionPane.showMessageDialog(null, "This project, Crypto (Text Encryption and Decryption Software) is developed using NetBeans.\n This project is written in java language. \n The aim of this system was to create a Graphical User Interface program which can \n help user to Encrypt or Decrypt message or Image."); + }//GEN-LAST:event_jButton3ActionPerformed + + /** + * @param args the command line arguments + */ + + public static void operate(int key) + { + + JFileChooser fileChooser=new JFileChooser(); + fileChooser.showOpenDialog(null); + File file=fileChooser.getSelectedFile(); + //file FileInputStream + try + { + + FileInputStream fis=new FileInputStream(file); + + byte []data=new byte[fis.available()]; + fis.read(data); + int i=0; + for(byte b:data) + { + System.out.println(b); + data[i]=(byte)(b^key); + i++; + } + + FileOutputStream fos=new FileOutputStream(file); + fos.write(data); + fos.close(); + fis.close(); + JOptionPane.showMessageDialog(null, "Done"); + + }catch(Exception e) + { + e.printStackTrace(); + } + } + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(imagencryption.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(imagencryption.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(imagencryption.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(imagencryption.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new imagencryption().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextField inp; + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton5; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + // End of variables declaration//GEN-END:variables +} diff --git a/Currency Converter using Java/Converter.java b/Currency Converter using Java/Converter.java new file mode 100644 index 00000000..13c96e5e --- /dev/null +++ b/Currency Converter using Java/Converter.java @@ -0,0 +1,223 @@ +package currencyConverter; + +import java.util.ArrayList; + +import java.util.HashMap; + +public class Currency { + +private String name; + +private String shortName; + +private HashMap<String, Double> exchangeValues = new HashMap<String, Double>(); + +// “Currency” Constructor + +public Currency(String nameValue, String shortNameValue) { + +this.name = nameValue; + +this.shortName = shortNameValue; + +} + +// Getter for name + +public String getName() { + +return this.name; + +} + +// Setter for name + +public void setName(String name) { + +this.name = name; + +} + +// Getter for shortName + +public String getShortName() { + +return this.shortName; + +} + +// Setter for shortName + +public void setShortName(String shortName) { + +this.shortName = shortName; + +} + +// Getter for exchangeValues + +public HashMap<String, Double> getExchangeValues() { + +return this.exchangeValues; + +} + +// Setter for exchangeValues + +public void setExchangeValues(String key, Double value) { + +this.exchangeValues.put(key, value); + +} + +// Set default values for a currency + +public void defaultValues() { + +String currency = this.name; + +switch (currency) { + +case “US Dollar”: + +this.exchangeValues.put(“USD”, 1.00); + +this.exchangeValues.put(“EUR”, 0.93); + +this.exchangeValues.put(“GBP”, 0.66); + +this.exchangeValues.put(“CHF”, 1.01); + +this.exchangeValues.put(“CNY”, 6.36); + +this.exchangeValues.put(“JPY”, 123.54); + +break; + +case “Euro”: + +this.exchangeValues.put(“USD”, 1.073); + +this.exchangeValues.put(“EUR”, 1.00); + +this.exchangeValues.put(“GBP”, 0.71); + +this.exchangeValues.put(“CHF”, 1.08); + +this.exchangeValues.put(“CNY”, 6.83); + +this.exchangeValues.put(“JPY”, 132.57); + +break; + +case “British Pound”: + +this.exchangeValues.put(“USD”, 1.51); + +this.exchangeValues.put(“EUR”, 1.41); + +this.exchangeValues.put(“GBP”, 1.00); + +this.exchangeValues.put(“CHF”, 1.52); + +this.exchangeValues.put(“CNY”, 9.60); + +this.exchangeValues.put(“JPY”, 186.41); + +break; + +case “Swiss Franc”: + +this.exchangeValues.put(“USD”, 0.99); + +this.exchangeValues.put(“EUR”, 0.93); + +this.exchangeValues.put(“GBP”, 0.66); + +this.exchangeValues.put(“CHF”, 1.00); + +this.exchangeValues.put(“CNY”, 6.33); + +this.exchangeValues.put(“JPY”, 122.84); + +break; + +case “Chinese Yuan Renminbi”: + +this.exchangeValues.put(“USD”, 0.16); + +this.exchangeValues.put(“EUR”, 0.15); + +this.exchangeValues.put(“GBP”, 0.11); + +this.exchangeValues.put(“CHF”, 0.16); + +this.exchangeValues.put(“CNY”, 1.00); + +this.exchangeValues.put(“JPY”, 19.41); + +break; + +case “Japanese Yen”: + +this.exchangeValues.put(“USD”, 0.008); + +this.exchangeValues.put(“EUR”, 0.007); + +this.exchangeValues.put(“GBP”, 0.005); + +this.exchangeValues.put(“CHF”, 0.008); + +this.exchangeValues.put(“CNY”, 0.051); + +this.exchangeValues.put(“JPY”, 1.000); + +break; + +} + +} + +// Initialize currencies + +public static ArrayList<Currency> init() { + +ArrayList<Currency> currencies = new ArrayList<Currency>(); + +currencies.add( new Currency(“US Dollar”, “USD”) ); + +currencies.add( new Currency(“Euro”, “EUR”) ); + +currencies.add( new Currency(“British Pound”, “GBP”) ); + +currencies.add( new Currency(“Swiss Franc”, “CHF”) ); + +currencies.add( new Currency(“Chinese Yuan Renminbi”, “CNY”) ); + +currencies.add( new Currency(“Japanese Yen”, “JPY”) ); + +for (Integer i =0; i < currencies.size(); i++) { + +currencies.get(i).defaultValues(); + +} + +return currencies; + +} + +// Convert a currency to another + +public static Double convert(Double amount, Double exchangeValue) { + +Double price; + +price = amount * exchangeValue; + +price = Math.round(price * 100d) / 100d; + +return price; + +} + +} diff --git a/Currency Converter.java b/Currency Converter.java new file mode 100644 index 00000000..1a43e2fa --- /dev/null +++ b/Currency Converter.java @@ -0,0 +1,132 @@ +// Java program to convert from +// rupee to the dollar and vice-versa +// using Java Swing + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; +public class GFG { + + // Function to convert from rupee + // to the dollar and vice-versa + // using Java Swing + public static void converter() + { + + // Creating a new frame using JFrame + JFrame f = new JFrame("CONVERTER"); + + // Creating two labels + JLabel l1, l2; + + // Creating two text fields. + // One for rupee and one for + // the dollar + JTextField t1, t2; + + // Creating three buttons + JButton b1, b2, b3; + + // Naming the labels and setting + // the bounds for the labels + l1 = new JLabel("Rupees:"); + l1.setBounds(20, 40, 60, 30); + l2 = new JLabel("Dollars:"); + l2.setBounds(170, 40, 60, 30); + + // Initializing the text fields with + // 0 by default and setting the + // bounds for the text fields + t1 = new JTextField("0"); + t1.setBounds(80, 40, 50, 30); + t2 = new JTextField("0"); + t2.setBounds(240, 40, 50, 30); + + // Creating a button for INR, + // one button for the dollar + // and one button to close + // and setting the bounds + b1 = new JButton("INR"); + b1.setBounds(50, 80, 60, 15); + b2 = new JButton("Dollar"); + b2.setBounds(190, 80, 60, 15); + b3 = new JButton("close"); + b3.setBounds(150, 150, 60, 30); + + // Adding action listener + b1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + // Converting to double + double d + = Double.parseDouble(t1.getText()); + + // Converting rupees to dollars + double d1 = (d / 65.25); + + // Getting the string value of the + // calculated value + String str1 = String.valueOf(d1); + + // Placing it in the text box + t2.setText(str1); + } + }); + + // Adding action listener + b2.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + // Converting to double + double d2 + = Double.parseDouble(t2.getText()); + + // converting Dollars to rupees + double d3 = (d2 * 65.25); + + // Getting the string value of the + // calculated value + String str2 = String.valueOf(d3); + + // Placing it in the text box + t1.setText(str2); + } + }); + + // Action listener to close the form + b3.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) + { + f.dispose(); + } + }); + + // Default method for closing the frame + f.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) + { + System.exit(0); + } + }); + + // Adding the created objects + // to the form + f.add(l1); + f.add(t1); + f.add(l2); + f.add(t2); + f.add(b1); + f.add(b2); + f.add(b3); + + f.setLayout(null); + f.setSize(400, 300); + f.setVisible(true); + } + + // Driver code + public static void main(String args[]) + { + converter(); + } +} diff --git a/Currency Converter/CurrencyConverter.java b/Currency Converter/CurrencyConverter.java new file mode 100644 index 00000000..17699db5 --- /dev/null +++ b/Currency Converter/CurrencyConverter.java @@ -0,0 +1,226 @@ +package com.exchange; + +import java.io.*; + +import java.net.*; + +import java.util.*; + +import javax.servlet.*; + +import javax.servlet.http.*; + +import java.io.InputStream; + +import java.net.*; + +import com.google.gson.*; + + +classRecv + +{ + +private String lhs; + +private String rhs; + +private String error; + +private String icc; + +public Recv( + +{ + +} + +public String getLhs() + +{ + +return lhs; + +} + +public String getRhs() + +{ + +return rhs; + +} + +} + +public classConvertextendsHttpServlet { + +/** + +* Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. + +* @param request servlet request + +* @param response servlet response + +* @throws ServletException if a servlet-specific error occurs + +* @throws IOException if an I/O error occurs + +*/ + +protected void processRequest(HttpServletRequest req, HttpServletResponse resp) + +throws ServletException, IOException { + +String query = ""; + +String amount = ""; + +String curTo = ""; + +String curFrom = ""; + +String submit = ""; + +String res = ""; + +HttpSession session; + +resp.setContentType("text/html;charset=UTF-8"); + +PrintWriter out = resp.getWriter(); + +/*Read request parameters*/ + +amount = req.getParameter("amount"); + +curTo = req.getParameter("to"); + +curFrom = req.getParameter("from"); + +/*Open a connection to google and read the result*/ + +try { + +query = "http://www.google.com/ig/calculator?hl=en&q=" + amount + curFrom + "=?" + curTo; + +URL url = new URL(query); + +InputStreamReader stream = new InputStreamReader(url.openStream()); + +BufferedReader in = new BufferedReader(stream); + +String str = ""; + +String temp = ""; + +while ((temp = in.readLine()) != null) { + +str = str + temp; + +} + +/*Parse the result which is in json format*/ + +Gson gson = new Gson(); + +Recv st = gson.fromJson(str, Recv.class); + +String rhs = st.getRhs(); + +rhs = rhs.replaceAll("�", ""); + +/*we do the check in order to print the additional word(millions,billions etc)*/ + +StringTokenizer strto = new StringTokenizer(rhs); + +String nextToken; + +out.write(strto.nextToken()); + +nextToken = strto.nextToken(); + +if( nextToken.equals("million") || nextToken.equals("billion") || nextToken.equals("trillion")) + +{ + +out.println(" "+nextToken); + +} + +} catch (NumberFormatException e) { + +out.println("The given amount is not a valid number"); + +} + +} + +// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> + +/** + +* Handles the HTTP <code>GET</code> method. + +* @param request servlet request + +* @param response servlet response + +* @throws ServletException if a servlet-specific error occurs + +* @throws IOException if an I/O error occurs + +*/ + +@Override + +protected void doGet(HttpServletRequest request, HttpServletResponse response) + +throws ServletException, IOException { + +processRequest(request, response); + +} + +/** + +* Handles the HTTP <code>POST</code> method. + +* @param request servlet request + +* @param response servlet response + +* @throws ServletException if a servlet-specific error occurs + +* @throws IOException if an I/O error occurs + +*/ + +@Override + +protected void doPost(HttpServletRequest request, HttpServletResponse response) + +throws ServletException, IOException { + +processRequest(request, response); + +} + +/** + +* Returns a short description of the servlet. + +* @return a String containing servlet description + +*/ + +@Override + +public String getServletInfo() { + +return "Short description"; + +} + +} \ No newline at end of file diff --git a/Currency Converter/currency_converter.java b/Currency Converter/currency_converter.java new file mode 100644 index 00000000..cd1ea9e5 --- /dev/null +++ b/Currency Converter/currency_converter.java @@ -0,0 +1,241 @@ +/* + +* To change this template, choose Tools | Templates + +* and open the template in the editor. + +*/ + +package com.exchange; + +import java.io.*; + +import java.net.*; + +import java.util.*; + +import javax.servlet.*; + +import javax.servlet.http.*; + +import java.io.InputStream; + +import java.net.*; + +import com.google.gson.*; + +/** + +* + +* @author pakallis + +*/ + +classRecv + +{ + +private String lhs; + +private String rhs; + +private String error; + +private String icc; + +public Recv( + +{ + +} + +public String getLhs() + +{ + +return lhs; + +} + +public String getRhs() + +{ + +return rhs; + +} + +} + +public classConvertextendsHttpServlet { + +/** + +* Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. + +* @param request servlet request + +* @param response servlet response + +* @throws ServletException if a servlet-specific error occurs + +* @throws IOException if an I/O error occurs + +*/ + +protected void processRequest(HttpServletRequest req, HttpServletResponse resp) + +throws ServletException, IOException { + +String query = ""; + +String amount = ""; + +String curTo = ""; + +String curFrom = ""; + +String submit = ""; + +String res = ""; + +HttpSession session; + +resp.setContentType("text/html;charset=UTF-8"); + +PrintWriter out = resp.getWriter(); + +/*Read request parameters*/ + +amount = req.getParameter("amount"); + +curTo = req.getParameter("to"); + +curFrom = req.getParameter("from"); + +/*Open a connection to google and read the result*/ + +try { + +query = "http://www.google.com/ig/calculator?hl=en&q=" + amount + curFrom + "=?" + curTo; + +URL url = new URL(query); + +InputStreamReader stream = new InputStreamReader(url.openStream()); + +BufferedReader in = new BufferedReader(stream); + +String str = ""; + +String temp = ""; + +while ((temp = in.readLine()) != null) { + +str = str + temp; + +} + +/*Parse the result which is in json format*/ + +Gson gson = new Gson(); + +Recv st = gson.fromJson(str, Recv.class); + +String rhs = st.getRhs(); + +rhs = rhs.replaceAll("�", ""); + +/*we do the check in order to print the additional word(millions,billions etc)*/ + +StringTokenizer strto = new StringTokenizer(rhs); + +String nextToken; + +out.write(strto.nextToken()); + +nextToken = strto.nextToken(); + +if( nextToken.equals("million") || nextToken.equals("billion") || nextToken.equals("trillion")) + +{ + +out.println(" "+nextToken); + +} + +} catch (NumberFormatException e) { + +out.println("The given amount is not a valid number"); + +} + +} + +// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> + +/** + +* Handles the HTTP <code>GET</code> method. + +* @param request servlet request + +* @param response servlet response + +* @throws ServletException if a servlet-specific error occurs + +* @throws IOException if an I/O error occurs + +*/ + +@Override + +protected void doGet(HttpServletRequest request, HttpServletResponse response) + +throws ServletException, IOException { + +processRequest(request, response); + +} + +/** + +* Handles the HTTP <code>POST</code> method. + +* @param request servlet request + +* @param response servlet response + +* @throws ServletException if a servlet-specific error occurs + +* @throws IOException if an I/O error occurs + +*/ + +@Override + +protected void doPost(HttpServletRequest request, HttpServletResponse response) + +throws ServletException, IOException { + +processRequest(request, response); + +} + +/** + +* Returns a short description of the servlet. + +* @return a String containing servlet description + +*/ + +@Override + +public String getServletInfo() { + +return "Short description"; + +}// </editor-fold> + +} diff --git a/DNS Record using Python/dns_record.py b/DNS Record using Python/dns_record.py new file mode 100644 index 00000000..70da90b7 --- /dev/null +++ b/DNS Record using Python/dns_record.py @@ -0,0 +1,29 @@ +#Simple program to fetch dns record of a given website + +import dns.resolver + +#Dictionary to store the dns record of a website +dns_record = {} + +#User defined website +website = input("Enter the name of the website: ") + +#Fetching the 'A' record of the website and storing it in the dictionary +a_record = dns.resolver.resolve(website, 'A') +for ipval in a_record: + dns_record['A_Record_IP'] = ipval.to_text() + +#List to store the mx records of a website +mx_record_list = [] + +#Fetching the mx records and storing them in the dictionary +mx_record = dns.resolver.resolve(website,'MX') +for server in mx_record: + mx_record_list.append(server) +for i, element in enumerate(mx_record_list): + dns_record['MX_Record', i+1] = element + +#Displaying the record on the screen +for key,value in dns_record.items(): + print(f"{key} = {value}") + diff --git a/DNS Record using Python/requirements.txt b/DNS Record using Python/requirements.txt new file mode 100644 index 00000000..689e42ff --- /dev/null +++ b/DNS Record using Python/requirements.txt @@ -0,0 +1 @@ +dnspython==2.0.0 \ No newline at end of file diff --git a/Data Visualisation/.github/workflows/maven.yml b/Data Visualisation/.github/workflows/maven.yml new file mode 100644 index 00000000..7e43ac43 --- /dev/null +++ b/Data Visualisation/.github/workflows/maven.yml @@ -0,0 +1,28 @@ +# https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: GROOT-CI + +on: + push: + branches: [ '**' ] + pull_request: + branches: [ '**' ] + schedule: + # NOTE: From what I read, the email notification for cron can only go + # to the last committer of this file!!!!! + - cron: '0 22 * * *' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: build + run: mvn install + diff --git a/Data Visualisation/.gitignore b/Data Visualisation/.gitignore new file mode 100644 index 00000000..f44c0108 --- /dev/null +++ b/Data Visualisation/.gitignore @@ -0,0 +1,12 @@ +/target/ + +*.prefs + +.classpath + +.project + +hs_err_pid50650.log + +hs_err_pid50363.log +/bin/ diff --git a/Data Visualisation/Readme.md b/Data Visualisation/Readme.md new file mode 100644 index 00000000..6e0fc9ca --- /dev/null +++ b/Data Visualisation/Readme.md @@ -0,0 +1,35 @@ + +<h1 align="center">Data Visualisation using Java</h1> + +## Introduction +Java Data Visualization project designed to make histogramming, plotting, and fitting accessible for Java users. +## Features +- Histograms 1D/2D +- Functions +- GraphErrors +- Fitting routines using Minuit +- GUI tools for easily editing plot attributes and for fitting + +## How to run +Unzip src file + + Check out the examples on our [Wiki](https://github.com/gavalian/groot/wiki "GROOT Wiki"). + +To run the example: Simply double click on the jar if you're a mac user, or if you're a linux user run ```java -jar GrootDemo.jar``` + +<img src="https://github.com/gavalian/groot/blob/master/images/multipad.png" width="800"> +<img src="https://github.com/gavalian/groot/blob/master/images/histogram2d_demo.png" width="400"> +<img src="https://github.com/gavalian/groot/blob/master/images/copyPaste.png" width="400"> +<img src="https://github.com/gavalian/groot/blob/master/images/totalcs_ppbar.png" width="800"> + +# Installation +Simply add this [library jar](https://github.com/gavalian/groot/raw/master/jars/) to your build path in an IDE. + +# Requirements +Java 1.8 or greater + +# Documentation +Check out our [Wiki](https://github.com/gavalian/groot/wiki "GROOT Wiki")! + +# Feature requests and contributions +One of the best ways to contribute is to give us feature requests and bug reports on the [issues page](https://github.com/gavalian/groot/issues "GROOT Issues page")! diff --git a/Data Visualisation/build_docs.sh b/Data Visualisation/build_docs.sh new file mode 100644 index 00000000..0cf7245a --- /dev/null +++ b/Data Visualisation/build_docs.sh @@ -0,0 +1,106 @@ +#!/bin/bash +#******************************************************** +# Compilation code for the JNP Library project. +# To compile and deploy the library use the command +# >./build.sh -b +# This will build all the submodules and deploy them +# to MAVEN repository at Jefferson Lab +# To clean the previous build use: +# >./build.sh -c +# To clean all built jars and temporary files +# To generate JavaDoc ( Java API documentation) use: +# >./build.sh -d +# +# The project has a synchronized version set to all +# submodules, currently the change is done manually +# using the command: +# +# mvn versions:set -DnewVersion=1.1-SNAPSHOT +# +# this command is run in each directory, to switch the +# version numbers. In the future this will be automated +#-------------------------------------------------------- +#******************************************************** +# Parsing command line arguments +#-------------------------------------------------------- +while [ "$1" != "" ]; do + case $1 in + -c) + CLEAN_COMMAND="1" + shift 1 + continue + ;; + -b) + BUILD_COMMAND="1" + shift 1 + continue + ;; + -l) + LOCAL_BUILD_COMMAND="1" + shift 1 + continue + ;; + -d) + DOCS_COMMAND="1" + shift 1 + continue + ;; + *) + break + esac +done +#----------------------------------------------------------- +# If clean command was activated. maven clean is performed +# in all sub directories +#----------------------------------------------------------- +if [[ ! -z $CLEAN_COMMAND ]] +then + echo 'Cleaning the distribution' + cd jnp-utils ; mvn clean; cd - + cd jnp-cli ; mvn clean; cd - + cd jnp-hipo ; mvn clean; cd - + cd jnp-physics ; mvn clean; cd - + cd jnp-math ; mvn clean; cd - + cd jnp-distro ; rm -rf jaw* ; cd - +fi +#*********************************************************** +# BUILD LOCALLY without deploying the distribution +#*********************************************************** +if [[ ! -z $LOCAL_BUILD_COMMAND ]] +then + echo 'building the distribution locally' + rm -rf ~/.m2/repository/org/jlab/jnp + cd jnp-utils ; mvn install; cd - + cd jnp-cli ; mvn install; cd - + cd jnp-hipo ; mvn install; cd - + cd jnp-physics ; mvn install; cd - + cd jnp-math ; mvn install; cd - +fi +#----------------------------------------------------------- +# If the build command is activated maven install and +# maven deploy commands are executed for all sub modules +#----------------------------------------------------------- +if [[ ! -z $BUILD_COMMAND ]] +then + echo 'building the distribution' + rm -rf ~/.m2/repository/org/jlab/jnp + cd jnp-utils ; mvn install; mvn deploy; cd - + cd jnp-cli ; mvn install; mvn deploy; cd - + cd jnp-hipo ; mvn install; mvn deploy; cd - + cd jnp-math ; mvn install; mvn deploy; cd - + cd jnp-physics ; mvn install; mvn deploy; cd - +fi +#----------------------------------------------------------- +# generating the documentation for the sub modules. +# if permissions permit, they will be ported to clas12 +# documentation site. +#----------------------------------------------------------- +if [[ ! -z $DOCS_COMMAND ]] +then + echo 'documenting the distribution' + javadoc -d javadoc/groot -sourcepath src/main/java/ -subpackages org + scp -r javadoc clas12@ifarm1402:/group/clas/www/clasweb/html/jhep/docs/. +fi + +#----------------------------------------------------------- +echo ''; echo 'all done.....'; echo '' diff --git a/Data Visualisation/build_history.txt b/Data Visualisation/build_history.txt new file mode 100644 index 00000000..646a9cd3 --- /dev/null +++ b/Data Visualisation/build_history.txt @@ -0,0 +1,6 @@ +1.0.1 2016-08-30 56d134a Will Phelps Fixing build issues +1.0.1 2016-08-30 56d134a Will Phelps Fixing build issues +1.0.1 2016-08-30 56d134a Will Phelps Fixing build issues +1.1.0 + 2016-09-08 76a260f Will Phelps Bug Fix: X Axis Title Position +1.1.1 2016-09-08 76a260f Will Phelps Bug Fix: X Axis Title Position diff --git a/Data Visualisation/build_version.pl b/Data Visualisation/build_version.pl new file mode 100644 index 00000000..082440a5 --- /dev/null +++ b/Data Visualisation/build_version.pl @@ -0,0 +1,59 @@ +$major = 0; +$minor = 0; +$subminor = 1; +foreach(@ARGV){ + print $_."\n"; + if(index($_,"-minor")!=-1){ + $minor = 1; + $subminor = 0; + }elsif(index($_,"-major")!=-1){ + $major = 1; + } +} +$date = `date +%F`; +$hash = `git log --format="%H" -n 1`; +$username = `git log --format="%cn" -n 1`; +$message = `git log --format="%s" -n 1`; +$hash = substr($hash,0,7); + +chomp($username); +chomp($message); +chomp($date); + +#print $date."_".$hash."\n"; +print $date ." ".$hash." ".$username." ".$message." \n"; + +open($original_pom, "pom.xml"); +open($new_pom, ">pom_new.xml"); +open($build_history, ">>build_history.txt"); + +while(<$original_pom>){ + chomp; + #print $_ ."\n"; + if(index($_, "<version>")!=-1&&index($_, "SNAPSHOT")!=-1){ + $_ =~ s|<.+?>||g; + $_ =~ s|-SNAPSHOT||g; + $_ =~ s/^\s+|\s+$//g; + @version = split(/\./,$_); + print "Old version:".$version[0]."\.".$version[1]."\.".$version[2]."\n"; + $new_version = ""; + if($minor == 1){ + $new_version = $version[0]."\.".($version[1]+1)."\.0\n"; + }elsif($major == 1){ + $new_version = ($version[0]+1)."\.0\.0"; + }else{ + $new_version = $version[0]."\.".$version[1]."\.".($version[2]+1); + } + print $build_history "".$new_version." ".$date ." ".$hash." ".$username." ".$message." \n"; + print "New version:".$new_version."\n"; + chomp($new_version); + print $new_pom " <version>".$new_version."-SNAPSHOT"."</version>"."\n" + }else{ + print $new_pom $_."\n"; + } +} +system("mv pom.xml pom_old.xml"); +system("mv pom_new.xml pom.xml"); +system("mvn3 package"); +system("mv target/*.jar jars/") + diff --git a/Data Visualisation/images/Histogram2D.png b/Data Visualisation/images/Histogram2D.png new file mode 100644 index 00000000..032b1805 Binary files /dev/null and b/Data Visualisation/images/Histogram2D.png differ diff --git a/Data Visualisation/images/bar_graph_example.png b/Data Visualisation/images/bar_graph_example.png new file mode 100644 index 00000000..aae7e81e Binary files /dev/null and b/Data Visualisation/images/bar_graph_example.png differ diff --git a/Data Visualisation/images/basicdemo1.png b/Data Visualisation/images/basicdemo1.png new file mode 100644 index 00000000..7da54d0a Binary files /dev/null and b/Data Visualisation/images/basicdemo1.png differ diff --git a/Data Visualisation/images/basicdemo1_5.png b/Data Visualisation/images/basicdemo1_5.png new file mode 100644 index 00000000..c0f1e776 Binary files /dev/null and b/Data Visualisation/images/basicdemo1_5.png differ diff --git a/Data Visualisation/images/basicdemo2.png b/Data Visualisation/images/basicdemo2.png new file mode 100644 index 00000000..fca498f2 Binary files /dev/null and b/Data Visualisation/images/basicdemo2.png differ diff --git a/Data Visualisation/images/basicdemo3.png b/Data Visualisation/images/basicdemo3.png new file mode 100644 index 00000000..1df9468f Binary files /dev/null and b/Data Visualisation/images/basicdemo3.png differ diff --git a/Data Visualisation/images/basicdemo3_log.png b/Data Visualisation/images/basicdemo3_log.png new file mode 100644 index 00000000..e12459c2 Binary files /dev/null and b/Data Visualisation/images/basicdemo3_log.png differ diff --git a/Data Visualisation/images/copy.png b/Data Visualisation/images/copy.png new file mode 100644 index 00000000..ed17b4dd Binary files /dev/null and b/Data Visualisation/images/copy.png differ diff --git a/Data Visualisation/images/copyPaste.png b/Data Visualisation/images/copyPaste.png new file mode 100644 index 00000000..ce871a94 Binary files /dev/null and b/Data Visualisation/images/copyPaste.png differ diff --git a/Data Visualisation/images/customFunction.png b/Data Visualisation/images/customFunction.png new file mode 100644 index 00000000..c5d146ef Binary files /dev/null and b/Data Visualisation/images/customFunction.png differ diff --git a/Data Visualisation/images/customfunction_demo.png b/Data Visualisation/images/customfunction_demo.png new file mode 100644 index 00000000..d55f0717 Binary files /dev/null and b/Data Visualisation/images/customfunction_demo.png differ diff --git a/Data Visualisation/images/doubleClick.png b/Data Visualisation/images/doubleClick.png new file mode 100644 index 00000000..92782d95 Binary files /dev/null and b/Data Visualisation/images/doubleClick.png differ diff --git a/Data Visualisation/images/fitPanel.png b/Data Visualisation/images/fitPanel.png new file mode 100644 index 00000000..421c84c3 Binary files /dev/null and b/Data Visualisation/images/fitPanel.png differ diff --git a/Data Visualisation/images/groot4_example_1.png b/Data Visualisation/images/groot4_example_1.png new file mode 100644 index 00000000..06c5a034 Binary files /dev/null and b/Data Visualisation/images/groot4_example_1.png differ diff --git a/Data Visualisation/images/histogram2d_demo.png b/Data Visualisation/images/histogram2d_demo.png new file mode 100644 index 00000000..f6f19a68 Binary files /dev/null and b/Data Visualisation/images/histogram2d_demo.png differ diff --git a/Data Visualisation/images/histogram2d_log.png b/Data Visualisation/images/histogram2d_log.png new file mode 100644 index 00000000..fc73c82d Binary files /dev/null and b/Data Visualisation/images/histogram2d_log.png differ diff --git a/Data Visualisation/images/modifiedHistogram.png b/Data Visualisation/images/modifiedHistogram.png new file mode 100644 index 00000000..0d77a66d Binary files /dev/null and b/Data Visualisation/images/modifiedHistogram.png differ diff --git a/Data Visualisation/images/multipad.png b/Data Visualisation/images/multipad.png new file mode 100644 index 00000000..af6e4718 Binary files /dev/null and b/Data Visualisation/images/multipad.png differ diff --git a/Data Visualisation/images/multiplot_example.png b/Data Visualisation/images/multiplot_example.png new file mode 100644 index 00000000..9fb449da Binary files /dev/null and b/Data Visualisation/images/multiplot_example.png differ diff --git a/Data Visualisation/images/optionsPanel.png b/Data Visualisation/images/optionsPanel.png new file mode 100644 index 00000000..be1a9605 Binary files /dev/null and b/Data Visualisation/images/optionsPanel.png differ diff --git a/Data Visualisation/images/paste.png b/Data Visualisation/images/paste.png new file mode 100644 index 00000000..3d9580a5 Binary files /dev/null and b/Data Visualisation/images/paste.png differ diff --git a/Data Visualisation/images/rightClick.png b/Data Visualisation/images/rightClick.png new file mode 100644 index 00000000..4d309e4b Binary files /dev/null and b/Data Visualisation/images/rightClick.png differ diff --git a/Data Visualisation/images/syn b/Data Visualisation/images/syn new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/Data Visualisation/images/syn @@ -0,0 +1 @@ + diff --git a/Data Visualisation/images/totalcs_ppbar.png b/Data Visualisation/images/totalcs_ppbar.png new file mode 100644 index 00000000..947d3695 Binary files /dev/null and b/Data Visualisation/images/totalcs_ppbar.png differ diff --git a/Data Visualisation/k.jpg b/Data Visualisation/k.jpg new file mode 100644 index 00000000..fcb83339 Binary files /dev/null and b/Data Visualisation/k.jpg differ diff --git a/Data Visualisation/pom.xml b/Data Visualisation/pom.xml new file mode 100644 index 00000000..c5bfb03d --- /dev/null +++ b/Data Visualisation/pom.xml @@ -0,0 +1,148 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.jlab</groupId> + <artifactId>groot</artifactId> + <version>4.0.4-SNAPSHOT</version> + <packaging>jar</packaging> + + <dependencies> + <dependency> + <groupId>net.objecthunter</groupId> + <artifactId>exp4j</artifactId> + <version>0.4.4</version> + </dependency> + + <dependency> + <groupId>org.jlab.jnp</groupId> + <artifactId>jnp-hipo</artifactId> + <version>2.0-SNAPSHOT</version> + </dependency> + + <dependency> + <groupId>org.jlab.jnp</groupId> + <artifactId>jnp-hipo4</artifactId> + <version>4.1-SNAPSHOT</version> + </dependency> + + <dependency> + <groupId>org.jlab.jnp</groupId> + <artifactId>jnp-graphics</artifactId> + <version>2.0-SNAPSHOT</version> + </dependency> + + <!-- https://mvnrepository.com/artifact/org.freehep/freehep-jminuit --> + <dependency> + <groupId>org.freehep</groupId> + <artifactId>freehep-jminuit</artifactId> + <version>1.0.2</version> + </dependency> + + <dependency> + <groupId>org.jfree</groupId> + <artifactId>org.jfree.pdf</artifactId> + <version>2.0</version> + </dependency> + + <dependency> + <groupId>org.jfree</groupId> + <artifactId>org.jfree.svg</artifactId> + <version>4.2</version> + </dependency> + + + <!-- <dependency> + <groupId>org.freehep</groupId> + <artifactId>jminuit</artifactId> + <version>1.0.2</version> + </dependency> + --> + <dependency> + <groupId>net.miginfocom</groupId> + <artifactId>miglayout</artifactId> + <version>4.0</version> + </dependency> + + </dependencies> + + <repositories> + <repository> + <id>clas12maven</id> + <url>https://clasweb.jlab.org/clas12maven</url> + </repository> + <repository> + <id>jnp-maven</id> + <url>https://clasweb.jlab.org/jhep/maven</url> + </repository> + <repository> + <!--<id>freehep</id> + <url>https://java.freehep.org/maven2</url>--> + <id>freehep-repo-public</id> + <url>https://srs.slac.stanford.edu/nexus/content/groups/freehep-maven2-public/</url> + </repository> + </repositories> + + + <build> + <extensions> + <extension> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-ssh-external</artifactId> + <version>2.8</version> + </extension> + </extensions> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.0</version> + <configuration> + <source>11</source> + <target>11</target> + <release>11</release> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.6</version> + <configuration> + <descriptorRefs> + <descriptorRef>jar-with-dependencies</descriptorRef> + </descriptorRefs> + + <archive> + <manifest> + <mainClass>org.jlab.groot.demo.GROOTDemo</mainClass> + </manifest> + </archive> + + </configuration> + <executions> + <execution> + <id>make-assembly</id> <!-- this is used for inheritance merges --> + <phase>package</phase> <!-- bind to the packaging phase --> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <distributionManagement> + <repository> + <id>ssh-clasweb</id> + <url>scpexe://clas12@jlabl1.jlab.org/group/clas/www/clasweb/html/clas12maven</url> + </repository> + </distributionManagement> +<!-- + <properties> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + </properties> +--> + +</project> diff --git a/Data Visualisation/src.zip b/Data Visualisation/src.zip new file mode 100644 index 00000000..d9ab1df7 Binary files /dev/null and b/Data Visualisation/src.zip differ diff --git a/DateChooser.jar b/DateChooser.jar new file mode 100644 index 00000000..54a2e0d8 Binary files /dev/null and b/DateChooser.jar differ diff --git a/Department-Wise Salary Calculation/.DS_Store b/Department-Wise Salary Calculation/.DS_Store new file mode 100644 index 00000000..7e68eb3b Binary files /dev/null and b/Department-Wise Salary Calculation/.DS_Store differ diff --git a/Department-Wise Salary Calculation/App.json b/Department-Wise Salary Calculation/App.json new file mode 100644 index 00000000..e14c3c1e --- /dev/null +++ b/Department-Wise Salary Calculation/App.json @@ -0,0 +1 @@ +{"Department 4":64400,"Department 2":111400,"Department 3":61000,"Department 1":110000} \ No newline at end of file diff --git a/Department-Wise Salary Calculation/assessment.xml b/Department-Wise Salary Calculation/assessment.xml new file mode 100644 index 00000000..50fcc291 --- /dev/null +++ b/Department-Wise Salary Calculation/assessment.xml @@ -0,0 +1,83 @@ +<Departments> + <Department name="Department 4"> + + <Employee name="John"> + <Salary value="14000" /> + </Employee> + + <Employee name="Smith"> + <Salary value="17000" /> + </Employee> + + <Employee name="Alex"> + <Salary value="10000" /> + </Employee> + + <Employee name="Arjun"> + <Salary value="23400" /> + </Employee> + + </Department> + + <Department name="Department 2"> + + <Employee name="Athul"> + <Salary value="22400" /> + </Employee> + + <Employee name="Mohammad"> + <Salary value="23000" /> + </Employee> + + <Employee name="Anu"> + <Salary value="26000" /> + </Employee> + + <Employee name="Akshay"> + <Salary value="40000" /> + </Employee> + + </Department> + + <Department name="Department 3"> + + <Employee name="Gabriel"> + <Salary value="13000" /> + </Employee> + + <Employee name="Harvey"> + <Salary value="17000" /> + </Employee> + + <Employee name="Alen"> + <Salary value="10000" /> + </Employee> + + <Employee name="Akbar"> + <Salary value="21000" /> + </Employee> + + </Department> + + <Department name="Department 1"> + + <Employee name="Elsa"> + <Salary value="13000" /> + </Employee> + + <Employee name="Gerald"> + <Salary value="38000" /> + </Employee> + + <Employee name="Jamie"> + <Salary value="24000" /> + </Employee> + + <Employee name="Anand"> + <Salary value="35000" /> + </Employee> + + </Department> + + +</Departments> diff --git a/Department-Wise Salary Calculation/pom.xml b/Department-Wise Salary Calculation/pom.xml new file mode 100644 index 00000000..cb0be32a --- /dev/null +++ b/Department-Wise Salary Calculation/pom.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.example</groupId> + <artifactId>assessment</artifactId> + <version>1.0-SNAPSHOT</version> + + <dependencies> + <dependency> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <version>2.2.4</version> + </dependency> + </dependencies> + + <properties> + <maven.compiler.source>16</maven.compiler.source> + <maven.compiler.target>16</maven.compiler.target> + </properties> + +</project> \ No newline at end of file diff --git a/Department-Wise Salary Calculation/src/main/java/assessment/Department_salary.java b/Department-Wise Salary Calculation/src/main/java/assessment/Department_salary.java new file mode 100644 index 00000000..9fb359de --- /dev/null +++ b/Department-Wise Salary Calculation/src/main/java/assessment/Department_salary.java @@ -0,0 +1,2 @@ +package assessment;public class Department_salary { +} diff --git a/Department-Wise Salary Calculation/src/main/java/assessment/salary.java b/Department-Wise Salary Calculation/src/main/java/assessment/salary.java new file mode 100644 index 00000000..a2d9c4e6 --- /dev/null +++ b/Department-Wise Salary Calculation/src/main/java/assessment/salary.java @@ -0,0 +1,71 @@ +package assessment; +import java.io.FileWriter; +import java.io.IOException; +import java.util.HashMap; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +public class salary { + public static void main( String [] args) throws Exception + { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + HashMap<String,Integer> map=new HashMap<String,Integer>(); + String jsonString; + FileWriter myWriter = new FileWriter("App.json"); + + try { + DocumentBuilder builder = factory.newDocumentBuilder(); + Document doc = builder.parse("assessment.xml"); + NodeList departmentList =doc.getElementsByTagName("Department"); + String dep,s; + int sal,depsal=0; + for(int k=0; k<departmentList.getLength();k++) + { + Node d = departmentList.item(k); + if(d.getNodeType()==Node.ELEMENT_NODE) + { + Element department = (Element) d; + dep = department.getAttribute("name"); + NodeList employeeList = department.getChildNodes(); + for(int i=0; i<employeeList.getLength();i++) + { + Node e = employeeList.item(i); + if(e.getNodeType()==Node.ELEMENT_NODE) + { + Element employee = (Element) e; + NodeList salaryList = employee.getChildNodes(); + + Node n = salaryList.item(1); + if(n.getNodeType()==Node.ELEMENT_NODE) + { + Element salary = (Element) n; + s = salary.getAttribute("value"); + sal = Integer.parseInt(s); + depsal += sal; + } + } + } + map.put(dep,depsal); + depsal=0; + } + } + Gson gson = new GsonBuilder().disableHtmlEscaping().create(); + jsonString= gson.toJson(map); + System.out.println(jsonString); + myWriter.write(jsonString); + myWriter.close(); + } catch (ParserConfigurationException | SAXException | IOException e) { + e.printStackTrace(); + } + } +} diff --git a/Department-Wise Salary Calculation/target/classes/assessment/Department_salary.class b/Department-Wise Salary Calculation/target/classes/assessment/Department_salary.class new file mode 100644 index 00000000..ef6adc7b Binary files /dev/null and b/Department-Wise Salary Calculation/target/classes/assessment/Department_salary.class differ diff --git a/Department-Wise Salary Calculation/target/classes/assessment/salary.class b/Department-Wise Salary Calculation/target/classes/assessment/salary.class new file mode 100644 index 00000000..b76634f7 Binary files /dev/null and b/Department-Wise Salary Calculation/target/classes/assessment/salary.class differ diff --git a/Diamond shipping project/Diamond Shipping System Abstract.docx b/Diamond shipping project/Diamond Shipping System Abstract.docx new file mode 100644 index 00000000..ca44a905 Binary files /dev/null and b/Diamond shipping project/Diamond Shipping System Abstract.docx differ diff --git a/Diamond shipping project/Diamond Shipping System Code.zip b/Diamond shipping project/Diamond Shipping System Code.zip new file mode 100644 index 00000000..d540d05a Binary files /dev/null and b/Diamond shipping project/Diamond Shipping System Code.zip differ diff --git a/Diamond shipping project/Diamond Shipping System Database.zip b/Diamond shipping project/Diamond Shipping System Database.zip new file mode 100644 index 00000000..6160849e Binary files /dev/null and b/Diamond shipping project/Diamond Shipping System Database.zip differ diff --git a/Dice Simulator/Dice_Simulator.java b/Dice Simulator/Dice_Simulator.java new file mode 100644 index 00000000..ca3caad7 --- /dev/null +++ b/Dice Simulator/Dice_Simulator.java @@ -0,0 +1,25 @@ +package com.company; + +import java.util.Random; +import java.util.Scanner; + +public class Dice_Simulator { + public static void main(String[] args) { + Scanner input=new Scanner(System.in); + System.out.print("Enter the no of dice :"); + int User_input= input.nextInt(); + + Random ran=new Random(); + System.out.println("Hey User!you Rolled"); + int Total=0; + int Computer_input=0; + for(int i=0;i<User_input;i++){ + Computer_input= ran.nextInt(6)+1; + Total=Total+Computer_input; + System.out.print(Computer_input); + System.out.print(" "); + } + System.out.println(" total " + Total); + System.out.println(" "); + } +} diff --git a/Digital Clock/DigitalClock.java b/Digital Clock/DigitalClock.java new file mode 100644 index 00000000..1c9c3abc --- /dev/null +++ b/Digital Clock/DigitalClock.java @@ -0,0 +1,74 @@ +//Digital Clock mini project + + + +import javax.swing.*; +import java.awt.*; +import java.text.SimpleDateFormat; +import java.util.Calendar; + +public class Clock extends JFrame { + + Calendar calendar; + SimpleDateFormat timeFormat; + SimpleDateFormat dayFormat; + SimpleDateFormat dateFormat; + + JLabel timeLabel; + JLabel dayLabel; + JLabel dateLabel; + String time; + String day; + String date; + Clock() { + this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + this.setTitle("Digital Clock"); + this.setLayout(new FlowLayout()); + this.setSize(350, 220); + this.setResizable(false); + + timeFormat = new SimpleDateFormat("hh:mm:ss a"); + dayFormat=new SimpleDateFormat("EEEE"); + dateFormat=new SimpleDateFormat("dd MMMMM, yyyy"); + timeLabel = new JLabel(); + timeLabel.setFont(new Font("SANS_SERIF", Font.PLAIN, 59)); + timeLabel.setBackground(Color.BLACK); + timeLabel.setForeground(Color.WHITE); + timeLabel.setOpaque(true); + dayLabel=new JLabel(); + dayLabel.setFont(new Font("Ink Free",Font.BOLD,34)); + + dateLabel=new JLabel(); + dateLabel.setFont(new Font("Ink Free",Font.BOLD,30)); + + + this.add(timeLabel); + this.add(dayLabel); + this.add(dateLabel); + this.setVisible(true); + + setTimer(); + } + + public void setTimer() { + while (true) { + time = timeFormat.format(Calendar.getInstance().getTime()); + timeLabel.setText(time); + + day = dayFormat.format(Calendar.getInstance().getTime()); + dayLabel.setText(day); + + date = dateFormat.format(Calendar.getInstance().getTime()); + dateLabel.setText(date); + + try { + Thread.sleep(1000); + } catch (Exception e) { + e.getStackTrace(); + } + } + } + public static void main(String[] args) { + new Clock(); + } +} \ No newline at end of file diff --git a/Dino_Game_java/dino.java b/Dino_Game_java/dino.java new file mode 100644 index 00000000..91a3c666 --- /dev/null +++ b/Dino_Game_java/dino.java @@ -0,0 +1,354 @@ +package Dino_Game_java; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.Frame; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; +import javax.swing.AbstractAction; +import javax.swing.ActionMap; +import javax.swing.InputMap; +import javax.swing.JPanel; +import javax.swing.KeyStroke; +import javax.swing.Timer; +import java.awt.event.KeyListener; + +class Game extends Frame implements KeyListener{ + final int D_W = 1200; + final int D_H = 550; + static int unit = 10; + Color colorDinosaur = Color.GRAY; + Color colorGameOver1 = Color.black; + Color colorGameOver2 = Color.yellow; + Color colorCactus1 = Color.gray; + Color colorCactus2 = Color.gray; + int jump = 0; + int jumpY = 0; + int y = 0; + boolean onEnterPresses = false; + boolean down = false; + List<MyGraph> myGraphs = new ArrayList<>(); + int currentDinosaurX = 0; + int currentDinosaurY = 0; + boolean gameOver = false; + DrawPanel drawPanel = new DrawPanel(); + public static void main(String args[]) { + new Game(); + } + + public Game() { + super("Run Dino Run"); + setSize(1200, 550); // set the size of the window + setVisible(true); + addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + dispose(); + System.exit(0); + } + }); + + addKeyListener(this); + initCactusG(); + + ActionListener listener = new ActionListener() { + public void actionPerformed(ActionEvent e) { + if (!gameOver) { + if (jump >= D_W) { + jump = 0; + initCactusG(); + drawPanel.repaint(); + } else { + jump += 10; + drawPanel.repaint(); + } + } + } + }; + + Timer timer = new javax.swing.Timer(40, listener); + timer.start(); + ActionListener listenerD = new ActionListener() { + public void actionPerformed(ActionEvent e) { + if (!gameOver) { + if (onEnterPresses) { + if (down) { + jumpY -= 20; + } else { + jumpY += 20; + } + } + if (jumpY >= 280) { + down = true; + } + if (jumpY <= 0) { + onEnterPresses = false; + down = false; + jumpY = 0; + } + } + } + }; + Timer timerD = new javax.swing.Timer(80, listenerD); + timerD.start(); + add(drawPanel); + pack(); + // setDefaultCloseOperation(EXIT_ON_CLOSE); + setLocationRelativeTo(null); + setVisible(true); + } + + // create the cactus on random positions + private void initCactusG() { + Random rr = new Random(); + int nbr = 2;// rr.nextInt(2)+1 ;; + int x_ = 10; + int y_ = 100; + int h_ = 60; + int p_ = 10; + myGraphs = new ArrayList<Game.MyGraph>(); + for (int it = 0; it < nbr; it++) { + Random r = new Random(); + int step = r.nextInt(10) + 1; + MyGraph myGraph = new MyGraph(); + myGraph.x_ = x_ * 30 + step * 10 + 600; + myGraph.h_ = 10 + (6 * step) + 2; + myGraph.y_ = 300 - h_; + myGraph.p_ = 8 + step / 2; + myGraphs.add(myGraph); + } + } + + // draw the cactus + private void drawCactus(Graphics g) { + int x = 0; + int y = 0; + int h = 0; + int p = 0; + for (MyGraph myGraph : myGraphs) { + x = myGraph.x_; + h = myGraph.h_; + y = myGraph.y_; + p = myGraph.p_; + int maxH = 180; + int i = p * 2 + 40; + int j = p * 2 + 40; + int y1 = y + 40; + int y2 = y + 60; + if (x + j - jump < 0) { + jump = 0; + } + draw(g, x - i - jump, y1, h, p); + draw(g, x - jump, y, maxH, p * 2); + draw(g, x + j - jump, y2, h, p); + drow2(g, x - jump, h, p, i, j, y1, y2); + } + } + + // on game over draw the game over text + private void gameOver(Graphics g) { + Graphics2D graph = (Graphics2D) g; + graph.setPaint(colorGameOver1); + graph.setFont(new Font("MV Boli", 20, 50)); + graph.drawString("Game Over", 550, 150); + + //restart + Graphics2D graph1 = (Graphics2D) g; + graph1.setPaint(colorGameOver1); + graph1.setFont(new Font("MV Boli", 20, 50)); + graph1.drawString("Press Space key to restart!!", 350, 250); + } + + // restart the game + private void restartGame(Graphics g) { + new Game(); + } + + // draw the sun on the sky + private void drawSun(Graphics g) { + Graphics2D sun1 = (Graphics2D) g; + sun1.setPaint(new Color(255, 255, 0)); + sun1.fillArc(900, 70, 80, 80, 90, 180); + Graphics2D sun2 = (Graphics2D) g; + sun2.setPaint(new Color(255, 255, 153)); + sun2.fillArc(900, 70, 80, 80, 270, 180); + } + + // draw the cactus + private void drow2(Graphics g, int x, int h, int p, int i, int j, int y1, int y2) { + Graphics2D gsds = (Graphics2D) g; + gsds.setPaint(colorCactus1); + gsds.fillRect(x - i + p, y1 + h, i, p); + Graphics2D gsdds = (Graphics2D) g; + gsdds.setPaint(colorCactus2); + gsdds.fillRect(x - i + 2 * p, y1 + h - p, i - 2 * p, p); + Graphics2D gsd2 = (Graphics2D) g; + gsd2.setPaint(colorCactus2); + gsd2.fillRect(x + p * 2, y2 + h, j - p, p); + Graphics2D gsd3 = (Graphics2D) g; + gsd3.setPaint(colorCactus1); + gsd3.fillRect(x + p * 4, y2 + h - p, j - 4 * p, p); + } + + // draw the surface + private void drawSol(Graphics g, int x, int y, int maxH) { + Graphics2D sol = (Graphics2D) g; + sol.setPaint(Color.orange); + sol.fillRect(0, y + maxH - 20, 1700, 100); + } + + // draw the dinausor + private void drawDinausor(Graphics g, int y) { + int xDinausor = 180; + int step = 1; + g.setColor(colorDinosaur); + currentDinosaurX = xDinausor; + currentDinosaurY = y; + drawRaw(g, xDinausor, y, 2, 1); + drawRaw(g, xDinausor + 4 * unit, y, 2, 1); + drawRaw(g, xDinausor, y - step * unit, 1, 1); + drawRaw(g, xDinausor + 4 * unit, y - step * unit, 1, 1); + step++; + drawRaw(g, xDinausor, y - step * unit, 2, 1); + drawRaw(g, xDinausor + 3 * unit, y - step * unit, 2, 1); + step++; + drawRaw(g, xDinausor, y - step * unit, 5, 1); + step++; + drawRaw(g, xDinausor - unit, y - step * unit, 6, 1); + step++; + drawRaw(g, xDinausor - 2 * unit, y - step * unit, 8, 1); + step++; + drawRaw(g, xDinausor - 3 * unit, y - step * unit, 10, 1); + step++; + drawRaw(g, xDinausor - 4 * unit, y - step * unit, 11, 1); + drawRaw(g, xDinausor + (11 + 1 - 4) * unit, y - step * unit, 1, 1); + step++; + drawRaw(g, xDinausor - 4 * unit, y - step * unit, 3, 1); + drawRaw(g, xDinausor + (5 - 4) * unit, y - step * unit, 8, 1); + step++; + drawRaw(g, xDinausor - 4 * unit, y - step * unit, 2, 1); + drawRaw(g, xDinausor + (6 - 4) * unit, y - step * unit, 5, 1); + step++; + drawRaw(g, xDinausor - 4 * unit, y - step * unit, 1, 1); + drawRaw(g, xDinausor + (7 - 4) * unit, y - step * unit, 4, 1); + step++; + drawRaw(g, xDinausor - 4 * unit, y - step * unit, 1, 1); + drawRaw(g, xDinausor + (8 - 4) * unit, y - step * unit, 7, 1); + step++; + drawRaw(g, xDinausor + (8 - 4) * unit, y - step * unit, 4, 1); + step++; + drawRaw(g, xDinausor + (8 - 4) * unit, y - step * unit, 8, 1); + step++; + drawRaw(g, xDinausor + (8 - 4) * unit, y - step * unit, 2, 1); + drawRaw(g, xDinausor + (11 - 4) * unit, y - step * unit, 5, 1); + step++; + drawRaw(g, xDinausor + (8 - 4) * unit, y - step * unit, 8, 1); + step++; + drawRaw(g, xDinausor + (9 - 4) * unit, y - step * unit, 6, 1); + step++; + } + + private void drawRaw(Graphics g, int Dinausor, int y, int w, int h) { + Graphics2D sun16 = (Graphics2D) g; + sun16.fillRect(Dinausor, y, w * unit, h * unit); + } + + private void draw(Graphics g, int x, int y, int h, int p) { + if (x <= currentDinosaurX && x + p >= currentDinosaurX && y <= currentDinosaurY) { + gameOver(g); + gameOver = true; + return; + } + Graphics2D gcd = (Graphics2D) g; + // Green 0 -204- 0 + gcd.setPaint(colorCactus1); + gcd.fillRect(x, y, p, h); + Graphics2D gsd = (Graphics2D) g; + // Very dark green 0 -102- 0 + gsd.setPaint(colorCactus2); + gsd.fillRect(x + p, y, p, h); + Graphics2D gssd = (Graphics2D) g; + // Very dark green 0 -102- 0 + gssd.setPaint(colorCactus2); + gssd.fillArc(x, y - p, p * 2, p * 2, 1, 90); + Graphics2D gzssd = (Graphics2D) g; + gzssd.setPaint(colorCactus1); + gzssd.fillArc(x, y - p, p * 2, p * 2, 90, 90); + Graphics2D ghssd = (Graphics2D) g; + ghssd.setPaint(colorCactus1); + ghssd.fillArc(x, y + h - p, p * 2, p * 2, 180, 90); + Graphics2D ghzssd = (Graphics2D) g; + ghzssd.setPaint(colorCactus2); + ghzssd.fillArc(x, y + h - p, p * 2, p * 2, 270, 90); + } + + private class DrawPanel extends JPanel { + public DrawPanel() { + MoveAction action = new MoveAction("onEnter"); + String ACTION_KEY = "onEnter"; + KeyStroke W = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0); + InputMap inputMap = getInputMap(WHEN_IN_FOCUSED_WINDOW); + inputMap.put(W, ACTION_KEY); + ActionMap actionMap = getActionMap(); + actionMap.put(ACTION_KEY, action); + } + protected void paintComponent(Graphics g) { + super.paintComponent(g); + drawCactus(g); + drawSun(g); + drawSol(g, 100, 250, 180); + drawDinausor(g, 400 - jumpY); + if (gameOver) { + gameOver(g); + } + } + public Dimension getPreferredSize() { + return new Dimension(D_W, D_H); + } + } + + private class MyGraph { + int x_ = 10; + int y_ = 100; + int h_ = 60; + int p_ = 10; + } + + class MoveAction extends AbstractAction { + public MoveAction(String name) { + putValue(NAME, name); + } + public void actionPerformed(ActionEvent actionEvent) { + onEnterPresses = true; + drawPanel.repaint(); + } + } + + @Override + public void keyTyped(KeyEvent e) { + // TODO Auto-generated method stub + } + + @Override + public void keyPressed(KeyEvent e) { + if(e.getKeyCode() == KeyEvent.VK_SPACE) { + if(gameOver){ + gameOver = false; + restartGame(getGraphics()); + } + } + } + + @Override + public void keyReleased(KeyEvent e) { + // TODO Auto-generated method stub + } +} diff --git a/Dns_record/README.md b/Dns_record/README.md new file mode 100644 index 00000000..c8af26b6 --- /dev/null +++ b/Dns_record/README.md @@ -0,0 +1,21 @@ +## DNS Record + +This script takes the website name as input and returns its dns records. + +#Requirements to run this file: + +External library called dnspython has been used here and it can be installed easily by using the following command: + +pip install -r requirements.txt + +#How to use this script? + +1.Install the requirements. + +2. Type the following command + +python dns_record.py + +3.It will ask for a website: + +You can give any website name for example: google.com diff --git a/Dns_record/dns_record.py b/Dns_record/dns_record.py new file mode 100644 index 00000000..70da90b7 --- /dev/null +++ b/Dns_record/dns_record.py @@ -0,0 +1,29 @@ +#Simple program to fetch dns record of a given website + +import dns.resolver + +#Dictionary to store the dns record of a website +dns_record = {} + +#User defined website +website = input("Enter the name of the website: ") + +#Fetching the 'A' record of the website and storing it in the dictionary +a_record = dns.resolver.resolve(website, 'A') +for ipval in a_record: + dns_record['A_Record_IP'] = ipval.to_text() + +#List to store the mx records of a website +mx_record_list = [] + +#Fetching the mx records and storing them in the dictionary +mx_record = dns.resolver.resolve(website,'MX') +for server in mx_record: + mx_record_list.append(server) +for i, element in enumerate(mx_record_list): + dns_record['MX_Record', i+1] = element + +#Displaying the record on the screen +for key,value in dns_record.items(): + print(f"{key} = {value}") + diff --git a/Dns_record/requirements.txt b/Dns_record/requirements.txt new file mode 100644 index 00000000..689e42ff --- /dev/null +++ b/Dns_record/requirements.txt @@ -0,0 +1 @@ +dnspython==2.0.0 \ No newline at end of file diff --git a/DomesticFlight.class b/DomesticFlight.class new file mode 100644 index 00000000..5ddf29ae Binary files /dev/null and b/DomesticFlight.class differ diff --git a/DomesticFlight.java b/DomesticFlight.java new file mode 100644 index 00000000..edd00237 --- /dev/null +++ b/DomesticFlight.java @@ -0,0 +1,318 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; +import java.io.*; + +public class DomesticFlight extends JFrame +{ + JComboBox CBFrom, CBTo, CBClass, CBAdult, CBChildren, CBInfant; + JLabel LFrom, LTo, LBookingDate, LClass, LAdult, LChildren, LInfant, LBookingDetails, LPassengerDetails, LDate, LImg1, LImg2, LNotes; + JTextField TFBookingDate; + Icon img1, img2; + JButton BFindFlight; + JPanel PPanel1, PPanel2; + + LoginPage type1; + + public DomesticFlight(LoginPage type1) + { + Container c =getContentPane(); + c.setLayout(new BorderLayout()); + String[] sItem1={"Trivandrum"}; + String[] sItem2 ={ "Bangalore", "Chennai ", "Delhi", "Goa", "Hyderabad", "Kolkata", "Lucknow", "Mumbai", "Vishakapatnam" }; + String[] sItem3={"Economic","Business"}; + + this.type1 = type1; + PPanel1 = new JPanel(null); + PPanel1.setPreferredSize(new Dimension(500,200)); + + LBookingDetails = new JLabel("<html><b><font color=\"#C71585\">Booking Details</font></b></html>"); + LFrom = new JLabel("From :"); + LTo = new JLabel("To :"); + LBookingDate = new JLabel("Booking Date:"); + LClass = new JLabel("Class :"); + + CBFrom = new JComboBox(sItem1); + CBTo = new JComboBox(sItem2); + CBClass = new JComboBox(sItem3); + + TFBookingDate = new JTextField(10); + LDate = new JLabel("(DD/MM/YYYY)"); + LDate.setForeground(Color.red); + + img1=new ImageIcon("map1.jpg"); + LImg1 = new JLabel(img1); + + BFindFlight = new JButton("Find Flight"); + + LBookingDetails.setBounds(20,3,100,20); + + LFrom.setBounds(20,40,100,20); + CBFrom.setBounds(100,40,100,20); + + LTo.setBounds(20,100,100,20); + CBTo.setBounds(100,100,100,20); + + LBookingDate.setBounds(14,160,100,20); + TFBookingDate.setBounds(100,160,100,20); + LDate.setBounds(210,160,100,20); + + LClass.setBounds(20,220,100,20); + CBClass.setBounds(100,220,100,20); + + BFindFlight.setBounds(50,270,100,25); + + LImg1.setBounds(0,290,495,260); + + PPanel1.add(LBookingDetails); + PPanel1.add(LFrom); + PPanel1.add(CBFrom); + PPanel1.add(LTo); + PPanel1.add(CBTo); + PPanel1.add(LBookingDate); + PPanel1.add(TFBookingDate); + PPanel1.add(LDate); + PPanel1.add(LClass); + PPanel1.add(CBClass); + PPanel1.add(BFindFlight); + PPanel1.add(LImg1); + PPanel1.setBackground(Color.white); + + c.add(PPanel1,BorderLayout.WEST); + + PPanel2 = new JPanel(null); + PPanel2.setPreferredSize(new Dimension(320,160)); + + LPassengerDetails=new JLabel("<html><b><font color=\"#C71585\">PassengerDetails</font></b></html>"); + + LAdult = new JLabel("Adults(12+)"); + + LChildren = new JLabel("Children(2-11)"); + LInfant = new JLabel("Infants(under 2)"); + + String[] item4={"1","2","3","4","5","6"}; + CBAdult = new JComboBox(item4); + + String[] item5={"0","1","2","3","4"}; + CBChildren = new JComboBox(item5); + + String[] item6={"0","1","2","3"}; + CBInfant = new JComboBox(item6); + + img2 = new ImageIcon("note_bg.gif"); + LImg2 = new JLabel(img2); + LNotes = new JLabel("<html><body><p>NOTE: Bookings with International Credit Cards <p> have temporarily been suspended.This Service<p> will resume shortly and we will have a notice<p> posted on our website.We regret any <p>inconvenience caused to our passengers.</body></html>"); + + LPassengerDetails.setBounds(40,3,100,20); + + LAdult.setBounds(40,40,100,20); + CBAdult.setBounds(140,40,100,20); + + LChildren.setBounds(40,105,100,20); + CBChildren.setBounds(140,105,100,20); + + LInfant.setBounds(40,170,100,20); + CBInfant.setBounds(140,170,100,20); + + LImg2.setBounds(16,220,320,200); + LNotes.setBounds(55,240,380,180); + + PPanel2.add(LPassengerDetails); + PPanel2.add(LAdult); + PPanel2.add(LChildren); + PPanel2.add(LInfant); + PPanel2.add(CBAdult); + PPanel2.add(CBChildren); + PPanel2.add(CBInfant); + + PPanel2.add(LNotes); + PPanel2.add(LImg2); + + PPanel2.setBackground(Color.white); + + c.add(PPanel2,BorderLayout.EAST); + + setSize(795,580); + setVisible(true); + + BFindFlight.addActionListener(new button3(this, type1)); + } + public static void main(String args[]) + { + LoginPage type1=null; + new DomesticFlight(type1); + } +} + +class button3 implements ActionListener +{ + DomesticFlight type; + LoginPage type1; + button3(DomesticFlight type, LoginPage type1) + { + this.type = type; + this.type1 = type1; + } + public void actionPerformed(ActionEvent e) + { + String sFrom = (String)type.CBFrom.getSelectedItem(); + String sTo = (String)type.CBTo.getSelectedItem(); + String sClass = (String)type.CBClass.getSelectedItem(); + String sBookingDate = type.TFBookingDate.getText(); + Integer iPrice=0; + String sTime=""; + + + Integer iAdult = Integer.parseInt((String)type.CBAdult.getSelectedItem()); + Integer iChildren = Integer.parseInt((String)type.CBChildren.getSelectedItem()); + Integer iInfant = Integer.parseInt((String)type.CBInfant.getSelectedItem()); + + int i = 0; + + if(sClass.equals("Economic")) + { + try{ + while(i<20) + { + if(type1.row1[i][1].equals(sTo)) + { + iPrice = Integer.parseInt((String)type1.row1[i][2]); + sTime = (String)type1.row1[i][3]; + break; + } + i++; + } + }catch(Exception e1) + { + JOptionPane.showMessageDialog(null, "You have no rights to access"); + System.exit(0); + } + } + else + { + try + { + while(i<20) + { + if(type1.row1[i][1].equals(sTo)) + { + iPrice = Integer.parseInt((String)type1.row3[i][2]); + sTime = (String)type1.row3[i][3]; + break; + } + i++; + } + }catch(Exception e1) + { + JOptionPane.showMessageDialog(null, "You have no rights to access it"); + System.exit(0); + } + } + type.setTitle(iPrice + " " + sTime); + + iPrice = (iPrice*iAdult)+(iPrice*(iChildren/2)); + + int iCount=0; + int iSeatCount=0; + + String[] sTempFrom=new String[1250]; + String[] sTempTo=new String[1250]; + String[] sTempClass=new String[1250]; + String[] sTempBookingDate=new String[1250]; + String[] sTempTime=new String[1250]; + Integer[] iTempAdult=new Integer[1250]; + Integer[] iTempChildren=new Integer[1250]; + Integer[] iTempInfant=new Integer[1250]; + Integer[] iTempPrice=new Integer[1250]; + + try + { +//read from data + Save2 save1; + ObjectInputStream OIS1 = new ObjectInputStream(new FileInputStream("save2")); + do + { + save1 = (Save2)OIS1.readObject(); + sTempFrom[iCount] = save1.sFrom; + sTempTo[iCount] = save1.sTo; + sTempClass[iCount] = save1.sClass; + sTempBookingDate[iCount] = save1.sBookingDate; + sTempTime[iCount] = save1.sTime; + iTempAdult[iCount] = save1.iAdult; + iTempChildren[iCount] = save1.iChildren; + iTempInfant[iCount] = save1.iInfant; + iTempPrice[iCount] = save1.iPrice; + + iCount++; + if(save1.sBookingDate.equals(sBookingDate)) + if(save1.sTo.equals(sTo)) + iSeatCount=iSeatCount + save1.iAdult + save1.iChildren + save1.iInfant; + }while(save1!=null); + OIS1.close(); + + } + catch(Exception e1) + { + } + + iSeatCount = iSeatCount + iAdult + iChildren + iInfant; + + if(iSeatCount > 60) + { + JOptionPane.showMessageDialog(null,"Seats are full. Sorry!"); + } + else + { + int iChoice = JOptionPane.showConfirmDialog(null,"Seats available. Do you want to Book now?"); + if(iChoice == JOptionPane.YES_OPTION) + { + new PrintTicket1(sFrom, sTo, sClass, iAdult, iChildren, iInfant, sBookingDate, iPrice, sTime); + try + { +//write into data + Save2 save2=new Save2(sFrom, sTo, sClass, iAdult, iChildren, iInfant, sBookingDate, iPrice, sTime); + ObjectOutputStream OOS1 = new ObjectOutputStream(new FileOutputStream("save2")); + for(i=0;i<iCount;i++) + { + Save2 temp1=new Save2(sTempFrom[i], sTempTo[i], sTempClass[i], iTempAdult[i], iTempChildren[i], iTempInfant[i], sTempBookingDate[i], iTempPrice[i], sTempTime[i]); + OOS1.writeObject(temp1); +System.out.println(temp1); + } + OOS1.writeObject(save2); + OOS1.close(); + }catch(Exception e1) + { + System.out.println(e1); + } + } + else + { + } + } + } +} + + +class Save2 implements Serializable +{ + String sFrom, sTo, sClass, sBookingDate, sTime; + Integer iPrice, iAdult, iChildren, iInfant; +// int iCount; + public Save2(String sFrom, String sTo, String sClass, Integer iAdult, Integer iChildren, Integer iInfant, String sBookingDate, Integer iPrice, String sTime) + { + this.sFrom=sFrom; + this.sTo=sTo; + this.sClass=sClass; + this.iAdult=iAdult; + this.iChildren=iChildren; + this.iInfant=iInfant; + this.sBookingDate=sBookingDate; + this.iPrice=iPrice; + this.sTime=sTime; +// this.iCount = iCount; + } + public String toString() + { + return sFrom+" "+sTo+" "+sClass+" "+iAdult+" "+iChildren+" "+iInfant+" "+sBookingDate+" "+iPrice+" "+sTime; + } +} \ No newline at end of file diff --git a/DoubleArrayCompair.java b/DoubleArrayCompair.java new file mode 100644 index 00000000..6cc6ebbd --- /dev/null +++ b/DoubleArrayCompair.java @@ -0,0 +1,36 @@ +// Java program to compare two double arrays + +import java.util.*; +import java.lang.*; +import java.io.*; + +class GFG { + + public static void main(String[] args) throws java.lang.Exception + { + // Two double arrays array1 and array2 + double[] array1 = { 1.5, 2.5, 3.5, 4.5 }; + double[] array2 = { 1.5, 2.5, 3.5 }; + + // when the length of two arrays are not + // same, then both the arrays cannot be equal + // so no need of comparing each element + if (array1.length != array2.length) + + System.out.println("Arrays are not Equal"); + + else { + for (int i = 0; i < array1.length; i++) + { + // comparing each and every element + if (array1[i] != array2[i]) + { + System.out.println("Arrays are not Equal"); + System.exit(0); + } + } + + System.out.println("Arrays are Equal"); + } + } +} diff --git a/Duplicate files remover/README.md b/Duplicate files remover/README.md new file mode 100644 index 00000000..acbbca5e --- /dev/null +++ b/Duplicate files remover/README.md @@ -0,0 +1,20 @@ +# Duplicate Files Remover +This script removes duplicate files in the directory where the script runs. + +### Prerequisites +* No external libraries are used +* os +* hashlib + +### How to run the script +Execute `python3 duplicatefileremover.py` + +### Screenshot/GIF showing the sample use of the script +<!--Remove the below lines and add yours --> + + +## Working +The script first lists all the files in the directory. It takes MD5 hash of each file, when hash of 2 files become same it deletes the file. + +## Author Name +[Anandha Krishnan Aji](https://github.com/anandhakrishnanaji) diff --git a/Duplicate files remover/Screenshot.png b/Duplicate files remover/Screenshot.png new file mode 100644 index 00000000..c69aefaa Binary files /dev/null and b/Duplicate files remover/Screenshot.png differ diff --git a/Duplicate files remover/duplicatefileremover.py b/Duplicate files remover/duplicatefileremover.py new file mode 100644 index 00000000..7dd9dcd1 --- /dev/null +++ b/Duplicate files remover/duplicatefileremover.py @@ -0,0 +1,40 @@ +import hashlib +import os + +# Returns the hash string of the given file name + + +def hashFile(filename): + # For large files, if we read it all together it can lead to memory overflow, So we take a blocksize to read at a time + BLOCKSIZE = 65536 + hasher = hashlib.md5() + with open(filename, 'rb') as file: + # Reads the particular blocksize from file + buf = file.read(BLOCKSIZE) + while(len(buf) > 0): + hasher.update(buf) + buf = file.read(BLOCKSIZE) + return hasher.hexdigest() + + +if __name__ == "__main__": + # Dictionary to store the hash and filename + hashMap = {} + + # List to store deleted files + deletedFiles = [] + filelist = [f for f in os.listdir() if os.path.isfile(f)] + for f in filelist: + key = hashFile(f) + # If key already exists, it deletes the file + if key in hashMap.keys(): + deletedFiles.append(f) + os.remove(f) + else: + hashMap[key] = f + if len(deletedFiles) != 0: + print('Deleted Files') + for i in deletedFiles: + print(i) + else: + print('No duplicate files found') diff --git a/E-Health Care Management/E-Health Care Management/Ehospital.class b/E-Health Care Management/E-Health Care Management/Ehospital.class new file mode 100644 index 00000000..cec84542 Binary files /dev/null and b/E-Health Care Management/E-Health Care Management/Ehospital.class differ diff --git a/E-Health Care Management/E-Health Care Management/Ehospital.java b/E-Health Care Management/E-Health Care Management/Ehospital.java new file mode 100644 index 00000000..e4c4d7d5 --- /dev/null +++ b/E-Health Care Management/E-Health Care Management/Ehospital.java @@ -0,0 +1,379 @@ +import java.util.*; +import java.lang.String; +import java.io.*; +import java.time.format.DateTimeFormatter; +import java.time.LocalDateTime; + +class Info +{ +Info() +{ +System.out.print("\t\t\t\t\t ___________________________________________________________________________________________\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| WELCOME TO E-HEALTH CARE MANAGEMENT SYSTEM |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| -Brought To You by |\n"); +System.out.print("\t\t\t\t\t| Md Fahad,Omer Mohiuddin and Yaseen Hussain |\n"); +System.out.print("\t\t\t\t\t|___________________________________________________________________________________________|\n"); +} +//Declaring variales to be used +Scanner scan=new Scanner(System.in); +String name; +String address; +long contact; +int age; +String bg; +String sex; +String disease; +long id; +String dadm; +//To take a pause +private void pressAnyKeyToContinue() + { + System.out.println("Press Enter key to continue..."); + try + { + System.in.read(); + } + catch(Exception e) + { + System.out.println("Press 'Enter' key to continue!"); + } + } + //Taking multiple words +String readString() +{ + Scanner scanner = new Scanner(System.in); + return scanner.nextLine(); +} +//Log in Module +void login() +{ + int a; + String pass; + System.out.print("\t\t\t\t\t _______________________________________________________________________________________ \n"); + System.out.print("\n\t\t\t\t\t\t\t\tE-HEALTH CARE MANAGEMENT SYSTEM \n"); + System.out.print("\t\t\t\t\t _______________________________________________________________________________________ \n"); + System.out.println("\n\n\t\t\t\t\t\t\t\t------------------------------"); + System.out.print("\n\t\t\t\t\t\t\t\t\t LOGIN \n"); + System.out.print("\t\t\t\t\t\t\t\t------------------------------\n\n"); + System.out.print("\t\t\t\t\t\t\t\tEnter the Password: "); + pass=scan.next(); + if(pass.equals("deccan")) + { + System.out.print("\n\n\t\t\t\t\t\t\t\tAccess Granted!\n"); + pressAnyKeyToContinue(); + } + else + { + System.out.print( "\n\n\t\t\t\t\t\t\t\tAccess Aborted...\n\t\t\t\t\t\t\t\t1.Try Again\n\n\t\t\t\t\t\t\t\t2.Exit"); + System.out.print("\n\n\t\t\t\t\t\t\tEnter the option: "); + try{ + a=scan.nextInt(); + if(a==1) + login(); + else if(a==2) + System.exit(0); + else + { + System.out.print("\n\n\t\t\t\t\t\tInvalid Choice\n"); + } + } + catch(InputMismatchException e){ + System.out.println("\n\n\t\t\t\t\t\t\t*Enter the correct option!*\n\n"); + login(); + } + } +} +//To get Date + public void getCurrentTimeUsingDate() + { + DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss"); + LocalDateTime now = LocalDateTime.now(); + dadm=dtf.format(now); + + } + +void menu() +{ +char k; +//giving option to the user for their choice +System.out.print("\t\t\t\t\t _______________________________________________________________________________________ \n"); +System.out.print("\n\n\t\t\t\t\t\t\t\t E-HEALTH CARE MANAGEMENT SYSTEM \n\n"); +System.out.print("\t\t\t\t\t _______________________________________________________________________________________ \n"); +System.out.print("\n\n\t\t\t\t\t\tPlease, Choose from the following Options: \n\n"); +System.out.print("\t\t\t\t\t\t _________________________________________________________________ \n"); +System.out.print("\t\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t\t| 1 >> Add New Patient Record |\n"); +System.out.print("\t\t\t\t\t\t| 2 >> Add Diagnosis Information |\n"); +System.out.print("\t\t\t\t\t\t| 3 >> History of the Patient |\n"); +System.out.print("\t\t\t\t\t\t| 4 >> Bill of the patient |\n"); +System.out.print("\t\t\t\t\t\t| 5 >> Help |\n"); +System.out.print("\t\t\t\t\t\t| 6 >> Exit |\n"); +System.out.print("\t\t\t\t\t\t|_________________________________________________________________|\n\n"); +System.out.print("\t\t\t\t\t\tEnter your choice: "); +k=scan.next().charAt(0); +//if inputed choice is other than given choice +switch(k) +{ +case '1': patient(); +break; +case '2': diagnos(); +break; +case '3': history(); +break; +case '4': bill(); +break; +case '5': info(); +break; +case '6': exit(); +break; +default: System.out.print("\n\n\t\t\t\t\t\tInvalid Choice\n"); + System.out.print("\t\t\t\t\t\tTry again...........\n\n"); + menu(); +} +menu(); +} +void patient() +{ +System.out.print("Enter the patient's file name: "); + +String fileName =scan.next(); +getCurrentTimeUsingDate(); + + try { + // Assume default encoding. + FileWriter fileWriter = new FileWriter(fileName+".txt"); + + // Always wrap FileWriter in BufferedWriter. + BufferedWriter bufferedWriter = new BufferedWriter(fileWriter); + + // Note that write() does not automatically + // append a newline character. + System.out.print("\n********************************************************************\n"); + bufferedWriter.write("Date of admission: "+dadm); + bufferedWriter.newLine(); + System.out.print("\nName : ");name=readString();bufferedWriter.write("Name : "+name); + bufferedWriter.newLine(); + System.out.print("\nAddress : ");address=readString();bufferedWriter.write("Address : "+address); + bufferedWriter.newLine(); + System.out.print("\nContact Number : ");contact=scan.nextLong();bufferedWriter.write("Contact Number : "+contact); + bufferedWriter.newLine(); + System.out.print("\nAge : ");age=scan.nextInt();bufferedWriter.write("Age : "+age); + bufferedWriter.newLine(); + System.out.print("\nSex : ");sex=scan.next();bufferedWriter.write("Sex : "+sex); + bufferedWriter.newLine(); + System.out.print("\nBlood Group : ");bg=scan.next();bufferedWriter.write("Blood Group : "+bg); + bufferedWriter.newLine(); + System.out.print("\nAny Major disease suffered earlier : ");disease=readString();bufferedWriter.write("Any Major disease suffered earlier : "+disease); + bufferedWriter.newLine(); + System.out.print("\nPatient ID : ");id=scan.nextLong();bufferedWriter.write("Patient ID : "+id); + bufferedWriter.newLine(); + System.out.print("\n********************************************************************\n"); + bufferedWriter.write("\n********************************************************************\n\n"); + bufferedWriter.newLine();System.out.print("\nInformation Saved Successfully\n"); + + // Always close files. + bufferedWriter.close(); + } + catch(IOException ex) + { + System.out.println("Error writing to file '"+ fileName +"'"); + } + pressAnyKeyToContinue(); +} +void diagnos() +{ + String symptom; + String diagnosis; + String medicine; + String addmission; + String ward; + String doctor; + getCurrentTimeUsingDate(); + System.out.print("\n\nEnter the patient's file name to be opened : "); + String fileName=scan.next(); + // This will reference one line at a time + String line = null; + try { + // FileReader reads text files in the default encoding. + FileReader fileReader = new FileReader(fileName+".txt"); + + // Always wrap FileReader in BufferedReader. + BufferedReader bufferedReader = new BufferedReader(fileReader); + System.out.println("\n\n\n\n\t\t\t\t........................................ Information about '"+fileName+"' ........................................\n\n\n\n"); + while((line = bufferedReader.readLine()) != null) + { + System.out.println(line); + } + + // Always close files. + bufferedReader.close(); + //Appending data in file + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(fileName+".txt", true))); + System.out.print("Adding more information in patient's file................on : "+dadm); + out.println("Description of the day:"+dadm); + System.out.print("\nDoctor appointed:");doctor=readString();out.println("Doctor appointed: "+doctor); + System.out.print("\nSymptoms : ");symptom=readString();out.println("Symptoms : "+symptom); + System.out.print("\nDiagnosis : "); diagnosis=readString();out.println("Diagnosis : "+diagnosis); + System.out.print("\nMedicines : ");medicine=readString(); out.println("Medicines : "+medicine); + System.out.print("\nAddmission Required? : "); + addmission=readString();out.println("Addmission Required? : "+addmission); + if(addmission.equals("Yes")||addmission.equals("Y")) + { + System.out.print("\nType of ward : ");ward=readString(); out.println("Type of ward : "+ward); + out.println("\n*************************************************************************\n"); + System.out.print(ward+" ward is alloted Successfully\n"); + } + else + {out.println("*************************************************************************\n");} + out.close(); + pressAnyKeyToContinue(); + } + catch(FileNotFoundException ex) { + System.out.println( + "Unable to open file '" + fileName + "'"); + } + catch (IOException e) { + System.out.println("Error writing or Reading to file '"+ fileName +"'"); + } +} + +void history() + { + System.out.print("\n\nEnter the patient's file name to be opened : "); + String fileName=scan.next(); + // This will reference one line at a time + String line = null; + try { + // FileReader reads text files in the default encoding. + FileReader fileReader = new FileReader(fileName+".txt"); + + // Always wrap FileReader in BufferedReader. + BufferedReader bufferedReader = new BufferedReader(fileReader); + System.out.print("\n\n\n\n\t\t\t\t........................................ Full Medical History of '"+fileName+"' ........................................\n\n\n\n"); + while((line = bufferedReader.readLine()) != null) + { + System.out.println(line); + } + pressAnyKeyToContinue(); + // Always close files. + bufferedReader.close(); + } + catch(FileNotFoundException ex) { + System.out.println( + "Unable to open file '" + fileName + "'"); + } + catch(IOException ex) { + System.out.println( + "Error reading file '" + fileName + "'"); + } + } +void bill() +{ + getCurrentTimeUsingDate(); + int days; + double wcharge; + double doc; + double ser; +System.out.println("\t\t\t\t\t\t _________________________________________________________________ "); + System.out.print("\n\n\t\t\t\t\t\t\t\t E-HEALTH CARE MANAGEMENT SYSTEM \n\n"); +System.out.println("\t\t\t\t\t\t _________________________________________________________________ "); + System.out.print("Enter the patient's file name to get the Bill: "); + String fileName=scan.next(); + // This will reference one line at a time + String line = null; + try { + // FileReader reads text files in the default encoding. + FileReader fileReader = new FileReader(fileName+".txt"); + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(fileName+".txt", true))); + + // Always wrap FileReader in BufferedReader. + BufferedReader bufferedReader = new BufferedReader(fileReader); + System.out.print("Date: "+dadm); + System.out.println("\n\n\n\n\t\t\t\tDetails of the patient:\n\n\n\n"); + while((line = bufferedReader.readLine()) != null) + { + System.out.println(line); + } + System.out.print("\t\t\t\t\t\t _________________________________________________________________ "); + System.out.println("\n\t\t\t\t\t\t\t\t\tBill of the patient:"); + System.out.print("\t\t\t\t\t\t _________________________________________________________________ \n\n"); + System.out.print("\t\t\t\t\t\tNo.of days patient stayed:");days=scan.nextInt(); + System.out.print("\t\t\t\t\t\tWard charges/day:");wcharge=scan.nextDouble(); + System.out.print("\n\t\t\t\t\t\tTotal ward charges:"+(wcharge*days)); + System.out.print("\n\t\t\t\t\t\tDoctor's fee:");doc=scan.nextDouble(); + System.out.print("\n\t\t\t\t\t\tService charges:");ser=scan.nextDouble(); + System.out.print("\n\t\t\t\t\t\tTOTAL AMOUNT:"+((wcharge*days)+doc+ser)); + out.println("Total Bill:"+((wcharge*days)+doc+ser)); + System.out.print("\n\t\t\t\t\t\t _________________________________________________________________ \n"); + // Always close files. + out.close(); + bufferedReader.close(); + } + catch(FileNotFoundException ex) { + System.out.println( + "Unable to open file '" + fileName + "'"); + } + catch(IOException ex) { + System.out.println( + "Error reading file '" + fileName + "'"); + } + pressAnyKeyToContinue(); +} +void exit() +{ +System.out.print("\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\n"); +System.out.print("\t\t\t\t\t _______________________________________________________________________________________ \n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| THANK YOU FOR USING |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| E-HEALTH CARE MANAGEMENT SYSTEM |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| -Brought To You by Fahad,Omer and Yaseen |\n"); +System.out.print("\t\t\t\t\t|_______________________________________________________________________________________|\n"); +System.out.print("\t\t\t\t\t\n\n\n\n\t\t\t\t\t"); +System.exit(0); +} +void info() +{ + System.out.println("\n\nE-Health care management system is command-driven application that helps to manage the record of the patient's as well as generate their hospital bills."); + System.out.print("\t\t\t\t__________________________________________________________________________________________________________________________________\n"); + System.out.print("\t\t\t\t\tOptions | Description\n"); + System.out.print("\t\t\t\t__________________________________________________________________________________________________________________________________\n"); + System.out.println("\t\t\t\t 1 >> Add New Patient Record | A new patient file can be created by using this module."); + System.out.println("\t\t\t\t 2 >> Add Diagnosis Information | Adding day-to-day evaluation of the patient or the diagnosis report in the existing file."); + System.out.println("\t\t\t\t 3 >> History of the Patient | Check the previous or existing details of particular patient by using their file name."); + System.out.println("\t\t\t\t 4 >> Bill of the patient | Generates the bill of the patient with displaying the details."); + System.out.println("\t\t\t\t 5 >> Help | Provide the help documentation."); + System.out.println("\t\t\t\t 6 >> Exit | Exits the application."); + pressAnyKeyToContinue(); +} +} +public class Ehospital +{ +public static void main (String args[]) +{ + Info i=new Info(); + i.login(); + i.menu(); +} +} diff --git a/E-Health Care Management/E-Health Care Management/Info.class b/E-Health Care Management/E-Health Care Management/Info.class new file mode 100644 index 00000000..9eb706cf Binary files /dev/null and b/E-Health Care Management/E-Health Care Management/Info.class differ diff --git a/E-Health Care Management/Ehospital.class b/E-Health Care Management/Ehospital.class new file mode 100644 index 00000000..cec84542 Binary files /dev/null and b/E-Health Care Management/Ehospital.class differ diff --git a/E-Health Care Management/Ehospital.java b/E-Health Care Management/Ehospital.java new file mode 100644 index 00000000..e4c4d7d5 --- /dev/null +++ b/E-Health Care Management/Ehospital.java @@ -0,0 +1,379 @@ +import java.util.*; +import java.lang.String; +import java.io.*; +import java.time.format.DateTimeFormatter; +import java.time.LocalDateTime; + +class Info +{ +Info() +{ +System.out.print("\t\t\t\t\t ___________________________________________________________________________________________\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| WELCOME TO E-HEALTH CARE MANAGEMENT SYSTEM |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| -Brought To You by |\n"); +System.out.print("\t\t\t\t\t| Md Fahad,Omer Mohiuddin and Yaseen Hussain |\n"); +System.out.print("\t\t\t\t\t|___________________________________________________________________________________________|\n"); +} +//Declaring variales to be used +Scanner scan=new Scanner(System.in); +String name; +String address; +long contact; +int age; +String bg; +String sex; +String disease; +long id; +String dadm; +//To take a pause +private void pressAnyKeyToContinue() + { + System.out.println("Press Enter key to continue..."); + try + { + System.in.read(); + } + catch(Exception e) + { + System.out.println("Press 'Enter' key to continue!"); + } + } + //Taking multiple words +String readString() +{ + Scanner scanner = new Scanner(System.in); + return scanner.nextLine(); +} +//Log in Module +void login() +{ + int a; + String pass; + System.out.print("\t\t\t\t\t _______________________________________________________________________________________ \n"); + System.out.print("\n\t\t\t\t\t\t\t\tE-HEALTH CARE MANAGEMENT SYSTEM \n"); + System.out.print("\t\t\t\t\t _______________________________________________________________________________________ \n"); + System.out.println("\n\n\t\t\t\t\t\t\t\t------------------------------"); + System.out.print("\n\t\t\t\t\t\t\t\t\t LOGIN \n"); + System.out.print("\t\t\t\t\t\t\t\t------------------------------\n\n"); + System.out.print("\t\t\t\t\t\t\t\tEnter the Password: "); + pass=scan.next(); + if(pass.equals("deccan")) + { + System.out.print("\n\n\t\t\t\t\t\t\t\tAccess Granted!\n"); + pressAnyKeyToContinue(); + } + else + { + System.out.print( "\n\n\t\t\t\t\t\t\t\tAccess Aborted...\n\t\t\t\t\t\t\t\t1.Try Again\n\n\t\t\t\t\t\t\t\t2.Exit"); + System.out.print("\n\n\t\t\t\t\t\t\tEnter the option: "); + try{ + a=scan.nextInt(); + if(a==1) + login(); + else if(a==2) + System.exit(0); + else + { + System.out.print("\n\n\t\t\t\t\t\tInvalid Choice\n"); + } + } + catch(InputMismatchException e){ + System.out.println("\n\n\t\t\t\t\t\t\t*Enter the correct option!*\n\n"); + login(); + } + } +} +//To get Date + public void getCurrentTimeUsingDate() + { + DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm:ss"); + LocalDateTime now = LocalDateTime.now(); + dadm=dtf.format(now); + + } + +void menu() +{ +char k; +//giving option to the user for their choice +System.out.print("\t\t\t\t\t _______________________________________________________________________________________ \n"); +System.out.print("\n\n\t\t\t\t\t\t\t\t E-HEALTH CARE MANAGEMENT SYSTEM \n\n"); +System.out.print("\t\t\t\t\t _______________________________________________________________________________________ \n"); +System.out.print("\n\n\t\t\t\t\t\tPlease, Choose from the following Options: \n\n"); +System.out.print("\t\t\t\t\t\t _________________________________________________________________ \n"); +System.out.print("\t\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t\t| 1 >> Add New Patient Record |\n"); +System.out.print("\t\t\t\t\t\t| 2 >> Add Diagnosis Information |\n"); +System.out.print("\t\t\t\t\t\t| 3 >> History of the Patient |\n"); +System.out.print("\t\t\t\t\t\t| 4 >> Bill of the patient |\n"); +System.out.print("\t\t\t\t\t\t| 5 >> Help |\n"); +System.out.print("\t\t\t\t\t\t| 6 >> Exit |\n"); +System.out.print("\t\t\t\t\t\t|_________________________________________________________________|\n\n"); +System.out.print("\t\t\t\t\t\tEnter your choice: "); +k=scan.next().charAt(0); +//if inputed choice is other than given choice +switch(k) +{ +case '1': patient(); +break; +case '2': diagnos(); +break; +case '3': history(); +break; +case '4': bill(); +break; +case '5': info(); +break; +case '6': exit(); +break; +default: System.out.print("\n\n\t\t\t\t\t\tInvalid Choice\n"); + System.out.print("\t\t\t\t\t\tTry again...........\n\n"); + menu(); +} +menu(); +} +void patient() +{ +System.out.print("Enter the patient's file name: "); + +String fileName =scan.next(); +getCurrentTimeUsingDate(); + + try { + // Assume default encoding. + FileWriter fileWriter = new FileWriter(fileName+".txt"); + + // Always wrap FileWriter in BufferedWriter. + BufferedWriter bufferedWriter = new BufferedWriter(fileWriter); + + // Note that write() does not automatically + // append a newline character. + System.out.print("\n********************************************************************\n"); + bufferedWriter.write("Date of admission: "+dadm); + bufferedWriter.newLine(); + System.out.print("\nName : ");name=readString();bufferedWriter.write("Name : "+name); + bufferedWriter.newLine(); + System.out.print("\nAddress : ");address=readString();bufferedWriter.write("Address : "+address); + bufferedWriter.newLine(); + System.out.print("\nContact Number : ");contact=scan.nextLong();bufferedWriter.write("Contact Number : "+contact); + bufferedWriter.newLine(); + System.out.print("\nAge : ");age=scan.nextInt();bufferedWriter.write("Age : "+age); + bufferedWriter.newLine(); + System.out.print("\nSex : ");sex=scan.next();bufferedWriter.write("Sex : "+sex); + bufferedWriter.newLine(); + System.out.print("\nBlood Group : ");bg=scan.next();bufferedWriter.write("Blood Group : "+bg); + bufferedWriter.newLine(); + System.out.print("\nAny Major disease suffered earlier : ");disease=readString();bufferedWriter.write("Any Major disease suffered earlier : "+disease); + bufferedWriter.newLine(); + System.out.print("\nPatient ID : ");id=scan.nextLong();bufferedWriter.write("Patient ID : "+id); + bufferedWriter.newLine(); + System.out.print("\n********************************************************************\n"); + bufferedWriter.write("\n********************************************************************\n\n"); + bufferedWriter.newLine();System.out.print("\nInformation Saved Successfully\n"); + + // Always close files. + bufferedWriter.close(); + } + catch(IOException ex) + { + System.out.println("Error writing to file '"+ fileName +"'"); + } + pressAnyKeyToContinue(); +} +void diagnos() +{ + String symptom; + String diagnosis; + String medicine; + String addmission; + String ward; + String doctor; + getCurrentTimeUsingDate(); + System.out.print("\n\nEnter the patient's file name to be opened : "); + String fileName=scan.next(); + // This will reference one line at a time + String line = null; + try { + // FileReader reads text files in the default encoding. + FileReader fileReader = new FileReader(fileName+".txt"); + + // Always wrap FileReader in BufferedReader. + BufferedReader bufferedReader = new BufferedReader(fileReader); + System.out.println("\n\n\n\n\t\t\t\t........................................ Information about '"+fileName+"' ........................................\n\n\n\n"); + while((line = bufferedReader.readLine()) != null) + { + System.out.println(line); + } + + // Always close files. + bufferedReader.close(); + //Appending data in file + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(fileName+".txt", true))); + System.out.print("Adding more information in patient's file................on : "+dadm); + out.println("Description of the day:"+dadm); + System.out.print("\nDoctor appointed:");doctor=readString();out.println("Doctor appointed: "+doctor); + System.out.print("\nSymptoms : ");symptom=readString();out.println("Symptoms : "+symptom); + System.out.print("\nDiagnosis : "); diagnosis=readString();out.println("Diagnosis : "+diagnosis); + System.out.print("\nMedicines : ");medicine=readString(); out.println("Medicines : "+medicine); + System.out.print("\nAddmission Required? : "); + addmission=readString();out.println("Addmission Required? : "+addmission); + if(addmission.equals("Yes")||addmission.equals("Y")) + { + System.out.print("\nType of ward : ");ward=readString(); out.println("Type of ward : "+ward); + out.println("\n*************************************************************************\n"); + System.out.print(ward+" ward is alloted Successfully\n"); + } + else + {out.println("*************************************************************************\n");} + out.close(); + pressAnyKeyToContinue(); + } + catch(FileNotFoundException ex) { + System.out.println( + "Unable to open file '" + fileName + "'"); + } + catch (IOException e) { + System.out.println("Error writing or Reading to file '"+ fileName +"'"); + } +} + +void history() + { + System.out.print("\n\nEnter the patient's file name to be opened : "); + String fileName=scan.next(); + // This will reference one line at a time + String line = null; + try { + // FileReader reads text files in the default encoding. + FileReader fileReader = new FileReader(fileName+".txt"); + + // Always wrap FileReader in BufferedReader. + BufferedReader bufferedReader = new BufferedReader(fileReader); + System.out.print("\n\n\n\n\t\t\t\t........................................ Full Medical History of '"+fileName+"' ........................................\n\n\n\n"); + while((line = bufferedReader.readLine()) != null) + { + System.out.println(line); + } + pressAnyKeyToContinue(); + // Always close files. + bufferedReader.close(); + } + catch(FileNotFoundException ex) { + System.out.println( + "Unable to open file '" + fileName + "'"); + } + catch(IOException ex) { + System.out.println( + "Error reading file '" + fileName + "'"); + } + } +void bill() +{ + getCurrentTimeUsingDate(); + int days; + double wcharge; + double doc; + double ser; +System.out.println("\t\t\t\t\t\t _________________________________________________________________ "); + System.out.print("\n\n\t\t\t\t\t\t\t\t E-HEALTH CARE MANAGEMENT SYSTEM \n\n"); +System.out.println("\t\t\t\t\t\t _________________________________________________________________ "); + System.out.print("Enter the patient's file name to get the Bill: "); + String fileName=scan.next(); + // This will reference one line at a time + String line = null; + try { + // FileReader reads text files in the default encoding. + FileReader fileReader = new FileReader(fileName+".txt"); + PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(fileName+".txt", true))); + + // Always wrap FileReader in BufferedReader. + BufferedReader bufferedReader = new BufferedReader(fileReader); + System.out.print("Date: "+dadm); + System.out.println("\n\n\n\n\t\t\t\tDetails of the patient:\n\n\n\n"); + while((line = bufferedReader.readLine()) != null) + { + System.out.println(line); + } + System.out.print("\t\t\t\t\t\t _________________________________________________________________ "); + System.out.println("\n\t\t\t\t\t\t\t\t\tBill of the patient:"); + System.out.print("\t\t\t\t\t\t _________________________________________________________________ \n\n"); + System.out.print("\t\t\t\t\t\tNo.of days patient stayed:");days=scan.nextInt(); + System.out.print("\t\t\t\t\t\tWard charges/day:");wcharge=scan.nextDouble(); + System.out.print("\n\t\t\t\t\t\tTotal ward charges:"+(wcharge*days)); + System.out.print("\n\t\t\t\t\t\tDoctor's fee:");doc=scan.nextDouble(); + System.out.print("\n\t\t\t\t\t\tService charges:");ser=scan.nextDouble(); + System.out.print("\n\t\t\t\t\t\tTOTAL AMOUNT:"+((wcharge*days)+doc+ser)); + out.println("Total Bill:"+((wcharge*days)+doc+ser)); + System.out.print("\n\t\t\t\t\t\t _________________________________________________________________ \n"); + // Always close files. + out.close(); + bufferedReader.close(); + } + catch(FileNotFoundException ex) { + System.out.println( + "Unable to open file '" + fileName + "'"); + } + catch(IOException ex) { + System.out.println( + "Error reading file '" + fileName + "'"); + } + pressAnyKeyToContinue(); +} +void exit() +{ +System.out.print("\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\n"); +System.out.print("\t\t\t\t\t _______________________________________________________________________________________ \n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| THANK YOU FOR USING |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| E-HEALTH CARE MANAGEMENT SYSTEM |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| |\n"); +System.out.print("\t\t\t\t\t| -Brought To You by Fahad,Omer and Yaseen |\n"); +System.out.print("\t\t\t\t\t|_______________________________________________________________________________________|\n"); +System.out.print("\t\t\t\t\t\n\n\n\n\t\t\t\t\t"); +System.exit(0); +} +void info() +{ + System.out.println("\n\nE-Health care management system is command-driven application that helps to manage the record of the patient's as well as generate their hospital bills."); + System.out.print("\t\t\t\t__________________________________________________________________________________________________________________________________\n"); + System.out.print("\t\t\t\t\tOptions | Description\n"); + System.out.print("\t\t\t\t__________________________________________________________________________________________________________________________________\n"); + System.out.println("\t\t\t\t 1 >> Add New Patient Record | A new patient file can be created by using this module."); + System.out.println("\t\t\t\t 2 >> Add Diagnosis Information | Adding day-to-day evaluation of the patient or the diagnosis report in the existing file."); + System.out.println("\t\t\t\t 3 >> History of the Patient | Check the previous or existing details of particular patient by using their file name."); + System.out.println("\t\t\t\t 4 >> Bill of the patient | Generates the bill of the patient with displaying the details."); + System.out.println("\t\t\t\t 5 >> Help | Provide the help documentation."); + System.out.println("\t\t\t\t 6 >> Exit | Exits the application."); + pressAnyKeyToContinue(); +} +} +public class Ehospital +{ +public static void main (String args[]) +{ + Info i=new Info(); + i.login(); + i.menu(); +} +} diff --git a/E-Health Care Management/Info.class b/E-Health Care Management/Info.class new file mode 100644 index 00000000..9eb706cf Binary files /dev/null and b/E-Health Care Management/Info.class differ diff --git a/E-Health Care Management/~$oject Report 2.docx b/E-Health Care Management/~$oject Report 2.docx new file mode 100644 index 00000000..1c94c6e6 Binary files /dev/null and b/E-Health Care Management/~$oject Report 2.docx differ diff --git a/E-Health Care Management/~$stract2.docx b/E-Health Care Management/~$stract2.docx new file mode 100644 index 00000000..1c94c6e6 Binary files /dev/null and b/E-Health Care Management/~$stract2.docx differ diff --git a/ElectricVehicleRunningTime.java b/ElectricVehicleRunningTime.java new file mode 100644 index 00000000..e5fe4b9a --- /dev/null +++ b/ElectricVehicleRunningTime.java @@ -0,0 +1,21 @@ +public class ElectricVehicleRunningTime { + + public static void main(String[] args) { + + // Create an array to store the on and off times of the electric vehicle + int[] evTimes = {850, 945, 1145, 1155, 1230, 1245, 1330, 1340, 1425, 1445}; + + // Calculate the total running time in minutes + int runningTime = 0; + for (int i = 1; i < evTimes.length; i += 2) { + runningTime += evTimes[i] - evTimes[i - 1]; + } + + // Convert the running time to hours and minutes + int hours = runningTime / 60; + int minutes = runningTime % 60; + + // Display the running time + System.out.println("The running time of the electric vehicle is " + hours + " hour(s) and " + minutes + " minute(s)."); + } +} \ No newline at end of file diff --git a/Email_Generator/.DS_Store b/Email_Generator/.DS_Store new file mode 100644 index 00000000..6b591f2e Binary files /dev/null and b/Email_Generator/.DS_Store differ diff --git a/Email_Generator/README.md b/Email_Generator/README.md new file mode 100644 index 00000000..7c8c2386 --- /dev/null +++ b/Email_Generator/README.md @@ -0,0 +1,12 @@ +## Email_Generator +This is basically Email Generator Application Program in Java. +<br>This program will Generate an email like this syntax: firstname.lastname@department.company.com +<br>You can select the department name, change the password, set the mailbox capacity and define an alternate email address +<br>It will Generate a random String for a password. + +## How To Run this Project +1. Download zip +2. After Download Extract it. +3. Right click +4. Open folder as intellij idea project or Open folder as project eclipse +5. Than, Open Src and also open .java files and Run. diff --git a/Email_Generator/bin/emailgenerator/EmailBackProgram.class b/Email_Generator/bin/emailgenerator/EmailBackProgram.class new file mode 100644 index 00000000..42c877a7 Binary files /dev/null and b/Email_Generator/bin/emailgenerator/EmailBackProgram.class differ diff --git a/Email_Generator/bin/emailgenerator/EmailMainProgram.class b/Email_Generator/bin/emailgenerator/EmailMainProgram.class new file mode 100644 index 00000000..a9963525 Binary files /dev/null and b/Email_Generator/bin/emailgenerator/EmailMainProgram.class differ diff --git a/Email_Generator/src/emailgenerator/EmailBackProgram.java b/Email_Generator/src/emailgenerator/EmailBackProgram.java new file mode 100644 index 00000000..72832065 --- /dev/null +++ b/Email_Generator/src/emailgenerator/EmailBackProgram.java @@ -0,0 +1,125 @@ +package Email_App; + +import java.util.Scanner; + +public class Email { + private String firstName; + private String lastName; + private String password; + private String department; + private String email; + private int defaultPasswordLength=8; + private int codelen=5; + private String Vcode; + private String company="drngpit.ac.in"; + private String name; + + public Email(String firstName, String lastName) { + this.firstName = firstName; + this.lastName = lastName; + System.out.println("Kindly ! Enter department for email creation dear "+this.firstName+" "+this.lastName); + //dept + this.department=setDepartment(); + System.out.println("Department:"+department); + //pass + this.password=randomPass(defaultPasswordLength); + System.out.println("New Password :"+password); + //clipping name as one + this.name=firstName+lastName; + //verification code + this.Vcode=vcode(codelen); + System.out.println("Your verification code : "+Vcode); + + //Binding + email=name.toLowerCase()+"."+department+"@"+company; + System.out.println("Official mail :"+email); + } + + private String setDepartment(){ + System.out.println("Enter the department Id\nSales : 1\nDevelopment : 2\nAccounting : 3"); + Scanner in=new Scanner(System.in); + int dep=in.nextInt(); + if(dep==1){ + return "sales"; + } + else if(dep==2){ + return"dev"; + } + else if(dep==3){ + return "acc"; + } + return""; + } + + private String randomPass(int length){ + String password="ABCEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%"; + char[]pass=new char[length]; + for(int i=0;i<length;i++){ + int rand=(int)(Math.random()*password.length()); + pass[i]=password.charAt(rand); + } + return new String(pass); + } + private String vcode(int codelen){ + String samcode="1234567890"; + char[]code=new char[codelen]; + for(int i=0;i<codelen;i++){ + int c=(int)(Math.random()*samcode.length()); + code[i]=samcode.charAt(c); + } + return new String(code); + } + + public void setPassword(String password) { + this.password = password; + } + + public String getDepartment() { + return department; + } + + public void setDepartment(String department) { + this.department = department; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + + public String getPassword(){ + return password; + } + + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getVcode() { + return Vcode; + } + public String getDept(String dep){ + if(dep.equals("dev")){ + return "Developers"; + } + else if(dep.equals("acc")){ + return "Accounts"; + } + else if(dep.equals("sales")){ + return "Sales"; + } + return ""; + + } + public String showInfo(){ + return "Name : "+name+"\nOfficial email : "+email+"\nDepartment : "+getDept(department); + } +} diff --git a/Email_Generator/src/emailgenerator/EmailMainProgram.java b/Email_Generator/src/emailgenerator/EmailMainProgram.java new file mode 100644 index 00000000..0a32b440 --- /dev/null +++ b/Email_Generator/src/emailgenerator/EmailMainProgram.java @@ -0,0 +1,69 @@ +package Email_App; + +import com.sun.security.jgss.GSSUtil; + +import java.sql.SQLOutput; +import java.util.Scanner; + +public class EmailApp { + public static void main(String[] args) { + System.out.println("Generate Organization's Email ==>"); + Scanner sc=new Scanner(System.in); + +// String x=sc.nextLine(); + System.out.println("Generating the email..."); + System.out.println("Enter firstname :"); + String first=sc.nextLine(); + System.out.println("Enter Lastname :"); + String second=sc.nextLine(); + + Email em=new Email(first,second); + + while(true) { + System.out.println("1 : Information "); + System.out.println("2 : Change Email"); + System.out.println("3 : Change Password"); + System.out.println("4 : Disclose Password"); + System.out.println("5 : Exit"); + System.out.println("Enter operation code :"); + int a = sc.nextInt(); + switch (a) { + case 1: + System.out.println(em.showInfo()); + break; + case 2: + System.out.println("Enter alternate email prefix :"); + sc.nextLine(); + String alt = sc.nextLine(); + em.setEmail(alt+"@drngpit.ac.in"); + break; + case 3: + System.out.println("Enter the verification code :"); + sc.nextLine(); + String s = sc.nextLine(); + if (s.equals(em.getVcode())) { + System.out.println("Enter alternate password :"); + String p = sc.nextLine(); + em.setPassword(p); + } else { + System.out.println("Please Enter valid verification code !!!"); + } + System.out.println("Password updated successfully !!!"); + break; + case 4: + System.out.println("Password disclose warning !!!"); + System.out.println("Enter the verification code :"); + sc.nextLine(); + String s1 = sc.nextLine(); + if (s1.equals(em.getVcode())) { + System.out.println("Your password : " + em.getPassword()); + } else { + System.out.println("Please Enter valid verification code !!!"); + } + case 5: + System.out.println("Have a great day ahead ! BYE "); + return ; + } + } + } +} \ No newline at end of file diff --git a/Employee Attendance System.java b/Employee Attendance System.java new file mode 100644 index 00000000..672400af --- /dev/null +++ b/Employee Attendance System.java @@ -0,0 +1,106 @@ +import java.util.*; +import java.text.SimpleDateFormat; + +class Employee { + private String name; + private int id; + private List<String> attendance; + + public Employee(int id, String name) { + this.id = id; + this.name = name; + this.attendance = new ArrayList<>(); + } + + public void markAttendance() { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date date = new Date(); + attendance.add(dateFormat.format(date)); + } + + public List<String> getAttendance() { + return attendance; + } + + public String getName() { + return name; + } + + public int getId() { + return id; + } +} + +public class AttendanceSystem { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + List<Employee> employees = new ArrayList<>(); + int employeeIdCounter = 1; + + while (true) { + System.out.println("Employee Attendance System Menu:"); + System.out.println("1. Add Employee"); + System.out.println("2. Mark Attendance"); + System.out.println("3. View Attendance"); + System.out.println("4. Exit"); + System.out.print("Select an option (1/2/3/4): "); + + int option = scanner.nextInt(); + + switch (option) { + case 1: + scanner.nextLine(); + System.out.print("Enter the employee's name: "); + String name = scanner.nextLine(); + employees.add(new Employee(employeeIdCounter, name)); + employeeIdCounter++; + System.out.println("Employee added successfully."); + break; + case 2: + System.out.print("Enter employee ID to mark attendance: "); + int employeeId = scanner.nextInt(); + Employee employee = findEmployeeById(employees, employeeId); + if (employee != null) { + employee.markAttendance(); + System.out.println("Attendance marked for " + employee.getName()); + } else { + System.out.println("Employee not found."); + } + break; + case 3: + System.out.print("Enter employee ID to view attendance: "); + int idToView = scanner.nextInt(); + Employee empToView = findEmployeeById(employees, idToView); + if (empToView != null) { + List<String> attendance = empToView.getAttendance(); + if (attendance.isEmpty()) { + System.out.println(empToView.getName() + " has no attendance records."); + } else { + System.out.println("Attendance records for " + empToView.getName() + ":"); + for (String record : attendance) { + System.out.println(record); + } + } + } else { + System.out.println("Employee not found."); + } + break; + case 4: + System.out.println("Exiting the Attendance System."); + scanner.close(); + System.exit(0); + default: + System.out.println("Invalid option. Please select 1, 2, 3, or 4."); + } + } + } + + private static Employee findEmployeeById(List<Employee> employees, int id) { + for (Employee employee : employees) { + if (employee.getId() == id) { + return employee; + } + } + return null; + } +} diff --git a/Encrypt-the-Password/password_encryption.java b/Encrypt-the-Password/password_encryption.java new file mode 100644 index 00000000..953b179c --- /dev/null +++ b/Encrypt-the-Password/password_encryption.java @@ -0,0 +1,49 @@ +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +public class password_encryption +{ + public static byte[] getSHA(String input) throws NoSuchAlgorithmException + { + /* MessageDigest instance for hashing using SHA512*/ + MessageDigest md = MessageDigest.getInstance("SHA-512"); + + /* digest() method called to calculate message digest of an input and return array of byte */ + return md.digest(input.getBytes(StandardCharsets.UTF_8)); + } + + public static String toHexString(byte[] hash) + { + /* Convert byte array of hash into digest */ + BigInteger number = new BigInteger(1, hash); + + /* Convert the digest into hex value */ + StringBuilder hexString = new StringBuilder(number.toString(16)); + + while (hexString.length() < 32) + { + hexString.insert(0, '0'); + } + + return hexString.toString(); + } + + /* Driver code */ + public static void main(String args[]) + { + try + { + String string1 = "examplePassword123"; + System.out.println("\n" + string1 + " : " + toHexString(getSHA(string1))); + + String string2 = "hashtrial"; + System.out.println("\n" + string2 + " : " + toHexString(getSHA(string2))); + } + catch (NoSuchAlgorithmException e) + { + System.out.println("Exception thrown for incorrect algorithm: " + e); + } + } +} diff --git a/Eng_Dictionary/README.md b/Eng_Dictionary/README.md new file mode 100644 index 00000000..9a9c2a9c --- /dev/null +++ b/Eng_Dictionary/README.md @@ -0,0 +1,14 @@ +# Eng_Dictionary +An interactive dictionary UI which provides meanings, synonyms and pronounces the word. + +## features : +* provides meaning, pronunciation and synonyms along with examples. +* a pronunciation button which tells how to pronunce the word. +* clicking on synonym provides the meaning of that word. + +## limitations: +* only one meaning is provided. +* API used has a lot of missing informations. + +## ScreenShort: + diff --git a/Eng_Dictionary/dictionary.png b/Eng_Dictionary/dictionary.png new file mode 100644 index 00000000..41d5fa56 Binary files /dev/null and b/Eng_Dictionary/dictionary.png differ diff --git a/Eng_Dictionary/index.html b/Eng_Dictionary/index.html new file mode 100644 index 00000000..fc415d6c --- /dev/null +++ b/Eng_Dictionary/index.html @@ -0,0 +1,65 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <title>English Dictionary</title> + <link rel="stylesheet" href="styles.css" /> + <link rel="shortcut icon" href="dictionary.png" type="image/x-icon" /> + <link + href="https://fonts.googleapis.com/icon?family=Material+Icons" + rel="stylesheet" + /> + + <link + rel="stylesheet" + href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" + integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" + crossorigin="anonymous" + referrerpolicy="no-referrer" + /> + </head> + <body> + <div class="wrapper"> + <header>English Dictionary</header> + <div class="search"> + <input type="text" placeholder="Search a world" required /> + <i class="fas fa-search"></i> + <span class="material-icons">close</span> + </div> + <p class="info-text">Type the word and press enter</p> + <ul> + <li class="word"> + <div class="details"> + <p>_</p> + <span>__</span> + </div> + <i class="fas fa-volume-up"></i> + </li> + + <div class="content"> + <li class="meaning"> + <div class="details"> + <p>Meaning</p> + <span>__</span> + </div> + </li> + + <li class="example"> + <div class="details"> + <p>Example</p> + <span>__</span> + </div> + </li> + <li class="synonyms"> + <div class="details"> + <p>Synonyms</p> + <div class="list"></div> + </div> + </li> + </div> + </ul> + </div> + <script src="script.js"></script> + </body> +</html> diff --git a/Eng_Dictionary/script.js b/Eng_Dictionary/script.js new file mode 100644 index 00000000..dc94fd84 --- /dev/null +++ b/Eng_Dictionary/script.js @@ -0,0 +1,91 @@ +const wrapper = document.querySelector(".wrapper"); +const searchInput = wrapper.querySelector("input"); +const infoText = wrapper.querySelector(".info-text"); +const synonyms = wrapper.querySelector(".synonyms .list"); +const volumeIcon = wrapper.querySelector(".word i"); +const removeIcon = wrapper.querySelector(".search span"); +let audio; + +function data(result, word) { + wrapper.classList.remove("active"); + wrapper.offsetWidth; + if (result.title) { + infoText.innerHTML = `Can't find the meaning of <span> ${word}</span>. Please search another word.`; + } else { + wrapper.classList.add("active"); + document.querySelector(".word p").innerText = result[0].word; + phonetics = ""; + if (result[0].phonetics[0] !== undefined) + phonetics = result[0].phonetics[0].text; + document.querySelector( + ".word span" + ).innerText = `${result[0].meanings[0].partOfSpeech} ${phonetics}`; + document.querySelector(".meaning span").innerText = + result[0].meanings[0].definitions[0].definition.split(";")[0]; + document.querySelector(".example span").innerText = + result[0].meanings[0].definitions[0].example || "Not Available"; + + audio = new Audio(result[0].phonetics[0].audio); + if (result[0].meanings[0].synonyms.length === 0) { + synonyms.parentElement.style.display = "none"; + } else synonyms.parentElement.style.display = "block"; + + synonyms.innerHTML = ""; + for (let i = 0; i < 5; i++) { + let tag = `<span onclick="search('${ + result[0].meanings[0].synonyms[i] + }')">${result[0].meanings[0].synonyms[i] || ""}</span>`; + + synonyms.insertAdjacentHTML("beforeend", tag); + } + } +} + +function fetchAPI(word) { + wrapper.classList.remove("active"); + infoText.style.cssText = " padding: 12px; color:black"; + infoText.innerHTML = `Searching the meaning of <span> ${word}</span>`; + let url = `https://api.dictionaryapi.dev/api/v2/entries/en/${word}`; + + fetch(url) + .then((res) => res.json()) + .catch((error) => { + infoText.style.color = "red"; + infoText.innerHTML = "Something went wrong.<br/> Error: " + error.message; + }) + .then((result) => data(result, word)); +} + +searchInput.addEventListener("keyup", (e) => { + if (e.key === "Enter" && e.target.value) { + fetchAPI(e.target.value); + } +}); + +volumeIcon.addEventListener("click", () => { + if (audio.attributes[1].nodeValue.length === 0) { + no_audio1 = new Audio( + "https://api.dictionaryapi.dev/media/pronunciations/en/not-us.mp3" + ); + no_audio2 = new Audio( + "https://api.dictionaryapi.dev/media/pronunciations/en/available-us.mp3" + ); + no_audio1.play(); + setTimeout(() => { + no_audio2.play(); + }, 150); + } else audio.play(); +}); + +function search(word) { + searchInput.value = word; + fetchAPI(word); +} + +removeIcon.addEventListener("click", () => { + searchInput.value = ""; + searchInput.focus(); + wrapper.classList.remove("active"); + infoText.innerHTML = "Type the word and press enter"; + infoText.style.cssText = " padding: 0px; color:#9a9a9a"; +}); diff --git a/Eng_Dictionary/styles.css b/Eng_Dictionary/styles.css new file mode 100644 index 00000000..db138622 --- /dev/null +++ b/Eng_Dictionary/styles.css @@ -0,0 +1,167 @@ +@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200&display=swap"); + +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: "Poppins", sans-serif; + font-weight: bold; +} + +body { + display: flex; + align-items: center; + justify-content: center; + min-height: 100vh; + background-image: linear-gradient(to top left, lightblue, cyan, lightblue); +} + +.wrapper { + width: 420px; + background-color: rgba(255, 255, 255, 0.7); + border-radius: 20px; + padding: 28px 28px 45px; +} + +.wrapper header { + font-size: 28px; + font-weight: 500; + font-family: monospace; + text-align: center; +} + +.wrapper .search { + position: relative; + margin: 35px 0 18px; +} + +.search input { + height: 53px; + width: 100%; + font-size: 16px; + outline: none; + padding: 0 42px; + border: 1px solid #999; + border-radius: 5px; +} +.search input:focus { + padding: 0 41px; + border: 2px solid black; +} + +.search input::placeholder { + color: #b8b8b8; +} +.search :where(i, span) { + position: absolute; + top: 50%; + color: #999; + transform: translateY(-50%); +} + +.search i { + left: 18px; + font-size: 16px; + pointer-events: none; +} +.search input:focus ~ i { + color: rgb(35, 182, 231); +} +.search span { + right: 15px; + font-size: 1; + cursor: pointer; + display: none; +} + +.search input:valid ~ span { + display: block; +} + +.wrapper .info-text { + position: relative; + font-size: 12px; + color: #9a9a9a; + top: -15px; + left: 15px; +} +.wrapper.active .info-text { + display: none; +} +.info-text span { + font-weight: bold; +} + +.wrapper ul li { + display: flex; + margin-bottom: 14px; + padding-bottom: 17px; + border-bottom: 1px solid #ccc; + align-items: center; + justify-content: space-between; +} + +.wrapper ul { + height: 0; + opacity: 0; + overflow: hidden; + transition: all 0.2s ease; +} + +.wrapper.active ul { + height: fit-content; + opacity: 1; +} +ul li:last-child { + margin: 0px; + padding: 0px; + border-bottom: 0px; +} +ul .word p { + font-size: 22px; + font-weight: bold; +} + +ul .word span { + font-size: 12px; + color: #6f6e6e; + font-style: italic; +} + +ul .word i { + cursor: pointer; + font-size: 15px; + color: #999; +} + +.content li .details { + padding-left: 10px; + border-radius: 4px 0 0 4px; + border-left: 3px solid rgb(35, 182, 231); +} + +.content li .details p { + font-size: 17px; + font-weight: bolder; +} +.content li .details span { + font-size: 15px; + font-weight: 500; +} + +.content li .details span { + display: block; + max-height: 45px; + overflow: scroll; +} + +.synonyms .details .list { + display: flex; + flex-wrap: wrap; + gap: 5px; + text-decoration: underline; +} + +.synonyms .details .list span { + cursor: pointer; +} diff --git a/Exchange-Indian-Currency/Exchange.java b/Exchange-Indian-Currency/Exchange.java new file mode 100644 index 00000000..eebfc1ec --- /dev/null +++ b/Exchange-Indian-Currency/Exchange.java @@ -0,0 +1,38 @@ +import java.util.*; + +public class Exchange { + public static void main(String[] args) { + + Scanner sc = new Scanner(System.in); + System.out.print("Enter the amount for Exchange: "); + int V = sc.nextInt(); + exchanger(V); + + sc.close(); + + } + + public static void exchanger(int V) { + int[] coins = { 1, 2, 5, 10, 20, 50, 100, 200, 500, 2000 }; + int[] minCoins = new int[V + 1]; + int[] lastCoin = new int[V + 1]; + + for (int i = 1; i <= V; i++) { + minCoins[i] = Integer.MAX_VALUE; + for (int j = 0; j < coins.length; j++) { + if (coins[j] <= i && minCoins[i - coins[j]] + 1 < minCoins[i]) { + minCoins[i] = minCoins[i - coins[j]] + 1; + lastCoin[i] = coins[j]; + } + } + } + + System.out.println("Minimum number of coins: " + minCoins[V]); + System.out.print("Coins: "); + while (V > 0) { + System.out.print(lastCoin[V] + " "); + V -= lastCoin[V]; + } + System.out.println(); + } +} diff --git a/ExitListener.class b/ExitListener.class new file mode 100644 index 00000000..4be3024b Binary files /dev/null and b/ExitListener.class differ diff --git a/ExitListener.java b/ExitListener.java new file mode 100644 index 00000000..b7dd0b14 --- /dev/null +++ b/ExitListener.java @@ -0,0 +1,10 @@ +import java.awt.*; +import java.awt.event.*; + +public class ExitListener extends WindowAdapter +{ + public void windowClosing(WindowEvent event) + { + System.exit(0); + } +} \ No newline at end of file diff --git a/ExpenseTracker.java b/ExpenseTracker.java new file mode 100644 index 00000000..42b43cd5 --- /dev/null +++ b/ExpenseTracker.java @@ -0,0 +1,74 @@ +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +class Expense { + private String description; + private double amount; + + public Expense(String description, double amount) { + this.description = description; + this.amount = amount; + } + + public String getDescription() { + return description; + } + + public double getAmount() { + return amount; + } + + @Override + public String toString() { + return "Description: " + description + ", Amount: $" + amount; + } +} + +public class ExpenseTracker { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + List<Expense> expenses = new ArrayList<>(); + double totalExpenses = 0.0; + + while (true) { + System.out.println("Expense Tracker Menu:"); + System.out.println("1. Add an expense"); + System.out.println("2. View expenses"); + System.out.println("3. Exit"); + System.out.print("Select an option (1/2/3): "); + + int option = scanner.nextInt(); + + switch (option) { + case 1: + scanner.nextLine(); // Consume the newline character + System.out.print("Enter expense description: "); + String description = scanner.nextLine(); + System.out.print("Enter expense amount: $"); + double amount = scanner.nextDouble(); + expenses.add(new Expense(description, amount)); + totalExpenses += amount; + System.out.println("Expense added successfully."); + break; + case 2: + if (expenses.isEmpty()) { + System.out.println("No expenses recorded yet."); + } else { + System.out.println("List of Expenses:"); + for (Expense expense : expenses) { + System.out.println(expense); + } + System.out.println("Total Expenses: $" + totalExpenses); + } + break; + case 3: + System.out.println("Exiting the Expense Tracker."); + scanner.close(); + System.exit(0); + default: + System.out.println("Invalid option. Please select 1, 2, or 3."); + } + } + } +} diff --git a/Face Recognition Using Python/Face.py b/Face Recognition Using Python/Face.py new file mode 100644 index 00000000..d4abfb6e --- /dev/null +++ b/Face Recognition Using Python/Face.py @@ -0,0 +1,25 @@ +import cv2 + +cap = cv2.VideoCapture(0) + +face_cascade = cv2.CascadeClassifier( + cv2.data.haarcascades + "haarcascade_frontalface_default.xml") +body_cascade = cv2.CascadeClassifier( + cv2.data.haarcascades + "haarcascade_fullbody.xml") + +while True: + _, frame = cap.read() + + gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) + faces = face_cascade.detectMultiScale(gray, 1.3, 5) + + for (x, y, width, height) in faces: + cv2.rectangle(frame, (x, y), (x + width, y + height), (255, 0, 0), 3) + + cv2.imshow("Camera", frame) + + if cv2.waitKey(1) == ord('q'): + break + +cap.release() +cv2.destroyAllWindows() diff --git a/Factorial.py b/Factorial.py new file mode 100644 index 00000000..60a75d64 --- /dev/null +++ b/Factorial.py @@ -0,0 +1,8 @@ +n=int(input("enter no\n")) +count=n +res=1 +while count>0: + res=res*count + count-=1 + +print("factorial of ",n,"is",res) diff --git a/Factorial_prime_avg.java b/Factorial_prime_avg.java new file mode 100644 index 00000000..9ec2396c --- /dev/null +++ b/Factorial_prime_avg.java @@ -0,0 +1,94 @@ +package calculate; +import java.util.Scanner; +public class lab2 { + + public static void Factorial(int n) + { + int fact = 1; + if(n==0) + return; + for(int i= 1; i<=n; i++) + { + fact = fact*i; + } + System.out.println("Factorial of "+n+" is "+fact+" "); + + } + public static void Average(int n) + { + int sum = 0; + for(int i=0; i<=n; i++) + { + sum = sum + i ; + } + int avg = sum/n; + System.out.println("Sum: "+sum+" "); + System.out.println("Average: "+avg+" "); + } + public static void Prime() + { + int counter = 0; + int i=2; + + for(i=2; i<=50; i++) + { + + for(int j=1; j<=i; j++) + { + if(i%j==0) + counter++; + } + if(counter<=2) + { + System.out.print(i+" "); + counter =0; + } + else + counter=0; + + } + System.out.println(""); + + } + + + public static void main(String[] args) + { + Scanner s = new Scanner(System.in); + int opt,n; + boolean flag = true; + + while(flag) + { + System.out.println("choose a option from following: "); + System.out.println("1. Factorial"); + System.out.println("2. Prime numbers"); + System.out.println("3. Average"); + System.out.println("4 for exit"); + opt = s.nextInt(); + switch(opt) + { + case 1: + System.out.print("Enter number to find factorial: "); + n = s.nextInt(); + Factorial(n); + break; + + case 2: + Prime(); + break; + + case 3: + System.out.print("Enter number of itiration: "); + n = s.nextInt(); + Average(n); + break; + + case 4: + flag = false; + break; + } + } + } + } + diff --git a/Fee Management System/.DS_Store b/Fee Management System/.DS_Store new file mode 100644 index 00000000..b4adbbb5 Binary files /dev/null and b/Fee Management System/.DS_Store differ diff --git a/Fee Management System/WebContent/AccountantLoginForm.html b/Fee Management System/WebContent/AccountantLoginForm.html new file mode 100644 index 00000000..5ba3a8a7 --- /dev/null +++ b/Fee Management System/WebContent/AccountantLoginForm.html @@ -0,0 +1,7 @@ +<form action="AccountantLogin" method="post"> +<table> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Password:</td><td><input type="password" name="password" required/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" value="Login"/></td></tr> +</table> +</form> \ No newline at end of file diff --git a/Fee Management System/WebContent/AddAccountantForm.html b/Fee Management System/WebContent/AddAccountantForm.html new file mode 100644 index 00000000..1347c722 --- /dev/null +++ b/Fee Management System/WebContent/AddAccountantForm.html @@ -0,0 +1,10 @@ +<form action="AddAccountant" method="post"> +<table> +<tr><td>Name:</td><td><input type="text" name="name" required/></td></tr> +<tr><td>Password:</td><td><input type="password" name="password" required/></td></tr> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Address:</td><td><textarea name="address" style="width:300px; height:100px;"></textarea></td></tr> +<tr><td>Contact:</td><td><input type="text" name="contact"/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" value="Add Accountant"/></td></tr> +</table> +</form> \ No newline at end of file diff --git a/Fee Management System/WebContent/AddStudentForm.html b/Fee Management System/WebContent/AddStudentForm.html new file mode 100644 index 00000000..f5865363 --- /dev/null +++ b/Fee Management System/WebContent/AddStudentForm.html @@ -0,0 +1,27 @@ +<h1>Add Student Form</h1> +<form action="AddStudent" method="post"> +<table> +<tr><td>Name:</td><td><input type="text" name="name" required/></td></tr> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Sex:</td><td> +<input type="radio" name="sex" value="male"/> Male +<input type="radio" name="sex" value="female"/> Female +</td></tr> +<tr><td>Course:</td><td> +<select name="course"> +<option>Java</option> +<option>.Net</option> +<option>PHP</option> +<option>Android</option> +<option>Hadoop</option> +<option>Selenium</option> +</select> +</td></tr> +<tr><td>Fee:</td><td><input type="number" name="fee"/></td></tr> +<tr><td>Paid:</td><td><input type="number" name="paid"/></td></tr> +<tr><td>Due:</td><td><input type="number" name="due"/></td></tr> +<tr><td>Address:</td><td><textarea name="address" style="width:300px;height:100px;"></textarea></td></tr> +<tr><td>Contact No:</td><td><input type="text" name="contact"/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" class="btn btn-default" value="Save Student"/></td></tr> +</table> +</form> diff --git a/Fee Management System/WebContent/AdminLoginForm.html b/Fee Management System/WebContent/AdminLoginForm.html new file mode 100644 index 00000000..6c7bedb7 --- /dev/null +++ b/Fee Management System/WebContent/AdminLoginForm.html @@ -0,0 +1,7 @@ +<form action="AdminLogin" method="post"> +<table> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Password:</td><td><input type="password" name="password" required/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" value="Login"/></td></tr> +</table> +</form> \ No newline at end of file diff --git a/Fee Management System/WebContent/META-INF/MANIFEST.MF b/Fee Management System/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/Fee Management System/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/Fee Management System/WebContent/SearchStudentForm.html b/Fee Management System/WebContent/SearchStudentForm.html new file mode 100644 index 00000000..4380a724 --- /dev/null +++ b/Fee Management System/WebContent/SearchStudentForm.html @@ -0,0 +1,7 @@ +<h1>Search Student Form</h1> +<form action="SearchStudent" method="post"> +<table> +<tr><td>Rollno:</td><td><input type="number" name="rollno" required/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" value="Search Student"/></td></tr> +</table> +</form> \ No newline at end of file diff --git a/Fee Management System/WebContent/accountanthome.html b/Fee Management System/WebContent/accountanthome.html new file mode 100644 index 00000000..a3c62a0a --- /dev/null +++ b/Fee Management System/WebContent/accountanthome.html @@ -0,0 +1,23 @@ +<div id="myCarousel" class="carousel slide" data-ride="carousel"> + <!-- Indicators --> + <ol class="carousel-indicators"> + <li data-target="#myCarousel" data-slide-to="0" class="active"></li> + <li data-target="#myCarousel" data-slide-to="1"></li> + <li data-target="#myCarousel" data-slide-to="2"></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item active"> + <img src="resources/images/accountant3.jpeg" alt="baby 3" > + </div> + + <div class="item"> + <img src="resources/images/accountant2.jpg" alt="baby 2" > + </div> + <div class="item"> + <img src="resources/images/accountant1.jpg" alt="baby 1" > + </div> + + </div> +</div><!-- corousel end --> \ No newline at end of file diff --git a/Fee Management System/WebContent/adminhome.html b/Fee Management System/WebContent/adminhome.html new file mode 100644 index 00000000..bdc4940d --- /dev/null +++ b/Fee Management System/WebContent/adminhome.html @@ -0,0 +1,23 @@ +<div id="myCarousel" class="carousel slide" data-ride="carousel"> + <!-- Indicators --> + <ol class="carousel-indicators"> + <li data-target="#myCarousel" data-slide-to="0" class="active"></li> + <li data-target="#myCarousel" data-slide-to="1"></li> + <li data-target="#myCarousel" data-slide-to="2"></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item active"> + <img src="resources/images/admin1.jpg" alt="baby 1" > + </div> + + <div class="item"> + <img src="resources/images/admin2.jpg" alt="baby 2" > + </div> + + <div class="item"> + <img src="resources/images/admin3.jpg" alt="baby 3" > + </div> + </div> +</div><!-- corousel end --> \ No newline at end of file diff --git a/Fee Management System/WebContent/db.sql b/Fee Management System/WebContent/db.sql new file mode 100644 index 00000000..25ec89ec --- /dev/null +++ b/Fee Management System/WebContent/db.sql @@ -0,0 +1,25 @@ +CREATE TABLE "FEE_STUDENT" + ("ROLLNO" VARCHAR2(4000), + "NAME" VARCHAR2(4000), + "EMAIL" VARCHAR2(4000), + "SEX" VARCHAR2(4000), + "COURSE" VARCHAR2(4000), + "FEE" NUMBER, + "PAID" NUMBER, + "DUE" NUMBER, + "ADDRESS" VARCHAR2(4000), + "CONTACT" VARCHAR2(4000), + CONSTRAINT "FEE_STUDENT_PK" PRIMARY KEY ("ROLLNO") ENABLE + ) +/ + +CREATE TABLE "FEE_ACCOUNTANT" + ( "ID" NUMBER, + "NAME" VARCHAR2(4000), + "EMAIL" VARCHAR2(4000), + "PASSWORD" VARCHAR2(4000), + "ADDRESS" VARCHAR2(4000), + "CONTACT" VARCHAR2(4000), + CONSTRAINT "FEE_ACCOUNTANT_PK" PRIMARY KEY ("ID") ENABLE + ) +/ \ No newline at end of file diff --git a/Fee Management System/WebContent/footer.html b/Fee Management System/WebContent/footer.html new file mode 100644 index 00000000..a4350995 --- /dev/null +++ b/Fee Management System/WebContent/footer.html @@ -0,0 +1,5 @@ +<div class="container-fluid footer"> +<p>©Copyright 2017 By: Harshvadan Purohit</p> +</div> + <script src="resources/jquery.min.js"></script> + <script src="resources/bootstrap.min.js"></script> diff --git a/Fee Management System/WebContent/index.html b/Fee Management System/WebContent/index.html new file mode 100644 index 00000000..28e7b1ec --- /dev/null +++ b/Fee Management System/WebContent/index.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="ISO-8859-1"> +<title>Fee Report</title> +<link rel="stylesheet" href="resources/bootstrap.min.css"/> +<link rel="stylesheet" href="style.css"/> +</head> +<body> + +<nav class="navbar navbar-default"> + <div class="container-fluid"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html">FeeReport</a> + </div> + + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li><a href="index.html">Home</a></li> + </ul> + + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> +</nav> + +<div class="container"> +<div class="row"> +<div class="col-md-6"> +<h2>Admin Login Form</h2> +<form action="AdminLogin" method="post"> +<table> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Password:</td><td><input type="password" name="password" required/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" class="btn btn-default" value="Login"/></td></tr> +</table> +</form> +</div> + +<div class="col-md-6"> +<h2>Accountant Login Form</h2> +<form action="AccountantLogin" method="post"> +<table> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Password:</td><td><input type="password" name="password" required/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" class="btn btn-default" value="Login"/></td></tr> +</table> +</form> +</div> +</div> + +</div> + +<div class="container-fluid footer"> +<p>©Copyright 2017 By: Harshvadan Purohit</p> +</div> + <script src="resources/jquery.min.js"></script> + <script src="resources/bootstrap.min.js"></script> +</body> +</html> \ No newline at end of file diff --git a/Fee Management System/WebContent/navaccountant.html b/Fee Management System/WebContent/navaccountant.html new file mode 100644 index 00000000..5dc2e149 --- /dev/null +++ b/Fee Management System/WebContent/navaccountant.html @@ -0,0 +1,27 @@ +<nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html">FeeReport</a> + </div> + + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li><a href="index.html">Home</a></li> + <li><a href="AddStudentForm">Add Student</a></li> + <li><a href="ViewStudent">View Student</a></li> + <li><a href="DueFee">Due Fee</a></li> + <li><a href="SearchStudentForm">Search Student</a></li> + <li><a href="LogoutAccountant">Logout</a></li> + </ul> + + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> +</nav> \ No newline at end of file diff --git a/Fee Management System/WebContent/navadmin.html b/Fee Management System/WebContent/navadmin.html new file mode 100644 index 00000000..57536294 --- /dev/null +++ b/Fee Management System/WebContent/navadmin.html @@ -0,0 +1,26 @@ +<nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html">FeeReport</a> + </div> + + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li><a href="index.html">Home</a></li> + <li><a href="AddAccountantForm">Add Accountant</a></li> + <li><a href="ViewAccountant">View Accountant</a></li> + <li><a href="LogoutAdmin">Logout</a></li> + + </ul> + + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> +</nav> \ No newline at end of file diff --git a/Fee Management System/WebContent/navhome.html b/Fee Management System/WebContent/navhome.html new file mode 100644 index 00000000..795375e4 --- /dev/null +++ b/Fee Management System/WebContent/navhome.html @@ -0,0 +1,22 @@ +<nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html">FeeReport</a> + </div> + + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li><a href="index.html">Home</a></li> + </ul> + + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> +</nav> \ No newline at end of file diff --git a/Fee Management System/WebContent/resources/bootstrap.min.css b/Fee Management System/WebContent/resources/bootstrap.min.css new file mode 100644 index 00000000..4cf729e4 --- /dev/null +++ b/Fee Management System/WebContent/resources/bootstrap.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/Fee Management System/WebContent/resources/bootstrap.min.js b/Fee Management System/WebContent/resources/bootstrap.min.js new file mode 100644 index 00000000..133aeecb --- /dev/null +++ b/Fee Management System/WebContent/resources/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")), +d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/Fee Management System/WebContent/resources/images/accountant1.jpg b/Fee Management System/WebContent/resources/images/accountant1.jpg new file mode 100644 index 00000000..2a2aa701 Binary files /dev/null and b/Fee Management System/WebContent/resources/images/accountant1.jpg differ diff --git a/Fee Management System/WebContent/resources/images/accountant2.jpg b/Fee Management System/WebContent/resources/images/accountant2.jpg new file mode 100644 index 00000000..92430832 Binary files /dev/null and b/Fee Management System/WebContent/resources/images/accountant2.jpg differ diff --git a/Fee Management System/WebContent/resources/images/accountant3.jpeg b/Fee Management System/WebContent/resources/images/accountant3.jpeg new file mode 100644 index 00000000..04c0cd42 Binary files /dev/null and b/Fee Management System/WebContent/resources/images/accountant3.jpeg differ diff --git a/Fee Management System/WebContent/resources/images/admin1.jpg b/Fee Management System/WebContent/resources/images/admin1.jpg new file mode 100644 index 00000000..5e433613 Binary files /dev/null and b/Fee Management System/WebContent/resources/images/admin1.jpg differ diff --git a/Fee Management System/WebContent/resources/images/admin2.jpg b/Fee Management System/WebContent/resources/images/admin2.jpg new file mode 100644 index 00000000..bce18950 Binary files /dev/null and b/Fee Management System/WebContent/resources/images/admin2.jpg differ diff --git a/Fee Management System/WebContent/resources/images/admin3.jpg b/Fee Management System/WebContent/resources/images/admin3.jpg new file mode 100644 index 00000000..0165efec Binary files /dev/null and b/Fee Management System/WebContent/resources/images/admin3.jpg differ diff --git a/Fee Management System/WebContent/resources/jquery.min.js b/Fee Management System/WebContent/resources/jquery.min.js new file mode 100644 index 00000000..f3644431 --- /dev/null +++ b/Fee Management System/WebContent/resources/jquery.min.js @@ -0,0 +1,6 @@ +/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; + +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){ +return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m}); +//# sourceMappingURL=jquery.min.map \ No newline at end of file diff --git a/Fee Management System/WebContent/style.css b/Fee Management System/WebContent/style.css new file mode 100644 index 00000000..bd4ecee8 --- /dev/null +++ b/Fee Management System/WebContent/style.css @@ -0,0 +1,6 @@ +div.box{width:35%;border:1px solid pink;margin-left:10px; padding:20px;float:left} +input,select,textarea{margin:3px;padding:5px;border-radius:2px;border:1px solid pink} +.footer{ + margin-top:100px;padding:50px;text-align:center;background:#f8f8f8;color:black; + +} \ No newline at end of file diff --git a/Fee Management System/build/classes/com/javatpoint/beans/AccountantBean.class b/Fee Management System/build/classes/com/javatpoint/beans/AccountantBean.class new file mode 100644 index 00000000..c32b37ef Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/beans/AccountantBean.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/beans/StudentBean.class b/Fee Management System/build/classes/com/javatpoint/beans/StudentBean.class new file mode 100644 index 00000000..706b8ada Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/beans/StudentBean.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/dao/AccountantDao.class b/Fee Management System/build/classes/com/javatpoint/dao/AccountantDao.class new file mode 100644 index 00000000..582d9757 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/dao/AccountantDao.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/dao/DB.class b/Fee Management System/build/classes/com/javatpoint/dao/DB.class new file mode 100644 index 00000000..5c8471ef Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/dao/DB.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/dao/StudentDao.class b/Fee Management System/build/classes/com/javatpoint/dao/StudentDao.class new file mode 100644 index 00000000..344c69f1 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/dao/StudentDao.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/AccountantLogin.class b/Fee Management System/build/classes/com/javatpoint/servlets/AccountantLogin.class new file mode 100644 index 00000000..58028942 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/AccountantLogin.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/AddAccountant.class b/Fee Management System/build/classes/com/javatpoint/servlets/AddAccountant.class new file mode 100644 index 00000000..792064cf Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/AddAccountant.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/AddAccountantForm.class b/Fee Management System/build/classes/com/javatpoint/servlets/AddAccountantForm.class new file mode 100644 index 00000000..d5599608 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/AddAccountantForm.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/AddStudent.class b/Fee Management System/build/classes/com/javatpoint/servlets/AddStudent.class new file mode 100644 index 00000000..bd79a5f4 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/AddStudent.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/AddStudentForm.class b/Fee Management System/build/classes/com/javatpoint/servlets/AddStudentForm.class new file mode 100644 index 00000000..460f7eb6 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/AddStudentForm.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/AdminLogin.class b/Fee Management System/build/classes/com/javatpoint/servlets/AdminLogin.class new file mode 100644 index 00000000..7c335bea Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/AdminLogin.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/DeleteAccountant.class b/Fee Management System/build/classes/com/javatpoint/servlets/DeleteAccountant.class new file mode 100644 index 00000000..d7957e42 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/DeleteAccountant.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/DeleteStudent.class b/Fee Management System/build/classes/com/javatpoint/servlets/DeleteStudent.class new file mode 100644 index 00000000..3e9149fc Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/DeleteStudent.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/DueFee.class b/Fee Management System/build/classes/com/javatpoint/servlets/DueFee.class new file mode 100644 index 00000000..468aac9c Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/DueFee.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/EditAccountant.class b/Fee Management System/build/classes/com/javatpoint/servlets/EditAccountant.class new file mode 100644 index 00000000..8fb01deb Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/EditAccountant.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/EditAccountantForm.class b/Fee Management System/build/classes/com/javatpoint/servlets/EditAccountantForm.class new file mode 100644 index 00000000..8131e118 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/EditAccountantForm.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/EditStudent.class b/Fee Management System/build/classes/com/javatpoint/servlets/EditStudent.class new file mode 100644 index 00000000..a8089344 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/EditStudent.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/EditStudentForm.class b/Fee Management System/build/classes/com/javatpoint/servlets/EditStudentForm.class new file mode 100644 index 00000000..f9fcb046 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/EditStudentForm.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/LogoutAccountant.class b/Fee Management System/build/classes/com/javatpoint/servlets/LogoutAccountant.class new file mode 100644 index 00000000..209e707d Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/LogoutAccountant.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/LogoutAdmin.class b/Fee Management System/build/classes/com/javatpoint/servlets/LogoutAdmin.class new file mode 100644 index 00000000..68811246 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/LogoutAdmin.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/SearchStudent.class b/Fee Management System/build/classes/com/javatpoint/servlets/SearchStudent.class new file mode 100644 index 00000000..c2ed6b31 Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/SearchStudent.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/SearchStudentForm.class b/Fee Management System/build/classes/com/javatpoint/servlets/SearchStudentForm.class new file mode 100644 index 00000000..8f468c1f Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/SearchStudentForm.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/ViewAccountant.class b/Fee Management System/build/classes/com/javatpoint/servlets/ViewAccountant.class new file mode 100644 index 00000000..7de8747e Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/ViewAccountant.class differ diff --git a/Fee Management System/build/classes/com/javatpoint/servlets/ViewStudent.class b/Fee Management System/build/classes/com/javatpoint/servlets/ViewStudent.class new file mode 100644 index 00000000..13b2eacb Binary files /dev/null and b/Fee Management System/build/classes/com/javatpoint/servlets/ViewStudent.class differ diff --git a/Fee Management System/src/com/javatpoint/beans/AccountantBean.java b/Fee Management System/src/com/javatpoint/beans/AccountantBean.java new file mode 100644 index 00000000..81b76115 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/beans/AccountantBean.java @@ -0,0 +1,68 @@ +package com.javatpoint.beans; + +public class AccountantBean { +private int id; +private String name,email,password,address,contact; + +public AccountantBean() { + super(); + // TODO Auto-generated constructor stub +} + +public AccountantBean(String name, String email, String password, String address, String contact) { + super(); + this.name = name; + this.email = email; + this.password = password; + this.address = address; + this.contact = contact; +} + +public AccountantBean(int id, String name, String email, String password, String address, String contact) { + super(); + this.id = id; + this.name = name; + this.email = email; + this.password = password; + this.address = address; + this.contact = contact; +} + +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getName() { + return name; +} +public void setName(String name) { + this.name = name; +} +public String getEmail() { + return email; +} +public void setEmail(String email) { + this.email = email; +} +public String getPassword() { + return password; +} +public void setPassword(String password) { + this.password = password; +} +public String getAddress() { + return address; +} +public void setAddress(String address) { + this.address = address; +} +public String getContact() { + return contact; +} +public void setContact(String contact) { + this.contact = contact; +} + +} diff --git a/Fee Management System/src/com/javatpoint/beans/StudentBean.java b/Fee Management System/src/com/javatpoint/beans/StudentBean.java new file mode 100644 index 00000000..a770e3f7 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/beans/StudentBean.java @@ -0,0 +1,101 @@ +package com.javatpoint.beans; + +public class StudentBean { +private int rollno; +private String name,email,sex,course; +private int fee,paid,due; +private String address,contact; + +public StudentBean() {} + +public StudentBean(String name, String email, String sex, String course, int fee, int paid, int due, String address, + String contact) { + super(); + this.name = name; + this.email = email; + this.sex = sex; + this.course = course; + this.fee = fee; + this.paid = paid; + this.due = due; + this.address = address; + this.contact = contact; +} + +public StudentBean(int rollno, String name, String email, String sex, String course, int fee, int paid, int due, + String address, String contact) { + super(); + this.rollno = rollno; + this.name = name; + this.email = email; + this.sex = sex; + this.course = course; + this.fee = fee; + this.paid = paid; + this.due = due; + this.address = address; + this.contact = contact; +} + +public int getRollno() { + return rollno; +} +public void setRollno(int rollno) { + this.rollno = rollno; +} +public String getName() { + return name; +} +public void setName(String name) { + this.name = name; +} +public String getEmail() { + return email; +} +public void setEmail(String email) { + this.email = email; +} +public String getSex() { + return sex; +} +public void setSex(String sex) { + this.sex = sex; +} +public String getCourse() { + return course; +} +public void setCourse(String course) { + this.course = course; +} +public int getFee() { + return fee; +} +public void setFee(int fee) { + this.fee = fee; +} +public int getPaid() { + return paid; +} +public void setPaid(int paid) { + this.paid = paid; +} +public int getDue() { + return due; +} +public void setDue(int due) { + this.due = due; +} +public String getAddress() { + return address; +} +public void setAddress(String address) { + this.address = address; +} +public String getContact() { + return contact; +} +public void setContact(String contact) { + this.contact = contact; +} + +} diff --git a/Fee Management System/src/com/javatpoint/dao/AccountantDao.java b/Fee Management System/src/com/javatpoint/dao/AccountantDao.java new file mode 100644 index 00000000..7461ab43 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/dao/AccountantDao.java @@ -0,0 +1,114 @@ +package com.javatpoint.dao; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; + +import com.javatpoint.beans.AccountantBean; +import com.javatpoint.beans.StudentBean; + +public class AccountantDao { + +public static int save(AccountantBean bean){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("insert into fee_accountant(name,email,password,address,contact) values(?,?,?,?,?)"); + ps.setString(1,bean.getName()); + ps.setString(2,bean.getEmail()); + ps.setString(3,bean.getPassword()); + ps.setString(4,bean.getAddress()); + ps.setString(5,bean.getContact()); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} +public static boolean validate(String email,String password){ + boolean status=false; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("select * from fee_accountant where email=? and password=?"); + ps.setString(1,email); + ps.setString(2,password); + ResultSet rs=ps.executeQuery(); + status=rs.next(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} +public static int update(AccountantBean bean){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("update fee_accountant set name=?,email=?,password=?,address=?,contact=? where id=?"); + ps.setString(1,bean.getName()); + ps.setString(2,bean.getEmail()); + ps.setString(3,bean.getPassword()); + ps.setString(4,bean.getAddress()); + ps.setString(5,bean.getContact()); + ps.setInt(6,bean.getId()); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} + +public static int delete(int id){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("delete from fee_accountant where id=?"); + ps.setInt(1,id); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} + +public static List<AccountantBean> getAllRecords(){ + List<AccountantBean> list=new ArrayList<AccountantBean>(); + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("select * from fee_accountant"); + ResultSet rs=ps.executeQuery(); + while(rs.next()){ + AccountantBean bean=new AccountantBean(); + bean.setId(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setEmail(rs.getString(3)); + bean.setPassword(rs.getString(4)); + bean.setAddress(rs.getString(5)); + bean.setContact(rs.getString(6)); + list.add(bean); + } + con.close(); + }catch(Exception ex){System.out.println(ex);} + + return list; +} + +public static AccountantBean getRecordById(int id){ + AccountantBean bean=new AccountantBean(); + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("select * from fee_accountant where id=?"); + ps.setInt(1,id); + ResultSet rs=ps.executeQuery(); + while(rs.next()){ + bean.setId(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setEmail(rs.getString(3)); + bean.setPassword(rs.getString(4)); + bean.setAddress(rs.getString(5)); + bean.setContact(rs.getString(6)); + } + con.close(); + }catch(Exception ex){System.out.println(ex);} + + return bean; +} +} diff --git a/Fee Management System/src/com/javatpoint/dao/DB.java b/Fee Management System/src/com/javatpoint/dao/DB.java new file mode 100644 index 00000000..7da3713d --- /dev/null +++ b/Fee Management System/src/com/javatpoint/dao/DB.java @@ -0,0 +1,12 @@ +package com.javatpoint.dao; +import java.sql.*; +public class DB { +public static Connection getCon(){ + Connection con=null; + try{ + Class.forName("oracle.jdbc.driver.OracleDriver"); + con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","oracle"); + }catch(Exception ex){System.out.println(ex);} + return con; +} +} diff --git a/Fee Management System/src/com/javatpoint/dao/StudentDao.java b/Fee Management System/src/com/javatpoint/dao/StudentDao.java new file mode 100644 index 00000000..8b9cc2df --- /dev/null +++ b/Fee Management System/src/com/javatpoint/dao/StudentDao.java @@ -0,0 +1,147 @@ +package com.javatpoint.dao; + +import com.javatpoint.beans.StudentBean; +import java.sql.*; +import java.util.ArrayList; +import java.util.List; +public class StudentDao { + +public static int save(StudentBean bean){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("insert into fee_student(name,email,sex,course,fee,paid,due,address,contact) values(?,?,?,?,?,?,?,?,?)"); + ps.setString(1,bean.getName()); + ps.setString(2,bean.getEmail()); + ps.setString(3,bean.getSex()); + ps.setString(4,bean.getCourse()); + ps.setInt(5,bean.getFee()); + ps.setInt(6,bean.getPaid()); + ps.setInt(7,bean.getDue()); + ps.setString(8,bean.getAddress()); + ps.setString(9,bean.getContact()); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} +public static int update(StudentBean bean){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("update fee_student set name=?,email=?,sex=?,course=?,fee=?,paid=?,due=?,address=?,contact=? where rollno=?"); + ps.setString(1,bean.getName()); + ps.setString(2,bean.getEmail()); + ps.setString(3,bean.getSex()); + ps.setString(4,bean.getCourse()); + ps.setInt(5,bean.getFee()); + ps.setInt(6,bean.getPaid()); + ps.setInt(7,bean.getDue()); + ps.setString(8,bean.getAddress()); + ps.setString(9,bean.getContact()); + ps.setInt(10,bean.getRollno()); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} +public static int delete(int rollno){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("delete from fee_student where rollno=?"); + ps.setInt(1,rollno); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} +public static int deleteByName(String name){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("delete from student where name=?"); + ps.setString(1,name); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} + +public static List<StudentBean> getAllRecords(){ + List<StudentBean> list=new ArrayList<StudentBean>(); + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("select * from fee_student"); + ResultSet rs=ps.executeQuery(); + while(rs.next()){ + StudentBean bean=new StudentBean(); + bean.setRollno(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setEmail(rs.getString(3)); + bean.setSex(rs.getString(4)); + bean.setCourse(rs.getString(5)); + bean.setFee(rs.getInt(6)); + bean.setPaid(rs.getInt(7)); + bean.setDue(rs.getInt(8)); + bean.setAddress(rs.getString(9)); + bean.setContact(rs.getString(10)); + list.add(bean); + } + con.close(); + }catch(Exception ex){System.out.println(ex);} + + return list; +} +public static List<StudentBean> getDues(){ + List<StudentBean> list=new ArrayList<StudentBean>(); + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("select * from fee_student where due>0"); + ResultSet rs=ps.executeQuery(); + while(rs.next()){ + StudentBean bean=new StudentBean(); + bean.setRollno(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setEmail(rs.getString(3)); + bean.setSex(rs.getString(4)); + bean.setCourse(rs.getString(5)); + bean.setFee(rs.getInt(6)); + bean.setPaid(rs.getInt(7)); + bean.setDue(rs.getInt(8)); + bean.setAddress(rs.getString(9)); + bean.setContact(rs.getString(10)); + list.add(bean); + } + con.close(); + }catch(Exception ex){System.out.println(ex);} + + return list; +} + +public static StudentBean getRecordByRollno(int rollno){ + StudentBean bean=new StudentBean(); + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("select * from fee_student where rollno=?"); + ps.setInt(1,rollno); + ResultSet rs=ps.executeQuery(); + while(rs.next()){ + bean.setRollno(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setEmail(rs.getString(3)); + bean.setSex(rs.getString(4)); + bean.setCourse(rs.getString(5)); + bean.setFee(rs.getInt(6)); + bean.setPaid(rs.getInt(7)); + bean.setDue(rs.getInt(8)); + bean.setAddress(rs.getString(9)); + bean.setContact(rs.getString(10)); + } + con.close(); + }catch(Exception ex){System.out.println(ex);} + + return bean; +} + +} \ No newline at end of file diff --git a/Fee Management System/src/com/javatpoint/servlets/AccountantLogin.java b/Fee Management System/src/com/javatpoint/servlets/AccountantLogin.java new file mode 100644 index 00000000..90e748fd --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/AccountantLogin.java @@ -0,0 +1,57 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.javatpoint.dao.AccountantDao; +@WebServlet("/AccountantLogin") +public class AccountantLogin extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Accountant Panel</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + + String email=request.getParameter("email"); + String password=request.getParameter("password"); + boolean status=AccountantDao.validate(email, password); + if(status){ + HttpSession session=request.getSession(); + session.setAttribute("accountant","true"); + request.getRequestDispatcher("accountanthome.html").include(request, response); + }else{ + out.println("<h1>Accountant Login Form</h1>"); + out.println("<p>Sorry, username or password error!</p>"); + request.getRequestDispatcher("AccountantLoginForm.html").include(request, response); + } + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + doPost(req, resp); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/AddAccountant.java b/Fee Management System/src/com/javatpoint/servlets/AddAccountant.java new file mode 100644 index 00000000..c9cf3f94 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/AddAccountant.java @@ -0,0 +1,54 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.AccountantBean; +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.AccountantDao; +import com.javatpoint.dao.StudentDao; + +@WebServlet("/AddAccountant") +public class AddAccountant extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Accountant Added</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navadmin.html").include(request, response); + out.println("<div class='container'>"); + + String name=request.getParameter("name"); + String email=request.getParameter("email"); + String password=request.getParameter("password"); + String address=request.getParameter("address"); + String contact=request.getParameter("contact"); + + AccountantBean bean=new AccountantBean(name, email, password, address, contact); + int status=AccountantDao.save(bean); + + out.print("<h1>Add Accountant Form</h1>"); + out.println("<p>Accountant is added successfully!</p>"); + request.getRequestDispatcher("AddAccountantForm.html").include(request, response); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/AddAccountantForm.java b/Fee Management System/src/com/javatpoint/servlets/AddAccountantForm.java new file mode 100644 index 00000000..9172e63a --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/AddAccountantForm.java @@ -0,0 +1,49 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +@WebServlet("/AddAccountantForm") +public class AddAccountantForm extends HttpServlet { + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>View Accountant</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navadmin.html").include(request, response); + out.println("<div class='container'>"); + + + HttpSession session=request.getSession(false); + + if(session==null||session.getAttribute("admin")==null){ + out.println("<h1>Not Admin!</h1>"); + request.getRequestDispatcher("AdminLoginForm.html").include(request, response); + }else{ + out.println("<h1>Add Accountant Form</h1>"); + request.getRequestDispatcher("AddAccountantForm.html").include(request, response); + } + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/AddStudent.java b/Fee Management System/src/com/javatpoint/servlets/AddStudent.java new file mode 100644 index 00000000..670af53b --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/AddStudent.java @@ -0,0 +1,56 @@ + +package com.javatpoint.servlets; +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; + +import java.sql.*; +@WebServlet("/AddStudent") +public class AddStudent extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + String name=request.getParameter("name"); + String email=request.getParameter("email"); + String sex=request.getParameter("sex"); + String course=request.getParameter("course"); + int fee=Integer.parseInt(request.getParameter("fee")); + int paid=Integer.parseInt(request.getParameter("paid")); + int due=Integer.parseInt(request.getParameter("due")); + String address=request.getParameter("address"); + String contact=request.getParameter("contact"); + + StudentBean bean=new StudentBean(name, email, sex, course, fee, paid, due, address, contact); + int status=StudentDao.save(bean); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Add Student</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + out.println("Student is added successfully!"); + + request.getRequestDispatcher("AddStudentForm.html").include(request, response); + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/AddStudentForm.java b/Fee Management System/src/com/javatpoint/servlets/AddStudentForm.java new file mode 100644 index 00000000..9974f1cf --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/AddStudentForm.java @@ -0,0 +1,47 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +@WebServlet("/AddStudentForm") +public class AddStudentForm extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Add Student</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + + HttpSession session=request.getSession(false); + + if(session==null||session.getAttribute("accountant")==null){ + out.println("<h1>Not Accountant!</h1>"); + request.getRequestDispatcher("AccountantLoginForm.html").include(request, response); + }else{ + request.getRequestDispatcher("AddStudentForm.html").include(request, response); + } + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/AdminLogin.java b/Fee Management System/src/com/javatpoint/servlets/AdminLogin.java new file mode 100644 index 00000000..63c25509 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/AdminLogin.java @@ -0,0 +1,51 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +@WebServlet("/AdminLogin") +public class AdminLogin extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Admin Panel</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navadmin.html").include(request, response); + + String email=request.getParameter("email"); + String password=request.getParameter("password"); + if(email.equals("admin@feereport.com")&&password.equals("admin123")){ + HttpSession session=request.getSession(); + session.setAttribute("admin","true"); + request.getRequestDispatcher("adminhome.html").include(request, response); + }else{ + out.println("<p>Sorry, username or password error!</p>"); + request.getRequestDispatcher("AdminLoginForm.html").include(request, response); + } + + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + doPost(req, resp); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/DeleteAccountant.java b/Fee Management System/src/com/javatpoint/servlets/DeleteAccountant.java new file mode 100644 index 00000000..d0f78683 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/DeleteAccountant.java @@ -0,0 +1,20 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.dao.AccountantDao; +import com.javatpoint.dao.StudentDao; +@WebServlet("/DeleteAccountant") +public class DeleteAccountant extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + String sid=request.getParameter("id"); + int id=Integer.parseInt(sid); + AccountantDao.delete(id); + response.sendRedirect("ViewAccountant"); + } +} diff --git a/Fee Management System/src/com/javatpoint/servlets/DeleteStudent.java b/Fee Management System/src/com/javatpoint/servlets/DeleteStudent.java new file mode 100644 index 00000000..1b66858f --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/DeleteStudent.java @@ -0,0 +1,19 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.dao.StudentDao; +@WebServlet("/DeleteStudent") +public class DeleteStudent extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + String srollno=request.getParameter("rollno"); + int rollno=Integer.parseInt(srollno); + StudentDao.delete(rollno); + response.sendRedirect("ViewStudent"); + } +} diff --git a/Fee Management System/src/com/javatpoint/servlets/DueFee.java b/Fee Management System/src/com/javatpoint/servlets/DueFee.java new file mode 100644 index 00000000..6006cc3f --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/DueFee.java @@ -0,0 +1,52 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; +@WebServlet("/DueFee") +public class DueFee extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>View Student</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + out.print("<h1>Due Fee</h1>"); + + + List<StudentBean> list=StudentDao.getDues(); + out.println("<table class='table table-bordered table-striped'>"); + out.print("<tr><th>Rollno</th><th>Name</th><th>Email</th><th>Sex</th><th>Course</th><th>Fee</th><th>paid</th><th>due</th><th>address</th><th>contact</th><th>Edit</th><th>Delete</th>"); + for(StudentBean bean:list){ + out.print("<tr><td>"+bean.getRollno()+"</td><td>"+bean.getName()+"</td><td>"+bean.getEmail()+"</td><td>"+bean.getSex()+"</td><td>"+bean.getCourse()+"</td><td>"+bean.getFee()+"</td><td>"+bean.getPaid()+"</td><td>"+bean.getDue()+"</td><td>"+bean.getAddress()+"</td><td>"+bean.getContact()+"</td><td><a href='EditStudentForm?rollno="+bean.getRollno()+"'>Edit</a></td><td><a href='DeleteStudent?rollno="+bean.getRollno()+"'>Delete</a></td></tr>"); + } + out.println("</table>"); + + out.println("</table>"); + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/EditAccountant.java b/Fee Management System/src/com/javatpoint/servlets/EditAccountant.java new file mode 100644 index 00000000..7a9a1990 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/EditAccountant.java @@ -0,0 +1,36 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.AccountantBean; +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.AccountantDao; +import com.javatpoint.dao.StudentDao; +@WebServlet("/EditAccountant") +public class EditAccountant extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + int id=Integer.parseInt(request.getParameter("id")); + String name=request.getParameter("name"); + String email=request.getParameter("email"); + String password=request.getParameter("password"); + String address=request.getParameter("address"); + String contact=request.getParameter("contact"); + + AccountantBean bean=new AccountantBean(id,name, email, password, address, contact); + AccountantDao.update(bean); + response.sendRedirect("ViewAccountant"); + + out.close(); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/EditAccountantForm.java b/Fee Management System/src/com/javatpoint/servlets/EditAccountantForm.java new file mode 100644 index 00000000..dfcec23d --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/EditAccountantForm.java @@ -0,0 +1,59 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.AccountantBean; +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.AccountantDao; +import com.javatpoint.dao.StudentDao; + +@WebServlet("/EditAccountantForm") +public class EditAccountantForm extends HttpServlet { + private static final long serialVersionUID = 1L; + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + PrintWriter out=response.getWriter(); + String sid=request.getParameter("id"); + int id=Integer.parseInt(sid); + AccountantBean bean=AccountantDao.getRecordById(id); + + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Edit Accountant</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navadmin.html").include(request, response); + out.println("<div class='container'>"); + + out.print("<h1>Edit Accountant Form</h1>"); + out.print("<form action='EditAccountant' method='post'>"); + out.print("<table>"); + out.print("<tr><td><input type='hidden' name='id' value='"+bean.getId()+"' /></td></tr>"); + out.print("<tr><td>Name:</td><td><input type='text' name='name' value='"+bean.getName()+"'/></td></tr>"); + out.print("<tr><td>Email:</td><td><input type='email' name='email' value='"+bean.getEmail()+"'/></td></tr>"); + out.print("<tr><td>Password:</td><td><input type='text' name='password' value='"+bean.getPassword()+"'/></td></tr>"); + out.print("<tr><td>Address:</td><td><textarea name='address' style='width:300px;height:100px;'>"+bean.getAddress()+"</textarea></td></tr>"); + out.print("<tr><td>Contact No:</td><td><input type='text' name='contact' value='"+bean.getContact()+"'/></td></tr>"); + out.print("<tr><td colspan='2' align='center'><input type='submit' value='Update Accountant' class='btn btn-default'/></td></tr>"); + out.print("</table>"); + out.print("</form>"); + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + + out.close(); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/EditStudent.java b/Fee Management System/src/com/javatpoint/servlets/EditStudent.java new file mode 100644 index 00000000..a7dc6434 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/EditStudent.java @@ -0,0 +1,38 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; +@WebServlet("/EditStudent") +public class EditStudent extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + int rollno=Integer.parseInt(request.getParameter("rollno")); + String name=request.getParameter("name"); + String email=request.getParameter("email"); + String sex=request.getParameter("sex"); + String course=request.getParameter("course"); + int fee=Integer.parseInt(request.getParameter("fee")); + int paid=Integer.parseInt(request.getParameter("paid")); + int due=Integer.parseInt(request.getParameter("due")); + String address=request.getParameter("address"); + String contact=request.getParameter("contact"); + + StudentBean bean=new StudentBean(rollno,name, email, sex, course, fee, paid, due, address, contact); + int status=StudentDao.update(bean); + response.sendRedirect("ViewStudent"); + + out.close(); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/EditStudentForm.java b/Fee Management System/src/com/javatpoint/servlets/EditStudentForm.java new file mode 100644 index 00000000..b39a9972 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/EditStudentForm.java @@ -0,0 +1,58 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; +@WebServlet("/EditStudentForm") +public class EditStudentForm extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + PrintWriter out=response.getWriter(); + String srollno=request.getParameter("rollno"); + int rollno=Integer.parseInt(srollno); + StudentBean bean=StudentDao.getRecordByRollno(rollno); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Edit Student Form</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + out.print("<h1>Edit Student Form</h1>"); + out.print("<form action='EditStudent' method='post'>"); + out.print("<table>"); + out.print("<tr><td><input type='hidden' name='rollno' value='"+bean.getRollno()+"'/></td></tr>"); + out.print("<tr><td>Name:</td><td><input type='text' name='name' value='"+bean.getName()+"'/></td></tr>"); + out.print("<tr><td>Email:</td><td><input type='email' name='email' value='"+bean.getEmail()+"'/></td></tr>"); + out.print("<tr><td>Sex:</td><td><input type='text' name='sex' value='"+bean.getSex()+"'/></td></tr>"); + out.print("<tr><td>Course:</td><td><input type='text' name='course' value='"+bean.getCourse()+"'/></td></tr>"); + out.print("<tr><td>Fee:</td><td><input type='number' name='fee' value='"+bean.getFee()+"'/></td></tr>"); + out.print("<tr><td>Paid:</td><td><input type='number' name='paid' value='"+bean.getPaid()+"'/></td></tr>"); + out.print("<tr><td>Due:</td><td><input type='number' name='due' value='"+bean.getDue()+"'/></td></tr>"); + out.print("<tr><td>Address:</td><td><textarea name='address' style='width:300px;height:100px;'>"+bean.getAddress()+"</textarea></td></tr>"); + out.print("<tr><td>Contact No:</td><td><input type='text' name='contact' value='"+bean.getContact()+"'/></td></tr>"); + out.print("<tr><td colspan='2' align='center'><input type='submit' value='Update Student'/></td></tr>"); + out.print("</table>"); + out.print("</form>"); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/LogoutAccountant.java b/Fee Management System/src/com/javatpoint/servlets/LogoutAccountant.java new file mode 100644 index 00000000..2808f788 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/LogoutAccountant.java @@ -0,0 +1,41 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +@WebServlet("/LogoutAccountant") +public class LogoutAccountant extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Logout Accountant</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navhome.html").include(request, response); + out.println("<div class='container'>"); + + out.println("<h1>Accountant Logout Success</h1>"); + HttpSession session=request.getSession(); + session.invalidate(); + request.getRequestDispatcher("AccountantLoginForm.html").include(request, response); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } +} diff --git a/Fee Management System/src/com/javatpoint/servlets/LogoutAdmin.java b/Fee Management System/src/com/javatpoint/servlets/LogoutAdmin.java new file mode 100644 index 00000000..0129e889 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/LogoutAdmin.java @@ -0,0 +1,42 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +@WebServlet("/LogoutAdmin") +public class LogoutAdmin extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Admin Logout</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navhome.html").include(request, response); + out.println("<div class='container'>"); + + out.println("<h1>Admin Logout Success</h1>"); + HttpSession session=request.getSession(); + session.invalidate(); + request.getRequestDispatcher("AdminLoginForm.html").include(request, response); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee Management System/src/com/javatpoint/servlets/SearchStudent.java b/Fee Management System/src/com/javatpoint/servlets/SearchStudent.java new file mode 100644 index 00000000..2f3a5435 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/SearchStudent.java @@ -0,0 +1,56 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; +@WebServlet("/SearchStudent") +public class SearchStudent extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + String srollno=request.getParameter("rollno"); + int rollno=Integer.parseInt(srollno); + StudentBean bean=StudentDao.getRecordByRollno(rollno); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Search Student</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + + out.println("<h1>Search Student</h1>"); + + if(bean.getRollno()>0){ + out.println("<table class='table table-bordered table-striped'>"); + out.print("<tr><td>Rollno:</td><td>"+bean.getRollno()+"</td></tr>"); + out.print("<tr><td>Name:</td><td>"+bean.getName()+"</td></tr>"); + out.print("<tr><td>Email:</td><td>"+bean.getEmail()+"</td></tr>"); + out.print("<tr><td>Sex:</td><td>"+bean.getSex()+"</td></tr>"); + out.print("<tr><td>Course:</td><td>"+bean.getCourse()+"</td></tr>"); + out.print("<tr><td>Fee:</td><td>"+bean.getFee()+"</td></tr>"); + out.print("</table>"); + }else{ + out.println("<p>Sorry, No Record found for "+rollno+"</p>"); + } + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } +} diff --git a/Fee Management System/src/com/javatpoint/servlets/SearchStudentForm.java b/Fee Management System/src/com/javatpoint/servlets/SearchStudentForm.java new file mode 100644 index 00000000..16822d2e --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/SearchStudentForm.java @@ -0,0 +1,36 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +@WebServlet("/SearchStudentForm") +public class SearchStudentForm extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Search Student Form</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + request.getRequestDispatcher("SearchStudentForm.html").include(request, response); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } +} diff --git a/Fee Management System/src/com/javatpoint/servlets/ViewAccountant.java b/Fee Management System/src/com/javatpoint/servlets/ViewAccountant.java new file mode 100644 index 00000000..89b90e03 --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/ViewAccountant.java @@ -0,0 +1,49 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.AccountantBean; +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.AccountantDao; +import com.javatpoint.dao.StudentDao; +@WebServlet("/ViewAccountant") +public class ViewAccountant extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>View Accountant</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navadmin.html").include(request, response); + out.println("<div class='container'>"); + out.print("<h1>View Accountant</h1>"); + + List<AccountantBean> list=AccountantDao.getAllRecords(); + out.println("<table class='table table-bordered table-striped'>"); + out.print("<tr><th>Id</th><th>Name</th><th>Email</th><th>Password</th><th>address</th><th>contact</th><th>Edit</th><th>Delete</th>"); + for(AccountantBean bean:list){ + out.print("<tr><td>"+bean.getId()+"</td><td>"+bean.getName()+"</td><td>"+bean.getEmail()+"</td><td>"+bean.getPassword()+"</td><td>"+bean.getAddress()+"</td><td>"+bean.getContact()+"</td><td><a href='EditAccountantForm?id="+bean.getId()+"'>Edit</a></td><td><a href='DeleteAccountant?id="+bean.getId()+"'>Delete</a></td></tr>"); + } + out.println("</table>"); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } +} diff --git a/Fee Management System/src/com/javatpoint/servlets/ViewStudent.java b/Fee Management System/src/com/javatpoint/servlets/ViewStudent.java new file mode 100644 index 00000000..d4e74aad --- /dev/null +++ b/Fee Management System/src/com/javatpoint/servlets/ViewStudent.java @@ -0,0 +1,48 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; +@WebServlet("/ViewStudent") +public class ViewStudent extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>View Student</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + out.print("<h1>View Students</h1>"); + + List<StudentBean> list=StudentDao.getAllRecords(); + out.println("<table class='table table-bordered table-striped'>"); + out.print("<tr><th>Rollno</th><th>Name</th><th>Email</th><th>Sex</th><th>Course</th><th>Fee</th><th>paid</th><th>due</th><th>address</th><th>contact</th><th>Edit</th><th>Delete</th>"); + for(StudentBean bean:list){ + out.print("<tr><td>"+bean.getRollno()+"</td><td>"+bean.getName()+"</td><td>"+bean.getEmail()+"</td><td>"+bean.getSex()+"</td><td>"+bean.getCourse()+"</td><td>"+bean.getFee()+"</td><td>"+bean.getPaid()+"</td><td>"+bean.getDue()+"</td><td>"+bean.getAddress()+"</td><td>"+bean.getContact()+"</td><td><a href='EditStudentForm?rollno="+bean.getRollno()+"'>Edit</a></td><td><a href='DeleteStudent?rollno="+bean.getRollno()+"'>Delete</a></td></tr>"); + } + out.println("</table>"); + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee-Management-System/.DS_Store b/Fee-Management-System/.DS_Store new file mode 100644 index 00000000..664e21ac Binary files /dev/null and b/Fee-Management-System/.DS_Store differ diff --git a/Fee-Management-System/README.md b/Fee-Management-System/README.md new file mode 100644 index 00000000..716fbed0 --- /dev/null +++ b/Fee-Management-System/README.md @@ -0,0 +1 @@ +Complete Fee Management System with many features. diff --git a/Fee-Management-System/WebContent/AccountantLoginForm.html b/Fee-Management-System/WebContent/AccountantLoginForm.html new file mode 100644 index 00000000..5ba3a8a7 --- /dev/null +++ b/Fee-Management-System/WebContent/AccountantLoginForm.html @@ -0,0 +1,7 @@ +<form action="AccountantLogin" method="post"> +<table> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Password:</td><td><input type="password" name="password" required/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" value="Login"/></td></tr> +</table> +</form> \ No newline at end of file diff --git a/Fee-Management-System/WebContent/AddAccountantForm.html b/Fee-Management-System/WebContent/AddAccountantForm.html new file mode 100644 index 00000000..1347c722 --- /dev/null +++ b/Fee-Management-System/WebContent/AddAccountantForm.html @@ -0,0 +1,10 @@ +<form action="AddAccountant" method="post"> +<table> +<tr><td>Name:</td><td><input type="text" name="name" required/></td></tr> +<tr><td>Password:</td><td><input type="password" name="password" required/></td></tr> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Address:</td><td><textarea name="address" style="width:300px; height:100px;"></textarea></td></tr> +<tr><td>Contact:</td><td><input type="text" name="contact"/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" value="Add Accountant"/></td></tr> +</table> +</form> \ No newline at end of file diff --git a/Fee-Management-System/WebContent/AddStudentForm.html b/Fee-Management-System/WebContent/AddStudentForm.html new file mode 100644 index 00000000..f5865363 --- /dev/null +++ b/Fee-Management-System/WebContent/AddStudentForm.html @@ -0,0 +1,27 @@ +<h1>Add Student Form</h1> +<form action="AddStudent" method="post"> +<table> +<tr><td>Name:</td><td><input type="text" name="name" required/></td></tr> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Sex:</td><td> +<input type="radio" name="sex" value="male"/> Male +<input type="radio" name="sex" value="female"/> Female +</td></tr> +<tr><td>Course:</td><td> +<select name="course"> +<option>Java</option> +<option>.Net</option> +<option>PHP</option> +<option>Android</option> +<option>Hadoop</option> +<option>Selenium</option> +</select> +</td></tr> +<tr><td>Fee:</td><td><input type="number" name="fee"/></td></tr> +<tr><td>Paid:</td><td><input type="number" name="paid"/></td></tr> +<tr><td>Due:</td><td><input type="number" name="due"/></td></tr> +<tr><td>Address:</td><td><textarea name="address" style="width:300px;height:100px;"></textarea></td></tr> +<tr><td>Contact No:</td><td><input type="text" name="contact"/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" class="btn btn-default" value="Save Student"/></td></tr> +</table> +</form> diff --git a/Fee-Management-System/WebContent/AdminLoginForm.html b/Fee-Management-System/WebContent/AdminLoginForm.html new file mode 100644 index 00000000..6c7bedb7 --- /dev/null +++ b/Fee-Management-System/WebContent/AdminLoginForm.html @@ -0,0 +1,7 @@ +<form action="AdminLogin" method="post"> +<table> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Password:</td><td><input type="password" name="password" required/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" value="Login"/></td></tr> +</table> +</form> \ No newline at end of file diff --git a/Fee-Management-System/WebContent/META-INF/MANIFEST.MF b/Fee-Management-System/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/Fee-Management-System/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/Fee-Management-System/WebContent/SearchStudentForm.html b/Fee-Management-System/WebContent/SearchStudentForm.html new file mode 100644 index 00000000..4380a724 --- /dev/null +++ b/Fee-Management-System/WebContent/SearchStudentForm.html @@ -0,0 +1,7 @@ +<h1>Search Student Form</h1> +<form action="SearchStudent" method="post"> +<table> +<tr><td>Rollno:</td><td><input type="number" name="rollno" required/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" value="Search Student"/></td></tr> +</table> +</form> \ No newline at end of file diff --git a/Fee-Management-System/WebContent/accountanthome.html b/Fee-Management-System/WebContent/accountanthome.html new file mode 100644 index 00000000..a3c62a0a --- /dev/null +++ b/Fee-Management-System/WebContent/accountanthome.html @@ -0,0 +1,23 @@ +<div id="myCarousel" class="carousel slide" data-ride="carousel"> + <!-- Indicators --> + <ol class="carousel-indicators"> + <li data-target="#myCarousel" data-slide-to="0" class="active"></li> + <li data-target="#myCarousel" data-slide-to="1"></li> + <li data-target="#myCarousel" data-slide-to="2"></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item active"> + <img src="resources/images/accountant3.jpeg" alt="baby 3" > + </div> + + <div class="item"> + <img src="resources/images/accountant2.jpg" alt="baby 2" > + </div> + <div class="item"> + <img src="resources/images/accountant1.jpg" alt="baby 1" > + </div> + + </div> +</div><!-- corousel end --> \ No newline at end of file diff --git a/Fee-Management-System/WebContent/adminhome.html b/Fee-Management-System/WebContent/adminhome.html new file mode 100644 index 00000000..bdc4940d --- /dev/null +++ b/Fee-Management-System/WebContent/adminhome.html @@ -0,0 +1,23 @@ +<div id="myCarousel" class="carousel slide" data-ride="carousel"> + <!-- Indicators --> + <ol class="carousel-indicators"> + <li data-target="#myCarousel" data-slide-to="0" class="active"></li> + <li data-target="#myCarousel" data-slide-to="1"></li> + <li data-target="#myCarousel" data-slide-to="2"></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item active"> + <img src="resources/images/admin1.jpg" alt="baby 1" > + </div> + + <div class="item"> + <img src="resources/images/admin2.jpg" alt="baby 2" > + </div> + + <div class="item"> + <img src="resources/images/admin3.jpg" alt="baby 3" > + </div> + </div> +</div><!-- corousel end --> \ No newline at end of file diff --git a/Fee-Management-System/WebContent/db.sql b/Fee-Management-System/WebContent/db.sql new file mode 100644 index 00000000..25ec89ec --- /dev/null +++ b/Fee-Management-System/WebContent/db.sql @@ -0,0 +1,25 @@ +CREATE TABLE "FEE_STUDENT" + ("ROLLNO" VARCHAR2(4000), + "NAME" VARCHAR2(4000), + "EMAIL" VARCHAR2(4000), + "SEX" VARCHAR2(4000), + "COURSE" VARCHAR2(4000), + "FEE" NUMBER, + "PAID" NUMBER, + "DUE" NUMBER, + "ADDRESS" VARCHAR2(4000), + "CONTACT" VARCHAR2(4000), + CONSTRAINT "FEE_STUDENT_PK" PRIMARY KEY ("ROLLNO") ENABLE + ) +/ + +CREATE TABLE "FEE_ACCOUNTANT" + ( "ID" NUMBER, + "NAME" VARCHAR2(4000), + "EMAIL" VARCHAR2(4000), + "PASSWORD" VARCHAR2(4000), + "ADDRESS" VARCHAR2(4000), + "CONTACT" VARCHAR2(4000), + CONSTRAINT "FEE_ACCOUNTANT_PK" PRIMARY KEY ("ID") ENABLE + ) +/ \ No newline at end of file diff --git a/Fee-Management-System/WebContent/footer.html b/Fee-Management-System/WebContent/footer.html new file mode 100644 index 00000000..737ab645 --- /dev/null +++ b/Fee-Management-System/WebContent/footer.html @@ -0,0 +1,5 @@ +<div class="container-fluid footer"> +<p>©Copyright 2017. JavaTpoint.com</p> +</div> + <script src="resources/jquery.min.js"></script> + <script src="resources/bootstrap.min.js"></script> diff --git a/Fee-Management-System/WebContent/index.html b/Fee-Management-System/WebContent/index.html new file mode 100644 index 00000000..83081af6 --- /dev/null +++ b/Fee-Management-System/WebContent/index.html @@ -0,0 +1,67 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="ISO-8859-1"> +<title>Fee Report</title> +<link rel="stylesheet" href="resources/bootstrap.min.css"/> +<link rel="stylesheet" href="style.css"/> +</head> +<body> + +<nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html">FeeReport</a> + </div> + + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li><a href="index.html">Home</a></li> + </ul> + + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> +</nav> + +<div class="container"> +<div class="row"> +<div class="col-md-6"> +<h2>Admin Login Form</h2> +<form action="AdminLogin" method="post"> +<table> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Password:</td><td><input type="password" name="password" required/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" class="btn btn-default" value="Login"/></td></tr> +</table> +</form> +</div> + +<div class="col-md-6"> +<h2>Accountant Login Form</h2> +<form action="AccountantLogin" method="post"> +<table> +<tr><td>Email:</td><td><input type="email" name="email" required/></td></tr> +<tr><td>Password:</td><td><input type="password" name="password" required/></td></tr> +<tr><td colspan="2" align="center"><input type="submit" class="btn btn-default" value="Login"/></td></tr> +</table> +</form> +</div> +</div> + +</div> + +<div class="container-fluid footer"> +<p>©Copyright 2017. JavaTpoint.com</p> +</div> + <script src="resources/jquery.min.js"></script> + <script src="resources/bootstrap.min.js"></script> +</body> +</html> \ No newline at end of file diff --git a/Fee-Management-System/WebContent/navaccountant.html b/Fee-Management-System/WebContent/navaccountant.html new file mode 100644 index 00000000..5dc2e149 --- /dev/null +++ b/Fee-Management-System/WebContent/navaccountant.html @@ -0,0 +1,27 @@ +<nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html">FeeReport</a> + </div> + + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li><a href="index.html">Home</a></li> + <li><a href="AddStudentForm">Add Student</a></li> + <li><a href="ViewStudent">View Student</a></li> + <li><a href="DueFee">Due Fee</a></li> + <li><a href="SearchStudentForm">Search Student</a></li> + <li><a href="LogoutAccountant">Logout</a></li> + </ul> + + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> +</nav> \ No newline at end of file diff --git a/Fee-Management-System/WebContent/navadmin.html b/Fee-Management-System/WebContent/navadmin.html new file mode 100644 index 00000000..57536294 --- /dev/null +++ b/Fee-Management-System/WebContent/navadmin.html @@ -0,0 +1,26 @@ +<nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html">FeeReport</a> + </div> + + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li><a href="index.html">Home</a></li> + <li><a href="AddAccountantForm">Add Accountant</a></li> + <li><a href="ViewAccountant">View Accountant</a></li> + <li><a href="LogoutAdmin">Logout</a></li> + + </ul> + + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> +</nav> \ No newline at end of file diff --git a/Fee-Management-System/WebContent/navhome.html b/Fee-Management-System/WebContent/navhome.html new file mode 100644 index 00000000..795375e4 --- /dev/null +++ b/Fee-Management-System/WebContent/navhome.html @@ -0,0 +1,22 @@ +<nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.html">FeeReport</a> + </div> + + <!-- Collect the nav links, forms, and other content for toggling --> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li><a href="index.html">Home</a></li> + </ul> + + </div><!-- /.navbar-collapse --> + </div><!-- /.container-fluid --> +</nav> \ No newline at end of file diff --git a/Fee-Management-System/WebContent/resources/bootstrap.min.css b/Fee-Management-System/WebContent/resources/bootstrap.min.css new file mode 100644 index 00000000..4cf729e4 --- /dev/null +++ b/Fee-Management-System/WebContent/resources/bootstrap.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/Fee-Management-System/WebContent/resources/bootstrap.min.js b/Fee-Management-System/WebContent/resources/bootstrap.min.js new file mode 100644 index 00000000..133aeecb --- /dev/null +++ b/Fee-Management-System/WebContent/resources/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.5 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")), +d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.5",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/Fee-Management-System/WebContent/resources/images/accountant1.jpg b/Fee-Management-System/WebContent/resources/images/accountant1.jpg new file mode 100644 index 00000000..2a2aa701 Binary files /dev/null and b/Fee-Management-System/WebContent/resources/images/accountant1.jpg differ diff --git a/Fee-Management-System/WebContent/resources/images/accountant2.jpg b/Fee-Management-System/WebContent/resources/images/accountant2.jpg new file mode 100644 index 00000000..92430832 Binary files /dev/null and b/Fee-Management-System/WebContent/resources/images/accountant2.jpg differ diff --git a/Fee-Management-System/WebContent/resources/images/accountant3.jpeg b/Fee-Management-System/WebContent/resources/images/accountant3.jpeg new file mode 100644 index 00000000..04c0cd42 Binary files /dev/null and b/Fee-Management-System/WebContent/resources/images/accountant3.jpeg differ diff --git a/Fee-Management-System/WebContent/resources/images/admin1.jpg b/Fee-Management-System/WebContent/resources/images/admin1.jpg new file mode 100644 index 00000000..5e433613 Binary files /dev/null and b/Fee-Management-System/WebContent/resources/images/admin1.jpg differ diff --git a/Fee-Management-System/WebContent/resources/images/admin2.jpg b/Fee-Management-System/WebContent/resources/images/admin2.jpg new file mode 100644 index 00000000..bce18950 Binary files /dev/null and b/Fee-Management-System/WebContent/resources/images/admin2.jpg differ diff --git a/Fee-Management-System/WebContent/resources/images/admin3.jpg b/Fee-Management-System/WebContent/resources/images/admin3.jpg new file mode 100644 index 00000000..0165efec Binary files /dev/null and b/Fee-Management-System/WebContent/resources/images/admin3.jpg differ diff --git a/Fee-Management-System/WebContent/resources/jquery.min.js b/Fee-Management-System/WebContent/resources/jquery.min.js new file mode 100644 index 00000000..f3644431 --- /dev/null +++ b/Fee-Management-System/WebContent/resources/jquery.min.js @@ -0,0 +1,6 @@ +/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; + +return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){ +return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m}); +//# sourceMappingURL=jquery.min.map \ No newline at end of file diff --git a/Fee-Management-System/WebContent/style.css b/Fee-Management-System/WebContent/style.css new file mode 100644 index 00000000..b423c5c9 --- /dev/null +++ b/Fee-Management-System/WebContent/style.css @@ -0,0 +1,6 @@ +div.box{width:35%;border:1px solid pink;margin-left:10px; padding:20px;float:left} +input,select,textarea{margin:3px;padding:5px;border-radius:2px;border:1px solid pink} +.footer{ + margin-top:100px;padding:50px;text-align:center;background:#101010;color:white; + +} \ No newline at end of file diff --git a/Fee-Management-System/build/classes/com/javatpoint/beans/AccountantBean.class b/Fee-Management-System/build/classes/com/javatpoint/beans/AccountantBean.class new file mode 100644 index 00000000..c32b37ef Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/beans/AccountantBean.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/beans/StudentBean.class b/Fee-Management-System/build/classes/com/javatpoint/beans/StudentBean.class new file mode 100644 index 00000000..706b8ada Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/beans/StudentBean.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/dao/AccountantDao.class b/Fee-Management-System/build/classes/com/javatpoint/dao/AccountantDao.class new file mode 100644 index 00000000..582d9757 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/dao/AccountantDao.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/dao/DB.class b/Fee-Management-System/build/classes/com/javatpoint/dao/DB.class new file mode 100644 index 00000000..5c8471ef Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/dao/DB.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/dao/StudentDao.class b/Fee-Management-System/build/classes/com/javatpoint/dao/StudentDao.class new file mode 100644 index 00000000..344c69f1 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/dao/StudentDao.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/AccountantLogin.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/AccountantLogin.class new file mode 100644 index 00000000..58028942 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/AccountantLogin.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/AddAccountant.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/AddAccountant.class new file mode 100644 index 00000000..792064cf Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/AddAccountant.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/AddAccountantForm.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/AddAccountantForm.class new file mode 100644 index 00000000..d5599608 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/AddAccountantForm.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/AddStudent.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/AddStudent.class new file mode 100644 index 00000000..bd79a5f4 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/AddStudent.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/AddStudentForm.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/AddStudentForm.class new file mode 100644 index 00000000..460f7eb6 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/AddStudentForm.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/AdminLogin.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/AdminLogin.class new file mode 100644 index 00000000..7c335bea Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/AdminLogin.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/DeleteAccountant.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/DeleteAccountant.class new file mode 100644 index 00000000..d7957e42 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/DeleteAccountant.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/DeleteStudent.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/DeleteStudent.class new file mode 100644 index 00000000..3e9149fc Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/DeleteStudent.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/DueFee.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/DueFee.class new file mode 100644 index 00000000..468aac9c Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/DueFee.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/EditAccountant.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/EditAccountant.class new file mode 100644 index 00000000..8fb01deb Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/EditAccountant.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/EditAccountantForm.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/EditAccountantForm.class new file mode 100644 index 00000000..8131e118 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/EditAccountantForm.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/EditStudent.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/EditStudent.class new file mode 100644 index 00000000..a8089344 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/EditStudent.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/EditStudentForm.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/EditStudentForm.class new file mode 100644 index 00000000..f9fcb046 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/EditStudentForm.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/LogoutAccountant.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/LogoutAccountant.class new file mode 100644 index 00000000..209e707d Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/LogoutAccountant.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/LogoutAdmin.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/LogoutAdmin.class new file mode 100644 index 00000000..68811246 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/LogoutAdmin.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/SearchStudent.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/SearchStudent.class new file mode 100644 index 00000000..c2ed6b31 Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/SearchStudent.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/SearchStudentForm.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/SearchStudentForm.class new file mode 100644 index 00000000..8f468c1f Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/SearchStudentForm.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/ViewAccountant.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/ViewAccountant.class new file mode 100644 index 00000000..7de8747e Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/ViewAccountant.class differ diff --git a/Fee-Management-System/build/classes/com/javatpoint/servlets/ViewStudent.class b/Fee-Management-System/build/classes/com/javatpoint/servlets/ViewStudent.class new file mode 100644 index 00000000..13b2eacb Binary files /dev/null and b/Fee-Management-System/build/classes/com/javatpoint/servlets/ViewStudent.class differ diff --git a/Fee-Management-System/src/com/javatpoint/beans/AccountantBean.java b/Fee-Management-System/src/com/javatpoint/beans/AccountantBean.java new file mode 100644 index 00000000..81b76115 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/beans/AccountantBean.java @@ -0,0 +1,68 @@ +package com.javatpoint.beans; + +public class AccountantBean { +private int id; +private String name,email,password,address,contact; + +public AccountantBean() { + super(); + // TODO Auto-generated constructor stub +} + +public AccountantBean(String name, String email, String password, String address, String contact) { + super(); + this.name = name; + this.email = email; + this.password = password; + this.address = address; + this.contact = contact; +} + +public AccountantBean(int id, String name, String email, String password, String address, String contact) { + super(); + this.id = id; + this.name = name; + this.email = email; + this.password = password; + this.address = address; + this.contact = contact; +} + +public int getId() { + return id; +} +public void setId(int id) { + this.id = id; +} +public String getName() { + return name; +} +public void setName(String name) { + this.name = name; +} +public String getEmail() { + return email; +} +public void setEmail(String email) { + this.email = email; +} +public String getPassword() { + return password; +} +public void setPassword(String password) { + this.password = password; +} +public String getAddress() { + return address; +} +public void setAddress(String address) { + this.address = address; +} +public String getContact() { + return contact; +} +public void setContact(String contact) { + this.contact = contact; +} + +} diff --git a/Fee-Management-System/src/com/javatpoint/beans/StudentBean.java b/Fee-Management-System/src/com/javatpoint/beans/StudentBean.java new file mode 100644 index 00000000..a770e3f7 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/beans/StudentBean.java @@ -0,0 +1,101 @@ +package com.javatpoint.beans; + +public class StudentBean { +private int rollno; +private String name,email,sex,course; +private int fee,paid,due; +private String address,contact; + +public StudentBean() {} + +public StudentBean(String name, String email, String sex, String course, int fee, int paid, int due, String address, + String contact) { + super(); + this.name = name; + this.email = email; + this.sex = sex; + this.course = course; + this.fee = fee; + this.paid = paid; + this.due = due; + this.address = address; + this.contact = contact; +} + +public StudentBean(int rollno, String name, String email, String sex, String course, int fee, int paid, int due, + String address, String contact) { + super(); + this.rollno = rollno; + this.name = name; + this.email = email; + this.sex = sex; + this.course = course; + this.fee = fee; + this.paid = paid; + this.due = due; + this.address = address; + this.contact = contact; +} + +public int getRollno() { + return rollno; +} +public void setRollno(int rollno) { + this.rollno = rollno; +} +public String getName() { + return name; +} +public void setName(String name) { + this.name = name; +} +public String getEmail() { + return email; +} +public void setEmail(String email) { + this.email = email; +} +public String getSex() { + return sex; +} +public void setSex(String sex) { + this.sex = sex; +} +public String getCourse() { + return course; +} +public void setCourse(String course) { + this.course = course; +} +public int getFee() { + return fee; +} +public void setFee(int fee) { + this.fee = fee; +} +public int getPaid() { + return paid; +} +public void setPaid(int paid) { + this.paid = paid; +} +public int getDue() { + return due; +} +public void setDue(int due) { + this.due = due; +} +public String getAddress() { + return address; +} +public void setAddress(String address) { + this.address = address; +} +public String getContact() { + return contact; +} +public void setContact(String contact) { + this.contact = contact; +} + +} diff --git a/Fee-Management-System/src/com/javatpoint/dao/AccountantDao.java b/Fee-Management-System/src/com/javatpoint/dao/AccountantDao.java new file mode 100644 index 00000000..4ec1308d --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/dao/AccountantDao.java @@ -0,0 +1,112 @@ +package com.javatpoint.dao; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.ArrayList; +import java.util.List; +import com.javatpoint.beans.AccountantBean; +import com.javatpoint.beans.StudentBean; + +public class AccountantDao { + + public static int save(AccountantBean bean) { + try (Connection con = DB.getCon(); + PreparedStatement ps = con.prepareStatement("INSERT INTO fee_accountant (name, email, password, address, contact) VALUES (?, ?, ?, ?, ?)")) { + ps.setString(1, bean.getName()); + ps.setString(2, bean.getEmail()); + ps.setString(3, bean.getPassword()); + ps.setString(4, bean.getAddress()); + ps.setString(5, bean.getContact()); + return ps.executeUpdate(); + } catch (Exception ex) { + ex.printStackTrace(); + return 0; + } + } + + public static boolean validate(String email, String password) { + try (Connection con = DB.getCon(); + PreparedStatement ps = con.prepareStatement("SELECT * FROM fee_accountant WHERE email=? AND password=?")) { + ps.setString(1, email); + ps.setString(2, password); + try (ResultSet rs = ps.executeQuery()) { + return rs.next(); + } + } catch (Exception ex) { + ex.printStackTrace(); + return false; + } + } + + public static int update(AccountantBean bean) { + try (Connection con = DB.getCon(); + PreparedStatement ps = con.prepareStatement("UPDATE fee_accountant SET name=?, email=?, password=?, address=?, contact=? WHERE id=?")) { + ps.setString(1, bean.getName()); + ps.setString(2, bean.getEmail()); + ps.setString(3, bean.getPassword()); + ps.setString(4, bean.getAddress()); + ps.setString(5, bean.getContact()); + ps.setInt(6, bean.getId()); + return ps.executeUpdate(); + } catch (Exception ex) { + ex.printStackTrace(); + return 0; + } + } + + public static int delete(int id) { + try (Connection con = DB.getCon(); + PreparedStatement ps = con.prepareStatement("DELETE FROM fee_accountant WHERE id=?")) { + ps.setInt(1, id); + return ps.executeUpdate(); + } catch (Exception ex) { + ex.printStackTrace(); + return 0; + } + } + + public static List<AccountantBean> getAllRecords() { + List<AccountantBean> list = new ArrayList<>(); + try (Connection con = DB.getCon(); + PreparedStatement ps = con.prepareStatement("SELECT * FROM fee_accountant"); + ResultSet rs = ps.executeQuery()) { + while (rs.next()) { + AccountantBean bean = new AccountantBean(); + bean.setId(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setEmail(rs.getString(3)); + bean.setPassword(rs.getString(4)); + bean.setAddress(rs.getString(5)); + bean.setContact(rs.getString(6)); + list.add(bean); + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return list; + } + + public static AccountantBean getRecordById(int id) { + try (Connection con = DB.getCon(); + PreparedStatement ps = con.prepareStatement("SELECT * FROM fee_accountant WHERE id=?")) { + ps.setInt(1, id); + try (ResultSet rs = ps.executeQuery()) { + if (rs.next()) { + AccountantBean bean = new AccountantBean(); + bean.setId(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setEmail(rs.getString(3)); + bean.setPassword(rs.getString(4)); + bean.setAddress(rs.getString(5)); + bean.setContact(rs.getString(6)); + return bean; + } + } + } catch (Exception ex) { + ex.printStackTrace(); + } + return null; + } +} diff --git a/Fee-Management-System/src/com/javatpoint/dao/DB.java b/Fee-Management-System/src/com/javatpoint/dao/DB.java new file mode 100644 index 00000000..7da3713d --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/dao/DB.java @@ -0,0 +1,12 @@ +package com.javatpoint.dao; +import java.sql.*; +public class DB { +public static Connection getCon(){ + Connection con=null; + try{ + Class.forName("oracle.jdbc.driver.OracleDriver"); + con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","oracle"); + }catch(Exception ex){System.out.println(ex);} + return con; +} +} diff --git a/Fee-Management-System/src/com/javatpoint/dao/StudentDao.java b/Fee-Management-System/src/com/javatpoint/dao/StudentDao.java new file mode 100644 index 00000000..8b9cc2df --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/dao/StudentDao.java @@ -0,0 +1,147 @@ +package com.javatpoint.dao; + +import com.javatpoint.beans.StudentBean; +import java.sql.*; +import java.util.ArrayList; +import java.util.List; +public class StudentDao { + +public static int save(StudentBean bean){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("insert into fee_student(name,email,sex,course,fee,paid,due,address,contact) values(?,?,?,?,?,?,?,?,?)"); + ps.setString(1,bean.getName()); + ps.setString(2,bean.getEmail()); + ps.setString(3,bean.getSex()); + ps.setString(4,bean.getCourse()); + ps.setInt(5,bean.getFee()); + ps.setInt(6,bean.getPaid()); + ps.setInt(7,bean.getDue()); + ps.setString(8,bean.getAddress()); + ps.setString(9,bean.getContact()); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} +public static int update(StudentBean bean){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("update fee_student set name=?,email=?,sex=?,course=?,fee=?,paid=?,due=?,address=?,contact=? where rollno=?"); + ps.setString(1,bean.getName()); + ps.setString(2,bean.getEmail()); + ps.setString(3,bean.getSex()); + ps.setString(4,bean.getCourse()); + ps.setInt(5,bean.getFee()); + ps.setInt(6,bean.getPaid()); + ps.setInt(7,bean.getDue()); + ps.setString(8,bean.getAddress()); + ps.setString(9,bean.getContact()); + ps.setInt(10,bean.getRollno()); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} +public static int delete(int rollno){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("delete from fee_student where rollno=?"); + ps.setInt(1,rollno); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} +public static int deleteByName(String name){ + int status=0; + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("delete from student where name=?"); + ps.setString(1,name); + status=ps.executeUpdate(); + con.close(); + }catch(Exception ex){System.out.println(ex);} + return status; +} + +public static List<StudentBean> getAllRecords(){ + List<StudentBean> list=new ArrayList<StudentBean>(); + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("select * from fee_student"); + ResultSet rs=ps.executeQuery(); + while(rs.next()){ + StudentBean bean=new StudentBean(); + bean.setRollno(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setEmail(rs.getString(3)); + bean.setSex(rs.getString(4)); + bean.setCourse(rs.getString(5)); + bean.setFee(rs.getInt(6)); + bean.setPaid(rs.getInt(7)); + bean.setDue(rs.getInt(8)); + bean.setAddress(rs.getString(9)); + bean.setContact(rs.getString(10)); + list.add(bean); + } + con.close(); + }catch(Exception ex){System.out.println(ex);} + + return list; +} +public static List<StudentBean> getDues(){ + List<StudentBean> list=new ArrayList<StudentBean>(); + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("select * from fee_student where due>0"); + ResultSet rs=ps.executeQuery(); + while(rs.next()){ + StudentBean bean=new StudentBean(); + bean.setRollno(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setEmail(rs.getString(3)); + bean.setSex(rs.getString(4)); + bean.setCourse(rs.getString(5)); + bean.setFee(rs.getInt(6)); + bean.setPaid(rs.getInt(7)); + bean.setDue(rs.getInt(8)); + bean.setAddress(rs.getString(9)); + bean.setContact(rs.getString(10)); + list.add(bean); + } + con.close(); + }catch(Exception ex){System.out.println(ex);} + + return list; +} + +public static StudentBean getRecordByRollno(int rollno){ + StudentBean bean=new StudentBean(); + try{ + Connection con=DB.getCon(); + PreparedStatement ps=con.prepareStatement("select * from fee_student where rollno=?"); + ps.setInt(1,rollno); + ResultSet rs=ps.executeQuery(); + while(rs.next()){ + bean.setRollno(rs.getInt(1)); + bean.setName(rs.getString(2)); + bean.setEmail(rs.getString(3)); + bean.setSex(rs.getString(4)); + bean.setCourse(rs.getString(5)); + bean.setFee(rs.getInt(6)); + bean.setPaid(rs.getInt(7)); + bean.setDue(rs.getInt(8)); + bean.setAddress(rs.getString(9)); + bean.setContact(rs.getString(10)); + } + con.close(); + }catch(Exception ex){System.out.println(ex);} + + return bean; +} + +} \ No newline at end of file diff --git a/Fee-Management-System/src/com/javatpoint/servlets/AccountantLogin.java b/Fee-Management-System/src/com/javatpoint/servlets/AccountantLogin.java new file mode 100644 index 00000000..90e748fd --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/AccountantLogin.java @@ -0,0 +1,57 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + +import com.javatpoint.dao.AccountantDao; +@WebServlet("/AccountantLogin") +public class AccountantLogin extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Accountant Panel</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + + String email=request.getParameter("email"); + String password=request.getParameter("password"); + boolean status=AccountantDao.validate(email, password); + if(status){ + HttpSession session=request.getSession(); + session.setAttribute("accountant","true"); + request.getRequestDispatcher("accountanthome.html").include(request, response); + }else{ + out.println("<h1>Accountant Login Form</h1>"); + out.println("<p>Sorry, username or password error!</p>"); + request.getRequestDispatcher("AccountantLoginForm.html").include(request, response); + } + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + doPost(req, resp); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/AddAccountant.java b/Fee-Management-System/src/com/javatpoint/servlets/AddAccountant.java new file mode 100644 index 00000000..c9cf3f94 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/AddAccountant.java @@ -0,0 +1,54 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.AccountantBean; +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.AccountantDao; +import com.javatpoint.dao.StudentDao; + +@WebServlet("/AddAccountant") +public class AddAccountant extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Accountant Added</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navadmin.html").include(request, response); + out.println("<div class='container'>"); + + String name=request.getParameter("name"); + String email=request.getParameter("email"); + String password=request.getParameter("password"); + String address=request.getParameter("address"); + String contact=request.getParameter("contact"); + + AccountantBean bean=new AccountantBean(name, email, password, address, contact); + int status=AccountantDao.save(bean); + + out.print("<h1>Add Accountant Form</h1>"); + out.println("<p>Accountant is added successfully!</p>"); + request.getRequestDispatcher("AddAccountantForm.html").include(request, response); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/AddAccountantForm.java b/Fee-Management-System/src/com/javatpoint/servlets/AddAccountantForm.java new file mode 100644 index 00000000..9172e63a --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/AddAccountantForm.java @@ -0,0 +1,49 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +@WebServlet("/AddAccountantForm") +public class AddAccountantForm extends HttpServlet { + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>View Accountant</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navadmin.html").include(request, response); + out.println("<div class='container'>"); + + + HttpSession session=request.getSession(false); + + if(session==null||session.getAttribute("admin")==null){ + out.println("<h1>Not Admin!</h1>"); + request.getRequestDispatcher("AdminLoginForm.html").include(request, response); + }else{ + out.println("<h1>Add Accountant Form</h1>"); + request.getRequestDispatcher("AddAccountantForm.html").include(request, response); + } + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/AddStudent.java b/Fee-Management-System/src/com/javatpoint/servlets/AddStudent.java new file mode 100644 index 00000000..670af53b --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/AddStudent.java @@ -0,0 +1,56 @@ + +package com.javatpoint.servlets; +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; + +import java.sql.*; +@WebServlet("/AddStudent") +public class AddStudent extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + String name=request.getParameter("name"); + String email=request.getParameter("email"); + String sex=request.getParameter("sex"); + String course=request.getParameter("course"); + int fee=Integer.parseInt(request.getParameter("fee")); + int paid=Integer.parseInt(request.getParameter("paid")); + int due=Integer.parseInt(request.getParameter("due")); + String address=request.getParameter("address"); + String contact=request.getParameter("contact"); + + StudentBean bean=new StudentBean(name, email, sex, course, fee, paid, due, address, contact); + int status=StudentDao.save(bean); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Add Student</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + out.println("Student is added successfully!"); + + request.getRequestDispatcher("AddStudentForm.html").include(request, response); + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/AddStudentForm.java b/Fee-Management-System/src/com/javatpoint/servlets/AddStudentForm.java new file mode 100644 index 00000000..9974f1cf --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/AddStudentForm.java @@ -0,0 +1,47 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +@WebServlet("/AddStudentForm") +public class AddStudentForm extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Add Student</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + + HttpSession session=request.getSession(false); + + if(session==null||session.getAttribute("accountant")==null){ + out.println("<h1>Not Accountant!</h1>"); + request.getRequestDispatcher("AccountantLoginForm.html").include(request, response); + }else{ + request.getRequestDispatcher("AddStudentForm.html").include(request, response); + } + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/AdminLogin.java b/Fee-Management-System/src/com/javatpoint/servlets/AdminLogin.java new file mode 100644 index 00000000..63c25509 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/AdminLogin.java @@ -0,0 +1,51 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +@WebServlet("/AdminLogin") +public class AdminLogin extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Admin Panel</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navadmin.html").include(request, response); + + String email=request.getParameter("email"); + String password=request.getParameter("password"); + if(email.equals("admin@feereport.com")&&password.equals("admin123")){ + HttpSession session=request.getSession(); + session.setAttribute("admin","true"); + request.getRequestDispatcher("adminhome.html").include(request, response); + }else{ + out.println("<p>Sorry, username or password error!</p>"); + request.getRequestDispatcher("AdminLoginForm.html").include(request, response); + } + + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + doPost(req, resp); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/DeleteAccountant.java b/Fee-Management-System/src/com/javatpoint/servlets/DeleteAccountant.java new file mode 100644 index 00000000..d0f78683 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/DeleteAccountant.java @@ -0,0 +1,20 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.dao.AccountantDao; +import com.javatpoint.dao.StudentDao; +@WebServlet("/DeleteAccountant") +public class DeleteAccountant extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + String sid=request.getParameter("id"); + int id=Integer.parseInt(sid); + AccountantDao.delete(id); + response.sendRedirect("ViewAccountant"); + } +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/DeleteStudent.java b/Fee-Management-System/src/com/javatpoint/servlets/DeleteStudent.java new file mode 100644 index 00000000..1b66858f --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/DeleteStudent.java @@ -0,0 +1,19 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.dao.StudentDao; +@WebServlet("/DeleteStudent") +public class DeleteStudent extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + String srollno=request.getParameter("rollno"); + int rollno=Integer.parseInt(srollno); + StudentDao.delete(rollno); + response.sendRedirect("ViewStudent"); + } +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/DueFee.java b/Fee-Management-System/src/com/javatpoint/servlets/DueFee.java new file mode 100644 index 00000000..6006cc3f --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/DueFee.java @@ -0,0 +1,52 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; +@WebServlet("/DueFee") +public class DueFee extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>View Student</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + out.print("<h1>Due Fee</h1>"); + + + List<StudentBean> list=StudentDao.getDues(); + out.println("<table class='table table-bordered table-striped'>"); + out.print("<tr><th>Rollno</th><th>Name</th><th>Email</th><th>Sex</th><th>Course</th><th>Fee</th><th>paid</th><th>due</th><th>address</th><th>contact</th><th>Edit</th><th>Delete</th>"); + for(StudentBean bean:list){ + out.print("<tr><td>"+bean.getRollno()+"</td><td>"+bean.getName()+"</td><td>"+bean.getEmail()+"</td><td>"+bean.getSex()+"</td><td>"+bean.getCourse()+"</td><td>"+bean.getFee()+"</td><td>"+bean.getPaid()+"</td><td>"+bean.getDue()+"</td><td>"+bean.getAddress()+"</td><td>"+bean.getContact()+"</td><td><a href='EditStudentForm?rollno="+bean.getRollno()+"'>Edit</a></td><td><a href='DeleteStudent?rollno="+bean.getRollno()+"'>Delete</a></td></tr>"); + } + out.println("</table>"); + + out.println("</table>"); + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/EditAccountant.java b/Fee-Management-System/src/com/javatpoint/servlets/EditAccountant.java new file mode 100644 index 00000000..7a9a1990 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/EditAccountant.java @@ -0,0 +1,36 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.AccountantBean; +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.AccountantDao; +import com.javatpoint.dao.StudentDao; +@WebServlet("/EditAccountant") +public class EditAccountant extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + int id=Integer.parseInt(request.getParameter("id")); + String name=request.getParameter("name"); + String email=request.getParameter("email"); + String password=request.getParameter("password"); + String address=request.getParameter("address"); + String contact=request.getParameter("contact"); + + AccountantBean bean=new AccountantBean(id,name, email, password, address, contact); + AccountantDao.update(bean); + response.sendRedirect("ViewAccountant"); + + out.close(); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/EditAccountantForm.java b/Fee-Management-System/src/com/javatpoint/servlets/EditAccountantForm.java new file mode 100644 index 00000000..dfcec23d --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/EditAccountantForm.java @@ -0,0 +1,59 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.AccountantBean; +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.AccountantDao; +import com.javatpoint.dao.StudentDao; + +@WebServlet("/EditAccountantForm") +public class EditAccountantForm extends HttpServlet { + private static final long serialVersionUID = 1L; + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + PrintWriter out=response.getWriter(); + String sid=request.getParameter("id"); + int id=Integer.parseInt(sid); + AccountantBean bean=AccountantDao.getRecordById(id); + + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Edit Accountant</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navadmin.html").include(request, response); + out.println("<div class='container'>"); + + out.print("<h1>Edit Accountant Form</h1>"); + out.print("<form action='EditAccountant' method='post'>"); + out.print("<table>"); + out.print("<tr><td><input type='hidden' name='id' value='"+bean.getId()+"' /></td></tr>"); + out.print("<tr><td>Name:</td><td><input type='text' name='name' value='"+bean.getName()+"'/></td></tr>"); + out.print("<tr><td>Email:</td><td><input type='email' name='email' value='"+bean.getEmail()+"'/></td></tr>"); + out.print("<tr><td>Password:</td><td><input type='text' name='password' value='"+bean.getPassword()+"'/></td></tr>"); + out.print("<tr><td>Address:</td><td><textarea name='address' style='width:300px;height:100px;'>"+bean.getAddress()+"</textarea></td></tr>"); + out.print("<tr><td>Contact No:</td><td><input type='text' name='contact' value='"+bean.getContact()+"'/></td></tr>"); + out.print("<tr><td colspan='2' align='center'><input type='submit' value='Update Accountant' class='btn btn-default'/></td></tr>"); + out.print("</table>"); + out.print("</form>"); + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + + out.close(); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/EditStudent.java b/Fee-Management-System/src/com/javatpoint/servlets/EditStudent.java new file mode 100644 index 00000000..a7dc6434 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/EditStudent.java @@ -0,0 +1,38 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; +@WebServlet("/EditStudent") +public class EditStudent extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + int rollno=Integer.parseInt(request.getParameter("rollno")); + String name=request.getParameter("name"); + String email=request.getParameter("email"); + String sex=request.getParameter("sex"); + String course=request.getParameter("course"); + int fee=Integer.parseInt(request.getParameter("fee")); + int paid=Integer.parseInt(request.getParameter("paid")); + int due=Integer.parseInt(request.getParameter("due")); + String address=request.getParameter("address"); + String contact=request.getParameter("contact"); + + StudentBean bean=new StudentBean(rollno,name, email, sex, course, fee, paid, due, address, contact); + int status=StudentDao.update(bean); + response.sendRedirect("ViewStudent"); + + out.close(); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/EditStudentForm.java b/Fee-Management-System/src/com/javatpoint/servlets/EditStudentForm.java new file mode 100644 index 00000000..b39a9972 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/EditStudentForm.java @@ -0,0 +1,58 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; +@WebServlet("/EditStudentForm") +public class EditStudentForm extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + PrintWriter out=response.getWriter(); + String srollno=request.getParameter("rollno"); + int rollno=Integer.parseInt(srollno); + StudentBean bean=StudentDao.getRecordByRollno(rollno); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Edit Student Form</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + out.print("<h1>Edit Student Form</h1>"); + out.print("<form action='EditStudent' method='post'>"); + out.print("<table>"); + out.print("<tr><td><input type='hidden' name='rollno' value='"+bean.getRollno()+"'/></td></tr>"); + out.print("<tr><td>Name:</td><td><input type='text' name='name' value='"+bean.getName()+"'/></td></tr>"); + out.print("<tr><td>Email:</td><td><input type='email' name='email' value='"+bean.getEmail()+"'/></td></tr>"); + out.print("<tr><td>Sex:</td><td><input type='text' name='sex' value='"+bean.getSex()+"'/></td></tr>"); + out.print("<tr><td>Course:</td><td><input type='text' name='course' value='"+bean.getCourse()+"'/></td></tr>"); + out.print("<tr><td>Fee:</td><td><input type='number' name='fee' value='"+bean.getFee()+"'/></td></tr>"); + out.print("<tr><td>Paid:</td><td><input type='number' name='paid' value='"+bean.getPaid()+"'/></td></tr>"); + out.print("<tr><td>Due:</td><td><input type='number' name='due' value='"+bean.getDue()+"'/></td></tr>"); + out.print("<tr><td>Address:</td><td><textarea name='address' style='width:300px;height:100px;'>"+bean.getAddress()+"</textarea></td></tr>"); + out.print("<tr><td>Contact No:</td><td><input type='text' name='contact' value='"+bean.getContact()+"'/></td></tr>"); + out.print("<tr><td colspan='2' align='center'><input type='submit' value='Update Student'/></td></tr>"); + out.print("</table>"); + out.print("</form>"); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/LogoutAccountant.java b/Fee-Management-System/src/com/javatpoint/servlets/LogoutAccountant.java new file mode 100644 index 00000000..2808f788 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/LogoutAccountant.java @@ -0,0 +1,41 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +@WebServlet("/LogoutAccountant") +public class LogoutAccountant extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Logout Accountant</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navhome.html").include(request, response); + out.println("<div class='container'>"); + + out.println("<h1>Accountant Logout Success</h1>"); + HttpSession session=request.getSession(); + session.invalidate(); + request.getRequestDispatcher("AccountantLoginForm.html").include(request, response); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/LogoutAdmin.java b/Fee-Management-System/src/com/javatpoint/servlets/LogoutAdmin.java new file mode 100644 index 00000000..0129e889 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/LogoutAdmin.java @@ -0,0 +1,42 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; +@WebServlet("/LogoutAdmin") +public class LogoutAdmin extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Admin Logout</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navhome.html").include(request, response); + out.println("<div class='container'>"); + + out.println("<h1>Admin Logout Success</h1>"); + HttpSession session=request.getSession(); + session.invalidate(); + request.getRequestDispatcher("AdminLoginForm.html").include(request, response); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/SearchStudent.java b/Fee-Management-System/src/com/javatpoint/servlets/SearchStudent.java new file mode 100644 index 00000000..2f3a5435 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/SearchStudent.java @@ -0,0 +1,56 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; +@WebServlet("/SearchStudent") +public class SearchStudent extends HttpServlet { + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + String srollno=request.getParameter("rollno"); + int rollno=Integer.parseInt(srollno); + StudentBean bean=StudentDao.getRecordByRollno(rollno); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Search Student</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + + out.println("<h1>Search Student</h1>"); + + if(bean.getRollno()>0){ + out.println("<table class='table table-bordered table-striped'>"); + out.print("<tr><td>Rollno:</td><td>"+bean.getRollno()+"</td></tr>"); + out.print("<tr><td>Name:</td><td>"+bean.getName()+"</td></tr>"); + out.print("<tr><td>Email:</td><td>"+bean.getEmail()+"</td></tr>"); + out.print("<tr><td>Sex:</td><td>"+bean.getSex()+"</td></tr>"); + out.print("<tr><td>Course:</td><td>"+bean.getCourse()+"</td></tr>"); + out.print("<tr><td>Fee:</td><td>"+bean.getFee()+"</td></tr>"); + out.print("</table>"); + }else{ + out.println("<p>Sorry, No Record found for "+rollno+"</p>"); + } + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/SearchStudentForm.java b/Fee-Management-System/src/com/javatpoint/servlets/SearchStudentForm.java new file mode 100644 index 00000000..16822d2e --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/SearchStudentForm.java @@ -0,0 +1,36 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +@WebServlet("/SearchStudentForm") +public class SearchStudentForm extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>Search Student Form</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + request.getRequestDispatcher("SearchStudentForm.html").include(request, response); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/ViewAccountant.java b/Fee-Management-System/src/com/javatpoint/servlets/ViewAccountant.java new file mode 100644 index 00000000..89b90e03 --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/ViewAccountant.java @@ -0,0 +1,49 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.AccountantBean; +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.AccountantDao; +import com.javatpoint.dao.StudentDao; +@WebServlet("/ViewAccountant") +public class ViewAccountant extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>View Accountant</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navadmin.html").include(request, response); + out.println("<div class='container'>"); + out.print("<h1>View Accountant</h1>"); + + List<AccountantBean> list=AccountantDao.getAllRecords(); + out.println("<table class='table table-bordered table-striped'>"); + out.print("<tr><th>Id</th><th>Name</th><th>Email</th><th>Password</th><th>address</th><th>contact</th><th>Edit</th><th>Delete</th>"); + for(AccountantBean bean:list){ + out.print("<tr><td>"+bean.getId()+"</td><td>"+bean.getName()+"</td><td>"+bean.getEmail()+"</td><td>"+bean.getPassword()+"</td><td>"+bean.getAddress()+"</td><td>"+bean.getContact()+"</td><td><a href='EditAccountantForm?id="+bean.getId()+"'>Edit</a></td><td><a href='DeleteAccountant?id="+bean.getId()+"'>Delete</a></td></tr>"); + } + out.println("</table>"); + + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } +} diff --git a/Fee-Management-System/src/com/javatpoint/servlets/ViewStudent.java b/Fee-Management-System/src/com/javatpoint/servlets/ViewStudent.java new file mode 100644 index 00000000..d4e74aad --- /dev/null +++ b/Fee-Management-System/src/com/javatpoint/servlets/ViewStudent.java @@ -0,0 +1,48 @@ +package com.javatpoint.servlets; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.javatpoint.beans.StudentBean; +import com.javatpoint.dao.StudentDao; +@WebServlet("/ViewStudent") +public class ViewStudent extends HttpServlet { + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out=response.getWriter(); + out.println("<!DOCTYPE html>"); + out.println("<html>"); + out.println("<head>"); + out.println("<title>View Student</title>"); + out.println("<link rel='stylesheet' href='resources/bootstrap.min.css'/>"); + out.println("<link rel='stylesheet' href='style.css'/>"); + out.println("</head>"); + out.println("<body>"); + request.getRequestDispatcher("navaccountant.html").include(request, response); + out.println("<div class='container'>"); + + out.print("<h1>View Students</h1>"); + + List<StudentBean> list=StudentDao.getAllRecords(); + out.println("<table class='table table-bordered table-striped'>"); + out.print("<tr><th>Rollno</th><th>Name</th><th>Email</th><th>Sex</th><th>Course</th><th>Fee</th><th>paid</th><th>due</th><th>address</th><th>contact</th><th>Edit</th><th>Delete</th>"); + for(StudentBean bean:list){ + out.print("<tr><td>"+bean.getRollno()+"</td><td>"+bean.getName()+"</td><td>"+bean.getEmail()+"</td><td>"+bean.getSex()+"</td><td>"+bean.getCourse()+"</td><td>"+bean.getFee()+"</td><td>"+bean.getPaid()+"</td><td>"+bean.getDue()+"</td><td>"+bean.getAddress()+"</td><td>"+bean.getContact()+"</td><td><a href='EditStudentForm?rollno="+bean.getRollno()+"'>Edit</a></td><td><a href='DeleteStudent?rollno="+bean.getRollno()+"'>Delete</a></td></tr>"); + } + out.println("</table>"); + out.println("</div>"); + request.getRequestDispatcher("footer.html").include(request, response); + out.println("</body>"); + out.println("</html>"); + + out.close(); + } + +} diff --git a/Fibonacci/Fibonacci_series.java b/Fibonacci/Fibonacci_series.java new file mode 100644 index 00000000..0ef338ee --- /dev/null +++ b/Fibonacci/Fibonacci_series.java @@ -0,0 +1,17 @@ +/* JAVA code to find the fibonacci series.The Fibonacci numbers are the numbers in the following integer sequence: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …….. */ + +class Fibonacci_series { + public static void main(String args[]) { + int n1 = 0, n2 = 1, n3, i, count = 20; + System.out.print(n1 + " " + n2);// printing 0 and 1 + + for (i = 2; i < count; ++i)// loop starts from 2 because 0 and 1 are already printed + { + n3 = n1 + n2; + System.out.print(" " + n3); + n1 = n2; + n2 = n3; + } + + } +} diff --git a/FibonacciGenerator.java b/FibonacciGenerator.java new file mode 100644 index 00000000..fe73b5e9 --- /dev/null +++ b/FibonacciGenerator.java @@ -0,0 +1,31 @@ +import java.util.Scanner; + +public class FibonacciGenerator { + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + + System.out.print("Enter the number of terms in the Fibonacci sequence: "); + int numTerms = sc.nextInt(); + + generateFibonacci(numTerms); + + sc.close(); + } + + public static void generateFibonacci(int numTerms) { + int[] fibonacciSequence = new int[numTerms]; + fibonacciSequence[0] = 0; + if (numTerms > 1) { + fibonacciSequence[1] = 1; + } + + for (int i = 2; i < numTerms; i++) { + fibonacciSequence[i] = fibonacciSequence[i - 1] + fibonacciSequence[i - 2]; + } + + System.out.println("Fibonacci sequence up to " + numTerms + " terms:"); + for (int i = 0; i < numTerms; i++) { + System.out.print(fibonacciSequence[i] + " "); + } + } +} diff --git a/FileScannerPrinter b/FileScannerPrinter new file mode 100644 index 00000000..d68bbd54 --- /dev/null +++ b/FileScannerPrinter @@ -0,0 +1,27 @@ +import java.io.File; +import java.io.FileNotFoundException; +import java.util.Scanner; + +public class FileScannerPrinter { + + public static void main(String[] args) throws FileNotFoundException { + // TODO Auto-generated method stub + + //creating File instance to reference text file in Java + File text = new File("test.txt"); + + //Creating Scanner instnace to read File in Java + Scanner scnr = new Scanner(text); + + //Reading each line of file using Scanner class + int lineNumber = 1; + + while(scnr.hasNextLine()){ + String lineContent = scnr.nextLine(); + System.out.println(lineNumber + " " + lineContent); + lineNumber++; + } + + } + +} diff --git a/File_Encryption.Java b/File_Encryption.Java new file mode 100644 index 00000000..b04f42b3 --- /dev/null +++ b/File_Encryption.Java @@ -0,0 +1,56 @@ +import javax.crypto.Cipher; +import javax.crypto.SecretKey; +import javax.crypto.spec.SecretKeySpec; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.nio.file.StandardOpenOption; +import java.security.Key; +import java.security.MessageDigest; +import java.util.Arrays; +import java.util.Scanner; + +public class FileEncryptionDecryptionTool { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + System.out.print("Enter the file path: "); + String filePath = scanner.nextLine(); + + System.out.print("Enter the encryption key (16 characters): "); + String encryptionKey = scanner.nextLine(); + + try { + byte[] key = encryptionKey.getBytes(); + key = Arrays.copyOf(key, 16); // Ensure the key is exactly 16 bytes + + SecretKey secretKey = new SecretKeySpec(key, "AES"); + Cipher cipher = Cipher.getInstance("AES"); + + // Encrypt the file + byte[] fileData = Files.readAllBytes(Paths.get(filePath)); + cipher.init(Cipher.ENCRYPT_MODE, secretKey); + byte[] encryptedData = cipher.doFinal(fileData); + + Path encryptedFilePath = Paths.get(filePath + ".enc"); + Files.write(encryptedFilePath, encryptedData, StandardOpenOption.CREATE); + + System.out.println("File encrypted successfully to: " + encryptedFilePath); + + // Decrypt the file + System.out.print("Do you want to decrypt the file (Y/N)? "); + String choice = scanner.nextLine(); + + if (choice.equalsIgnoreCase("Y")) { + cipher.init(Cipher.DECRYPT_MODE, secretKey); + byte[] decryptedData = cipher.doFinal(encryptedData); + Path decryptedFilePath = Paths.get(filePath + ".dec"); + Files.write(decryptedFilePath, decryptedData, StandardOpenOption.CREATE); + + System.out.println("File decrypted successfully to: " + decryptedFilePath); + } + } catch (Exception e) { + System.err.println("Error: " + e.getMessage()); + } + } +} diff --git a/FizzBuzz.java b/FizzBuzz.java new file mode 100644 index 00000000..952d3709 --- /dev/null +++ b/FizzBuzz.java @@ -0,0 +1,29 @@ +public class FizzBuzz { + public static void main( String args[]){ + + for(int i = 1; i<=100;++i){ + + if(i%3==0 && i%5 == 0) + { + System.out.println("FrizzBuzz"); + + } else if (i % 3 == 0) { + System.out.println("Frizz"); + + } else if (i % 5 == 0 ) { + System.out.println("Buzz"); + + } + + else { + System.out.println(i); + } + + } + + + + } + + +} diff --git a/FlipCoin.java b/FlipCoin.java new file mode 100644 index 00000000..2d7ac320 --- /dev/null +++ b/FlipCoin.java @@ -0,0 +1,36 @@ +package com.company; + +import java.util.Random; + +public class FlipCoin { + + public enum Coin { + HEADS, TAILS; + } + + public enum Game { + WIN, LOSE; + } + + private static Coin flip() { + int random = new Random().nextInt(2); + if (random == 0) { + return Coin.HEADS; + } + return Coin.TAILS; + } + + public static boolean flipFor(Coin picked) { + System.out.println("Flipping..."); + Coin landed = flip(); + System.out.printf("Landed %s%n", landed); + return (landed == picked); + } + + public static void main(String[] args) { + Coin chose = Coin.HEADS; + System.out.printf("You chose %s%n", chose); + Game game = flipFor(chose) ? Game.WIN : Game.LOSE; + System.out.printf("You %s!%n", game); + } +} diff --git a/Geocoding of a Webpage using Python/geocoding.py b/Geocoding of a Webpage using Python/geocoding.py new file mode 100644 index 00000000..c923eec0 --- /dev/null +++ b/Geocoding of a Webpage using Python/geocoding.py @@ -0,0 +1,25 @@ +import requests + +# Base Url for geocoding +url = "https://us1.locationiq.com/v1/search.php" + +address = input("Input the address: ") + +#Your unique private_token should replace value of the private_token variable. +#To know how to obtain a unique private_token please refer the README file for this script. +private_token = "Your_private_token" + +data = { + 'key': private_token, + 'q': address, + 'format': 'json' +} + +response = requests.get(url, params=data) + +latitude = response.json()[0]['lat'] +longitude = response.json()[0]['lon'] + +print(f"The latitude of the given address is: {latitude}") +print(f"The longitude of the given address is: {longitude}") +print("Thanks for using this script") diff --git a/Geocoding of a Webpage using Python/requirements.txt b/Geocoding of a Webpage using Python/requirements.txt new file mode 100644 index 00000000..41e6aa31 --- /dev/null +++ b/Geocoding of a Webpage using Python/requirements.txt @@ -0,0 +1,5 @@ +certifi==2020.6.20 +chardet==3.0.4 +idna==2.10 +requests==2.24.0 +urllib3==1.26.5 diff --git a/Get Current Time/GetCurrentTimeZone.java b/Get Current Time/GetCurrentTimeZone.java new file mode 100644 index 00000000..7d3b9466 --- /dev/null +++ b/Get Current Time/GetCurrentTimeZone.java @@ -0,0 +1,17 @@ +import java.util.Calendar; +import java.util.TimeZone; + +public class GetCurrentTimeZone { + + public static void main(String[] args) { + + //get Calendar instance + Calendar now = Calendar.getInstance(); + + //get current TimeZone using getTimeZone method of Calendar class + TimeZone timeZone = now.getTimeZone(); + + //display current TimeZone using getDisplayName() method of TimeZone class + System.out.println("Current TimeZone is : " + timeZone.getDisplayName()); + } +} \ No newline at end of file diff --git a/Google Cloud Speech-to-Text library to recognize speech from a microphone b/Google Cloud Speech-to-Text library to recognize speech from a microphone new file mode 100644 index 00000000..5308f316 --- /dev/null +++ b/Google Cloud Speech-to-Text library to recognize speech from a microphone @@ -0,0 +1,34 @@ +import com.google.cloud.speech.v1.RecognitionAudio; +import com.google.cloud.speech.v1.RecognitionConfig; +import com.google.cloud.speech.v1.RecognitionResults; +import com.google.cloud.speech.v1.SpeechClient; + +public class SpeechRecognizer { + + public static String recognizeSpeech() throws Exception { + // Create a SpeechClient object. + SpeechClient speechClient = SpeechClient.create(); + + // Create a RecognitionConfig object. + RecognitionConfig recognitionConfig = RecognitionConfig.newBuilder() + .setEncoding(RecognitionConfig.AudioEncoding.LINEAR16) + .setLanguageCode("en-US") + .build(); + + // Create a RecognitionAudio object. + RecognitionAudio recognitionAudio = RecognitionAudio.newBuilder() + .setContent(audioData) + .build(); + + // Perform speech recognition. + RecognitionResults results = speechClient.recognize(recognitionConfig, recognitionAudio); + + // Get the recognized text. + String recognizedText = results.getResultsList().get(0).getAlternativesList().get(0).getTranscript(); + + // Close the SpeechClient. + speechClient.close(); + + return recognizedText; + } +} diff --git a/Guess The Number Game/GuessNumberGame.java b/Guess The Number Game/GuessNumberGame.java new file mode 100644 index 00000000..f2c630ff --- /dev/null +++ b/Guess The Number Game/GuessNumberGame.java @@ -0,0 +1,46 @@ + +import java.util.Scanner; +import java.util.concurrent.ThreadLocalRandom; + +public class GuessNumberGame { + + private static final int MIN_NUMBER = 1; + private static final int MAX_NUMBER = 1000; + + public static void main(String[] args) { + GuessNumberGame game = new GuessNumberGame(); + game.startGame(); + } + + public void startGame() { + boolean isUserGuessCorrect = false; + int numberOfGuesses = 0; + // computer thinks a number + int computerNumber = getNumberByComputer(); + + // Program continues till user guesses the number correctly + while (!isUserGuessCorrect) { + int userNumber = getUserGuessedNumber(); + if (userNumber > computerNumber) { + System.out.println("Sorry, the number you guessed is too high"); + } else if (userNumber < computerNumber) { + System.out.println("Sorry, the number you guessed is too low"); + } else if (userNumber == computerNumber) { + System.out.println("Congratulations! Your guess is correct!"); + isUserGuessCorrect = true; + } + numberOfGuesses++; + } + System.out.println("You found the number in " + numberOfGuesses + " guesses"); + } + + public int getNumberByComputer() { + return ThreadLocalRandom.current().nextInt(MIN_NUMBER, MAX_NUMBER + 1); + } + + public int getUserGuessedNumber() { + Scanner sn = new Scanner(System.in); + System.out.println("Please guess the number: "); + return sn.nextInt(); + } +} diff --git a/Guess the number/Guess_the_number.java b/Guess the number/Guess_the_number.java new file mode 100644 index 00000000..b1bc041b --- /dev/null +++ b/Guess the number/Guess_the_number.java @@ -0,0 +1,47 @@ +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.control.TextField; +import javafx.scene.layout.VBox; +import javafx.stage.Stage; + +public class GuessTheNumberGame extends Application { + private int targetNumber = (int) (Math.random() * 100) + 1; + private int numberOfTries = 0; + + public static void main(String[] args) { + launch(args); + } + + @Override + public void start(Stage primaryStage) { + primaryStage.setTitle("Guess the Number Game"); + + Label titleLabel = new Label("Guess the Number (1-100)"); + TextField guessInput = new TextField(); + Label messageLabel = new Label(); + VBox vbox = new VBox(titleLabel, guessInput, messageLabel); + + guessInput.setOnAction(e -> { + try { + int userGuess = Integer.parseInt(guessInput.getText()); + numberOfTries++; + if (userGuess < targetNumber) { + messageLabel.setText("Try higher."); + } else if (userGuess > targetNumber) { + messageLabel.setText("Try lower."); + } else { + messageLabel.setText("Congratulations! You guessed the number in " + numberOfTries + " tries."); + } + guessInput.clear(); + } catch (NumberFormatException ex) { + messageLabel.setText("Invalid input. Enter a number."); + } + }); + + Scene scene = new Scene(vbox, 300, 150); + primaryStage.setScene(scene); + primaryStage.show(); + } + } + diff --git a/Guess.java b/Guess.java new file mode 100644 index 00000000..a89c59ce --- /dev/null +++ b/Guess.java @@ -0,0 +1,97 @@ +import java.util.Scanner; +public class Guess +{ + public static void main(String[] args) { + + //creating Scanner object + Scanner in = new Scanner(System.in); + + //Instructions to the Game + System.out.println("NUMBER GUESSING GAME"); + System.out.println(); + + System.out.println("INSTRUCTIONS:"); + + System.out.println("1)Enter the minimum and maximum range of your choice"); + System.out.println("2)Your Aim is to guess the random number generated between the above range"); + System.out.println("3)If you find the random number in minimum number of guesses"); + System.out.println("You WIN or you LOSE the game"); + System.out.println(); + + System.out.println("OK LET'S BEGIN"); + System.out.println(); + + //Declaring min and max variable for min and max range + int min; + int max; + int res; + int guess_count = 0; + + //To get min and max value from the user + System.out.println("Enter your minimum range"); + min = in.nextInt(); + System.out.println("Enter your maximum range"); + max = in.nextInt(); + System.out.println(); + + //Creating random number out of the min and max range + int n = (int)(Math.random()*(max-min+1)+min); + int guess; + + /* + //Determine the max guesses for the given range + res = (int)(max / 4) + (min / 4); + res = res/2; + System.out.println(res); + */ + + //Loop for guessing the number by the user + System.out.println("Enter your guess (between '" + min +"' and '"+ max+ "' range)"); + while(true){ + + //To input the guess + guess = in.nextInt(); + + //To compare the user entered number with the guess + + //case 1 + if(guess > n){ + System.out.println("NUMBER is LESS than your GUESS"); + guess_count++; + } + + //case 2 + if(guess < n){ + System.out.println("NUMBER is GREATER than your GUESS"); + guess_count++; + } + + //case 3 + if(guess == n){ + System.out.println("GUESS is CORRECT"); + + //To Continue the Loop + /* System.out.println("Do you want to play again(Press 1 else Press 0)"); + res = in.nextInt(); + + //To Break the Loop + if(!(res == 1)){ + */ + break; + //} + } + System.out.println(); + System.out.println("Enter your new GUESS"); + } + + System.out.println(); + if(guess_count >= 5){ + System.out.println("You LOST the game"); + } + else{ + System.out.println("You WON the game"); + } + System.out.println(); + System.out.println("GAME ENDED"); + } +} diff --git a/GuessTheNumberGame/GuessTheNumberGame.java b/GuessTheNumberGame/GuessTheNumberGame.java new file mode 100644 index 00000000..10f1dcdb --- /dev/null +++ b/GuessTheNumberGame/GuessTheNumberGame.java @@ -0,0 +1,43 @@ +import java.util.Random; +import java.util.Scanner; + +public class GuessTheNumberGame { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + Random random = new Random(); + + int lowerBound = 1; // Set the lower bound of the random number range + int upperBound = 100; // Set the upper bound of the random number range + int secretNumber = random.nextInt(upperBound - lowerBound + 1) + lowerBound; + + int maxAttempts = 10; // Set the maximum number of attempts + + System.out.println("Welcome to Guess the Number Game!"); + System.out.println("I've selected a number between " + lowerBound + " and " + upperBound + ". Try to guess it!"); + + for (int attempts = 1; attempts <= maxAttempts; attempts++) { + System.out.print("Attempt #" + attempts + ": Enter your guess: "); + int playerGuess = scanner.nextInt(); + + if (playerGuess < lowerBound || playerGuess > upperBound) { + System.out.println("Please enter a number between " + lowerBound + " and " + upperBound + "."); + continue; + } + + if (playerGuess < secretNumber) { + System.out.println("Too low! Try again."); + } else if (playerGuess > secretNumber) { + System.out.println("Too high! Try again."); + } else { + System.out.println("Congratulations! You've guessed the number " + secretNumber + " correctly in " + attempts + " attempts."); + break; + } + + if (attempts == maxAttempts) { + System.out.println("Sorry, you've run out of attempts. The secret number was " + secretNumber + "."); + } + } + + scanner.close(); + } +} diff --git a/Hangmangame.java b/Hangmangame.java new file mode 100644 index 00000000..24d15572 --- /dev/null +++ b/Hangmangame.java @@ -0,0 +1,64 @@ +import java.util.Scanner; + +public class HangmanGame { + private static String[] words = {"java", "programming", "hangman", "computer", "algorithm"}; + private static String selectedWord; + private static String guessedWord; + private static int maxAttempts = 6; + private static int attemptsLeft = maxAttempts; + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + selectWord(); + + while (true) { + System.out.println("Word: " + guessedWord); + System.out.println("Attempts left: " + attemptsLeft); + System.out.print("Enter a letter or the entire word: "); + String guess = scanner.nextLine().toLowerCase(); + + if (guess.length() == 1) { + processLetterGuess(guess.charAt(0)); + } else if (guess.length() == selectedWord.length()) { + processWordGuess(guess); + } else { + System.out.println("Invalid input. Please enter a single letter or the entire word."); + } + + if (guessedWord.equals(selectedWord)) { + System.out.println("Congratulations! You've guessed the word: " + selectedWord); + break; + } else if (attemptsLeft == 0) { + System.out.println("You've run out of attempts. The word was: " + selectedWord); + break; + } + } + scanner.close(); + } + + private static void selectWord() { + selectedWord = words[(int) (Math.random() * words.length)]; + guessedWord = new String(new char[selectedWord.length()]).replace('\0', '_'); + } + + private static void processLetterGuess(char letter) { + boolean found = false; + for (int i = 0; i < selectedWord.length(); i++) { + if (selectedWord.charAt(i) == letter) { + guessedWord = guessedWord.substring(0, i) + letter + guessedWord.substring(i + 1); + found = true; + } + } + if (!found) { + attemptsLeft--; + } + } + + private static void processWordGuess(String word) { + if (word.equals(selectedWord)) { + guessedWord = selectedWord; + } else { + attemptsLeft--; + } + } +} diff --git a/Heapsort.java b/Heapsort.java new file mode 100644 index 00000000..e500affa --- /dev/null +++ b/Heapsort.java @@ -0,0 +1,72 @@ +import java.util.*; +public class HeapSort { + public void sort(int arr[]) + { + int N = arr.length; + + for (int i = N / 2 - 1; i >= 0; i--) + heapify(arr, N, i); + + for (int i = N - 1; i > 0; i--) { + + int x = arr[0]; + arr[0] = arr[i]; + arr[i] = x; + + heapify(arr, i, 0); + } + } + + void heapify(int arr[], int N, int i) + { + int largest = i; + int l = 2 * i + 1; + int r = 2 * i + 2; + + if (l < N && arr[l] > arr[largest]) + largest = l; + + if (r < N && arr[r] > arr[largest]) + largest = r; + + if (largest != i) { + int swap = arr[i]; + arr[i] = arr[largest]; + arr[largest] = swap; + + heapify(arr, N, largest); + } + } + static void printArray(int arr[]) + { + int N = arr.length; + + for (int i = 0; i < N; ++i) + System.out.print(arr[i] + " "); + System.out.println(); + } + + public static void main(String args[]) + { + int i, n, arr[]; + + Scanner s = new Scanner(System.in); + System.out.println("Enter no. of elements in aray:"); + n = s.nextInt(); + + arr = new int[n]; + + System.out.println("Enter " + n + " integers:"); + + for (i = 0;i<n; i++) + arr[i] = s.nextInt(); + + HeapSort ob = new HeapSort(); + ob.sort(arr); + + System.out.println("Sorted array is"); + printArray(arr); + } + + +} diff --git a/Hospital Management System/.DS_Store b/Hospital Management System/.DS_Store new file mode 100644 index 00000000..7d761a4c Binary files /dev/null and b/Hospital Management System/.DS_Store differ diff --git a/Hospital Management System/CHA_Hospital.jpg b/Hospital Management System/CHA_Hospital.jpg new file mode 100644 index 00000000..414c255b Binary files /dev/null and b/Hospital Management System/CHA_Hospital.jpg differ diff --git a/Hospital Management System/WebContent/1.jpg b/Hospital Management System/WebContent/1.jpg new file mode 100644 index 00000000..a66e0024 Binary files /dev/null and b/Hospital Management System/WebContent/1.jpg differ diff --git a/Hospital Management System/WebContent/2057&v=fit512.jpg b/Hospital Management System/WebContent/2057&v=fit512.jpg new file mode 100644 index 00000000..a10bee00 Binary files /dev/null and b/Hospital Management System/WebContent/2057&v=fit512.jpg differ diff --git a/Hospital Management System/WebContent/210_medical_doctor_decal__59388.png b/Hospital Management System/WebContent/210_medical_doctor_decal__59388.png new file mode 100644 index 00000000..b38ba868 Binary files /dev/null and b/Hospital Management System/WebContent/210_medical_doctor_decal__59388.png differ diff --git a/Hospital Management System/WebContent/ArtGalleries.jpg b/Hospital Management System/WebContent/ArtGalleries.jpg new file mode 100644 index 00000000..1c55b116 Binary files /dev/null and b/Hospital Management System/WebContent/ArtGalleries.jpg differ diff --git a/Hospital Management System/WebContent/DEPT.jsp b/Hospital Management System/WebContent/DEPT.jsp new file mode 100644 index 00000000..3e96cb34 --- /dev/null +++ b/Hospital Management System/WebContent/DEPT.jsp @@ -0,0 +1,212 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>DEPARTMENT INFORMATION WINDOW</title> +</head> +<body background ="ArtGalleries.jpg" bgproperties="fixed"> +<body> +<center><h1>DEPARTMENT INFORMATION</h1> +<form action="DEPT.jsp" method="post" name="f1" > +<%!String a="",b="",d="",e="",f="",g="",h="",i="",j=""; %> +<table BORDER=3><br><br><br> +<tr><td>DEPARTMENT ID<input type="text" name="t1" maxlength=10 size=20><BR> +</td> +<td><h4>DEPARTMENT DETAILS</h4> +</td> +</tr> +<tr> +<td> +<input type="submit" name="Button1" value="ADD DEPARTMENT"><br><br> +<input type="submit" name="Button1" value="SEARCH DEPARTMENT PROFILE"><br><br> +<input type="submit" name="Button1" value="DELETE DEPARTMENT PROFILE"><br><br> +<input type="submit" name="Button1" value="EDIT DEPARTMENT PROFILE"><br><br> +<% +try +{ a=request.getParameter("Button1"); + if(a.equals("SEARCH DEPARTMENT PROFILE")) + { + String str1= request.getParameter("t1"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(str1!="") + { + String sql2="select * from department where dept_id='"+str1+"'"; + ResultSet r=s.executeQuery(sql2); + if(r.next()) + { + j=r.getString(1); + b=r.getString(2); + d=r.getString(3); + e=r.getString(4); + f=r.getString(5); + } + else + { + %><script language="javascript"> + alert("DEPARTMENT ID=<%=str1%>does not exist in database..!!!"); + </script> + <% + } + + } + else + { + %><script language="javascript"> + alert("ENTER DEPARTMENT ID TO SEARCH..!!!"); + </script> + <% + } + } +}catch(Exception e) {} +%> + +</td> +<td> +DEPARTMENT NAME<input type="text" name="t2" maxlength=10 size=20 value=<%=b%>><BR> +DEPARTMENT DOCTOR<input type="text" name="t3" maxlength=10 size=20 value=<%=d%>><BR> +DEPARTMENT HEAD<input type="text" name="t4" maxlength=10 size=20 value=<%=e%>><BR> +PHONE NO<input type="text" name="t5" maxlength=10 size=20 value=<%=f%>><BR> +</td></tr> +<% +try{ + + a=request.getParameter("Button1"); + String str1= request.getParameter("t1"); + String str2= request.getParameter("t2"); + String str3= request.getParameter("t3"); + String str4= request.getParameter("t4"); + String str5= request.getParameter("t5"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(a.equals("ADD DEPARTMENT PROFILE")) + { + + if(str1!=""&&str2!=""&&str3!=""&&str4!=""&&str5!="") + { + String sql="insert into department values("+str1+",'"+str2+"','"+str3+"','"+str4+"',"+str5+")"; + out.println(sql); + s.execute(sql); + %><script language="javascript"> + alert("INSERT SUCESSFUL"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("ENTER COMPLETE DETAILS..!!!"); + </script> + <% + } + } + else if(a.equals("DELETE DEPARTMENT PROFILE")) + { + if(str1!="") + { + String sq="select * from department where dept_id="+str1+""; + ResultSet rs1=s.executeQuery(sq); + if(rs1.next()) + { + + String sql="delete from department where dept_id="+str1+""; + s.execute(sql); + %><script language="javascript"> + alert("PROFILE OF DEPARTMENT WITH ID <%=str1%>DELETED"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("INVALID DEPARTMENT ID <%=str1%>..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER DEPARTMENT'S ID TO DELETE..!!!"); + </script> + <% + } + } + else if(a.equals("EDIT DEPARTMENT PROFILE")) + { + if(str1!="") + { + String sq="select * from department where dept_id="+str1+""; + ResultSet rs1=s.executeQuery(sq); + if(rs1.next()) + { + String sql="delete from department where dept_id="+str1+""; + s.execute(sql); + String sql1="insert into department values("+str1+",'"+str2+"','"+str3+"','"+str4+"',"+str5+")"; + s.execute(sql1); + %><script language="javascript"> + alert("PROFILE OF DEPARTMENT WITH ID <%=str1%>EDITED"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("INVALID DEPARTMENT ID <%=str1%>..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER DEPARTMENT'S ID TO EDIT..!!!"); + </script> + <% + } + } + }catch(Exception e) {} + +%> +</table> +<h4>DEPARTMENT PROFILE TABLE</h4> +<table cellspacing=3 cellpadding=5 border="2" > + +<th colspan=1 align=center>DEPT ID</th> +<th colspan=1 align=center>DEPT NAME</th> +<th colspan=1 align=center>DEPT DOCTOR</th> +<th colspan=1 align=center>DEPT HEAD</th> +<th colspan=1 align=center>DEPT PHONE</th> +<% +try +{ + String str1= request.getParameter("t1"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + String q="select * from department"; + ResultSet rs9=s.executeQuery(q); + while(rs9.next()) + {%><tr> + + <% + for (int i=1; i<=5; i++) + { + out.println( "<td > " + rs9.getString (i) ); + + } + }%></tr><% +}catch(Exception e) {} +%> +</table> + + +</form> +<input type="button" name="bttn" value="HOME" onclick="location.href='home.jsp'"> +</center> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/Hospital main entrance-blue sky.jpg b/Hospital Management System/WebContent/Hospital main entrance-blue sky.jpg new file mode 100644 index 00000000..a7678e16 Binary files /dev/null and b/Hospital Management System/WebContent/Hospital main entrance-blue sky.jpg differ diff --git a/Hospital Management System/WebContent/META-INF/MANIFEST.MF b/Hospital Management System/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/Hospital Management System/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/Hospital Management System/WebContent/META-INF/bill.html b/Hospital Management System/WebContent/META-INF/bill.html new file mode 100644 index 00000000..be52950e --- /dev/null +++ b/Hospital Management System/WebContent/META-INF/bill.html @@ -0,0 +1,10 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/University_College_Hospital.jpg b/Hospital Management System/WebContent/University_College_Hospital.jpg new file mode 100644 index 00000000..21b57abd Binary files /dev/null and b/Hospital Management System/WebContent/University_College_Hospital.jpg differ diff --git a/Hospital Management System/WebContent/WEB-INF/addpat.jsp b/Hospital Management System/WebContent/WEB-INF/addpat.jsp new file mode 100644 index 00000000..4956d7ea --- /dev/null +++ b/Hospital Management System/WebContent/WEB-INF/addpat.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/WEB-INF/adpat.jsp b/Hospital Management System/WebContent/WEB-INF/adpat.jsp new file mode 100644 index 00000000..7bf7243b --- /dev/null +++ b/Hospital Management System/WebContent/WEB-INF/adpat.jsp @@ -0,0 +1,22 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> +<h1>ADD PATIENT</h1> +PATIENT ID<input type="text" name="t1" maxlength=10 size=20><BR> +PATIENT NAME<input type="text" name="t1" maxlength=10 size=20><BR> +PATIENT DEPARTMENT<input type="text" name="t1" maxlength=10 size=20><BR> +CONTACT NO<input type="text" name="t1" maxlength=10 size=20><BR> +GENDER<input type="text" name="t1" maxlength=10 size=20><BR> +DATE OF BIRTH<input type="text" name="t1" maxlength=10 size=20><BR> +DOCTOR FEE<input type="text" name="t1" maxlength=10 size=20><BR> +FATHERS NAME<input type="text" name="t1" maxlength=10 size=20><BR> +BLOOD GROUP<input type="text" name="t1" maxlength=10 size=20><BR> + +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/WEB-INF/attnd.jsp b/Hospital Management System/WebContent/WEB-INF/attnd.jsp new file mode 100644 index 00000000..fbd9d25a --- /dev/null +++ b/Hospital Management System/WebContent/WEB-INF/attnd.jsp @@ -0,0 +1,19 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> +PATIENT ID<input type="text" name="t1" maxlength=10 size=20><BR> +PATIENT NAME<input type="text" name="t1" maxlength=10 size=20><BR> +PATIENT DEPARTMENT<input type="text" name="t1" maxlength=10 size=20><BR> +CONTACT NO<input type="text" name="t1" maxlength=10 size=20><BR> +GENDER<SELECT> +<option>MALE +<OPTION> FEMALE +</SELECT><BR> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/WEB-INF/bill.jsp b/Hospital Management System/WebContent/WEB-INF/bill.jsp new file mode 100644 index 00000000..4956d7ea --- /dev/null +++ b/Hospital Management System/WebContent/WEB-INF/bill.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/WEB-INF/dropdown.js b/Hospital Management System/WebContent/WEB-INF/dropdown.js new file mode 100644 index 00000000..762a9a29 --- /dev/null +++ b/Hospital Management System/WebContent/WEB-INF/dropdown.js @@ -0,0 +1,58 @@ +var DDSPEED = 10; +var DDTIMER = 15; + +// main function to handle the mouse events // +function ddMenu(id,d){ + var h = document.getElementById(id + '-ddheader'); + var c = document.getElementById(id + '-ddcontent'); + clearInterval(c.timer); + if(d == 1){ + clearTimeout(h.timer); + if(c.maxh && c.maxh <= c.offsetHeight){return} + else if(!c.maxh){ + c.style.display = 'block'; + c.style.height = 'auto'; + c.maxh = c.offsetHeight; + c.style.height = '0px'; + } + c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); + }else{ + h.timer = setTimeout(function(){ddCollapse(c)},50); + } +} + +// collapse the menu // +function ddCollapse(c){ + c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER); +} + +// cancel the collapse if a user rolls over the dropdown // +function cancelHide(id){ + var h = document.getElementById(id + '-ddheader'); + var c = document.getElementById(id + '-ddcontent'); + clearTimeout(h.timer); + clearInterval(c.timer); + if(c.offsetHeight < c.maxh){ + c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); + } +} + +// incrementally expand/contract the dropdown and change the opacity // +function ddSlide(c,d){ + var currh = c.offsetHeight; + var dist; + if(d == 1){ + dist = (Math.round((c.maxh - currh) / DDSPEED)); + }else{ + dist = (Math.round(currh / DDSPEED)); + } + if(dist <= 1 && d == 1){ + dist = 1; + } + c.style.height = currh + (dist * d) + 'px'; + c.style.opacity = currh / c.maxh; + c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')'; + if((currh < 2 && d != 1) || (currh > (c.maxh - 2) && d == 1)){ + clearInterval(c.timer); + } +} \ No newline at end of file diff --git a/Hospital Management System/WebContent/WEB-INF/empattnd.jsp b/Hospital Management System/WebContent/WEB-INF/empattnd.jsp new file mode 100644 index 00000000..fbd9d25a --- /dev/null +++ b/Hospital Management System/WebContent/WEB-INF/empattnd.jsp @@ -0,0 +1,19 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> +PATIENT ID<input type="text" name="t1" maxlength=10 size=20><BR> +PATIENT NAME<input type="text" name="t1" maxlength=10 size=20><BR> +PATIENT DEPARTMENT<input type="text" name="t1" maxlength=10 size=20><BR> +CONTACT NO<input type="text" name="t1" maxlength=10 size=20><BR> +GENDER<SELECT> +<option>MALE +<OPTION> FEMALE +</SELECT><BR> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/WEB-INF/web.xml b/Hospital Management System/WebContent/WEB-INF/web.xml new file mode 100644 index 00000000..406fb3fc --- /dev/null +++ b/Hospital Management System/WebContent/WEB-INF/web.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> + <display-name> + hosp</display-name> + <servlet> + <description> + </description> + <display-name> + as</display-name> + <servlet-name>as</servlet-name> + <servlet-class> + as</servlet-class> + </servlet> + <servlet> + <description> + </description> + <display-name> + srv1</display-name> + <servlet-name>srv1</servlet-name> + <servlet-class> + srv1</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>as</servlet-name> + <url-pattern>/as</url-pattern> + </servlet-mapping> + <servlet-mapping> + <servlet-name>srv1</servlet-name> + <url-pattern>/srv1</url-pattern> + </servlet-mapping> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app> diff --git a/Hospital Management System/WebContent/addmed.jsp b/Hospital Management System/WebContent/addmed.jsp new file mode 100644 index 00000000..9454ec81 --- /dev/null +++ b/Hospital Management System/WebContent/addmed.jsp @@ -0,0 +1,239 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>MEDICINE WINDOW</title> +</head> +<body bgcolor="lightblue"> +<form action="addmed.jsp" method=post> +<center> +<table border=3 width=500> +<tr><td> +<h1>MEDICINE DATABASE</h1> +</td></tr> +</table> +<br><br><br> +<table border=5 width=800> +<tr> +<td> +<%!String a="",b="",d="",e="",f="",g="",h="",i="",j=""; %> +<table BORDER=3 > +<br><br><br> +<tr><td>MEDICINE ID<input type="text" name="t1" maxlength=10 size=20 value=<%=j%>><BR> +</td> +<td><h4>MEDICINE DETAILS</h4> +</td> +</tr> +<tr> +<td> +<input type="submit" name="Button1" value="ADD MEDICINE PROFILE"><br><br> +<input type="submit" name="Button1" value="SEARCH MEDICINE PROFILE"><br><br> +<input type="submit" name="Button1" value="DELETE MEDICINE PROFILE"><br><br> +<input type="submit" name="Button1" value="EDIT MEDICINE PROFILE"><br><br> +<% +try +{ a=request.getParameter("Button1"); + if(a.equals("SEARCH MEDICINE PROFILE")) + { + String str1= request.getParameter("t1"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(str1!="") + { + String sql2="select * from medicine where med_code='"+str1+"'"; + ResultSet r=s.executeQuery(sql2); + if(r.next()) + { + j=r.getString(1); + b=r.getString(2); + d=r.getString(3); + e=r.getString(4); + f=r.getString(5); + g=r.getString(6); + h=r.getString(7); + } + else + { + %><script language="javascript"> + alert("MEDICINE ID=<%=str1%>does not exist in database..!!!"); + </script> + <% + } + + } + else + { + %><script language="javascript"> + alert("ENTER MEDICINE ID TO SEARCH..!!!"); + </script> + <% + } + } +}catch(Exception e) {} +%> + +</td> +<td> +<br> +<br> +MEDICINE NAME<input type="text" name="t2" maxlength=10 size=20 value=<%=b%>><BR> +MANUFACTURER<input type="text" name="t3" maxlength=10 size=20 value=<%=d%>><BR> +DATE OF MANUFACTURE<input type="text" name="t4" maxlength=10 size=20 value=<%=e%>><BR> +MEDICINE TYPE<input type="text" name="t5" maxlength=10 size=20 value=<%=f%>><BR> +EXPIRY DATE<input type="text" name="t6" maxlength=10 size=20 value=<%=g%>><BR> +BATCH NO<input type="text" name="t7" maxlength=10 size=20 value=<%=h%>><BR> +</td> + + +</tr> +<% +try{ + + a=request.getParameter("Button1"); + String str1= request.getParameter("t1"); + String str2= request.getParameter("t2"); + String str3= request.getParameter("t3"); + String str4= request.getParameter("t4"); + String str5= request.getParameter("t5"); + String str6= request.getParameter("t6"); + String str7= request.getParameter("t7"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(a.equals("ADD MEDICINE PROFILE")) + { + + if(str1!=""&&str2!=""&&str3!=""&&str4!=""&&str5!=""&&str6!=""&&str7!="") + { + String sql="insert into medicine values("+str1+",'"+str2+"','"+str3+"','"+str4+"','"+str5+"','"+str6+"',"+str7+")"; + out.println(sql); + s.execute(sql); + %><script language="javascript"> + alert("INSERT SUCESSFUL"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("ENTER COMPLETE DETAILS..!!!"); + </script> + <% + } + } + else if(a.equals("DELETE MEDICINE PROFILE")) + { + if(str1!="") + { + String sq="select * from medicine where med_code="+str1+""; + ResultSet rs1=s.executeQuery(sq); + if(rs1.next()) + { + + String sql="delete from medicine where med_code="+str1+""; + s.execute(sql); + %><script language="javascript"> + alert("PROFILE OF MEDICINE WITH ID <%=str1%>DELETED"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("INVALID MEDICINE ID <%=str1%>..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER MEDICINE'S ID TO DELETE..!!!"); + </script> + <% + } + } + else if(a.equals("EDIT MEDICINE PROFILE")) + { + if(str1!="") + { + String sq="select * from medicine where med_code="+str1+""; + ResultSet rs1=s.executeQuery(sq); + if(rs1.next()) + { + String sql="delete from medicine where med_code="+str1+""; + s.execute(sql); + String sql1="insert into medicine values("+str1+",'"+str2+"','"+str3+"','"+str4+"','"+str5+"','"+str6+"',"+str7+")"; + s.execute(sql1); + %><script language="javascript"> + alert("PROFILE OF MEDICINE WITH ID <%=str1%>EDITED"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("INVALID MEDICINE ID <%=str1%>..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER MEDICINE'S ID TO EDIT..!!!"); + </script> + <% + } + } + }catch(Exception e) {} + +%> + +</table> +<input type="button" name="bttn" value="HOME" onclick="location.href='home.jsp'"> +</td> +</tr> +</table> +<h4>DEPARTMENT PROFILE TABLE</h4> +<table cellspacing=3 cellpadding=5 border="2" > + +<th colspan=1 align=center>MEDICINE ID</th> +<th colspan=1 align=center>MEDICINE NAME</th> +<th colspan=1 align=center>MANUFACTURER</th> +<th colspan=1 align=center>DATE OF MANUFACTURE</th> +<th colspan=1 align=center>MEDICINE TYPE</th> +<th colspan=1 align=center>EXPIRY DATE</th> +<th colspan=1 align=center>BATCH NO</th> +<% +try +{ + String str1= request.getParameter("t1"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + String q="select * from medicine"; + ResultSet rs9=s.executeQuery(q); + while(rs9.next()) + {%><tr> + + <% + for (int i=1; i<=7; i++) + { + out.println( "<td > " + rs9.getString (i) ); + + } + }%></tr><% +}catch(Exception e) {} +%> + + +</table> + +</center> +</form> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/addoc.jsp b/Hospital Management System/WebContent/addoc.jsp new file mode 100644 index 00000000..cb38c4f6 --- /dev/null +++ b/Hospital Management System/WebContent/addoc.jsp @@ -0,0 +1,209 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>DOCTORS INFORMATION WINDOW</title> +</head> +<body background="Hospital main entrance-blue sky.jpg" bgproperties="fixed"> +<center> +<table border=3 width=500> +<tr><td> +<h1>DOCTOR PROFILE WINDOW</h1> +</td></tr> +</table> +<br><br><br> +<table border=5 width=800> +<tr> +<td> +<form action="addoc.jsp" method=post> +<%!String a="",b="",d="",e="",f="",g="",h="",i="",j=""; %> +<table BORDER=3 > +<br><br><br> +<tr><td>DOCTOR ID<input type="text" name="t1" maxlength=10 size=20><BR> +</td> +<td><h4>DOCTOR DETAILS</h4> +</td> +</tr> +<tr> +<td> +<input type="submit" name="Button1" value="ADD DOCTOR PROFILE"><br><br> +<input type="submit" name="Button1" value="SEARCH DOCTOR PROFILE"><br><br> +<input type="submit" name="Button1" value="DELETE DOCTOR PROFILE"><br><br> +<input type="submit" name="Button1" value="EDIT DOCTOR PROFILE"><br><br> +<% +try +{ a=request.getParameter("Button1"); + if(a.equals("SEARCH DOCTOR PROFILE")) + { + String str1= request.getParameter("t1"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(str1!="") + { + String sql2="select * from doctor where doc_id='"+str1+"'"; + ResultSet r=s.executeQuery(sql2); + if(r.next()) + { + j=r.getString(1); + b=r.getString(2); + d=r.getString(3); + e=r.getString(4); + f=r.getString(5); + g=r.getString(6); + h=r.getString(7); + i=r.getString(8); + } + else + { + %><script language="javascript"> + alert("DOCTOR ID=<%=str1%>does not exist in database..!!!"); + </script> + <% + } + + } + else + { + %><script language="javascript"> + alert("ENTER DOCTOR ID TO SEARCH..!!!"); + </script> + <% + } + } +}catch(Exception e) {} +%> + +</td> +<td> +<br> +<br> +DOCTOR NAME<input type="text" name="t2" maxlength=10 size=20 value=<%=b%>><BR> +DOCTOR EDUQUALIFICATION<input type="text" name="t3" maxlength=10 size=20 value=<%=d%>><BR> +DATE OF BIRTH<input type="text" name="t4" maxlength=10 size=20 value=<%=e%>><BR> +SALARY<input type="text" name="t5" maxlength=10 size=20 value=<%=f%>><BR> +FATHER'S NAME<input type="text" name="t6" maxlength=10 size=20 value=<%=g%>><BR> +EMAIL ID<input type="text" name="t7" maxlength=10 size=20 value=<%=h%>><BR> +DEPARTMENT ID<input type="text" name="t8" maxlength=10 size=20 value=<%=i%>><BR> +</td> + + +</tr> +<% +try{ + + a=request.getParameter("Button1"); + String str1= request.getParameter("t1"); + String str2= request.getParameter("t2"); + String str3= request.getParameter("t3"); + String str4= request.getParameter("t4"); + String str5= request.getParameter("t5"); + String str6= request.getParameter("t6"); + String str7= request.getParameter("t7"); + String str8= request.getParameter("t8"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(a.equals("ADD DOCTOR PROFILE")) + { + + if(str1!=""&&str2!=""&&str3!=""&&str4!=""&&str5!=""&&str6!=""&&str7!=""&&str8!="") + { + String sql="insert into doctor values("+str1+",'"+str2+"','"+str3+"','"+str4+"',"+str5+",'"+str6+"','"+str7+"',"+str8+")"; + out.println(sql); + s.execute(sql); + %><script language="javascript"> + alert("INSERT SUCESSFUL"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("ENTER COMPLETE DETAILS..!!!"); + </script> + <% + } + } + else if(a.equals("DELETE DOCTOR PROFILE")) + { + if(str1!="") + { + String sq="select * from doctor where doc_id="+str1+""; + ResultSet rs1=s.executeQuery(sq); + if(rs1.next()) + { + + String sql="delete from doctor where doc_id="+str1+""; + s.execute(sql); + %><script language="javascript"> + alert("PROFILE OF DOCTOR WITH ID <%=str1%>DELETED"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("INVALID DOCTOR ID <%=str1%>..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER DOCTOR'S ID TO DELETE..!!!"); + </script> + <% + } + } + else if(a.equals("EDIT DOCTOR PROFILE")) + { + if(str1!="") + { + String sq="select * from doctor where doc_id="+str1+""; + ResultSet rs1=s.executeQuery(sq); + if(rs1.next()) + { + String sql="delete from doctor where doc_id="+str1+""; + s.execute(sql); + String sql1="insert into doctor values("+str1+",'"+str2+"','"+str3+"','"+str4+"',"+str5+",'"+str6+"','"+str7+"',"+str8+")"; + s.execute(sql1); + %><script language="javascript"> + alert("PROFILE OF DOCTOR WITH ID <%=str1%>EDITED"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("INVALID DOCTOR ID <%=str1%>..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER DOCTOR'S ID TO EDIT..!!!"); + </script> + <% + } + } + }catch(Exception e) {} + +%> + +</table> +</form> +<input type="button" name="bttn" value="HOME" onclick="location.href='home.jsp'"> +</td> +</tr> +</table> +</center> + + +</body> +</html> diff --git a/Hospital Management System/WebContent/addpt.jsp b/Hospital Management System/WebContent/addpt.jsp new file mode 100644 index 00000000..68977028 --- /dev/null +++ b/Hospital Management System/WebContent/addpt.jsp @@ -0,0 +1,313 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>ADMIT NEW PATIENT</title> +</head> +<body background ="University_College_Hospital.jpg" bgproperties="fixed"> +<body bgcolor="lightblue"> +<form action="addpt.jsp" method=post> +<%!String a="",b="",d="",e="",f="",g="",h="",i="",j=""; %> +<center> +<table border=3> +<tr> +<td ALIGN=CENTER> +<h1>ADMIT NEW PATIENT</h1> +</td> +</tr> +</table> +<br><br> +<table border=5 width=1000> +<tr> +<td> +<h3>ADD NEW PATIENT</h3> +<table BORDER=3 > +<tr> +<td WIDTH=50%> +<br><br><br> +<h4>PATIENT DETAILS</h4> +<input type="submit" name="button1" value="SEARCH PATIENT" style="left:100px;top:215px;"> +<br> +<% +try +{ a=request.getParameter("button1"); + if(a.equals("SEARCH PATIENT")) + { + String str1= request.getParameter("t1"); + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(str1!="") + { + String sql2="select * from patient where patient_id='"+str1+"'"; + ResultSet r=s.executeQuery(sql2); + if(r.next()) + { + j=r.getString(1); + b=r.getString(2); + d=r.getString(3); + e=r.getString(4); + f=r.getString(5); + g=r.getString(6); + h=r.getString(7); + i=r.getString(8); + } + else + { + %><script language="javascript"> + alert("PATIENT ID=<%=str1%>does not exist in database..!!!"); + </script> + <% + } + + } + else + { + %><script language="javascript"> + alert("ENTER PATIENT ID TO SEARCH..!!!"); + </script> + <% + } + } +}catch(Exception e) {} +%> +PATIENT ID <input type="text" name="t1" maxlength=10 size=20 value=<%=j%>><BR> +PATIENT NAME <input type="text" name="t2" maxlength=10 size=20 value=<%=b%>><BR> +DATE OF BIRTH <input type="text" name="t3" maxlength=10 size=20 value=<%=d%>><BR> +DOCTOR FEE <input type="text" name="t4" maxlength=10 size=20 value=<%=e%>><BR> +FATHER'S NAME <input type="text" name="t5" maxlength=10 size=20 value=<%=f%>><BR> +DEPARTMENT ID <input type="text" name="t6" maxlength=10 size=20 value=<%=h%>><BR> +BLOOD GROUP <input type="text" name="t7" maxlength=10 size=20 value=<%=g%>><BR> +GENDER <SELECT name="t8" value=<%=i%>> + <option>MALE + <OPTION> FEMALE + </SELECT><BR><br> +<input type="submit" name="button1" value="EDIT PATIENT DETAILS"> +<br> +<br> +<br> +</td> +<% +try +{ a=request.getParameter("button1"); + if(a.equals("EDIT PATIENT DETAILS")) + { + String str1= request.getParameter("t1"); + String str2= request.getParameter("t2"); + String str3= request.getParameter("t3"); + String str4= request.getParameter("t4"); + String str5= request.getParameter("t5"); + String str6= request.getParameter("t6"); + String str7= request.getParameter("t7"); + String str8= request.getParameter("t8"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(str1!="") + { + String sql2="select * from patient where patient_id='"+str1+"'"; + ResultSet rs1=s.executeQuery(sql2); + if(rs1.next()) + { + + String sql1="select * from department where dept_id='"+str6+"'"; + ResultSet rs=s.executeQuery(sql1); + if(rs.next()) + { + String sq="delete from patient where patient_id='"+str1+"'"; + s.execute(sq); + String sql="insert into patient values("+str1+",'"+str2+"','"+str3+"','"+str4+"','"+str5+"','"+str7+"','"+str6+"','"+str8+"')"; + s.execute(sql); + %><script language="javascript"> + alert("INSERT SUCESSFUL"); + </script> + <% + + } + else + { + %><script language="javascript"> + alert("DEPARTMENT ID=<%=str6%>does not exist in database..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("NO PATIENT WITH ID=<%=str1%> exists in hospital..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER PATIENT ID TO EDIT..!!!"); + </script> + <% + } + } +}catch(Exception e) {} + +%> +<td WIDTH=50%> +<h4>BED ALLOCATION DETAILS</h4> +PATIENT ID<input type="text" name="t9" maxlength=10 size=20><BR> +BED NO<input type="text" name="t10" maxlength=10 size=20><BR> +DATE OF ALLOCTN<input type="text" name="t11" maxlength=10 size=20><BR> +CHARGES<input type="text" name="t12" maxlength=10 size=20><BR> +ROOM TYPE<input type="text" name="t13" maxlength=10 size=20><BR> +</td> +</tr> +<tr> +<TD COLSPAN=2><input type="submit" name="button1" value="ADMIT PATIENT AND ALLOT BED"></TD> +</tr> +</table> +<% +try +{ + a=request.getParameter("button1"); + + if(a.equals("ADMIT PATIENT AND ALLOT BED")) + { + String str1= request.getParameter("t1"); + String str2= request.getParameter("t2"); + String str3= request.getParameter("t3"); + String str4= request.getParameter("t4"); + String str5= request.getParameter("t5"); + String str6= request.getParameter("t6"); + String str7= request.getParameter("t7"); + String str8= request.getParameter("t8"); + String str11= request.getParameter("t9"); + String str12= request.getParameter("t10"); + String str13= request.getParameter("t11"); + String str14= request.getParameter("t12"); + String str15= request.getParameter("t13"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(str1!=""&&str2!=""&&str3!=""&&str4!=""&&str5!=""&&str6!=""&&str7!=""&&str8!=""&&str11!=""&&str12!=""&&str13!=""&&str14!=""&&str15!="") + { + String sq1="select * from department where dept_id="+str6+""; + ResultSet r4=s.executeQuery(sq1); + if(r4.next()) + { + String sq2="select * from rooms where bed_no ="+str12+""; + ResultSet r5=s.executeQuery(sq2); + if(r5.next()) + { + %><script language="javascript"> + alert("BED IS ALREADY OCCUPIED"); + </script> + <% + } + else + { + String sq4="insert into patient values("+str1+",'"+str2+"','"+str3+"','"+str4+"','"+str5+"','"+str7+"','"+str6+"','"+str8+"','A')"; + out.println(sq4); + s.execute(sq4); + String sq3="insert into rooms values("+str11+","+str12+",'"+str15+"',"+str14+",'"+str13+"')"; + out.println(sq3); + s.execute(sq3); + %><script language="javascript"> + alert("INSERT SUCESSFUL"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("DEPARTMENT ID=<%=str6%>does not exist in database..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER COMPLETE DETAILS..!!!"); + </script> + <% + } + } + +}catch(Exception e) {} +%> +<h3>PATIENTS ADMITTED IN HOSPITAL</h3> +<table border="1"> + +<th colspan=1 align=center>PATIENT ID</th> +<th colspan=1 align=center>PATIENT NAME</th> +<th colspan=1 align=center>DATE OF BIRTH</th> +<th colspan=1 align=center>DOCTOR'S FEE</th> +<th colspan=1 align=center>FATHER'S NAME</th> +<th colspan=1 align=center>BLOOD GROUP</th> +<th colspan=1 align=center>DEPARTMENT ID</th> +<th colspan=1 align=center>SEX</th> +<% + try + { + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c= DriverManager.getConnection("jdbc:odbc:abc", "root", "data"); + Statement s=c.createStatement(); + String sql1="select * from patient"; + ResultSet rs=s.executeQuery(sql1); + while(rs.next()) + {%><tr> + + <% + for (int i=1; i<=8; i++) + { + out.println( "<td > " + rs.getString (i) ); + + } + }%></tr><% + + }catch(Exception e) { } +%> + + +</table> +<br><br><br> +<h3>BEDS OCCUPIED IN HOSPITAL ACCOMODATION</h3> +<table border="1"> +<th colspan=1 align=center>PATIENT ID</th> +<th colspan=1 align=center>BED NO</th> +<th colspan=1 align=center>ROOM TYPE</th> +<th colspan=1 align=center>CHARGES</th> +<th colspan=1 align=center>ALLOCATION DATE</th> +<% + try + { + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c= DriverManager.getConnection("jdbc:odbc:abc", "root", "data"); + Statement s=c.createStatement(); + String sql1="select * from rooms"; + ResultSet rs=s.executeQuery(sql1); + while(rs.next()) + {%><tr> + + <% + for (int i=1; i<=5; i++) + { + out.println( "<td > " + rs.getString (i) ); + + } + }%></tr><% + + }catch(Exception e) { } +%> +</table> + + +</table> +</center> +</form> +<input type="submit" name="bttn" value="HOME" onclick="location.href='home.jsp'"> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/adnurse.jsp b/Hospital Management System/WebContent/adnurse.jsp new file mode 100644 index 00000000..d1ce2233 --- /dev/null +++ b/Hospital Management System/WebContent/adnurse.jsp @@ -0,0 +1,204 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>NURSE PROFILE WINDOW</title> +</head> +<body background ="foliage-swirls-000145-light-sky-blue.jpg" bgproperties="fixed"> +<center> +<table border=3 width=500> +<tr><td> +<h1>NURSE PROFILE WINDOW</h1> +</td></tr> +</table> +<br><br><br>1 +<table border=5 width=800> +<tr> +<td> +<form action="adnurse.jsp" method=post> +<%!String a="",b="",d="",e="",f="",g="",h="",i="",j=""; %> +<table BORDER=3 > +<br><br><br> +<tr><td>NURSE ID<input type="text" name="t1" maxlength=10 size=20><BR> +</td> +<td><h4>NURSE DETAILS</h4> +</td> +</tr> +<tr> +<td> +<input type="submit" name="Button1" value="ADD NURSE PROFILE"><br><br> +<input type="submit" name="Button1" value="SEARCH NURSE PROFILE"><br><br> +<input type="submit" name="Button1" value="DELETE NURSE PROFILE"><br><br> +<input type="submit" name="Button1" value="EDIT NURSE PROFILE"><br><br> +<% +try +{ a=request.getParameter("Button1"); + if(a.equals("SEARCH NURSE PROFILE")) + { + String str1= request.getParameter("t1"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(str1!="") + { + String sql2="select * from nurse where nur_id='"+str1+"'"; + ResultSet r=s.executeQuery(sql2); + if(r.next()) + { + j=r.getString(1); + b=r.getString(2); + d=r.getString(3); + e=r.getString(4); + f=r.getString(5); + g=r.getString(6); + h=r.getString(7); + } + else + { + %><script language="javascript"> + alert("NURSE ID=<%=str1%>does not exist in database..!!!"); + </script> + <% + } + + } + else + { + %><script language="javascript"> + alert("ENTER NURSE ID TO SEARCH..!!!"); + </script> + <% + } + } +}catch(Exception e) {} +%> + +</td> +<td> +<br> +<br> +NURSE NAME<input type="text" name="t2" maxlength=10 size=20 value=<%=b%>><BR> +NURSE EDUQUALIFICATION<input type="text" name="t3" maxlength=10 size=20 value=<%=d%>><BR> +DATE OF BIRTH<input type="text" name="t4" maxlength=10 size=20 value=<%=e%>><BR> +SALARY<input type="text" name="t5" maxlength=10 size=20 value=<%=f%>><BR> +FATHER'S NAME<input type="text" name="t6" maxlength=10 size=20 value=<%=g%>><BR> +DEPARTMENT ID<input type="text" name="t7" maxlength=10 size=20 value=<%=h%>><BR> +</td> + + +</tr> +<% +try{ + + a=request.getParameter("Button1"); + String str1= request.getParameter("t1"); + String str2= request.getParameter("t2"); + String str3= request.getParameter("t3"); + String str4= request.getParameter("t4"); + String str5= request.getParameter("t5"); + String str6= request.getParameter("t6"); + String str7= request.getParameter("t7"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(a.equals("ADD NURSE PROFILE")) + { + + if(str1!=""&&str2!=""&&str3!=""&&str4!=""&&str5!=""&&str6!=""&&str7!="") + { + String sql="insert into nurse values("+str1+",'"+str2+"','"+str3+"','"+str4+"',"+str5+",'"+str6+"',"+str7+")"; + out.println(sql); + s.execute(sql); + %><script language="javascript"> + alert("INSERT SUCESSFUL"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("ENTER COMPLETE DETAILS..!!!"); + </script> + <% + } + } + else if(a.equals("DELETE NURSE PROFILE")) + { + if(str1!="") + { + String sq="select * from nurse where nur_id="+str1+""; + ResultSet rs1=s.executeQuery(sq); + if(rs1.next()) + { + + String sql="delete from nurse where nur_id="+str1+""; + s.execute(sql); + %><script language="javascript"> + alert("PROFILE OF NURSE WITH ID <%=str1%>DELETED"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("INVALID NURSE ID <%=str1%>..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER NURSE'S ID TO DELETE..!!!"); + </script> + <% + } + } + else if(a.equals("EDIT NURSE PROFILE")) + { + if(str1!="") + { + String sq="select * from nurse where nur_id="+str1+""; + ResultSet rs1=s.executeQuery(sq); + if(rs1.next()) + { + String sql="delete from nurse where nur_id="+str1+""; + s.execute(sql); + String sql1="insert into nurse values("+str1+",'"+str2+"','"+str3+"','"+str4+"',"+str5+",'"+str6+"',"+str7+")"; + s.execute(sql1); + %><script language="javascript"> + alert("PROFILE OF NURSE WITH ID <%=str1%>EDITED"); + </script> + <% + } + else + { + %><script language="javascript"> + alert("INVALID NURSE ID <%=str1%>..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER NURSE'S ID TO EDIT..!!!"); + </script> + <% + } + } + }catch(Exception e) {} + +%> + +</table> +</form> +<input type="submit" name="bttn" value="HOME" onclick="location.href='home.jsp'"> +</td> +</tr> +</table> +</center> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/apponit.jsp b/Hospital Management System/WebContent/apponit.jsp new file mode 100644 index 00000000..049a6d93 --- /dev/null +++ b/Hospital Management System/WebContent/apponit.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> +<h1>SET APPOINMENT</h1> +PATIENT ID<input type="text" name="t1" maxlength=10 size=20><BR> +DOCTOR ID<input type="text" name="t1" maxlength=10 size=20><BR> +DATE<input type="text" name="t1" maxlength=10 size=20><BR> +DESCRIPTION<input type="text" name="t1" maxlength=10 size=20><BR> +PRESCRIPTION<input type="text" name="t1" maxlength=10 size=20><BR> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/bill.jsp b/Hospital Management System/WebContent/bill.jsp new file mode 100644 index 00000000..e30e1d58 --- /dev/null +++ b/Hospital Management System/WebContent/bill.jsp @@ -0,0 +1,82 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>BILL WINDOW</title> +</head> +<body background="foliage-swirls-000145-light-sky-blue.jpg"> +<center> +<h1>FORTIS HOSPITAL</h1> +<h3>BILL RECEIPT</h3> +<%! String abc,a,b,d,e,g,h,i,j,k,z; int m1=0,f=0,l=0;%> +<% + String b=(String)session.getAttribute("abc"); +%> +<% +try +{ + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + String sq="select * from patient where patient_id="+b; + ResultSet rs=s.executeQuery(sq); + if(rs.next()) + { + z=rs.getString(1); + d=rs.getString(2); + e=rs.getString(3); + f=Integer.parseInt(rs.getString(4)); + g=rs.getString(5); + h=rs.getString(6); + i=rs.getString(7); + j=rs.getString(8);l=f+500+3000; + m1=3000; + } + +}catch(Exception e){ out.println(e);} +%> +<table border=2> +<tr> +<td colspan=7> +<h2>PATIENT DETAILS</h2> + +</td> +</tr> +<tr> +<td>PATIENT ID<br><%=z%></td> +<td>PATIENT NAME<br><%=d%></td> +<td>DATE OF BIRTH<br><%=e %></td> +<td>FATHER's NAME<br><%=g %></td> +<td>BLOOD GROUP<br><%=h %></td> +<td>DEPARTMENT ID<br><%=i %></td> +<td>SEX<br><%=j %></td> +</tr> +<tr> +<td colspan=7> +<h2>BILL DETAILS</h2> +</td></tr> +<tr><td colspan=7 ALIGN=left> +<pre> +DOCTOR FEE=<%=f%><br><br> +ACCOMODATION CHARGES=<%=m1%><br><br> +MAINTAINENCE FEE= Rs500<br><br> +TOTAL FEES=<%=l%> + + + +ACCOUNTS MANAGER +</pre> +</td> + + + +</tr> + + + +</table> +</center> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/blue_background.jpg b/Hospital Management System/WebContent/blue_background.jpg new file mode 100644 index 00000000..665d978f Binary files /dev/null and b/Hospital Management System/WebContent/blue_background.jpg differ diff --git a/Hospital Management System/WebContent/cfiles23725.jpg b/Hospital Management System/WebContent/cfiles23725.jpg new file mode 100644 index 00000000..141869e9 Binary files /dev/null and b/Hospital Management System/WebContent/cfiles23725.jpg differ diff --git a/Hospital Management System/WebContent/compaqblue7vy.jpg b/Hospital Management System/WebContent/compaqblue7vy.jpg new file mode 100644 index 00000000..d0ae9c36 Binary files /dev/null and b/Hospital Management System/WebContent/compaqblue7vy.jpg differ diff --git a/Hospital Management System/WebContent/dischrg.jsp b/Hospital Management System/WebContent/dischrg.jsp new file mode 100644 index 00000000..7ca1ff91 --- /dev/null +++ b/Hospital Management System/WebContent/dischrg.jsp @@ -0,0 +1,117 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>DISCHARGE WINDOW</title> +</head> +<body background ="compaqblue7vy.jpg"> +<body> +<form action="dischrg.jsp" method=post> +<%! String a,str1,b,d,e,abc; %> +<center> +<table border=3> +<tr> +<td> +<h1>DISCHARGE PATIENT</h1> +</td> +</tr> +</table> +<br><br><br><br> +<table border=2> +<tr><td> +ENTER THE PATIENT ID TO DISCHARGE--<input type="text" name="t1" maxlength=10 size=20><BR> +<input type="submit" name="button1" value="ENTER"><br><br><br><br> +</td> +</tr> +<tr> +<td> +<% + try{ + a=request.getParameter("button1"); + if(a.equals("ENTER")) + { + str1= request.getParameter("t1"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(str1!="") + { + String sq="select * from patient where patient_id="+str1+""; + ResultSet rs1=s.executeQuery(sq); + if(rs1.next()) + { + out.println("PATIENT ID="+rs1.getString(1)); %><br><% + out.println("PATIENT NAME="+rs1.getString(2)); %><br><% + out.println("DATE OF BIRTH="+rs1.getString(3)); %><br><% + out.println("DOCTOR FEE ="+rs1.getString(4)); %><br><% + out.println("FATHER'S NAME ="+rs1.getString(5)); %><br><% + out.println("DEPARTMENT ID="+rs1.getString(6)); %><br><% + out.println("BLOOD GROUP ="+rs1.getString(7)); %><br><% + out.println("GENDER ="+rs1.getString(8)); %><br><% + %><br> + <h3>ARE YOU SURE YOU WANT TO DISCHARGE PATIENT</h3> + <input type="submit" name="button1" value="DISCHARGE"> + <input type="submit" name="button1" value="HOME" onclick="location.href'home.jsp'"> + </td> + </tr> + <% + } + else + { + %><script language="javascript"> + alert("INVALID PATIENT ID <%=str1%>..!!!"); + </script> + <% + } + } + else + { + %><script language="javascript"> + alert("ENTER PATIENT'S ID TO DISCHARGE..!!!"); + </script> + <% + } + } + }catch(Exception e){} +%> + +<% +try +{ + a=request.getParameter("button1"); + if(a.equals("DISCHARGE")) + { + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + + String sql="delete from rooms where patient_id="+str1+""; + //String sq2="update table patient set status='D' where patient_id="+str1+""; + //s.execute(sq2); + s.execute(sql); + %> + <script language="javascript"> + alert("PATIENT WITH ID <%=str1%> DISCHARGED"); + </script> + <% + session.setAttribute("abc",str1); + %> + <input type="button" name="button1" value="GENERATE BILL" onClick="fun()"> + + <script language="javascript"> + function fun() + { + winobj=window.open("bill.jsp","jj",""); + } + </script> +<% + } +}catch(Exception e){ } +%> +</table> +</center> +</form> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/docrep.jsp b/Hospital Management System/WebContent/docrep.jsp new file mode 100644 index 00000000..4956d7ea --- /dev/null +++ b/Hospital Management System/WebContent/docrep.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/dropdown.css b/Hospital Management System/WebContent/dropdown.css new file mode 100644 index 00000000..5a3797af --- /dev/null +++ b/Hospital Management System/WebContent/dropdown.css @@ -0,0 +1,11 @@ +body {margin:25px; font:12px Verdana, Arial, Helvetica} +* {padding:0; margin:0} +.dropdown {float:left; padding-right:5px} +.dropdown dt {width:188px; border:2px solid #9ac1c9; padding:8px; font-weight:bold; cursor:pointer;} +.dropdown dt:hover {background:url(images/header_over.gif)} +.dropdown dd {position:absolute; overflow:hidden; width:208px; display:none; background:#fff; z-index:200; opacity:0} +.dropdown ul {width:204px; border:2px solid #9ac1c9; list-style:none; border-top:none} +.dropdown li {display:inline} +.dropdown a, .dropdown a:active, .dropdown a:visited {display:block; padding:5px; color:#333; text-decoration:none; background:#eaf0f2; width:194px} +.dropdown a:hover {background:#d9e1e4; color:#000} +.dropdown .underline {border-bottom:1px solid #b9d6dc} \ No newline at end of file diff --git a/Hospital Management System/WebContent/dropdown.js b/Hospital Management System/WebContent/dropdown.js new file mode 100644 index 00000000..762a9a29 --- /dev/null +++ b/Hospital Management System/WebContent/dropdown.js @@ -0,0 +1,58 @@ +var DDSPEED = 10; +var DDTIMER = 15; + +// main function to handle the mouse events // +function ddMenu(id,d){ + var h = document.getElementById(id + '-ddheader'); + var c = document.getElementById(id + '-ddcontent'); + clearInterval(c.timer); + if(d == 1){ + clearTimeout(h.timer); + if(c.maxh && c.maxh <= c.offsetHeight){return} + else if(!c.maxh){ + c.style.display = 'block'; + c.style.height = 'auto'; + c.maxh = c.offsetHeight; + c.style.height = '0px'; + } + c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); + }else{ + h.timer = setTimeout(function(){ddCollapse(c)},50); + } +} + +// collapse the menu // +function ddCollapse(c){ + c.timer = setInterval(function(){ddSlide(c,-1)},DDTIMER); +} + +// cancel the collapse if a user rolls over the dropdown // +function cancelHide(id){ + var h = document.getElementById(id + '-ddheader'); + var c = document.getElementById(id + '-ddcontent'); + clearTimeout(h.timer); + clearInterval(c.timer); + if(c.offsetHeight < c.maxh){ + c.timer = setInterval(function(){ddSlide(c,1)},DDTIMER); + } +} + +// incrementally expand/contract the dropdown and change the opacity // +function ddSlide(c,d){ + var currh = c.offsetHeight; + var dist; + if(d == 1){ + dist = (Math.round((c.maxh - currh) / DDSPEED)); + }else{ + dist = (Math.round(currh / DDSPEED)); + } + if(dist <= 1 && d == 1){ + dist = 1; + } + c.style.height = currh + (dist * d) + 'px'; + c.style.opacity = currh / c.maxh; + c.style.filter = 'alpha(opacity=' + (currh * 100 / c.maxh) + ')'; + if((currh < 2 && d != 1) || (currh > (c.maxh - 2) && d == 1)){ + clearInterval(c.timer); + } +} \ No newline at end of file diff --git a/Hospital Management System/WebContent/editdoc.jsp b/Hospital Management System/WebContent/editdoc.jsp new file mode 100644 index 00000000..e133e0f9 --- /dev/null +++ b/Hospital Management System/WebContent/editdoc.jsp @@ -0,0 +1,37 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> +ENTER DOCTOR ID TO EDIT <input type="text" name="t1" maxlength=10 size=20><BR> +<% +int k=0; +try{ + String str1= request.getParameter("t1"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c=DriverManager.getConnection ("jdbc:odbc:abc", "root", "data"); + Statement s= c.createStatement(); + if(str1!="") + { + String sql="select * from doctor where doc_id="+str1+")"; + s.execute(sql); + out.println ("Insert Successful"); + k=1; + } + }catch(Exception e) { out.println(e); } + +%> +DOCTOR NAME<input type="text" name="t2" maxlength=10 size=20><BR> +DOCTOR EDUQUALIFICATION<input type="text" name="t3" maxlength=10 size=20><BR> +DATE OF BIRTH<input type="text" name="t4" maxlength=10 size=20><BR> +FATHER'S NAME<input type="text" name="t5" maxlength=10 size=20><BR> +PHONE NO<input type="text" name="t6" maxlength=10 size=20><BR> +SALARY<input type="text" name="t7" maxlength=10 size=20><BR> +EMAIL ID<input type="text" name="t8" maxlength=10 size=20><BR> +<input type="submit" name="Button1" value="adddoc" style="position:absolute;font-family:Arial;font-size:13px;" > +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/empattn.jsp b/Hospital Management System/WebContent/empattn.jsp new file mode 100644 index 00000000..fbd9d25a --- /dev/null +++ b/Hospital Management System/WebContent/empattn.jsp @@ -0,0 +1,19 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> +PATIENT ID<input type="text" name="t1" maxlength=10 size=20><BR> +PATIENT NAME<input type="text" name="t1" maxlength=10 size=20><BR> +PATIENT DEPARTMENT<input type="text" name="t1" maxlength=10 size=20><BR> +CONTACT NO<input type="text" name="t1" maxlength=10 size=20><BR> +GENDER<SELECT> +<option>MALE +<OPTION> FEMALE +</SELECT><BR> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/foliage-swirls-000145-light-sky-blue.jpg b/Hospital Management System/WebContent/foliage-swirls-000145-light-sky-blue.jpg new file mode 100644 index 00000000..f5270774 Binary files /dev/null and b/Hospital Management System/WebContent/foliage-swirls-000145-light-sky-blue.jpg differ diff --git a/Hospital Management System/WebContent/home.jsp b/Hospital Management System/WebContent/home.jsp new file mode 100644 index 00000000..50223cc8 --- /dev/null +++ b/Hospital Management System/WebContent/home.jsp @@ -0,0 +1,100 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>WELCOME TO HOSPITAL MANAGEMENT SYSTEM</title> +<link rel="stylesheet" href="dropdown.css" type="text/css" /> +<script src = "dropdown.js" language="JavaScript"></script> +<style> +a.notr:link { color:#666666; } +a.notr:visited {color:#666666;} +a.notr:hover {color:#666666; } +</style> +</head> +<body background ="1.jpg"> +<center> +<table width=1000 border=5 > +<TR BGCOLOR="#99CCCC"> +<TD><h1>HOSPITAL MANAGEMENT SYSTEM</h1> +</TD> +</TR> +<TR > +<TD> +<pre> +<dl class="dropdown" style="left:135;" > + <dt id="one-ddheader" onmouseover="ddMenu('one',1)" onmouseout="ddMenu('one',-1)">DOCTOR</dt> + + <dd id="one-ddcontent" onmouseover="cancelHide('one')" onmouseout="ddMenu('one',-1)"> + <ul> + <li><a href="addoc.jsp" class="underline">ADD DOCTOR</a></li> + <li><a href="addoc.jsp" class="underline">UPDATE DOCTOR DETAILS</a></li> + <li><a href="addoc.jsp" class="underline">DELETE DOCTOR</a></li> + </ul> + </dd> +</dl> +<dl style="position:absolute;left:400px;top:75px;width:150px" class="dropdown"> + <dt id="two-ddheader" onmouseover="ddMenu('two',1)" onmouseout="ddMenu('two',-1)">PATIENT</dt> + <dd id="two-ddcontent" onmouseover="cancelHide('two')" onmouseout="ddMenu('two',-1)"> + <ul> + <li><a href="addpt.jsp" class="underline">ADD PATIENT</a></li> + <li><a href="addpt.jsp" class="underline">UPDATE PATIENT DETAILS</a></li> + <li><a href="dischrg.jsp" class="underline">DISCHARGE PATIENT</a></li> + </ul> + </dd> +</dl> +<dl style="position:absolute;left:650px;top:75px;width:100px" class="dropdown"> + <dt id="three-ddheader" onmouseover="ddMenu('three',1)" onmouseout="ddMenu('three',-1)">NURSE</dt> + <dd id="three-ddcontent" onmouseover="cancelHide('three')" onmouseout="ddMenu('three',-1)"> + <ul> + <li><a href="adnurse.jsp" class="underline">ADD NURSE</a></li> + <li><a href="adnurse.jsp" class="underline">UPDATE NURSE</a></li> + <li><a href="adnurse.jsp" class="underline">DELETE NURSE</a></li> + </ul> + </dd> +</dl> +<dl style="position:absolute;left:920px;top:75px;width:150px" class="dropdown"> + <dt id="four-ddheader" onmouseover="ddMenu('four',1)" onmouseout="ddMenu('four',-1)">WORK TIME</dt> + <dd id="four-ddcontent" onmouseover="cancelHide('four')" onmouseout="ddMenu('four',-1)"> + <ul> + <li><a href="empattn.jsp" class="underline">EMPLOYEE WORKTIME</a></li> + </ul> + </dd> +</dl> +<BR><BR><BR> +<dl class="dropdown"> + <dt id="five-ddheader" onmouseover="ddMenu('five',1)" onmouseout="ddMenu('five',-1)">DEPARTMENT</dt> + <dd id="five-ddcontent" onmouseover="cancelHide('five')" onmouseout="ddMenu('five',-1)"> + <ul> + <li><a href="DEPT.jsp" class="underline">DEPARTMENT DETAILS</a></li> + </ul> + </dd> +</dl> +<dl class="dropdown"> + <dt id="six-ddheader" onmouseover="ddMenu('six',1)" onmouseout="ddMenu('six',-1)">MEDICINE</dt> + <dd id="six-ddcontent" onmouseover="cancelHide('six')" onmouseout="ddMenu('six',-1)"> + <ul> + <li><a href="addmed.jsp" class="underline">ADD NEW MEDICINE</a></li> + <li><a href="addmed.jsp" class="underline">UPDATE MEDICINE DETAILS</a></li> + <li><a href="addmed.jsp" class="underline">DELETE EXPIRED MEDICINE</a></li> + </ul> + </dd> +</dl> +<dl class="dropdown"> + <dt id="seven-ddheader" onmouseover="ddMenu('seven',1)" onmouseout="ddMenu('seven',-1)">REPORT</dt> + <dd id="seven-ddcontent" onmouseover="cancelHide('seven')" onmouseout="ddMenu('seven',-1)"> + <ul> + <li><a href="docrep.jsp" class="underline">DOCTOR</a></li> + <li><a href="patrep.jsp" class="underline">PATIENT</a></li> + <li><a href="medrep.jsp" class="underline">MEDICINE</a></li> + </ul> + </dd> +</dl> +</pre> +</td> +</tr> +</table> +</center> +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/home_6.swf b/Hospital Management System/WebContent/home_6.swf new file mode 100644 index 00000000..c356bdab Binary files /dev/null and b/Hospital Management System/WebContent/home_6.swf differ diff --git a/Hospital Management System/WebContent/light-blue-wallpaper.jpg b/Hospital Management System/WebContent/light-blue-wallpaper.jpg new file mode 100644 index 00000000..189caa06 Binary files /dev/null and b/Hospital Management System/WebContent/light-blue-wallpaper.jpg differ diff --git a/Hospital Management System/WebContent/medical_doctor.jpg b/Hospital Management System/WebContent/medical_doctor.jpg new file mode 100644 index 00000000..be7ec93d Binary files /dev/null and b/Hospital Management System/WebContent/medical_doctor.jpg differ diff --git a/Hospital Management System/WebContent/medrep.jsp b/Hospital Management System/WebContent/medrep.jsp new file mode 100644 index 00000000..4956d7ea --- /dev/null +++ b/Hospital Management System/WebContent/medrep.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/nurse.jpg b/Hospital Management System/WebContent/nurse.jpg new file mode 100644 index 00000000..f5270774 Binary files /dev/null and b/Hospital Management System/WebContent/nurse.jpg differ diff --git a/Hospital Management System/WebContent/oestfold_hospital_arkitema260109_1.jpg b/Hospital Management System/WebContent/oestfold_hospital_arkitema260109_1.jpg new file mode 100644 index 00000000..c2b40e50 Binary files /dev/null and b/Hospital Management System/WebContent/oestfold_hospital_arkitema260109_1.jpg differ diff --git a/Hospital Management System/WebContent/patrep.jsp b/Hospital Management System/WebContent/patrep.jsp new file mode 100644 index 00000000..4956d7ea --- /dev/null +++ b/Hospital Management System/WebContent/patrep.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/sd.jsp b/Hospital Management System/WebContent/sd.jsp new file mode 100644 index 00000000..4956d7ea --- /dev/null +++ b/Hospital Management System/WebContent/sd.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/WebContent/transactn.jsp b/Hospital Management System/WebContent/transactn.jsp new file mode 100644 index 00000000..82caab7b --- /dev/null +++ b/Hospital Management System/WebContent/transactn.jsp @@ -0,0 +1,54 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body bgcolor="lightblue"> +<center> +<table border=3> +<tr> +<td ALIGN=CENTER> +<center><h1>TRANSACTION WINDOW</h1></center> +</td> +</tr> +</table> +<br> +<table border=5 width=1000> +<tr> +<td> +<center> +<form action="addpt.jsp" method=post> + +<table BORDER=3 > +<tr> +<td WIDTH=50%> +<br><br> + +PATIENT ID<input type="text" name="t1" maxlength=10 size=20><BR> +PATIENT NAME<input type="text" name="t1" maxlength=10 size=20><BR> +DEPARTMENT ID<input type="text" name="t1" maxlength=10 size=20><BR> +CONTACT NO<input type="text" name="t1" maxlength=10 size=20><BR> +BILL NO<input type="text" name="t1" maxlength=10 size=20><BR> +TOTAL AMOUNT<input type="text" name="t1" maxlength=10 size=20><BR> +DATE<input type="text" name="t1" maxlength=10 size=20><BR> +DOCTOR FEE<input type="text" name="t1" maxlength=10 size=20><BR> +MEDICINE FEE<input type="text" name="t1" maxlength=10 size=20><BR> +MODE<input type="text" name="t1" maxlength=10 size=20><BR> +</td> +</tr> +</table> +</form> +</center> +</td> +</tr> +</table> +</center> + + + + +</body> +</html> \ No newline at end of file diff --git a/Hospital Management System/build/classes/as.class b/Hospital Management System/build/classes/as.class new file mode 100644 index 00000000..c5a61a56 Binary files /dev/null and b/Hospital Management System/build/classes/as.class differ diff --git a/Hospital Management System/build/classes/srv1.class b/Hospital Management System/build/classes/srv1.class new file mode 100644 index 00000000..3080e015 Binary files /dev/null and b/Hospital Management System/build/classes/srv1.class differ diff --git a/Hospital Management System/home_6.swf b/Hospital Management System/home_6.swf new file mode 100644 index 00000000..c356bdab Binary files /dev/null and b/Hospital Management System/home_6.swf differ diff --git a/Hospital Management System/src/as.java b/Hospital Management System/src/as.java new file mode 100644 index 00000000..c5758da5 --- /dev/null +++ b/Hospital Management System/src/as.java @@ -0,0 +1,47 @@ + + +import java.io.IOException; +import java.sql.Connection; +import java.sql.DriverManager; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Servlet implementation class for Servlet: as + * + */ + public class as extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet { + static final long serialVersionUID = 1L; + + /* (non-Java-doc) + * @see javax.servlet.http.HttpServlet#HttpServlet() + */ + public as() { + super(); + } + + /* (non-Java-doc) + * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) + */ + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + + /* (non-Java-doc) + * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) + */ + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + try{ + Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c= DriverManager.getConnection ("jdbc:odbc:abc", "root", "root"); + Statement s= c.createStatement(); + String sql="insert into student values("+roll+",'"+str2+"')"; + s.execute (sql); + out.println ("Insert Successful"); + }catch(Exception e) { } + + // TODO Auto-generated method stub + } +} \ No newline at end of file diff --git a/Hospital Management System/src/srv1.java b/Hospital Management System/src/srv1.java new file mode 100644 index 00000000..17b135c8 --- /dev/null +++ b/Hospital Management System/src/srv1.java @@ -0,0 +1,48 @@ + + +import java.sql.Connection; +import java.sql.DriverManager; +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * Servlet implementation class for Servlet: srv1 + * + */ + public class srv1 extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet { + static final long serialVersionUID = 1L; + + /* (non-Java-doc) + * @see javax.servlet.http.HttpServlet#HttpServlet() + */ + public srv1() { + super(); + } + + /* (non-Java-doc) + * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) + */ + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + // TODO Auto-generated method stub + } + + /* (non-Java-doc) + * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) + */ + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + try{ + Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection c= DriverManager.getConnection ("jdbc:odbc:abc", "root", "root"); + Statement s= c.createStatement(); + String sql="select * from department where "; + s.execute (sql); + out.println ("Insert Successful"); + }catch(Exception e) { } + + // TODO Auto-generated method stub + + } +} \ No newline at end of file diff --git a/Hospital_scrapper.java b/Hospital_scrapper.java new file mode 100644 index 00000000..bd6b0bd6 --- /dev/null +++ b/Hospital_scrapper.java @@ -0,0 +1,182 @@ +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +class Patient { + private int id; + private String name; + private int age; + + public Patient(int id, String name, int age) { + this.id = id; + this.name = name; + this.age = age; + } + + public int getId() { + return id; + } + + public String getName() { + return name; + } + + public int getAge() { + return age; + } +} + +class Doctor { + private int id; + private String name; + private String specialization; + + public Doctor(int id, String name, String specialization) { + this.id = id; + this.name = name; + this.specialization = specialization; + } + + public int getId() { + return id; + } + + public String getName() { + return name; + } + + public String getSpecialization() { + return specialization; + } +} + +class Appointment { + private int id; + private Patient patient; + private Doctor doctor; + private String date; + + public Appointment(int id, Patient patient, Doctor doctor, String date) { + this.id = id; + this.patient = patient; + this.doctor = doctor; + this.date = date; + } + + public int getId() { + return id; + } + + public Patient getPatient() { + return patient; + } + + public Doctor getDoctor() { + return doctor; + } + + public String getDate() { + return date; + } +} + +public class HospitalManagementSystem { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + List<Patient> patients = new ArrayList<>(); + List<Doctor> doctors = new ArrayList<>(); + List<Appointment> appointments = new ArrayList<>(); + int patientIdCounter = 1; + int doctorIdCounter = 1; + int appointmentIdCounter = 1; + + while (true) { + System.out.println("Hospital Management System Menu:"); + System.out.println("1. Add Patient"); + System.out.println("2. Add Doctor"); + System.out.println("3. Schedule Appointment"); + System.out.println("4. View Appointments"); + System.out.println("5. Exit"); + System.out.print("Select an option (1/2/3/4/5): "); + + int option = scanner.nextInt(); + + switch (option) { + case 1: + scanner.nextLine(); + System.out.print("Enter patient name: "); + String patientName = scanner.nextLine(); + System.out.print("Enter patient age: "); + int patientAge = scanner.nextInt(); + patients.add(new Patient(patientIdCounter, patientName, patientAge)); + patientIdCounter++; + System.out.println("Patient added successfully."); + break; + case 2: + scanner.nextLine(); + System.out.print("Enter doctor name: "); + String doctorName = scanner.nextLine(); + System.out.print("Enter doctor specialization: "); + String doctorSpecialization = scanner.nextLine(); + doctors.add(new Doctor(doctorIdCounter, doctorName, doctorSpecialization)); + doctorIdCounter++; + System.out.println("Doctor added successfully."); + break; + case 3: + System.out.print("Enter patient ID: "); + int patientId = scanner.nextInt(); + System.out.print("Enter doctor ID: "); + int doctorId = scanner.nextInt(); + scanner.nextLine(); + System.out.print("Enter appointment date: "); + String appointmentDate = scanner.nextLine(); + + Patient patient = findPatientById(patients, patientId); + Doctor doctor = findDoctorById(doctors, doctorId); + + if (patient != null && doctor != null) { + appointments.add(new Appointment(appointmentIdCounter, patient, doctor, appointmentDate)); + appointmentIdCounter++; + System.out.println("Appointment scheduled successfully."); + } else { + System.out.println("Patient or doctor not found."); + } + break; + case 4: + System.out.println("Appointments:"); + for (Appointment appointment : appointments) { + System.out.println("Appointment ID: " + appointment.getId()); + System.out.println("Patient: " + appointment.getPatient().getName()); + System.out.println("Doctor: " + appointment.getDoctor().getName() + " (" + appointment.getDoctor().getSpecialization() + ")"); + System.out.println("Date: " + appointment.getDate()); + System.out.println(); + } + break; + case 5: + System.out.println("Exiting the Hospital Management System."); + scanner.close(); + System.exit(0); + default: + System.out.println("Invalid option. Please select 1, 2, 3, 4, or 5."); + } + } + } + + private static Patient findPatientById(List<Patient> patients, int id) { + for (Patient patient : patients) { + if (patient.getId() == id) { + return patient; + } + } + return null; + } + + private static Doctor findDoctorById(List<Doctor> doctors, int id) { + for (Doctor doctor : doctors) { + if (doctor.getId() == id) { + return doctor; + } + } + return null; + } +} diff --git a/Host-checker.java b/Host-checker.java new file mode 100644 index 00000000..cc158045 --- /dev/null +++ b/Host-checker.java @@ -0,0 +1,35 @@ +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.Scanner; + +public class WebsiteStatusChecker { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + System.out.print("Enter the website URL to check: "); + String urlToCheck = scanner.nextLine(); + + try { + int statusCode = checkWebsiteStatus(urlToCheck); + + if (statusCode >= 200 && statusCode < 400) { + System.out.println("Website is alive (HTTP Status Code: " + statusCode + ")"); + } else { + System.out.println("Website is down (HTTP Status Code: " + statusCode + ")"); + } + } catch (IOException e) { + System.err.println("Error checking website status: " + e.getMessage()); + } + } + + public static int checkWebsiteStatus(String url) throws IOException { + URL websiteURL = new URL(url); + HttpURLConnection connection = (HttpURLConnection) websiteURL.openConnection(); + connection.setRequestMethod("GET"); + connection.connect(); + int statusCode = connection.getResponseCode(); + connection.disconnect(); + + return statusCode; + } +} diff --git a/Image Gallery/.DS_Store b/Image Gallery/.DS_Store new file mode 100644 index 00000000..bb6d6330 Binary files /dev/null and b/Image Gallery/.DS_Store differ diff --git a/Image Gallery/css/ie10.css b/Image Gallery/css/ie10.css new file mode 100644 index 00000000..b8e63244 --- /dev/null +++ b/Image Gallery/css/ie10.css @@ -0,0 +1,13 @@ +/*! + * IE10 viewport hack for Surface/desktop Windows 8 bug + * Copyright 2014-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +/* + * See the Getting Started docs for more information: + * http://getbootstrap.com/getting-started/#support-ie10-width + */ +@-ms-viewport { width: device-width; } +@-o-viewport { width: device-width; } +@viewport { width: device-width; } \ No newline at end of file diff --git a/Image Gallery/css/mystyle.css b/Image Gallery/css/mystyle.css new file mode 100644 index 00000000..e69de29b diff --git a/Image Gallery/css/signin.css b/Image Gallery/css/signin.css new file mode 100644 index 00000000..78e16fd6 --- /dev/null +++ b/Image Gallery/css/signin.css @@ -0,0 +1,40 @@ +body { + padding-top: 40px; + padding-bottom: 40px; + background-color: #eee; +} + +.form-signin { + max-width: 330px; + padding: 15px; + margin: 0 auto; +} +.form-signin .form-signin-heading, +.form-signin .checkbox { + margin-bottom: 10px; +} +.form-signin .checkbox { + font-weight: normal; +} +.form-signin .form-control { + position: relative; + height: auto; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 10px; + font-size: 16px; +} +.form-signin .form-control:focus { + z-index: 2; +} +.form-signin input[type="email"] { + margin-bottom: -1px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} +.form-signin input[type="password"] { + margin-bottom: 10px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} \ No newline at end of file diff --git a/Image Gallery/css/thumbnail-gallery.css b/Image Gallery/css/thumbnail-gallery.css new file mode 100644 index 00000000..81f46548 --- /dev/null +++ b/Image Gallery/css/thumbnail-gallery.css @@ -0,0 +1,17 @@ +/*! + * Start Bootstrap - Thumbnail Gallery (http://startbootstrap.com/) + * Copyright 2013-2016 Start Bootstrap + * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) + */ + +body { + padding-top: 70px; /* Required padding for .navbar-fixed-top. Change if height of navigation changes. */ +} + +.thumb { + margin-bottom: 30px; +} + +footer { + margin: 50px 0; +} \ No newline at end of file diff --git a/Image Gallery/data/credentials.json b/Image Gallery/data/credentials.json new file mode 100644 index 00000000..52122810 --- /dev/null +++ b/Image Gallery/data/credentials.json @@ -0,0 +1,16 @@ +{ + "credentials": { + + "admin": { + "user":"admin", + "password": "root", + "type": "admin" + }, + + "normal": { + "user":"user", + "password": "user", + "type": "normal" + } + } +} \ No newline at end of file diff --git a/Image Gallery/default-thumbnail.jpg b/Image Gallery/default-thumbnail.jpg new file mode 100644 index 00000000..b6f2279a Binary files /dev/null and b/Image Gallery/default-thumbnail.jpg differ diff --git a/Image Gallery/gallery.php b/Image Gallery/gallery.php new file mode 100644 index 00000000..06f4b697 --- /dev/null +++ b/Image Gallery/gallery.php @@ -0,0 +1,99 @@ +<?php +include "includes/_process_include.php"; +include "includes/_header.php"; +include "includes/_login_check.php"; + +$galleryObj = new Gallery(); +$result = $galleryObj->getAllGallery(); +?> + + <div class="row"> + + <div class="col-lg-12"> + <h1 class="page-header">Galleries</h1> + </div> + + <?php + if($_SESSION['type'] == "admin") { + ?> + <div class="row"> + <div class="col-lg-4"> + <div class="input-group"> + <input type="text" id="galleryName" class="form-control" placeholder="Add Gallery"> + <span class="input-group-btn"> + <button class="btn btn-default" type="button" id="addGallerybtn">Add</button> + </span> + <div id="loader"></div> + </div><!-- /input-group --> + </div><!-- /.col-lg-6 --> + </div><!-- /.row --> + <?php } ?> + + <br /> + <div id="galleriesList" > + <?php + if(!empty($result)) { + foreach($result as $gallery) { + ?> + <div class="col-lg-3 col-md-4 col-xs-6 thumb"> + <?php + if($_SESSION['type'] == "admin") { + ?> + <!-- Dropdown action --> + <div class="btn-group"> + <button class="btn btn-default btn-xs dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + Actions <span class="caret"></span> + </button> + <ul class="dropdown-menu"> + <li><a href="" data-name="<?=$gallery?>" data-toggle="modal" data-target="#myModal" data-name="<?=$gallery?>" id="editGallerybtn">Edit Name</a></li> + <li><a href="" data-galleryname="<?=$gallery?>" id="deleteGallerybtn">Delete Gallery</a></li> + </ul> + </div> <!-- End Dropdown action --> + <?php } ?> + <a class="thumbnail" href="<?=Photos_Page_Link?>?gallery=<?=$gallery?>"> + <img class="img-responsive" src="default-thumbnail.jpg" alt=""> + <p><?=$gallery?></p> + </a> + + </div> + <?php + } + } else{ + echo '<div class="col-lg-3"><p class="alert alert-info">No Galleries Found</p></div>'; + } + ?> + </div> +</div> <!-- End row --> + +<!-- Modal --> +<div id="myModal" class="modal fade" role="dialog"> + <div class="modal-dialog"> + + <!-- Modal content--> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal">×</button> + <h4 class="modal-title">Edit Gallery Name</h4> + </div> + <div class="modal-body"> + <div class="row"> + <div class="col-lg-8"> + <div class="input-group"> + <input type="text" id="newGalleryName" class="form-control" placeholder="Add Gallery"> + <input type="hidden" id="oldGalleryName" class="form-control"> + <span class="input-group-btn"> + <button class="btn btn-default" type="button" id="editGalleryModalBtn">Edit</button> + </span> + <div id="loader"></div> + </div><!-- /input-group --> + </div><!-- /.col-lg-6 --> + </div><!-- /.row --> + </div> + </div> + + </div> +</div> + +<?php +include "includes/_footer.php"; +?> \ No newline at end of file diff --git a/Image Gallery/image_upload.php b/Image Gallery/image_upload.php new file mode 100644 index 00000000..4b36dd42 --- /dev/null +++ b/Image Gallery/image_upload.php @@ -0,0 +1,39 @@ +<?php +include "includes/_process_include.php"; + +$galleryName = htmlspecialchars(trim($_POST['galleryName'])); +$image = $_FILES['image']; + +$goBackLink = "<a href='".Photos_Page_Link."?gallery=".$galleryName."'>Go back to Gallery</a>"; + +$target_dir = Gallery_Folder.$galleryName."/"; + +$target_file = $target_dir . basename($image["name"]); + +$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); + +// Check if image file is a actual image or fake image +if($imageFileType != "jpg" && $imageFileType != "jpeg") { + echo "Sorry, only JPG and JPEG files are allowed."; + echo "<br />".$goBackLink; + exit; +} + +if(isset($galleryName)) { + + if (file_exists($target_file)) { + echo "Sorry, file already exists."; + echo "<br />".$goBackLink; + exit; + } + + if (move_uploaded_file($image["tmp_name"], $target_file)) { + header("location: ".Photos_Page_Link."?gallery=".$galleryName); + } else { + echo "Sorry, there was an error uploading your file."; + echo "<br />".$goBackLink; + exit; + } +} + +?> \ No newline at end of file diff --git a/Image Gallery/includes/_footer.php b/Image Gallery/includes/_footer.php new file mode 100644 index 00000000..113c65ed --- /dev/null +++ b/Image Gallery/includes/_footer.php @@ -0,0 +1,14 @@ +<footer> + <div class="row"> + <div class="col-lg-12 text-center"> + <p>Copyright © Projectworlds</p> + </div> + </div> + </footer> + </div> <!-- /container --> + + + <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> + <script src="js/myscript.js"></script> + </body> +</html> \ No newline at end of file diff --git a/Image Gallery/includes/_header.php b/Image Gallery/includes/_header.php new file mode 100644 index 00000000..03552fff --- /dev/null +++ b/Image Gallery/includes/_header.php @@ -0,0 +1,72 @@ +<?php +include "includes/_login_check.php"; +?> + +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <meta name="description" content=""> + <meta name="author" content=""> + + <title>Image Gallery</title> + + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script> + + <!-- Bootstrap core CSS --> + <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"> + + <!-- IE10 viewport hack for Surface/desktop Windows 8 bug --> + <link href="css/ie10.css" rel="stylesheet"> + + <!-- Custom styles for this template --> + <link href="css/signin.css" rel="stylesheet"> + + <!-- Custom styles for this template --> + <link href="css/thumbnail-gallery.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> + </head> + + <body> + + <!-- Navigation --> + <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> + <div class="container"> + <!-- Brand and toggle get grouped for better mobile display --> + <div class="navbar-header"> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="index.php">Image Gallery</a> + </div> + <!-- Collect the nav links, forms, and other content for toggling --> + <?php if($basename != "index") { ?> + <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> + <ul class="nav navbar-nav"> + <li> + <a href="gallery.php">Gallery</a> + </li> + <li> + <a href="" id="logoutbtn">Logout</a> + </li> + </ul> + </div> + <?php } ?> + <!-- /.navbar-collapse --> + </div> + <!-- /.container --> + </nav> + + <div class="container"> diff --git a/Image Gallery/includes/_login_check.php b/Image Gallery/includes/_login_check.php new file mode 100644 index 00000000..b058f65e --- /dev/null +++ b/Image Gallery/includes/_login_check.php @@ -0,0 +1,15 @@ +<?php + +// Getting index page name +$basename = substr(strtolower(basename($_SERVER['PHP_SELF'])),0,strlen(basename($_SERVER['PHP_SELF']))-4);; + +if(!isset($_SESSION['user']) && $basename != "index"){ + header("Location: ". Index_Page_Link); +} + +if($basename == "index") { + if(!empty($_SESSION['user'])) + header("Location:".Gallery_Page_Link); +} + +?> \ No newline at end of file diff --git a/Image Gallery/includes/_process_include.php b/Image Gallery/includes/_process_include.php new file mode 100644 index 00000000..b98eb91c --- /dev/null +++ b/Image Gallery/includes/_process_include.php @@ -0,0 +1,7 @@ +<?php +session_start(); + +include "modules/autoload.php"; +include "includes/app.definitions.php"; + +?> \ No newline at end of file diff --git a/Image Gallery/includes/app.definitions.php b/Image Gallery/includes/app.definitions.php new file mode 100644 index 00000000..ced06773 --- /dev/null +++ b/Image Gallery/includes/app.definitions.php @@ -0,0 +1,14 @@ +<?php + +// Credential File link +define("CREDENTIALS_FILE", "data/credentials.json"); + +// Folder Paths +define("Gallery_Folder", "photos/"); + +/* Page Links */ +define("Gallery_Page_Link" , "gallery.php"); +define("Index_Page_Link" , "index.php"); +define("Photos_Page_Link" , "photos.php"); + +?> \ No newline at end of file diff --git a/Image Gallery/index.php b/Image Gallery/index.php new file mode 100644 index 00000000..b41229e4 --- /dev/null +++ b/Image Gallery/index.php @@ -0,0 +1,24 @@ +<?php +include "includes/_process_include.php"; +include "includes/_header.php"; + +?> + +<form class="form-signin"> + <h2 class="form-signin-heading">Please sign in</h2> + <label for="inputEmail" class="sr-only">Username</label> + <input type="input" id="username" class="form-control" placeholder="Username" required autofocus> + <label for="inputPassword" class="sr-only">Password</label> + <input type="password" id="password" class="form-control" placeholder="Password" required> + <div class="checkbox"> + + </div> + <input type="hidden" id="nextURL" class="form-control" value=<?=Gallery_Page_Link ?>> + <button class="btn btn-lg btn-primary btn-block" id="loginbtn" type="button">Sign in</button> + + <div id="loader text-center"></div> +</form> + +<?php +include "includes/_footer.php"; +?> \ No newline at end of file diff --git a/Image Gallery/js/myscript.js b/Image Gallery/js/myscript.js new file mode 100644 index 00000000..f3b278aa --- /dev/null +++ b/Image Gallery/js/myscript.js @@ -0,0 +1,145 @@ +/***************************** Authentication Actions ******************************/ +$("#loginbtn").on("click", function(){ + var user = $("#username").val(); + var password = $("#password").val(); + var nextURL = $("#nextURL").val(); + + $("#loader").html('<img src="loader.gif">'); + + $.post("process-auth.php", {action: 'login', username: user, password: password}, function (response) { + + $("#loader").html(''); + var response = JSON.parse(response); + + if (response.success) { + window.location.href = nextURL; + } + else { + $("#loader").html('<p class="alert alert-danger">Invalid username/password</p>'); + } + }); +}); + + +$("#logoutbtn").on("click", function(){ + + $.post("process-auth.php", {action: 'logout'}, function (response) { + + window.location.href = "index.php"; + + }); +}); + + +/***************************** Gallery Actions ******************************/ +// Add Gallery Action +$("#addGallerybtn").on("click", function(){ + var galleryName = $("#galleryName").val(); + + if(galleryName != "") { + $("#loader").html('<img src="loader.gif">'); + + $.post("process-gallery.php", {action: 'addGallery', galleryName: galleryName}, function (response) { + + $("#loader").html(''); + var response = JSON.parse(response); + + if (response.success) { + location.reload(); + } + else { + console.log("Error Adding Gallery"); + } + }); + } +}); + +// Delete Gallery Action +$("#deleteGallerybtn").on("click", function(){ + var galleryName = $(this).data("galleryname"); + + if(galleryName != "") { + $("#loader").html('<img src="loader.gif">'); + + $.post("process-gallery.php", {action: 'deleteGallery', galleryName: galleryName}, function (response) { + + $("#loader").html(''); + var response = JSON.parse(response); + + if (response.success) { + location.reload(); + } + else { + console.log("Error Adding Gallery"); + } + }); + } +}); + + +// Edit Gallery Action +$(document).on("click", '#editGallerybtn', function(){ + var galleryName = $(this).data("name"); + $("#oldGalleryName").val(galleryName); +}); + +// Edit Gallery Modal Action +$("#editGalleryModalBtn").on("click", function(){ + var newName = $("#newGalleryName").val(); + var galleryName = $("#oldGalleryName").val(); + + if(galleryName != "") { + $("#loader").html('<img src="loader.gif">'); + + $.post("process-gallery.php", {action: 'editGallery', galleryName: galleryName, newName: newName}, function (response) { + + $("#loader").html(''); + var response = JSON.parse(response); + + if (response.success) { + location.reload(); + } + else { + console.log("Error Adding Gallery"); + } + }); + } +}); + + + +/***************************** Photos Actions ******************************/ +// Delete Photo Action +$("#deletePhotobtn").on("click", function(){ + var galleryName = $(this).data("galleryname"); + var photoName = $(this).data("photoname"); + + + if(galleryName != "") { + + $.post("process-photos.php", {action: 'deletePhoto', galleryName: galleryName, photoName: photoName}, function (response) { + + var response = JSON.parse(response); + + if (response.success) { + location.reload(); + //console.log("success"); + } + else { + console.log("Error Deleting Photo"); + } + }); + } +}); + + +$(document).on("click", '#popImage', function(){ + var imgSrc = $(this).data("imgsrc"); + $('#imagepreview').attr('src', imgSrc); + $('#imagemodal').modal('show'); +}); + +// $('#popImage').on('click', function() { +// $('.imagepreview').attr('src', $(this).find('img').attr('src')); +// $('#imagemodal').modal('show'); +// }); \ No newline at end of file diff --git a/Image Gallery/loader.gif b/Image Gallery/loader.gif new file mode 100644 index 00000000..62fff7db Binary files /dev/null and b/Image Gallery/loader.gif differ diff --git a/Image Gallery/modules/Gallery.Class.php b/Image Gallery/modules/Gallery.Class.php new file mode 100644 index 00000000..31cf1d56 --- /dev/null +++ b/Image Gallery/modules/Gallery.Class.php @@ -0,0 +1,99 @@ +<?php + +class Gallery { + + public function __construct() {} + + /** + * Read folder names inside photo folder + * @param + * NONE + * + * @return + * $final (ARRAY) + **/ + public function getAllGallery() { + $final = []; // empty array + $galleries = glob(Gallery_Folder."*"); // reading the gallery folder + + // filtering out the files + foreach($galleries as $gallery) { + if ($gallery === '.' or $gallery === '..') continue; + + if(is_dir($gallery)) + $final[] = explode("/",$gallery)[1]; + } + + return $final; + } + + /** + * Create folder using the name argument + * @param + * $name (string) + * + * @return + * Boolean + **/ + public function addGallery($name) { + if(!file_exists(Gallery_Folder.$name)) { + if(mkdir(Gallery_Folder.$name)){ + return true; + } + } + return false; + } + + + /** + * Delete folder using the name argument + * @param + * $name (string) + * + * @return + * Boolean + **/ + public function deleteGallery($name) { + $dir = Gallery_Folder.$name; + + if(file_exists($dir)) { + foreach(scandir($dir) as $file) { + if ('.' === $file || '..' === $file) continue; + if (is_dir("$dir/$file")) rmdir_recursive("$dir/$file"); + else unlink("$dir/$file"); + } + + if(rmdir($dir)) + return true; + } + return false; + } + + + /** + * rename a gallery folder name + * @param + * $currentName (string) + * $newName (string) + * + * @return + * Boolean + **/ + public function editGalleryName($currentName, $newName){ + if(file_exists(Gallery_Folder.$currentName)) { + if(rename(Gallery_Folder.$currentName, Gallery_Folder.$newName)){ + return true; + } + } + return false; + } + + + public function show($data) { + echo "<pre>"; + print_r($data); + echo "</pre>"; + exit; + } +} // End Gallery Class +?> \ No newline at end of file diff --git a/Image Gallery/modules/Login.Class.php b/Image Gallery/modules/Login.Class.php new file mode 100644 index 00000000..ecf6c8d7 --- /dev/null +++ b/Image Gallery/modules/Login.Class.php @@ -0,0 +1,75 @@ +<?php + +class Login { + + public function __construct(){} + + + /** + * Handle the login feature + * @param + * $username (string), $password (string) + * + * @return + * Boolean + **/ + public function login($username, $password){ + $loginCreds = $this->getCredentials(); + + foreach($loginCreds as $key => $value) { + if($loginCreds[$key]['user'] == $username && $loginCreds[$key]['password'] == $password) { + $data['type'] = $loginCreds[$key]['type']; + $data['result'] = true; + + return $data; + } + } + return false; + } + + /** + * Handle the logout feature by destroying session + * @param + * NONE + * + * @return + * Boolean + **/ + public function logout(){ + unset($_SESSION['user']); + session_destroy(); + + return true; + } + + + /** + * Read Credentials JSON file to get saved username and password + * @param + * NONE + * + * @return + * $data (ARRAY) + **/ + private function getCredentials() { + $jsonRead = file_get_contents(CREDENTIALS_FILE); + $jsonData = json_decode($jsonRead, true); + + foreach($jsonData['credentials'] as $key => $value) { + $data[$key]['user'] = $jsonData['credentials'][$key]['user']; + $data[$key]['password'] = $jsonData['credentials'][$key]['password']; + $data[$key]['type'] = $jsonData['credentials'][$key]['type']; + } + + return $data; + } + + public function show($data) { + echo "<pre>"; + print_r($data); + echo "</pre>"; + exit; + } + +} // End Login Class +?> \ No newline at end of file diff --git a/Image Gallery/modules/Photos.Class.php b/Image Gallery/modules/Photos.Class.php new file mode 100644 index 00000000..57295158 --- /dev/null +++ b/Image Gallery/modules/Photos.Class.php @@ -0,0 +1,54 @@ +<?php + +class Photos { + + public function __construct() {} + + /** + * Read photos names inside photo folder + * @param + * NONE + * + * @return + * $final (ARRAY) + **/ + public function getAllGalleryPhotos($gallery) { + $final = []; // empty array + $photos = scandir(Gallery_Folder.$gallery."/"); // reading the gallery folder + + // filtering out the files + foreach($photos as $photo) { + if ($photo === '.' or $photo === '..') continue; + + $final[] = $photo; + } + return $final; + } + + + /** + * Delete image using the name argument + * @param + * $name (string) + * + * @return + * Boolean + **/ + public function deleteGalleryPhotos($gallery,$photo) { + if(file_exists(Gallery_Folder.$gallery."/".$photo)) { + if(unlink(Gallery_Folder.$gallery."/".$photo)){ + return true; + } + } + return false; + } + + + public function show($data) { + echo "<pre>"; + print_r($data); + echo "</pre>"; + exit; + } +} // End Gallery Class +?> \ No newline at end of file diff --git a/Image Gallery/modules/autoload.php b/Image Gallery/modules/autoload.php new file mode 100644 index 00000000..efc6eac3 --- /dev/null +++ b/Image Gallery/modules/autoload.php @@ -0,0 +1,7 @@ +<?php + +function __autoload($Class) { + require("modules/".$Class.".Class.php"); +} + +?> \ No newline at end of file diff --git a/Image Gallery/photos.php b/Image Gallery/photos.php new file mode 100644 index 00000000..1e676ecd --- /dev/null +++ b/Image Gallery/photos.php @@ -0,0 +1,87 @@ +<?php +include "includes/_process_include.php"; +include "includes/_header.php"; +include "includes/_login_check.php"; + +$gallery = htmlspecialchars(trim($_GET['gallery'])); + +$photosObj = new Photos(); +$result = $photosObj->getAllGalleryPhotos($gallery); + +?> + +<div class="row"> + + <div class="col-lg-12"> + <h1 class="page-header">Photos</h1> + </div> + + <?php + if($_SESSION['type'] == "admin") { + ?> + <form action="image_upload.php" method="post" enctype="multipart/form-data"> + <div><strong>Only Jpeg allowed</strong></div> + <div class="row"> + <div class="col-lg-6"> + <div class="input-group"> + <input type="file" name="image" class="form-control" placeholder="Upload photo" accept="image/jpeg"> + <input type="hidden" name="galleryName" value="<?= $gallery ?>"> + <span class="input-group-btn"> + <button class="btn btn-default" type="submit">Upload</button> + </span> + </div><!-- /input-group --> + + </div><!-- /.col-lg-6 --> + </div><!-- /.row --> + </form> + <?php } ?> + <hr > + + <?php + if(!empty($result)) { + foreach($result as $photo) { + ?> + <div class="col-lg-3 col-md-4 col-xs-6 thumb"> + <?php + if($_SESSION['type'] == "admin") { + ?> + <!-- Dropdown action --> + <div class="btn-group"> + <button class="btn btn-default btn-xs dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> + Actions <span class="caret"></span> + </button> + <ul class="dropdown-menu"> + <li><a href="javascript:void(0)" data-galleryname="<?=$gallery?>" data-photoname="<?=$photo?>" id="deletePhotobtn">Delete Photo</a></li> + </ul> + </div> <!-- End Dropdown action --> + <?php } ?> + <a class="thumbnail" href="javascript:void(0)" id="popImage" data-imgsrc="<?=Gallery_Folder.$gallery."/".$photo?>"> + <img class="img-responsive" src="<?=Gallery_Folder.$gallery."/".$photo?>" alt=""> + </a> + </div> + <?php + } + } else{ + echo '<div class="col-lg-3"><p class="alert alert-info">No Photos Found</p></div>'; + } + ?> +</div> <!-- End row --> + + + +<div id="imagemodal" class="modal fade" role="dialog"> + <div class="modal-dialog"> + + <!-- Modal content--> + <div class="modal-content"> + <div class="modal-body"> + <img src="" id="imagepreview" class="img-responsive" > + </div> + </div> + + </div> +</div> + +<?php +include "includes/_footer.php"; +?> \ No newline at end of file diff --git a/Image Gallery/photos/Random Photos/Bugatti_Molsheim_PGOS_0735.0.jpg b/Image Gallery/photos/Random Photos/Bugatti_Molsheim_PGOS_0735.0.jpg new file mode 100644 index 00000000..24a1d171 Binary files /dev/null and b/Image Gallery/photos/Random Photos/Bugatti_Molsheim_PGOS_0735.0.jpg differ diff --git a/Image Gallery/photos/Random Photos/aaaaaaaaaaaaaaaaaa.jpg b/Image Gallery/photos/Random Photos/aaaaaaaaaaaaaaaaaa.jpg new file mode 100644 index 00000000..eaa3dfd9 Binary files /dev/null and b/Image Gallery/photos/Random Photos/aaaaaaaaaaaaaaaaaa.jpg differ diff --git a/Image Gallery/photos/Random Photos/dfh.jpg b/Image Gallery/photos/Random Photos/dfh.jpg new file mode 100644 index 00000000..891a4b4f Binary files /dev/null and b/Image Gallery/photos/Random Photos/dfh.jpg differ diff --git a/Image Gallery/photos/Random Photos/mi-redmi-6-na-original-imaf8qtkgh6qhs3p.jpeg b/Image Gallery/photos/Random Photos/mi-redmi-6-na-original-imaf8qtkgh6qhs3p.jpeg new file mode 100644 index 00000000..7690e3eb Binary files /dev/null and b/Image Gallery/photos/Random Photos/mi-redmi-6-na-original-imaf8qtkgh6qhs3p.jpeg differ diff --git a/Image Gallery/photos/Random Photos/mi-redmi-note-5-pro-mzb6081in-mzb6089in-original-imaf52hhf3yy5bg8.jpeg b/Image Gallery/photos/Random Photos/mi-redmi-note-5-pro-mzb6081in-mzb6089in-original-imaf52hhf3yy5bg8.jpeg new file mode 100644 index 00000000..2a3a8561 Binary files /dev/null and b/Image Gallery/photos/Random Photos/mi-redmi-note-5-pro-mzb6081in-mzb6089in-original-imaf52hhf3yy5bg8.jpeg differ diff --git a/Image Gallery/photos/Random Photos/mimix.jpg b/Image Gallery/photos/Random Photos/mimix.jpg new file mode 100644 index 00000000..7eef43e9 Binary files /dev/null and b/Image Gallery/photos/Random Photos/mimix.jpg differ diff --git a/Image Gallery/photos/Random Photos/nokia.jpg b/Image Gallery/photos/Random Photos/nokia.jpg new file mode 100644 index 00000000..30a7b3e6 Binary files /dev/null and b/Image Gallery/photos/Random Photos/nokia.jpg differ diff --git a/Image Gallery/photos/Suits Collection/IMG_20160812_171122.jpg b/Image Gallery/photos/Suits Collection/IMG_20160812_171122.jpg new file mode 100644 index 00000000..e7f29589 Binary files /dev/null and b/Image Gallery/photos/Suits Collection/IMG_20160812_171122.jpg differ diff --git a/Image Gallery/photos/Suits Collection/IMG_20160812_171138.jpg b/Image Gallery/photos/Suits Collection/IMG_20160812_171138.jpg new file mode 100644 index 00000000..51c307d0 Binary files /dev/null and b/Image Gallery/photos/Suits Collection/IMG_20160812_171138.jpg differ diff --git a/Image Gallery/photos/Suits Collection/IMG_20160812_171153.jpg b/Image Gallery/photos/Suits Collection/IMG_20160812_171153.jpg new file mode 100644 index 00000000..a7250fa5 Binary files /dev/null and b/Image Gallery/photos/Suits Collection/IMG_20160812_171153.jpg differ diff --git a/Image Gallery/photos/Suits Collection/IMG_20160829_204027.jpg b/Image Gallery/photos/Suits Collection/IMG_20160829_204027.jpg new file mode 100644 index 00000000..3fa863a9 Binary files /dev/null and b/Image Gallery/photos/Suits Collection/IMG_20160829_204027.jpg differ diff --git a/Image Gallery/photos/Suits Collection/alephant.jpg b/Image Gallery/photos/Suits Collection/alephant.jpg new file mode 100644 index 00000000..32f02b23 Binary files /dev/null and b/Image Gallery/photos/Suits Collection/alephant.jpg differ diff --git a/Image Gallery/photos/Suits Collection/bird flowers.jpg b/Image Gallery/photos/Suits Collection/bird flowers.jpg new file mode 100644 index 00000000..63ba9bd6 Binary files /dev/null and b/Image Gallery/photos/Suits Collection/bird flowers.jpg differ diff --git a/Image Gallery/photos/Suits Collection/bird painting.jpg b/Image Gallery/photos/Suits Collection/bird painting.jpg new file mode 100644 index 00000000..15e6921c Binary files /dev/null and b/Image Gallery/photos/Suits Collection/bird painting.jpg differ diff --git a/Image Gallery/photos/Suits Collection/mahapurush.jpg b/Image Gallery/photos/Suits Collection/mahapurush.jpg new file mode 100644 index 00000000..ce5c73b7 Binary files /dev/null and b/Image Gallery/photos/Suits Collection/mahapurush.jpg differ diff --git a/Image Gallery/photos/Suits Collection/photo frame.jpg b/Image Gallery/photos/Suits Collection/photo frame.jpg new file mode 100644 index 00000000..e36b9476 Binary files /dev/null and b/Image Gallery/photos/Suits Collection/photo frame.jpg differ diff --git a/Image Gallery/photos/Suits Collection/tree painting.jpg b/Image Gallery/photos/Suits Collection/tree painting.jpg new file mode 100644 index 00000000..879453d3 Binary files /dev/null and b/Image Gallery/photos/Suits Collection/tree painting.jpg differ diff --git a/Image Gallery/process-auth.php b/Image Gallery/process-auth.php new file mode 100644 index 00000000..4641e9c7 --- /dev/null +++ b/Image Gallery/process-auth.php @@ -0,0 +1,53 @@ +<?php +include "includes/_process_include.php"; + +$loginOBJ = new Login(); + +// structure JSON response +$response = array(); +$response['success'] = false; +$response['messages'] = array(); + +if (!array_key_exists("action", $_POST)) { + $response["messages"][] = 'Invalid action'; + echo json_encode($response); + exit(); +} + + +if ( $_SERVER["REQUEST_METHOD"] == "POST" ) { + $action = $_POST['action']; + + switch($action) { + case 'login': + $username = htmlspecialchars(trim($_POST['username'])); + $password = htmlspecialchars(trim($_POST['password'])); + + $result = $loginOBJ->login($username,$password); + + if($result != false) { + $_SESSION['user'] = $username; + $_SESSION['type'] = $result['type']; + + $response['success'] = true; + } + + echo json_encode($response); + break; //END login + + case 'logout': + $result = $loginOBJ->logout(); + + if($result == true) { + $response['success'] = true; + } + + echo json_encode($response); + break; //END login + + default: + break; // END 'default' + + } // End Switch +} +?> \ No newline at end of file diff --git a/Image Gallery/process-gallery.php b/Image Gallery/process-gallery.php new file mode 100644 index 00000000..0ed5513e --- /dev/null +++ b/Image Gallery/process-gallery.php @@ -0,0 +1,77 @@ +<?php +include "includes/_process_include.php"; + +// structure JSON response +$response = array(); +$response['success'] = false; +$response['messages'] = array(); + +if (!array_key_exists("action", $_POST)) { + $response["messages"][] = 'Invalid action'; + echo json_encode($response); + exit(); +} + +$galleryOBJ = new Gallery(); + +if ( $_SERVER["REQUEST_METHOD"] == "POST" ) { + $action = $_POST['action']; + + switch($action) { + case 'addGallery': + if($_SESSION['type'] == "admin") { + $galleryName = htmlspecialchars(trim($_POST['galleryName'])); + + $result = $galleryOBJ->addGallery($galleryName); + + if($result == true){ + $response['success'] = true; + } + } + else { + $response['success'] = false; + } + + echo json_encode($response); + break; //END 'saveCart' + + case "deleteGallery": + if($_SESSION['type'] == "admin") { + $galleryName = htmlspecialchars(trim($_POST['galleryName'])); + + $result = $galleryOBJ->deleteGallery($galleryName); + + if($result == true){ + $response['success'] = true; + } + } + else { + $response['success'] = false; + } + + echo json_encode($response); + break; + + case "editGallery": + if($_SESSION['type'] == "admin") { + $galleryName = htmlspecialchars(trim($_POST['galleryName'])); + $newGalleryName = htmlspecialchars(trim($_POST['newName'])); + + $result = $galleryOBJ->editGalleryName($galleryName,$newGalleryName); + + if($result == true){ + $response['success'] = true; + } + } + else { + $response['success'] = false; + } + + echo json_encode($response); + break; + default: + break; // END 'default' + + } // End Switch +} +?> \ No newline at end of file diff --git a/Image Gallery/process-photos.php b/Image Gallery/process-photos.php new file mode 100644 index 00000000..0c125035 --- /dev/null +++ b/Image Gallery/process-photos.php @@ -0,0 +1,43 @@ +<?php +include "includes/_process_include.php"; + +// structure JSON response +$response = array(); +$response['success'] = false; +$response['messages'] = array(); + +if (!array_key_exists("action", $_POST)) { + $response["messages"][] = 'Invalid action'; + echo json_encode($response); + exit(); +} + +$photosOBJ = new Photos(); + +if ( $_SERVER["REQUEST_METHOD"] == "POST" ) { + $action = $_POST['action']; + + switch($action) { + case 'deletePhoto': + if($_SESSION['type'] == "admin") { + $galleryName = htmlspecialchars(trim($_POST['galleryName'])); + $photoName = htmlspecialchars(trim($_POST['photoName'])); + + $result = $photosOBJ->deleteGalleryPhotos($galleryName,$photoName); + + if($result == true){ + $response['success'] = true; + } + } + else{ + $response['success'] = false; + } + echo json_encode($response); + break; //END 'saveCart' + + default: + break; // END 'default' + + } // End Switch +} +?> \ No newline at end of file diff --git a/Inheritance.java b/Inheritance.java new file mode 100644 index 00000000..f1fc1292 --- /dev/null +++ b/Inheritance.java @@ -0,0 +1,33 @@ +class A +{ + public void methodA() { + System.out.println("method of Class A"); + } +} +class B extends A{ + public void methodB(){ + System.out.println("method of Class B"); + } +} +class C extends A{ + public void methodC(){ + System.out.println("method of Class C"); + } +} +class D extends A{ + public void methodD(){ + System.out.println("method of Class D"); + } +} +class InheritncExm{ + public static void main(String args[]) + { + B obj1 = new B(); + C obj2 = new C(); + D obj3 = new D(); + //All classes can access the method of class A + obj1.methodA(); + obj2.methodA(); + obj3.methodA(); + } +} diff --git a/InternationalFlight.class b/InternationalFlight.class new file mode 100644 index 00000000..cef1ca90 Binary files /dev/null and b/InternationalFlight.class differ diff --git a/InternationalFlight.java b/InternationalFlight.java new file mode 100644 index 00000000..fe8b8d1e --- /dev/null +++ b/InternationalFlight.java @@ -0,0 +1,318 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; +import java.io.*; + +public class InternationalFlight extends JFrame +{ + JComboBox CBFrom, CBTo, CBClass, CBAdult, CBChildren, CBInfant; + JLabel LFrom, LTo, LBookingDate, LClass, LAdult, LChildren, LInfant, LBookingDetails, LPassengerDetails, LDate, LImg1, LImg2, LNotes; + JTextField TFBookingDate; + Icon img1, img2; + JButton BFindFlight; + JPanel PPanel1, PPanel2; + + LoginPage type1; + + public InternationalFlight(LoginPage type1) + { + Container c =getContentPane(); + c.setLayout(new BorderLayout()); + String[] sItem1={"Trivandrum"}; + String[] sItem2={"Bali","Bangkok","Cairo","CapeTown","Chicago","Dubai","Frankfurt","HongKong","Istanbul","London","LosAngeles","Melbourne","New York","Paris","Rome","SanFrancisco","shanghai","Singapore","Sydney","Toronto"}; + String[] sItem3={"Economic","Business"}; + + this.type1 = type1; + PPanel1 = new JPanel(null); + PPanel1.setPreferredSize(new Dimension(500,200)); + + LBookingDetails = new JLabel("<html><b><font color=\"#C71585\">Booking Details</font></b></html>"); + LFrom = new JLabel("From :"); + LTo = new JLabel("To :"); + LBookingDate = new JLabel("Booking Date:"); + LClass = new JLabel("Class :"); + + CBFrom = new JComboBox(sItem1); + CBTo = new JComboBox(sItem2); + CBClass = new JComboBox(sItem3); + + TFBookingDate = new JTextField(10); + LDate = new JLabel("(DD/MM/YYYY)"); + LDate.setForeground(Color.red); + + img1=new ImageIcon("map1.jpg"); + LImg1 = new JLabel(img1); + + BFindFlight = new JButton("Find Flight"); + + LBookingDetails.setBounds(20,3,100,20); + + LFrom.setBounds(20,40,100,20); + CBFrom.setBounds(100,40,100,20); + + LTo.setBounds(20,100,100,20); + CBTo.setBounds(100,100,100,20); + + LBookingDate.setBounds(14,160,100,20); + TFBookingDate.setBounds(100,160,100,20); + LDate.setBounds(210,160,100,20); + + LClass.setBounds(20,220,100,20); + CBClass.setBounds(100,220,100,20); + + BFindFlight.setBounds(50,270,100,25); + + LImg1.setBounds(0,290,495,260); + + PPanel1.add(LBookingDetails); + PPanel1.add(LFrom); + PPanel1.add(CBFrom); + PPanel1.add(LTo); + PPanel1.add(CBTo); + PPanel1.add(LBookingDate); + PPanel1.add(TFBookingDate); + PPanel1.add(LDate); + PPanel1.add(LClass); + PPanel1.add(CBClass); + PPanel1.add(BFindFlight); + PPanel1.add(LImg1); + PPanel1.setBackground(Color.white); + + c.add(PPanel1,BorderLayout.WEST); + + PPanel2 = new JPanel(null); + PPanel2.setPreferredSize(new Dimension(320,160)); + + LPassengerDetails=new JLabel("<html><b><font color=\"#C71585\">PassengerDetails</font></b></html>"); + + LAdult = new JLabel("Adults(12+)"); + + LChildren = new JLabel("Children(2-11)"); + LInfant = new JLabel("Infants(under 2)"); + + String[] item4={"1","2","3","4","5","6"}; + CBAdult = new JComboBox(item4); + + String[] item5={"0","1","2","3","4"}; + CBChildren = new JComboBox(item5); + + String[] item6={"0","1","2","3"}; + CBInfant = new JComboBox(item6); + + img2 = new ImageIcon("note_bg.gif"); + LImg2 = new JLabel(img2); + LNotes = new JLabel("<html><body><p>NOTE: Bookings with International Credit Cards <p> have temporarily been suspended.This Service<p> will resume shortly and we will have a notice<p> posted on our website.We regret any <p>inconvenience caused to our passengers.</body></html>"); + + LPassengerDetails.setBounds(40,3,100,20); + + LAdult.setBounds(40,40,100,20); + CBAdult.setBounds(140,40,100,20); + + LChildren.setBounds(40,105,100,20); + CBChildren.setBounds(140,105,100,20); + + LInfant.setBounds(40,170,100,20); + CBInfant.setBounds(140,170,100,20); + + LImg2.setBounds(16,220,320,200); + LNotes.setBounds(55,240,380,180); + + PPanel2.add(LPassengerDetails); + PPanel2.add(LAdult); + PPanel2.add(LChildren); + PPanel2.add(LInfant); + PPanel2.add(CBAdult); + PPanel2.add(CBChildren); + PPanel2.add(CBInfant); + + PPanel2.add(LNotes); + PPanel2.add(LImg2); + + PPanel2.setBackground(Color.white); + + c.add(PPanel2,BorderLayout.EAST); + + setSize(795,580); + setVisible(true); + + BFindFlight.addActionListener(new button2(this, type1)); + } + public static void main(String args[]) + { + LoginPage type1=null; + new InternationalFlight(type1); + } +} + +class button2 implements ActionListener +{ + InternationalFlight type; + LoginPage type1; + button2(InternationalFlight type, LoginPage type1) + { + this.type = type; + this.type1 = type1; + } + public void actionPerformed(ActionEvent e) + { + String sFrom = (String)type.CBFrom.getSelectedItem(); + String sTo = (String)type.CBTo.getSelectedItem(); + String sClass = (String)type.CBClass.getSelectedItem(); + String sBookingDate = type.TFBookingDate.getText(); + Integer iPrice=0; + String sTime=""; + + + Integer iAdult = Integer.parseInt((String)type.CBAdult.getSelectedItem()); + Integer iChildren = Integer.parseInt((String)type.CBChildren.getSelectedItem()); + Integer iInfant = Integer.parseInt((String)type.CBInfant.getSelectedItem()); + + int i = 0; + + if(sClass.equals("Economic")) + { + try{ + while(i<20) + { + if(type1.row2[i][1].equals(sTo)) + { + iPrice = Integer.parseInt((String)type1.row2[i][2]); + sTime = (String)type1.row2[i][3]; + break; + } + i++; + } + }catch(Exception e1) + { + JOptionPane.showMessageDialog(null, "You have no rights to access"); + System.exit(0); + } + } + else + { + try + { + while(i<20) + { + if(type1.row2[i][1].equals(sTo)) + { + iPrice = Integer.parseInt((String)type1.row4[i][2]); + sTime = (String)type1.row4[i][3]; + break; + } + i++; + } + }catch(Exception e1) + { + JOptionPane.showMessageDialog(null, "You have no rights to access it"); + System.exit(0); + } + } + type.setTitle(iPrice + " " + sTime); + + iPrice = (iPrice*iAdult)+(iPrice*(iChildren/2)); + + int iCount=0; + int iSeatCount=0; + + String[] sTempFrom=new String[1250]; + String[] sTempTo=new String[1250]; + String[] sTempClass=new String[1250]; + String[] sTempBookingDate=new String[1250]; + String[] sTempTime=new String[1250]; + Integer[] iTempAdult=new Integer[1250]; + Integer[] iTempChildren=new Integer[1250]; + Integer[] iTempInfant=new Integer[1250]; + Integer[] iTempPrice=new Integer[1250]; + + try + { +//read from data + Save1 save1; + ObjectInputStream OIS1 = new ObjectInputStream(new FileInputStream("save1")); + do + { + save1 = (Save1)OIS1.readObject(); + sTempFrom[iCount] = save1.sFrom; + sTempTo[iCount] = save1.sTo; + sTempClass[iCount] = save1.sClass; + sTempBookingDate[iCount] = save1.sBookingDate; + sTempTime[iCount] = save1.sTime; + iTempAdult[iCount] = save1.iAdult; + iTempChildren[iCount] = save1.iChildren; + iTempInfant[iCount] = save1.iInfant; + iTempPrice[iCount] = save1.iPrice; + + iCount++; + if(save1.sBookingDate.equals(sBookingDate)) + if(save1.sTo.equals(sTo)) + iSeatCount=iSeatCount + save1.iAdult + save1.iChildren + save1.iInfant; + }while(save1!=null); + OIS1.close(); + + } + catch(Exception e1) + { + } + + iSeatCount = iSeatCount + iAdult + iChildren + iInfant; + + if(iSeatCount > 60) + { + JOptionPane.showMessageDialog(null,"Seats are full. Sorry!"); + } + else + { + int iChoice = JOptionPane.showConfirmDialog(null,"Seats available. Do you want to Book now?"); + if(iChoice == JOptionPane.YES_OPTION) + { + new PrintTicket1(sFrom, sTo, sClass, iAdult, iChildren, iInfant, sBookingDate, iPrice, sTime); + try + { +//write into data + Save1 save2=new Save1(sFrom, sTo, sClass, iAdult, iChildren, iInfant, sBookingDate, iPrice, sTime); + ObjectOutputStream OOS1 = new ObjectOutputStream(new FileOutputStream("save1")); + for(i=0;i<iCount;i++) + { + Save1 temp1=new Save1(sTempFrom[i], sTempTo[i], sTempClass[i], iTempAdult[i], iTempChildren[i], iTempInfant[i], sTempBookingDate[i], iTempPrice[i], sTempTime[i]); + OOS1.writeObject(temp1); +System.out.println(temp1); + } + OOS1.writeObject(save2); + OOS1.close(); + }catch(Exception e1) + { + System.out.println(e1); + } + } + else + { + } + } + } +} + + +class Save1 implements Serializable +{ + String sFrom, sTo, sClass, sBookingDate, sTime; + Integer iPrice, iAdult, iChildren, iInfant; +// int iCount; + public Save1(String sFrom, String sTo, String sClass, Integer iAdult, Integer iChildren, Integer iInfant, String sBookingDate, Integer iPrice, String sTime) + { + this.sFrom=sFrom; + this.sTo=sTo; + this.sClass=sClass; + this.iAdult=iAdult; + this.iChildren=iChildren; + this.iInfant=iInfant; + this.sBookingDate=sBookingDate; + this.iPrice=iPrice; + this.sTime=sTime; +// this.iCount = iCount; + } + public String toString() + { + return sFrom+" "+sTo+" "+sClass+" "+iAdult+" "+iChildren+" "+iInfant+" "+sBookingDate+" "+iPrice+" "+sTime; + } +} \ No newline at end of file diff --git a/Internet Slang's Dictionary/.DS_Store b/Internet Slang's Dictionary/.DS_Store new file mode 100644 index 00000000..6d7f2640 Binary files /dev/null and b/Internet Slang's Dictionary/.DS_Store differ diff --git a/Internet Slang's Dictionary/bin/proj1/AVL.class b/Internet Slang's Dictionary/bin/proj1/AVL.class new file mode 100644 index 00000000..affc1e54 Binary files /dev/null and b/Internet Slang's Dictionary/bin/proj1/AVL.class differ diff --git a/Internet Slang's Dictionary/bin/proj1/Main - Copy.txt b/Internet Slang's Dictionary/bin/proj1/Main - Copy.txt new file mode 100644 index 00000000..76515816 --- /dev/null +++ b/Internet Slang's Dictionary/bin/proj1/Main - Copy.txt @@ -0,0 +1,376 @@ +package proj1; + +import java.util.*; +class node +{ + node lc,rc; + String name; + String meaning; + int h; + public node(String name,String meaning) //parameterized constructor of class node + { + this.name=name.toLowerCase(); + this.meaning=meaning; + //lc=rc=null; + h=1; + } +} + +class AVL +{ + Scanner sc = new Scanner (System.in); + private node root; + public AVL() + { + root=null; + } + + int height(node root) // height to calculate balance factor of tree + { + int lh, rh; + if(root == null) + return 0; + if(root.lc == null) + lh = 0; + else + lh = 1 + root.lc.h; + if(root.rc == null) + rh = 0; + else + rh = 1 + root.rc.h; + if(lh > rh) + return lh; + else + return rh; + } + + int balanceFactor(node root) + {int bf, lh, rh; + if(root == null) + return 0; + if(root.lc == null) + lh = 0; + else + lh = 1 + height(root.lc); + if(root.rc == null) + rh = 0; + else + rh = 1 + height(root.rc); + bf = lh - rh; + return bf; + + } + +node LL(node ptr) + { + //Right Rotation + node tmp = root.lc; + root.lc = tmp.rc; + tmp.rc = root; + tmp.h = height(tmp); + root.h = height(root); + return tmp; + } + + node RR(node ptr) + { + //Left Rotation + node tmp = root.rc; + root.rc = tmp.lc; + tmp.lc = root; + tmp.h = height(tmp); + root.h = height(root); + return tmp; + } + + node LR(node root) + { + root.lc=RR(root.lc); + root=LL(root); + return root; + } + + node RL(node root) + { + root.rc=LL(root.rc); + root=RR(root); + + return root; + } + + + node insert(node root, node temp){ + int bf; + if(root == null){ + root = new node(temp.name, temp.meaning); + return root; + } + if(temp.name.compareTo(root.name) < 0){ + root.lc = insert(root.lc, temp); + bf = balanceFactor(root); + if(bf == 2){ + if(temp.name.compareToIgnoreCase(root.lc.name) < 0) + root = LL(root); + else + root = LR(root); + } + } + else{ //cn.compareToIgnoreCase(root.customerName) > 0 + root.rc = insert(root.rc, temp); + bf = balanceFactor(root); + if(bf == -2){ + if(temp.name.compareToIgnoreCase(root.rc.name) > 0) + root = RR(root); + else + root = RL(root); + } + } + root.h = height(root); + return root; + } + + void create(String Name,String mean) //Accept general information form customer + { + + node temp=new node(Name,mean); + root=insert(root,temp); + + + } + void display(node localRoot) // Inorder traversal + { + if(localRoot != null){ + display(localRoot.lc); + System.out.println(localRoot.name+" -"+localRoot.meaning); + display(localRoot.rc); + } + + } + node getRoot() {//utility function for restricted access + return root; + } + void findWord() {//juhi + System.out.print("\nEnter word : "); + String target=sc.nextLine().toLowerCase(); + node current=root; + while(current!=null) { + int comparison=target.compareTo(current.name); + if(comparison==0) { + System.out.println("\nWord : "+current.name.toUpperCase()+"\t\t-\t\tMeaning : "+current.meaning); + return; + } + else if(comparison<0) { + current=current.lc; + } + else {//comparison>0 + current=current.rc; + } + } + System.out.println("\nWord not found! Please be more specific."); + } + int displayWordsAt(node head,String i,int t) //juhi + { + if (head != null) + { if(head.name.startsWith(i)) { + t++; + System.out.println("Word : "+head.name+"\t\t-\t\tMeaning : "+head.meaning); + } + t=displayWordsAt(head.lc, i,t); + t=displayWordsAt(head.rc, i,t); + return t; + } + return t; + + } + + + + int totalWordsCount(node r) {//vaishnav + if (r == null) { + return 0; + } + else + { + int l = 1; + l += totalWordsCount(r.lc); + l += totalWordsCount(r.rc); + return l; + } + + + } + int wordsCountAt(node rr,char j) {//vaishnav + if (rr == null) { + return 0; + } + else + { + int l = 1; + l += wordsCountAt(rr.lc,j); + l += wordsCountAt(rr.rc,j); + return l; + } + + +} + int wordCountAt(char j) {//srushti + int count=0; + + node ptr=root; + while(ptr!=null ){ + if(ptr.name.charAt(0)==j){ + + count++; + } + char c=ptr.name.charAt(0); + if(Character.compare(j, c)<0) + ptr=ptr.lc; + else + ptr=ptr.rc; + } + return count; + } + void wordStartsWithVowel() {//juhi + System.out.println("\nStarts with Vowel : 'a' \n"); + displayWordsAt(root,"a",0); + System.out.println("\nStarts with Vowel : 'e' \n"); + displayWordsAt(root,"e",0); + System.out.println("\nStarts with Vowel : 'i' \n"); + displayWordsAt(root,"i",0); + System.out.println("\nStarts with Vowel : 'o' \n"); + displayWordsAt(root,"o",0); + System.out.println("\nStarts with Vowel : 'u' \n"); + displayWordsAt(root,"u",0); + } + void wordCountStartsWithVowel() {//juhi + int t=0; + { + int c= wordCountAt('a'); + System.out.println("Total no. of words starting with vowel : 'a' are - "+c); + t=t+c; + } + { + int c= wordCountAt('e'); + System.out.println("Total no. of words starting with vowel : 'e' are - "+c); + t=t+c; + } + { + int c= wordCountAt('i'); + System.out.println("Total no. of words starting with vowel : 'i' are - "+c); + t=t+c; + } + { + int c= wordCountAt('o'); + System.out.println("Total no. of words starting with vowel : 'o' are - "+c); + t=t+c; + } + { + int c= wordCountAt('u'); + System.out.println("Total no. of words starting with vowel : 'u' are - "+c); + t=t+c; + } + System.out.println("\nTotal no. of words starting with vowels are : "+t); + } +} + +public class Main{ + + public static void main(String[] args) { + AVL avl=new AVL(); + Scanner sc=new Scanner(System.in); + avl.create("brb","Be right back"); + avl.create("btw","By the way"); + avl.create("ama", "Ask Me Anything"); + avl.create("lmk","Let me know"); + avl.create("gtg","Got to go"); + avl.create("dm", "Direct Message"); + avl.create("idk", "I don't know"); + + avl.create("rofl","Rolling on floor laughing"); + avl.create("stfu", "Shut the *swear word!* up"); + //avl.create("icymi", "In case you missed it"); + avl.create("tl","Too long" ); + avl.create("ikr", "I know right"); + //avl.create("dr", "Didn�t read"); + //avl.create("nvm", "Nevermind"); + //avl.create("tgif","Thank goodness it�s Friday"); + //avl.create("tbh","To be honest"); + //avl.create("tbf", "To be frank"); + avl.create("rn", "Right now"); + avl.create("qotd","Quote of the day"); + avl.create("ootd","Outfit of the day"); + //avl.create("lol","Laugh out loud"); + avl.create("ttyl", "Talk to you later"); + //avl.create("hit me up"," Hit me up"); + //avl.create("fwiw", "For what it�s worth"); + //avl.create("imo", "In my opinion"); + //avl.create("imho", "In my humble opinion"); + //avl.create("idk","I don�t know"); + avl.create("tba", "To be announced"); + //avl.create("tbd", "To be decided"); + + int ch; + do{ + System.out.println("**************************** Menu ********************************"); + System.out.println("1.Find a Word"); + System.out.println("2.Display words starting with given letter"); + System.out.println("3.Total no. of words in dictionary"); + System.out.println("4.Total no. of words starting with given letter"); + System.out.println("5.Display all words"); + System.out.println("6.Display Words starting with vowels");//words at + System.out.println("7.Total no. of words starting with vowels"); + System.out.println("8.Exit"); + System.out.println("******************************************************************"); + System.out.println("Enter your choice : "); + ch=sc.nextInt(); + switch(ch) + { + case 1: + + avl.findWord(); + break; + case 2: + System.out.print("\nEnter the starting letter of the words you want to find : "); + String c=sc.next(); + if(c.length()!=1) { + System.out.println("\nEnter a single letter!"); + break; + } + else { + int j=0; + if(avl.displayWordsAt(avl.getRoot(),c,j)==0) + System.out.println("No word starts with the letter '"+c+"'"); + break; + } + case 3: System.out.println("\nTotal no. of words in the dictionary are : "+avl.totalWordsCount(avl.getRoot())); + break; + case 4: System.out.print("\nEnter the starting letter of the words you want to find : "); + String b=sc.next(); + if(b.length()!=1) { + System.out.println("\nEnter a single letter!"); + break; + } + else { + System.out.println(avl.wordCountAt(b.toLowerCase().charAt(0))); + break; + } + case 5: + avl.display(avl.getRoot()); + break; + case 6: + avl.wordStartsWithVowel(); + break; + case 7: + avl.wordCountStartsWithVowel(); + break; + case 8: System.out.println("Program ended"); + + break; + default: System.out.println("Invalid option"); + + } + } while(ch != 8); + + } + +} \ No newline at end of file diff --git a/Internet Slang's Dictionary/bin/proj1/Main.class b/Internet Slang's Dictionary/bin/proj1/Main.class new file mode 100644 index 00000000..f0dd956c Binary files /dev/null and b/Internet Slang's Dictionary/bin/proj1/Main.class differ diff --git a/Internet Slang's Dictionary/bin/proj1/node.class b/Internet Slang's Dictionary/bin/proj1/node.class new file mode 100644 index 00000000..bd228644 Binary files /dev/null and b/Internet Slang's Dictionary/bin/proj1/node.class differ diff --git a/Internet Slang's Dictionary/src/proj1/Main - Copy.txt b/Internet Slang's Dictionary/src/proj1/Main - Copy.txt new file mode 100644 index 00000000..76515816 --- /dev/null +++ b/Internet Slang's Dictionary/src/proj1/Main - Copy.txt @@ -0,0 +1,376 @@ +package proj1; + +import java.util.*; +class node +{ + node lc,rc; + String name; + String meaning; + int h; + public node(String name,String meaning) //parameterized constructor of class node + { + this.name=name.toLowerCase(); + this.meaning=meaning; + //lc=rc=null; + h=1; + } +} + +class AVL +{ + Scanner sc = new Scanner (System.in); + private node root; + public AVL() + { + root=null; + } + + int height(node root) // height to calculate balance factor of tree + { + int lh, rh; + if(root == null) + return 0; + if(root.lc == null) + lh = 0; + else + lh = 1 + root.lc.h; + if(root.rc == null) + rh = 0; + else + rh = 1 + root.rc.h; + if(lh > rh) + return lh; + else + return rh; + } + + int balanceFactor(node root) + {int bf, lh, rh; + if(root == null) + return 0; + if(root.lc == null) + lh = 0; + else + lh = 1 + height(root.lc); + if(root.rc == null) + rh = 0; + else + rh = 1 + height(root.rc); + bf = lh - rh; + return bf; + + } + +node LL(node ptr) + { + //Right Rotation + node tmp = root.lc; + root.lc = tmp.rc; + tmp.rc = root; + tmp.h = height(tmp); + root.h = height(root); + return tmp; + } + + node RR(node ptr) + { + //Left Rotation + node tmp = root.rc; + root.rc = tmp.lc; + tmp.lc = root; + tmp.h = height(tmp); + root.h = height(root); + return tmp; + } + + node LR(node root) + { + root.lc=RR(root.lc); + root=LL(root); + return root; + } + + node RL(node root) + { + root.rc=LL(root.rc); + root=RR(root); + + return root; + } + + + node insert(node root, node temp){ + int bf; + if(root == null){ + root = new node(temp.name, temp.meaning); + return root; + } + if(temp.name.compareTo(root.name) < 0){ + root.lc = insert(root.lc, temp); + bf = balanceFactor(root); + if(bf == 2){ + if(temp.name.compareToIgnoreCase(root.lc.name) < 0) + root = LL(root); + else + root = LR(root); + } + } + else{ //cn.compareToIgnoreCase(root.customerName) > 0 + root.rc = insert(root.rc, temp); + bf = balanceFactor(root); + if(bf == -2){ + if(temp.name.compareToIgnoreCase(root.rc.name) > 0) + root = RR(root); + else + root = RL(root); + } + } + root.h = height(root); + return root; + } + + void create(String Name,String mean) //Accept general information form customer + { + + node temp=new node(Name,mean); + root=insert(root,temp); + + + } + void display(node localRoot) // Inorder traversal + { + if(localRoot != null){ + display(localRoot.lc); + System.out.println(localRoot.name+" -"+localRoot.meaning); + display(localRoot.rc); + } + + } + node getRoot() {//utility function for restricted access + return root; + } + void findWord() {//juhi + System.out.print("\nEnter word : "); + String target=sc.nextLine().toLowerCase(); + node current=root; + while(current!=null) { + int comparison=target.compareTo(current.name); + if(comparison==0) { + System.out.println("\nWord : "+current.name.toUpperCase()+"\t\t-\t\tMeaning : "+current.meaning); + return; + } + else if(comparison<0) { + current=current.lc; + } + else {//comparison>0 + current=current.rc; + } + } + System.out.println("\nWord not found! Please be more specific."); + } + int displayWordsAt(node head,String i,int t) //juhi + { + if (head != null) + { if(head.name.startsWith(i)) { + t++; + System.out.println("Word : "+head.name+"\t\t-\t\tMeaning : "+head.meaning); + } + t=displayWordsAt(head.lc, i,t); + t=displayWordsAt(head.rc, i,t); + return t; + } + return t; + + } + + + + int totalWordsCount(node r) {//vaishnav + if (r == null) { + return 0; + } + else + { + int l = 1; + l += totalWordsCount(r.lc); + l += totalWordsCount(r.rc); + return l; + } + + + } + int wordsCountAt(node rr,char j) {//vaishnav + if (rr == null) { + return 0; + } + else + { + int l = 1; + l += wordsCountAt(rr.lc,j); + l += wordsCountAt(rr.rc,j); + return l; + } + + +} + int wordCountAt(char j) {//srushti + int count=0; + + node ptr=root; + while(ptr!=null ){ + if(ptr.name.charAt(0)==j){ + + count++; + } + char c=ptr.name.charAt(0); + if(Character.compare(j, c)<0) + ptr=ptr.lc; + else + ptr=ptr.rc; + } + return count; + } + void wordStartsWithVowel() {//juhi + System.out.println("\nStarts with Vowel : 'a' \n"); + displayWordsAt(root,"a",0); + System.out.println("\nStarts with Vowel : 'e' \n"); + displayWordsAt(root,"e",0); + System.out.println("\nStarts with Vowel : 'i' \n"); + displayWordsAt(root,"i",0); + System.out.println("\nStarts with Vowel : 'o' \n"); + displayWordsAt(root,"o",0); + System.out.println("\nStarts with Vowel : 'u' \n"); + displayWordsAt(root,"u",0); + } + void wordCountStartsWithVowel() {//juhi + int t=0; + { + int c= wordCountAt('a'); + System.out.println("Total no. of words starting with vowel : 'a' are - "+c); + t=t+c; + } + { + int c= wordCountAt('e'); + System.out.println("Total no. of words starting with vowel : 'e' are - "+c); + t=t+c; + } + { + int c= wordCountAt('i'); + System.out.println("Total no. of words starting with vowel : 'i' are - "+c); + t=t+c; + } + { + int c= wordCountAt('o'); + System.out.println("Total no. of words starting with vowel : 'o' are - "+c); + t=t+c; + } + { + int c= wordCountAt('u'); + System.out.println("Total no. of words starting with vowel : 'u' are - "+c); + t=t+c; + } + System.out.println("\nTotal no. of words starting with vowels are : "+t); + } +} + +public class Main{ + + public static void main(String[] args) { + AVL avl=new AVL(); + Scanner sc=new Scanner(System.in); + avl.create("brb","Be right back"); + avl.create("btw","By the way"); + avl.create("ama", "Ask Me Anything"); + avl.create("lmk","Let me know"); + avl.create("gtg","Got to go"); + avl.create("dm", "Direct Message"); + avl.create("idk", "I don't know"); + + avl.create("rofl","Rolling on floor laughing"); + avl.create("stfu", "Shut the *swear word!* up"); + //avl.create("icymi", "In case you missed it"); + avl.create("tl","Too long" ); + avl.create("ikr", "I know right"); + //avl.create("dr", "Didn�t read"); + //avl.create("nvm", "Nevermind"); + //avl.create("tgif","Thank goodness it�s Friday"); + //avl.create("tbh","To be honest"); + //avl.create("tbf", "To be frank"); + avl.create("rn", "Right now"); + avl.create("qotd","Quote of the day"); + avl.create("ootd","Outfit of the day"); + //avl.create("lol","Laugh out loud"); + avl.create("ttyl", "Talk to you later"); + //avl.create("hit me up"," Hit me up"); + //avl.create("fwiw", "For what it�s worth"); + //avl.create("imo", "In my opinion"); + //avl.create("imho", "In my humble opinion"); + //avl.create("idk","I don�t know"); + avl.create("tba", "To be announced"); + //avl.create("tbd", "To be decided"); + + int ch; + do{ + System.out.println("**************************** Menu ********************************"); + System.out.println("1.Find a Word"); + System.out.println("2.Display words starting with given letter"); + System.out.println("3.Total no. of words in dictionary"); + System.out.println("4.Total no. of words starting with given letter"); + System.out.println("5.Display all words"); + System.out.println("6.Display Words starting with vowels");//words at + System.out.println("7.Total no. of words starting with vowels"); + System.out.println("8.Exit"); + System.out.println("******************************************************************"); + System.out.println("Enter your choice : "); + ch=sc.nextInt(); + switch(ch) + { + case 1: + + avl.findWord(); + break; + case 2: + System.out.print("\nEnter the starting letter of the words you want to find : "); + String c=sc.next(); + if(c.length()!=1) { + System.out.println("\nEnter a single letter!"); + break; + } + else { + int j=0; + if(avl.displayWordsAt(avl.getRoot(),c,j)==0) + System.out.println("No word starts with the letter '"+c+"'"); + break; + } + case 3: System.out.println("\nTotal no. of words in the dictionary are : "+avl.totalWordsCount(avl.getRoot())); + break; + case 4: System.out.print("\nEnter the starting letter of the words you want to find : "); + String b=sc.next(); + if(b.length()!=1) { + System.out.println("\nEnter a single letter!"); + break; + } + else { + System.out.println(avl.wordCountAt(b.toLowerCase().charAt(0))); + break; + } + case 5: + avl.display(avl.getRoot()); + break; + case 6: + avl.wordStartsWithVowel(); + break; + case 7: + avl.wordCountStartsWithVowel(); + break; + case 8: System.out.println("Program ended"); + + break; + default: System.out.println("Invalid option"); + + } + } while(ch != 8); + + } + +} \ No newline at end of file diff --git a/Internet Slang's Dictionary/src/proj1/Main.java b/Internet Slang's Dictionary/src/proj1/Main.java new file mode 100644 index 00000000..35745953 --- /dev/null +++ b/Internet Slang's Dictionary/src/proj1/Main.java @@ -0,0 +1,1164 @@ +package proj1; +import java.util.*; +class node +{ + node lc,rc; + String name; + String meaning; + int h; + public node(String name,String meaning) //parameterized constructor of class node + { + this.name=name.toLowerCase(); + this.meaning=meaning; + lc=rc=null; + h=1; + } +} + +class AVL +{ + Scanner sc = new Scanner (System.in); + private node root; + public AVL() + { + root=null; + } + + int height(node N) // height to calculate balance factor of tree + { + int lh, rh; //utility function for balance function + if(N == null) + return 0; + if(N.lc == null) + lh = 0; + else + lh = 1 + N.lc.h; + if(N.rc == null) + rh = 0; + else + rh = 1 + N.rc.h; + if(lh > rh) + return lh; + else + return rh; + } + + int balanceFactor(node root) //to calculate the balance factor + {int bf, lh, rh; + if(root == null) + return 0; + if(root.lc == null) + lh = 0; //utility function + else + lh = 1 + height(root.lc); + if(root.rc == null) + rh = 0; + else + rh = 1 + height(root.rc); + bf = lh - rh; + return bf; + + } + +node LL(node ptr) + { + //Right Rotation + node tmp = ptr.lc; + ptr.lc = tmp.rc; + tmp.rc = ptr; + tmp.h = height(tmp); + ptr.h = height(ptr); + return tmp; + } + + node RR(node ptr) + { + //Left Rotation + node tmp = ptr.rc; + ptr.rc = tmp.lc; + tmp.lc = ptr; + tmp.h = height(tmp); + ptr.h = height(ptr); + return tmp; + } + + node LR(node root) + { //left right rotation + root.lc=RR(root.lc); + root=LL(root); + return root; + } + + node RL(node root) + { + root.rc=LL(root.rc);//right left rotation + root=RR(root); + + return root; + } + + + node insert(node root, node temp){//insert function + int bf; + if(root == null){ + root = new node(temp.name, temp.meaning); + return root; + } + if(temp.name.compareTo(root.name) < 0){ + root.lc = insert(root.lc, temp); + bf = balanceFactor(root); + if(bf == 2){ + if(temp.name.compareToIgnoreCase(root.lc.name) < 0) + root = LL(root); + else + root = LR(root); + } + } + else{ //cn.compareToIgnoreCase(root.Name) > 0 + root.rc = insert(root.rc, temp); + bf = balanceFactor(root); + if(bf == -2){ + if(temp.name.compareToIgnoreCase(root.rc.name) > 0) + root = RR(root); + else + root = RL(root); + } + } + root.h = height(root); + return root; + } + + void create(String Name,String mean) //creation of a node + { + + node temp=new node(Name,mean); + root=insert(root,temp); + + + } + void display(node localRoot) //Inorder traversal + { + if(localRoot != null){ + display(localRoot.lc); + System.out.println(localRoot.name.toUpperCase()+" -"+localRoot.meaning); + display(localRoot.rc); + } + + } + node getRoot() {//utility function for restricted access + return root; + } + void findWord() { + System.out.print("\nEnter word : "); + String target=sc.nextLine().toLowerCase(); + node current=root; + while(current!=null) { + int comparison=target.compareTo(current.name); + if(comparison==0) { + System.out.println("\nWord : "+current.name.toUpperCase()+"\t\t-\t\tMeaning : "+current.meaning); + return; + } + else if(comparison<0) {//negative + current=current.lc; + } + else {//comparison>0 //positive + current=current.rc; + } + } + System.out.println("\nWord not found! Please be more specific."); + } + int displayWordsAt(node head,String i,int t) //display the words starting with a given letter + { + if (head != null) + { if(head.name.startsWith(i)) { + t++; + System.out.println("Word : "+head.name.toUpperCase()+"\t\t-\t\tMeaning : "+head.meaning); + } + t=displayWordsAt(head.lc, i,t); + t=displayWordsAt(head.rc, i,t); + return t; + } + return t; + + } + + + + int totalWordsCount(node r) { + if (r == null) { //count of total nodes + return 0; + } + else + { + int l = 1; + l += totalWordsCount(r.lc); + l += totalWordsCount(r.rc); + return l; + } + + + } + + int wordCountAt(node loc,char j) { + //count of words starting with a given letter + if(loc==null) + return 0; + int count=0; + if(loc.name.charAt(0)==j) + count++; + + return count+wordCountAt(loc.lc,j)+wordCountAt(loc.rc,j); + + + } + void wordStartsWithVowel() { //Display words starting with vowels + System.out.println("\nStarts with Vowel : 'a' \n"); + displayWordsAt(root,"a",0); + System.out.println("\nStarts with Vowel : 'e' \n"); + displayWordsAt(root,"e",0); + System.out.println("\nStarts with Vowel : 'i' \n"); + displayWordsAt(root,"i",0); + System.out.println("\nStarts with Vowel : 'o' \n"); + displayWordsAt(root,"o",0); + System.out.println("\nStarts with Vowel : 'u' \n"); + displayWordsAt(root,"u",0); + } + void wordCountStartsWithVowel() { + int t=0; + { //display the count of words starting with vowels + int c= wordCountAt(root,'a'); + System.out.println("Total no. of words starting with vowel : 'a' are - "+c); + t=t+c; + } + { + int c= wordCountAt(root,'e'); + System.out.println("Total no. of words starting with vowel : 'e' are - "+c); + t=t+c; + } + { + int c= wordCountAt(root,'i'); + System.out.println("Total no. of words starting with vowel : 'i' are - "+c); + t=t+c; + } + { + int c= wordCountAt(root,'o'); + System.out.println("Total no. of words starting with vowel : 'o' are - "+c); + t=t+c; + } + { + int c= wordCountAt(root,'u'); + System.out.println("Total no. of words starting with vowel : 'u' are - "+c); + t=t+c; + } + System.out.println("\nTotal no. of words starting with vowels are : "+t); + } +} + +public class Main{ + + public static void main(String[] args) { + AVL avl=new AVL(); + Scanner sc=new Scanner(System.in); + avl.create("brb","Be right back"); + avl.create("btw","By the way"); + avl.create("ama", "Ask Me Anything"); //hard coded data + avl.create("lmk","Let me know"); + avl.create("gtg","Got to go"); + avl.create("dm", "Direct Message"); + avl.create("idk", "I don't know"); + avl.create("rofl","Rolling on floor laughing"); + avl.create("stfu", "Shut the *swear word!* up"); + avl.create("icymi", "In case you missed it"); + avl.create("tl","Too long" ); + avl.create("ikr", "I know right"); + avl.create("dr", "Didn’t read"); + avl.create("nvm", "Nevermind"); + avl.create("tgif","Thank goodness it’s Friday"); + avl.create("tbh","To be honest"); + avl.create("tbf", "To be frank"); + avl.create("rn", "Right now"); + avl.create("qotd","Quote of the day"); + avl.create("ootd","Outfit of the day"); + avl.create("lol","Laugh out loud"); + avl.create("ttyl", "Talk to you later"); + avl.create("hit me up"," Hit me up"); + avl.create("fwiw", "For what it’s worth"); + avl.create("imo", "In my opinion"); + avl.create("imho", "In my humble opinion"); + avl.create("tba", "To be announced"); + avl.create("tbd", "To be decided"); + avl.create("ae","Accident & Emergency"); + avl.create("af","Always And Forever"); + avl.create("afe","Abercrombie & Fitch"); + avl.create("ar","Artists & Repertoire"); + avl.create("an","Author's Note"); + avl.create("aw","Anyway"); + avl.create("a1","Top quality"); + avl.create("a2dp","Advanced Audio Distribution Profile"); + avl.create("a3","Anywhere, Any time, Any place"); + avl.create("a4u","All For You"); + avl.create("a7a","Frustration, anger (Arabic)"); + avl.create("a7x","Avenged Sevenfold (band)"); + avl.create("aa","Alcoholics Anonymous"); + avl.create("aab","Average At Best"); + avl.create("aac","Apple Audio Compression"); + avl.create("aak","Alive And Kicking"); + avl.create("aamof","As A Matter Of Fact"); + avl.create("aap","Always A Pleasure"); + avl.create("aar","At Any Rate"); + avl.create("aarp","American Association of Retired Persons"); + avl.create("aat","And Another Thing"); + avl.create("aawy","And Also With You"); + avl.create("aayf","As Always, Your Friend"); + avl.create("abbo","Accountants Bookkeepers and Business Owners"); + avl.create("e","Ecstasy"); + avl.create("eoe","Errors and omissions excluded"); + avl.create("ecig","Electronic Cigarett"); + avl.create("edating","Online dating"); + avl.create("evite","Electronic Invitation"); + avl.create("ev","Everyone"); + avl.create("eeg","Ear To Ear Grin"); + avl.create("ea","Electronic Arts"); + avl.create("eas","End of Active Service"); + avl.create("eb","Eyeball"); + avl.create("ebcak","Error Between Chair And Keyboard"); + avl.create("ebd","End of Business Day"); + avl.create("ebm","Electronic Body Music"); + avl.create("ebony","Dark skin tone"); + avl.create("ebt","Electronic Benefits Transfer"); + avl.create("ecg","Electrocardiogram"); + avl.create("eco","Ecological"); + avl.create("ect","Misspelling of 'etc'"); + avl.create("ecu","Electronic Control Unit"); + avl.create("ecw","Extreme Championship Wrestling"); + avl.create("edc","Every Day Carry"); + avl.create("edd","Estimated Delivery Date"); + avl.create("eddress ","Email address"); + avl.create("edgy","Cutting edge"); + avl.create("edith","Even Dead, I'm The Hero"); + avl.create("ial","I Ain't Laughing"); + avl.create("ialto","I Always Love That One"); + avl.create("iama","I Am Mildly Amused"); + avl.create("ianand","I Am Not A Doctor"); + avl.create("ianal","I Am Not A Lawyer (this is an uninformed opinion)"); + avl.create("iakrt","I already know that"); + avl.create("ias","In A Second"); + avl.create("iatco","I Am The Cool One"); + avl.create("iau","I Adore You"); + avl.create("iaw","In Accordance With"); + avl.create ("iawtc","I Agree With That/This Comment"); + avl.create("iawtcsm ","I Agree With This Comment So Much"); + avl.create("iawtp","I Agree With This Post"); + avl.create("o","Ounce (of drugs)"); + avl.create("orly","Oh, Really?"); + avl.create("oo","Over and Out"); + avl.create("oa","Over Acting"); + avl.create("oan","On Another Note"); + avl.create("oao","Over And Out"); + avl.create("oap","Old Age Pensioner"); + avl.create("oatus","On A Totally Unrelated Subject"); + avl.create("oaus","On An Unrelated Subject"); + avl.create("ob","Oh, Brother"); + avl.create("obby","Oh, Baby"); + avl.create("obe","Overcome By Events"); + avl.create("obgyn","Gynecologist (OBstetrics and GYNecology)"); + avl.create("obhwf","One Big Happy Weasely Family"); + avl.create("obo","Or Best Offer"); + avl.create("obq","Oh, Be Quiet"); + avl.create("obs","Obviously"); + avl.create("obtw","Oh, By The Way"); + avl.create("obv","Obviously"); + avl.create("obx","Outer Banks North Carolina"); + avl.create("oc","Of Course"); + avl.create("ocd","Obsessive Compulsive Disorder"); + avl.create("och","Oh (Scottish)"); + avl.create("ocn","Of Course Not"); + avl.create("oco","Oh, Come On"); + avl.create("ocr","Optical Character Recognition"); + avl.create("oct","On Company Time"); + avl.create("od","Overdose"); + avl.create("lit", "When something is very good" ); + avl.create("extra","Dramatic"); + avl.create("salty","When someone is upset"); + avl.create("flex","Someone is showing off"); + avl.create("highkey","Liked something secretly"); + avl.create("shook","They are shocked or incredibly surprised"); + avl.create("spilling the tea","They are gossiping"); + avl.create("wallflower","A shy person"); + avl.create("busted ","Getting caught"); + avl.create("g2g","Got to go"); + avl.create("lurker","When someone visits a forum often"); + avl.create("faq","Frequently asked questions"); + avl.create("pwned","Defeated or humiliated"); + avl.create("lag","When computer application is slow"); + avl.create("noob","When someone is new to something"); + avl.create("photobomb","When someone or something appears in a photo unexpectedly"); + avl.create("spam","Type of email which is not meaningful"); + avl.create("trending","Popular or fashionable at a moment"); + avl.create("handle ","Nickname for a website"); + avl.create("haha","Laughter"); + avl.create("irl","In real life"); + avl.create("nsfw","Not safe for work"); + avl.create("dr","Didn't read"); + avl.create("otl","Emoji used to show an expression or feeling"); + avl.create("wack"," Bad ,wrong ,worthless"); + avl.create("wacko","Crazy, insane."); + avl.create("wacky","Crazy, zany."); + avl.create("wad", "(Noun) A large amount of money."); + avl.create("nab", "To catch someone doing something wrong."); + avl.create("nail","To do something perfectly."); + avl.create("narc","A narcotics officer, a police officer working in drug trade suppression."); + avl.create("nark","A police officer working in drug trade suppression."); + avl.create("neat","Very good, excellent."); + avl.create("nerd","A studious person with few social skills."); + avl.create("ocker","A crude and obnoxious Australian."); + avl.create("od","To take an overdose of a drug."); + avl.create("oddball","A strange or eccentric person "); + avl.create("off","To murder, to kill."); + avl.create("off the hook","No longer suspected of guilt "); + avl.create("pack heat","To carry a gun."); + avl.create("pack it in","To stop what you're doing, to quit."); + avl.create("pain in the arse","Someone or something that's annoying or troublesome."); + avl.create("pain in the ass","An annoying or troublesome person or thing."); + avl.create("pal","A friend."); + avl.create("quick sticks","Quickly. "); + avl.create("quid","One pound sterling."); + avl.create("quids-in","In profit. "); + avl.create("quilt","A feeble or pathetic person. "); + avl.create("quack","doctor"); + avl.create("laa","Lad"); + avl.create("labtop","Laptop"); + avl.create("lacking","Without a weapon, specifically a gun"); + avl.create("lad","Guy"); + avl.create("maab","Male-Assigned At Birth"); + avl.create("mac","Media Access Control"); + avl.create("maching","Going at maximum Speed (skiing or biking)"); + avl.create("mack","Flirt"); + avl.create("mad","Really, extremely"); + avl.create("madd","Mothers Against Drunk Driving"); + avl.create("mag","Magazine"); + avl.create("jaja","Spanish laugh"); + avl.create("b","Bro"); + avl.create("ban","Banned"); + + avl.create("bb","Baby"); + avl.create("bd","Bondage And Discipline"); + + avl.create("be","Breaking And Entering"); + avl.create("C","Very happy"); + avl.create("caac","Cool As A Cucumber"); + avl.create("cab","Misspelling of CBA"); + avl.create("cachai","Do you understand?"); + avl.create("cache","Store for temporary computer files"); + avl.create("cactus","Broken, dead"); + avl.create("dada","Defence Against the Dark Arts (Harry Potter)"); + avl.create("dadt","Don't Ask, Don't Tell"); + avl.create("dae","Does Anybody Else"); + avl.create("dag","Damn"); + + avl.create("daggy","Uncool, not trendy, untidy"); + avl.create ("faa","Federal Aviation Administration)"); + + avl.create( "faab","Female-Assigned At Birth"); + avl.create("faak","Falling Asleep At Keyboard"); + avl.create ("fab","Fabulous"); + avl.create("fabu","Fabulous"); + avl.create("ga ","Go Ahead"); + avl.create("gac","Guilty As Charged"); + + avl.create("gaff","House"); + avl.create("gafaia","Get Away From It All"); + avl.create("gafm","Get Away From Me"); + avl.create("gag","About to throw up"); + + avl.create("ha","Sarcastic laugh"); + avl.create("habbo","Online community/game"); + avl.create("habibi","My darling (Arabic)"); + avl.create("hac","Asian Chick"); + avl.create("hacer","Hacker"); + avl.create("jaf","Just A Friend"); + + avl.create("jag","Socially inept person"); + avl.create("jah","God,Jehovah"); + avl.create("jailbreak","Crack an iPhone"); + avl.create("kd","Kraft Dinner"); + avl.create("kda","Kills / Deaths / Assists"); + avl.create("kdr","Kill/Death Ratio"); + avl.create("keed","Kid, joke"); + avl.create("keel","Kill"); + avl.create("lsa","Cantonese Exclamation"); + avl.create ("rabbit on","To talk for a long time, esp. "); + avl.create ("racket","Loud noise that lasts a long time."); + avl.create ("racket","A dishonest or illegal activity that makes money."); + avl.create ("rap","To talk together in a relaxed way "); + avl.create ("rap","To recite lyrics over a rhythmic beat."); + avl.create ("s.p.","British slang for the odds on a horse; essential information, the known form."); + avl.create ("s.t.p.","Slang for a particular hallucinogenic drug similar to, but more powerful than LSD."); + avl.create ("sab","British slang for sabotage."); + avl.create ("sabbing","British slang for sabotage."); + avl.create ("tad","Slightly, a little."); + avl.create ("tail","A person who's following someone to find out where they're going and what they're doing."); + avl.create ("take","Stolen money or goods."); + avl.create ("tee off","To make someone angry, to annoy."); + avl.create ("thick","Not very intelligent, a bit slow mentally."); + avl.create ("ugg boots","Soft sheepskin boots that originated in Australia."); + avl.create ("ump","Umpire."); + avl.create ("umpteen","Many, countless."); + avl.create ("uncle sam","The U.S.A., the U.S. government."); + avl.create ("uncool.","Not good, not acceptable, not fashionable."); + avl.create ("uac","User Account Control"); + avl.create ("uae", "United Arab Emirates"); + avl.create ("uak","You Already Know"); + avl.create ("uan","Universal Access Number"); + avl.create ("uark","You Already Know"); + avl.create ("uav","Urban Assault Vehicle"); + avl.create("ub","You biggit"); + avl.create ("ubt","You Be Too"); + avl.create ("ubber","Uber, very"); + avl.create ("ubd","User Brain Damage"); + avl.create ("v","Black−American slang for an unfriendly female"); + avl.create ("v.a.t.","British slang for vodka and tonic."); + avl.create ("v.c.","American slang for Viet Cong, a north Vietnamese combatant."); + avl.create ("vac","British slang for a university or other higher education holiday."); + avl.create ("vacuum cleaner","Black−American slang for ones lungs"); + avl.create("zilchNothing","Zero"); + avl.create("zibi","Person from Zimbabwe"); + avl.create("zing","Owned"); + + avl.create("zip","Ounce of marijauna"); + avl.create ("zit","Spot, pimple"); + avl.create("zoinks","jeepers"); + avl.create("yacc","Yet Another Compiler-Compiler"); + avl.create("yam","And so on, blah"); + avl.create("yagb","You Ain't Grizz Baby (COD)"); + avl.create("yahoo","Yob, lout"); + avl.create("yahwej","The name of God in hebrew"); + avl.create("yak","You Already Know"); + avl.create("xkcd","Web comic"); + avl.create ("xl","Extra Large"); + avl.create("xlnt","Excellent"); + avl.create ("xlr","Accelerate"); + avl.create ("xls","MS Excel file extension"); + avl.create("xm","Extreme"); + avl.create ("waa","Crying"); + avl.create ("waam","What's going on, what's up"); + avl.create ("waan","Want"); + avl.create("wack","Low quailty, lame"); + avl.create ("wadr","With All Due Respect"); + avl.create("waefrd","When All Else Fails, Read Directions"); + + int ch; + do{ + System.out.println("**************************** Menu ********************************"); + System.out.println("1.Find a Word"); + System.out.println("2.Display words starting with given letter"); + System.out.println("3.Total no. of words in dictionary"); + System.out.println("4.Total no. of words starting with given letter"); + System.out.println("5.Display all words"); + System.out.println("6.Display Words starting with vowels");//words at + System.out.println("7.Total no. of words starting with vowels"); + System.out.println("8.Exit"); + System.out.println("******************************************************************"); + System.out.print("Enter your choice : "); + ch=sc.nextInt(); + switch(ch) + { + case 1: + + avl.findWord(); + break; + case 2: + System.out.print("\nEnter the starting letter of the words you want to find : "); + String c=sc.next(); + if(c.length()!=1) { + System.out.println("\nEnter a single letter!"); //validation for a letter + break; + } + else { + int j=0; + if(avl.displayWordsAt(avl.getRoot(),c,j)==0) + System.out.println("No word starts with the letter '"+c+"'"); + break; + } + case 3: System.out.println("\nTotal no. of words in the dictionary are : "+avl.totalWordsCount(avl.getRoot())); + break; + case 4: System.out.print("\nEnter the starting letter of the words you want to find : "); + String b=sc.next(); + if(b.length()!=1) { + System.out.println("\nEnter a single letter!"); + break; + } + else { + System.out.println(avl.wordCountAt(avl.getRoot(),b.toLowerCase().charAt(0))); + break; + } + case 5: + avl.display(avl.getRoot()); + break; + case 6: + avl.wordStartsWithVowel(); + break; + case 7: + avl.wordCountStartsWithVowel(); + break; + case 8: System.out.println("Program ended"); + + break; + default: System.out.println("Invalid option"); + + } + } while(ch != 8); + sc.close(); //sc is closed + } + +} + +/********************************************************************** + * TIME COMPLEXITY: + * height() O(1) + * balanceFactor() O(1) + * LL() O(1) + * RR() O(1) + * RL() O(1) + * LR() O(1) + * insert() O(logn) + * create() O(1) + * display() O(n) + * getRoot() O(1) + * findWord() O(n) + * displayWordsAt() O(logn) + * totalWordsCount (logn) + * wordCountAt() O(logn) + * wordStartsWithVowel() O(logn) + * wordCountStartsWithVowel() O(logn) +***********************************************************************/ +/* +OUTPUT: +**************************** Menu ******************************** +1.Find a Word +2.Display words starting with given letter +3.Total no. of words in dictionary +4.Total no. of words starting with given letter +5.Display all words +6.Display Words starting with vowels +7.Total no. of words starting with vowels +8.Exit +****************************************************************** +Enter your choice : 1 + +Enter word : lol + +Word : LOL - Meaning : Laugh out loud +**************************** Menu ******************************** +1.Find a Word +2.Display words starting with given letter +3.Total no. of words in dictionary +4.Total no. of words starting with given letter +5.Display all words +6.Display Words starting with vowels +7.Total no. of words starting with vowels +8.Exit +****************************************************************** +Enter your choice : 2 + +Enter the starting letter of the words you want to find : k +Word : KD - Meaning : Kraft Dinner +Word : KDA - Meaning : Kills / Deaths / Assists +Word : KDR - Meaning : Kill/Death Ratio +Word : KEED - Meaning : Kid, joke +Word : KEEL - Meaning : Kill +**************************** Menu ******************************** +1.Find a Word +2.Display words starting with given letter +3.Total no. of words in dictionary +4.Total no. of words starting with given letter +5.Display all words +6.Display Words starting with vowels +7.Total no. of words starting with vowels +8.Exit +****************************************************************** +Enter your choice : 3 + +Total no. of words in the dictionary are : 279 +**************************** Menu ******************************** +1.Find a Word +2.Display words starting with given letter +3.Total no. of words in dictionary +4.Total no. of words starting with given letter +5.Display all words +6.Display Words starting with vowels +7.Total no. of words starting with vowels +8.Exit +****************************************************************** +Enter your choice : 4 + +Enter the starting letter of the words you want to find : f +8 +**************************** Menu ******************************** +1.Find a Word +2.Display words starting with given letter +3.Total no. of words in dictionary +4.Total no. of words starting with given letter +5.Display all words +6.Display Words starting with vowels +7.Total no. of words starting with vowels +8.Exit +****************************************************************** +Enter your choice : 5 +A1 -Top quality +A2DP -Advanced Audio Distribution Profile +A3 -Anywhere, Any time, Any place +A4U -All For You +A7A -Frustration, anger (Arabic) +A7X -Avenged Sevenfold (band) +AA -Alcoholics Anonymous +AAB -Average At Best +AAC -Apple Audio Compression +AAK -Alive And Kicking +AAMOF -As A Matter Of Fact +AAP -Always A Pleasure +AAR -At Any Rate +AARP -American Association of Retired Persons +AAT -And Another Thing +AAWY -And Also With You +AAYF -As Always, Your Friend +ABBO -Accountants Bookkeepers and Business Owners +AE -Accident & Emergency +AF -Always And Forever +AFE -Abercrombie & Fitch +AMA -Ask Me Anything +AN -Author's Note +AR -Artists & Repertoire +AW -Anyway +B -Bro +BAN -Banned +BB -Baby +BD -Bondage And Discipline +BE -Breaking And Entering +BRB -Be right back +BTW -By the way +BUSTED -Getting caught +C -Very happy +CAAC -Cool As A Cucumber +CAB -Misspelling of CBA +CACHAI -Do you understand? +CACHE -Store for temporary computer files +CACTUS -Broken, dead +DADA -Defence Against the Dark Arts (Harry Potter) +DADT -Don't Ask, Don't Tell +DAE -Does Anybody Else +DAG -Damn +DAGGY -Uncool, not trendy, untidy +DM -Direct Message +DR -Didn’t read +DR -Didn't read +E -Ecstasy +EA -Electronic Arts +EAS -End of Active Service +EB -Eyeball +EBCAK -Error Between Chair And Keyboard +EBD -End of Business Day +EBM -Electronic Body Music +EBONY -Dark skin tone +EBT -Electronic Benefits Transfer +ECG -Electrocardiogram +ECIG -Electronic Cigarett +ECO -Ecological +ECT -Misspelling of 'etc' +ECU -Electronic Control Unit +ECW -Extreme Championship Wrestling +EDATING -Online dating +EDC -Every Day Carry +EDD -Estimated Delivery Date +EDDRESS -Email address +EDGY -Cutting edge +EDITH -Even Dead, I'm The Hero +EEG -Ear To Ear Grin +EOE -Errors and omissions excluded +EV -Everyone +EVITE -Electronic Invitation +EXTRA -Dramatic +FAA -Federal Aviation Administration) +FAAB -Female-Assigned At Birth +FAAK -Falling Asleep At Keyboard +FAB -Fabulous +FABU -Fabulous +FAQ -Frequently asked questions +FLEX -Someone is showing off +FWIW -For what it’s worth +G2G -Got to go +GA -Go Ahead +GAC -Guilty As Charged +GAFAIA -Get Away From It All +GAFF -House +GAFM -Get Away From Me +GAG -About to throw up +GTG -Got to go +HA -Sarcastic laugh +HABBO -Online community/game +HABIBI -My darling (Arabic) +HAC -Asian Chick +HACER -Hacker +HAHA -Laughter +HANDLE -Nickname for a website +HIGHKEY -Liked something secretly +HIT ME UP - Hit me up +IAKRT -I already know that +IAL -I Ain't Laughing +IALTO -I Always Love That One +IAMA -I Am Mildly Amused +IANAL -I Am Not A Lawyer (this is an uninformed opinion) +IANAND -I Am Not A Doctor +IAS -In A Second +IATCO -I Am The Cool One +IAU -I Adore You +IAW -In Accordance With +IAWTC -I Agree With That/This Comment +IAWTCSM -I Agree With This Comment So Much +IAWTP -I Agree With This Post +ICYMI -In case you missed it +IDK -I don't know +IKR -I know right +IMHO -In my humble opinion +IMO -In my opinion +IRL -In real life +JAF -Just A Friend +JAG -Socially inept person +JAH -God,Jehovah +JAILBREAK -Crack an iPhone +JAJA -Spanish laugh +KD -Kraft Dinner +KDA -Kills / Deaths / Assists +KDR -Kill/Death Ratio +KEED -Kid, joke +KEEL -Kill +LAA -Lad +LABTOP -Laptop +LACKING -Without a weapon, specifically a gun +LAD -Guy +LAG -When computer application is slow +LIT -When something is very good +LMK -Let me know +LOL -Laugh out loud +LSA -Cantonese Exclamation +LURKER -When someone visits a forum often +MAAB -Male-Assigned At Birth +MAC -Media Access Control +MACHING -Going at maximum Speed (skiing or biking) +MACK -Flirt +MAD -Really, extremely +MADD -Mothers Against Drunk Driving +MAG -Magazine +NAB -To catch someone doing something wrong. +NAIL -To do something perfectly. +NARC -A narcotics officer, a police officer working in drug trade suppression. +NARK -A police officer working in drug trade suppression. +NEAT -Very good, excellent. +NERD -A studious person with few social skills. +NOOB -When someone is new to something +NSFW -Not safe for work +NVM -Nevermind +O -Ounce (of drugs) +OA -Over Acting +OAN -On Another Note +OAO -Over And Out +OAP -Old Age Pensioner +OATUS -On A Totally Unrelated Subject +OAUS -On An Unrelated Subject +OB -Oh, Brother +OBBY -Oh, Baby +OBE -Overcome By Events +OBGYN -Gynecologist (OBstetrics and GYNecology) +OBHWF -One Big Happy Weasely Family +OBO -Or Best Offer +OBQ -Oh, Be Quiet +OBS -Obviously +OBTW -Oh, By The Way +OBV -Obviously +OBX -Outer Banks North Carolina +OC -Of Course +OCD -Obsessive Compulsive Disorder +OCH -Oh (Scottish) +OCKER -A crude and obnoxious Australian. +OCN -Of Course Not +OCO -Oh, Come On +OCR -Optical Character Recognition +OCT -On Company Time +OD -Overdose +OD -To take an overdose of a drug. +ODDBALL -A strange or eccentric person +OFF -To murder, to kill. +OFF THE HOOK -No longer suspected of guilt +OO -Over and Out +OOTD -Outfit of the day +ORLY -Oh, Really? +OTL -Emoji used to show an expression or feeling +PACK HEAT -To carry a gun. +PACK IT IN -To stop what you're doing, to quit. +PAIN IN THE ARSE -Someone or something that's annoying or troublesome. +PAIN IN THE ASS -An annoying or troublesome person or thing. +PAL -A friend. +PHOTOBOMB -When someone or something appears in a photo unexpectedly +PWNED -Defeated or humiliated +QOTD -Quote of the day +QUACK -doctor +QUICK STICKS -Quickly. +QUID -One pound sterling. +QUIDS-IN -In profit. +QUILT -A feeble or pathetic person. +RABBIT ON -To talk for a long time, esp. +RACKET -Loud noise that lasts a long time. +RACKET -A dishonest or illegal activity that makes money. +RAP -To talk together in a relaxed way +RAP -To recite lyrics over a rhythmic beat. +RN -Right now +ROFL -Rolling on floor laughing +S.P. -British slang for the odds on a horse; essential information, the known form. +S.T.P. -Slang for a particular hallucinogenic drug similar to, but more powerful than LSD. +SAB -British slang for sabotage. +SABBING -British slang for sabotage. +SALTY -When someone is upset +SHOOK -They are shocked or incredibly surprised +SPAM -Type of email which is not meaningful +SPILLING THE TEA -They are gossiping +STFU -Shut the *swear word!* up +TAD -Slightly, a little. +TAIL -A person who's following someone to find out where they're going and what they're doing. +TAKE -Stolen money or goods. +TBA -To be announced +TBD -To be decided +TBF -To be frank +TBH -To be honest +TEE OFF -To make someone angry, to annoy. +TGIF -Thank goodness it’s Friday +THICK -Not very intelligent, a bit slow mentally. +TL -Too long +TRENDING -Popular or fashionable at a moment +TTYL -Talk to you later +UAC -User Account Control +UAE -United Arab Emirates +UAK -You Already Know +UAN -Universal Access Number +UARK -You Already Know +UAV -Urban Assault Vehicle +UB -You biggit +UBBER -Uber, very +UBD -User Brain Damage +UBT -You Be Too +UGG BOOTS -Soft sheepskin boots that originated in Australia. +UMP -Umpire. +UMPTEEN -Many, countless. +UNCLE SAM -The U.S.A., the U.S. government. +UNCOOL. -Not good, not acceptable, not fashionable. +V -Black−American slang for an unfriendly female +V.A.T. -British slang for vodka and tonic. +V.C. -American slang for Viet Cong, a north Vietnamese combatant. +VAC -British slang for a university or other higher education holiday. +VACUUM CLEANER -Black−American slang for ones lungs +WAA -Crying +WAAM -What's going on, what's up +WAAN -Want +WACK - Bad ,wrong ,worthless +WACK -Low quailty, lame +WACKO -Crazy, insane. +WACKY -Crazy, zany. +WAD -(Noun) A large amount of money. +WADR -With All Due Respect +WAEFRD -When All Else Fails, Read Directions +WALLFLOWER -A shy person +XKCD -Web comic +XL -Extra Large +XLNT -Excellent +XLR -Accelerate +XLS -MS Excel file extension +XM -Extreme +YACC -Yet Another Compiler-Compiler +YAGB -You Ain't Grizz Baby (COD) +YAHOO -Yob, lout +YAHWEJ -The name of God in hebrew +YAK -You Already Know +YAM -And so on, blah +ZIBI -Person from Zimbabwe +ZILCHNOTHING -Zero +ZING -Owned +ZIP -Ounce of marijauna +ZIT -Spot, pimple +ZOINKS -jeepers +**************************** Menu ******************************** +1.Find a Word +2.Display words starting with given letter +3.Total no. of words in dictionary +4.Total no. of words starting with given letter +5.Display all words +6.Display Words starting with vowels +7.Total no. of words starting with vowels +8.Exit +****************************************************************** +Enter your choice : 6 + +Starts with Vowel : 'a' + +Word : A7X - Meaning : Avenged Sevenfold (band) +Word : A4U - Meaning : All For You +Word : A2DP - Meaning : Advanced Audio Distribution Profile +Word : A1 - Meaning : Top quality +Word : A3 - Meaning : Anywhere, Any time, Any place +Word : A7A - Meaning : Frustration, anger (Arabic) +Word : AAB - Meaning : Average At Best +Word : AA - Meaning : Alcoholics Anonymous +Word : AAK - Meaning : Alive And Kicking +Word : AAC - Meaning : Apple Audio Compression +Word : AAP - Meaning : Always A Pleasure +Word : AAMOF - Meaning : As A Matter Of Fact +Word : AARP - Meaning : American Association of Retired Persons +Word : AAR - Meaning : At Any Rate +Word : AE - Meaning : Accident & Emergency +Word : AAT - Meaning : And Another Thing +Word : AAWY - Meaning : And Also With You +Word : AAYF - Meaning : As Always, Your Friend +Word : ABBO - Meaning : Accountants Bookkeepers and Business Owners +Word : AW - Meaning : Anyway +Word : AMA - Meaning : Ask Me Anything +Word : AF - Meaning : Always And Forever +Word : AFE - Meaning : Abercrombie & Fitch +Word : AR - Meaning : Artists & Repertoire +Word : AN - Meaning : Author's Note + +Starts with Vowel : 'e' + +Word : E - Meaning : Ecstasy +Word : EAS - Meaning : End of Active Service +Word : EA - Meaning : Electronic Arts +Word : EBCAK - Meaning : Error Between Chair And Keyboard +Word : EB - Meaning : Eyeball +Word : EBM - Meaning : Electronic Body Music +Word : EBD - Meaning : End of Business Day +Word : EOE - Meaning : Errors and omissions excluded +Word : EEG - Meaning : Ear To Ear Grin +Word : EDC - Meaning : Every Day Carry +Word : ECIG - Meaning : Electronic Cigarett +Word : EBONY - Meaning : Dark skin tone +Word : EBT - Meaning : Electronic Benefits Transfer +Word : ECG - Meaning : Electrocardiogram +Word : EDATING - Meaning : Online dating +Word : ECU - Meaning : Electronic Control Unit +Word : ECT - Meaning : Misspelling of 'etc' +Word : ECO - Meaning : Ecological +Word : ECW - Meaning : Extreme Championship Wrestling +Word : EDD - Meaning : Estimated Delivery Date +Word : EDDRESS - Meaning : Email address +Word : EDGY - Meaning : Cutting edge +Word : EDITH - Meaning : Even Dead, I'm The Hero +Word : EXTRA - Meaning : Dramatic +Word : EVITE - Meaning : Electronic Invitation +Word : EV - Meaning : Everyone + +Starts with Vowel : 'i' + +Word : IAMA - Meaning : I Am Mildly Amused +Word : IAL - Meaning : I Ain't Laughing +Word : IAKRT - Meaning : I already know that +Word : IALTO - Meaning : I Always Love That One +Word : IKR - Meaning : I know right +Word : ICYMI - Meaning : In case you missed it +Word : IAU - Meaning : I Adore You +Word : IATCO - Meaning : I Am The Cool One +Word : IAS - Meaning : In A Second +Word : IANAND - Meaning : I Am Not A Doctor +Word : IANAL - Meaning : I Am Not A Lawyer (this is an uninformed opinion) +Word : IAW - Meaning : In Accordance With +Word : IAWTC - Meaning : I Agree With That/This Comment +Word : IAWTCSM - Meaning : I Agree With This Comment So Much +Word : IAWTP - Meaning : I Agree With This Post +Word : IDK - Meaning : I don't know +Word : IRL - Meaning : In real life +Word : IMO - Meaning : In my opinion +Word : IMHO - Meaning : In my humble opinion + +Starts with Vowel : 'o' + +Word : OBQ - Meaning : Oh, Be Quiet +Word : OBE - Meaning : Overcome By Events +Word : OATUS - Meaning : On A Totally Unrelated Subject +Word : OAO - Meaning : Over And Out +Word : OA - Meaning : Over Acting +Word : O - Meaning : Ounce (of drugs) +Word : OAN - Meaning : On Another Note +Word : OAP - Meaning : Old Age Pensioner +Word : OB - Meaning : Oh, Brother +Word : OAUS - Meaning : On An Unrelated Subject +Word : OBBY - Meaning : Oh, Baby +Word : OBHWF - Meaning : One Big Happy Weasely Family +Word : OBGYN - Meaning : Gynecologist (OBstetrics and GYNecology) +Word : OBO - Meaning : Or Best Offer +Word : OBX - Meaning : Outer Banks North Carolina +Word : OBTW - Meaning : Oh, By The Way +Word : OBS - Meaning : Obviously +Word : OBV - Meaning : Obviously +Word : OCN - Meaning : Of Course Not +Word : OCD - Meaning : Obsessive Compulsive Disorder +Word : OC - Meaning : Of Course +Word : OCH - Meaning : Oh (Scottish) +Word : OCKER - Meaning : A crude and obnoxious Australian. +Word : ORLY - Meaning : Oh, Really? +Word : OOTD - Meaning : Outfit of the day +Word : OCR - Meaning : Optical Character Recognition +Word : OCO - Meaning : Oh, Come On +Word : OO - Meaning : Over and Out +Word : OCT - Meaning : On Company Time +Word : OD - Meaning : Overdose +Word : OD - Meaning : To take an overdose of a drug. +Word : ODDBALL - Meaning : A strange or eccentric person +Word : OFF - Meaning : To murder, to kill. +Word : OFF THE HOOK - Meaning : No longer suspected of guilt +Word : OTL - Meaning : Emoji used to show an expression or feeling + +Starts with Vowel : 'u' + +Word : UNCOOL. - Meaning : Not good, not acceptable, not fashionable. +Word : UMPTEEN - Meaning : Many, countless. +Word : UARK - Meaning : You Already Know +Word : UAN - Meaning : Universal Access Number +Word : UAK - Meaning : You Already Know +Word : UAE - Meaning : United Arab Emirates +Word : UAC - Meaning : User Account Control +Word : UGG BOOTS - Meaning : Soft sheepskin boots that originated in Australia. +Word : UAV - Meaning : Urban Assault Vehicle +Word : UB - Meaning : You biggit +Word : UBT - Meaning : You Be Too +Word : UBBER - Meaning : Uber, very +Word : UBD - Meaning : User Brain Damage +Word : UMP - Meaning : Umpire. +Word : UNCLE SAM - Meaning : The U.S.A., the U.S. government. +**************************** Menu ******************************** +1.Find a Word +2.Display words starting with given letter +3.Total no. of words in dictionary +4.Total no. of words starting with given letter +5.Display all words +6.Display Words starting with vowels +7.Total no. of words starting with vowels +8.Exit +****************************************************************** +Enter your choice : 7 +Total no. of words starting with vowel : 'a' are - 25 +Total no. of words starting with vowel : 'e' are - 26 +Total no. of words starting with vowel : 'i' are - 19 +Total no. of words starting with vowel : 'o' are - 35 +Total no. of words starting with vowel : 'u' are - 15 + +Total no. of words starting with vowels are : 120 +**************************** Menu ******************************** +1.Find a Word +2.Display words starting with given letter +3.Total no. of words in dictionary +4.Total no. of words starting with given letter +5.Display all words +6.Display Words starting with vowels +7.Total no. of words starting with vowels +8.Exit +****************************************************************** +Enter your choice : 8 +Program ended + +*/ \ No newline at end of file diff --git a/Internet-Download-Manager b/Internet-Download-Manager new file mode 160000 index 00000000..10b04859 --- /dev/null +++ b/Internet-Download-Manager @@ -0,0 +1 @@ +Subproject commit 10b04859b899964947a08085e39803250c200b73 diff --git a/Intersection_Of_TwoArrays.java b/Intersection_Of_TwoArrays.java new file mode 100644 index 00000000..29e4f2ca --- /dev/null +++ b/Intersection_Of_TwoArrays.java @@ -0,0 +1,37 @@ +package me.company; +import java.util.*; + +public class Intersection_Of_TwoArrays { + public static void main(String args[]) + { + Scanner sc=new Scanner(System.in); + HashSet<Integer>s=new HashSet<Integer>(); + System.out.println("Enter the no. of elements in array a"); + int n1=sc.nextInt(); + System.out.println("Enter the no. of elements in array b"); + int n2=sc.nextInt(); + int a[]=new int[n1]; + int b[]=new int[n2]; + System.out.println("Enter the elements of array a : "); + for(int i=0; i<n1; i++) + { + a[i]=sc.nextInt(); + } + System.out.println("Enter the elements of array b : "); + for(int i=0; i<n2; i++) + { + b[i]=sc.nextInt(); + } + for(int i=0; i<n1; i++) + s.add(a[i]); + int result=0; + for(int j=0; j<n2; j++) + { + if(s.contains(b[j])) { + result++; + s.remove(b[j]); + } + } + System.out.println("Required no. of common elements are : "+result); + } +} diff --git a/JAVA Generate Secure Password b/JAVA Generate Secure Password new file mode 100644 index 00000000..e4db41c7 --- /dev/null +++ b/JAVA Generate Secure Password @@ -0,0 +1,31 @@ +import java.security.SecureRandom; +import java.util.Random; + +public class GeneratePasswordExample1 { + + public static void main(String[] args) { + // Generate and print a secure random password + String securePassword = generateSecurePassword(12); // You can specify the desired password length here + System.out.println("The generated secure password is: " + securePassword); + } + + public static String generateSecurePassword(int length) { + String uppercaseChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + String lowercaseChars = "abcdefghijklmnopqrstuvwxyz"; + String digitChars = "0123456789"; + String specialChars = "!@#$%^&*()_+"; + + String allCharacters = uppercaseChars + lowercaseChars + digitChars + specialChars; + + // Use a secure random number generator + Random random = new SecureRandom(); + + StringBuilder password = new StringBuilder(); + for (int i = 0; i < length; i++) { + int randomIndex = random.nextInt(allCharacters.length()); + password.append(allCharacters.charAt(randomIndex)); + } + + return password.toString(); + } +} diff --git a/JAVA NetBeans Banking Management System b/JAVA NetBeans Banking Management System new file mode 100644 index 00000000..e69de29b diff --git a/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/About & Steps to Run.txt b/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/About & Steps to Run.txt new file mode 100644 index 00000000..45377748 --- /dev/null +++ b/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/About & Steps to Run.txt @@ -0,0 +1,16 @@ +About - + +A good example on how sockets work and how you can code it using Java language. + +Steps- + +1) Compile both the files - +javac ServerProgram.java ClientProgram.java + +2) Run the ServerProgram.java first to start the server +java ServerProgram + +3) Run the ClientProgram.java now to connect to the server +java ClientProgram + +4) Start the messaging like shown in the image attached. \ No newline at end of file diff --git a/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/ClientProgram.java b/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/ClientProgram.java new file mode 100644 index 00000000..9f8a676d --- /dev/null +++ b/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/ClientProgram.java @@ -0,0 +1,27 @@ +import java.io.*; +import java.net.*; +class ClientProgram { + public static void main(String args[]) throws Exception { + Socket s=new Socket("localhost",1111); //you use any port available. Make sure to have the same port in both files. + PrintStream ps=new PrintStream(s.getOutputStream()); + BufferedReader br=new BufferedReader(new InputStreamReader(s.getInputStream())); + BufferedReader kb=new BufferedReader(new InputStreamReader(System.in)); + while(true) { + String str,str1; + System.out.print("Client: "); + str=kb.readLine(); + if(str.equals("exit")) { + break; + } + else { + ps.println(str); + str1=br.readLine(); + System.out.println("Server: " + str1); + } + } + ps.close(); + br.close(); + kb.close(); + s.close(); + } +} diff --git a/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/ServerProgram.java b/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/ServerProgram.java new file mode 100644 index 00000000..cf9ddf0a --- /dev/null +++ b/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/ServerProgram.java @@ -0,0 +1,39 @@ +import java.io.*; +import java.net.*; +class ServerProgram { + public static void main(String args[]) throws Exception { + ServerSocket ss=new ServerSocket(1111); //you use any port available. Make sure to have the same port in both files. + Socket s=ss.accept(); + System.out.println("Connection Estabished"); + PrintStream ps=new PrintStream(s.getOutputStream()); + BufferedReader br=new BufferedReader(new InputStreamReader(s.getInputStream())); + BufferedReader kb=new BufferedReader(new InputStreamReader(System.in)); + try { + while (true) { + String str = br.readLine(); + if (str == null || str.equals("exit")) { + break; + } + System.out.println("Cliente: " + str); + + System.out.print("Servidor: "); + String str1 = kb.readLine(); + ps.println(str1); + } + } catch (IOException e) { + System.out.println("Communication error: " + e.getMessage()); + e.printStackTrace(); + } finally { + try { + if (ps != null) ps.close(); + if (br != null) br.close(); + if (kb != null) kb.close(); + if (s != null) s.close(); + if (ss != null) ss.close(); + } catch (IOException e) { + System.out.println("Error closing resources: " + e.getMessage()); + e.printStackTrace(); + } + } + } +} diff --git a/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/screenshot for reference.png b/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/screenshot for reference.png new file mode 100644 index 00000000..4c84d454 Binary files /dev/null and b/JAVA SERVER CLIENT NETWORKING(SAME DEVICE)/screenshot for reference.png differ diff --git a/Jarvis_Program_Using_Switchcase.java b/Jarvis_Program_Using_Switchcase.java new file mode 100644 index 00000000..22a48d12 --- /dev/null +++ b/Jarvis_Program_Using_Switchcase.java @@ -0,0 +1,89 @@ +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.Scanner; + +public class JarvisProgram { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + String command; + + System.out.println("Welcome to Jarvis Program!"); + + do { + System.out.print("Enter a command: "); + command = scanner.nextLine(); + + switch (command.toLowerCase()) { + case "hello": + System.out.println("Hello! How can I assist you?"); + break; + case "time": + LocalTime time = LocalTime.now(); + System.out.println("The current time is: " + time); + break; + case "date": + LocalDate date = LocalDate.now(); + System.out.println("Today's date is: " + date); + break; + case "weather": + String weather = getWeather(); + System.out.println("The weather today is: " + weather); + break; + case "reminder": + String reminder = setReminder(); + System.out.println("Reminder set: " + reminder); + break; + case "quote": + String quote = getRandomQuote(); + System.out.println("Here's a quote for you: " + quote); + break; + case "news": + String news = getLatestNews(); + System.out.println("Here's the latest news: " + news); + break; + case "joke": + String joke = getJoke(); + System.out.println("Here's a joke for you: " + joke); + break; + case "exit": + System.out.println("Goodbye!"); + break; + default: + System.out.println("Sorry, I don't understand that command."); + break; + } + } while (!command.equalsIgnoreCase("exit")); + + scanner.close(); + } + + private static String getWeather() { + // Code to fetch the current weather from an API or any other source + // Implement your own logic or use external libraries + return "Sunny"; + } + + private static String setReminder() { + // Code to set a reminder, you can use libraries like java.util.Timer or external libraries + // Implement your own logic based on the requirements + return "Meeting at 5 PM"; + } + + private static String getRandomQuote() { + // Code to fetch a random quote from an API or a predefined list + // Implement your own logic or use external libraries + return "Coder's Never Quit.."; + } + + private static String getLatestNews() { + // Code to fetch the latest news from an API or any other source + // Implement your own logic or use external libraries + return "Latest News:- Mercedes drivers can soon turn to ChatGPT for Voice Control..."; + } + + private static String getJoke() { + // Code to fetch a random joke from an API or a predefined list + // Implement your own logic or use external libraries + return "What's the best thing about Switzerland?........I don't know but the flag is a big Plus..."; + } +} diff --git a/Java collect.java b/Java collect.java new file mode 100644 index 00000000..82d5e844 --- /dev/null +++ b/Java collect.java @@ -0,0 +1,35 @@ +// Java program to demonstrate the +// working of ArrayList +import java.io.*; +import java.util.*; + +class GFG { + + // Main Method + public static void main(String[] args) + { + + // Declaring the ArrayList with + // initial size n + ArrayList<Integer> al = new ArrayList<Integer>(); + + // Appending new elements at + // the end of the list + for (int i = 1; i <= 5; i++) + al.add(i); + + // Printing elements + System.out.println(al); + + // Remove element at index 3 + al.remove(3); + + // Displaying the ArrayList + // after deletion + System.out.println(al); + + // Printing elements one by one + for (int i = 0; i < al.size(); i++) + System.out.print(al.get(i) + " "); + } +} diff --git a/Java-collection.java b/Java-collection.java new file mode 100644 index 00000000..bbd60d0c --- /dev/null +++ b/Java-collection.java @@ -0,0 +1,41 @@ +// Java program to demonstrate +// why collection framework was needed +import java.io.*; +import java.util.*; + +class CollectionDemo { + + public static void main(String[] args) + { + // Creating instances of the array, + // vector and hashtable + int arr[] = new int[] { 1, 2, 3, 4 }; + Vector<Integer> v = new Vector(); + Hashtable<Integer, String> h = new Hashtable(); + + // Adding the elements into the + // vector + v.addElement(1); + v.addElement(2); + + // Adding the element into the + // hashtable + h.put(1, "geeks"); + h.put(2, "4geeks"); + + // Array instance creation requires [], + // while Vector and hastable require () + // Vector element insertion requires addElement(), + // but hashtable element insertion requires put() + + // Accessing the first element of the + // array, vector and hashtable + System.out.println(arr[0]); + System.out.println(v.elementAt(0)); + System.out.println(h.get(1)); + + // Array elements are accessed using [], + // vector elements using elementAt() + // and hashtable elements using get() + } + } diff --git a/Java_password_generator.java b/Java_password_generator.java new file mode 100644 index 00000000..201b6474 --- /dev/null +++ b/Java_password_generator.java @@ -0,0 +1,84 @@ + +public class Password { + String Value; + int Length; + + public Password(String s) { + Value = s; + Length = s.length(); + } + + public int CharType(char C) { + int val; + + // Char is Uppercase Letter + if ((int) C >= 65 && (int) C <= 90) + val = 1; + + // Char is Lowercase Letter + else if ((int) C >= 97 && (int) C <= 122) { + val = 2; + } + + // Char is Digit + else if ((int) C >= 60 && (int) C <= 71) { + val = 3; + } + + // Char is Symbol + else { + val = 4; + } + + return val; + } + + public int PasswordStrength() { + String s = this.Value; + boolean UsedUpper = false; + boolean UsedLower = false; + boolean UsedNum = false; + boolean UsedSym = false; + int type; + int Score = 0; + + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + type = CharType(c); + + if (type == 1) UsedUpper = true; + if (type == 2) UsedLower = true; + if (type == 3) UsedNum = true; + if (type == 4) UsedSym = true; + } + + if (UsedUpper) Score += 1; + if (UsedLower) Score += 1; + if (UsedNum) Score += 1; + if (UsedSym) Score += 1; + + if (s.length() >= 8) Score += 1; + if (s.length() >= 16) Score += 1; + + return Score; + } + + public String calculateScore() { + int Score = this.PasswordStrength(); + + if (Score == 6) { + return "This is a very good password :D check the Useful Information section to make sure it satisfies the guidelines"; + } else if (Score >= 4) { + return "This is a good password :) but you can still do better"; + } else if (Score >= 3) { + return "This is a medium password :/ try making it better"; + } else { + return "This is a weak password :( definitely find a new one"; + } + } + + @Override + public String toString() { + return Value; + } +} diff --git a/JokesApp b/JokesApp new file mode 160000 index 00000000..20593f48 --- /dev/null +++ b/JokesApp @@ -0,0 +1 @@ +Subproject commit 20593f48e5c53da725b8635ccf599933a5818c91 diff --git a/Kadanes_Algorithm.java b/Kadanes_Algorithm.java new file mode 100644 index 00000000..7a710b92 --- /dev/null +++ b/Kadanes_Algorithm.java @@ -0,0 +1,36 @@ +import java.util.*; + +public class Main { + public static long maxSubarraySum(int[] arr, int n) { + long maxi = Long.MIN_VALUE; // maximum sum + long sum = 0; + + for (int i = 0; i < n; i++) { + + sum += arr[i]; + + if (sum > maxi) { + maxi = sum; + } + + // If sum < 0: discard the sum calculated + if (sum < 0) { + sum = 0; + } + } + + if (maxi < 0) maxi = 0; + + return maxi; + } + + public static void main(String args[]) { + int[] arr = { -2, 1, -3, 4, -1, 2, 1, -5, 4}; + int n = arr.length; + long maxSum = maxSubarraySum(arr, n); + System.out.println("The maximum subarray sum is: " + maxSum); + + } + +} + diff --git a/Knapsack_algo.java b/Knapsack_algo.java new file mode 100644 index 00000000..3ff12556 --- /dev/null +++ b/Knapsack_algo.java @@ -0,0 +1,61 @@ +import java.util.*; +public class knapsack { + + + static int max(int a, int b) + { return (a > b) ? a : b; } + + static int knapSack(int W, int wt[], int val[], int n) + { + int i, w; + int K[][] = new int[n + 1][W + 1]; + + for (i = 0; i<= n; i++) + { + for (w = 0; w<= W; w++) + { + if (i == 0 || w == 0) + K[i][w] = 0; + + else if (wt[i - 1]<= w) + K[i][w] = max(val[i - 1] + K[i - 1][w - wt[i - 1]], K[i - 1][w]); + + else + K[i][w] = K[i - 1][w]; + } + } + + return K[n][W]; + } + + public static void main(String args[]) + { + int i, x, W, val[], wt[]; + + Scanner s = new Scanner(System.in); + System.out.println("Enter capacity:"); + W = s.nextInt(); + + System.out.println("Enter no. of items:"); + x = s.nextInt(); + + val = new int[x]; + + System.out.println("Enter " + x + " items:"); + + for (i = 0;i<x; i++) + val[i] = s.nextInt(); + + wt = new int[x]; + + System.out.println("Enter " + x + " items weight:"); + + for (i = 0;i<x; i++) + wt[i] = s.nextInt(); + + + int n = val.length; + System.out.println("Maximum items possible is "+knapSack(W, wt, val, n)); + } + +} diff --git a/LanguageTranslator-Using-Python/languageTranslator.py b/LanguageTranslator-Using-Python/languageTranslator.py new file mode 100644 index 00000000..f68f5678 --- /dev/null +++ b/LanguageTranslator-Using-Python/languageTranslator.py @@ -0,0 +1,62 @@ +from tkinter import * +from translate import * +import speech_recognition as sr + + +def translate(): + translator = Translator(from_lang=lan1.get(), to_lang=lan2.get()) + translation = translator.translate(var.get()) + var1.set(translation) + +root = Tk() +root.title("Translator") +root.resizable(False,False) +mainframe = Frame(root) +mainframe.columnconfigure(0, weight=1) +mainframe.grid(column=0, row=0, sticky=(N, W, E, S)) +mainframe.rowconfigure(0, weight=1) +mainframe.pack(pady=100, padx=100) +var = StringVar() +textbox = Entry(mainframe, textvariable=var).grid(row=2, column=1) + +def talk(): + r = sr.Recognizer() + with sr.Microphone() as source: + print("Say something!") + r.adjust_for_ambient_noise(source) + audio = r.listen(source) + + try: + text = r.recognize_google(audio) + print("Sphinx thinks you said " + text) + var.set(text) + translate() + except sr.UnknownValueError: + print("Sphinx could not understand audio") + except sr.RequestError as e: + print("Sphinx error; {0}".format(e)) + + + +lan1 = StringVar(root) +lan2 = StringVar(root) +choices = {'English', 'Hindi', 'Gujarati', 'Spanish', 'German'} +lan1.set('English') +lan2.set('Hindi') +lan1menu = OptionMenu(mainframe, lan1, *choices) +Label(mainframe, text="Select a language").grid(row=0, column=1) +lan1menu.grid(row=1, column=1) +lan2menu = OptionMenu(mainframe, lan2, *choices) +Label(mainframe, text="Select a language").grid(row=0, column=2) +lan2menu.grid(row=1, column=2) +mukesh: Label(mainframe, text="Enter text").grid(row=2, column=0) + +Label(mainframe, text="Output").grid(row=2, column=2) +var1 = StringVar() +textbox = Entry(mainframe, textvariable=var1).grid(row=2, column=3) +b = Button(mainframe, text='Translate', command=translate).grid( +row=3, column=1, columnspan=1) + +s = Button(mainframe, text='Speak', command=talk).grid( +row=3, column=2, columnspan=3) +root.mainloop() \ No newline at end of file diff --git a/LanguageTranslator-Using-Python/requirements.txt b/LanguageTranslator-Using-Python/requirements.txt new file mode 100644 index 00000000..5dc75510 --- /dev/null +++ b/LanguageTranslator-Using-Python/requirements.txt @@ -0,0 +1,2 @@ +SpeechRecognition==3.9.0 +translate==3.61 \ No newline at end of file diff --git a/Leetcode/BasicCalculator224.java b/Leetcode/BasicCalculator224.java new file mode 100644 index 00000000..850333b2 --- /dev/null +++ b/Leetcode/BasicCalculator224.java @@ -0,0 +1,248 @@ +/** + * Implement a basic calculator to evaluate a simple expression string. + * + * The expression string may contain open ( and closing parentheses ), the + * plus + or minus sign -, non-negative integers and empty spaces . + * + * You may assume that the given expression is always valid. + * + * Some examples: + * "1 + 1" = 2 + * " 2-1 + 2 " = 3 + * "(1+(4+5+2)-3)+(6+8)" = 23 + * Note: Do not use the eval built-in library function. + * + */ + + +public class BasicCalculator224 { + public int calculate(String s) { + int L = s.length(); + int result = 0; + int start = 0; + boolean isNum = false; + boolean doPlus = true; + for (int i=0; i<L; i++) { + char c = s.charAt(i); + if (isDigit(c) && !isNum) { + start = i; + isNum = true; + continue; + } + if (isDigit(c)) continue; + + if (isNum) { + result = doCal(s, result, start, i, doPlus); + isNum = false; + } + if (isPlus(c)) { + doPlus = true; + } else if (isMunis(c)) { + doPlus = false; + } else if (isOpen(c)) { + List<Integer> l = calculate(s, i+1, L); + result = doCal(result, l.get(0), doPlus); + i = l.get(1); + } + } + if (isNum) { + return doCal(s, result, start, L, doPlus); + } + + return result; + } + + private List<Integer> calculate(String s, int from, int L) { + int result = 0; + int start = from; + int to = from; + boolean isNum = false; + boolean doPlus = true; + for (int i=from; i<L; i++) { + char c = s.charAt(i); + if (isDigit(c) && !isNum) { + start = i; + isNum = true; + continue; + } + if (isDigit(c)) continue; + + if (isNum) { + result = doCal(s, result, start, i, doPlus); + isNum = false; + } + if (isPlus(c)) { + doPlus = true; + } else if (isMunis(c)) { + doPlus = false; + } else if (isOpen(c)) { + List<Integer> l = calculate(s, i+1, L); + result = doCal(result, l.get(0), doPlus); + i = l.get(1); + } else { + to = i; + break; + } + } + if (isNum) { + return Arrays.asList(doCal(s, result, start, to, doPlus), to); + } + + return Arrays.asList(result, to); + } + + private int doCal(String s, int previous, int start, int end, boolean doPlus) { + int num = Integer.parseInt(s.substring(start, end)); + return doCal(previous, num, doPlus); + } + + private int doCal(int previous, int num, boolean doPlus) { + if (doPlus) { + return previous + num; + } else { + return previous - num; + } + } + + private boolean isPlus(char c) { + return c == '+'; + } + private boolean isMunis(char c) { + return c == '-'; + } + private boolean isOpen(char c) { + return c == '('; + } + private boolean isClose(char c) { + return c == ')'; + } + private boolean isDigit(char c) { + return c >= '0' && c <= '9'; + } + private boolean isSpace(char c) { + return c == ' '; + } + + + /** + * https://discuss.leetcode.com/topic/15816/iterative-java-solution-with-stack + */ + public int calculate2(String s) { + Stack<Integer> stack = new Stack<Integer>(); + int result = 0; + int number = 0; + int sign = 1; + for(int i = 0; i < s.length(); i++){ + char c = s.charAt(i); + if(Character.isDigit(c)){ + number = 10 * number + (int)(c - '0'); + }else if(c == '+'){ + result += sign * number; + number = 0; + sign = 1; + }else if(c == '-'){ + result += sign * number; + number = 0; + sign = -1; + }else if(c == '('){ + //we push the result first, then sign; + stack.push(result); + stack.push(sign); + //reset the sign and result for the value in the parenthesis + sign = 1; + result = 0; + }else if(c == ')'){ + result += sign * number; + number = 0; + result *= stack.pop(); //stack.pop() is the sign before the parenthesis + result += stack.pop(); //stack.pop() now is the result calculated before the parenthesis + } + } + if(number != 0) result += sign * number; + return result; + } + + + public int calculate3(String s) { + char[] chars = s.toCharArray(); + int i = 0; + int N = chars.length; + int sign = 1; + Stack<String> stack = new Stack<>(); + while (i < N) { + char ch = chars[i]; + if (ch == ' ') { + i++; + } else if (ch == '+') { + sign = 1; + i++; + } else if (ch == '-') { + sign = -1; + i++; + } else if (ch == '(') { + stack.push((sign == 1 ? "+" : "-") + Character.toString(ch)); + sign = 1; + i++; + } else if (ch == ')') { + int local = 0; + while (!stack.isEmpty() && !stack.peek().endsWith("(")) { + local += Integer.valueOf(stack.pop()); + } + if (stack.isEmpty()) { + stack.push(Integer.toString(local)); + } else { + String op = stack.pop(); + if (op.startsWith("+")) { + stack.push(Integer.toString(local)); + } else { + stack.push(Integer.toString(-local)); + } + } + i++; + } else { + int j = getNum(chars, i); + stack.push((sign == 1 ? "+" : "-") + s.substring(i, j)); + i = j; + } + + } + int res = 0; + while (!stack.isEmpty()) res += Integer.valueOf(stack.pop()); + return res; + } + + private int getNum(char[] chars, int i) { + int j = i; + while (j < chars.length && Character.isDigit(chars[j])) j++; + return j; + } + + /** + * https://leetcode.com/problems/basic-calculator-ii/discuss/63088/Explanation-for-Java-O(n)-time-and-O(1)-space-solution + */ + public int calculate4(String s) { + int pre = 0, curr = 0, sign = 1, op = 0, num = 0; + + for (int i = 0; i < s.length(); i++) { + if (Character.isDigit(s.charAt(i))) { + num = num * 10 + (s.charAt(i) - '0'); + if (i == s.length() - 1 || !Character.isDigit(s.charAt(i + 1))) { + curr = (op == 0 ? num : (op == 1 ? curr * num : curr / num)); + } + + } else if (s.charAt(i) == '*' || s.charAt(i) == '/') { + op = (s.charAt(i) == '*' ? 1 : -1); + num = 0; + + } else if (s.charAt(i) == '+' || s.charAt(i) == '-') { + pre += sign * curr; + sign = (s.charAt(i) == '+' ? 1 : -1); + op = 0; + num = 0; + } + } + + return pre + sign * curr; + } + +} diff --git a/Leetcode/BasicCalculatorII227.java b/Leetcode/BasicCalculatorII227.java new file mode 100644 index 00000000..e29576f5 --- /dev/null +++ b/Leetcode/BasicCalculatorII227.java @@ -0,0 +1,72 @@ +/** + * Implement a basic calculator to evaluate a simple expression string. + * + * The expression string contains only non-negative integers, +, -, *, / + * operators and empty spaces . The integer division should truncate toward + * zero. + * + * Example 1: + * Input: "3+2*2" + * Output: 7 + * + * Example 2: + * Input: " 3/2 " + * Output: 1 + * + * Example 3: + * Input: " 3+5 / 2 " + * Output: 5 + * + * Note: + * You may assume that the given expression is always valid. + * Do not use the eval built-in library function. + */ + +public class BasicCalculatorII227 { + public int calculate(String s) { + char[] chars = s.toCharArray(); + int N = s.length(); + int res = 0; + int i = 0; + while (i < N && chars[i] == ' ') i++; + int j = getNum(chars, i); + int num = Integer.valueOf(s.substring(i, j)); + i = j; + while (i < N) { + while (i < N && chars[i] == ' ') i++; + if (i == N) break; + char op = chars[i]; + i++; + while (i < N && chars[i] == ' ') i++; + if (i == N) break; + j = getNum(chars, i); + int curr = Integer.valueOf(s.substring(i, j)); + i = j; + if (op == '+') { + res += num; + num = curr; + } else if (op == '-') { + res += num; + num = -curr; + } else if (op == '*') { + num *= curr; + } else { + num /= curr; + } + } + return res + num; + } + + private int getNum(char[] chars, int i) { + int j = i; + while (j < chars.length && Character.isDigit(chars[j])) { + j++; + } + return j; + } + + + + + +} diff --git a/Leetcode/Graph/Dijkastra.java b/Leetcode/Graph/Dijkastra.java new file mode 100644 index 00000000..af1c8feb --- /dev/null +++ b/Leetcode/Graph/Dijkastra.java @@ -0,0 +1,140 @@ +/** + * References: + * https://www.geeksforgeeks.org/greedy-algorithms-set-6-dijkstras-shortest-path-algorithm/ + * https://www.geeksforgeeks.org/greedy-algorithms-set-7-dijkstras-algorithm-for-adjacency-list-representation/ + * https://www.geeksforgeeks.org/printing-paths-dijkstras-shortest-path-algorithm/ + * https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-using-set-in-stl/ + */ + +/** + * All edge weights are non-negative. + */ +public class Dijkstra { + // Adjacency Matrix Representation + /** + * Output shortest paths distance from the source to all the vertices. + */ + public int[] shortestDistancesFrom(int[][] graph, int src) { + if (graph == null || graph.length == 0 || graph[0].length == 0) return new int[0]; + int len = graph.length; + int[] dist = new int[len]; + Set<Integer> sptSet = new HashSet[len]; + + // initialization + for (int i = 0; i < len; i++) { + dist[i] = Integer.MAX_VALUE; + } + dist[src] = 0; + + while (sptSet.size() < len) { + int u = extractMin(dist, sptSet); + sptSet.add(u); + + for (int v=0; v<len; v++) { + // relaxation + if (!sptSet.contains(v) && graph[u][v] > 0 && + dist[u] != Integer.MAX_VALUE && + dist[u] + graph[u][v] < dist[v]) { + dist[v] = dist[u] + graph[u][v]; + } + } + } + + return dist; + } + + // This can be optimized by MinHeap + private int extractMin(int[] dist, Set<Integer> sptSet) { + int minIdx = -1; + int minVal = Integer.MAX_VALUE; + for (int i=0; i<dist.length; i++) { + if (!sptSet.contains(i) && dist[i] < minVal) { + minIdx = i; + minVal = dist[i]; + } + } + return minIdx; + } + + /** + * Output the shortest path distance from the source to the destination. + */ + public int shortestDistance(int[][] graph, int src, int dest) { + if (graph == null || graph.length == 0 || graph[0].length == 0) return new int[0]; + int len = graph.length; + int[] dist = new int[len]; + Set<Integer> sptSet = new HashSet[len]; + + // initialization + for (int i = 0; i < len; i++) { + dist[i] = Integer.MAX_VALUE; + } + dist[src] = 0; + + while (sptSet.size() < len) { + int u = minDistance(dist, sptSet); + // early return when you fidn the target + if (u = target) return dist[u]; + sptSet.add(u); + + for (int v=0; v<len; v++) { + // relaxation + if (!sptSet.contains(v) && graph[u][v] > 0 && + dist[u] != Integer.MAX_VALUE && + dist[u] + graph[u][v] < dist[v]) { + dist[v] = dist[u] + graph[u][v]; + } + } + } + + return -1; + } + + /** + * Output shortest path from the source to the destination. + */ + public List<Integer> shortestPath(int[][] graph, int src, int dest) { + if (graph == null || graph.length == 0 || graph[0].length == 0) return new int[0]; + int len = graph.length; + int[] dist = new int[len]; + int[] parent = new int[len]; + Set<Integer> sptSet = new HashSet[len]; + + // initialization + for (int i = 0; i < len; i++) { + dist[i] = Integer.MAX_VALUE; + parent[i] = i; + } + dist[src] = 0; + + while (sptSet.size() < len) { + int u = extractMin(dist, sptSet); + if (u = target) return constructShortestPath(parent, src, dest); + sptSet.add(u); + + for (int v=0; v<len; v++) { + // relaxation + if (!sptSet.contains(v) && graph[u][v] > 0 && + dist[u] != Integer.MAX_VALUE && + dist[u] + graph[u][v] < dist[v]) { + dist[v] = dist[u] + graph[u][v]; + parent[v] = u; + } + } + } + + return dist; + } + + private List<Integer> constructShortestPath(int[] parent, int src, int dest) { + LinkedList<Integer> path = new LinkedList<>(); + path.add(dest); + while (path.getFirst() != src) { + int head = path.getFirst(); + if (parent[head] == head) return new LinkedList<>(); + path.addFirst(parent[head]); + } + return path; + } + +} diff --git a/Leetcode/Search/BinarySearch.java b/Leetcode/Search/BinarySearch.java new file mode 100644 index 00000000..af1c8feb --- /dev/null +++ b/Leetcode/Search/BinarySearch.java @@ -0,0 +1,140 @@ +/** + * References: + * https://www.geeksforgeeks.org/greedy-algorithms-set-6-dijkstras-shortest-path-algorithm/ + * https://www.geeksforgeeks.org/greedy-algorithms-set-7-dijkstras-algorithm-for-adjacency-list-representation/ + * https://www.geeksforgeeks.org/printing-paths-dijkstras-shortest-path-algorithm/ + * https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-using-set-in-stl/ + */ + +/** + * All edge weights are non-negative. + */ +public class Dijkstra { + // Adjacency Matrix Representation + /** + * Output shortest paths distance from the source to all the vertices. + */ + public int[] shortestDistancesFrom(int[][] graph, int src) { + if (graph == null || graph.length == 0 || graph[0].length == 0) return new int[0]; + int len = graph.length; + int[] dist = new int[len]; + Set<Integer> sptSet = new HashSet[len]; + + // initialization + for (int i = 0; i < len; i++) { + dist[i] = Integer.MAX_VALUE; + } + dist[src] = 0; + + while (sptSet.size() < len) { + int u = extractMin(dist, sptSet); + sptSet.add(u); + + for (int v=0; v<len; v++) { + // relaxation + if (!sptSet.contains(v) && graph[u][v] > 0 && + dist[u] != Integer.MAX_VALUE && + dist[u] + graph[u][v] < dist[v]) { + dist[v] = dist[u] + graph[u][v]; + } + } + } + + return dist; + } + + // This can be optimized by MinHeap + private int extractMin(int[] dist, Set<Integer> sptSet) { + int minIdx = -1; + int minVal = Integer.MAX_VALUE; + for (int i=0; i<dist.length; i++) { + if (!sptSet.contains(i) && dist[i] < minVal) { + minIdx = i; + minVal = dist[i]; + } + } + return minIdx; + } + + /** + * Output the shortest path distance from the source to the destination. + */ + public int shortestDistance(int[][] graph, int src, int dest) { + if (graph == null || graph.length == 0 || graph[0].length == 0) return new int[0]; + int len = graph.length; + int[] dist = new int[len]; + Set<Integer> sptSet = new HashSet[len]; + + // initialization + for (int i = 0; i < len; i++) { + dist[i] = Integer.MAX_VALUE; + } + dist[src] = 0; + + while (sptSet.size() < len) { + int u = minDistance(dist, sptSet); + // early return when you fidn the target + if (u = target) return dist[u]; + sptSet.add(u); + + for (int v=0; v<len; v++) { + // relaxation + if (!sptSet.contains(v) && graph[u][v] > 0 && + dist[u] != Integer.MAX_VALUE && + dist[u] + graph[u][v] < dist[v]) { + dist[v] = dist[u] + graph[u][v]; + } + } + } + + return -1; + } + + /** + * Output shortest path from the source to the destination. + */ + public List<Integer> shortestPath(int[][] graph, int src, int dest) { + if (graph == null || graph.length == 0 || graph[0].length == 0) return new int[0]; + int len = graph.length; + int[] dist = new int[len]; + int[] parent = new int[len]; + Set<Integer> sptSet = new HashSet[len]; + + // initialization + for (int i = 0; i < len; i++) { + dist[i] = Integer.MAX_VALUE; + parent[i] = i; + } + dist[src] = 0; + + while (sptSet.size() < len) { + int u = extractMin(dist, sptSet); + if (u = target) return constructShortestPath(parent, src, dest); + sptSet.add(u); + + for (int v=0; v<len; v++) { + // relaxation + if (!sptSet.contains(v) && graph[u][v] > 0 && + dist[u] != Integer.MAX_VALUE && + dist[u] + graph[u][v] < dist[v]) { + dist[v] = dist[u] + graph[u][v]; + parent[v] = u; + } + } + } + + return dist; + } + + private List<Integer> constructShortestPath(int[] parent, int src, int dest) { + LinkedList<Integer> path = new LinkedList<>(); + path.add(dest); + while (path.getFirst() != src) { + int head = path.getFirst(); + if (parent[head] == head) return new LinkedList<>(); + path.addFirst(parent[head]); + } + return path; + } + +} diff --git a/Lexico_String.java b/Lexico_String.java new file mode 100644 index 00000000..8103de5c --- /dev/null +++ b/Lexico_String.java @@ -0,0 +1,26 @@ +package Lexicographic_String; + +public class Lexicographic_String { + + public static void main(String[] args) { + // TODO Auto-generated method stub + String s1="Komal"; + String s2="Kunal"; + //+ve s1>s2 + //-ve s2>s1 + //0 s1==s2 + System.out.println(compareTo(s1,s2)); + } + public static int compareTo(String s1,String s2) { + if(s1==s2) { + return 0; + } + int length=Math.min(s1.length(), s2.length()); + for(int i=0;i<length;i++) { + if(s1.charAt(i)!=s2.charAt(i)) { + return s1.charAt(i)-s2.charAt(i); + } + } + return s1.length()-s2.length(); + } +} diff --git a/Library Catalog System.java b/Library Catalog System.java new file mode 100644 index 00000000..8227d011 --- /dev/null +++ b/Library Catalog System.java @@ -0,0 +1,81 @@ +import java.util.ArrayList; +import java.util.Scanner; + +class Book { + private String title; + private String author; + private String isbn; + private String category; + private boolean available; + + public Book(String title, String author, String isbn, String category) { + this.title = title; + this.author = author; + this.isbn = isbn; + this.category = category; + this.available = true; + } + + // Getters and setters for book details + + public boolean isAvailable() { + return available; + } + + public void checkOut() { + available = false; + } + + public void returnBook() { + available = true; + } +} + +public class LibraryCatalogSystem { + private static ArrayList<Book> catalog = new ArrayList<>(); + private static Scanner scanner = new Scanner(System.in); + + public static void main(String[] args) { + while (true) { + displayMenu(); + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + switch (choice) { + case 1: + addBook(); + break; + case 2: + searchBooks(); + break; + case 3: + viewBookDetails(); + break; + case 4: + checkoutBook(); + break; + case 5: + returnBook(); + break; + case 6: + System.out.println("Goodbye!"); + System.exit(0); + default: + System.out.println("Invalid choice. Please try again."); + } + } + } + + // Implement methods for adding, searching, viewing, checking out, and returning books + + private static void displayMenu() { + System.out.println("\nLibrary Catalog System"); + System.out.println("1. Add a new book"); + System.out.println("2. Search books"); + System.out.println("3. View book details"); + System.out.println("4. Checkout a book"); + System.out.println("5. Return a book"); + System.out.println("6. Exit"); + System.out.print("Enter your choice: "); + } +} diff --git a/Library Management.java b/Library Management.java new file mode 100644 index 00000000..fd5c9456 --- /dev/null +++ b/Library Management.java @@ -0,0 +1,120 @@ +import java.util.ArrayList; +import java.util.Scanner; + +class Task { + private String title; + private String description; + private boolean isCompleted; + + public Task(String title, String description) { + this.title = title; + this.description = description; + this.isCompleted = false; + } + + public String getTitle() { + return title; + } + + public String getDescription() { + return description; + } + + public boolean isCompleted() { + return isCompleted; + } + + public void markAsCompleted() { + isCompleted = true; + } +} + +public class TaskListApp { + private static ArrayList<Task> tasks = new ArrayList<>(); + private static Scanner scanner = new Scanner(System.in); + + public static void main(String[] args) { + while (true) { + displayMenu(); + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + switch (choice) { + case 1: + addTask(); + break; + case 2: + viewTasks(); + break; + case 3: + markTaskCompleted(); + break; + case 4: + deleteTask(); + break; + case 5: + System.out.println("Goodbye!"); + System.exit(0); + default: + System.out.println("Invalid choice. Please try again."); + } + } + } + + private static void displayMenu() { + System.out.println("\nTask List Application"); + System.out.println("1. Add a new task"); + System.out.println("2. View tasks"); + System.out.println("3. Mark a task as completed"); + System.out.println("4. Delete a task"); + System.out.println("5. Exit"); + System.out.print("Enter your choice: "); + } + + private static void addTask() { + System.out.print("Enter task title: "); + String title = scanner.nextLine(); + System.out.print("Enter task description: "); + String description = scanner.nextLine(); + + Task task = new Task(title, description); + tasks.add(task); + System.out.println("Task added successfully!"); + } + + private static void viewTasks() { + System.out.println("\nTask List:"); + for (int i = 0; i < tasks.size(); i++) { + Task task = tasks.get(i); + System.out.println(i + 1 + ". " + task.getTitle() + " - " + task.getDescription() + + (task.isCompleted() ? " (Completed)" : "")); + } + } + + private static void markTaskCompleted() { + System.out.print("Enter the task number to mark as completed: "); + int taskNumber = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + if (taskNumber >= 1 && taskNumber <= tasks.size()) { + Task task = tasks.get(taskNumber - 1); + task.markAsCompleted(); + System.out.println("Task marked as completed!"); + } else { + System.out.println("Invalid task number. Please try again."); + } + } + + private static void deleteTask() { + System.out.print("Enter the task number to delete: "); + int taskNumber = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + if (taskNumber >= 1 && taskNumber <= tasks.size()) { + Task task = tasks.remove(taskNumber - 1); + System.out.println("Task deleted: " + task.getTitle()); + } else { + System.out.println("Invalid task number. Please try again."); + } + } +} diff --git a/Library Management/Library.class b/Library Management/Library.class new file mode 100644 index 00000000..acafb528 Binary files /dev/null and b/Library Management/Library.class differ diff --git a/Library Management/Project_3.class b/Library Management/Project_3.class new file mode 100644 index 00000000..792dca8c Binary files /dev/null and b/Library Management/Project_3.class differ diff --git a/Library Management/Project_3.java b/Library Management/Project_3.java new file mode 100644 index 00000000..d87392fe --- /dev/null +++ b/Library Management/Project_3.java @@ -0,0 +1,49 @@ + +class Library{ + String[] books; + int No_Of_Book; + Library(){ + this.books=new String[100]; + this.No_Of_Book=0; + } + void AddBook(String book){ + this.books[No_Of_Book++]=book; + System.out.println(book + " Book has been Added Successfully! "); + } + void ShowAvailableBook(){ + System.out.println("Available Book In Library"); + for(String book:this.books){ + if(book==null){ + continue; + } + System.out.println( " * " + book ); + } + } + void IssueBook(String book){ + for(int i=0;i<this.books.length;i++){ + if(this.books[i].equals(book)){ + System.out.println("The book has been Issued "); + this.books[i]=null; + return; + } + } + System.out.println("This book does not exist"); + } + void returnBook(String book){ + AddBook(book); + } + +} +public class Project_3 { + public static void main(String[] args) { + Library library_management=new Library(); + library_management.AddBook("Operating System"); + library_management.AddBook("C++"); + library_management.AddBook("Data Structure"); + //library_management.ShowAvailableBook(); + library_management.IssueBook("C++"); + library_management.ShowAvailableBook(); + library_management.returnBook("C++"); + library_management.ShowAvailableBook(); + } +} diff --git a/LibraryApp/libraryApp/Book.java b/LibraryApp/libraryApp/Book.java new file mode 100644 index 00000000..bd583bd8 --- /dev/null +++ b/LibraryApp/libraryApp/Book.java @@ -0,0 +1,86 @@ +package libraryApp; + +public class Book { + + private int isbn; + private String title; + private String author; + private String genre; + private int quantity; + private int checkedOut; + private int checkedIn; + + //Constructor for book object + public Book(int isbn, String title, String author, String genre, int quantity, int checkedOut) { + this.isbn = isbn; + this.title = title; + this.author = author; + this.genre = genre; + this.quantity = quantity; + this.checkedOut = checkedOut; + this.checkedIn = quantity-checkedOut; + } + + public int getCheckedIn() { + return checkedIn; + } + + public void setCheckedIn(int checkedIn) { + this.checkedIn = checkedIn; + } + + public void setIsbn(int isbn) { + this.isbn = isbn; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setAuthor(String author) { + this.author = author; + } + + public void setGenre(String genre) { + this.genre = genre; + } + + public void setQuantity(int quantity) { + this.quantity = quantity; + } + + public void setCheckedOut(int checkedOut) { + this.checkedOut = checkedOut; + } + + //Getter Methods + public int getIsbn() { + return isbn; + } + + public String getTitle() { + return title; + } + + public String getAuthor() { + return author; + } + + public String getGenre() { + return genre; + } + + public int getQuantity() { + return quantity; + } + + public int getCheckedOut() { + return checkedOut; + } + + + + +} + + diff --git a/LibraryApp/libraryApp/BookRepository.java b/LibraryApp/libraryApp/BookRepository.java new file mode 100644 index 00000000..9c2158aa --- /dev/null +++ b/LibraryApp/libraryApp/BookRepository.java @@ -0,0 +1,122 @@ +package libraryApp; +import java.util.ArrayList; + +public class BookRepository { + + private ArrayList<Book> books = new ArrayList<>(); + private int booksFound = 0; + + //Constructor to initialize books + public BookRepository(){ + books.add(new Book(253910,"Pride and Prejudice C", "Jane Austen", "Love",10,7)); + books.add(new Book(391520,"Programming in ANSI C", "E. Balagurusamy", "Educational",15,10)); + books.add(new Book(715332,"Shrimad Bhagavad Gita", "Krishna Dvaipayana", "Motivational",20,18)); + books.add(new Book(935141,"Java: The Complete Reference", "Herbert Schildt", "Educational",12,9)); + books.add(new Book(459901,"It", "Stephan King", "Horror",7,5)); + books.add(new Book(855141,"Disneyland", "Mickey & Minnie", "Love",10,3)); + } + + + //Searching books by Title Keyword + public void searchByTitle(String title) { + booksFound = 0; + for(Book book : books) { + String bookTitle = book.getTitle(); + if(bookTitle.toLowerCase().contains(title.toLowerCase())) { + bookDetails(book); + booksFound++; + } + } + System.out.printf("\n%d Book%s Found.\n",booksFound,booksFound>1?"s":""); + return; + } + + + //Searching books by ISBN Number + public void searchByISBN(int isbn) { + booksFound = 0; + for(Book book : books) { + if(book.getIsbn()==isbn) { + bookDetails(book); + booksFound++; + break; + } + + } + System.out.printf("\n%d Book%s Found.\n",booksFound,booksFound>1?"s":""); + return; + } + + + //Searching books by Genre + public boolean searchByGenre(String genre){ + booksFound = 0; + for(Book book : books) { + String bookGenre = book.getGenre(); + if(bookGenre.toLowerCase().equals(genre.toLowerCase())) { + bookDetails(book); + booksFound++; + } + } + System.out.printf("\n%d Book%s Found.\n",booksFound,booksFound>1?"s":""); + if(booksFound>0) + return true; + else + return false; + + } + + + // Display Book Details + public void bookDetails(Book book) { + System.out.println("\n+> Book details: \n"); + System.out.println("\tTitle: "+book.getTitle()+"\n\tAuthor: "+ book.getAuthor()+"\n\tGenre: "+book.getGenre()+"\n\tISBN: "+book.getIsbn()+"\n\tQuantity: "+book.getQuantity()+"\n\tChecked Out: "+String.valueOf(book.getCheckedOut())+"\n\tAvailable: "+String.valueOf(book.getQuantity()-book.getCheckedOut())); + } + + + //Searching for ISBN number for checkIn and checkOut + public int searchISBN(int isbn) { + for(Book book:books) + if(book.getIsbn()==isbn) + return 1; + return 0; + } + + + //withdrawing book + public boolean getBook(int isbn) { + for(Book book: books) { + if(book.getIsbn()==isbn) { + if((book.getQuantity()-book.getCheckedOut())>0) { + book.setCheckedOut(book.getCheckedOut()+1); + return true; + } + } + } + return false; + } + + + //submitting book + public boolean submitBook(int isbn) { + for(Book book: books) { + if(book.getQuantity()>book.getCheckedIn()) { + book.setCheckedOut(book.getCheckedOut()-1); + return true; + } + } + return false; + } + + + //Showing status of book + public void bookStatus(int isbn) { + for(Book book: books) { + if(book.getIsbn()==isbn) { + bookDetails(book); + break; + } + } + } + +} diff --git a/LibraryApp/libraryApp/LibraryApp.java b/LibraryApp/libraryApp/LibraryApp.java new file mode 100644 index 00000000..4b66c059 --- /dev/null +++ b/LibraryApp/libraryApp/LibraryApp.java @@ -0,0 +1,38 @@ +package libraryApp; + +public class LibraryApp { + + BookRepository repo = new BookRepository(); + + public void findByTitle(String title) { + repo.searchByTitle(title); + return; + } + public void findByISBN(int isbn) { + repo.searchByISBN(isbn); + return; + } + public boolean findByGenre(String genre) { + if(repo.searchByGenre(genre)) + return true; + else + return false; + } + + + public int findISBN(int isbn) { + return repo.searchISBN(isbn); + } + + public boolean withdrawBook(int isbn) { + return repo.getBook(isbn); + } + + public boolean depositBook(int isbn) { + return repo.submitBook(isbn); + } + + public void getStatus(int isbn) { + repo.bookStatus(isbn); + } +} diff --git a/LibraryApp/libraryApp/Main.java b/LibraryApp/libraryApp/Main.java new file mode 100644 index 00000000..5e7df9ad --- /dev/null +++ b/LibraryApp/libraryApp/Main.java @@ -0,0 +1,92 @@ +package libraryApp; +import java.util.Scanner; + +public class Main{ + static Scanner scan = new Scanner(System.in); + static LibraryApp app = new LibraryApp(); + + + public static void main(String[] args) { + + int userChoice=0; + System.out.println("-----Welcome to the Library!-----\n"); + do{ + System.out.println("\n-----------------------------------"); + System.out.println("1. Search book by Title keyword."); + System.out.println("2. Search book by ISBN number."); + System.out.println("3. Search book by Genre."); + System.out.println("4. Book Check In"); + System.out.println("5. Book Check Out"); + System.out.println("6. Exit from the library."); + System.out.println("-----------------------------------"); + System.out.print("\nChoose any option: "); + + userChoice = scan.nextInt(); + scan.nextLine(); + + switch(userChoice){ + case 1: + System.out.print("Enter the Title of Book: "); + app.findByTitle(scan.nextLine()); + break; + case 2: + System.out.println("Enter ISBN number: "); + app.findByISBN(scan.nextInt()); + break; + case 3: + System.out.println("Enter Genre: "); + app.findByGenre(scan.nextLine()); + break; + case 4: + checkIn(); + break; + case 5: + checkOut(); + break; + case 6: + System.out.println("\nThanks for visiting. \nSee you again."); + break; + default: + System.out.println("\nInvalid Choice!"); + } + }while(userChoice!=6); + + } + + + //Checking book In + private static void checkIn() { + System.out.println("Enter Book's ISBN number : "); + int isbnNum = scan.nextInt(); + getStatus(isbnNum); + int bookAvailable = app.findISBN(isbnNum); + if(bookAvailable==1) { + System.out.println(isbnNum); + app.withdrawBook(isbnNum); + System.out.println("Book CheckIn successful."); + getStatus(isbnNum); + } + else + System.out.printf("Book with %d ISBN number not Found in inventory.",isbnNum); + } + + + //Checking book Out + private static void checkOut() { + System.out.println("\nEnter Book's ISBN number : "); + int isbnNum = scan.nextInt(); + int bookAvailable = app.findISBN(isbnNum); + if(bookAvailable==1) { + if(app.depositBook(isbnNum)) + System.out.println("Book CheckOut successful."); + else + System.out.println("No Space for more Books."); + } + else + System.out.printf("Book with %d ISBN number not Found in inventory.",isbnNum); + } + + private static void getStatus(int isbn) { + app.getStatus(isbn); + } +} \ No newline at end of file diff --git a/LibraryManagement.java b/LibraryManagement.java new file mode 100644 index 00000000..52b3dea0 --- /dev/null +++ b/LibraryManagement.java @@ -0,0 +1,343 @@ +import java.util.Scanner; + +class Book { + public int sNo; + public String bookName; + public String authorName; + public int bookQty; + public int bookQtyCopy; + + Scanner input = new Scanner(System.in); + + public Book() { + System.out.println("Enter Serial No of Book:"); + this.sNo = input.nextInt(); + input.nextLine(); + + System.out.println("Enter Book Name:"); + this.bookName = input.nextLine(); + + System.out.println("Enter Author Name:"); + this.authorName = input.nextLine(); + + System.out.println("Enter Quantity of Books:"); + this.bookQty = input.nextInt(); + bookQtyCopy = this.bookQty; + } +} + +class Student { + String studentName; + String regNum; + + Book borrowedBooks[] = new Book[3]; + public int booksCount = 0; + + Scanner input = new Scanner(System.in); + + public Student() { + System.out.println("Enter Student Name:"); + this.studentName = input.nextLine(); + + System.out.println("Enter Registration Number:"); + this.regNum = input.nextLine(); + } +} + +class Books { + private Book[] theBooks = new Book[50]; + private int count; + private Scanner input = new Scanner(System.in); + + public int compareBookObjects(Book b1, Book b2) { + if (b1.bookName.equalsIgnoreCase(b2.bookName)) { + System.out.println("Book of this Name Already Exists."); + return 0; + } + if (b1.sNo == b2.sNo) { + System.out.println("Book of this Serial No Already Exists."); + return 0; + } + return 1; + } + + public void addBook(Book b) { + for (int i = 0; i < count; i++) { + if (compareBookObjects(b, theBooks[i]) == 0) + return; + } + if (count < 50) { + theBooks[count] = b; + count++; + } else { + System.out.println("No Space to Add More Books."); + } + } + + public void searchBySno() { + System.out.println("\t\t\t\tSEARCH BY SERIAL NUMBER\n"); + System.out.println("Enter Serial No of Book:"); + int sNo = input.nextInt(); + int flag = 0; + System.out.println("S.No\t\tName\t\tAuthor\t\tAvailable Qty\t\tTotal Qty"); + for (int i = 0; i < count; i++) { + if (sNo == theBooks[i].sNo) { + System.out.println( + theBooks[i].sNo + "\t\t" + + theBooks[i].bookName + "\t\t" + + theBooks[i].authorName + "\t\t" + + theBooks[i].bookQtyCopy + "\t\t" + + theBooks[i].bookQty); + flag++; + return; + } + } + if (flag == 0) + System.out.println("No Book for Serial No " + sNo + " Found."); + } + + public void searchByAuthorName() { + System.out.println("\t\t\t\tSEARCH BY AUTHOR'S NAME"); + input.nextLine(); + System.out.println("Enter Author Name:"); + String authorName = input.nextLine(); + int flag = 0; + System.out.println("S.No\t\tName\t\tAuthor\t\tAvailable Qty\t\tTotal Qty"); + for (int i = 0; i < count; i++) { + if (authorName.equalsIgnoreCase(theBooks[i].authorName)) { + System.out.println( + theBooks[i].sNo + "\t\t" + + theBooks[i].bookName + "\t\t" + + theBooks[i].authorName + "\t\t" + + theBooks[i].bookQtyCopy + "\t\t" + + theBooks[i].bookQty); + flag++; + } + } + if (flag == 0) + System.out.println("No Books of " + authorName + " Found."); + } + + public void showAllBooks() { + System.out.println("\t\t\t\tSHOWING ALL BOOKS\n"); + System.out.println("S.No\t\tName\t\tAuthor\t\tAvailable Qty\t\tTotal Qty"); + for (int i = 0; i < count; i++) { + System.out.println( + theBooks[i].sNo + "\t\t" + + theBooks[i].bookName + "\t\t" + + theBooks[i].authorName + "\t\t" + + theBooks[i].bookQtyCopy + "\t\t" + + theBooks[i].bookQty); + } + } + + public void upgradeBookQty() { + System.out.println("\t\t\t\tUPGRADE QUANTITY OF A BOOK\n"); + System.out.println("Enter Serial No of Book"); + int sNo = input.nextInt(); + for (int i = 0; i < count; i++) { + if (sNo == theBooks[i].sNo) { + System.out.println("Enter No of Books to be Added:"); + int addingQty = input.nextInt(); + theBooks[i].bookQty += addingQty; + theBooks[i].bookQtyCopy += addingQty; + return; + } + } + } + + public int isAvailable(int sNo) { + for (int i = 0; i < count; i++) { + if (sNo == theBooks[i].sNo) { + if (theBooks[i].bookQtyCopy > 0) { + System.out.println("Book is Available."); + return i; + } + System.out.println("Book is Unavailable"); + return -1; + } + } + System.out.println("No Book of Serial Number Available in Library."); + return -1; + } + + public Book checkOutBook() { + System.out.println("Enter Serial No of Book to be Checked Out."); + int sNo = input.nextInt(); + int bookIndex = isAvailable(sNo); + if (bookIndex != -1) { + theBooks[bookIndex].bookQtyCopy--; + return theBooks[bookIndex]; + } + return null; + } + + public void checkInBook(Book b) { + for (int i = 0; i < count; i++) { + if (b.equals(theBooks[i])) { + theBooks[i].bookQtyCopy++; + return; + } + } + } +} + +class Students { + Scanner input = new Scanner(System.in); + student theStudents[] = new student[50]; + public static int count = 0; + + public void addStudent(student s) { + for (int i = 0; i < count; i++) { + if (s.regNum.equalsIgnoreCase(theStudents[i].regNum)) { + System.out.println("Student of Reg Num " + s.regNum + " is Already Registered."); + return; + } + } + + if (count <= 50) { + theStudents[count] = s; + count++; + } + } + + public void showAllStudents() { + System.out.println("Student Name\t\tReg Number"); + for (int i = 0; i < count; i++) { + System.out.println(theStudents[i].studentName + "\t\t" + theStudents[i].regNum); + } + } + + public int isStudent() { + System.out.println("Enter Reg Number:"); + String regNum = input.nextLine(); + + for (int i = 0; i < count; i++) { + if (theStudents[i].regNum.equalsIgnoreCase(regNum)) { + return i; + } + } + + System.out.println("Student is not Registered."); + System.out.println("Get Registered First."); + return -1; + } + + public void checkOutBook(Books book) { + int studentIndex = this.isStudent(); + + if (studentIndex != -1) { + System.out.println("checking out"); + book.showAllBooks(); + book b = book.checkOutBook(); + System.out.println("checking out"); + + if (b != null) { + if (theStudents[studentIndex].booksCount <= 3) { + System.out.println("adding book"); + theStudents[studentIndex].borrowedBooks[theStudents[studentIndex].booksCount] = b; + theStudents[studentIndex].booksCount++; + return; + } else { + System.out.println("Student Can not Borrow more than 3 Books."); + return; + } + } + System.out.println("Book is not Available."); + } + } + + public void checkInBook(Books book) { + int studentIndex = this.isStudent(); + if (studentIndex != -1) { + System.out.println("S.No\t\t\tBook Name\t\t\tAuthor Name"); + student s = theStudents[studentIndex]; + + for (int i = 0; i < s.booksCount; i++) { + System.out.println( + s.borrowedBooks[i].sNo + "\t\t\t" + + s.borrowedBooks[i].bookName + "\t\t\t" + + s.borrowedBooks[i].authorName); + } + + System.out.println("Enter Serial Number of Book to be Checked In:"); + int sNo = input.nextInt(); + + for (int i = 0; i < s.booksCount; i++) { + if (sNo == s.borrowedBooks[i].sNo) { + book.checkInBook(s.borrowedBooks[i]); + s.borrowedBooks[i] = null; + return; + } + } + + System.out.println("Book of Serial No " + sNo + " not Found"); + } + } +} + +public class LibrarySystem { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + Books books = new Books(); + Students students = new Students(); + + int choice; + + do { + System.out.println("Library System Menu:"); + System.out.println("1. Add Student"); + System.out.println("2. Add Book"); + System.out.println("3. Search Book by Serial Number"); + System.out.println("4. Search Book by Author Name"); + System.out.println("5. Show All Books"); + System.out.println("6. Upgrade Quantity of a Book"); + System.out.println("7. Check Out Book"); + System.out.println("8. Check In Book"); + System.out.println("9. Show All Students"); + System.out.println("0. Exit"); + + System.out.print("Enter your choice: "); + choice = input.nextInt(); + input.nextLine(); // Consume the newline + + switch (choice) { + case 1: + student newStudent = new student(); + students.addStudent(newStudent); + break; + case 2: + Book newBook = new Book(); + books.addBook(newBook); + break; + case 3: + books.searchBySno(); + break; + case 4: + books.searchByAuthorName(); + break; + case 5: + books.showAllBooks(); + break; + case 6: + books.upgradeBookQty(); + break; + case 7: + students.checkOutBook(books); + break; + case 8: + students.checkInBook(books); + break; + case 9: + students.showAllStudents(); + break; + case 0: + System.out.println("Exiting Library System."); + break; + default: + System.out.println("Invalid choice. Please try again."); + break; + } + } while (choice != 0); + } +} diff --git a/LibraryMangement/CreateTableScript.txt b/LibraryMangement/CreateTableScript.txt new file mode 100644 index 00000000..0fc22c1f --- /dev/null +++ b/LibraryMangement/CreateTableScript.txt @@ -0,0 +1,9 @@ +create table members (member_id number(10),member_name varchar2(100), doj date); + +create table books (isbn_code varchar2(50), book_name varchar2(50), book_desc varchar2(1000),author_name varchar2(100),subject_name varchar2(100), units_available number(5)); + +create table member_book_record (rec_id number(18),member_id number(10),isbn_code varchar2(50), doi date, dor date); + +create sequence lib_seq start with 101 increment by 1; + + diff --git a/LibraryMangement/build.xml b/LibraryMangement/build.xml new file mode 100644 index 00000000..a710b7f3 --- /dev/null +++ b/LibraryMangement/build.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<!-- By default, only the Clean and Build commands use this build script. --> +<!-- Commands such as Run, Debug, and Test only use this build script if --> +<!-- the Compile on Save feature is turned off for the project. --> +<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> +<!-- in the project's Project Properties dialog box.--> +<project name="CoreJavaProject" default="default" basedir="."> + <description>Builds, tests, and runs the project CoreJavaProject.</description> + <import file="nbproject/build-impl.xml"/> + <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-jar: called before JAR building + -post-jar: called after JAR building + -post-clean: called after cleaning build products + + (Targets beginning with '-' are not intended to be called on their own.) + + Example of inserting an obfuscator after compilation could look like this: + + <target name="-post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Another way to customize the build is by overriding existing main targets. + The targets of interest are: + + -init-macrodef-javac: defines macro for javac compilation + -init-macrodef-junit: defines macro for junit execution + -init-macrodef-debug: defines macro for class debugging + -init-macrodef-java: defines macro for class execution + -do-jar: JAR building + run: execution of project + -javadoc-build: Javadoc generation + test-report: JUnit report generation + + An example of overriding the target for project execution could look like this: + + <target name="run" depends="CoreJavaProject-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that the overridden target depends on the jar target and not only on + the compile target as the regular run target does. Again, for a list of available + properties which you can use, check the target you are overriding in the + nbproject/build-impl.xml file. + + --> +</project> diff --git a/LibraryMangement/build/classes/AddBookMenu.class b/LibraryMangement/build/classes/AddBookMenu.class new file mode 100644 index 00000000..f15c4abc Binary files /dev/null and b/LibraryMangement/build/classes/AddBookMenu.class differ diff --git a/LibraryMangement/build/classes/AddMemberMenu.class b/LibraryMangement/build/classes/AddMemberMenu.class new file mode 100644 index 00000000..b47e23f0 Binary files /dev/null and b/LibraryMangement/build/classes/AddMemberMenu.class differ diff --git a/LibraryMangement/build/classes/Book.class b/LibraryMangement/build/classes/Book.class new file mode 100644 index 00000000..ce27d209 Binary files /dev/null and b/LibraryMangement/build/classes/Book.class differ diff --git a/LibraryMangement/build/classes/DBProperties b/LibraryMangement/build/classes/DBProperties new file mode 100644 index 00000000..b5b8df4b --- /dev/null +++ b/LibraryMangement/build/classes/DBProperties @@ -0,0 +1,4 @@ +DBDriver=oracle.jdbc.driver.OracleDriver +DBName=jdbc:oracle:thin:@localhost:1522:xe +User=scott +Password= tiger \ No newline at end of file diff --git a/LibraryMangement/build/classes/LibFunctions.class b/LibraryMangement/build/classes/LibFunctions.class new file mode 100644 index 00000000..f2a0b016 Binary files /dev/null and b/LibraryMangement/build/classes/LibFunctions.class differ diff --git a/LibraryMangement/build/classes/LibUtil.class b/LibraryMangement/build/classes/LibUtil.class new file mode 100644 index 00000000..5345292b Binary files /dev/null and b/LibraryMangement/build/classes/LibUtil.class differ diff --git a/LibraryMangement/build/classes/Member.class b/LibraryMangement/build/classes/Member.class new file mode 100644 index 00000000..90f9a4ca Binary files /dev/null and b/LibraryMangement/build/classes/Member.class differ diff --git a/LibraryMangement/build/classes/UserMenu.class b/LibraryMangement/build/classes/UserMenu.class new file mode 100644 index 00000000..4bfa8339 Binary files /dev/null and b/LibraryMangement/build/classes/UserMenu.class differ diff --git a/LibraryMangement/manifest.mf b/LibraryMangement/manifest.mf new file mode 100644 index 00000000..1574df4a --- /dev/null +++ b/LibraryMangement/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/LibraryMangement/nbproject/build-impl.xml b/LibraryMangement/nbproject/build-impl.xml new file mode 100644 index 00000000..d5facad8 --- /dev/null +++ b/LibraryMangement/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +*** GENERATED FROM project.xml - DO NOT EDIT *** +*** EDIT ../build.xml INSTEAD *** + +For the purpose of easier reading the script +is divided into following sections: + + - initialization + - compilation + - jar + - execution + - debugging + - javadoc + - test compilation + - test execution + - test debugging + - applet + - cleanup + + --> +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="CoreJavaProject-impl"> + <fail message="Please build using Ant 1.8.0 or higher."> + <condition> + <not> + <antversion atleast="1.8.0"/> + </not> + </condition> + </fail> + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> + <!-- + ====================== + INITIALIZATION SECTION + ====================== + --> + <target name="-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init" name="-init-private"> + <property file="nbproject/private/config.properties"/> + <property file="nbproject/private/configs/${config}.properties"/> + <property file="nbproject/private/private.properties"/> + </target> + <target depends="-pre-init,-init-private" name="-init-user"> + <property file="${user.properties.file}"/> + <!-- The two properties below are usually overridden --> + <!-- by the active platform. Just a fallback. --> + <property name="default.javac.source" value="1.4"/> + <property name="default.javac.target" value="1.4"/> + </target> + <target depends="-pre-init,-init-private,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> + <property file="nbproject/project.properties"/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> + <property name="platform.java" value="${java.home}/bin/java"/> + <available file="${manifest.file}" property="manifest.available"/> + <condition property="splashscreen.available"> + <and> + <not> + <equals arg1="${application.splash}" arg2="" trim="true"/> + </not> + <available file="${application.splash}"/> + </and> + </condition> + <condition property="main.class.available"> + <and> + <isset property="main.class"/> + <not> + <equals arg1="${main.class}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition property="profile.available"> + <and> + <isset property="javac.profile"/> + <length length="0" string="${javac.profile}" when="greater"/> + <matches pattern="1\.[89](\..*)?" string="${javac.source}"/> + </and> + </condition> + <condition property="do.archive"> + <or> + <not> + <istrue value="${jar.archive.disabled}"/> + </not> + <istrue value="${not.archive.disabled}"/> + </or> + </condition> + <condition property="do.mkdist"> + <and> + <isset property="do.archive"/> + <isset property="libs.CopyLibs.classpath"/> + <not> + <istrue value="${mkdist.disabled}"/> + </not> + </and> + </condition> + <condition property="do.archive+manifest.available"> + <and> + <isset property="manifest.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+main.class.available"> + <and> + <isset property="main.class.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+splashscreen.available"> + <and> + <isset property="splashscreen.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+profile.available"> + <and> + <isset property="profile.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="have.tests"> + <or> + <available file="${test.src.dir}"/> + </or> + </condition> + <condition property="have.sources"> + <or> + <available file="${src.dir}"/> + </or> + </condition> + <condition property="netbeans.home+have.tests"> + <and> + <isset property="netbeans.home"/> + <isset property="have.tests"/> + </and> + </condition> + <condition property="no.javadoc.preview"> + <and> + <isset property="javadoc.preview"/> + <isfalse value="${javadoc.preview}"/> + </and> + </condition> + <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> + <property name="javac.compilerargs" value=""/> + <property name="work.dir" value="${basedir}"/> + <condition property="no.deps"> + <and> + <istrue value="${no.dependencies}"/> + </and> + </condition> + <property name="javac.debug" value="true"/> + <property name="javadoc.preview" value="true"/> + <property name="application.args" value=""/> + <property name="source.encoding" value="${file.encoding}"/> + <property name="runtime.encoding" value="${source.encoding}"/> + <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> + <and> + <isset property="javadoc.encoding"/> + <not> + <equals arg1="${javadoc.encoding}" arg2=""/> + </not> + </and> + </condition> + <property name="javadoc.encoding.used" value="${source.encoding}"/> + <property name="includes" value="**"/> + <property name="excludes" value=""/> + <property name="do.depend" value="false"/> + <condition property="do.depend.true"> + <istrue value="${do.depend}"/> + </condition> + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> + <and> + <isset property="endorsed.classpath"/> + <not> + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> + <isset property="profile.available"/> + </condition> + <condition else="false" property="jdkBug6558476"> + <and> + <matches pattern="1\.[56]" string="${java.specification.version}"/> + <not> + <os family="unix"/> + </not> + </and> + </condition> + <property name="javac.fork" value="${jdkBug6558476}"/> + <property name="jar.index" value="false"/> + <property name="jar.index.metainf" value="${jar.index}"/> + <property name="copylibs.rebase" value="true"/> + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + </target> + <target name="-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> + <fail unless="src.dir">Must set src.dir</fail> + <fail unless="test.src.dir">Must set test.src.dir</fail> + <fail unless="build.dir">Must set build.dir</fail> + <fail unless="dist.dir">Must set dist.dir</fail> + <fail unless="build.classes.dir">Must set build.classes.dir</fail> + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> + <fail unless="dist.jar">Must set dist.jar</fail> + </target> + <target name="-init-macrodef-property"> + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${@{value}}"/> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <mkdir dir="@{apgeneratedsrcdir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <compilerarg value="-processorpath"/> + <compilerarg path="@{processorpath}:${empty.dir}"/> + <compilerarg line="${ap.processors.internal}"/> + <compilerarg line="${annotation.processing.processor.options}"/> + <compilerarg value="-s"/> + <compilerarg path="@{apgeneratedsrcdir}"/> + <compilerarg line="${ap.proc.none.internal}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <sequential> + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </depend> + </sequential> + </macrodef> + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${build.classes.dir}" name="destdir"/> + <sequential> + <fail unless="javac.includes">Must set javac.includes</fail> + <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> + <path> + <filelist dir="@{destdir}" files="${javac.includes}"/> + </path> + <globmapper from="*.java" to="*.class"/> + </pathconvert> + <tempfile deleteonexit="true" property="javac.includesfile.binary"/> + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> + <delete> + <files includesfile="${javac.includesfile.binary}"/> + </delete> + <delete> + <fileset file="${javac.includesfile.binary}"/> + </delete> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target name="-init-test-properties"> + <property name="test.binaryincludes" value="<nothing>"/> + <property name="test.binarytestincludes" value=""/> + <property name="test.binaryexcludes" value=""/> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="CoreJavaProject" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename CoreJavaProject -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> + <macrodef name="resolve"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${env.@{value}}"/> + </sequential> + </macrodef> + <macrodef name="profile"> + <attribute default="${main.class}" name="classname"/> + <element name="customize" optional="true"/> + <sequential> + <property environment="env"/> + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> + <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <arg line="${application.args}"/> + <classpath> + <path path="${run.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> + </target> + <!-- + end of pre NB7.2 profiling section + --> + <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="name"/> + <attribute default="${debug.classpath}" name="classpath"/> + <attribute default="" name="stopclassname"/> + <sequential> + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </nbjpdastart> + </sequential> + </macrodef> + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${build.classes.dir}" name="dir"/> + <sequential> + <nbjpdareload> + <fileset dir="@{dir}" includes="${fix.classes}"> + <include name="${fix.includes}*.class"/> + </fileset> + </nbjpdareload> + </sequential> + </macrodef> + </target> + <target name="-init-debug-args"> + <property name="version-output" value="java version "${ant.java.version}"/> + <condition property="have-jdk-older-than-1.4"> + <or> + <contains string="${version-output}" substring="java version "1.0"/> + <contains string="${version-output}" substring="java version "1.1"/> + <contains string="${version-output}" substring="java version "1.2"/> + <contains string="${version-output}" substring="java version "1.3"/> + </or> + </condition> + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> + <istrue value="${have-jdk-older-than-1.4}"/> + </condition> + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> + <os family="windows"/> + </condition> + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> + <isset property="debug.transport"/> + </condition> + </target> + <target depends="-init-debug-args" name="-init-macrodef-debug"> + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${debug.classpath}" name="classpath"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-java"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-copylibs"> + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${manifest.file}" name="manifest"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert pathsep=" " property="jar.classpath"> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + <manifest> + <attribute name="Class-Path" value="${jar.classpath}"/> + <customize/> + </manifest> + </copylibs> + </sequential> + </macrodef> + </target> + <target name="-init-presetdef-jar"> + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + </jar> + </presetdef> + </target> + <target name="-init-ap-cmdline-properties"> + <property name="annotation.processing.enabled" value="true"/> + <property name="annotation.processing.processors.list" value=""/> + <property name="annotation.processing.processor.options" value=""/> + <property name="annotation.processing.run.all.processors" value="true"/> + <property name="javac.processorpath" value="${javac.classpath}"/> + <property name="javac.test.processorpath" value="${javac.test.classpath}"/> + <condition property="ap.supported.internal" value="true"> + <not> + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> + </not> + </condition> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> + <isfalse value="${annotation.processing.run.all.processors}"/> + </condition> + <condition else="" property="ap.proc.none.internal" value="-proc:none"> + <isfalse value="${annotation.processing.enabled}"/> + </condition> + </target> + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> + <property name="ap.cmd.line.internal" value=""/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> + <!-- + =================== + COMPILATION SECTION + =================== + --> + <target name="-deps-jar-init" unless="built-jar.properties"> + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> + <delete file="${built-jar.properties}" quiet="true"/> + </target> + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> + <echo level="warn" message="Cycle detected: CoreJavaProject was already built"/> + </target> + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-jar.properties}" verbose="false"/> + <property file="${built-jar.properties}" prefix="already.built.jar."/> + <antcall target="-warn-already-built-jar"/> + <propertyfile file="${built-jar.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> + <target depends="init" name="-check-automatic-build"> + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> + </target> + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> + <antcall target="clean"/> + </target> + <target depends="init,deps-jar" name="-pre-pre-compile"> + <mkdir dir="${build.classes.dir}"/> + </target> + <target name="-pre-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-depend"> + <pathconvert property="build.generated.subdirs"> + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </pathconvert> + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> + <copy todir="${build.classes.dir}"> + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target if="has.persistence.xml" name="-copy-persistence-xml"> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy todir="${build.classes.dir}/META-INF"> + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> + </copy> + </target> + <target name="-post-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> + <target name="-pre-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile/> + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> + </target> + <target name="-post-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> + <!-- + ==================== + JAR BUILDING SECTION + ==================== + --> + <target depends="init" name="-pre-pre-jar"> + <dirname file="${dist.jar}" property="dist.jar.dir"/> + <mkdir dir="${dist.jar.dir}"/> + </target> + <target name="-pre-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <touch file="${tmp.manifest.file}" verbose="false"/> + </target> + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> + <manifest file="${tmp.manifest.file}" mode="update"> + <attribute name="Main-Class" value="${main.class}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> + <manifest file="${tmp.manifest.file}" mode="update"> + <attribute name="Profile" value="${javac.profile}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> + <basename file="${application.splash}" property="splashscreen.basename"/> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> + <manifest file="${tmp.manifest.file}" mode="update"> + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> + </manifest> + </target> + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs"> + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> + <echo level="info">To run this application from the command line without Ant, try:</echo> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <echo level="info">java -jar "${dist.jar.resolved}"</echo> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> + <j2seproject1:jar manifest="${tmp.manifest.file}"/> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <pathconvert property="run.classpath.with.dist.jar"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> + </pathconvert> + <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}"> + <isset property="main.class.available"/> + </condition> + <condition else="debug" property="jar.usage.level" value="info"> + <isset property="main.class.available"/> + </condition> + <echo level="${jar.usage.level}" message="${jar.usage.message}"/> + </target> + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> + <delete> + <fileset file="${tmp.manifest.file}"/> + </delete> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> + <target name="-post-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> + <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/> + <!-- + ================= + EXECUTION SECTION + ================= + --> + <target depends="init,compile" description="Run a main class." name="run"> + <j2seproject1:java> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject1:java> + </target> + <target name="-do-not-recompile"> + <property name="javac.includes.binary" value=""/> + </target> + <target depends="init,compile-single" name="run-single"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}"/> + </target> + <target depends="init,compile-test-single" name="run-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> + </target> + <!-- + ================= + DEBUGGING SECTION + ================= + --> + <target depends="init" if="netbeans.home" name="-debug-start-debugger"> + <j2seproject1:nbjpdastart name="${debug.class}"/> + </target> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> + </target> + <target depends="init,compile" name="-debug-start-debuggee"> + <j2seproject3:debug> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> + <j2seproject1:nbjpdastart stopclassname="${main.class}"/> + </target> + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}"/> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> + <target depends="init" name="-pre-debug-fix"> + <fail unless="fix.includes">Must set fix.includes</fail> + <property name="javac.includes" value="${fix.includes}.java"/> + </target> + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> + <j2seproject1:nbjpdareload/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> + <!-- + ================= + PROFILING SECTION + ================= + --> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile/> + </target> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="${profile.class}"/> + </target> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </profile> + </target> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + </nbprofiledirect> + <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <test name="${profile.class}"/> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + </junit> + </target> + <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- + =============== + JAVADOC SECTION + =============== + --> + <target depends="init" if="have.sources" name="-javadoc-build"> + <mkdir dir="${dist.javadoc.dir}"/> + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> + <and> + <isset property="endorsed.classpath.cmd.line.arg"/> + <not> + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> + </not> + </and> + </condition> + <condition else="" property="bug5101868workaround" value="*.java"> + <matches pattern="1\.[56](\..*)?" string="${java.version}"/> + </condition> + <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> + <classpath> + <path path="${javac.classpath}"/> + </classpath> + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/*.java"/> + <exclude name="*.java"/> + </fileset> + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> + </javadoc> + <copy todir="${dist.javadoc.dir}"> + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/doc-files/**"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/doc-files/**"/> + </fileset> + </copy> + </target> + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> + <nbbrowse file="${dist.javadoc.dir}/index.html"/> + </target> + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> + <!-- + ========================= + TEST COMPILATION SECTION + ========================= + --> + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> + <mkdir dir="${build.test.classes.dir}"/> + </target> + <target name="-pre-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-test-depend"> + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + </target> + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> + <target name="-pre-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> + <!-- + ======================= + TEST EXECUTION SECTION + ======================= + --> + <target depends="init" if="have.tests" name="-pre-test-run"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/> + </target> + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init" if="have.tests" name="test-report"/> + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> + <target depends="init" if="have.tests" name="-pre-test-run-single"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> + <!-- + ======================= + TEST DEBUGGING SECTION + ======================= + --> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> + <!-- + ========================= + APPLET EXECUTION SECTION + ========================= + --> + <target depends="init,compile-single" name="run-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject1:java classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject1:java> + </target> + <!-- + ========================= + APPLET DEBUGGING SECTION + ========================= + --> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject3:debug classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> + <!-- + =============== + CLEANUP SECTION + =============== + --> + <target name="-deps-clean-init" unless="built-clean.properties"> + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> + <delete file="${built-clean.properties}" quiet="true"/> + </target> + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> + <echo level="warn" message="Cycle detected: CoreJavaProject was already built"/> + </target> + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-clean.properties}" verbose="false"/> + <property file="${built-clean.properties}" prefix="already.built.clean."/> + <antcall target="-warn-already-built-clean"/> + <propertyfile file="${built-clean.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init" name="-do-clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> + </target> + <target name="-post-clean"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> + <target name="-check-call-dep"> + <property file="${call.built.properties}" prefix="already.built."/> + <condition property="should.call.dep"> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> + </condition> + </target> + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> + <ant antfile="${call.script}" inheritall="false" target="${call.target}"> + <propertyset> + <propertyref prefix="transfer."/> + <mapper from="transfer.*" to="*" type="glob"/> + </propertyset> + </ant> + </target> +</project> diff --git a/LibraryMangement/nbproject/genfiles.properties b/LibraryMangement/nbproject/genfiles.properties new file mode 100644 index 00000000..39520702 --- /dev/null +++ b/LibraryMangement/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=33915024 +build.xml.script.CRC32=22db7173 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=33915024 +nbproject/build-impl.xml.script.CRC32=a6999f54 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/LibraryMangement/nbproject/private/private.properties b/LibraryMangement/nbproject/private/private.properties new file mode 100644 index 00000000..f0d1b6c4 --- /dev/null +++ b/LibraryMangement/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\vjasuja.ORADEV\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/LibraryMangement/nbproject/private/private.xml b/LibraryMangement/nbproject/private/private.xml new file mode 100644 index 00000000..e542b2d3 --- /dev/null +++ b/LibraryMangement/nbproject/private/private.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> + <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> + <group> + <file>file:/D:/Intellipaat/Core%20Java/CoursePrograms/Temp/CoreJavaProject/src/DBProperties</file> + <file>file:/D:/Intellipaat/Core%20Java/CoursePrograms/Temp/CoreJavaProject/src/UserMenu.java</file> + <file>file:/D:/Intellipaat/Core%20Java/CoursePrograms/Temp/CoreJavaProject/src/AddBookMenu.java</file> + <file>file:/D:/Intellipaat/Core%20Java/CoursePrograms/Temp/CoreJavaProject/src/AddMemberMenu.java</file> + <file>file:/D:/Intellipaat/Core%20Java/CoursePrograms/Temp/CoreJavaProject/src/LibFunctions.java</file> + </group> + </open-files> +</project-private> diff --git a/LibraryMangement/nbproject/project.properties b/LibraryMangement/nbproject/project.properties new file mode 100644 index 00000000..765fa0ee --- /dev/null +++ b/LibraryMangement/nbproject/project.properties @@ -0,0 +1,75 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/CoreJavaProject.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +file.reference.ojdbc6.jar=C:\\Users\\vjasuja.ORADEV\\Downloads\\ojdbc6.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.ojdbc6.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class= +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/LibraryMangement/nbproject/project.xml b/LibraryMangement/nbproject/project.xml new file mode 100644 index 00000000..7f75b0f2 --- /dev/null +++ b/LibraryMangement/nbproject/project.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.java.j2seproject</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> + <name>CoreJavaProject</name> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> + </data> + </configuration> +</project> diff --git a/LibraryMangement/src/AddBookMenu.java b/LibraryMangement/src/AddBookMenu.java new file mode 100644 index 00000000..5053844e --- /dev/null +++ b/LibraryMangement/src/AddBookMenu.java @@ -0,0 +1,70 @@ + +import java.sql.Connection; +import java.sql.Statement; +import java.util.Scanner; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +/** + * + * @author testuser + */ +public class AddBookMenu { + + public static void addBookMenu() { + System.out.println("Reached the add book menu"); + Book b = new Book(); + Scanner sc = new Scanner(System.in); + int addStatus = 0; + + while (addStatus == 0) { + try { + System.out.println("Enter the isbn code"); + b.setIsbnCode(sc.nextLine().toString()); + System.out.println("Enter the book name"); + b.setBookName(sc.nextLine().toString()); + System.out.println("Enter the book desc"); + b.setBookDesc(sc.nextLine().toString()); + System.out.println("Enter the author name"); + b.setAuthorName(sc.nextLine().toString()); + System.out.println("Enter the subject "); + b.setSubjectName(sc.nextLine().toString()); + System.out.println("Enter the units available"); + b.setUnitsAvailable(Integer.parseInt(sc.nextLine().toString())); + + addBook(b); + addStatus = 1; + + } catch (Exception e) { + addStatus=0; + } + + } + + } + + public static void addBook(Book b) { + System.out.println("Reached inside addBook for book "+b.getIsbnCode()); + Connection conn = LibUtil.getConnection(); + try { + Statement stmt = conn.createStatement(); + int k = stmt.executeUpdate("insert into books values ('"+b.getIsbnCode()+"','"+b.getBookName()+"','"+b.getBookDesc()+"'," + + "'"+b.getAuthorName()+"','"+b.getSubjectName()+"',"+b.getUnitsAvailable()+")"); + if(k>0){ + System.out.println("Added Book successfully"); + conn.commit(); + }else{ + conn.rollback(); + } + conn.close(); + } catch (Exception e) { + } + + + + } + +} diff --git a/LibraryMangement/src/AddMemberMenu.java b/LibraryMangement/src/AddMemberMenu.java new file mode 100644 index 00000000..3f29b1fc --- /dev/null +++ b/LibraryMangement/src/AddMemberMenu.java @@ -0,0 +1,61 @@ + +import java.sql.Connection; +import java.sql.Statement; +import java.util.Scanner; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +/** + * + * @author testuser + */ +public class AddMemberMenu { + + public static void addMemberMenu() { + System.out.println("Reached the add member menu"); + Member m = new Member(); + Scanner sc = new Scanner(System.in); + int addStatus = 0; + + while (addStatus == 0) { + try { + System.out.println("Enter the member id "); + m.setMemberId(Integer.parseInt(sc.nextLine().toString())); + System.out.println("Enter the member name"); + m.setMemberName(sc.nextLine().toString()); + + addMember(m); + addStatus = 1; + + } catch (Exception e) { + addStatus=0; + } + + } + + } + + public static void addMember(Member m) { + System.out.println("Reached inside add member for member "+m.getMemberId()); + Connection conn = LibUtil.getConnection(); + try { + Statement stmt = conn.createStatement(); + int k = stmt.executeUpdate("insert into members values ("+m.getMemberId()+",'"+m.getMemberName()+"',sysdate)"); + if(k>0){ + System.out.println("Added Member successfully"); + conn.commit(); + }else{ + conn.rollback(); + } + conn.close(); + } catch (Exception e) { + } + + + + } + +} diff --git a/LibraryMangement/src/Book.java b/LibraryMangement/src/Book.java new file mode 100644 index 00000000..efd3d7aa --- /dev/null +++ b/LibraryMangement/src/Book.java @@ -0,0 +1,80 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author testuser + */ +public class Book { + private String isbnCode; + private String bookName; + private String bookDesc; + private String authorName; + private String subjectName; + private Integer unitsAvailable; + + public Book(){ + + } + public Book(String isbnCode, String bookName, String bookDesc, String authorName, String subjectName, Integer unitsAvailable) { + this.isbnCode = isbnCode; + this.bookName = bookName; + this.bookDesc = bookDesc; + this.authorName = authorName; + this.subjectName = subjectName; + this.unitsAvailable = unitsAvailable; + } + + public Integer getUnitsAvailable() { + return unitsAvailable; + } + + public void setUnitsAvailable(Integer unitsAvailable) { + this.unitsAvailable = unitsAvailable; + } + + public String getIsbnCode() { + return isbnCode; + } + + public void setIsbnCode(String isbnCode) { + this.isbnCode = isbnCode; + } + + public String getBookName() { + return bookName; + } + + public void setBookName(String bookName) { + this.bookName = bookName; + } + + public String getBookDesc() { + return bookDesc; + } + + public void setBookDesc(String bookDesc) { + this.bookDesc = bookDesc; + } + + public String getAuthorName() { + return authorName; + } + + public void setAuthorName(String authorName) { + this.authorName = authorName; + } + + public String getSubjectName() { + return subjectName; + } + + public void setSubjectName(String subjectName) { + this.subjectName = subjectName; + } + + +} diff --git a/LibraryMangement/src/DBProperties b/LibraryMangement/src/DBProperties new file mode 100644 index 00000000..b5b8df4b --- /dev/null +++ b/LibraryMangement/src/DBProperties @@ -0,0 +1,4 @@ +DBDriver=oracle.jdbc.driver.OracleDriver +DBName=jdbc:oracle:thin:@localhost:1522:xe +User=scott +Password= tiger \ No newline at end of file diff --git a/LibraryMangement/src/LibFunctions.java b/LibraryMangement/src/LibFunctions.java new file mode 100644 index 00000000..4f025c84 --- /dev/null +++ b/LibraryMangement/src/LibFunctions.java @@ -0,0 +1,122 @@ + +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.Scanner; + +public class LibFunctions { + + public static void callIssueMenu() { + System.out.println("Reached inside issue book menu"); + Member m = new Member(); + Book b = new Book(); + Scanner sc = new Scanner(System.in); + int addStatus = 0; + + while (addStatus == 0) { + try { + System.out.println("Enter the member id "); + m.setMemberId(Integer.parseInt(sc.nextLine().toString())); + System.out.println("Enter the isbn code "); + b.setIsbnCode(sc.nextLine().toString()); + issueBook(m, b); + addStatus = 1; + + } catch (Exception e) { + addStatus = 0; + } + + } + + } + + + public static void issueBook(Member m, Book b) { + Connection conn = LibUtil.getConnection(); + try { + Statement stmt = conn.createStatement(); + ResultSet rs = null; + String qry = "select m.member_id, b.isbn_code, mbr.rec_id from members m,books b,member_book_record mbr\n" + + "where m.member_id= " + m.getMemberId() + " \n" + + "and b.isbn_code = '" + b.getIsbnCode() + "' \n" + + "and m.member_id=mbr.member_id\n" + + "and b.isbn_code=mbr.isbn_code and mbr.dor is null "; + rs=stmt.executeQuery(qry); + if (rs.next()) { + System.out.println("The book is already issued and cannot be issued again"); + } else { + int k = stmt.executeUpdate("insert into member_book_record values(lib_seq.nextval," + m.getMemberId() + ",'" + b.getIsbnCode() + "',sysdate,null)"); + if(k > 0){ + k = stmt.executeUpdate("update books set units_available= (units_available-1) where isbn_code = '"+ b.getIsbnCode() +"' "); + conn.commit(); + System.out.println("The book is issued successfully"); + }else{ + conn.rollback(); + } + + } + conn.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public static void callReturnMenu() { + System.out.println("Reached inside return book menu"); + Member m = new Member(); + Book b = new Book(); + Scanner sc = new Scanner(System.in); + int addStatus = 0; + + while (addStatus == 0) { + try { + System.out.println("Enter the member id "); + m.setMemberId(Integer.parseInt(sc.nextLine().toString())); + System.out.println("Enter the isbn code "); + b.setIsbnCode(sc.nextLine().toString()); + returnBook(m, b); + addStatus = 1; + + } catch (Exception e) { + addStatus = 0; + } + + } + + } + + public static void returnBook(Member m, Book b) { + Connection conn = LibUtil.getConnection(); + try { + Statement stmt = conn.createStatement(); + ResultSet rs = null; + String qry = "select m.member_id, b.isbn_code, mbr.rec_id from members m,books b,member_book_record mbr\n" + + "where m.member_id= " + m.getMemberId() + " \n" + + "and b.isbn_code = '" + b.getIsbnCode() + "' \n" + + "and m.member_id=mbr.member_id\n" + + "and b.isbn_code=mbr.isbn_code and mbr.dor is null "; + rs=stmt.executeQuery(qry); + if (rs.next()) { + Integer recId= rs.getInt(3); + System.out.println("The book is already issued and starting the process to return "); + int k = stmt.executeUpdate("update books set units_available= (units_available+1) where isbn_code = '"+ b.getIsbnCode() +"' "); + if(k > 0){ + k = stmt.executeUpdate("update member_book_record set dor= sysdate where rec_id = "+ recId +" "); + conn.commit(); + System.out.println("The book is returned successfully"); + }else{ + conn.rollback(); + } + + } else{ + System.out.println("This book is not issued for the user"); + } + conn.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + + +} diff --git a/LibraryMangement/src/LibUtil.java b/LibraryMangement/src/LibUtil.java new file mode 100644 index 00000000..85748ccc --- /dev/null +++ b/LibraryMangement/src/LibUtil.java @@ -0,0 +1,40 @@ + +import java.io.FileInputStream; +import java.sql.Connection; +import java.sql.DriverManager; +import java.util.Properties; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author testuser + */ +public class LibUtil { + public static Connection getConnection() { + Connection conn = null; + try { + Properties prop = new Properties(); + FileInputStream in = new FileInputStream("src/DBProperties"); + prop.load(in); + + String driverName= prop.getProperty("DBDriver"); + Class.forName(driverName); + + String dbName,user,password; + dbName= prop.getProperty("DBName"); + user = prop.getProperty("User"); + password= prop.getProperty("Password"); + + conn= DriverManager.getConnection(dbName, user, password); + return conn; + } catch (Exception e) { + } + return conn; + + } +} diff --git a/LibraryMangement/src/Member.java b/LibraryMangement/src/Member.java new file mode 100644 index 00000000..69a51340 --- /dev/null +++ b/LibraryMangement/src/Member.java @@ -0,0 +1,53 @@ + +import java.sql.Date; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +/** + * + * @author testuser + */ +public class Member { + + private Integer memberId; + private String memberName; + private Date dateOfJoining; + + public Member() { + + } + + public Member(Integer memberId, String memberName, Date dateOfJoining) { + this.memberId = memberId; + this.memberName = memberName; + this.dateOfJoining = dateOfJoining; + } + + public Date getDateOfJoining() { + return dateOfJoining; + } + + public void setDateOfJoining(Date dateOfJoining) { + this.dateOfJoining = dateOfJoining; + } + + public Integer getMemberId() { + return memberId; + } + + public void setMemberId(Integer memberId) { + this.memberId = memberId; + } + + public String getMemberName() { + return memberName; + } + + public void setMemberName(String memberName) { + this.memberName = memberName; + } + +} diff --git a/LibraryMangement/src/UserMenu.java b/LibraryMangement/src/UserMenu.java new file mode 100644 index 00000000..df752999 --- /dev/null +++ b/LibraryMangement/src/UserMenu.java @@ -0,0 +1,64 @@ + +import java.util.Scanner; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author testuser + */ +public class UserMenu { + public static void main(String[] args) { + String input=""; + Scanner sc = new Scanner(System.in); + + while(input != "5"){ + System.out.println("---------------------------------------------------------"); + System.out.println("---------------------------------------------------------"); + System.out.println("---------------------------------------------------------"); + + System.out.println("Select the following options"); + System.out.println("Enter 1 for adding a book"); + System.out.println("Enter 2 for adding a member"); + System.out.println("Enter 3 for issuing a book "); + System.out.println("Enter 4 for returning a book "); + System.out.println("Enter 5 to exit"); + input = processUserInput(sc.nextLine().toString()); + + } + } + public static String processUserInput(String in) { + String retVal="5"; + switch(in){ + case "1": + System.out.println("---------------------------------------------------------"); + System.out.println("You have selected option 1 to add a book"); + AddBookMenu.addBookMenu(); + return "1"; + case "2": + System.out.println("---------------------------------------------------------"); + System.out.println("You have selected option 2 to add a member"); + AddMemberMenu.addMemberMenu(); + return "2"; + case "3": + System.out.println("---------------------------------------------------------"); + System.out.println("You have selected option 3 to issue a book"); + LibFunctions.callIssueMenu(); + return "3"; + case "4": + System.out.println("---------------------------------------------------------"); + System.out.println("You have selected option 4 to return a book"); + LibFunctions.callReturnMenu(); + return "4"; + default: + System.out.println("---------------------------------------------------------"); + System.out.println("Thanks for working on this!!"); + return "5"; + } + + } +} diff --git a/Linearsearch.java b/Linearsearch.java new file mode 100644 index 00000000..cc0b6e63 --- /dev/null +++ b/Linearsearch.java @@ -0,0 +1,15 @@ +public class LinearSearchExample{ +public static int linearSearch(int[] arr, int key){ + for(int i=0;i<arr.length;i++){ + if(arr[i] == key){ + return i; + } + } + return -1; + } + public static void main(String a[]){ + int[] a1= {10,20,30,50,70,90}; + int key = 50; + System.out.println(key+" is found at index: "+linearSearch(a1, key)); + } +} diff --git a/ListScanner/readme.md b/ListScanner/readme.md new file mode 100644 index 00000000..fb0825bb --- /dev/null +++ b/ListScanner/readme.md @@ -0,0 +1,23 @@ +# List Scanner (Java) + +This is a simple console-based List Scanner application implemented in Java. + +## How to Use + +1. Compile and run `Main.java`. +2. Choose options to manage tasks in your To-Do List. +3. Follow the on-screen instructions to add, list, mark as completed, or remove tasks. + +## Features + +- Add new tasks with descriptions. +- List all tasks in the To-Do List. +- Mark tasks as completed. +- Remove tasks from the list. +- Interactive console interface. + +## Technologies Used + +- Java + +Feel free to modify the code to add more features or extend its functionality. diff --git a/ListScanner/scanner.java b/ListScanner/scanner.java new file mode 100644 index 00000000..80aba735 --- /dev/null +++ b/ListScanner/scanner.java @@ -0,0 +1,127 @@ +import java.util.ArrayList; +import java.util.Scanner; + +public class ToDoListApp { + private static ArrayList<Task> taskList = new ArrayList<>(); + private static int taskIdCounter = 1; + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + while (true) { + System.out.println("To-Do List Application"); + System.out.println("1. Add Task"); + System.out.println("2. List Tasks"); + System.out.println("3. Mark Task as Completed"); + System.out.println("4. Remove Task"); + System.out.println("5. Exit"); + System.out.print("Enter your choice: "); + + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume the newline + + switch (choice) { + case 1: + addTask(scanner); + break; + case 2: + listTasks(); + break; + case 3: + markTaskAsCompleted(scanner); + break; + case 4: + removeTask(scanner); + break; + case 5: + System.out.println("Goodbye!"); + System.exit(0); + default: + System.out.println("Invalid choice. Please try again."); + } + } + } + + private static void addTask(Scanner scanner) { + System.out.print("Enter the task description: "); + String description = scanner.nextLine(); + Task task = new Task(taskIdCounter, description); + taskList.add(task); + taskIdCounter++; + System.out.println("Task added successfully!"); + } + + private static void listTasks() { + if (taskList.isEmpty()) { + System.out.println("No tasks to display."); + } else { + System.out.println("Tasks:"); + for (Task task : taskList) { + System.out.println(task); + } + } + } + + private static void markTaskAsCompleted(Scanner scanner) { + System.out.print("Enter the task ID to mark as completed: "); + int taskId = scanner.nextInt(); + scanner.nextLine(); // Consume the newline + + for (Task task : taskList) { + if (task.getId() == taskId) { + task.setCompleted(true); + System.out.println("Task marked as completed."); + return; + } + } + System.out.println("Task not found."); + } + + private static void removeTask(Scanner scanner) { + System.out.print("Enter the task ID to remove: "); + int taskId = scanner.nextInt(); + scanner.nextLine(); // Consume the newline + + for (Task task : taskList) { + if (task.getId() == taskId) { + taskList.remove(task); + System.out.println("Task removed."); + return; + } + } + System.out.println("Task not found."); + } +} + +class Task { + private int id; + private String description; + private boolean completed; + + public Task(int id, String description) { + this.id = id; + this.description = description; + this.completed = false; + } + + public int getId() { + return id; + } + + public String getDescription() { + return description; + } + + public boolean isCompleted() { + return completed; + } + + public void setCompleted(boolean completed) { + this.completed = completed; + } + + @Override + public String toString() { + return id + ". [" + (completed ? "X" : " ") + "] " + description; + } +} diff --git a/LoginPage.class b/LoginPage.class new file mode 100644 index 00000000..4abb007d Binary files /dev/null and b/LoginPage.class differ diff --git a/LoginPage.java b/LoginPage.java new file mode 100644 index 00000000..1bbb10b0 --- /dev/null +++ b/LoginPage.java @@ -0,0 +1,337 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + +import javax.swing.text.*; + +public class LoginPage extends JFrame +{ + Container c = getContentPane(); + JPanel PFlightTypes = new JPanel(null); + JPanel PLogin = new JPanel(null); + JPanel PFlightDetails = new JPanel(null); + + public boolean bCheck=true; + + JLabel LDomesticFlight = new JLabel("<html><B>Domestic Flights</B></html>"); + JLabel LInternationalFlight = new JLabel("<html><B>International Flights</B></html>"); + + JLabel LUserName, LPassword; + + JLabel LDomesticFlight1 = new JLabel("<html><B>Domestic Flight Booking</B></html>"); + JLabel LInternationalFlight1 = new JLabel("<html><B>International Flight Booking</B></html>"); + + JTextField TFUserName; + JPasswordField TPPassword; + + JButton BLogin; + + final Object[] col1 ={ "From", "To", "Price", "Time" }; + final Object[] col2 = { "From", "To", "Price", "Time" }; + final Object[] col3 = { "From", "To", "Price", "Time" }; + + final Object[][] row1 = { { "Trivandrum", "Bangalore", "3125", "16:30" }, { "Trivandrum", "Chennai ", "3225", "19:00" }, { "Trivandrum", "Delhi", "1425 ", "08:30" }, { "Trivandrum", "Goa", "1025 ", "09:50" }, { "Trivandrum", "Hyderabad", "1525", "11:00" }, { "Trivandrum", "Kolkata", "3825 ", "05:30" }, { "Trivandrum", "Lucknow", "3025 ", "05:30" }, { "Trivandrum", "Mumbai", "1725", "12:00" }, { "Trivandrum", "Vishakapatnam", "3725", "19:00" } }; + final Object[][] row2 = { { "Trivandrum", "Bali", "21485", "06:20" }, { "Trivandrum", "Bangkok", "9000", "20:45" }, { "Trivandrum", "Cairo", "22975", "10:25" }, { "Trivandrum", "CapeTown", "42500", "16:45" }, { "Trivandrum", "Chicago", "35000", "06:30" }, { "Trivandrum", "Dubai", "12000", "08:15" }, { "Trivandrum", "Frankfurt", "18500", "06:50" }, { "Trivandrum", "HongKong", "20845", "12:00" }, { "Trivandrum", "Istanbul", "22000", "10:45" }, { "Trivandrum", "London", "22600", "14:35" }, { "Trivandrum", "LosAngeles", "35000", "22:00" }, { "Trivandrum", "Melbourne", "27800", "21:15" }, { "Trivandrum", "New York", "32000", "08:50" }, { "Trivandrum", "Paris", "18500", "18:45" }, { "Trivandrum", "Rome", "19900", "20:00"}, { "Trivandrum", "SanFrancisco", "35000", "12:00"}, { "Trivandrum", "shanghai", "24430", "10:15" }, { "Trivandrum", "Singapore", "9000", "21:10" }, { "Trivandrum", "Sydney", "27800", "12:00"}, { "Trivandrum", "Toronto", "35000", "17:00 " } }; + final Object[][] row3 = { { "Trivandrum", "Bangalore", "9375", "16:30" }, { "Trivandrum", "Chennai ", "9675", "19:00" }, { "Trivandrum", "Delhi", "4275", "08:30" }, { "Trivandrum", "Goa", "3075", "09:50" }, { "Trivandrum", "Hyderabad", "4575", "11:00" }, { "Trivandrum", "Kolkata", "11475", "05:30" }, { "Trivandrum", "Lucknow", "9075", "05:30" }, { "Trivandrum", "Mumbai", "5175", "12:00" }, { "Trivandrum", "Vishakapatnam", "11175", "19:00" } }; + final Object[][] row4 = { { "Trivandrum", "Bali", "64455", "06:20" }, { "Trivandrum", "Bangkok", "27000", "20:45" }, { "Trivandrum", "Cairo", "68925", "10:25" }, { "Trivandrum", "CapeTown", "37500", "16:45" }, { "Trivandrum", "Chicago", "105000", "06:30" }, { "Trivandrum", "Dubai", "36000", "08:15" }, { "Trivandrum", "Frankfurt", "55500", "06:50" }, { "Trivandrum", "HongKong", "62535", "12:00" }, { "Trivandrum", "Istanbul", "66000", "10:45" }, { "Trivandrum", "London", "67800", "14:35" }, { "Trivandrum", "LosAngeles", "105000", "22:00" }, { "Trivandrum", "Melbourne", "83400", "21:15" }, { "Trivandrum", "New York", "96000", "08:50" }, { "Trivandrum", "Paris", "55500", "18:45" }, { "Trivandrum", "Rome", "59700", "20:00" }, { "Trivandrum", "SanFrancisco", "105000", "12:00" }, { "Trivandrum", "shanghai", "73290", "10:15" }, { "Trivandrum", "Singapore", "27000", "21:10"}, { "Trivandrum", "Sydney", "83400", "12:00"}, { "Trivandrum", "Toronto", "105000", "17:00" } }; + + JTable TDomesticFlight = new JTable(row1, col1); + JTable TInternationalFlight = new JTable(row2, col2); + JTable TDomesticFlight1 = new JTable(row3, col3); + JTable TInternationalFlight1 = new JTable(row4, col2); + + JScrollPane JSP1 = new JScrollPane(TDomesticFlight, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); + JScrollPane JSP2 = new JScrollPane(TInternationalFlight, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); + JScrollPane JSP3 = new JScrollPane(TDomesticFlight1, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); + JScrollPane JSP4 = new JScrollPane(TInternationalFlight1, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); + + Icon img1 = new ImageIcon("img/economic.jpg"); + Icon img2 = new ImageIcon("img/business.jpg"); + Icon img3 = new ImageIcon("img/economic1.jpg"); + Icon img4 = new ImageIcon("img/business1.jpg"); + + JLabel LEconomic = new JLabel("Economic", img1, SwingConstants.LEFT); + JLabel LBusiness = new JLabel("Business", img2, SwingConstants.LEFT); + JLabel LEconomic1 = new JLabel("Economic", img3, SwingConstants.LEFT); + JLabel LBusiness1 = new JLabel("Business", img4, SwingConstants.LEFT); + + public LoginPage() + { + WindowUtilities.setNativeLookAndFeel(); + setPreferredSize(new Dimension(796,572)); + + PFlightTypes.setBackground(Color.white); + PLogin.setBackground(Color.white); + PFlightDetails.setBackground(Color.white); + + JSP1.setBounds(0, 340, 790, 200); + JSP2.setBounds(0, 340, 790, 200); + JSP3.setBounds(0, 340, 790, 200); + JSP4.setBounds(0, 340, 790, 200); + + PFlightTypes.setBounds(0,0,500, 340); + PLogin.setBounds(500,0,350, 340); + PFlightDetails.setBounds(0,340,790,200); + + + LUserName = new JLabel(" User Name "); + LPassword = new JLabel(" Password "); + TFUserName = new JTextField(10); + TPPassword = new JPasswordField(10); + BLogin = new JButton("Sign In"); + + LUserName.setBounds(40, 100, 100, 21); + LPassword.setBounds(40, 140, 100, 21); + TFUserName.setBounds(160, 100, 100, 21); + TPPassword.setBounds(160, 140, 100, 21); + BLogin.setBounds(160, 200, 100,25); + + LDomesticFlight1.setBounds(60, 60, 138, 20); + LInternationalFlight1.setBounds(60, 100, 153, 20); + + PLogin.add(LUserName); + PLogin.add(TFUserName); + PLogin.add(LPassword); + PLogin.add(TPPassword); + PLogin.add(BLogin); + + PFlightDetails.add(JSP1); + PFlightDetails.add(JSP2); + PFlightDetails.add(JSP3); + PFlightDetails.add(JSP4); + + JSP1.setVisible(true); + JSP2.setVisible(false); + JSP3.setVisible(false); + JSP4.setVisible(false); + + LBusiness.setBounds(265, 170, 300, 125); + LEconomic.setBounds(0, 170, 250, 125); + LBusiness1.setBounds(280, 200, 135, 60); + LEconomic1.setBounds(50, 200, 147, 60); + + PFlightTypes.add(LEconomic); + PFlightTypes.add(LBusiness); + PFlightTypes.add(LEconomic1); + PFlightTypes.add(LBusiness1); + + LBusiness.setVisible(false); + LEconomic1.setVisible(false); + LBusiness1.setVisible(true); + LEconomic.setVisible(true); + + + LDomesticFlight.setBounds(60, 60, 100, 25); + LInternationalFlight.setBounds(60, 100, 120, 25); + + c.add(PFlightTypes); + c.add(PLogin); + c.add(PFlightDetails); + + PFlightTypes.add(LDomesticFlight); + PFlightTypes.add(LInternationalFlight); + + pack(); + setVisible(true); + + addWindowListener(new ExitListener()); + + LDomesticFlight.addMouseListener(new mouse1(this, true)); + LInternationalFlight.addMouseListener(new mouse1(this, false)); + + LDomesticFlight1.addMouseListener(new mouse3(this, true)); + LInternationalFlight1.addMouseListener(new mouse3(this, false)); + + LBusiness1.addMouseListener(new mouse2(this, true)); + LEconomic1.addMouseListener(new mouse2(this, false)); + + BLogin.addActionListener(new button1(this)); + } + + public static void main(String args[]) + { + new LoginPage(); + } +} + + +class button1 implements ActionListener +{ + LoginPage type; + char[] cCheck, cPassword={'a','d','m','i','n','\0'}; + JFrame f; + String sCheck,sCheck1="admin"; + + public button1(LoginPage type) + { + this.type = type; + } + public void actionPerformed(ActionEvent e) + { + cCheck=type.TPPassword.getPassword(); + sCheck = type.TFUserName.getText(); + if ((sCheck1.equals(sCheck)) && check()) + { + type.PLogin.add(type.LDomesticFlight1); + type.PLogin.add(type.LInternationalFlight1); + + type.PLogin.remove(type.LUserName); + type.PLogin.remove(type.TFUserName); + type.PLogin.remove(type.LPassword); + type.PLogin.remove(type.TPPassword); + type.PLogin.remove(type.BLogin); + + type.c.repaint(); + } + else + { + JOptionPane.showMessageDialog(null, "Invalid username or password. Try again"); + } + } + public boolean check() + { + if (cCheck.length >= 6 || cCheck.length < 4) + return false; + for(int i=0;i<=4;i++) + { + if(cCheck[i]!=cPassword[i]) + return false; + } + return true; + } +} + +class mouse1 extends MouseAdapter +{ + LoginPage type; + boolean bCheck; + + public mouse1(LoginPage type, boolean bCheck) + { + this.type = type; + this.bCheck = bCheck; + } + public void mouseEntered(MouseEvent e) + { + type.LDomesticFlight.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + type.LInternationalFlight.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + } + public void mouseClicked(MouseEvent e) + { + if(bCheck) + type.bCheck = true; + else + type.bCheck = false; + type.LEconomic.setVisible(true); + type.LBusiness1.setVisible(true); + type.LEconomic1.setVisible(false); + type.LBusiness.setVisible(false); + + type.JSP1.setVisible(false); + type.JSP2.setVisible(false); + type.JSP3.setVisible(false); + type.JSP4.setVisible(false); + if(bCheck) + type.JSP1.setVisible(true); + else + type.JSP2.setVisible(true); + } +} + + + +class mouse3 extends MouseAdapter +{ + LoginPage type; + boolean bCheck; + + public mouse3(LoginPage type, boolean bCheck) + { + this.type = type; + this.bCheck = bCheck; + } + public void mouseEntered(MouseEvent e) + { + type.LDomesticFlight1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + type.LInternationalFlight1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + } + public void mouseClicked(MouseEvent e) + { + if (bCheck) + new DomesticFlight(type); + else + new InternationalFlight(type); + } +} + + +class mouse2 extends MouseAdapter +{ + LoginPage type; + boolean bCheck; + + public mouse2(LoginPage type, boolean bCheck) + { + this.type = type; + this.bCheck = bCheck; + } + public void mouseEntered(MouseEvent e) + { + type.LEconomic1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + type.LBusiness1.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); + } + public void mouseClicked(MouseEvent e) + { + if(type.bCheck) + { + if (bCheck) + { + type.LBusiness1.setVisible(false); + type.LBusiness.setVisible(true); + type.LEconomic.setVisible(false); + type.LEconomic1.setVisible(true); + type.JSP1.setVisible(false); + type.JSP2.setVisible(false); + type.JSP3.setVisible(true); + type.JSP4.setVisible(false); + } + else + { + type.LEconomic1.setVisible(false); + type.LBusiness.setVisible(false); + type.LBusiness1.setVisible(true); + type.LEconomic.setVisible(true); + type.JSP1.setVisible(true); + type.JSP2.setVisible(false); + type.JSP3.setVisible(true); + type.JSP4.setVisible(false); + } + } + else + { + if (bCheck) + { + type.LBusiness1.setVisible(false); + type.LBusiness.setVisible(true); + type.LEconomic.setVisible(false); + type.LEconomic1.setVisible(true); + type.JSP1.setVisible(false); + type.JSP2.setVisible(false); + type.JSP3.setVisible(false); + type.JSP4.setVisible(true); + } + else + { + type.LEconomic1.setVisible(false); + type.LBusiness.setVisible(false); + type.LBusiness1.setVisible(true); + type.LEconomic.setVisible(true); + type.JSP1.setVisible(false); + type.JSP2.setVisible(true); + type.JSP3.setVisible(false); + type.JSP4.setVisible(false); + } + } + } +} + diff --git a/Lost and found application/.gitignore b/Lost and found application/.gitignore new file mode 100644 index 00000000..aa724b77 --- /dev/null +++ b/Lost and found application/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/Lost and found application/.idea/.gitignore b/Lost and found application/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/Lost and found application/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Lost and found application/.idea/.name b/Lost and found application/.idea/.name new file mode 100644 index 00000000..d26b3d20 --- /dev/null +++ b/Lost and found application/.idea/.name @@ -0,0 +1 @@ +BU FINDER \ No newline at end of file diff --git a/Lost and found application/.idea/compiler.xml b/Lost and found application/.idea/compiler.xml new file mode 100644 index 00000000..b589d56e --- /dev/null +++ b/Lost and found application/.idea/compiler.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <bytecodeTargetLevel target="17" /> + </component> +</project> \ No newline at end of file diff --git a/Lost and found application/.idea/gradle.xml b/Lost and found application/.idea/gradle.xml new file mode 100644 index 00000000..a2d7c213 --- /dev/null +++ b/Lost and found application/.idea/gradle.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleMigrationSettings" migrationVersion="1" /> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="testRunner" value="GRADLE" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/Lost and found application/.idea/misc.xml b/Lost and found application/.idea/misc.xml new file mode 100644 index 00000000..af48c449 --- /dev/null +++ b/Lost and found application/.idea/misc.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="DesignSurface"> + <option name="filePathToZoomLevelMap"> + <map> + <entry key="app/src/main/res/layout/activity_edit_profile.xml" value="0.23645833333333333" /> + <entry key="app/src/main/res/layout/activity_found_form.xml" value="0.23645833333333333" /> + <entry key="app/src/main/res/layout/activity_login.xml" value="0.23645833333333333" /> + <entry key="app/src/main/res/layout/activity_lost_form.xml" value="0.23645833333333333" /> + <entry key="app/src/main/res/layout/activity_main.xml" value="0.23645833333333333" /> + <entry key="app/src/main/res/layout/activity_register.xml" value="0.23645833333333333" /> + <entry key="app/src/main/res/layout/fragment_found.xml" value="0.11372549019607843" /> + </map> + </option> + </component> + <component name="ProjectRootManager" version="2" languageLevel="JDK_17_PREVIEW" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/Lost and found application/.project b/Lost and found application/.project new file mode 100644 index 00000000..3e41951e --- /dev/null +++ b/Lost and found application/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>BU FINDER</name> + <comment>Project Lost and found application created by Buildship.</comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.buildship.core.gradleprojectbuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.buildship.core.gradleprojectnature</nature> + </natures> +</projectDescription> diff --git a/Lost and found application/.settings/org.eclipse.buildship.core.prefs b/Lost and found application/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..1c0676f3 --- /dev/null +++ b/Lost and found application/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments=--init-script /home/himanshu/.config/Code/User/globalStorage/redhat.java/1.23.0/config_linux/org.eclipse.osgi/55/0/.cp/gradle/init/init.gradle --init-script /home/himanshu/.config/Code/User/globalStorage/redhat.java/1.23.0/config_linux/org.eclipse.osgi/55/0/.cp/gradle/protobuf/init.gradle +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home=/usr/lib/jvm/java-17-amazon-corretto +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/Lost and found application/app/.classpath b/Lost and found application/app/.classpath new file mode 100644 index 00000000..bbe97e50 --- /dev/null +++ b/Lost and found application/app/.classpath @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/> + <classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> + <classpathentry kind="output" path="bin/default"/> +</classpath> diff --git a/Lost and found application/app/.gitignore b/Lost and found application/app/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/Lost and found application/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/Lost and found application/app/.project b/Lost and found application/app/.project new file mode 100644 index 00000000..ac485d7c --- /dev/null +++ b/Lost and found application/app/.project @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>app</name> + <comment>Project app created by Buildship.</comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.buildship.core.gradleprojectbuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.buildship.core.gradleprojectnature</nature> + </natures> +</projectDescription> diff --git a/Lost and found application/app/.settings/org.eclipse.buildship.core.prefs b/Lost and found application/app/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..b1886adb --- /dev/null +++ b/Lost and found application/app/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir=.. +eclipse.preferences.version=1 diff --git a/Lost and found application/app/build.gradle b/Lost and found application/app/build.gradle new file mode 100644 index 00000000..b712621f --- /dev/null +++ b/Lost and found application/app/build.gradle @@ -0,0 +1,53 @@ +plugins { + id 'com.android.application' + id 'com.google.gms.google-services' +} + +android { + compileSdk 32 + + defaultConfig { + applicationId "com.application.bufinder" + minSdk 21 + targetSdk 32 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + + buildFeatures{ + viewBinding true + } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.4.1' + implementation 'com.google.android.material:material:1.6.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'com.google.firebase:firebase-auth:21.0.5' + implementation 'com.google.firebase:firebase-firestore:24.1.2' + implementation 'com.google.firebase:firebase-storage:20.0.1' + implementation 'com.google.firebase:firebase-analytics:21.0.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + implementation 'com.squareup.picasso:picasso:2.71828' + implementation platform('com.google.firebase:firebase-bom:30.1.0') + implementation 'com.google.firebase:firebase-auth' + implementation 'com.google.android.gms:play-services-auth:20.2.0' + implementation 'de.hdodenhof:circleimageview:3.1.0' +} \ No newline at end of file diff --git a/Lost and found application/app/google-services.json b/Lost and found application/app/google-services.json new file mode 100644 index 00000000..b964dd67 --- /dev/null +++ b/Lost and found application/app/google-services.json @@ -0,0 +1,39 @@ +{ + "project_info": { + "project_number": "543311147921", + "project_id": "bu-finder-6bb4a", + "storage_bucket": "bu-finder-6bb4a.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:543311147921:android:355393a9b5bb2bd5526030", + "android_client_info": { + "package_name": "com.application.bufinder" + } + }, + "oauth_client": [ + { + "client_id": "543311147921-g95lnkk7ij4drci77nju8nnon6dcmgqb.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyCZUTuw1vUiOz4UdIUpOw5NRJK4C42a9qo" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "543311147921-g95lnkk7ij4drci77nju8nnon6dcmgqb.apps.googleusercontent.com", + "client_type": 3 + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/Lost and found application/app/proguard-rules.pro b/Lost and found application/app/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/Lost and found application/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/Lost and found application/app/src/androidTest/java/com/application/bufinder/ExampleInstrumentedTest.java b/Lost and found application/app/src/androidTest/java/com/application/bufinder/ExampleInstrumentedTest.java new file mode 100644 index 00000000..f21094f7 --- /dev/null +++ b/Lost and found application/app/src/androidTest/java/com/application/bufinder/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.application.bufinder; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.application.bufinder", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/Lost and found application/app/src/main/AndroidManifest.xml b/Lost and found application/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..ebdc230f --- /dev/null +++ b/Lost and found application/app/src/main/AndroidManifest.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + package="com.application.bufinder"> + + <application + android:name=".util.JournalApi" + android:allowBackup="true" + android:dataExtractionRules="@xml/data_extraction_rules" + android:fullBackupContent="@xml/backup_rules" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.BUFINDER" + tools:targetApi="31"> + <activity + android:name=".Found_Form" + android:exported="false" /> + <activity + android:name=".Lost_Form" + android:exported="false" /> + <activity + android:name=".EditProfile" + android:exported="false" /> + <activity + android:name=".Login" + android:exported="true"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + <activity + android:name=".Register" + android:exported="false" /> + <activity + android:name=".MainActivity" + android:exported="true"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/EditProfile.java b/Lost and found application/app/src/main/java/com/application/bufinder/EditProfile.java new file mode 100644 index 00000000..ad148492 --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/EditProfile.java @@ -0,0 +1,164 @@ +package com.application.bufinder; + +import android.app.Activity; +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.provider.MediaStore; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.ImageView; +import android.widget.Toast; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; + +import com.google.android.gms.tasks.OnFailureListener; +import com.google.android.gms.tasks.OnSuccessListener; +import com.google.firebase.auth.FirebaseAuth; +import com.google.firebase.auth.FirebaseUser; +import com.google.firebase.firestore.DocumentReference; +import com.google.firebase.firestore.FirebaseFirestore; +import com.google.firebase.storage.FirebaseStorage; +import com.google.firebase.storage.StorageReference; +import com.google.firebase.storage.UploadTask; +import com.squareup.picasso.Picasso; + +import java.util.HashMap; +import java.util.Map; + +public class EditProfile extends AppCompatActivity { + + public static final String TAG = "TAG"; + EditText profileFullName,profileEmail,profilePhone; + ImageView profileImageView; + Button saveBtn; + FirebaseAuth fAuth; + FirebaseFirestore fStore; + FirebaseUser user; + StorageReference storageReference; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_edit_profile); + + Intent data = getIntent(); + final String fullName = data.getStringExtra("fullName"); + String email = data.getStringExtra("email"); + String phone = data.getStringExtra("phone"); + + fAuth = FirebaseAuth.getInstance(); + fStore = FirebaseFirestore.getInstance(); + user = fAuth.getCurrentUser(); + storageReference = FirebaseStorage.getInstance().getReference(); + + profileFullName = findViewById(R.id.profileFullName); + profileEmail = findViewById(R.id.profileEmailAddress); + profilePhone = findViewById(R.id.profilePhoneNo); + profileImageView = findViewById(R.id.profileImageView); + saveBtn = findViewById(R.id.saveProfileInfo); + + StorageReference profileRef = storageReference.child("users/"+fAuth.getCurrentUser().getUid()+"/profile.jpg"); + profileRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() { + @Override + public void onSuccess(Uri uri) { + Picasso.get().load(uri).into(profileImageView); + } + }); + + profileImageView.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent openGalleryIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI); + startActivityForResult(openGalleryIntent,1000); + } + }); + + saveBtn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(profileFullName.getText().toString().isEmpty() || profileEmail.getText().toString().isEmpty() || profilePhone.getText().toString().isEmpty()){ + Toast.makeText(EditProfile.this, "One or Many fields are empty.", Toast.LENGTH_SHORT).show(); + return; + } + + final String email = profileEmail.getText().toString(); + user.updateEmail(email).addOnSuccessListener(new OnSuccessListener<Void>() { + @Override + public void onSuccess(Void aVoid) { + DocumentReference docRef = fStore.collection("users").document(user.getUid()); + Map<String,Object> edited = new HashMap<>(); + edited.put("email",email); + edited.put("fName",profileFullName.getText().toString()); + edited.put("phone",profilePhone.getText().toString()); + docRef.update(edited).addOnSuccessListener(new OnSuccessListener<Void>() { + @Override + public void onSuccess(Void aVoid) { + Toast.makeText(EditProfile.this, "Profile Updated", Toast.LENGTH_SHORT).show(); + startActivity(new Intent(getApplicationContext(),MainActivity.class)); + finish(); + } + }); + Toast.makeText(EditProfile.this, "Email is changed.", Toast.LENGTH_SHORT).show(); + } + }).addOnFailureListener(new OnFailureListener() { + @Override + public void onFailure(@NonNull Exception e) { + Toast.makeText(EditProfile.this, e.getMessage(), Toast.LENGTH_SHORT).show(); + } + }); + + + } + }); + + profileEmail.setText(email); + profileFullName.setText(fullName); + profilePhone.setText(phone); + + Log.d(TAG, "onCreate: " + fullName + " " + email + " " + phone); + } + + + @Override + protected void onActivityResult(int requestCode, int resultCode, @androidx.annotation.Nullable Intent data) { + super.onActivityResult(requestCode, resultCode, data); + if(requestCode == 1000){ + if(resultCode == Activity.RESULT_OK){ + Uri imageUri = data.getData(); + + //profileImage.setImageURI(imageUri); + + uploadImageToFirebase(imageUri); + + + } + } + + } + + private void uploadImageToFirebase(Uri imageUri) { + // uplaod image to firebase storage + final StorageReference fileRef = storageReference.child("users/"+fAuth.getCurrentUser().getUid()+"/profile.jpg"); + fileRef.putFile(imageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() { + @Override + public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) { + fileRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() { + @Override + public void onSuccess(Uri uri) { + Picasso.get().load(uri).into(profileImageView); + } + }); + } + }).addOnFailureListener(new OnFailureListener() { + @Override + public void onFailure(@NonNull Exception e) { + Toast.makeText(getApplicationContext(), "Failed.", Toast.LENGTH_SHORT).show(); + } + }); + + } +} diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/FoundFragment.java b/Lost and found application/app/src/main/java/com/application/bufinder/FoundFragment.java new file mode 100644 index 00000000..5ba47cf0 --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/FoundFragment.java @@ -0,0 +1,97 @@ +package com.application.bufinder; + +import android.content.Intent; +import android.os.Bundle; + +import androidx.annotation.NonNull; +import androidx.appcompat.widget.PopupMenu; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.RecyclerView; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.EditText; + +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.firebase.auth.FirebaseAuth; + +import java.util.ArrayList; + +/** + * A simple {@link Fragment} subclass. + * Use the {@link FoundFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class FoundFragment extends Fragment { + + RecyclerView list; + + + + String uid = FirebaseAuth.getInstance().getUid(); + PopupMenu popupMenu; + + // TODO: Rename parameter arguments, choose names that match + // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + // TODO: Rename and change types of parameters + private String mParam1; + private String mParam2; + + public FoundFragment() { + // Required empty public constructor + } + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment FoundFragment. + */ + // TODO: Rename and change types and number of parameters + public static FoundFragment newInstance(String param1, String param2) { + FoundFragment fragment = new FoundFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + } + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, + ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_found, container, false); + + FloatingActionButton fab = view.findViewById(R.id.floatingActionButton1); + fab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent i = new Intent(getContext(),Found_Form.class); + startActivity(i); + + + } + + }); + return view; + + + } + +} \ No newline at end of file diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/Found_Form.java b/Lost and found application/app/src/main/java/com/application/bufinder/Found_Form.java new file mode 100644 index 00000000..e2d4b2b8 --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/Found_Form.java @@ -0,0 +1,176 @@ +package com.application.bufinder; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.Spinner; + +import com.application.bufinder.models.Journal; +import com.google.android.gms.tasks.OnSuccessListener; +import com.google.firebase.firestore.CollectionReference; +import com.google.firebase.firestore.DocumentReference; +import com.google.firebase.firestore.FirebaseFirestore; + +import java.util.ArrayList; +import java.util.Arrays; + +public class Found_Form extends AppCompatActivity { + + + Button button; + Spinner sp_item, sp_sub, sp_brand, sp_colour; + + private final FirebaseFirestore db = FirebaseFirestore.getInstance(); + + private final CollectionReference collectionReference = db.collection("Found"); + + + ArrayList<String> arrayList_item; + ArrayAdapter<String> arrayAdapter_item; + + ArrayList<String> arrayList_ad; + ArrayList<String> arrayList_la; + ArrayList<String> arrayList_w; + ArrayList<String> arrayList_f; + ArrayList<String> arrayList_b; + ArrayList<String> arrayList_k; + ArrayList<String> arrayList_se; + ArrayList<String> arrayList_c; + ArrayAdapter<String> arrayAdapter_sub; + + ArrayList<String> arrayList_adb; + ArrayList<String> arrayList_lab; + ArrayList<String> arrayList_wb; + ArrayList<String> arrayList_fb; + ArrayList<String> arrayList_bb; + ArrayList<String> arrayList_kb; + ArrayList<String> arrayList_seb; + ArrayList<String> arrayList_cb; + ArrayAdapter<String> arrayAdapter_brand; + + ArrayList<String> arrayList_colour; + ArrayAdapter<String> arrayAdapter_colour; + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_found_form); + sp_item = (Spinner) findViewById(R.id.sp_item); + sp_sub = (Spinner) findViewById(R.id.sp_sub); + sp_brand = (Spinner) findViewById(R.id.sp_brand); + sp_colour = (Spinner) findViewById(R.id.sp_colour); + button = findViewById(R.id.button); + + arrayList_item = new ArrayList<>(Arrays.asList("Audio Devices","Laptop and Accessories","Wearables", "Footwear", "Bottles", "Keys", "Sports Equipment", "Any type of Card")); + arrayAdapter_item = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_item); + sp_item.setAdapter(arrayAdapter_item); + + //======== ArrayList of Individual Sub types============= + arrayList_ad = new ArrayList<>(Arrays.asList("Select Sub-type", "Speakers", "Over-ear Headphones", "On-ear Headphones", "Collar Earphones", "Wired Earphones", "True Wireless Earphones", "Can't Specify")); + arrayList_la = new ArrayList<>(Arrays.asList("Select Sub-type", "Laptop", "Keyboard", "Mouse", "Storage Devices", "Charger", "Laptop Sleeve", "Can't Specify")); + arrayList_w = new ArrayList<>(Arrays.asList("Select Sub-type", "Spectacles", "Watches", "Jewellery", "Caps", "Mufflers", "Gloves", "Can't Specify")); + arrayList_f = new ArrayList<>(Arrays.asList("Select Sub-type","Shoes", "Slippers", "Sandals", "Can't Specify")); + arrayList_b = new ArrayList<>(Arrays.asList("Select Sub-type","Steel Bottles", "Gym Bottles", "Can't Specify")); + arrayList_k = new ArrayList<>(Arrays.asList("Select Sub-type","Car Keys", "Room Keys", "Locker Keys", "Can't Specify")); + arrayList_se = new ArrayList<>(Arrays.asList("Select Sub-type","Racquets", "Ball", "Shuttle Cock", "Can't Specify")); + arrayList_c = new ArrayList<>(Arrays.asList("Select Sub-type","Credit/Debit Cards", "ID Card", "Can't Specify")); + + //======== ArrayList of Individual Sub type's Brand============= + arrayList_adb = new ArrayList<>(Arrays.asList("Select Brand of Item","Bose", "Apple", "Boat", "Noise", "MI", "Realme","Can't Specify")); + arrayList_lab = new ArrayList<>(Arrays.asList("Select Brand of Item","HP", "Dell", "Apple", "Lenovo", "Can't Specify")); + arrayList_wb = new ArrayList<>(Arrays.asList("Select Brand of Item","Casio", "Titan Eye", "Oakley", "MI", "Apple","Titan","Rado", "G-Shock", "Can't Specify")); + arrayList_fb = new ArrayList<>(Arrays.asList("Select Brand of Item","Nike", "Adidas", "Reebok", "Sparx", "Campus", "Crocs", "Decathlon", "Can't Specify")); + arrayList_bb = new ArrayList<>(Arrays.asList("Select Brand of Item","Can't Specify")); + arrayList_kb = new ArrayList<>(Arrays.asList("Select Brand of Item","Can't Specify")); + arrayList_seb = new ArrayList<>(Arrays.asList("Select Brand of Item","Yonex", "Adidas", "Nike", "Puma", "Decathlon", "Cosco", "Can't Specify")); + arrayList_cb = new ArrayList<>(Arrays.asList("Select Brand of Item","HDFC", "UCO Bank", "Slice", "Bennett ID", "Can't Specify")); + + //======== ArrayList of Colours============= + arrayList_colour = new ArrayList<>(Arrays.asList("Select a base colour","Red", "Orange", "Pink", "Grey", "Black", "White", "Dark Green", "Light Green", "Yellow", "Light Blue", "Dark Blue", "Violet")); + + sp_item.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @Override + public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { + if(position == 0){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_ad); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_adb); + } + if(position == 1){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_la); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_lab); + } + if(position == 2){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_w); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_wb); + } + if(position == 3){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_f); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_fb); + } + if(position == 4){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_b); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_bb); + } + if(position == 5){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_k); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_kb); + } + if(position == 6){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_se); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_seb); + } + if(position == 7){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_c); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_cb); + } + sp_sub.setAdapter(arrayAdapter_sub); + sp_brand.setAdapter(arrayAdapter_brand); + arrayAdapter_colour = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_colour); + sp_colour.setAdapter(arrayAdapter_colour); + + + } + + @Override + public void onNothingSelected(AdapterView<?> parent) { + + } + }); + + button.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + saveItem(); + } + }); + + } + + private void saveItem() { + String Item = sp_item.getSelectedItem().toString().trim(); + String Sub = sp_sub.getSelectedItem().toString().trim(); + String Brand = sp_brand.getSelectedItem().toString().trim(); + String Color = sp_colour.getSelectedItem().toString().trim(); + + Journal journal = new Journal(); + journal.setItem(Item); + journal.setSub(Sub); + journal.setBrand(Brand); + journal.setColor(Color); + + collectionReference.add(journal) + .addOnSuccessListener(new OnSuccessListener<DocumentReference>() { + @Override + public void onSuccess(DocumentReference documentReference) { + Intent i = new Intent(Found_Form.this,FoundFragment.class); + startActivity(i); + } + }); + } +} \ No newline at end of file diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/Login.java b/Lost and found application/app/src/main/java/com/application/bufinder/Login.java new file mode 100644 index 00000000..80bb52e0 --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/Login.java @@ -0,0 +1,143 @@ +package com.application.bufinder; + +import android.content.DialogInterface; +import android.content.Intent; +import android.os.Bundle; +import android.text.TextUtils; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.ProgressBar; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; + +import com.google.android.gms.tasks.OnCompleteListener; +import com.google.android.gms.tasks.OnFailureListener; +import com.google.android.gms.tasks.OnSuccessListener; +import com.google.android.gms.tasks.Task; +import com.google.firebase.auth.AuthResult; +import com.google.firebase.auth.FirebaseAuth; + +public class Login extends AppCompatActivity { + EditText mEmail,mPassword; + Button mLoginBtn; + TextView mCreateBtn,forgotTextLink; + ProgressBar progressBar; + FirebaseAuth fAuth; + private long backPressedTime; + private Toast back; + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_login); + + mEmail = findViewById(R.id.Email); + mPassword = findViewById(R.id.password); + progressBar = findViewById(R.id.progressBar); + fAuth = FirebaseAuth.getInstance(); + mLoginBtn = findViewById(R.id.loginBtn); + mCreateBtn = findViewById(R.id.createText); + forgotTextLink = findViewById(R.id.forgotPassword); + + + mLoginBtn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + + String email = mEmail.getText().toString().trim(); + String password = mPassword.getText().toString().trim(); + + if(TextUtils.isEmpty(email)){ + mEmail.setError("Email is Required."); + return; + } + + if(TextUtils.isEmpty(password)){ + mPassword.setError("Password is Required."); + return; + } + + if(password.length() < 6){ + mPassword.setError("Password Must be >= 6 Characters"); + return; + } + + progressBar.setVisibility(View.VISIBLE); + + // authenticate the user + + fAuth.signInWithEmailAndPassword(email,password).addOnCompleteListener(new OnCompleteListener<AuthResult>() { + @Override + public void onComplete(@NonNull Task<AuthResult> task) { + if(task.isSuccessful()){ + Toast.makeText(Login.this, "Logged in Successfully", Toast.LENGTH_SHORT).show(); + startActivity(new Intent(getApplicationContext(),MainActivity.class)); + }else { + Toast.makeText(Login.this, "Error ! " + task.getException().getMessage(), Toast.LENGTH_SHORT).show(); + progressBar.setVisibility(View.GONE); + } + + } + }); + + } + }); + + mCreateBtn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + startActivity(new Intent(getApplicationContext(),Register.class)); + } + }); + + forgotTextLink.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + + final EditText resetMail = new EditText(v.getContext()); + final AlertDialog.Builder passwordResetDialog = new AlertDialog.Builder(v.getContext()); + passwordResetDialog.setTitle("Reset Password ?"); + passwordResetDialog.setMessage("Enter Your Email To Received Reset Link."); + passwordResetDialog.setView(resetMail); + + passwordResetDialog.setPositiveButton("Yes", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + // extract the email and send reset link + String mail = resetMail.getText().toString(); + fAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() { + @Override + public void onSuccess(Void aVoid) { + Toast.makeText(Login.this, "Reset Link Sent To Your Email.", Toast.LENGTH_SHORT).show(); + } + }).addOnFailureListener(new OnFailureListener() { + @Override + public void onFailure(@NonNull Exception e) { + Toast.makeText(Login.this, "Error ! Reset Link is Not Sent" + e.getMessage(), Toast.LENGTH_SHORT).show(); + } + }); + + } + }); + + passwordResetDialog.setNegativeButton("No", new DialogInterface.OnClickListener() { + @Override + public void onClick(DialogInterface dialog, int which) { + // close the dialog + } + }); + + passwordResetDialog.create().show(); + + } + }); + + + } +} diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/LostFragment.java b/Lost and found application/app/src/main/java/com/application/bufinder/LostFragment.java new file mode 100644 index 00000000..7c7aef0e --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/LostFragment.java @@ -0,0 +1,85 @@ +package com.application.bufinder; + +import android.content.Intent; +import android.os.Bundle; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Toast; + +import com.google.android.material.floatingactionbutton.FloatingActionButton; + +/** + * A simple {@link Fragment} subclass. + * Use the {@link LostFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class LostFragment extends Fragment { + + // TODO: Rename parameter arguments, choose names that match + // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + // TODO: Rename and change types of parameters + private String mParam1; + private String mParam2; + + public LostFragment() { + // Required empty public constructor + } + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param param1 Parameter 1. + * @param param2 Parameter 2. + * @return A new instance of fragment LostFragment. + */ + // TODO: Rename and change types and number of parameters + public static LostFragment newInstance(String param1, String param2) { + LostFragment fragment = new LostFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + + } + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, + ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_lost, container, false); + + FloatingActionButton fab = view.findViewById(R.id.floatingActionButton); + fab.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + + Intent i = new Intent(getContext(),Lost_Form.class); + startActivity(i); + + } + + }); + return view; + + + } + +} \ No newline at end of file diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/Lost_Form.java b/Lost and found application/app/src/main/java/com/application/bufinder/Lost_Form.java new file mode 100644 index 00000000..b208ef94 --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/Lost_Form.java @@ -0,0 +1,171 @@ +package com.application.bufinder; + +import androidx.appcompat.app.AppCompatActivity; + +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.Button; +import android.widget.Spinner; + +import com.application.bufinder.models.Journal; +import com.google.android.gms.tasks.OnSuccessListener; +import com.google.firebase.firestore.CollectionReference; +import com.google.firebase.firestore.DocumentReference; +import com.google.firebase.firestore.FirebaseFirestore; + +import java.util.ArrayList; +import java.util.Arrays; + +public class Lost_Form extends AppCompatActivity { + Button button1; + Spinner sp_item1, sp_sub1, sp_brand1, sp_colour1; + ArrayList<String> arrayList_item; + ArrayAdapter<String> arrayAdapter_item; + + private final FirebaseFirestore db = FirebaseFirestore.getInstance(); + + private final CollectionReference collectionReference = db.collection("Lost"); + + ArrayList<String> arrayList_ad; + ArrayList<String> arrayList_la; + ArrayList<String> arrayList_w; + ArrayList<String> arrayList_f; + ArrayList<String> arrayList_b; + ArrayList<String> arrayList_k; + ArrayList<String> arrayList_se; + ArrayList<String> arrayList_c; + ArrayAdapter<String> arrayAdapter_sub; + + ArrayList<String> arrayList_adb; + ArrayList<String> arrayList_lab; + ArrayList<String> arrayList_wb; + ArrayList<String> arrayList_fb; + ArrayList<String> arrayList_bb; + ArrayList<String> arrayList_kb; + ArrayList<String> arrayList_seb; + ArrayList<String> arrayList_cb; + ArrayAdapter<String> arrayAdapter_brand; + + ArrayList<String> arrayList_colour; + ArrayAdapter<String> arrayAdapter_colour; + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_lost_form); + sp_item1 = (Spinner) findViewById(R.id.sp_item1); + sp_sub1 = (Spinner) findViewById(R.id.sp_sub1); + sp_brand1 = (Spinner) findViewById(R.id.sp_brand1); + sp_colour1 = (Spinner) findViewById(R.id.sp_colour1); + button1 = findViewById(R.id.button1); + + arrayList_item = new ArrayList<>(Arrays.asList("Audio Devices","Laptop and Accessories","Wearables", "Footwear", "Bottles", "Keys", "Sports Equipment", "Any type of Card")); + arrayAdapter_item = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_item); + sp_item1.setAdapter(arrayAdapter_item); + + //======== ArrayList of Individual Sub types============= + arrayList_ad = new ArrayList<>(Arrays.asList("Select Sub-type", "Speakers", "Over-ear Headphones", "On-ear Headphones", "Collar Earphones", "Wired Earphones", "True Wireless Earphones", "Other")); + arrayList_la = new ArrayList<>(Arrays.asList("Select Sub-type", "Laptop", "Keyboard", "Mouse", "Storage Devices", "Charger", "Laptop Sleeve", "Other")); + arrayList_w = new ArrayList<>(Arrays.asList("Select Sub-type", "Spectacles", "Watches", "Jewellery", "Caps", "Mufflers", "Gloves", "Other")); + arrayList_f = new ArrayList<>(Arrays.asList("Select Sub-type","Shoes", "Slippers", "Sandals", "Other")); + arrayList_b = new ArrayList<>(Arrays.asList("Select Sub-type","Steel Bottles", "Gym Bottles", "Other")); + arrayList_k = new ArrayList<>(Arrays.asList("Select Sub-type","Car Keys", "Room Keys", "Locker Keys", "Other")); + arrayList_se = new ArrayList<>(Arrays.asList("Select Sub-type","Racquets", "Ball", "Shuttle Cock", "Other")); + arrayList_c = new ArrayList<>(Arrays.asList("Select Sub-type","Credit/Debit Cards", "ID Card", "Other")); + + //======== ArrayList of Individual Sub type's Brand============= + arrayList_adb = new ArrayList<>(Arrays.asList("Select Brand of Item","Bose", "Apple", "Boat", "Noise", "MI", "Realme","Other")); + arrayList_lab = new ArrayList<>(Arrays.asList("Select Brand of Item","HP", "Dell", "Apple", "Lenovo", "Other")); + arrayList_wb = new ArrayList<>(Arrays.asList("Select Brand of Item","Casio", "Titan Eye", "Oakley", "MI", "Apple","Titan","Rado", "G-Shock", "Other")); + arrayList_fb = new ArrayList<>(Arrays.asList("Select Brand of Item","Nike", "Adidas", "Reebok", "Sparx", "Campus", "Crocs", "Decathlon", "Other")); + arrayList_bb = new ArrayList<>(Arrays.asList("Select Brand of Item","Other")); + arrayList_kb = new ArrayList<>(Arrays.asList("Select Brand of Item","Other")); + arrayList_seb = new ArrayList<>(Arrays.asList("Select Brand of Item","Yonex", "Adidas", "Nike", "Puma", "Decathlon", "Cosco", "Other")); + arrayList_cb = new ArrayList<>(Arrays.asList("Select Brand of Item","HDFC", "UCO Bank", "Slice", "Bennett ID", "Other")); + + //======== ArrayList of Colours============= + arrayList_colour = new ArrayList<>(Arrays.asList("Select a base colour","Red", "Orange", "Pink", "Grey", "Black", "White", "Dark Green", "Light Green", "Yellow", "Light Blue", "Dark Blue", "Violet")); + + sp_item1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { + @Override + public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { + if(position == 0){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_ad); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_adb); + } + if(position == 1){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_la); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_lab); + } + if(position == 2){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_w); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_wb); + } + if(position == 3){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_f); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_fb); + } + if(position == 4){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_b); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_bb); + } + if(position == 5){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_k); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_kb); + } + if(position == 6){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_se); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_seb); + } + if(position == 7){ + arrayAdapter_sub = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_c); + arrayAdapter_brand = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_cb); + } + sp_sub1.setAdapter(arrayAdapter_sub); + sp_brand1.setAdapter(arrayAdapter_brand); + arrayAdapter_colour = new ArrayAdapter<>(getApplicationContext(), android.R.layout.simple_spinner_item, arrayList_colour); + sp_colour1.setAdapter(arrayAdapter_colour); + + } + + @Override + public void onNothingSelected(AdapterView<?> parent) { + + } + }); + + button1.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + saveItem(); + } + }); + + } + + private void saveItem() { + String Item1 = sp_item1.getSelectedItem().toString().trim(); + String Sub1 = sp_sub1.getSelectedItem().toString().trim(); + String Brand1 = sp_brand1.getSelectedItem().toString().trim(); + String Color1 = sp_colour1.getSelectedItem().toString().trim(); + + Journal journal = new Journal(); + journal.setItem(Item1); + journal.setSub(Sub1); + journal.setBrand(Brand1); + journal.setColor(Color1); + + collectionReference.add(journal) + .addOnSuccessListener(new OnSuccessListener<DocumentReference>() { + @Override + public void onSuccess(DocumentReference documentReference) { + Intent i1 = new Intent(Lost_Form.this,LostFragment.class); + startActivity(i1); + } + }); + } +} \ No newline at end of file diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/MainActivity.java b/Lost and found application/app/src/main/java/com/application/bufinder/MainActivity.java new file mode 100644 index 00000000..0a09ccd7 --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/MainActivity.java @@ -0,0 +1,52 @@ +package com.application.bufinder; + +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; + +import android.annotation.SuppressLint; +import android.os.Bundle; + +import com.application.bufinder.databinding.ActivityMainBinding; + +public class MainActivity extends AppCompatActivity { + + ActivityMainBinding binding; + + @SuppressLint("RestrictedApi") + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + binding = ActivityMainBinding.inflate(getLayoutInflater()); + setContentView(binding.getRoot()); + replaceFragment(new LostFragment()); + + binding.bottomNavigationView.setOnNavigationItemSelectedListener(item -> { + + switch(item.getItemId()) { + case R.id.lost: + replaceFragment(new LostFragment()); + break; + case R.id.found: + replaceFragment(new FoundFragment()); + break; + case R.id.settings: + replaceFragment(new SettingsFragment()); + break; + } + getSupportActionBar().setDefaultDisplayHomeAsUpEnabled(true); + getSupportActionBar().setIcon(R.drawable.ic_action_name); + + + return true; + }); + } + private void replaceFragment(Fragment fragment){ + + FragmentManager fragmentManager=getSupportFragmentManager(); + FragmentTransaction fragmentTransaction = ((FragmentManager) fragmentManager).beginTransaction(); + fragmentTransaction.replace(R.id.frame_layout,fragment); + fragmentTransaction.commit(); + + }} \ No newline at end of file diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/Register.java b/Lost and found application/app/src/main/java/com/application/bufinder/Register.java new file mode 100644 index 00000000..164c500f --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/Register.java @@ -0,0 +1,149 @@ +package com.application.bufinder; + +import android.content.Intent; +import android.os.Bundle; +import android.text.TextUtils; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.ProgressBar; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; + +import com.google.android.gms.tasks.OnCompleteListener; +import com.google.android.gms.tasks.OnFailureListener; +import com.google.android.gms.tasks.OnSuccessListener; +import com.google.android.gms.tasks.Task; +import com.google.firebase.auth.AuthResult; +import com.google.firebase.auth.FirebaseAuth; +import com.google.firebase.auth.FirebaseUser; +import com.google.firebase.firestore.DocumentReference; +import com.google.firebase.firestore.FirebaseFirestore; + +import java.util.HashMap; +import java.util.Map; + +public class Register extends AppCompatActivity { + public static final String TAG = "TAG"; + EditText mFullName,mEmail,mPassword,mPhone; + Button mRegisterBtn; + TextView mLoginBtn; + FirebaseAuth fAuth; + ProgressBar progressBar; + FirebaseFirestore fStore; + String userID; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_register); + + mFullName = findViewById(R.id.fullName); + mEmail = findViewById(R.id.Email); + mPassword = findViewById(R.id.password); + mPhone = findViewById(R.id.phone); + mRegisterBtn= findViewById(R.id.registerBtn); + mLoginBtn = findViewById(R.id.createText); + + fAuth = FirebaseAuth.getInstance(); + fStore = FirebaseFirestore.getInstance(); + progressBar = findViewById(R.id.progressBar); + + if(fAuth.getCurrentUser() != null){ + startActivity(new Intent(getApplicationContext(),MainActivity.class)); + finish(); + } + + + mRegisterBtn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + final String email = mEmail.getText().toString().trim(); + String password = mPassword.getText().toString().trim(); + final String fullName = mFullName.getText().toString(); + final String phone = mPhone.getText().toString(); + String namee = email; + + if(TextUtils.isEmpty(email)){ + mEmail.setError("Email is Required."); + return; + } + + if(TextUtils.isEmpty(password)){ + mPassword.setError("Password is Required."); + return; + } + + if(password.length() < 6){ + mPassword.setError("Password Must be >= 6 Characters"); + return; + } + + progressBar.setVisibility(View.VISIBLE); + + // register the user in firebase + + fAuth.createUserWithEmailAndPassword(email,password).addOnCompleteListener(new OnCompleteListener<AuthResult>() { + @Override + public void onComplete(@NonNull Task<AuthResult> task) { + if(task.isSuccessful()){ + + // send verification link + + FirebaseUser fuser = fAuth.getCurrentUser(); + fuser.sendEmailVerification().addOnSuccessListener(new OnSuccessListener<Void>() { + @Override + public void onSuccess(Void aVoid) { + Toast.makeText(Register.this, "Verification Email Has been Sent.", Toast.LENGTH_SHORT).show(); + } + }).addOnFailureListener(new OnFailureListener() { + @Override + public void onFailure(@NonNull Exception e) { + Log.d(TAG, "onFailure: Email not sent " + e.getMessage()); + } + }); + + Toast.makeText(Register.this, "User Created.", Toast.LENGTH_SHORT).show(); + userID = fAuth.getCurrentUser().getUid(); + DocumentReference documentReference = fStore.collection("users").document(userID); + Map<String,Object> user = new HashMap<>(); + user.put("fName",fullName); + user.put("email",email); + user.put("phone",phone); + documentReference.set(user).addOnSuccessListener(new OnSuccessListener<Void>() { + @Override + public void onSuccess(Void aVoid) { + Log.d(TAG, "onSuccess: user Profile is created for "+ userID); + } + }).addOnFailureListener(new OnFailureListener() { + @Override + public void onFailure(@NonNull Exception e) { + Log.d(TAG, "onFailure: " + e.toString()); + } + }); + startActivity(new Intent(getApplicationContext(),MainActivity.class)); + + }else { + Toast.makeText(Register.this, "Error ! " + task.getException().getMessage(), Toast.LENGTH_SHORT).show(); + progressBar.setVisibility(View.GONE); + } + } + }); + } + }); + + + + mLoginBtn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + startActivity(new Intent(getApplicationContext(),Login.class)); + } + }); + + } +} diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/SettingsFragment.java b/Lost and found application/app/src/main/java/com/application/bufinder/SettingsFragment.java new file mode 100644 index 00000000..a15e83f2 --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/SettingsFragment.java @@ -0,0 +1,129 @@ +package com.application.bufinder; +//package com.dataflair.foundandlost.Fragments; + +import android.content.Intent; +import android.os.Bundle; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; +import android.widget.TextView; + +import com.application.bufinder.Login; +import com.application.bufinder.R; +import com.google.android.gms.auth.api.signin.GoogleSignIn; +import com.google.android.gms.auth.api.signin.GoogleSignInAccount; +import com.google.android.gms.auth.api.signin.GoogleSignInClient; +import com.google.android.gms.auth.api.signin.GoogleSignInOptions; +import com.google.android.gms.tasks.OnCompleteListener; +import com.google.android.gms.tasks.Task; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.firebase.auth.FirebaseAuth; +import com.squareup.picasso.Picasso; + +import de.hdodenhof.circleimageview.CircleImageView; + +public class SettingsFragment extends Fragment { + + CircleImageView imageView; + TextView userName; + Button signOutBtn,button; + + private static final String ARG_PARAM1 = "param1"; + private static final String ARG_PARAM2 = "param2"; + + private String mParam1; + private String mParam2; + + public SettingsFragment() { + // Required empty public constructor + } + + public static SettingsFragment newInstance(String param1, String param2) { + SettingsFragment fragment = new SettingsFragment(); + Bundle args = new Bundle(); + args.putString(ARG_PARAM1, param1); + args.putString(ARG_PARAM2, param2); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (getArguments() != null) { + mParam1 = getArguments().getString(ARG_PARAM1); + mParam2 = getArguments().getString(ARG_PARAM2); + } + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + View view = inflater.inflate(R.layout.fragment_settings, container, false); + + imageView = (CircleImageView) view.findViewById(R.id.ProfilePic); + userName = (TextView) view.findViewById(R.id.UserNameTxt); + signOutBtn = (Button) view.findViewById(R.id.SignOutBtn); + + //Getting user detials from GoogleSignin + GoogleSignInAccount acct = GoogleSignIn.getLastSignedInAccount(getActivity()); + if (acct != null) { + userName.setText(acct.getDisplayName()); + Picasso.get().load(acct.getPhotoUrl()).into(imageView); + } + + + //implementing onClickListener to make the user signOut + signOutBtn.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + GoogleSignInOptions gso = new GoogleSignInOptions. + Builder(GoogleSignInOptions.DEFAULT_SIGN_IN). + build(); + + //GoogleSignInClient to access the current user + GoogleSignInClient googleSignInClient = GoogleSignIn.getClient(getActivity(), gso); + googleSignInClient.signOut().addOnCompleteListener(new OnCompleteListener<Void>() { + @Override + public void onComplete(@NonNull Task<Void> task) { + if (task.isSuccessful()) { + //User Signout + FirebaseAuth.getInstance().signOut(); + + //Redirecting to starting Activity + Intent intent = new Intent(getContext(), Login.class); + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); + startActivity(intent); + + } + + } + }); + + + } + + + + }); + + Button button = view.findViewById(R.id.button); + button.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent i = new Intent(getContext(), EditProfile.class); + startActivity(i); + } + + }); + + + return view; + } +} \ No newline at end of file diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/models/Journal.java b/Lost and found application/app/src/main/java/com/application/bufinder/models/Journal.java new file mode 100644 index 00000000..f3e61fb8 --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/models/Journal.java @@ -0,0 +1,51 @@ +package com.application.bufinder.models; + +public class Journal { + private String Item; + private String Sub; + private String Brand; + private String Color; + + public Journal() { + } + + public Journal(String item, String sub, String brand, String color) { + Item = item; + Sub = sub; + Brand = brand; + Color = color; + } + + + public String getItem() { + return Item; + } + + public void setItem(String item) { + Item = item; + } + + public String getSub() { + return Sub; + } + + public void setSub(String sub) { + Sub = sub; + } + + public String getBrand() { + return Brand; + } + + public void setBrand(String brand) { + Brand = brand; + } + + public String getColor() { + return Color; + } + + public void setColor(String color) { + Color = color; + } +} \ No newline at end of file diff --git a/Lost and found application/app/src/main/java/com/application/bufinder/util/JournalApi.java b/Lost and found application/app/src/main/java/com/application/bufinder/util/JournalApi.java new file mode 100644 index 00000000..be4f0da5 --- /dev/null +++ b/Lost and found application/app/src/main/java/com/application/bufinder/util/JournalApi.java @@ -0,0 +1,35 @@ +package com.application.bufinder.util; + +import android.app.Application; + +public class JournalApi extends Application { + private static JournalApi instance; + private String username; + private String userId; + + public JournalApi() { + } + + public static JournalApi getInstance() { + if (instance == null) + instance = new JournalApi(); + return instance; + + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } +} diff --git a/Lost and found application/app/src/main/res/1024.png b/Lost and found application/app/src/main/res/1024.png new file mode 100644 index 00000000..a105022d Binary files /dev/null and b/Lost and found application/app/src/main/res/1024.png differ diff --git a/Lost and found application/app/src/main/res/drawable-hdpi/ic_action_name.png b/Lost and found application/app/src/main/res/drawable-hdpi/ic_action_name.png new file mode 100644 index 00000000..91443c5e Binary files /dev/null and b/Lost and found application/app/src/main/res/drawable-hdpi/ic_action_name.png differ diff --git a/Lost and found application/app/src/main/res/drawable-mdpi/ic_action_name.png b/Lost and found application/app/src/main/res/drawable-mdpi/ic_action_name.png new file mode 100644 index 00000000..2dd544eb Binary files /dev/null and b/Lost and found application/app/src/main/res/drawable-mdpi/ic_action_name.png differ diff --git a/Lost and found application/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/Lost and found application/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 00000000..2b068d11 --- /dev/null +++ b/Lost and found application/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/drawable-xhdpi/ic_action_name.png b/Lost and found application/app/src/main/res/drawable-xhdpi/ic_action_name.png new file mode 100644 index 00000000..ae10913d Binary files /dev/null and b/Lost and found application/app/src/main/res/drawable-xhdpi/ic_action_name.png differ diff --git a/Lost and found application/app/src/main/res/drawable-xxhdpi/ic_action_name.png b/Lost and found application/app/src/main/res/drawable-xxhdpi/ic_action_name.png new file mode 100644 index 00000000..db2de777 Binary files /dev/null and b/Lost and found application/app/src/main/res/drawable-xxhdpi/ic_action_name.png differ diff --git a/Lost and found application/app/src/main/res/drawable-xxxhdpi/ic_action_name.png b/Lost and found application/app/src/main/res/drawable-xxxhdpi/ic_action_name.png new file mode 100644 index 00000000..349c7300 Binary files /dev/null and b/Lost and found application/app/src/main/res/drawable-xxxhdpi/ic_action_name.png differ diff --git a/Lost and found application/app/src/main/res/drawable/clipart911540.png b/Lost and found application/app/src/main/res/drawable/clipart911540.png new file mode 100644 index 00000000..142ace54 Binary files /dev/null and b/Lost and found application/app/src/main/res/drawable/clipart911540.png differ diff --git a/Lost and found application/app/src/main/res/drawable/ic_baseline_add_24.xml b/Lost and found application/app/src/main/res/drawable/ic_baseline_add_24.xml new file mode 100644 index 00000000..7938e558 --- /dev/null +++ b/Lost and found application/app/src/main/res/drawable/ic_baseline_add_24.xml @@ -0,0 +1,5 @@ +<vector android:height="28dp" android:tint="#FFFFFF" + android:viewportHeight="24" android:viewportWidth="24" + android:width="28dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/> +</vector> diff --git a/Lost and found application/app/src/main/res/drawable/ic_baseline_add_241.xml b/Lost and found application/app/src/main/res/drawable/ic_baseline_add_241.xml new file mode 100644 index 00000000..70046c48 --- /dev/null +++ b/Lost and found application/app/src/main/res/drawable/ic_baseline_add_241.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#FFFFFF" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/> +</vector> diff --git a/Lost and found application/app/src/main/res/drawable/ic_baseline_arrow_drop_up_24.xml b/Lost and found application/app/src/main/res/drawable/ic_baseline_arrow_drop_up_24.xml new file mode 100644 index 00000000..10c5932c --- /dev/null +++ b/Lost and found application/app/src/main/res/drawable/ic_baseline_arrow_drop_up_24.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#000000" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M7,14l5,-5 5,5z"/> +</vector> diff --git a/Lost and found application/app/src/main/res/drawable/ic_baseline_person_24.xml b/Lost and found application/app/src/main/res/drawable/ic_baseline_person_24.xml new file mode 100644 index 00000000..98730cd9 --- /dev/null +++ b/Lost and found application/app/src/main/res/drawable/ic_baseline_person_24.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#000000" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M12,12c2.21,0 4,-1.79 4,-4s-1.79,-4 -4,-4 -4,1.79 -4,4 1.79,4 4,4zM12,14c-2.67,0 -8,1.34 -8,4v2h16v-2c0,-2.66 -5.33,-4 -8,-4z"/> +</vector> diff --git a/Lost and found application/app/src/main/res/drawable/ic_baseline_search_24.xml b/Lost and found application/app/src/main/res/drawable/ic_baseline_search_24.xml new file mode 100644 index 00000000..a5687c63 --- /dev/null +++ b/Lost and found application/app/src/main/res/drawable/ic_baseline_search_24.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#000000" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M15.5,14h-0.79l-0.28,-0.27C15.41,12.59 16,11.11 16,9.5 16,5.91 13.09,3 9.5,3S3,5.91 3,9.5 5.91,16 9.5,16c1.61,0 3.09,-0.59 4.23,-1.57l0.27,0.28v0.79l5,4.99L20.49,19l-4.99,-5zM9.5,14C7.01,14 5,11.99 5,9.5S7.01,5 9.5,5 14,7.01 14,9.5 11.99,14 9.5,14z"/> +</vector> diff --git a/Lost and found application/app/src/main/res/drawable/ic_baseline_settings_24.xml b/Lost and found application/app/src/main/res/drawable/ic_baseline_settings_24.xml new file mode 100644 index 00000000..298a5a1f --- /dev/null +++ b/Lost and found application/app/src/main/res/drawable/ic_baseline_settings_24.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#000000" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/> +</vector> diff --git a/Lost and found application/app/src/main/res/drawable/ic_baseline_shopping_bag_24.xml b/Lost and found application/app/src/main/res/drawable/ic_baseline_shopping_bag_24.xml new file mode 100644 index 00000000..208d4f2a --- /dev/null +++ b/Lost and found application/app/src/main/res/drawable/ic_baseline_shopping_bag_24.xml @@ -0,0 +1,5 @@ +<vector android:height="24dp" android:tint="#000000" + android:viewportHeight="24" android:viewportWidth="24" + android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:fillColor="@android:color/white" android:pathData="M18,6h-2c0,-2.21 -1.79,-4 -4,-4S8,3.79 8,6H6C4.9,6 4,6.9 4,8v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V8C20,6.9 19.1,6 18,6zM10,10c0,0.55 -0.45,1 -1,1s-1,-0.45 -1,-1V8h2V10zM12,4c1.1,0 2,0.9 2,2h-4C10,4.9 10.9,4 12,4zM16,10c0,0.55 -0.45,1 -1,1s-1,-0.45 -1,-1V8h2V10z"/> +</vector> diff --git a/Lost and found application/app/src/main/res/drawable/ic_launcher_background.xml b/Lost and found application/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000..07d5da9c --- /dev/null +++ b/Lost and found application/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/Lost and found application/app/src/main/res/layout/activity_edit_profile.xml b/Lost and found application/app/src/main/res/layout/activity_edit_profile.xml new file mode 100644 index 00000000..f523cd8a --- /dev/null +++ b/Lost and found application/app/src/main/res/layout/activity_edit_profile.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".EditProfile"> + + <EditText + android:id="@+id/profileFullName" + android:layout_width="362dp" + android:layout_height="47dp" + android:layout_marginStart="24dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + android:ems="10" + android:hint="Your Name" + android:inputType="textPersonName" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/profileImageView" /> + + <ImageView + android:id="@+id/profileImageView" + android:layout_width="131dp" + android:layout_height="143dp" + android:layout_marginTop="136dp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:srcCompat="@drawable/ic_baseline_person_24" /> + + <EditText + android:id="@+id/profileEmailAddress" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="24dp" + android:ems="10" + android:hint="Your Email Address" + android:inputType="textEmailAddress" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/profileFullName" /> + + <EditText + android:id="@+id/profilePhoneNo" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="24dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="24dp" + android:ems="10" + android:inputType="phone" + android:hint="Phone" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/profileEmailAddress" /> + + <Button + android:id="@+id/saveProfileInfo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="16dp" + android:text="Save" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" /> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/layout/activity_found_form.xml b/Lost and found application/app/src/main/res/layout/activity_found_form.xml new file mode 100644 index 00000000..420919ba --- /dev/null +++ b/Lost and found application/app/src/main/res/layout/activity_found_form.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="#FFFFFF" + android:orientation="vertical" + android:padding="20dp" + tools:context=".Found_Form"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="serif" + android:text="Item Details" + android:textColor="#9F000000" + android:textSize="34sp" + android:textStyle="bold" /> + + + <TextView + + android:id="@+id/tv_item" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="100dp" + android:fontFamily="serif" + android:text="Item Type" + android:textColor="#9F000000" + android:textSize="20sp" + android:textStyle="bold" + /> + + <Spinner + android:id="@+id/sp_item" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10sp" /> + + <TextView + android:id="@+id/tv_sub" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:fontFamily="serif" + android:text="Sub-type" + android:textColor="#9F000000" + android:textSize="20sp" + android:textStyle="bold" + + /> + + + <Spinner + android:id="@+id/sp_sub" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" /> + + <TextView + android:id="@+id/tv_brand" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:fontFamily="serif" + android:text="Brand" + android:textColor="#9F000000" + android:textSize="20sp" + android:textStyle="bold" + + /> + + + <Spinner + android:id="@+id/sp_brand" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" /> + + <TextView + android:id="@+id/tv_colour" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:fontFamily="serif" + android:text="Colour" + android:textColor="#9F000000" + android:textSize="20sp" + android:textStyle="bold" + + /> + + + <Spinner + android:id="@+id/sp_colour" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" /> + + <Button + android:id="@+id/button" + android:layout_marginTop="50dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Submit" /> + +</LinearLayout> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/layout/activity_login.xml b/Lost and found application/app/src/main/res/layout/activity_login.xml new file mode 100644 index 00000000..36e750ce --- /dev/null +++ b/Lost and found application/app/src/main/res/layout/activity_login.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/white" + tools:context=".Login"> + + <EditText + android:id="@+id/Email" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="452dp" + android:background="@color/white" + android:ems="10" + android:hint="Email" + android:inputType="textEmailAddress" + android:padding="10dp" + android:textColor="@color/black" + android:textColorHint="@color/black" + android:textSize="14sp" + android:textStyle="bold" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" /> + + <EditText + android:id="@+id/password" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + android:background="@color/white" + android:ems="10" + android:hint="Password" + android:inputType="textPassword" + android:padding="10dp" + android:textColor="@color/black" + android:textColorHint="@color/black" + android:textSize="14sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/Email" /> + + <Button + android:id="@+id/loginBtn" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="52dp" + android:layout_marginEnd="16dp" + + android:text="Login" + android:textSize="13sp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/password" /> + + <TextView + android:id="@+id/createText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="20dp" + android:text="New Here? Create Account" + android:textColor="@color/black" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/loginBtn" /> + + <ProgressBar + android:id="@+id/progressBar" + style="?android:attr/progressBarStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="invisible" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/createText" + app:layout_constraintVertical_bias="0.39" /> + + <TextView + android:id="@+id/forgotPassword" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:text="Forgot Password?" + android:textColor="#EB2B9ED1" + android:textStyle="bold" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.945" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/createText" + app:layout_constraintVertical_bias="0.068" /> + + <ImageView + android:id="@+id/imageView" + android:layout_width="313dp" + android:layout_height="140dp" + app:layout_constraintBottom_toTopOf="@+id/Email" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.238" + app:srcCompat="@drawable/clipart911540" /> +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/layout/activity_lost_form.xml b/Lost and found application/app/src/main/res/layout/activity_lost_form.xml new file mode 100644 index 00000000..372dbe03 --- /dev/null +++ b/Lost and found application/app/src/main/res/layout/activity_lost_form.xml @@ -0,0 +1,108 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="#FFFFFF" + android:orientation="vertical" + android:padding="20dp" + tools:context=".Lost_Form"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:fontFamily="serif" + android:text="Item Details" + android:textColor="#9F000000" + android:textSize="34sp" + android:textStyle="bold" /> + + + <TextView + + android:id="@+id/tv_item1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="100dp" + android:fontFamily="serif" + android:text="Item Type" + android:textColor="#9F000000" + android:textSize="20sp" + android:textStyle="bold" + /> + + <Spinner + android:id="@+id/sp_item1" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10sp" /> + + <TextView + android:id="@+id/tv_sub1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:fontFamily="serif" + android:text="Sub-type" + android:textColor="#9F000000" + android:textSize="20sp" + android:textStyle="bold" + + /> + + + <Spinner + android:id="@+id/sp_sub1" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" /> + + <TextView + android:id="@+id/tv_brand1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:fontFamily="serif" + android:text="Brand" + android:textColor="#9F000000" + android:textSize="20sp" + android:textStyle="bold" + + /> + + + <Spinner + android:id="@+id/sp_brand1" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" /> + + <TextView + android:id="@+id/tv_colour1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:fontFamily="serif" + android:text="Colour" + android:textColor="#9F000000" + android:textSize="20sp" + android:textStyle="bold" + + /> + + + <Spinner + android:id="@+id/sp_colour1" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" /> + + <Button + android:id="@+id/button1" + android:layout_marginTop="50dp" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="Submit" /> + +</LinearLayout> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/layout/activity_main.xml b/Lost and found application/app/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000..2df0d4c5 --- /dev/null +++ b/Lost and found application/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <FrameLayout + android:id="@+id/frame_layout" + android:layout_width="0dp" + android:layout_height="0dp" + app:layout_constraintBottom_toTopOf="@+id/bottomNavigationView" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + </FrameLayout> + + <com.google.android.material.bottomnavigation.BottomNavigationView + android:id="@+id/bottomNavigationView" + android:layout_width="match_parent" + android:layout_height="wrap_content" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:menu="@menu/bottom_nav_menu"/> +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/layout/activity_register.xml b/Lost and found application/app/src/main/res/layout/activity_register.xml new file mode 100644 index 00000000..56672d13 --- /dev/null +++ b/Lost and found application/app/src/main/res/layout/activity_register.xml @@ -0,0 +1,152 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@color/white" + tools:context=".Register"> + + <EditText + android:id="@+id/fullName" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + android:background="@color/white" + + android:ems="10" + android:hint="Full Name" + android:inputType="textPersonName" + android:padding="10dp" + android:textColor="@color/black" + android:textColorHint="@color/black" + android:textSize="14sp" + android:textStyle="bold" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.304" /> + + <EditText + android:id="@+id/Email" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + android:background="@color/white" + android:ems="10" + android:hint="Email" + + android:inputType="textEmailAddress" + android:padding="10dp" + android:textColor="@color/black" + android:textColorHint="@color/black" + android:textSize="14sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/fullName" /> + + + <EditText + android:id="@+id/phone" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + android:background="@color/white" + android:ems="10" + android:hint="Phone No." + android:inputType="textPhonetic" + + android:padding="10dp" + android:textColor="@color/black" + android:textColorHint="@color/black" + android:textSize="14sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/Email" /> + + <EditText + android:id="@+id/password" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + android:background="@color/white" + android:ems="10" + android:hint="Password" + android:inputType="textPassword" + + android:padding="10dp" + android:textColor="@color/black" + android:textColorHint="@color/black" + android:textSize="14sp" + android:textStyle="bold" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.498" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/phone" /> + + <Button + android:id="@+id/registerBtn" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginStart="16dp" + android:layout_marginTop="68dp" + android:layout_marginEnd="16dp" + + android:text="Register" + android:textSize="13sp" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/password" /> + + <ProgressBar + android:id="@+id/progressBar" + style="?android:attr/progressBarStyle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:visibility="invisible" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/createText" + app:layout_constraintVertical_bias="0.26" /> + + <TextView + android:id="@+id/createText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:text="Already Registered? Login Here" + android:textColor="#DD3730" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/registerBtn" + app:layout_constraintVertical_bias="0.0" /> + + <ImageView + android:id="@+id/imageView" + android:layout_width="313dp" + android:layout_height="140dp" + app:layout_constraintBottom_toTopOf="@+id/Email" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.5" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.238" + app:srcCompat="@drawable/clipart911540" /> + + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/layout/fragment_found.xml b/Lost and found application/app/src/main/res/layout/fragment_found.xml new file mode 100644 index 00000000..67beaf73 --- /dev/null +++ b/Lost and found application/app/src/main/res/layout/fragment_found.xml @@ -0,0 +1,157 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="#E6D5D5" + tools:context=".FoundFragment"> + + <RelativeLayout + android:id="@+id/relative" + android:layout_width="match_parent" + android:layout_height="110dp" + android:layout_alignParentTop="true"> + + + <!-- <TextView--> + <!-- android:id="@+id/distHelp"--> + <!-- android:layout_width="match_parent"--> + <!-- android:layout_height="wrap_content"--> + <!-- android:layout_alignParentTop="true"--> + <!-- android:layout_marginTop="10dp"--> + <!-- android:layout_toStartOf="@id/more"--> + <!-- android:text="Displayed Requests from ALL districts.\nTo change DISTRICT edit below."--> + <!-- android:textAlignment="center"--> + <!-- android:textSize="12sp" />--> + + + <LinearLayout + android:id="@+id/dist" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + + android:layout_centerHorizontal="true" + android:layout_marginTop="5dp" + android:orientation="horizontal" + tools:ignore="NotSibling"> + + <!-- <TextView--> + <!-- android:layout_width="wrap_content"--> + <!-- android:layout_height="wrap_content"--> + <!-- android:layout_marginEnd="5dp"--> + <!-- android:background="@drawable/square_border"--> + <!-- android:backgroundTint="#FAF5E4"--> + <!-- android:padding="10dp"--> + <!-- android:text="District"--> + <!-- android:textSize="12sp" />--> + + <!-- <EditText--> + <!-- android:id="@+id/districtFilterRequest"--> + <!-- android:layout_width="100dp"--> + <!-- android:layout_height="wrap_content"--> + <!-- android:background="@drawable/square_border"--> + <!-- android:backgroundTint="#FAF5E4"--> + <!-- android:imeActionLabel=""--> + <!-- android:imeOptions="actionDone"--> + <!-- android:inputType="textCapCharacters"--> + <!-- android:padding="10dp"--> + <!-- android:text="ALL"--> + <!-- android:textAlignment="center"--> + <!-- android:textSize="12sp" />--> + + </LinearLayout> + + + <!-- <TextView--> + <!-- android:layout_width="match_parent"--> + <!-- android:layout_height="wrap_content"--> + <!-- android:layout_below="@id/dist"--> + <!-- android:layout_alignParentBottom="true"--> + <!-- android:layout_marginBottom="5dp"--> + <!-- android:layout_toStartOf="@id/more"--> + <!-- android:clickable="true"--> + <!-- android:contextClickable="true"--> + <!-- android:ellipsize="marquee"--> + <!-- android:focusable="true"--> + <!-- android:focusableInTouchMode="true"--> + <!-- android:fontFamily="@font/varela_round"--> + <!-- android:marqueeRepeatLimit="marquee_forever"--> + <!-- android:singleLine="true"--> + <!-- android:text="If you can help them make CALL or SHARE."--> + <!-- android:textAlignment="center" />--> + + <!-- <ImageView--> + <!-- android:id="@+id/more"--> + <!-- android:layout_width="wrap_content"--> + <!-- android:layout_height="match_parent"--> + <!-- android:layout_alignParentEnd="true"--> + <!-- android:layout_marginEnd="10dp"--> + <!-- android:onClick="popUp"--> + <!-- android:src="@drawable/ic_baseline_more_vert_24"--> + <!-- android:tooltipText="More" />--> + + </RelativeLayout> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/requestList" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_above="@id/relative1" + android:layout_below="@id/relative" /> + + <RelativeLayout + android:id="@+id/relative1" + android:layout_width="match_parent" + android:layout_height="110dp" + android:layout_alignParentBottom="true" + android:layout_marginStart="20dp" + android:layout_marginEnd="20dp" + app:layout_constraintBottom_toBottomOf="parent"> + + <!-- <com.google.android.material.button.MaterialButton--> + + <!-- android:id="@+id/btnAddRequest"--> + <!-- android:layout_width="match_parent"--> + <!-- android:layout_height="50dp"--> + <!-- android:layout_above="@id/btnViewDonors"--> + <!-- android:onClick="requestBlood"--> + <!-- android:text="Request Blood"--> + <!-- android:textAllCaps="false"--> + <!-- app:backgroundTint="#EA5050" />--> + + <!-- <com.google.android.material.button.MaterialButton--> + <!-- android:id="@+id/btnViewDonors"--> + <!-- android:layout_width="match_parent"--> + <!-- android:layout_height="50dp"--> + <!-- android:layout_alignParentBottom="true"--> + <!-- android:onClick="viewDonorsList"--> + <!-- android:text="View Donors"--> + <!-- android:textAllCaps="false"--> + <!-- app:backgroundTint="#6FAFE3" />--> + + </RelativeLayout> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" + tools:context=".FoundFragment"> + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/floatingActionButton1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="bottom|right" + android:layout_marginRight="25dp" + android:layout_marginBottom="25dp" + android:clickable="true" + android:elevation="8dp" + android:onClick="newplus" + android:src="@drawable/ic_baseline_add_241" + app:backgroundTint="@color/purple_200" + app:rippleColor="#FFFFFF" + tools:ignore="ContentDescription" /> + +</FrameLayout> +</RelativeLayout> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/layout/fragment_lost.xml b/Lost and found application/app/src/main/res/layout/fragment_lost.xml new file mode 100644 index 00000000..0434307d --- /dev/null +++ b/Lost and found application/app/src/main/res/layout/fragment_lost.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".LostFragment"> + + + <com.google.android.material.floatingactionbutton.FloatingActionButton + android:id="@+id/floatingActionButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="bottom|right" + android:clickable="true" + android:src="@drawable/ic_baseline_add_24" + app:backgroundTint="@color/purple_200" + tools:ignore="ContentDescription" + android:layout_marginRight="25dp" + android:layout_marginBottom="25dp"/> + + + + +</FrameLayout> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/layout/fragment_settings.xml b/Lost and found application/app/src/main/res/layout/fragment_settings.xml new file mode 100644 index 00000000..938369c1 --- /dev/null +++ b/Lost and found application/app/src/main/res/layout/fragment_settings.xml @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="utf-8"?> +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto" + tools:context=".SettingsFragment"> + + <!-- TODO: Update blank fragment layout --> + <androidx.cardview.widget.CardView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="10dp" + app:cardCornerRadius="20dp"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="horizontal"> + + + <de.hdodenhof.circleimageview.CircleImageView + android:id="@+id/ProfilePic" + android:layout_width="100dp" + android:layout_height="100dp" + android:src="@drawable/ic_baseline_person_24" /> + + + <TextView + android:id="@+id/UserNameTxt" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_margin="10dp" + android:text="User Name" + android:textSize="25dp" + android:textStyle="bold" /> + + </LinearLayout> + + + <Button + android:id="@+id/SignOutBtn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center" + android:layout_margin="10dp" + android:text="Sign Out" /> + + + </LinearLayout> + + + </androidx.cardview.widget.CardView> + + <Button + android:id="@+id/button" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center" + android:text="Edit Profile" + android:layout_marginBottom="20dp" + android:layout_marginTop="250dp" + android:layout_marginLeft="120dp"/> + +</FrameLayout> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/menu/bottom_nav_menu.xml b/Lost and found application/app/src/main/res/menu/bottom_nav_menu.xml new file mode 100644 index 00000000..7669e77a --- /dev/null +++ b/Lost and found application/app/src/main/res/menu/bottom_nav_menu.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + + <item + android:id="@+id/lost" + android:icon="@drawable/ic_baseline_search_24" + android:title="Lost" /> + + <item + android:id="@+id/found" + android:icon="@drawable/ic_baseline_shopping_bag_24" + android:title="Found" /> + + <item + android:id="@+id/settings" + android:icon="@drawable/ic_baseline_settings_24" + android:title="Settings" /> + +</menu> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/Lost and found application/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..90f95809 --- /dev/null +++ b/Lost and found application/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@mipmap/ic_launcher_adaptive_back"/> + <foreground android:drawable="@mipmap/ic_launcher_adaptive_fore"/> +</adaptive-icon> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/Lost and found application/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..43c4175d --- /dev/null +++ b/Lost and found application/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@mipmap/ic_launcher_round_adaptive_back"/> + <foreground android:drawable="@mipmap/ic_launcher_round_adaptive_fore"/> +</adaptive-icon> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..58206eed Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png new file mode 100644 index 00000000..6bc3439d Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_back.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png new file mode 100644 index 00000000..5d20df3d Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_adaptive_fore.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..59b4bb09 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_round_adaptive_back.png b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_round_adaptive_back.png new file mode 100644 index 00000000..6bc3439d Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_round_adaptive_back.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_round_adaptive_fore.png b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_round_adaptive_fore.png new file mode 100644 index 00000000..5d20df3d Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-hdpi/ic_launcher_round_adaptive_fore.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..fe23a391 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png new file mode 100644 index 00000000..3f44c77b Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_back.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png new file mode 100644 index 00000000..ba77a32c Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_adaptive_fore.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..e9c98d4c Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_round_adaptive_back.png b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_round_adaptive_back.png new file mode 100644 index 00000000..3f44c77b Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_round_adaptive_back.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_round_adaptive_fore.png b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_round_adaptive_fore.png new file mode 100644 index 00000000..ba77a32c Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-mdpi/ic_launcher_round_adaptive_fore.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..70a3d3a1 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png new file mode 100644 index 00000000..31cc7dd3 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_back.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png new file mode 100644 index 00000000..aaf1791d Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_adaptive_fore.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..481dbf72 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_round_adaptive_back.png b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_round_adaptive_back.png new file mode 100644 index 00000000..31cc7dd3 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_round_adaptive_back.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_round_adaptive_fore.png b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_round_adaptive_fore.png new file mode 100644 index 00000000..aaf1791d Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xhdpi/ic_launcher_round_adaptive_fore.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..f32a939d Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png new file mode 100644 index 00000000..d12abf60 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_back.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png new file mode 100644 index 00000000..69ce77a3 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_adaptive_fore.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..8971523d Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_round_adaptive_back.png b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_round_adaptive_back.png new file mode 100644 index 00000000..d12abf60 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_round_adaptive_back.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_round_adaptive_fore.png b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_round_adaptive_fore.png new file mode 100644 index 00000000..69ce77a3 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxhdpi/ic_launcher_round_adaptive_fore.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..9086dd93 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png new file mode 100644 index 00000000..b18259c2 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_back.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png new file mode 100644 index 00000000..539c4f8e Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_adaptive_fore.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..78d20b81 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round_adaptive_back.png b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round_adaptive_back.png new file mode 100644 index 00000000..b18259c2 Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round_adaptive_back.png differ diff --git a/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round_adaptive_fore.png b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round_adaptive_fore.png new file mode 100644 index 00000000..539c4f8e Binary files /dev/null and b/Lost and found application/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round_adaptive_fore.png differ diff --git a/Lost and found application/app/src/main/res/play_store_512.png b/Lost and found application/app/src/main/res/play_store_512.png new file mode 100644 index 00000000..6f3c386b Binary files /dev/null and b/Lost and found application/app/src/main/res/play_store_512.png differ diff --git a/Lost and found application/app/src/main/res/values-night/themes.xml b/Lost and found application/app/src/main/res/values-night/themes.xml new file mode 100644 index 00000000..40812d33 --- /dev/null +++ b/Lost and found application/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.BUFINDER" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_200</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/black</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_200</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/values/colors.xml b/Lost and found application/app/src/main/res/values/colors.xml new file mode 100644 index 00000000..02ab3217 --- /dev/null +++ b/Lost and found application/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="purple_200">#ED443F</color> + <color name="purple_500">#ED443F</color> + <color name="purple_700">#ED443F</color> + <color name="teal_200">#FF03DAC5</color> + <color name="teal_700">#FF018786</color> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/values/strings.xml b/Lost and found application/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..19bc2977 --- /dev/null +++ b/Lost and found application/app/src/main/res/values/strings.xml @@ -0,0 +1,147 @@ +<resources> + <string name="app_name">BU FINDER</string> + <!-- TODO: Remove or change this placeholder text --> + <string name="hello_blank_fragment">Hello blank fragment</string> + + <array name="Dev_Type"> + <item>Audio Devices</item> + <item>Laptop and Accessories</item> + <item>Wearables</item> + <item>Footwear</item> + <item>Bottle</item> + <item>Keys</item> + <item>Sports Equipment</item> + <item>Any type of Card</item> + </array> + + <array name="Aud_Dev"> + <item>Speakers</item> + <item>Over-ear Headphones</item> + <item>On-ear Headphones</item> + <item>Collar Earphones</item> + <item>Wired Earphones</item> + <item>True Wireless Earphones</item> + <item>Other</item> + </array> + + <array name="Wearables"> + <item>Spectacles</item> + <item>Watches</item> + <item>Jewellery</item> + <item>Caps</item> + <item>Mufflers</item> + <item>Gloves</item> + <item>Other</item> + </array> + <array name="Lap_Acc"> + <item>Laptop</item> + <item>Keyboard</item> + <item>Mouse</item> + <item>Storage Devices</item> + <item>Charger</item> + <item>Laptop Sleeve</item> + <item>Other</item> + </array> + <array name="Footwear"> + <item>Shoes</item> + <item>Slippers</item> + <item>Sandals</item> + <item>Other</item> + </array> + <array name="Bottles"> + <item>Steel Bottles</item> + <item>Gym Bottles</item> + <item>Other</item> + </array> + + <array name="Keys"> + <item>Car Keys</item> + <item>Room Keys</item> + <item>Locker Keys</item> + <item>Other</item> + </array> + <array name="Spo_Equ"> + <item>Racquets</item> + <item>Ball</item> + <item>Shuttle Cock</item> + <item>Other</item> + </array> + <array name="Cards"> + <item>Credit/Debit Cards</item> + <item>ID Card</item> + <item>Other</item> + </array> + <array name="ADbrands"> + <item>Bose</item> + <item>Apple</item> + <item>Boat</item> + <item>Noise</item> + <item>MI</item> + <item>Realme</item> + <item>Other</item> + </array> + <array name="LAbrands"> + <item>HP</item> + <item>Dell</item> + <item>Apple</item> + <item>Lenovo</item> + <item>Other</item> + </array> + <array name="Wbrands"> + <item>Casio</item> + <item>MI</item> + <item>Apple</item> + <item>Titan</item> + <item>Rado</item> + <item>G-Shock</item> + <item>Other</item> + </array> + <array name="Fbrands"> + <item>Nike</item> + <item>Adidas</item> + <item>Reebok</item> + <item>Sparx</item> + <item>Campus</item> + <item>Crocs</item> + <item>Decathlon</item> + <item>Other</item> + </array> + <array name="SEbrands"> + <item>Yonex</item> + <item>Adidas</item> + <item>Nike</item> + <item>Puma</item> + <item>Decathlon</item> + <item>Cosco</item> + <item>Other</item> + </array> + <array name="Bbrands"> + <item>Other</item> + </array> + <array name="Kbrands"> + <item>Other</item> + </array> + <array name="Cbrands"> + <item>HDFC</item> + <item>UCO Bank</item> + <item>Slice</item> + <item>Bennett ID</item> + <item>Aadhaar Card</item> + <item>Other</item> + </array> + <array name="Colours"> + <item>Red</item> + <item>Orange</item> + <item>Pink</item> + <item>Grey</item> + <item>Black</item> + <item>White</item> + <item>Dark Green</item> + <item>Light Green</item> + <item>Yellow</item> + <item>Light Blue</item> + <item>Dark Blue</item> + <item>Violet</item> + </array> + +</resources> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/values/themes.xml b/Lost and found application/app/src/main/res/values/themes.xml new file mode 100644 index 00000000..6430a4b5 --- /dev/null +++ b/Lost and found application/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.BUFINDER" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_500</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/white</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_700</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/xml/backup_rules.xml b/Lost and found application/app/src/main/res/xml/backup_rules.xml new file mode 100644 index 00000000..fa0f996d --- /dev/null +++ b/Lost and found application/app/src/main/res/xml/backup_rules.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Sample backup rules file; uncomment and customize as necessary. + See https://developer.android.com/guide/topics/data/autobackup + for details. + Note: This file is ignored for devices older that API 31 + See https://developer.android.com/about/versions/12/backup-restore +--> +<full-backup-content> + <!-- + <include domain="sharedpref" path="."/> + <exclude domain="sharedpref" path="device.xml"/> +--> +</full-backup-content> \ No newline at end of file diff --git a/Lost and found application/app/src/main/res/xml/data_extraction_rules.xml b/Lost and found application/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 00000000..9ee9997b --- /dev/null +++ b/Lost and found application/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Sample data extraction rules file; uncomment and customize as necessary. + See https://developer.android.com/about/versions/12/backup-restore#xml-changes + for details. +--> +<data-extraction-rules> + <cloud-backup> + <!-- TODO: Use <include> and <exclude> to control what is backed up. + <include .../> + <exclude .../> + --> + </cloud-backup> + <!-- + <device-transfer> + <include .../> + <exclude .../> + </device-transfer> + --> +</data-extraction-rules> \ No newline at end of file diff --git a/Lost and found application/app/src/test/java/com/application/bufinder/ExampleUnitTest.java b/Lost and found application/app/src/test/java/com/application/bufinder/ExampleUnitTest.java new file mode 100644 index 00000000..2444bf52 --- /dev/null +++ b/Lost and found application/app/src/test/java/com/application/bufinder/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.application.bufinder; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/Lost and found application/build.gradle b/Lost and found application/build.gradle new file mode 100644 index 00000000..9d1d38e1 --- /dev/null +++ b/Lost and found application/build.gradle @@ -0,0 +1,13 @@ +buildscript { + dependencies { + classpath 'com.google.gms:google-services:4.3.10' + } +}// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + id 'com.android.application' version '7.2.0' apply false + id 'com.android.library' version '7.2.0' apply false +} + +task clean(type: Delete) { + delete rootProject.buildDir +} \ No newline at end of file diff --git a/Lost and found application/gradle.properties b/Lost and found application/gradle.properties new file mode 100644 index 00000000..dab7c28b --- /dev/null +++ b/Lost and found application/gradle.properties @@ -0,0 +1,21 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app"s APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/Lost and found application/gradle/wrapper/gradle-wrapper.jar b/Lost and found application/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..e708b1c0 Binary files /dev/null and b/Lost and found application/gradle/wrapper/gradle-wrapper.jar differ diff --git a/Lost and found application/gradle/wrapper/gradle-wrapper.properties b/Lost and found application/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..839fd965 --- /dev/null +++ b/Lost and found application/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Sat May 28 11:05:37 IST 2022 +distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionPath=wrapper/dists +zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/Lost and found application/gradlew b/Lost and found application/gradlew new file mode 100644 index 00000000..4f906e0c --- /dev/null +++ b/Lost and found application/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/Lost and found application/gradlew.bat b/Lost and found application/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/Lost and found application/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/Lost and found application/settings.gradle b/Lost and found application/settings.gradle new file mode 100644 index 00000000..75d5cfbd --- /dev/null +++ b/Lost and found application/settings.gradle @@ -0,0 +1,16 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +rootProject.name = "BU FINDER" +include ':app' diff --git a/Lucas Numbers/lucas_numbers.java b/Lucas Numbers/lucas_numbers.java new file mode 100644 index 00000000..c6d70e6a --- /dev/null +++ b/Lucas Numbers/lucas_numbers.java @@ -0,0 +1,18 @@ +public class LucasNumbers { + public static void main(String[] args) { + int n = 10; // Number of Lucas numbers to generate + int[] lucasNumbers = new int[n]; + + lucasNumbers[0] = 2; // The first Lucas number + lucasNumbers[1] = 1; // The second Lucas number + + for (int i = 2; i < n; i++) { + lucasNumbers[i] = lucasNumbers[i - 1] + lucasNumbers[i - 2]; + } + + System.out.println("Lucas Numbers:"); + for (int i = 0; i < n; i++) { + System.out.print(lucasNumbers[i] + " "); + } + } +} diff --git a/MEME GENERATOR/index.html b/MEME GENERATOR/index.html new file mode 100644 index 00000000..9b1cb881 --- /dev/null +++ b/MEME GENERATOR/index.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <script src="./sctick.js"></script> + <link rel="stylesheet" href="style.css" /> + <title>Document</title> + </head> + <body class="main_body"> + + <div class="center"> + <div> + <img id="myImg" /> + </div> + <div class="div_btn"> + <button class="btn" onclick="myfunc()">Next Meme</button> + </div> + <button class="btn" a href="javascript:void(0)" onclick="share()">Compartilhar</a> + </button> + </div> + + </body> +</html> \ No newline at end of file diff --git a/MEME GENERATOR/strike.js b/MEME GENERATOR/strike.js new file mode 100644 index 00000000..4cc5bfef --- /dev/null +++ b/MEME GENERATOR/strike.js @@ -0,0 +1,29 @@ +const kt = () => { + fetch("https://meme-api.herokuapp.com/gimme") + .then((data) => data.json()) + .then((data_val) => { + const u_data = data_val.url; + document.getElementById("myImg").src = u_data; + console.log(u_data); + }); + }; + kt(); + + //function to refresh the page every 5 seconds + const myfunc = () =>{ + kt(); + } + + + //function to share the generated meme on social networks + function share(){ + if (navigator.share !== undefined) { + navigator.share({ + title: 'Meme Genrator', + text: 'meme generator', + url: 'u_data', + }) + .then(() => console.log('Successful share')) + .catch((error) => console.log('Error sharing', error)); + } + } \ No newline at end of file diff --git a/MEME GENERATOR/style.css b/MEME GENERATOR/style.css new file mode 100644 index 00000000..de5a8ea0 --- /dev/null +++ b/MEME GENERATOR/style.css @@ -0,0 +1,36 @@ +* { + margin: 0; + padding: 0; + } + .main_body{ + background-color: rgb(90, 92, 207); + } + #myImg { + height: 400px; + width: 500px; + } + .center { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + border: 5px solid #FFFF00; + padding: 10px; + } + .div_btn{ + width: 100%; + display: flex; + justify-content: center; + } + .btn{ + background-color: #4CAF50; + border: none; + color: white; + padding: 15px 32px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 25px; + margin: 4px 2px; + cursor: pointer; + } \ No newline at end of file diff --git a/Main.class b/Main.class new file mode 100644 index 00000000..4717f9d9 Binary files /dev/null and b/Main.class differ diff --git a/Marvel Avengers Game/((((((((PlayGame.bat b/Marvel Avengers Game/((((((((PlayGame.bat new file mode 100644 index 00000000..5f58fbc8 --- /dev/null +++ b/Marvel Avengers Game/((((((((PlayGame.bat @@ -0,0 +1,3 @@ +javac *.java + +java PlayGame diff --git a/Marvel Avengers Game/((((((((PlayGameWithMusic.bat b/Marvel Avengers Game/((((((((PlayGameWithMusic.bat new file mode 100644 index 00000000..851a4771 --- /dev/null +++ b/Marvel Avengers Game/((((((((PlayGameWithMusic.bat @@ -0,0 +1,3 @@ +javac *.java + +java PlayGameWithMusic diff --git a/Marvel Avengers Game/(((((((README.txt b/Marvel Avengers Game/(((((((README.txt new file mode 100644 index 00000000..370e1da7 --- /dev/null +++ b/Marvel Avengers Game/(((((((README.txt @@ -0,0 +1,9 @@ +STEPS TO RUN THE GAME : +1.Open Command Prompt from the directory *\(((((Mini Project\GUI Based> //here *=any directories of a drive after unzipping the file +2.Type javac *.java and press enter +3.If you want to play Game with music : Type java PlayGameWithMusic + else if want to play Game without music : Type java PlayGame +4.The Game Will be Running +Terms +//above game is compiled in JDK16 +//run the game with java JDK16 \ No newline at end of file diff --git a/Marvel Avengers Game/(((((Battle Log.txt b/Marvel Avengers Game/(((((Battle Log.txt new file mode 100644 index 00000000..b9b83ba3 --- /dev/null +++ b/Marvel Avengers Game/(((((Battle Log.txt @@ -0,0 +1,16 @@ +Battle Log Result Points +--------------------------------------------------------------------------------------------------- +IRON MAN v/s THANOS IRON MAN Killed THANOS Points Scored : 960 +IRON MAN v/s LOKI IRON MAN Killed LOKI Points Scored : 480 +CAPTAIN AMERICA v/s LOKI CAPTAIN AMERICA Killed LOKI Points Scored : 480 +CAPTAIN AMERICA v/s LOKI CAPTAIN AMERICA Killed LOKI Points Scored : 480 +IRON MAN v/s THANOS IRON MAN Killed THANOS Points Scored : 960 +HULK v/s LOKI HULK Killed LOKI Points Scored : 480 +IRON MAN v/s THANOS IRON MAN and THANOS Killed Each Other Points Scored : 960 +IRON MAN v/s THANOS IRON MAN and THANOS Killed Each Other Points Scored : 960 +IRON MAN v/s THANOS IRON MAN Killed THANOS Points Scored : 960 +IRON MAN v/s THANOS IRON MAN Killed THANOS Points Scored : 960 +IRON MAN v/s THANOS IRON MAN Killed THANOS Points Scored : 960 +IRON MAN v/s THANOS IRON MAN Killed THANOS Points Scored : 960 +IRON MAN v/s THANOS IRON MAN Killed THANOS Points Scored : 960 +IRON MAN v/s LOKI IRON MAN Killed LOKI Points Scored : 480 diff --git a/Marvel Avengers Game/(((((Reviews.txt b/Marvel Avengers Game/(((((Reviews.txt new file mode 100644 index 00000000..1d3bb608 --- /dev/null +++ b/Marvel Avengers Game/(((((Reviews.txt @@ -0,0 +1,5 @@ +Name Stars Review +------------------------------------------------------ +Mihir Panchal 5 Great!!!!!!!!!!! +iiuaafiasd 5 kkgwkjgr +Mihir nani 5 good diff --git a/Marvel Avengers Game/BImage.png b/Marvel Avengers Game/BImage.png new file mode 100644 index 00000000..22fb521e Binary files /dev/null and b/Marvel Avengers Game/BImage.png differ diff --git a/Marvel Avengers Game/Back.png b/Marvel Avengers Game/Back.png new file mode 100644 index 00000000..9eccdfe1 Binary files /dev/null and b/Marvel Avengers Game/Back.png differ diff --git a/Marvel Avengers Game/Background.jpg b/Marvel Avengers Game/Background.jpg new file mode 100644 index 00000000..6e5ade6e Binary files /dev/null and b/Marvel Avengers Game/Background.jpg differ diff --git a/Marvel Avengers Game/CA1.png b/Marvel Avengers Game/CA1.png new file mode 100644 index 00000000..efcfa3c2 Binary files /dev/null and b/Marvel Avengers Game/CA1.png differ diff --git a/Marvel Avengers Game/CA2.png b/Marvel Avengers Game/CA2.png new file mode 100644 index 00000000..a0734631 Binary files /dev/null and b/Marvel Avengers Game/CA2.png differ diff --git a/Marvel Avengers Game/CA3.png b/Marvel Avengers Game/CA3.png new file mode 100644 index 00000000..62e38d76 Binary files /dev/null and b/Marvel Avengers Game/CA3.png differ diff --git a/Marvel Avengers Game/CA4.png b/Marvel Avengers Game/CA4.png new file mode 100644 index 00000000..4002aee3 Binary files /dev/null and b/Marvel Avengers Game/CA4.png differ diff --git a/Marvel Avengers Game/CA5.png b/Marvel Avengers Game/CA5.png new file mode 100644 index 00000000..b3607c6e Binary files /dev/null and b/Marvel Avengers Game/CA5.png differ diff --git a/Marvel Avengers Game/CA6.png b/Marvel Avengers Game/CA6.png new file mode 100644 index 00000000..e8fd6dd2 Binary files /dev/null and b/Marvel Avengers Game/CA6.png differ diff --git a/Marvel Avengers Game/CAa1.png b/Marvel Avengers Game/CAa1.png new file mode 100644 index 00000000..ef7ff0c9 Binary files /dev/null and b/Marvel Avengers Game/CAa1.png differ diff --git a/Marvel Avengers Game/CAa2.png b/Marvel Avengers Game/CAa2.png new file mode 100644 index 00000000..906c5959 Binary files /dev/null and b/Marvel Avengers Game/CAa2.png differ diff --git a/Marvel Avengers Game/CAa3.png b/Marvel Avengers Game/CAa3.png new file mode 100644 index 00000000..1cdccc57 Binary files /dev/null and b/Marvel Avengers Game/CAa3.png differ diff --git a/Marvel Avengers Game/CAa4.png b/Marvel Avengers Game/CAa4.png new file mode 100644 index 00000000..18922b95 Binary files /dev/null and b/Marvel Avengers Game/CAa4.png differ diff --git a/Marvel Avengers Game/CAbtn.png b/Marvel Avengers Game/CAbtn.png new file mode 100644 index 00000000..8da72e6d Binary files /dev/null and b/Marvel Avengers Game/CAbtn.png differ diff --git a/Marvel Avengers Game/CAimage.png b/Marvel Avengers Game/CAimage.png new file mode 100644 index 00000000..10d96346 Binary files /dev/null and b/Marvel Avengers Game/CAimage.png differ diff --git a/Marvel Avengers Game/Credits$1.class b/Marvel Avengers Game/Credits$1.class new file mode 100644 index 00000000..d6d4fb2b Binary files /dev/null and b/Marvel Avengers Game/Credits$1.class differ diff --git a/Marvel Avengers Game/Credits$2.class b/Marvel Avengers Game/Credits$2.class new file mode 100644 index 00000000..94bf86dd Binary files /dev/null and b/Marvel Avengers Game/Credits$2.class differ diff --git a/Marvel Avengers Game/Credits.class b/Marvel Avengers Game/Credits.class new file mode 100644 index 00000000..36a6b0c2 Binary files /dev/null and b/Marvel Avengers Game/Credits.class differ diff --git a/Marvel Avengers Game/Credits.java b/Marvel Avengers Game/Credits.java new file mode 100644 index 00000000..ac39c9db --- /dev/null +++ b/Marvel Avengers Game/Credits.java @@ -0,0 +1,78 @@ +import java.awt.*; +import javax.swing.JFrame; +import java.awt.event.*; +import javax.swing.*; + +class Credits extends JFrame +{ + Credits() + { + JLabel cr,background,txt1,txt2,txt3,txt4; + JButton exit,back; + //declaration + setSize(1570,840); + setLayout(null); + //background image + setExtendedState(JFrame.MAXIMIZED_BOTH); + setDefaultCloseOperation(EXIT_ON_CLOSE); + ImageIcon img=new ImageIcon("BImage.png"); + background=new JLabel("",img,JLabel.CENTER); + background.setBounds(0,0,1570,770); + add(background); + //background image finish + cr=new JLabel(new ImageIcon("Credits.png")); + cr.setBounds(580,50,362,79); + background.add(cr); + //mmbutton + exit=new JButton(new ImageIcon("Exit.png")); + exit.setBounds(610,600,291,79); + exit.setBackground(Color.BLACK); + background.add(exit); + //exit + + back=new JButton(new ImageIcon("backbtn.png")); + back.setBounds(0,0,100,100); + back.setBackground(Color.BLACK); + background.add(back); + + txt1=new JLabel(new ImageIcon("txt1.png")); + txt1.setBounds(300,175,441,73); + background.add(txt1); + + txt2=new JLabel(new ImageIcon("txt2.png")); + txt2.setBounds(300,275,440,73); + background.add(txt2); + + txt3=new JLabel(new ImageIcon("txt3.png")); + txt3.setBounds(300,375,300,73); + background.add(txt3); + + txt4=new JLabel(new ImageIcon("txt4.png")); + txt4.setBounds(300,475,823,73); + background.add(txt4); + + //all actions + back.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + MainMenu m=new MainMenu(); + } + }); + exit.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + System.out.println("Game Ended"); + System.exit(0); + } + }); + setVisible(true); + } + public static void main (String args[]) + { + Credits c=new Credits(); + } +} \ No newline at end of file diff --git a/Marvel Avengers Game/Credits.png b/Marvel Avengers Game/Credits.png new file mode 100644 index 00000000..6c190c90 Binary files /dev/null and b/Marvel Avengers Game/Credits.png differ diff --git a/Marvel Avengers Game/Description$1.class b/Marvel Avengers Game/Description$1.class new file mode 100644 index 00000000..ad7a2a60 Binary files /dev/null and b/Marvel Avengers Game/Description$1.class differ diff --git a/Marvel Avengers Game/Description$2.class b/Marvel Avengers Game/Description$2.class new file mode 100644 index 00000000..6bbb68b1 Binary files /dev/null and b/Marvel Avengers Game/Description$2.class differ diff --git a/Marvel Avengers Game/Description.class b/Marvel Avengers Game/Description.class new file mode 100644 index 00000000..b46de7ac Binary files /dev/null and b/Marvel Avengers Game/Description.class differ diff --git a/Marvel Avengers Game/Description.java b/Marvel Avengers Game/Description.java new file mode 100644 index 00000000..ef3b06fc --- /dev/null +++ b/Marvel Avengers Game/Description.java @@ -0,0 +1,283 @@ +import java.awt.*; +import javax.swing.JFrame; +import java.awt.event.*; +import javax.swing.*; + +class Description extends JFrame +{ + int no,flag=0; + JLabel title,dtxt1,dtxt2,dtxt3,dtxt4,dtxt5,dtxt6,img; + + public void guideDecider(int d) + { + no=d; + if(no==1) + { + title=new JLabel(new ImageIcon("IMbtn.png")); + title.setBounds(540,50,444,79); + add(title); + + img=new JLabel(new ImageIcon("IMimage.png")); + img.setBounds(1000,232,300,336); + add(img); + + dtxt1=new JLabel(new ImageIcon("IM1.png")); + dtxt1.setBounds(100,150,512,73); + add(dtxt1); + + dtxt2=new JLabel(new ImageIcon("IM2.png")); + dtxt2.setBounds(100,250,373,73); + add(dtxt2); + + dtxt3=new JLabel(new ImageIcon("IM3.png")); + dtxt3.setBounds(100,350,586,73); + add(dtxt3); + + dtxt4=new JLabel(new ImageIcon("IM4.png")); + dtxt4.setBounds(100,450,623,73); + add(dtxt4); + + dtxt5=new JLabel(new ImageIcon("IM5.png")); + dtxt5.setBounds(100,550,776,73); + add(dtxt5); + + dtxt6=new JLabel(new ImageIcon("IM6.png")); + dtxt6.setBounds(100,650,674,73); + add(dtxt6); + } + else if(no==2) + { + title=new JLabel(new ImageIcon("Hbtn.png")); + title.setBounds(540,50,444,79); + add(title); + title.setVisible(true); + + img=new JLabel(new ImageIcon("Himage.png")); + img.setBounds(1000,232,300,336); + add(img); + img.setVisible(true); + + dtxt1=new JLabel(new ImageIcon("H1.png")); + dtxt1.setBounds(100,150,438,73); + add(dtxt1); + + dtxt2=new JLabel(new ImageIcon("H2.png")); + dtxt2.setBounds(100,250,296,73); + add(dtxt2); + + dtxt3=new JLabel(new ImageIcon("H3.png")); + dtxt3.setBounds(100,350,607,73); + add(dtxt3); + + dtxt4=new JLabel(new ImageIcon("H4.png")); + dtxt4.setBounds(100,450,514,73); + add(dtxt4); + + dtxt5=new JLabel(new ImageIcon("H5.png")); + dtxt5.setBounds(100,550,680,73); + add(dtxt5); + + dtxt6=new JLabel(new ImageIcon("H6.png")); + dtxt6.setBounds(100,650,664,73); + add(dtxt6); + + } + else if(no==3) + { + title=new JLabel(new ImageIcon("Tbtn.png")); + title.setBounds(540,50,444,79); + add(title); + title.setVisible(true); + + img=new JLabel(new ImageIcon("Timage.png")); + img.setBounds(1000,178,300,444); + add(img); + img.setVisible(true); + + dtxt1=new JLabel(new ImageIcon("T1.png")); + dtxt1.setBounds(100,150,448,73); + add(dtxt1); + + dtxt2=new JLabel(new ImageIcon("T2.png")); + dtxt2.setBounds(100,250,304,73); + add(dtxt2); + + dtxt3=new JLabel(new ImageIcon("T3.png")); + dtxt3.setBounds(100,350,747,73); + add(dtxt3); + + dtxt4=new JLabel(new ImageIcon("T4.png")); + dtxt4.setBounds(100,450,689,73); + add(dtxt4); + + dtxt5=new JLabel(new ImageIcon("T5.png")); + dtxt5.setBounds(100,550,659,73); + add(dtxt5); + + dtxt6=new JLabel(new ImageIcon("T6.png")); + dtxt6.setBounds(100,650,634,73); + add(dtxt6); + + } + else if(no==4) + { + title=new JLabel(new ImageIcon("CAbtn.png")); + title.setBounds(540,50,444,79); + add(title); + title.setVisible(true); + + img=new JLabel(new ImageIcon("CAimage.png")); + img.setBounds(1000,190,300,419); + add(img); + img.setVisible(true); + + dtxt1=new JLabel(new ImageIcon("CA1.png")); + dtxt1.setBounds(100,150,680,73); + add(dtxt1); + + dtxt2=new JLabel(new ImageIcon("CA2.png")); + dtxt2.setBounds(100,250,539,73); + add(dtxt2); + + dtxt3=new JLabel(new ImageIcon("CA3.png")); + dtxt3.setBounds(100,350,598,73); + add(dtxt3); + + dtxt4=new JLabel(new ImageIcon("CA4.png")); + dtxt4.setBounds(100,450,670,73); + add(dtxt4); + + dtxt5=new JLabel(new ImageIcon("CA5.png")); + dtxt5.setBounds(100,550,600,73); + add(dtxt5); + + dtxt6=new JLabel(new ImageIcon("CA6.png")); + dtxt6.setBounds(100,650,602,73); + add(dtxt6); + + } + else if(no==5) + { + title=new JLabel(new ImageIcon("Thanosbtn.png")); + title.setBounds(540,50,444,79); + add(title); + title.setVisible(true); + + img=new JLabel(new ImageIcon("Thimage.png")); + img.setBounds(1000,194,300,412); + add(img); + img.setVisible(true); + + dtxt1=new JLabel(new ImageIcon("TH1.png")); + dtxt1.setBounds(100,150,490,73); + add(dtxt1); + + dtxt2=new JLabel(new ImageIcon("TH2.png")); + dtxt2.setBounds(100,250,352,73); + add(dtxt2); + + dtxt3=new JLabel(new ImageIcon("TH3.png")); + dtxt3.setBounds(100,350,640,73); + add(dtxt3); + + dtxt4=new JLabel(new ImageIcon("TH4.png")); + dtxt4.setBounds(100,450,618,73); + add(dtxt4); + + dtxt5=new JLabel(new ImageIcon("TH5.png")); + dtxt5.setBounds(100,550,752,73); + add(dtxt5); + + dtxt6=new JLabel(new ImageIcon("TH6.png")); + dtxt6.setBounds(100,650,569,73); + add(dtxt6); + + } + else if(no==6) + { + title=new JLabel(new ImageIcon("Lokibtn.png")); + title.setBounds(540,50,444,79); + add(title); + title.setVisible(true); + + img=new JLabel(new ImageIcon("Limage.png")); + img.setBounds(1000,167,300,466); + add(img); + img.setVisible(true); + + dtxt1=new JLabel(new ImageIcon("L1.png")); + dtxt1.setBounds(100,150,422,73); + add(dtxt1); + + dtxt2=new JLabel(new ImageIcon("L2.png")); + dtxt2.setBounds(100,250,282,73); + add(dtxt2); + + dtxt3=new JLabel(new ImageIcon("L3.png")); + dtxt3.setBounds(100,350,636,73); + add(dtxt3); + + dtxt4=new JLabel(new ImageIcon("L4.png")); + dtxt4.setBounds(100,450,535,73); + add(dtxt4); + + dtxt5=new JLabel(new ImageIcon("L5.png")); + dtxt5.setBounds(100,550,546,73); + add(dtxt5); + + dtxt6=new JLabel(new ImageIcon("L6.png")); + dtxt6.setBounds(100,650,595,73); + add(dtxt6); + + } + } + + Description() + { + JLabel title,background; + JButton exit,back; + //declaration + setSize(1570,840); + setLayout(null); + //background image + setContentPane(new JLabel(new ImageIcon("BImage.png"))); + setExtendedState(JFrame.MAXIMIZED_BOTH); + setDefaultCloseOperation(EXIT_ON_CLOSE); + setVisible(true); + back=new JButton(new ImageIcon("backbtn.png")); + back.setBounds(0,0,100,100); + back.setBackground(Color.BLACK); + add(back); + + exit=new JButton(new ImageIcon("Exit.png")); + exit.setBounds(1200,650,291,79); + exit.setBackground(Color.BLACK); + add(exit); + + //add elements + + + back.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + GameGuide g=new GameGuide(); + } + }); + exit.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + System.out.println("Game Ended"); + System.exit(0); + } + }); + } + + public static void main(String args[]) + { + //Description d=new Description(); + } +} \ No newline at end of file diff --git a/Marvel Avengers Game/Exit.png b/Marvel Avengers Game/Exit.png new file mode 100644 index 00000000..4403458a Binary files /dev/null and b/Marvel Avengers Game/Exit.png differ diff --git a/Marvel Avengers Game/Fight$1.class b/Marvel Avengers Game/Fight$1.class new file mode 100644 index 00000000..1f18e993 Binary files /dev/null and b/Marvel Avengers Game/Fight$1.class differ diff --git a/Marvel Avengers Game/Fight$10.class b/Marvel Avengers Game/Fight$10.class new file mode 100644 index 00000000..bbcee228 Binary files /dev/null and b/Marvel Avengers Game/Fight$10.class differ diff --git a/Marvel Avengers Game/Fight$11.class b/Marvel Avengers Game/Fight$11.class new file mode 100644 index 00000000..319941ce Binary files /dev/null and b/Marvel Avengers Game/Fight$11.class differ diff --git a/Marvel Avengers Game/Fight$12.class b/Marvel Avengers Game/Fight$12.class new file mode 100644 index 00000000..4379d3fd Binary files /dev/null and b/Marvel Avengers Game/Fight$12.class differ diff --git a/Marvel Avengers Game/Fight$13.class b/Marvel Avengers Game/Fight$13.class new file mode 100644 index 00000000..07fdc514 Binary files /dev/null and b/Marvel Avengers Game/Fight$13.class differ diff --git a/Marvel Avengers Game/Fight$14.class b/Marvel Avengers Game/Fight$14.class new file mode 100644 index 00000000..f62f499c Binary files /dev/null and b/Marvel Avengers Game/Fight$14.class differ diff --git a/Marvel Avengers Game/Fight$15.class b/Marvel Avengers Game/Fight$15.class new file mode 100644 index 00000000..b64a972e Binary files /dev/null and b/Marvel Avengers Game/Fight$15.class differ diff --git a/Marvel Avengers Game/Fight$16.class b/Marvel Avengers Game/Fight$16.class new file mode 100644 index 00000000..700e058c Binary files /dev/null and b/Marvel Avengers Game/Fight$16.class differ diff --git a/Marvel Avengers Game/Fight$17.class b/Marvel Avengers Game/Fight$17.class new file mode 100644 index 00000000..eb6dcc78 Binary files /dev/null and b/Marvel Avengers Game/Fight$17.class differ diff --git a/Marvel Avengers Game/Fight$18.class b/Marvel Avengers Game/Fight$18.class new file mode 100644 index 00000000..a39b08a5 Binary files /dev/null and b/Marvel Avengers Game/Fight$18.class differ diff --git a/Marvel Avengers Game/Fight$19.class b/Marvel Avengers Game/Fight$19.class new file mode 100644 index 00000000..6c9d5c03 Binary files /dev/null and b/Marvel Avengers Game/Fight$19.class differ diff --git a/Marvel Avengers Game/Fight$2.class b/Marvel Avengers Game/Fight$2.class new file mode 100644 index 00000000..0affdfc2 Binary files /dev/null and b/Marvel Avengers Game/Fight$2.class differ diff --git a/Marvel Avengers Game/Fight$20.class b/Marvel Avengers Game/Fight$20.class new file mode 100644 index 00000000..e6207eff Binary files /dev/null and b/Marvel Avengers Game/Fight$20.class differ diff --git a/Marvel Avengers Game/Fight$21.class b/Marvel Avengers Game/Fight$21.class new file mode 100644 index 00000000..abe85cba Binary files /dev/null and b/Marvel Avengers Game/Fight$21.class differ diff --git a/Marvel Avengers Game/Fight$22.class b/Marvel Avengers Game/Fight$22.class new file mode 100644 index 00000000..6c3ac81b Binary files /dev/null and b/Marvel Avengers Game/Fight$22.class differ diff --git a/Marvel Avengers Game/Fight$23.class b/Marvel Avengers Game/Fight$23.class new file mode 100644 index 00000000..da3cf709 Binary files /dev/null and b/Marvel Avengers Game/Fight$23.class differ diff --git a/Marvel Avengers Game/Fight$24.class b/Marvel Avengers Game/Fight$24.class new file mode 100644 index 00000000..976d696c Binary files /dev/null and b/Marvel Avengers Game/Fight$24.class differ diff --git a/Marvel Avengers Game/Fight$3.class b/Marvel Avengers Game/Fight$3.class new file mode 100644 index 00000000..17363d4a Binary files /dev/null and b/Marvel Avengers Game/Fight$3.class differ diff --git a/Marvel Avengers Game/Fight$4.class b/Marvel Avengers Game/Fight$4.class new file mode 100644 index 00000000..bd2c780d Binary files /dev/null and b/Marvel Avengers Game/Fight$4.class differ diff --git a/Marvel Avengers Game/Fight$5.class b/Marvel Avengers Game/Fight$5.class new file mode 100644 index 00000000..20abacf1 Binary files /dev/null and b/Marvel Avengers Game/Fight$5.class differ diff --git a/Marvel Avengers Game/Fight$6.class b/Marvel Avengers Game/Fight$6.class new file mode 100644 index 00000000..508cde01 Binary files /dev/null and b/Marvel Avengers Game/Fight$6.class differ diff --git a/Marvel Avengers Game/Fight$7.class b/Marvel Avengers Game/Fight$7.class new file mode 100644 index 00000000..564079b4 Binary files /dev/null and b/Marvel Avengers Game/Fight$7.class differ diff --git a/Marvel Avengers Game/Fight$8.class b/Marvel Avengers Game/Fight$8.class new file mode 100644 index 00000000..f8311f94 Binary files /dev/null and b/Marvel Avengers Game/Fight$8.class differ diff --git a/Marvel Avengers Game/Fight$9.class b/Marvel Avengers Game/Fight$9.class new file mode 100644 index 00000000..047c4cb3 Binary files /dev/null and b/Marvel Avengers Game/Fight$9.class differ diff --git a/Marvel Avengers Game/Fight.class b/Marvel Avengers Game/Fight.class new file mode 100644 index 00000000..83903f03 Binary files /dev/null and b/Marvel Avengers Game/Fight.class differ diff --git a/Marvel Avengers Game/Fight.java b/Marvel Avengers Game/Fight.java new file mode 100644 index 00000000..017cd75d --- /dev/null +++ b/Marvel Avengers Game/Fight.java @@ -0,0 +1,757 @@ +import java.awt.*; +import javax.swing.JFrame; +import java.awt.event.*; +import javax.swing.*; +import java.io.*; + +class Fight extends JFrame +{ + JLabel ac,vc,background,avgimg,villimg,fghtnm,versus,logo; + JLabel result,resulticon,points,resultgreet; + JButton bav1,bav2,bav3,bav4,bv1,bv2,exit,back; + JButton a1,a2,a3,a4,v1,v2,v3,v4; + JProgressBar healtha,healthv; + JPanel ahpanel,vhpanel; + String fightname,avgname,villname,resulttxt,rtxt1,rtxt2; + int hpa,hpv,deathflag=1,ohpv; + public int choosea,choosev; + Fight() + { + //declaration + setSize(1570,840); + setLayout(null); + //background image + setExtendedState(JFrame.MAXIMIZED_BOTH); + setDefaultCloseOperation(EXIT_ON_CLOSE); + ImageIcon img=new ImageIcon("BImage.png"); + background=new JLabel("",img,JLabel.CENTER); + background.setBounds(0,0,1570,770); + add(background); + + //background image finish + ac=new JLabel(new ImageIcon("ac.png")); + ac.setBounds(620,50,343,79); + background.add(ac); + + vc=new JLabel(new ImageIcon("vc.png")); + vc.setBounds(620,50,343,79); + background.add(vc); + vc.setVisible(false); + + //mmbutton + bav1=new JButton(new ImageIcon("IMbtn.png")); + bav1.setBounds(150,250,444,79); + bav1.setBackground(Color.BLACK); + background.add(bav1); + + bav2=new JButton(new ImageIcon("Hbtn.png")); + bav2.setBounds(995,250,444,79); + bav2.setBackground(Color.BLACK); + background.add(bav2); + + bav3=new JButton(new ImageIcon("Tbtn.png")); + bav3.setBounds(150,500,444,79); + bav3.setBackground(Color.BLACK); + background.add(bav3); + + bav4=new JButton(new ImageIcon("CAbtn.png")); + bav4.setBounds(995,500,444,79); + bav4.setBackground(Color.BLACK); + background.add(bav4); + + + bv1=new JButton(new ImageIcon("Thanosbtn.png")); + bv1.setBounds(150,350,445,79); + bv1.setBackground(Color.BLACK); + background.add(bv1); + bv1.setVisible(false); + + bv2=new JButton(new ImageIcon("Lokibtn.png")); + bv2.setBounds(950,350,444,79); + bv2.setBackground(Color.BLACK); + background.add(bv2); + bv2.setVisible(false); + + exit=new JButton(new ImageIcon("Exit.png")); + exit.setBounds(1200,650,291,79); + exit.setBackground(Color.BLACK); + background.add(exit); + //exit + back=new JButton(new ImageIcon("backbtn.png")); + back.setBounds(0,0,100,100); + back.setBackground(Color.BLACK); + background.add(back); + + //all Actions + back.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + MainMenu m=new MainMenu(); + } + }); + bav1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + choosea=1; + panel1close(); + } + }); + bav2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + choosea=2; + panel1close(); + } + }); + bav3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + choosea=3; + panel1close(); + } + }); + bav4.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + choosea=4; + panel1close(); + } + }); + exit.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + panel1close(); + setVisible(false); + System.out.println("Game Ended"); + System.exit(0); + } + }); + setVisible(true); + } + + public void panel1close() + { + bav1.setVisible(false); + bav2.setVisible(false); + bav3.setVisible(false); + bav4.setVisible(false); + ac.setVisible(false); + panel2open(); + } + + public void panel2open() + { + bv1.setVisible(true); + bv2.setVisible(true); + vc.setVisible(true); + panel2Listeners(); + } + + public void panel2Listeners() + { + bv1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + choosev=5; + panel2close(); + } + }); + bv2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + choosev=6; + panel2close(); + } + }); + } + + public void panel2close() + { + bv1.setVisible(false); + bv2.setVisible(false); + vc.setVisible(false); + exit.setVisible(false); + setmainFight(); + } + + public void setmainFight() + { + if(choosea==1) + { + hpa=440; + fightname="IRON MAN v/s "; + avgname="IRON MAN"; + avgimg=new JLabel(new ImageIcon("IMimage.png")); + avgimg.setBounds(300,150,300,336); + background.add(avgimg); + + a1=new JButton(new ImageIcon("IMa1.png")); + a1.setBounds(150,525,444,93); + a1.setBackground(Color.BLACK); + background.add(a1); + + a2=new JButton(new ImageIcon("IMa2.png")); + a2.setBounds(950,525,444,93); + a2.setBackground(Color.BLACK); + background.add(a2); + + a3=new JButton(new ImageIcon("IMa3.png")); + a3.setBounds(150,650,444,93); + a3.setBackground(Color.BLACK); + background.add(a3); + + a4=new JButton(new ImageIcon("IMa4.png")); + a4.setBounds(950,650,444,93); + a4.setBackground(Color.BLACK); + background.add(a4); + } + else if(choosea==2) + { + hpa=600; + fightname="HULK v/s "; + avgname="HULK"; + avgimg=new JLabel(new ImageIcon("Himage.png")); + avgimg.setBounds(300,150,300,336); + background.add(avgimg); + + a1=new JButton(new ImageIcon("Ha1.png")); + a1.setBounds(150,525,444,93); + a1.setBackground(Color.BLACK); + background.add(a1); + + a2=new JButton(new ImageIcon("Ha2.png")); + a2.setBounds(950,525,444,93); + a2.setBackground(Color.BLACK); + background.add(a2); + + a3=new JButton(new ImageIcon("Ha3.png")); + a3.setBounds(150,650,444,93); + a3.setBackground(Color.BLACK); + background.add(a3); + + a4=new JButton(new ImageIcon("Ha4.png")); + a4.setBounds(950,650,444,93); + a4.setBackground(Color.BLACK); + background.add(a4); + } + else if(choosea==3) + { + hpa=400; + fightname="THOR v/s "; + avgname="THOR"; + avgimg=new JLabel(new ImageIcon("Timage.png")); + avgimg.setBounds(300,150,300,336); + background.add(avgimg); + + a1=new JButton(new ImageIcon("Ta1.png")); + a1.setBounds(150,525,444,93); + a1.setBackground(Color.BLACK); + background.add(a1); + + a2=new JButton(new ImageIcon("Ta2.png")); + a2.setBounds(950,525,444,93); + a2.setBackground(Color.BLACK); + background.add(a2); + + a3=new JButton(new ImageIcon("Ta3.png")); + a3.setBounds(150,650,444,93); + a3.setBackground(Color.BLACK); + background.add(a3); + + a4=new JButton(new ImageIcon("Ta4.png")); + a4.setBounds(950,650,444,93); + a4.setBackground(Color.BLACK); + background.add(a4); + } + else if(choosea==4) + { + hpa=520; + fightname="CAPTAIN AMERICA v/s "; + avgname="CAPTAIN AMERICA"; + avgimg=new JLabel(new ImageIcon("CAimage.png")); + avgimg.setBounds(300,150,300,336); + background.add(avgimg); + + a1=new JButton(new ImageIcon("CAa1.png")); + a1.setBounds(150,525,444,93); + a1.setBackground(Color.BLACK); + background.add(a1); + + a2=new JButton(new ImageIcon("CAa2.png")); + a2.setBounds(950,525,444,93); + a2.setBackground(Color.BLACK); + background.add(a2); + + a3=new JButton(new ImageIcon("CAa3.png")); + a3.setBounds(150,650,444,93); + a3.setBackground(Color.BLACK); + background.add(a3); + + a4=new JButton(new ImageIcon("CAa4.png")); + a4.setBounds(950,650,444,93); + a4.setBackground(Color.BLACK); + background.add(a4); + } + // + if(choosev==5) + { + ohpv=960; + hpv=960; + fightname=fightname+"THANOS"; + villname="THANOS"; + villimg=new JLabel(new ImageIcon("Thimage.png")); + villimg.setBounds(950,120,300,412); + background.add(villimg); + } + else if(choosev==6) + { + ohpv=480; + hpv=480; + fightname=fightname+"LOKI"; + villname="LOKI"; + villimg=new JLabel(new ImageIcon("Limage.png")); + villimg.setBounds(950,100,300,412); + background.add(villimg); + } + + fghtnm=new JLabel(fightname,JLabel.CENTER); + fghtnm.setBounds(0,25,1560,79); + fghtnm.setForeground(Color.yellow); + fghtnm.setFont(new Font("Verdana", Font.PLAIN, 40)); + //fghtnm.setSize(300,300); + background.add(fghtnm); + System.out.println(fightname); + + //health bars + ahpanel=new JPanel(); + ahpanel.setBounds(200,150,30,300); + ahpanel.setBackground(Color.white); + background.add(ahpanel); + mainFightBtnListeners(); + + vhpanel=new JPanel(); + vhpanel.setBounds(1350,150,30,300); + vhpanel.setBackground(Color.white); + background.add(vhpanel); + + healtha=new JProgressBar(JProgressBar.VERTICAL,0,hpa); + healtha.setPreferredSize(new Dimension(30,300)); + healtha.setStringPainted(true); + healtha.setForeground(Color.green); + healtha.setValue(hpa); + ahpanel.add(healtha); + + healthv=new JProgressBar(JProgressBar.VERTICAL,0,hpv); + healthv.setPreferredSize(new Dimension(30,300)); + healtha.setStringPainted(true); + healthv.setForeground(Color.green); + healthv.setValue(hpv); + vhpanel.add(healthv); + + versus=new JLabel(new ImageIcon("Versus.png"),JLabel.CENTER); + versus.setBounds(0,100,1560,400); + background.add(versus); + + logo=new JLabel(new ImageIcon("alogo.png")); + logo.setBounds(675,500,214,236); + background.add(logo); + + mainFightBtnListeners(); + } + + public void mainFightBtnListeners() + { + if(choosea==1) + { + a1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-80; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-30; + } + else if(choosev==6) + { + hpa=hpa-50; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-60; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-10; + } + else if(choosev==6) + { + hpa=hpa-30; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-40; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-20; + } + else if(choosev==6) + { + hpa=hpa-20; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a4.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-20; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-15; + } + else if(choosev==6) + { + hpa=hpa-35; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + } + else if(choosea==2) + { + a1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-20; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-30; + } + else if(choosev==6) + { + hpa=hpa-50; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-80; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-10; + } + else if(choosev==6) + { + hpa=hpa-30; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-40; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-20; + } + else if(choosev==6) + { + hpa=hpa-20; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a4.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-60; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-15; + } + else if(choosev==6) + { + hpa=hpa-35; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + } + else if(choosea==3) + { + a1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-60; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-30; + } + else if(choosev==6) + { + hpa=hpa-50; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-80; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-10; + } + else if(choosev==6) + { + hpa=hpa-30; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-20; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-20; + } + else if(choosev==6) + { + hpa=hpa-20; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a4.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-40; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-15; + } + else if(choosev==6) + { + hpa=hpa-35; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + } + else if(choosea==4) + { + a1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-80; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-30; + } + else if(choosev==6) + { + hpa=hpa-50; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-40; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-10; + } + else if(choosev==6) + { + hpa=hpa-30; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-20; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-20; + } + else if(choosev==6) + { + hpa=hpa-20; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + a4.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + hpv=hpv-60; + healthv.setValue(hpv); + if(choosev==5) + { + hpa=hpa-15; + } + else if(choosev==6) + { + hpa=hpa-35; + } + healtha.setValue(hpa); + deathCheck(); + } + }); + } + } + public void deathCheck() + { + if(hpa<0&&hpv<0) + { + resulttxt=avgname+" and "+villname+" Killed Each Other"; + rtxt1="It's A Tie"; + rtxt2="Points Scored : "+ohpv; + mainFightPanelClose(); + } + else if(hpa<=0&&hpv>0) + { + resulttxt=villname+" Killed "+avgname; + rtxt1="Sorry You Lost!!!"; + rtxt2="Points Scored : 0"; + mainFightPanelClose(); + } + else if(hpv<=0&&hpa>0) + { + resulttxt=avgname+" Killed "+villname; + rtxt1="Congratulations You Won!!!"; + rtxt2="Points Scored : "+ohpv; + mainFightPanelClose(); + } + } + public void mainFightPanelClose() + { + avgimg.setVisible(false); + villimg.setVisible(false); + a1.setVisible(false); + a2.setVisible(false); + a3.setVisible(false); + a4.setVisible(false); + fghtnm.setVisible(false); + vhpanel.setVisible(false); + ahpanel.setVisible(false); + versus.setVisible(false); + logo.setVisible(false); + + resultScreen(); + } + public void resultScreen() + { + exit.setVisible(true); + resulticon=new JLabel(new ImageIcon("Result.png")); + resulticon.setBounds(620,50,287,74); + background.add(resulticon); + + result=new JLabel(resulttxt,JLabel.CENTER); + result.setBounds(0,200,1560,79); + result.setForeground(Color.yellow); + result.setFont(new Font("Verdana", Font.PLAIN, 40)); + background.add(result); + + resultgreet=new JLabel(rtxt1,JLabel.CENTER); + resultgreet.setBounds(0,300,1560,79); + resultgreet.setForeground(Color.yellow); + resultgreet.setFont(new Font("Verdana", Font.PLAIN, 40)); + background.add(resultgreet); + + points=new JLabel(rtxt2,JLabel.CENTER); + points.setBounds(0,400,1560,79); + points.setForeground(Color.yellow); + points.setFont(new Font("Verdana", Font.PLAIN, 40)); + background.add(points); + + try + { + String fileresult=fightname+"\t\t\t"+resulttxt+"\t\t\t"+rtxt2+"\n"; + char rtext[]=fileresult.toCharArray(); + FileWriter f1 = new FileWriter("(((((Battle Log.txt",true); + f1.write(rtext); + f1.close(); + } + catch(IOException io) + { + System.out.println("IOException caught"); + } + } + + public static void main (String args[]) + { + Fight f=new Fight(); + } +} \ No newline at end of file diff --git a/Marvel Avengers Game/FileNameException.class b/Marvel Avengers Game/FileNameException.class new file mode 100644 index 00000000..a3b389aa Binary files /dev/null and b/Marvel Avengers Game/FileNameException.class differ diff --git a/Marvel Avengers Game/GameGuide$1.class b/Marvel Avengers Game/GameGuide$1.class new file mode 100644 index 00000000..bc2edd87 Binary files /dev/null and b/Marvel Avengers Game/GameGuide$1.class differ diff --git a/Marvel Avengers Game/GameGuide$2.class b/Marvel Avengers Game/GameGuide$2.class new file mode 100644 index 00000000..6218d766 Binary files /dev/null and b/Marvel Avengers Game/GameGuide$2.class differ diff --git a/Marvel Avengers Game/GameGuide$3.class b/Marvel Avengers Game/GameGuide$3.class new file mode 100644 index 00000000..78c2f923 Binary files /dev/null and b/Marvel Avengers Game/GameGuide$3.class differ diff --git a/Marvel Avengers Game/GameGuide$4.class b/Marvel Avengers Game/GameGuide$4.class new file mode 100644 index 00000000..513c7001 Binary files /dev/null and b/Marvel Avengers Game/GameGuide$4.class differ diff --git a/Marvel Avengers Game/GameGuide$5.class b/Marvel Avengers Game/GameGuide$5.class new file mode 100644 index 00000000..89da0904 Binary files /dev/null and b/Marvel Avengers Game/GameGuide$5.class differ diff --git a/Marvel Avengers Game/GameGuide$6.class b/Marvel Avengers Game/GameGuide$6.class new file mode 100644 index 00000000..38820c33 Binary files /dev/null and b/Marvel Avengers Game/GameGuide$6.class differ diff --git a/Marvel Avengers Game/GameGuide$7.class b/Marvel Avengers Game/GameGuide$7.class new file mode 100644 index 00000000..6f96f96e Binary files /dev/null and b/Marvel Avengers Game/GameGuide$7.class differ diff --git a/Marvel Avengers Game/GameGuide$8.class b/Marvel Avengers Game/GameGuide$8.class new file mode 100644 index 00000000..7b3e9261 Binary files /dev/null and b/Marvel Avengers Game/GameGuide$8.class differ diff --git a/Marvel Avengers Game/GameGuide.class b/Marvel Avengers Game/GameGuide.class new file mode 100644 index 00000000..8ef9fe49 Binary files /dev/null and b/Marvel Avengers Game/GameGuide.class differ diff --git a/Marvel Avengers Game/GameGuide.java b/Marvel Avengers Game/GameGuide.java new file mode 100644 index 00000000..723fe9f5 --- /dev/null +++ b/Marvel Avengers Game/GameGuide.java @@ -0,0 +1,159 @@ +import java.awt.*; +import javax.swing.JFrame; +import java.awt.event.*; +import javax.swing.*; + +class GameGuide extends JFrame +{ + public static int decider; + GameGuide() + { + JLabel gg,background; + JButton exit,back,av1,av2,av3,av4,v1,v2; + //declaration + setSize(1570,840); + setLayout(null); + //background image + setExtendedState(JFrame.MAXIMIZED_BOTH); + setDefaultCloseOperation(EXIT_ON_CLOSE); + ImageIcon img=new ImageIcon("BImage.png"); + background=new JLabel("",img,JLabel.CENTER); + background.setBounds(0,0,1570,770); + add(background); + //background image finish + gg=new JLabel(new ImageIcon("GameGuide.png")); + gg.setBounds(560,50,362,79); + background.add(gg); + //mmbutton + exit=new JButton(new ImageIcon("Exit.png")); + exit.setBounds(1200,650,291,79); + exit.setBackground(Color.BLACK); + background.add(exit); + //exit + + back=new JButton(new ImageIcon("backbtn.png")); + back.setBounds(0,0,100,100); + back.setBackground(Color.BLACK); + background.add(back); + + av1=new JButton(new ImageIcon("IMbtn.png")); + av1.setBounds(150,200,444,79); + av1.setBackground(Color.BLACK); + background.add(av1); + + av2=new JButton(new ImageIcon("Hbtn.png")); + av2.setBounds(900,200,444,79); + av2.setBackground(Color.BLACK); + background.add(av2); + + av3=new JButton(new ImageIcon("Tbtn.png")); + av3.setBounds(150,350,444,79); + av3.setBackground(Color.BLACK); + background.add(av3); + + av4=new JButton(new ImageIcon("CAbtn.png")); + av4.setBounds(900,350,444,79); + av4.setBackground(Color.BLACK); + background.add(av4); + + v1=new JButton(new ImageIcon("Thanosbtn.png")); + v1.setBounds(150,500,444,79); + v1.setBackground(Color.BLACK); + background.add(v1); + + v2=new JButton(new ImageIcon("Lokibtn.png")); + v2.setBounds(900,500,444,79); + v2.setBackground(Color.BLACK); + background.add(v2); + + //all actions + av1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + GameGuide.decider=1; + Description d=new Description(); + d.guideDecider(GameGuide.decider); + d.setVisible(true); + setVisible(false); + } + }); + av2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + GameGuide.decider=2; + Description d=new Description(); + d.guideDecider(GameGuide.decider); + d.setVisible(true); + setVisible(false); + } + }); + av3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + GameGuide.decider=3; + Description d=new Description(); + d.guideDecider(GameGuide.decider); + d.setVisible(true); + setVisible(false); + } + }); + av4.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + GameGuide.decider=4; + Description d=new Description(); + d.guideDecider(GameGuide.decider); + d.setVisible(true); + setVisible(false); + } + }); + v1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + GameGuide.decider=5; + Description d=new Description(); + d.guideDecider(GameGuide.decider); + d.setVisible(true); + setVisible(false); + } + }); + v2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + GameGuide.decider=6; + Description d=new Description(); + d.guideDecider(GameGuide.decider); + d.setVisible(true); + setVisible(false); + } + }); + back.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + MainMenu m=new MainMenu(); + } + }); + exit.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + System.out.println("Game Ended"); + System.exit(0); + } + }); + setVisible(true); + } + public static void main(String args[]) + { + GameGuide g=new GameGuide(); + } +} \ No newline at end of file diff --git a/Marvel Avengers Game/GameGuide.png b/Marvel Avengers Game/GameGuide.png new file mode 100644 index 00000000..ad75a1cd Binary files /dev/null and b/Marvel Avengers Game/GameGuide.png differ diff --git a/Marvel Avengers Game/H1.png b/Marvel Avengers Game/H1.png new file mode 100644 index 00000000..2a1ba275 Binary files /dev/null and b/Marvel Avengers Game/H1.png differ diff --git a/Marvel Avengers Game/H2.png b/Marvel Avengers Game/H2.png new file mode 100644 index 00000000..5b02d4cf Binary files /dev/null and b/Marvel Avengers Game/H2.png differ diff --git a/Marvel Avengers Game/H3.png b/Marvel Avengers Game/H3.png new file mode 100644 index 00000000..416ee174 Binary files /dev/null and b/Marvel Avengers Game/H3.png differ diff --git a/Marvel Avengers Game/H4.png b/Marvel Avengers Game/H4.png new file mode 100644 index 00000000..8b66cd56 Binary files /dev/null and b/Marvel Avengers Game/H4.png differ diff --git a/Marvel Avengers Game/H5.png b/Marvel Avengers Game/H5.png new file mode 100644 index 00000000..8ce6cfb3 Binary files /dev/null and b/Marvel Avengers Game/H5.png differ diff --git a/Marvel Avengers Game/H6.png b/Marvel Avengers Game/H6.png new file mode 100644 index 00000000..93803fd8 Binary files /dev/null and b/Marvel Avengers Game/H6.png differ diff --git a/Marvel Avengers Game/Ha1.png b/Marvel Avengers Game/Ha1.png new file mode 100644 index 00000000..feb60b7c Binary files /dev/null and b/Marvel Avengers Game/Ha1.png differ diff --git a/Marvel Avengers Game/Ha2.png b/Marvel Avengers Game/Ha2.png new file mode 100644 index 00000000..71c37598 Binary files /dev/null and b/Marvel Avengers Game/Ha2.png differ diff --git a/Marvel Avengers Game/Ha3.png b/Marvel Avengers Game/Ha3.png new file mode 100644 index 00000000..6e718432 Binary files /dev/null and b/Marvel Avengers Game/Ha3.png differ diff --git a/Marvel Avengers Game/Ha4.png b/Marvel Avengers Game/Ha4.png new file mode 100644 index 00000000..960a8510 Binary files /dev/null and b/Marvel Avengers Game/Ha4.png differ diff --git a/Marvel Avengers Game/Hbtn.png b/Marvel Avengers Game/Hbtn.png new file mode 100644 index 00000000..70d46cc4 Binary files /dev/null and b/Marvel Avengers Game/Hbtn.png differ diff --git a/Marvel Avengers Game/Himage.png b/Marvel Avengers Game/Himage.png new file mode 100644 index 00000000..f2e53356 Binary files /dev/null and b/Marvel Avengers Game/Himage.png differ diff --git a/Marvel Avengers Game/IM1.png b/Marvel Avengers Game/IM1.png new file mode 100644 index 00000000..d9c9a407 Binary files /dev/null and b/Marvel Avengers Game/IM1.png differ diff --git a/Marvel Avengers Game/IM2.png b/Marvel Avengers Game/IM2.png new file mode 100644 index 00000000..eea1f550 Binary files /dev/null and b/Marvel Avengers Game/IM2.png differ diff --git a/Marvel Avengers Game/IM3.png b/Marvel Avengers Game/IM3.png new file mode 100644 index 00000000..c08f6674 Binary files /dev/null and b/Marvel Avengers Game/IM3.png differ diff --git a/Marvel Avengers Game/IM4.png b/Marvel Avengers Game/IM4.png new file mode 100644 index 00000000..a0e92ae2 Binary files /dev/null and b/Marvel Avengers Game/IM4.png differ diff --git a/Marvel Avengers Game/IM5.png b/Marvel Avengers Game/IM5.png new file mode 100644 index 00000000..7cb6a2ef Binary files /dev/null and b/Marvel Avengers Game/IM5.png differ diff --git a/Marvel Avengers Game/IM6.png b/Marvel Avengers Game/IM6.png new file mode 100644 index 00000000..ea61769b Binary files /dev/null and b/Marvel Avengers Game/IM6.png differ diff --git a/Marvel Avengers Game/IMa1.png b/Marvel Avengers Game/IMa1.png new file mode 100644 index 00000000..7861358b Binary files /dev/null and b/Marvel Avengers Game/IMa1.png differ diff --git a/Marvel Avengers Game/IMa2.png b/Marvel Avengers Game/IMa2.png new file mode 100644 index 00000000..cd354cc1 Binary files /dev/null and b/Marvel Avengers Game/IMa2.png differ diff --git a/Marvel Avengers Game/IMa3.png b/Marvel Avengers Game/IMa3.png new file mode 100644 index 00000000..aadd5bcb Binary files /dev/null and b/Marvel Avengers Game/IMa3.png differ diff --git a/Marvel Avengers Game/IMa4.png b/Marvel Avengers Game/IMa4.png new file mode 100644 index 00000000..8d203cb5 Binary files /dev/null and b/Marvel Avengers Game/IMa4.png differ diff --git a/Marvel Avengers Game/IMbtn.png b/Marvel Avengers Game/IMbtn.png new file mode 100644 index 00000000..d65e8f74 Binary files /dev/null and b/Marvel Avengers Game/IMbtn.png differ diff --git a/Marvel Avengers Game/IMimage.png b/Marvel Avengers Game/IMimage.png new file mode 100644 index 00000000..273e1335 Binary files /dev/null and b/Marvel Avengers Game/IMimage.png differ diff --git a/Marvel Avengers Game/InputException.class b/Marvel Avengers Game/InputException.class new file mode 100644 index 00000000..dbb30132 Binary files /dev/null and b/Marvel Avengers Game/InputException.class differ diff --git a/Marvel Avengers Game/Introduction$1.class b/Marvel Avengers Game/Introduction$1.class new file mode 100644 index 00000000..e192aad6 Binary files /dev/null and b/Marvel Avengers Game/Introduction$1.class differ diff --git a/Marvel Avengers Game/Introduction.class b/Marvel Avengers Game/Introduction.class new file mode 100644 index 00000000..785ee8d8 Binary files /dev/null and b/Marvel Avengers Game/Introduction.class differ diff --git a/Marvel Avengers Game/Introduction.java b/Marvel Avengers Game/Introduction.java new file mode 100644 index 00000000..c54b0fed --- /dev/null +++ b/Marvel Avengers Game/Introduction.java @@ -0,0 +1,38 @@ +import java.awt.*; +import javax.swing.JFrame; +import java.awt.event.*; +import javax.swing.*; + +class Introduction extends JFrame +{ + Introduction() + { + JLabel background; + JButton play; + setSize(1570,840); + setLayout(null); + setExtendedState(JFrame.MAXIMIZED_BOTH); + setDefaultCloseOperation(EXIT_ON_CLOSE); + ImageIcon img=new ImageIcon("BackGround.jpg"); + background=new JLabel("",img,JLabel.CENTER); + background.setBounds(0,0,1570,770); + add(background); + play=new JButton(new ImageIcon("PlayGame.png")); + play.setBounds(200,500,361,79); + play.setBackground(Color.BLACK); + background.add(play); + play.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + MainMenu m=new MainMenu(); + } + }); + setVisible(true); + } + public static void main(String[] args) + { + Introduction i=new Introduction(); + } +} diff --git a/Marvel Avengers Game/L1.png b/Marvel Avengers Game/L1.png new file mode 100644 index 00000000..7f03714d Binary files /dev/null and b/Marvel Avengers Game/L1.png differ diff --git a/Marvel Avengers Game/L2.png b/Marvel Avengers Game/L2.png new file mode 100644 index 00000000..6449066f Binary files /dev/null and b/Marvel Avengers Game/L2.png differ diff --git a/Marvel Avengers Game/L3.png b/Marvel Avengers Game/L3.png new file mode 100644 index 00000000..b5d37a4d Binary files /dev/null and b/Marvel Avengers Game/L3.png differ diff --git a/Marvel Avengers Game/L4.png b/Marvel Avengers Game/L4.png new file mode 100644 index 00000000..1e39b358 Binary files /dev/null and b/Marvel Avengers Game/L4.png differ diff --git a/Marvel Avengers Game/L5.png b/Marvel Avengers Game/L5.png new file mode 100644 index 00000000..680a1cd0 Binary files /dev/null and b/Marvel Avengers Game/L5.png differ diff --git a/Marvel Avengers Game/L6.png b/Marvel Avengers Game/L6.png new file mode 100644 index 00000000..aafb6b47 Binary files /dev/null and b/Marvel Avengers Game/L6.png differ diff --git a/Marvel Avengers Game/La1.png b/Marvel Avengers Game/La1.png new file mode 100644 index 00000000..4bd50729 Binary files /dev/null and b/Marvel Avengers Game/La1.png differ diff --git a/Marvel Avengers Game/La2.png b/Marvel Avengers Game/La2.png new file mode 100644 index 00000000..b00408f6 Binary files /dev/null and b/Marvel Avengers Game/La2.png differ diff --git a/Marvel Avengers Game/La3.png b/Marvel Avengers Game/La3.png new file mode 100644 index 00000000..48974291 Binary files /dev/null and b/Marvel Avengers Game/La3.png differ diff --git a/Marvel Avengers Game/La4.png b/Marvel Avengers Game/La4.png new file mode 100644 index 00000000..4454054c Binary files /dev/null and b/Marvel Avengers Game/La4.png differ diff --git a/Marvel Avengers Game/Limage.png b/Marvel Avengers Game/Limage.png new file mode 100644 index 00000000..b4436bf7 Binary files /dev/null and b/Marvel Avengers Game/Limage.png differ diff --git a/Marvel Avengers Game/Lokibtn.png b/Marvel Avengers Game/Lokibtn.png new file mode 100644 index 00000000..336651e7 Binary files /dev/null and b/Marvel Avengers Game/Lokibtn.png differ diff --git a/Marvel Avengers Game/MMbtn.png b/Marvel Avengers Game/MMbtn.png new file mode 100644 index 00000000..f9565713 Binary files /dev/null and b/Marvel Avengers Game/MMbtn.png differ diff --git a/Marvel Avengers Game/MainMenu$1.class b/Marvel Avengers Game/MainMenu$1.class new file mode 100644 index 00000000..c21c14af Binary files /dev/null and b/Marvel Avengers Game/MainMenu$1.class differ diff --git a/Marvel Avengers Game/MainMenu$2.class b/Marvel Avengers Game/MainMenu$2.class new file mode 100644 index 00000000..70e3c82f Binary files /dev/null and b/Marvel Avengers Game/MainMenu$2.class differ diff --git a/Marvel Avengers Game/MainMenu$3.class b/Marvel Avengers Game/MainMenu$3.class new file mode 100644 index 00000000..99f9cfdf Binary files /dev/null and b/Marvel Avengers Game/MainMenu$3.class differ diff --git a/Marvel Avengers Game/MainMenu$4.class b/Marvel Avengers Game/MainMenu$4.class new file mode 100644 index 00000000..cd34d248 Binary files /dev/null and b/Marvel Avengers Game/MainMenu$4.class differ diff --git a/Marvel Avengers Game/MainMenu$5.class b/Marvel Avengers Game/MainMenu$5.class new file mode 100644 index 00000000..3cf1042a Binary files /dev/null and b/Marvel Avengers Game/MainMenu$5.class differ diff --git a/Marvel Avengers Game/MainMenu$6.class b/Marvel Avengers Game/MainMenu$6.class new file mode 100644 index 00000000..7f2e4dfd Binary files /dev/null and b/Marvel Avengers Game/MainMenu$6.class differ diff --git a/Marvel Avengers Game/MainMenu.class b/Marvel Avengers Game/MainMenu.class new file mode 100644 index 00000000..392e6239 Binary files /dev/null and b/Marvel Avengers Game/MainMenu.class differ diff --git a/Marvel Avengers Game/MainMenu.java b/Marvel Avengers Game/MainMenu.java new file mode 100644 index 00000000..1bbdede0 --- /dev/null +++ b/Marvel Avengers Game/MainMenu.java @@ -0,0 +1,116 @@ +import java.awt.*; +import javax.swing.JFrame; +import java.awt.event.*; +import javax.swing.*; + +class MainMenu extends JFrame +{ + MainMenu() + { + JLabel mm,background,logo; + JButton pg,gg,rg,c,exit,back; + //declaration + setSize(1570,840); + setLayout(null); + //background image + setExtendedState(JFrame.MAXIMIZED_BOTH); + setDefaultCloseOperation(EXIT_ON_CLOSE); + ImageIcon img=new ImageIcon("BImage.png"); + background=new JLabel("",img,JLabel.CENTER); + background.setBounds(0,0,1570,770); + add(background); + logo=new JLabel(new ImageIcon("logo.png")); + logo.setBounds(645,280,214,236); + background.add(logo); + //background image finish + mm=new JLabel(new ImageIcon("MMbtn.png")); + mm.setBounds(620,50,266,79); + background.add(mm); + //mmbutton + pg=new JButton(new ImageIcon("PlayGame.png")); + pg.setBounds(150,250,361,79); + pg.setBackground(Color.BLACK); + background.add(pg); + //play game button + gg=new JButton(new ImageIcon("GameGuide.png")); + gg.setBounds(995,250,360,79); + gg.setBackground(Color.BLACK); + background.add(gg); + //game Guide + rg=new JButton(new ImageIcon("RateGame.png")); + rg.setBounds(150,500,360,79); + rg.setBackground(Color.BLACK); + background.add(rg); + //rate game + c=new JButton(new ImageIcon("Credits.png")); + c.setBounds(995,500,360,79); + c.setBackground(Color.BLACK); + background.add(c); + //credits + exit=new JButton(new ImageIcon("Exit.png")); + exit.setBounds(610,600,291,79); + exit.setBackground(Color.BLACK); + background.add(exit); + //exit + back=new JButton(new ImageIcon("backbtn.png")); + back.setBounds(0,0,100,100); + back.setBackground(Color.BLACK); + background.add(back); + + //all Actions + back.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + Introduction i=new Introduction(); + } + }); + pg.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + Fight f=new Fight(); + } + }); + gg.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + GameGuide gg=new GameGuide(); + } + }); + rg.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + Reviews r=new Reviews(); + } + }); + c.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + Credits c=new Credits(); + } + }); + exit.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + System.out.println("Game Ended"); + System.exit(0); + } + }); + setVisible(true); + } + public static void main (String args[]) + { + MainMenu m=new MainMenu(); + } +} \ No newline at end of file diff --git a/Marvel Avengers Game/Marvel's Avengers Game - Main Theme.wav b/Marvel Avengers Game/Marvel's Avengers Game - Main Theme.wav new file mode 100644 index 00000000..8622a5a6 Binary files /dev/null and b/Marvel Avengers Game/Marvel's Avengers Game - Main Theme.wav differ diff --git a/Marvel Avengers Game/PlayGame.class b/Marvel Avengers Game/PlayGame.class new file mode 100644 index 00000000..9c037756 Binary files /dev/null and b/Marvel Avengers Game/PlayGame.class differ diff --git a/Marvel Avengers Game/PlayGame.java b/Marvel Avengers Game/PlayGame.java new file mode 100644 index 00000000..2aef090f --- /dev/null +++ b/Marvel Avengers Game/PlayGame.java @@ -0,0 +1,7 @@ +class PlayGame +{ + public static void main(String args[]) + { + Introduction i=new Introduction(); + } +} \ No newline at end of file diff --git a/Marvel Avengers Game/PlayGame.png b/Marvel Avengers Game/PlayGame.png new file mode 100644 index 00000000..da7778bc Binary files /dev/null and b/Marvel Avengers Game/PlayGame.png differ diff --git a/Marvel Avengers Game/PlayGameWithMusic.class b/Marvel Avengers Game/PlayGameWithMusic.class new file mode 100644 index 00000000..5d007615 Binary files /dev/null and b/Marvel Avengers Game/PlayGameWithMusic.class differ diff --git a/Marvel Avengers Game/PlayGameWithMusic.java b/Marvel Avengers Game/PlayGameWithMusic.java new file mode 100644 index 00000000..6f8d748f --- /dev/null +++ b/Marvel Avengers Game/PlayGameWithMusic.java @@ -0,0 +1,17 @@ +import java.io.File; +import java.io.IOException; +import java.util.Scanner; +import javax.sound.sampled.*; + +public class PlayGameWithMusic +{ + public static void main(String[] args) throws UnsupportedAudioFileException, IOException, LineUnavailableException + { + File file = new File("Marvel's Avengers Game - Main Theme.wav"); + AudioInputStream audioStream = AudioSystem.getAudioInputStream(file); + Clip clip = AudioSystem.getClip(); + clip.open(audioStream); + clip.loop(Clip.LOOP_CONTINUOUSLY); + Introduction i=new Introduction(); + } +} diff --git a/Marvel Avengers Game/Rate.png b/Marvel Avengers Game/Rate.png new file mode 100644 index 00000000..3d6ab3b8 Binary files /dev/null and b/Marvel Avengers Game/Rate.png differ diff --git a/Marvel Avengers Game/RateGame.png b/Marvel Avengers Game/RateGame.png new file mode 100644 index 00000000..2e3dc406 Binary files /dev/null and b/Marvel Avengers Game/RateGame.png differ diff --git a/Marvel Avengers Game/Result.png b/Marvel Avengers Game/Result.png new file mode 100644 index 00000000..a0423020 Binary files /dev/null and b/Marvel Avengers Game/Result.png differ diff --git a/Marvel Avengers Game/Reviews$1.class b/Marvel Avengers Game/Reviews$1.class new file mode 100644 index 00000000..bd9994b3 Binary files /dev/null and b/Marvel Avengers Game/Reviews$1.class differ diff --git a/Marvel Avengers Game/Reviews$2.class b/Marvel Avengers Game/Reviews$2.class new file mode 100644 index 00000000..9802bdb2 Binary files /dev/null and b/Marvel Avengers Game/Reviews$2.class differ diff --git a/Marvel Avengers Game/Reviews$3.class b/Marvel Avengers Game/Reviews$3.class new file mode 100644 index 00000000..50f379ed Binary files /dev/null and b/Marvel Avengers Game/Reviews$3.class differ diff --git a/Marvel Avengers Game/Reviews.class b/Marvel Avengers Game/Reviews.class new file mode 100644 index 00000000..1fc270fc Binary files /dev/null and b/Marvel Avengers Game/Reviews.class differ diff --git a/Marvel Avengers Game/Reviews.java b/Marvel Avengers Game/Reviews.java new file mode 100644 index 00000000..328dee8d --- /dev/null +++ b/Marvel Avengers Game/Reviews.java @@ -0,0 +1,136 @@ +import java.awt.*; +import javax.swing.JFrame; +import java.awt.event.*; +import javax.swing.*; +import java.io.*; + +class Reviews extends JFrame +{ + Reviews() + { + JLabel re,background,rgtxt1,rgtxt2,rgtxt3; + JTextField tf1,tf2; + JTextArea ta3; + JButton submit,exit,back; + Font f1,f2,f3; + //declaration + setSize(1570,840); + setLayout(null); + //background image + setExtendedState(JFrame.MAXIMIZED_BOTH); + setDefaultCloseOperation(EXIT_ON_CLOSE); + ImageIcon img=new ImageIcon("BImage.png"); + background=new JLabel("",img,JLabel.CENTER); + background.setBounds(0,0,1570,770); + add(background); + //background image finish + re=new JLabel(new ImageIcon("RateGame.png")); + re.setBounds(580,50,362,79); + background.add(re); + //mmbutton + submit=new JButton(new ImageIcon("Submit.png")); + submit.setBounds(610,600,291,79); + submit.setBackground(Color.BLACK); + background.add(submit); + + exit=new JButton(new ImageIcon("Exit.png")); + exit.setBounds(610,600,291,79); + exit.setBackground(Color.BLACK); + background.add(exit); + exit.setVisible(false); + //exit + back=new JButton(new ImageIcon("backbtn.png")); + back.setBounds(0,0,100,100); + back.setBackground(Color.BLACK); + background.add(back); + + rgtxt1=new JLabel(new ImageIcon("rgtxt1.png")); + rgtxt1.setBounds(225,175,274,73); + background.add(rgtxt1); + + rgtxt2=new JLabel(new ImageIcon("rgtxt2.png")); + rgtxt2.setBounds(225,275,296,73); + background.add(rgtxt2); + + rgtxt3=new JLabel(new ImageIcon("rgtxt3.png")); + rgtxt3.setBounds(225,375,200,73); + background.add(rgtxt3); + + //fonts + f1=new Font("SansSerif",Font.BOLD,35); + f2=new Font("SansSerif",Font.BOLD,35); + f3=new Font("SansSerif",Font.BOLD,35); + + //textfield and areas + tf1=new JTextField(); + tf1.setBounds(600,180,500,50); + tf1.setFont(f1); + background.add(tf1); + + tf2=new JTextField(); + tf2.setBounds(600,280,500,50); + tf2.setFont(f2); + background.add(tf2); + + ta3=new JTextArea(); + ta3.setBounds(600,380,500,150); + ta3.setFont(f3); + background.add(ta3); + + back.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + MainMenu m=new MainMenu(); + } + }); + submit.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + String vtf1=tf1.getText(); + String vtf2=tf2.getText(); + + if(vtf1.trim().equals("")||vtf2.trim().equals("")) + { + System.out.println("Enter All Fields"); + submit.setVisible(true); + exit.setVisible(false); + } + else + { + submit.setVisible(false); + exit.setVisible(true); + try + { + String reviewfile=tf1.getText()+"\t\t\t"+tf2.getText()+"\t\t\t"+ta3.getText()+"\n"; + char reviewtext[]=reviewfile.toCharArray(); + FileWriter f = new FileWriter("(((((Reviews.txt",true); + f.write(reviewtext); + f.close(); + } + catch(IOException io) + { + System.out.println("IOException caught"); + } + } + } + }); + //all actions + exit.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent ae) + { + setVisible(false); + System.out.println("Game Ended"); + System.exit(0); + } + }); + setVisible(true); + } + public static void main (String args[]) + { + Reviews r=new Reviews(); + } +} \ No newline at end of file diff --git a/Marvel Avengers Game/Submit.png b/Marvel Avengers Game/Submit.png new file mode 100644 index 00000000..0d88e1da Binary files /dev/null and b/Marvel Avengers Game/Submit.png differ diff --git a/Marvel Avengers Game/T1.png b/Marvel Avengers Game/T1.png new file mode 100644 index 00000000..cb029160 Binary files /dev/null and b/Marvel Avengers Game/T1.png differ diff --git a/Marvel Avengers Game/T2.png b/Marvel Avengers Game/T2.png new file mode 100644 index 00000000..2500ecd5 Binary files /dev/null and b/Marvel Avengers Game/T2.png differ diff --git a/Marvel Avengers Game/T3.png b/Marvel Avengers Game/T3.png new file mode 100644 index 00000000..69628fe8 Binary files /dev/null and b/Marvel Avengers Game/T3.png differ diff --git a/Marvel Avengers Game/T4.png b/Marvel Avengers Game/T4.png new file mode 100644 index 00000000..cd38c718 Binary files /dev/null and b/Marvel Avengers Game/T4.png differ diff --git a/Marvel Avengers Game/T5.png b/Marvel Avengers Game/T5.png new file mode 100644 index 00000000..c510c7ab Binary files /dev/null and b/Marvel Avengers Game/T5.png differ diff --git a/Marvel Avengers Game/T6.png b/Marvel Avengers Game/T6.png new file mode 100644 index 00000000..619eb61a Binary files /dev/null and b/Marvel Avengers Game/T6.png differ diff --git a/Marvel Avengers Game/TH1.png b/Marvel Avengers Game/TH1.png new file mode 100644 index 00000000..5c464cbe Binary files /dev/null and b/Marvel Avengers Game/TH1.png differ diff --git a/Marvel Avengers Game/TH2.png b/Marvel Avengers Game/TH2.png new file mode 100644 index 00000000..1804134b Binary files /dev/null and b/Marvel Avengers Game/TH2.png differ diff --git a/Marvel Avengers Game/TH3.png b/Marvel Avengers Game/TH3.png new file mode 100644 index 00000000..dcbaa6d2 Binary files /dev/null and b/Marvel Avengers Game/TH3.png differ diff --git a/Marvel Avengers Game/TH4.png b/Marvel Avengers Game/TH4.png new file mode 100644 index 00000000..dfa20295 Binary files /dev/null and b/Marvel Avengers Game/TH4.png differ diff --git a/Marvel Avengers Game/TH5.png b/Marvel Avengers Game/TH5.png new file mode 100644 index 00000000..bca17bc7 Binary files /dev/null and b/Marvel Avengers Game/TH5.png differ diff --git a/Marvel Avengers Game/TH6.png b/Marvel Avengers Game/TH6.png new file mode 100644 index 00000000..7360e5f5 Binary files /dev/null and b/Marvel Avengers Game/TH6.png differ diff --git a/Marvel Avengers Game/THa1.png b/Marvel Avengers Game/THa1.png new file mode 100644 index 00000000..a401ad29 Binary files /dev/null and b/Marvel Avengers Game/THa1.png differ diff --git a/Marvel Avengers Game/THa2.png b/Marvel Avengers Game/THa2.png new file mode 100644 index 00000000..5fd492a7 Binary files /dev/null and b/Marvel Avengers Game/THa2.png differ diff --git a/Marvel Avengers Game/THa3.png b/Marvel Avengers Game/THa3.png new file mode 100644 index 00000000..156122da Binary files /dev/null and b/Marvel Avengers Game/THa3.png differ diff --git a/Marvel Avengers Game/THa4.png b/Marvel Avengers Game/THa4.png new file mode 100644 index 00000000..c7541b44 Binary files /dev/null and b/Marvel Avengers Game/THa4.png differ diff --git a/Marvel Avengers Game/Ta1.png b/Marvel Avengers Game/Ta1.png new file mode 100644 index 00000000..941a1d23 Binary files /dev/null and b/Marvel Avengers Game/Ta1.png differ diff --git a/Marvel Avengers Game/Ta2.png b/Marvel Avengers Game/Ta2.png new file mode 100644 index 00000000..6830b37c Binary files /dev/null and b/Marvel Avengers Game/Ta2.png differ diff --git a/Marvel Avengers Game/Ta3.png b/Marvel Avengers Game/Ta3.png new file mode 100644 index 00000000..1a618436 Binary files /dev/null and b/Marvel Avengers Game/Ta3.png differ diff --git a/Marvel Avengers Game/Ta4.png b/Marvel Avengers Game/Ta4.png new file mode 100644 index 00000000..9bab51de Binary files /dev/null and b/Marvel Avengers Game/Ta4.png differ diff --git a/Marvel Avengers Game/Tbtn.png b/Marvel Avengers Game/Tbtn.png new file mode 100644 index 00000000..37b3dc76 Binary files /dev/null and b/Marvel Avengers Game/Tbtn.png differ diff --git a/Marvel Avengers Game/Thanosbtn.png b/Marvel Avengers Game/Thanosbtn.png new file mode 100644 index 00000000..1e9b7bb3 Binary files /dev/null and b/Marvel Avengers Game/Thanosbtn.png differ diff --git a/Marvel Avengers Game/Thimage.png b/Marvel Avengers Game/Thimage.png new file mode 100644 index 00000000..d28d1c78 Binary files /dev/null and b/Marvel Avengers Game/Thimage.png differ diff --git a/Marvel Avengers Game/Timage.png b/Marvel Avengers Game/Timage.png new file mode 100644 index 00000000..cd0a69b0 Binary files /dev/null and b/Marvel Avengers Game/Timage.png differ diff --git a/Marvel Avengers Game/Versus.png b/Marvel Avengers Game/Versus.png new file mode 100644 index 00000000..54fb5722 Binary files /dev/null and b/Marvel Avengers Game/Versus.png differ diff --git a/Marvel Avengers Game/ac.png b/Marvel Avengers Game/ac.png new file mode 100644 index 00000000..6ad802bb Binary files /dev/null and b/Marvel Avengers Game/ac.png differ diff --git a/Marvel Avengers Game/alogo.png b/Marvel Avengers Game/alogo.png new file mode 100644 index 00000000..7035498b Binary files /dev/null and b/Marvel Avengers Game/alogo.png differ diff --git a/Marvel Avengers Game/backbtn.png b/Marvel Avengers Game/backbtn.png new file mode 100644 index 00000000..606a8c32 Binary files /dev/null and b/Marvel Avengers Game/backbtn.png differ diff --git a/Marvel Avengers Game/logo.png b/Marvel Avengers Game/logo.png new file mode 100644 index 00000000..95b9964d Binary files /dev/null and b/Marvel Avengers Game/logo.png differ diff --git a/Marvel Avengers Game/rgtxt1.png b/Marvel Avengers Game/rgtxt1.png new file mode 100644 index 00000000..80a11035 Binary files /dev/null and b/Marvel Avengers Game/rgtxt1.png differ diff --git a/Marvel Avengers Game/rgtxt2.png b/Marvel Avengers Game/rgtxt2.png new file mode 100644 index 00000000..fa135f95 Binary files /dev/null and b/Marvel Avengers Game/rgtxt2.png differ diff --git a/Marvel Avengers Game/rgtxt3.png b/Marvel Avengers Game/rgtxt3.png new file mode 100644 index 00000000..23cba353 Binary files /dev/null and b/Marvel Avengers Game/rgtxt3.png differ diff --git a/Marvel Avengers Game/txt1.png b/Marvel Avengers Game/txt1.png new file mode 100644 index 00000000..eb6e4b6d Binary files /dev/null and b/Marvel Avengers Game/txt1.png differ diff --git a/Marvel Avengers Game/txt2.png b/Marvel Avengers Game/txt2.png new file mode 100644 index 00000000..a2e9bf05 Binary files /dev/null and b/Marvel Avengers Game/txt2.png differ diff --git a/Marvel Avengers Game/txt3.png b/Marvel Avengers Game/txt3.png new file mode 100644 index 00000000..e746c5fb Binary files /dev/null and b/Marvel Avengers Game/txt3.png differ diff --git a/Marvel Avengers Game/txt4.png b/Marvel Avengers Game/txt4.png new file mode 100644 index 00000000..b1758f12 Binary files /dev/null and b/Marvel Avengers Game/txt4.png differ diff --git a/Marvel Avengers Game/vc.png b/Marvel Avengers Game/vc.png new file mode 100644 index 00000000..e71a966e Binary files /dev/null and b/Marvel Avengers Game/vc.png differ diff --git a/Matrix_add.java b/Matrix_add.java new file mode 100644 index 00000000..7bcbf9c9 --- /dev/null +++ b/Matrix_add.java @@ -0,0 +1,38 @@ +import java.util.*; +public class matrixAdd { + public static void main(String[] args) { + int m,n; + Scanner s = new Scanner(System.in); + System.out.println("Enter the rows of matrix: "); + m = s.nextInt(); + System.out.println("Enter the columns of matrix: "); + n = s.nextInt(); + + int a[][] = new int[m][n]; + int b[][] = new int[m][n]; + int c[][] = new int[m][n]; + + System.out.println("Enter the elements of 1st matrix "); + for(int i=0;i<m;i++){ + for(int j=0;j<n;j++){ + a[i][j]=s.nextInt(); + } + } + + System.out.println("Enter the elements of 2nd matrix "); + for(int i=0;i<m;i++){ + for(int j=0;j<n;j++){ + b[i][j]=s.nextInt(); + } + } + System.out.println("The addition of the above matrices is: "); + for(int i=0;i<m;i++){ + for(int j=0;j<n;j++){ + c[i][j]=a[i][j]+b[i][j]; + System.out.print(c[i][j]+ " "); + } + System.out.println(); + } + + } +} diff --git a/Maze Game Project b/Maze Game Project new file mode 100644 index 00000000..4e3f9beb --- /dev/null +++ b/Maze Game Project @@ -0,0 +1,96 @@ +import java.util.Scanner; + +public class MazeGame { + + private static final int WALL = '#'; + private static final int PLAYER = 'P'; + private static final int EXIT = 'X'; + + private static char[][] maze; + private static int playerRow; + private static int playerCol; + + public static void main(String[] args) { + // Load the maze + maze = new char[][]{{'#', '#', '#', '#', '#'}, + {'#', ' ', ' ', ' ', '#'}, + {'#', ' ', '#', '#', '#'}, + {'#', ' ', ' ', ' ', '#'}, + {'#', '#', '#', '#', '#'}}; + + // Initialize the player position + playerRow = 1; + playerCol = 1; + + // Play the game + while (true) { + // Print the maze + printMaze(); + + // Get the player's move + Scanner scanner = new Scanner(System.in); + char move = scanner.next().charAt(0); + + // Move the player + switch (move) { + case 'w': + moveUp(); + break; + case 'a': + moveLeft(); + break; + case 's': + moveDown(); + break; + case 'd': + moveRight(); + break; + } + + // Check if the player has won + if (maze[playerRow][playerCol] == EXIT) { + System.out.println("You won!"); + break; + } + + // Check if the player has hit a wall + if (maze[playerRow][playerCol] == WALL) { + System.out.println("You hit a wall!"); + break; + } + } + } + + private static void printMaze() { + for (int i = 0; i < maze.length; i++) { + for (int j = 0; j < maze[0].length; j++) { + System.out.print(maze[i][j]); + } + System.out.println(); + } + } + + private static void moveUp() { + if (playerRow > 0) { + playerRow--; + } + } + + private static void moveLeft() { + if (playerCol > 0) { + playerCol--; + } + } + + private static void moveDown() { + if (playerRow < maze.length - 1) { + playerRow++; + } + } + + private static void moveRight() { + if (playerCol < maze[0].length - 1) { + playerCol++; + } + } +} diff --git a/Median_of_Two_Sorted_Arrays.java b/Median_of_Two_Sorted_Arrays.java new file mode 100644 index 00000000..a23d5cd3 --- /dev/null +++ b/Median_of_Two_Sorted_Arrays.java @@ -0,0 +1,35 @@ +import java.util.Arrays; + +class Solution { + public double findMedianSortedArrays(int[] nums1, int[] nums2) { + // Get the sizes of both input arrays. + int n = nums1.length; + int m = nums2.length; + + // Merge the arrays into a single sorted array. + int[] merged = new int[n + m]; + int k = 0; + for (int i = 0; i < n; i++) { + merged[k++] = nums1[i]; + } + for (int i = 0; i < m; i++) { + merged[k++] = nums2[i]; + } + + // Sort the merged array. + Arrays.sort(merged); + + // Calculate the total number of elements in the merged array. + int total = merged.length; + + if (total % 2 == 1) { + // If the total number of elements is odd, return the middle element as the median. + return (double) merged[total / 2]; + } else { + // If the total number of elements is even, calculate the average of the two middle elements as the median. + int middle1 = merged[total / 2 - 1]; + int middle2 = merged[total / 2]; + return ((double) middle1 + (double) middle2) / 2.0; + } + } +} diff --git a/Medical Store Shop System + Database + Jar Files/Database/medical_store.sql b/Medical Store Shop System + Database + Jar Files/Database/medical_store.sql new file mode 100644 index 00000000..ffebfe80 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Database/medical_store.sql @@ -0,0 +1,144 @@ +-- MySQL dump 10.13 Distrib 8.0.29, for Win64 (x86_64) +-- +-- Host: localhost Database: medical_store +-- ------------------------------------------------------ +-- Server version 8.0.29 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!50503 SET NAMES utf8mb4 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `company` +-- + +DROP TABLE IF EXISTS `company`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `company` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `phone` varchar(100) NOT NULL, + `email` varchar(100) NOT NULL, + `address` varchar(100) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `company` +-- + +LOCK TABLES `company` WRITE; +/*!40000 ALTER TABLE `company` DISABLE KEYS */; +INSERT INTO `company` VALUES (1,'Navana','942903','Navana@gmail.com','India'),(2,'Squre','823234777','Squre@gmail.com','Tangail'); +/*!40000 ALTER TABLE `company` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `medicines` +-- + +DROP TABLE IF EXISTS `medicines`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `medicines` ( + `id` int NOT NULL AUTO_INCREMENT, + `medicine_name` varchar(50) NOT NULL, + `medicine_type` varchar(100) NOT NULL, + `company_name` varchar(100) NOT NULL, + `price_per_unit` int NOT NULL, + `stock` int NOT NULL, + `current_stock` int NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `medicines` +-- + +LOCK TABLES `medicines` WRITE; +/*!40000 ALTER TABLE `medicines` DISABLE KEYS */; +INSERT INTO `medicines` VALUES (1,'Napa','Tablet','Beximco Pharmaceuticals Ltd.',8,100,90),(2,'Cab-5','Relax','Opsonine',5,200,100),(3,'Napa Extra','PainKiller','Squre',50,150,149),(37,'Dexpoten','Syrup','Eskayef Bangladesh Ltd.',55,260,10),(38,'Napa','Tablet','Beximco Pharmaceuticals Ltd.',50,110,99),(39,'Seclo','Capsule','Omeprazole',5,75,59),(40,'Arotril','Tablet','Aristopharma Limited',50,16,16); +/*!40000 ALTER TABLE `medicines` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `sellsrecord` +-- + +DROP TABLE IF EXISTS `sellsrecord`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `sellsrecord` ( + `no` int NOT NULL AUTO_INCREMENT, + `mediId` int NOT NULL, + `name` varchar(100) NOT NULL, + `quantity` int NOT NULL, + `price` int NOT NULL, + `totalBill` int NOT NULL, + PRIMARY KEY (`no`) +) ENGINE=InnoDB AUTO_INCREMENT=142 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `sellsrecord` +-- + +LOCK TABLES `sellsrecord` WRITE; +/*!40000 ALTER TABLE `sellsrecord` DISABLE KEYS */; +INSERT INTO `sellsrecord` VALUES (48,38,'Napa',5,5,25),(49,39,'Seclo',5,10,50),(50,40,'Arotril',5,5,25),(51,39,'Seclo',5,10,50),(52,39,'Seclo',5,5,25),(53,38,'Napa',50,10,500),(54,40,'Arotril',50,5,250),(55,39,'Seclo',5,10,50),(56,38,'Napa',50,1,50),(57,39,'Seclo',5,13,65),(58,38,'Napa',50,5,250),(59,39,'Seclo',5,10,50),(60,37,'Dexpoten',55,5,275),(61,39,'Seclo',5,10,50),(62,2,'Cab-5',5,5,25),(63,37,'Dexpoten',55,10,550),(64,39,'Seclo',5,10,50),(65,2,'Cab-5',5,10,50),(66,39,'Seclo',5,10,50),(67,3,'Napa Extra',50,10,500),(68,3,'Napa Extra',50,10,500),(69,3,'Napa Extra',50,10,500),(70,3,'Napa Extra',50,50,2500),(71,3,'Napa Extra',50,25,1250),(72,3,'Napa Extra',50,30,1500),(73,39,'Seclo',5,1,5),(74,3,'Napa Extra',50,4,200),(75,3,'Napa Extra',50,4,200),(76,3,'Napa Extra',50,3,150),(77,3,'Napa Extra',50,3,150),(78,3,'Napa Extra',50,3,150),(79,3,'Napa Extra',50,2,100),(80,3,'Napa Extra',50,8,400),(81,3,'Napa Extra',50,8,400),(82,3,'Napa Extra',50,8,400),(83,3,'Napa Extra',50,8,400),(84,3,'Napa Extra',50,7,350),(85,3,'Napa Extra',50,6,300),(86,3,'Napa Extra',50,5,250),(87,37,'Dexpoten',55,10,550),(88,39,'Seclo',5,10,50),(89,38,'Napa',50,17,850),(90,38,'Napa',50,15,750),(91,38,'Napa',50,44,2200),(92,2,'Cab-5',5,10,50),(93,40,'Arotril',50,5,250),(94,40,'Arotril',50,4,200),(95,39,'Seclo',5,10,50),(96,39,'Seclo',5,10,50),(97,39,'Seclo',5,10,50),(98,39,'Seclo',68,10,680),(99,3,'Napa Extra',50,5,250),(100,37,'Dexpoten',55,10,550),(101,37,'Dexpoten',55,9,495),(102,37,'Dexpoten',8,55,440),(103,38,'Napa',30,50,1500),(104,37,'Dexpoten',75,55,4125),(105,37,'Dexpoten',74,55,4070),(106,3,'Napa Extra',4,50,200),(107,3,'Napa Extra',4,50,200),(108,3,'Napa Extra',46,50,2300),(109,3,'Napa Extra',10,50,500),(110,3,'Napa Extra',2,50,100),(111,2,'Cab-5',2,5,10),(112,3,'Napa Extra',2,50,100),(113,3,'Napa Extra',2,50,100),(114,3,'Napa Extra',2,50,100),(115,2,'Cab-5',5,5,25),(116,41,'nirjor',10,50000,500000),(117,41,'nirjor',10,50000,500000),(118,41,'nirjor',11,50000,550000),(119,40,'Arotril',41,50,2050),(120,38,'Napa',10,50,500),(121,37,'Dexpoten',10,55,550),(122,39,'Seclo',104,5,520),(123,40,'Arotril',89,50,4450),(124,38,'Napa',10,50,500),(125,39,'Seclo',10,5,50),(126,38,'Napa',1,50,50),(127,40,'Arotril',10,50,500),(128,40,'Arotril',10,50,500),(129,40,'Arotril',15,50,750),(130,1,'Napa',10,8,80),(131,41,'skba',10,5,50),(132,41,'skba',3,5,15),(133,41,'skba',9,5,45),(134,41,'skba',8,5,40),(135,41,'skba',5,5,25),(136,39,'Seclo',6,5,30),(137,2,'Cab-5',200,10,2000),(138,42,'asd',100,11,1100),(139,42,'asd',8,12,96),(140,42,'asd',2,12,24),(141,3,'Napa Extra',1,50,50); +/*!40000 ALTER TABLE `sellsrecord` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `users` +-- + +DROP TABLE IF EXISTS `users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!50503 SET character_set_client = utf8mb4 */; +CREATE TABLE `users` ( + `id` int NOT NULL AUTO_INCREMENT, + `username` varchar(100) NOT NULL, + `password` varchar(16) NOT NULL, + `first_name` varchar(100) NOT NULL, + `last_name` varchar(100) NOT NULL, + `user_type` int NOT NULL DEFAULT '0', + `address` text NOT NULL, + `mobile` varchar(15) NOT NULL, + `gender` text NOT NULL, + `dob` varchar(20) NOT NULL, + `mail` varchar(100) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `users` +-- + +LOCK TABLES `users` WRITE; +/*!40000 ALTER TABLE `users` DISABLE KEYS */; +INSERT INTO `users` VALUES (3,'admin','admin','saad','sabit',1,'home','123456','male','1-1-1990','admin@gmail.com'),(5,'asus','asus','asus','asus',0,'asus,asus','1234567890','male','Jul 1, 2016','asus@gmail.com'); +/*!40000 ALTER TABLE `users` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2022-08-27 17:23:40 diff --git a/Medical Store Shop System + Database + Jar Files/Jar Files/commons-dbutils-1.5.jar b/Medical Store Shop System + Database + Jar Files/Jar Files/commons-dbutils-1.5.jar new file mode 100644 index 00000000..b0c0e122 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Jar Files/commons-dbutils-1.5.jar differ diff --git a/Medical Store Shop System + Database + Jar Files/Jar Files/jcalendar-1.3.3.jar b/Medical Store Shop System + Database + Jar Files/Jar Files/jcalendar-1.3.3.jar new file mode 100644 index 00000000..2e13b771 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Jar Files/jcalendar-1.3.3.jar differ diff --git a/Medical Store Shop System + Database + Jar Files/Jar Files/mysql-connector-java-8.0.11.jar b/Medical Store Shop System + Database + Jar Files/Jar Files/mysql-connector-java-8.0.11.jar new file mode 100644 index 00000000..c8b8b3fc Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Jar Files/mysql-connector-java-8.0.11.jar differ diff --git a/Medical Store Shop System + Database + Jar Files/Jar Files/rs2xml.jar b/Medical Store Shop System + Database + Jar Files/Jar Files/rs2xml.jar new file mode 100644 index 00000000..75d9c622 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Jar Files/rs2xml.jar differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$1.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$1.class new file mode 100644 index 00000000..09a5b937 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$1.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$2.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$2.class new file mode 100644 index 00000000..f8d11d9b Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$2.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$3.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$3.class new file mode 100644 index 00000000..f88e310e Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$3.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$4.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$4.class new file mode 100644 index 00000000..8377bc09 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$4.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$5.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$5.class new file mode 100644 index 00000000..0a6b8e7a Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$5.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$6.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$6.class new file mode 100644 index 00000000..71c3b703 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$6.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$7.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$7.class new file mode 100644 index 00000000..87cb94c3 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$7.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$8.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$8.class new file mode 100644 index 00000000..3fa4cd8c Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$8.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$9.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$9.class new file mode 100644 index 00000000..5f4d17e1 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel$9.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel.class new file mode 100644 index 00000000..0e51e4c1 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel.form new file mode 100644 index 00000000..54ad0850 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/AdminPanel.form @@ -0,0 +1,277 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" pref="796" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <Component id="jButton1" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Component id="jScrollPane1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel1" min="-2" pref="86" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jButton1" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jScrollPane1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="12" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Admin Panel"/> + </Properties> + </Component> + <Container class="javax.swing.JPanel" name="jPanel2"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="deleteUserBtn" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="updateUserBtn" min="-2" max="-2" attributes="0"/> + <Component id="addUserBtn" alignment="0" min="-2" pref="93" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="14" max="32767" attributes="0"/> + <Component id="addUserBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="updateUserBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="deleteUserBtn" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="deleteUserBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Del User"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteUserBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="updateUserBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Update User"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="updateUserBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="addUserBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Add User "/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="addUserBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="adminTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="3" rowCount="0"> + <Column editable="true" title="User Name" type="java.lang.Object"/> + <Column editable="true" title="Password" type="java.lang.Object"/> + <Column editable="true" title="User Type" type="java.lang.Object"/> + </Table> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="adminTableMouseClicked"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="passwordFld" alignment="1" max="32767" attributes="0"/> + <Component id="userNameFld" alignment="1" max="32767" attributes="0"/> + <Component id="idFld" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="passwordLbl" min="-2" max="-2" attributes="0"/> + <Component id="userTypeLbl" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="userNameLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="idLbl" min="-2" pref="27" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="119" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="userTypeBox" max="32767" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="usertypeFld" min="-2" pref="28" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="idLbl" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="16" max="-2" attributes="0"/> + <Component id="idFld" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="userNameLbl" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="userNameFld" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="passwordLbl" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="passwordFld" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="userTypeLbl" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="userTypeBox" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="usertypeFld" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="idLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Id"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="idFld"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="idFldActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="userNameLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="User Name"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="userNameFld"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="userNameFldActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="passwordLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Password"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="passwordFld"> + </Component> + <Component class="javax.swing.JLabel" name="userTypeLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="User Type"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="userTypeBox"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="3"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="User"/> + <StringItem index="2" value="Admin"/> + </StringArray> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="userTypeBoxActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JTextField" name="usertypeFld"> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$1.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$1.class new file mode 100644 index 00000000..416ffbce Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$1.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$2.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$2.class new file mode 100644 index 00000000..4de8909e Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$2.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$3.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$3.class new file mode 100644 index 00000000..c9276ad9 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$3.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$4.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$4.class new file mode 100644 index 00000000..5ac99e16 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$4.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$5.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$5.class new file mode 100644 index 00000000..877c507e Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$5.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$6.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$6.class new file mode 100644 index 00000000..dcaafed0 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$6.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$7.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$7.class new file mode 100644 index 00000000..16ac9fd0 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies$7.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies.class new file mode 100644 index 00000000..9f0bcc9a Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies.form new file mode 100644 index 00000000..b96c5ecd --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Companies.form @@ -0,0 +1,273 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" pref="761" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="backBtn" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Component id="comInsertBtn" min="-2" pref="67" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="comUpdateBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="comDelBtn" min="-2" pref="67" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + <Component id="jScrollPane1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel1" min="-2" pref="60" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jPanel2" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="comInsertBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="comUpdateBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="comDelBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="42" max="-2" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jScrollPane1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="25" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value=" Companies"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="comTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="4" rowCount="0"> + <Column editable="true" title="Company Name" type="java.lang.Object"/> + <Column editable="true" title="Company Phone" type="java.lang.Object"/> + <Column editable="true" title="Company Email" type="java.lang.Object"/> + <Column editable="true" title="Company Address" type="java.lang.Object"/> + </Table> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="comTableMouseClicked"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="backBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="comInsertBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Insert"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comInsertBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="comUpdateBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Update"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comUpdateBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="comDelBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Delete"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comDelBtnActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JPanel" name="jPanel2"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="idLbl" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="22" pref="22" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="idFld" max="32767" attributes="0"/> + <Component id="comName" max="32767" attributes="0"/> + </Group> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="comNum" max="32767" attributes="0"/> + <Component id="jScrollPane2" pref="0" max="32767" attributes="0"/> + <Component id="comMail" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace pref="95" max="32767" attributes="0"/> + <Component id="clearBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="51" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="idLbl" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="idFld" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="comName" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="comNum" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="comMail" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane2" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="clearBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="idLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Id"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="Name"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="text" type="java.lang.String" value="Phone"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="text" type="java.lang.String" value="Email"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="text" type="java.lang.String" value="Address"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="idFld"> + </Component> + <Component class="javax.swing.JTextField" name="comName"> + </Component> + <Component class="javax.swing.JTextField" name="comNum"> + </Component> + <Component class="javax.swing.JTextField" name="comMail"> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane2"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="comAddress"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="clearBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/GlobalConstant.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/GlobalConstant.class new file mode 100644 index 00000000..8aafad66 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/GlobalConstant.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$1.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$1.class new file mode 100644 index 00000000..47ff87f9 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$1.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$2.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$2.class new file mode 100644 index 00000000..3f79917d Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$2.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$3.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$3.class new file mode 100644 index 00000000..8d804768 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$3.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$4.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$4.class new file mode 100644 index 00000000..a744756f Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$4.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$5.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$5.class new file mode 100644 index 00000000..157ef6a9 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm$5.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm.class new file mode 100644 index 00000000..7518e24b Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm.form new file mode 100644 index 00000000..f5ff3759 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/LoginForm.form @@ -0,0 +1,180 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="247" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="198" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="288" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="aboutLbl" min="-2" pref="60" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" pref="85" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="76" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="165" max="32767" attributes="0"/> + <Component id="aboutLbl" min="-2" pref="29" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="25" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Medical Shop"/> + </Properties> + </Component> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="68" max="-2" attributes="0"/> + <Component id="clearBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="loginBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="25" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="loginMsg" min="-2" pref="169" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="passwordLbl" min="-2" pref="62" max="-2" attributes="0"/> + <Component id="usernameLbl" min="-2" pref="62" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="userNameFld" min="-2" pref="169" max="-2" attributes="0"/> + <Component id="passwordFld" min="-2" pref="169" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace min="-2" pref="59" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="usernameLbl" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + <Component id="userNameFld" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="passwordLbl" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + <Component id="passwordFld" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> + <Component id="loginMsg" min="-2" pref="13" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="1" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="loginBtn" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + <Component id="clearBtn" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="62" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="usernameLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Username"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="userNameFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="passwordLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Password"/> + </Properties> + </Component> + <Component class="javax.swing.JPasswordField" name="passwordFld"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="passwordFldActionPerformed"/> + <EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="passwordFldKeyPressed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="loginBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Login"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="loginBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="clearBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="loginMsg"> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="aboutLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="About"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="aboutLblMouseClicked"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$1.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$1.class new file mode 100644 index 00000000..1894e9a9 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$1.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$10.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$10.class new file mode 100644 index 00000000..ef8ecfee Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$10.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$11.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$11.class new file mode 100644 index 00000000..369a6384 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$11.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$2.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$2.class new file mode 100644 index 00000000..75d7098a Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$2.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$3.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$3.class new file mode 100644 index 00000000..87d3cb96 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$3.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$4.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$4.class new file mode 100644 index 00000000..0a0b1b67 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$4.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$5.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$5.class new file mode 100644 index 00000000..035fdaf8 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$5.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$6.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$6.class new file mode 100644 index 00000000..a6dc079d Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$6.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$7.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$7.class new file mode 100644 index 00000000..75901f20 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$7.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$8.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$8.class new file mode 100644 index 00000000..3db6e02a Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$8.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$9.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$9.class new file mode 100644 index 00000000..1cca11b8 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage$9.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage.class new file mode 100644 index 00000000..3d05ac8d Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage.form new file mode 100644 index 00000000..92f5d564 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/MainPage.form @@ -0,0 +1,308 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane1" alignment="0" min="-2" pref="785" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Component id="searchBar" min="-2" pref="715" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="refreshBtn" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="68" max="-2" attributes="0"/> + <Component id="jPanel1" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="358" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="122" max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="19" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="searchBar" pref="34" max="32767" attributes="0"/> + <Component id="refreshBtn" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="57" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="376" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <EmptySpace pref="207" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextField" name="searchBar"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="searchBarActionPerformed"/> + <EventHandler event="keyReleased" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="searchBarKeyReleased"/> + </Events> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="medicineTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="6" rowCount="0"> + <Column editable="true" title="Medicine ID" type="java.lang.Object"/> + <Column editable="true" title="Medicine Name" type="java.lang.Object"/> + <Column editable="true" title="Company Name" type="java.lang.Object"/> + <Column editable="true" title="Medicine Catagory" type="java.lang.Object"/> + <Column editable="true" title="Quantity" type="java.lang.Object"/> + <Column editable="true" title="Price Per Unit" type="java.lang.Object"/> + </Table> + </Property> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Component id="logOutBtn" alignment="0" max="32767" attributes="0"/> + <Component id="myProfileBtn" alignment="0" pref="100" max="32767" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="wcLbl" min="-2" pref="391" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="wcName" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="154" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="wcLbl" alignment="3" min="-2" pref="22" max="-2" attributes="0"/> + <Component id="wcName" alignment="3" min="-2" pref="22" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="7" max="-2" attributes="0"/> + <Component id="myProfileBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="logOutBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="52" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="wcLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="wcName"> + </Component> + <Component class="javax.swing.JButton" name="myProfileBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="My Profile"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="myProfileBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="logOutBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Log Out "/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="logOutBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel2"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="44" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="newSelesBtn" min="-2" pref="140" max="-2" attributes="0"/> + <Component id="adminPanelBtn" min="-2" pref="140" max="-2" attributes="0"/> + <Component id="viewSelesBtn" min="-2" pref="140" max="-2" attributes="0"/> + <Component id="medicineBtn" min="-2" pref="140" max="-2" attributes="0"/> + <Component id="companyBtn" alignment="0" min="-2" pref="140" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="50" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="50" max="-2" attributes="0"/> + <Component id="medicineBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="companyBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <Component id="newSelesBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="viewSelesBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="74" max="32767" attributes="0"/> + <Component id="adminPanelBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="27" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="medicineBtn"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Medicines"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="medicineBtnActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="viewSelesBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="View Seles Records"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="viewSelesBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="adminPanelBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Admin Panel"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="adminPanelBtnActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="companyBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Companies"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="companyBtnActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="newSelesBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="New Seles"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="newSelesBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="refreshBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Refresh"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="refreshBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$1.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$1.class new file mode 100644 index 00000000..74efb049 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$1.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$2.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$2.class new file mode 100644 index 00000000..e4658bd2 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$2.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$3.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$3.class new file mode 100644 index 00000000..ef2878ee Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$3.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$4.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$4.class new file mode 100644 index 00000000..358c859c Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$4.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$5.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$5.class new file mode 100644 index 00000000..1ef084b1 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$5.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$6.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$6.class new file mode 100644 index 00000000..ef29bd72 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$6.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$7.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$7.class new file mode 100644 index 00000000..8c6afa68 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines$7.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines.class new file mode 100644 index 00000000..80ebc0f8 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines.form new file mode 100644 index 00000000..99fe8dd2 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/Medicines.form @@ -0,0 +1,339 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel1" pref="886" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="backBtn" min="-2" pref="115" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jScrollPane1" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel1" min="-2" pref="72" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="409" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="73" max="32767" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Medicines"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="medicineTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="6" rowCount="0"> + <Column editable="true" title="ID" type="java.lang.Object"/> + <Column editable="true" title="Name" type="java.lang.Object"/> + <Column editable="true" title="Type" type="java.lang.Object"/> + <Column editable="true" title="Price" type="java.lang.Object"/> + <Column editable="true" title="Stock" type="java.lang.Object"/> + <Column editable="true" title="Current Stock" type="java.lang.Object"/> + </Table> + </Property> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="medicineTableMouseClicked"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="backBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backBtnActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel2" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="idLbl" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + </Group> + <Component id="jLabel3" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="7" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="companyNameFLd" alignment="0" min="-2" pref="180" max="-2" attributes="0"/> + <Component id="typeFld" min="-2" pref="180" max="-2" attributes="0"/> + <Component id="stockFLd" alignment="0" min="-2" pref="180" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="medicineIdFLd" alignment="0" min="-2" pref="180" max="-2" attributes="0"/> + <Component id="medicineNameFLd" min="-2" pref="180" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel6" alignment="1" min="-2" pref="32" max="-2" attributes="0"/> + <Component id="currentStockLbl" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="24" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pricePerUnitFld" min="-2" pref="179" max="-2" attributes="0"/> + <Component id="currentStockFld" min="-2" pref="100" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="resetBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="insertMedicineBtn" min="-2" pref="71" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="updateBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="DelBtn" min="-2" pref="69" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="0" pref="32" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="idLbl" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="medicineIdFLd" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="medicineNameFLd" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="companyNameFLd" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="typeFld" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="stockFLd" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="pricePerUnitFld" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="currentStockFld" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="currentStockLbl" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="78" max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="insertMedicineBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="updateBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="DelBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="resetBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="Company:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="text" type="java.lang.String" value="Name:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="text" type="java.lang.String" value="Type:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="text" type="java.lang.String" value="Stock:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="medicineNameFLd"> + </Component> + <Component class="javax.swing.JTextField" name="companyNameFLd"> + </Component> + <Component class="javax.swing.JTextField" name="typeFld"> + </Component> + <Component class="javax.swing.JTextField" name="stockFLd"> + </Component> + <Component class="javax.swing.JButton" name="insertMedicineBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Insert"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="insertMedicineBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="updateBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Update "/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="updateBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="DelBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Delete"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="DelBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="text" type="java.lang.String" value="Price:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="pricePerUnitFld"> + </Component> + <Component class="javax.swing.JLabel" name="idLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Id:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="medicineIdFLd"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JTextField" name="currentStockFld"> + </Component> + <Component class="javax.swing.JLabel" name="currentStockLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="CurrentStock"/> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="resetBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Reset"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="resetBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$1.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$1.class new file mode 100644 index 00000000..52774632 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$1.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$2.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$2.class new file mode 100644 index 00000000..5ed64412 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$2.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$3.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$3.class new file mode 100644 index 00000000..b3d351d7 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$3.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$4.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$4.class new file mode 100644 index 00000000..6e5185c8 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$4.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$5.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$5.class new file mode 100644 index 00000000..6b48925a Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$5.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$6.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$6.class new file mode 100644 index 00000000..2e596134 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale$6.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale.class new file mode 100644 index 00000000..ef568e39 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale.form new file mode 100644 index 00000000..9f727233 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/NewSale.form @@ -0,0 +1,262 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="54" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="clearBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="164" max="-2" attributes="0"/> + <Component id="sellBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="idLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="0" min="-2" pref="71" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="mTotalBill" min="-2" pref="183" max="-2" attributes="0"/> + <Component id="mPrice" min="-2" pref="183" max="-2" attributes="0"/> + <Component id="buyFld" min="-2" pref="183" max="-2" attributes="0"/> + <Component id="mName" min="-2" pref="183" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="mId" min="-2" pref="50" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="currentStock" min="-2" pref="46" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </Group> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jScrollPane1" pref="626" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="jLabel6" min="-2" pref="495" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="183" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel6" min="-2" pref="59" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jScrollPane1" min="-2" pref="440" max="-2" attributes="0"/> + <EmptySpace pref="22" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="3" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="idLbl" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="mId" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="currentStock" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="mName" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="buyFld" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel3" alignment="3" min="-2" pref="20" max="-2" attributes="0"/> + <Component id="mPrice" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="mTotalBill" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="clearBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="sellBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="35" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value=" Name"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="mName"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="text" type="java.lang.String" value="Quantity"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="buyFld"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="Price"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="mPrice"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="text" type="java.lang.String" value="Total Bill"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="mTotalBill"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mTotalBillActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="medicineTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="5" rowCount="0"> + <Column editable="true" title="Id" type="java.lang.Object"/> + <Column editable="true" title="Medicine Name" type="java.lang.Object"/> + <Column editable="true" title="Type" type="java.lang.Object"/> + <Column editable="true" title="Price" type="java.lang.Object"/> + <Column editable="true" title="Quantity" type="java.lang.Object"/> + </Table> + </Property> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="medicineTableMouseClicked"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="clearBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="sellBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Sell "/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="sellBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="backBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Sell Medicine"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="idLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Id"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="mId"> + </Component> + <Component class="javax.swing.JTextField" name="currentStock"> + </Component> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$1.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$1.class new file mode 100644 index 00000000..528b3c97 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$1.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$2.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$2.class new file mode 100644 index 00000000..261ef63c Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$2.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$3.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$3.class new file mode 100644 index 00000000..da27f7d7 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$3.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$4.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$4.class new file mode 100644 index 00000000..bbbc7dba Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$4.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$5.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$5.class new file mode 100644 index 00000000..e88dc627 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$5.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$6.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$6.class new file mode 100644 index 00000000..b32fc717 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$6.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$7.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$7.class new file mode 100644 index 00000000..8ed6938b Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm$7.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm.class new file mode 100644 index 00000000..41fffd96 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm.form new file mode 100644 index 00000000..e809eb94 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/ProfileForm.form @@ -0,0 +1,343 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <NonVisualComponents> + <Component class="javax.swing.ButtonGroup" name="buttonGroup1"> + </Component> + </NonVisualComponents> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel9" alignment="0" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="163" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pMobileLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pFirstNameLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pEmailLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pLastNameLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pUserNameLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pAddressLbl" min="-2" max="-2" attributes="0"/> + <Component id="iAmLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pDobLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pPasswordLbl" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="57" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pEmailFld" alignment="0" max="32767" attributes="0"/> + <Component id="pFirstNameFld" alignment="0" max="32767" attributes="0"/> + <Component id="pUserNameFld" alignment="0" max="32767" attributes="0"/> + <Component id="pMobileFld" alignment="0" max="32767" attributes="0"/> + <Component id="pLastNameFld" alignment="0" max="32767" attributes="0"/> + <Component id="pPasswordFld" alignment="0" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="pMaleRadioBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="pFemaleRadioBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="295" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="pClearBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="pSaveBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jScrollPane1" max="32767" attributes="0"/> + </Group> + <EmptySpace min="223" pref="223" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="pDateChsr" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel9" min="-2" pref="64" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="pFirstNameLbl" min="-2" pref="24" max="-2" attributes="0"/> + <Component id="pFirstNameFld" min="-2" pref="27" max="-2" attributes="0"/> + </Group> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Component id="pLastNameLbl" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="pLastNameFld" pref="27" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="iAmLbl" min="-2" pref="26" max="-2" attributes="0"/> + <Group type="103" alignment="1" groupAlignment="3" attributes="0"> + <Component id="pMaleRadioBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="pFemaleRadioBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="pDobLbl" min="-2" pref="23" max="-2" attributes="0"/> + <Component id="pDateChsr" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pMobileFld" min="-2" pref="29" max="-2" attributes="0"/> + <Component id="pMobileLbl" min="-2" pref="23" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="pEmailLbl" alignment="3" min="-2" pref="34" max="-2" attributes="0"/> + <Component id="pEmailFld" alignment="3" min="-2" pref="27" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="pUserNameLbl" alignment="3" max="32767" attributes="0"/> + <Component id="pUserNameFld" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="pPasswordLbl" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="pPasswordFld" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pAddressLbl" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="34" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="pClearBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="pSaveBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="backBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextField" name="pFirstNameFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="pMobileLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Mobile:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="pMobileFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="pEmailLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Email:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="pUserNameLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="User Name:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="pFirstNameLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="First Name:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="pEmailFld"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pEmailFldActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JTextField" name="pUserNameFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="pClearBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pClearBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="pSaveBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Save"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pSaveBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="pLastNameLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Last Name:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="pLastNameFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="pAddressLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Address:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="iAmLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="I am:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="pDobLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Date of Birth:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Profile"/> + </Properties> + </Component> + <Component class="javax.swing.JRadioButton" name="pMaleRadioBtn"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="buttonGroup1"/> + </Property> + <Property name="text" type="java.lang.String" value="Male"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pMaleRadioBtnActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JRadioButton" name="pFemaleRadioBtn"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="buttonGroup1"/> + </Property> + <Property name="text" type="java.lang.String" value="Female"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pFemaleRadioBtnActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="pPasswordLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Password:"/> + </Properties> + </Component> + <Component class="javax.swing.JPasswordField" name="pPasswordFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="pAddressTextArea"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="com.toedter.calendar.JDateChooser" name="pDateChsr"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="backBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord$1.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord$1.class new file mode 100644 index 00000000..88906a37 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord$1.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord$2.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord$2.class new file mode 100644 index 00000000..7d1b8cf2 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord$2.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord.class b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord.class new file mode 100644 index 00000000..7d11dd53 Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord.class differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord.form new file mode 100644 index 00000000..b884fad7 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/SalesRecord.form @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="140" max="-2" attributes="0"/> + <Component id="jLabel2" min="-2" pref="751" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="51" max="-2" attributes="0"/> + <Component id="backBtn" min="-2" pref="106" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="56" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="795" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace pref="380" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel2" min="-2" pref="68" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jScrollPane1" pref="577" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="86" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="backBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Sales Record"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="salesTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="3" rowCount="0"> + <Column editable="true" title="Name" type="java.lang.Object"/> + <Column editable="true" title="Quantity" type="java.lang.Object"/> + <Column editable="true" title="Price" type="java.lang.Object"/> + </Table> + </Property> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/medical store.png b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/medical store.png new file mode 100644 index 00000000..2c95e24c Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/bin/shop/medical store.png differ diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/AdminPanel.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/AdminPanel.form new file mode 100644 index 00000000..54ad0850 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/AdminPanel.form @@ -0,0 +1,277 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" pref="796" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <Component id="jButton1" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Component id="jScrollPane1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel1" min="-2" pref="86" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jButton1" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jScrollPane1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="12" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Admin Panel"/> + </Properties> + </Component> + <Container class="javax.swing.JPanel" name="jPanel2"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="deleteUserBtn" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="updateUserBtn" min="-2" max="-2" attributes="0"/> + <Component id="addUserBtn" alignment="0" min="-2" pref="93" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="14" max="32767" attributes="0"/> + <Component id="addUserBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="updateUserBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="deleteUserBtn" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="deleteUserBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Del User"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteUserBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="updateUserBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Update User"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="updateUserBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="addUserBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Add User "/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="addUserBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="adminTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="3" rowCount="0"> + <Column editable="true" title="User Name" type="java.lang.Object"/> + <Column editable="true" title="Password" type="java.lang.Object"/> + <Column editable="true" title="User Type" type="java.lang.Object"/> + </Table> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="adminTableMouseClicked"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="passwordFld" alignment="1" max="32767" attributes="0"/> + <Component id="userNameFld" alignment="1" max="32767" attributes="0"/> + <Component id="idFld" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="passwordLbl" min="-2" max="-2" attributes="0"/> + <Component id="userTypeLbl" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="userNameLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="idLbl" min="-2" pref="27" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="119" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="userTypeBox" max="32767" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="usertypeFld" min="-2" pref="28" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="idLbl" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="16" max="-2" attributes="0"/> + <Component id="idFld" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="userNameLbl" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="userNameFld" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="passwordLbl" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="passwordFld" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="userTypeLbl" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="userTypeBox" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="usertypeFld" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="idLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Id"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="idFld"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="idFldActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="userNameLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="User Name"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="userNameFld"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="userNameFldActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="passwordLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Password"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="passwordFld"> + </Component> + <Component class="javax.swing.JLabel" name="userTypeLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="User Type"/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="userTypeBox"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="3"> + <StringItem index="0" value="Select"/> + <StringItem index="1" value="User"/> + <StringItem index="2" value="Admin"/> + </StringArray> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="userTypeBoxActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JTextField" name="usertypeFld"> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/AdminPanel.java b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/AdminPanel.java new file mode 100644 index 00000000..e18a24ff --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/AdminPanel.java @@ -0,0 +1,484 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package shop; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; +import javax.swing.JTextField; +import javax.swing.table.DefaultTableModel; +import net.proteanit.sql.DbUtils; + + + +/** + * + * @author Sabit + */ +public class AdminPanel extends javax.swing.JFrame { + + /** + * Creates new form adminPanel + */ + public AdminPanel() { + initComponents(); + setTitle("Admin Panel"); + updateTable(); + idFld.setEnabled(false); + deleteUserBtn.setVisible(false); + updateUserBtn.setVisible(false); + userNameFld.setVisible(false); + passwordFld.setVisible(false); + + usertypeFld.setVisible(false); + idLbl.setVisible(false); + idFld.setVisible(false); + userNameLbl.setVisible(false); + passwordLbl.setVisible(false); + userTypeLbl.setVisible(false); + userTypeBox.setVisible(false); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel1 = new javax.swing.JLabel(); + jPanel2 = new javax.swing.JPanel(); + deleteUserBtn = new javax.swing.JButton(); + updateUserBtn = new javax.swing.JButton(); + addUserBtn = new javax.swing.JButton(); + jScrollPane1 = new javax.swing.JScrollPane(); + adminTable = new javax.swing.JTable(); + jPanel1 = new javax.swing.JPanel(); + idLbl = new javax.swing.JLabel(); + idFld = new javax.swing.JTextField(); + userNameLbl = new javax.swing.JLabel(); + userNameFld = new javax.swing.JTextField(); + passwordLbl = new javax.swing.JLabel(); + passwordFld = new javax.swing.JTextField(); + userTypeLbl = new javax.swing.JLabel(); + userTypeBox = new javax.swing.JComboBox<>(); + usertypeFld = new javax.swing.JTextField(); + jButton1 = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel1.setText(" Admin Panel"); + + deleteUserBtn.setText("Del User"); + deleteUserBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + deleteUserBtnActionPerformed(evt); + } + }); + + updateUserBtn.setText("Update User"); + updateUserBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + updateUserBtnActionPerformed(evt); + } + }); + + addUserBtn.setText("Add User "); + addUserBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + addUserBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(deleteUserBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(updateUserBtn) + .addComponent(addUserBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 0, Short.MAX_VALUE)) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() + .addGap(0, 14, Short.MAX_VALUE) + .addComponent(addUserBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(updateUserBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(deleteUserBtn)) + ); + + adminTable.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + + }, + new String [] { + "User Name", "Password", "User Type" + } + )); + adminTable.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + adminTableMouseClicked(evt); + } + }); + jScrollPane1.setViewportView(adminTable); + + idLbl.setText("Id"); + + idFld.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + idFldActionPerformed(evt); + } + }); + + userNameLbl.setText("User Name"); + + userNameFld.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + userNameFldActionPerformed(evt); + } + }); + + passwordLbl.setText("Password"); + + userTypeLbl.setText("User Type"); + + userTypeBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select", "User", "Admin" })); + userTypeBox.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + userTypeBoxActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(passwordFld, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(userNameFld, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(idFld) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(passwordLbl) + .addComponent(userTypeLbl)) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(userNameLbl) + .addComponent(idLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(119, 119, 119)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addComponent(userTypeBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(18, 18, 18) + .addComponent(usertypeFld, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(idLbl) + .addGap(16, 16, 16) + .addComponent(idFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(userNameLbl) + .addGap(18, 18, 18) + .addComponent(userNameFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(passwordLbl) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(passwordFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(userTypeLbl) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(userTypeBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(usertypeFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap()) + ); + + jButton1.setText("Back"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 796, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton1)))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jScrollPane1) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton1)) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 12, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void addUserBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addUserBtnActionPerformed + + ProfileForm pf = new ProfileForm(); + dispose(); + pf.setVisible(true); + + + }//GEN-LAST:event_addUserBtnActionPerformed + + private void updateUserBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_updateUserBtnActionPerformed + updateUser(); + + }//GEN-LAST:event_updateUserBtnActionPerformed + + private void adminTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_adminTableMouseClicked + + int i = adminTable.getSelectedRow(); + DefaultTableModel model = (DefaultTableModel) adminTable.getModel(); + userNameFld.setEnabled(true); + passwordFld.setEnabled(true); + idFld.setText(model.getValueAt(i, 0).toString()); + userNameFld.setText(model.getValueAt(i, 1).toString()); + passwordFld.setText(model.getValueAt(i, 2).toString()); + addUserBtn.setVisible(false); + deleteUserBtn.setEnabled(true); + updateUserBtn.setEnabled(true); + idFld.setVisible(false); + userNameLbl.setVisible(true); + passwordLbl.setVisible(true); + userTypeLbl.setVisible(true); + userTypeBox.setVisible(true); + userNameFld.setVisible(true); + passwordFld.setVisible(true); + deleteUserBtn.setVisible(true); + updateUserBtn.setVisible(true); + + + }//GEN-LAST:event_adminTableMouseClicked + + private void deleteUserBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteUserBtnActionPerformed + + deleteUser(); + }//GEN-LAST:event_deleteUserBtnActionPerformed + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed + + MainPage mp = new MainPage(); + dispose(); + mp.wcLbl.setText("Welcome: " +GlobalConstant.name); + mp.setVisible(true); + }//GEN-LAST:event_jButton1ActionPerformed + + private void userNameFldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_userNameFldActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_userNameFldActionPerformed + + private void idFldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_idFldActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_idFldActionPerformed + + private void userTypeBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_userTypeBoxActionPerformed + // TODO add your handling code here: + + if (userTypeBox.getSelectedItem().equals("User")) { + usertypeFld.setText("0"); + } else if (userTypeBox.getSelectedItem().equals("Admin")) { + usertypeFld.setText("1"); + } + + }//GEN-LAST:event_userTypeBoxActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(AdminPanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(AdminPanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(AdminPanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(AdminPanel.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new AdminPanel().setVisible(true); + } + }); + } + + public void updateTable() { + Connection con; + + PreparedStatement ps; + try { + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement("SELECT * FROM users"); + + ResultSet rs = ps.executeQuery(); + adminTable.setModel(DbUtils.resultSetToTableModel(rs)); + + } catch (SQLException ex) { + + Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex); + + } + } + + public void deleteUser() { + AdminPanel ap = new AdminPanel(); + + String sql = "DELETE FROM users WHERE id='" + idFld.getText() + "'"; + + Connection con; + PreparedStatement ps; + try { + + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement(sql); + + int save = ps.executeUpdate(); + + System.out.println("executeQuery"); + + if (save > 0) { + System.out.println("Deleted"); + JOptionPane.showMessageDialog(null, "Deleted"); + dispose(); + ap.updateTable(); + ap.setVisible(true); + dispose(); + + } else { + System.out.println("Not Deleted"); + JOptionPane.showMessageDialog(null, "Not Deleted"); + + } + + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Deleted Valid Data"); + dispose(); + ap.setVisible(true); + } + + } + + public void updateUser() { + AdminPanel ap = new AdminPanel(); + + String sql = "UPDATE users SET user_type='" + usertypeFld.getText() + "',username='" + userNameFld.getText() + "',password='" + passwordFld.getText() + "' WHERE id='" + idFld.getText() + "'"; + + Connection con; + PreparedStatement ps; + try { + + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement(sql); + + int save = ps.executeUpdate(); + + System.out.println("executeQuery"); + + if (save > 0) { + System.out.println("Inserted"); + JOptionPane.showMessageDialog(null, "User Updated"); + dispose(); + ap.updateTable(); + ap.setVisible(true); + dispose(); + + } else { + System.out.println("Not Inserted"); + JOptionPane.showMessageDialog(null, "Not saved"); + + } + + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Insert Valid Data"); + dispose(); + ap.setVisible(true); + } + + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton addUserBtn; + private javax.swing.JTable adminTable; + private javax.swing.JButton deleteUserBtn; + private javax.swing.JTextField idFld; + private javax.swing.JLabel idLbl; + private javax.swing.JButton jButton1; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTextField passwordFld; + private javax.swing.JLabel passwordLbl; + private javax.swing.JButton updateUserBtn; + private javax.swing.JTextField userNameFld; + private javax.swing.JLabel userNameLbl; + private javax.swing.JComboBox<String> userTypeBox; + private javax.swing.JLabel userTypeLbl; + private javax.swing.JTextField usertypeFld; + // End of variables declaration//GEN-END:variables + +} diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Companies.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Companies.form new file mode 100644 index 00000000..b96c5ecd --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Companies.form @@ -0,0 +1,273 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" pref="761" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="backBtn" alignment="0" min="-2" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Component id="comInsertBtn" min="-2" pref="67" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="comUpdateBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="comDelBtn" min="-2" pref="67" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> + <Component id="jScrollPane1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel1" min="-2" pref="60" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jPanel2" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="comInsertBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="comUpdateBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="comDelBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="42" max="-2" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jScrollPane1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="25" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value=" Companies"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="comTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="4" rowCount="0"> + <Column editable="true" title="Company Name" type="java.lang.Object"/> + <Column editable="true" title="Company Phone" type="java.lang.Object"/> + <Column editable="true" title="Company Email" type="java.lang.Object"/> + <Column editable="true" title="Company Address" type="java.lang.Object"/> + </Table> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="comTableMouseClicked"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="backBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="comInsertBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Insert"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comInsertBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="comUpdateBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Update"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comUpdateBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="comDelBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Delete"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="comDelBtnActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JPanel" name="jPanel2"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="idLbl" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="22" pref="22" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="idFld" max="32767" attributes="0"/> + <Component id="comName" max="32767" attributes="0"/> + </Group> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="comNum" max="32767" attributes="0"/> + <Component id="jScrollPane2" pref="0" max="32767" attributes="0"/> + <Component id="comMail" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace pref="95" max="32767" attributes="0"/> + <Component id="clearBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="51" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="idLbl" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="idFld" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="comName" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="comNum" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="comMail" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane2" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="clearBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="idLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Id"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="Name"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="text" type="java.lang.String" value="Phone"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="text" type="java.lang.String" value="Email"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="text" type="java.lang.String" value="Address"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="idFld"> + </Component> + <Component class="javax.swing.JTextField" name="comName"> + </Component> + <Component class="javax.swing.JTextField" name="comNum"> + </Component> + <Component class="javax.swing.JTextField" name="comMail"> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane2"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="comAddress"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="clearBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Companies.java b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Companies.java new file mode 100644 index 00000000..fd0aa986 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Companies.java @@ -0,0 +1,482 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package shop; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; +import javax.swing.table.DefaultTableModel; +import net.proteanit.sql.DbUtils; + +/** + * + * @author Sabit + */ +public class Companies extends javax.swing.JFrame { + + /** + * Creates new form Companies + */ + public Companies() { + setTitle("Companies"); + initComponents(); + updateTable(); + idFld.setEnabled(false); + comDelBtn.setEnabled(false); + comUpdateBtn.setEnabled(false); + idLbl.setVisible(false); + idFld.setVisible(false); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel1 = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + comTable = new javax.swing.JTable(); + backBtn = new javax.swing.JButton(); + comInsertBtn = new javax.swing.JButton(); + comUpdateBtn = new javax.swing.JButton(); + comDelBtn = new javax.swing.JButton(); + jPanel2 = new javax.swing.JPanel(); + idLbl = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + jLabel5 = new javax.swing.JLabel(); + jLabel6 = new javax.swing.JLabel(); + idFld = new javax.swing.JTextField(); + comName = new javax.swing.JTextField(); + comNum = new javax.swing.JTextField(); + comMail = new javax.swing.JTextField(); + jScrollPane2 = new javax.swing.JScrollPane(); + comAddress = new javax.swing.JTextArea(); + clearBtn = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jLabel1.setText(" Companies"); + + comTable.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + + }, + new String [] { + "Company Name", "Company Phone", "Company Email", "Company Address" + } + )); + comTable.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + comTableMouseClicked(evt); + } + }); + jScrollPane1.setViewportView(comTable); + + backBtn.setText("Back"); + backBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + backBtnActionPerformed(evt); + } + }); + + comInsertBtn.setText("Insert"); + comInsertBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + comInsertBtnActionPerformed(evt); + } + }); + + comUpdateBtn.setText("Update"); + comUpdateBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + comUpdateBtnActionPerformed(evt); + } + }); + + comDelBtn.setText("Delete"); + comDelBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + comDelBtnActionPerformed(evt); + } + }); + + idLbl.setText("Id"); + + jLabel3.setText("Name"); + + jLabel4.setText("Phone"); + + jLabel5.setText("Email"); + + jLabel6.setText("Address"); + + comAddress.setColumns(20); + comAddress.setRows(5); + jScrollPane2.setViewportView(comAddress); + + clearBtn.setText("Clear"); + clearBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + clearBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel3) + .addComponent(idLbl)) + .addGap(22, 22, 22) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(idFld) + .addComponent(comName))) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel5) + .addComponent(jLabel6) + .addComponent(jLabel4)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(comNum) + .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) + .addComponent(comMail)))) + .addContainerGap()) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() + .addContainerGap(95, Short.MAX_VALUE) + .addComponent(clearBtn) + .addGap(51, 51, 51)) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(idLbl) + .addComponent(idFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel3) + .addComponent(comName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel4) + .addComponent(comNum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel5) + .addComponent(comMail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel6) + .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addComponent(clearBtn) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 761, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(backBtn) + .addGroup(layout.createSequentialGroup() + .addComponent(comInsertBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(comUpdateBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(comDelBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(6, 6, 6) + .addComponent(jScrollPane1) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(comInsertBtn) + .addComponent(comUpdateBtn) + .addComponent(comDelBtn)) + .addGap(42, 42, 42) + .addComponent(backBtn)) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 25, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void comInsertBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comInsertBtnActionPerformed + + InsertCompany(); + }//GEN-LAST:event_comInsertBtnActionPerformed + + private void clearBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearBtnActionPerformed + + comName.setText(""); + comNum.setText(""); + comMail.setText(""); + comAddress.setText(""); + + }//GEN-LAST:event_clearBtnActionPerformed + + private void comTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_comTableMouseClicked + + int i = comTable.getSelectedRow(); + + DefaultTableModel model = (DefaultTableModel) comTable.getModel(); + idFld.setText(model.getValueAt(i, 0).toString()); + comName.setText(model.getValueAt(i, 1).toString()); + comNum.setText(model.getValueAt(i, 2).toString()); + comMail.setText(model.getValueAt(i, 3).toString()); + comAddress.setText(model.getValueAt(i, 4).toString()); + comDelBtn.setEnabled(true); + comUpdateBtn.setEnabled(true); + comInsertBtn.setEnabled(false); + + + }//GEN-LAST:event_comTableMouseClicked + + private void comUpdateBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comUpdateBtnActionPerformed + + updateCompany(); + }//GEN-LAST:event_comUpdateBtnActionPerformed + + private void comDelBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comDelBtnActionPerformed + + deleteCompany(); + }//GEN-LAST:event_comDelBtnActionPerformed + + private void backBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backBtnActionPerformed + + MainPage mainpage = new MainPage(); + dispose(); + mainpage.wcLbl.setText("Welcome: " +GlobalConstant.name); + mainpage.setVisible(true); + + }//GEN-LAST:event_backBtnActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Companies.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Companies.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Companies.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Companies.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Companies().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton backBtn; + private javax.swing.JButton clearBtn; + private javax.swing.JTextArea comAddress; + private javax.swing.JButton comDelBtn; + private javax.swing.JButton comInsertBtn; + private javax.swing.JTextField comMail; + private javax.swing.JTextField comName; + private javax.swing.JTextField comNum; + private javax.swing.JTable comTable; + private javax.swing.JButton comUpdateBtn; + private javax.swing.JTextField idFld; + private javax.swing.JLabel idLbl; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JPanel jPanel2; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JScrollPane jScrollPane2; + // End of variables declaration//GEN-END:variables +public void updateTable() { + Connection con; + + PreparedStatement ps; + try { + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement("SELECT * FROM company"); + + ResultSet rs = ps.executeQuery(); + comTable.setModel(DbUtils.resultSetToTableModel(rs)); + + } catch (SQLException ex) { + + Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex); + + } + } + String sql = "INSERT INTO company(name,phone,email,address)" + " VALUES (?,?,?,?)"; + + public void InsertCompany() { + + Companies com = new Companies(); + Connection con; + PreparedStatement ps; + try { + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement(sql); + ps.setString(1, comName.getText()); + ps.setString(2, comNum.getText()); + ps.setString(3, comMail.getText()); + ps.setString(4, comAddress.getText()); + + int save = ps.executeUpdate(); + + + if (save > 0) { + + JOptionPane.showMessageDialog(null, "saved"); + dispose(); + com.updateTable(); + com.setVisible(true); + dispose(); + + } else { + + JOptionPane.showMessageDialog(null, "Not saved"); + + } + + } catch (SQLException ex) { + + JOptionPane.showMessageDialog(null, "Insert Valid Data"); + dispose(); + com.setVisible(true); + } + + } + + public void updateCompany() { + Companies com = new Companies(); + + + String sql = "UPDATE company SET name='" + comName.getText() + "',phone='" + comNum.getText() + "',email='" + comMail.getText() + "',address='" + comAddress.getText() + "' WHERE id='" + idFld.getText() + "'"; + + Connection con; + PreparedStatement ps; + try { + + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement(sql); + + int save = ps.executeUpdate(); + + System.out.println("executeQuery"); + + if (save > 0) { + + JOptionPane.showMessageDialog(null, "saved"); + dispose(); + com.updateTable(); + com.setVisible(true); + dispose(); + + } else { + + JOptionPane.showMessageDialog(null, "Not saved"); + + } + + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Insert Valid Data"); + dispose(); + com.setVisible(true); + } + + } + + public void deleteCompany() { + Companies com = new Companies(); + + String sql = "DELETE FROM company WHERE id='" + idFld.getText() + "'"; + + Connection con; + PreparedStatement ps; + try { + + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement(sql); + + int save = ps.executeUpdate(); + + System.out.println("executeQuery"); + + if (save > 0) { + + JOptionPane.showMessageDialog(null, "Deleted"); + dispose(); + com.updateTable(); + com.setVisible(true); + dispose(); + + } else { + + JOptionPane.showMessageDialog(null, "Not Deleted"); + + } + + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Deleted Valid Data"); + dispose(); + com.setVisible(true); + } + + } + +} diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/GlobalConstant.java b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/GlobalConstant.java new file mode 100644 index 00000000..d40ea60e --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/GlobalConstant.java @@ -0,0 +1,15 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package shop; + +/** + * + * @author Sabit + */ +public class GlobalConstant { + public static int userType; + public static String name; +} diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/LoginForm.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/LoginForm.form new file mode 100644 index 00000000..f5ff3759 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/LoginForm.form @@ -0,0 +1,180 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="247" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="198" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="288" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="aboutLbl" min="-2" pref="60" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" pref="85" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="76" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="165" max="32767" attributes="0"/> + <Component id="aboutLbl" min="-2" pref="29" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="25" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Medical Shop"/> + </Properties> + </Component> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="68" max="-2" attributes="0"/> + <Component id="clearBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="loginBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="25" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="loginMsg" min="-2" pref="169" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="passwordLbl" min="-2" pref="62" max="-2" attributes="0"/> + <Component id="usernameLbl" min="-2" pref="62" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="userNameFld" min="-2" pref="169" max="-2" attributes="0"/> + <Component id="passwordFld" min="-2" pref="169" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace min="-2" pref="59" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="usernameLbl" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + <Component id="userNameFld" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="passwordLbl" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + <Component id="passwordFld" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> + <Component id="loginMsg" min="-2" pref="13" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="1" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="loginBtn" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + <Component id="clearBtn" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="62" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="usernameLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Username"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="userNameFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="passwordLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Password"/> + </Properties> + </Component> + <Component class="javax.swing.JPasswordField" name="passwordFld"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="passwordFldActionPerformed"/> + <EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="passwordFldKeyPressed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="loginBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Login"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="loginBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="clearBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="loginMsg"> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="aboutLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="About"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="aboutLblMouseClicked"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/LoginForm.java b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/LoginForm.java new file mode 100644 index 00000000..95e7005f --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/LoginForm.java @@ -0,0 +1,319 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package shop; + +import java.awt.Color; +import java.awt.event.KeyEvent; +import java.sql.*; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; +import static javax.swing.JOptionPane.INFORMATION_MESSAGE; + +/** + * + * @author Sabit + */ +public class LoginForm extends javax.swing.JFrame { + + /** + * Creates new form login2 + */ + public LoginForm() { + initComponents(); + setTitle("Login Form"); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel1 = new javax.swing.JLabel(); + jPanel1 = new javax.swing.JPanel(); + usernameLbl = new javax.swing.JLabel(); + userNameFld = new javax.swing.JTextField(); + passwordLbl = new javax.swing.JLabel(); + passwordFld = new javax.swing.JPasswordField(); + loginBtn = new javax.swing.JButton(); + clearBtn = new javax.swing.JButton(); + loginMsg = new javax.swing.JLabel(); + aboutLbl = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel1.setText(" Medical Shop"); + + usernameLbl.setText("Username"); + + passwordLbl.setText("Password"); + + passwordFld.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + passwordFldActionPerformed(evt); + } + }); + passwordFld.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyPressed(java.awt.event.KeyEvent evt) { + passwordFldKeyPressed(evt); + } + }); + + loginBtn.setText("Login"); + loginBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + loginBtnActionPerformed(evt); + } + }); + + clearBtn.setText("Clear"); + clearBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + clearBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(68, 68, 68) + .addComponent(clearBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(loginBtn) + .addGap(25, 25, 25)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(loginMsg, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(passwordLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(usernameLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(28, 28, 28) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(userNameFld, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(passwordFld, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addGap(59, 59, 59)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(30, 30, 30) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(usernameLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(userNameFld, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(passwordLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(passwordFld, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(4, 4, 4) + .addComponent(loginMsg, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(1, 1, 1) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(loginBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(clearBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(62, Short.MAX_VALUE)) + ); + + aboutLbl.setText("About"); + aboutLbl.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + aboutLblMouseClicked(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(247, 247, 247) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(198, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addComponent(jLabel1) + .addGap(288, 288, 288)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addComponent(aboutLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap()))) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(76, 76, 76) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 165, Short.MAX_VALUE) + .addComponent(aboutLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(25, 25, 25)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void passwordFldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_passwordFldActionPerformed + + }//GEN-LAST:event_passwordFldActionPerformed + + private void clearBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearBtnActionPerformed + + userNameFld.setText(""); + passwordFld.setText(""); + + + }//GEN-LAST:event_clearBtnActionPerformed + + private void loginBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginBtnActionPerformed + + login(); + + + }//GEN-LAST:event_loginBtnActionPerformed + + private void passwordFldKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_passwordFldKeyPressed + + if (evt.getKeyCode() == KeyEvent.VK_ENTER) { + login(); + } + }//GEN-LAST:event_passwordFldKeyPressed + + private void aboutLblMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_aboutLblMouseClicked + ImageIcon icon=new ImageIcon("C:\\Users\\Sabit\\Documents\\NetBeansProjects\\Shop\\src\\shop\\medical store.png"); + JOptionPane.showMessageDialog(null,"Medical Store\nDeveloped By Sabit\nVersion: 1.0","About",INFORMATION_MESSAGE,icon); + }//GEN-LAST:event_aboutLblMouseClicked + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(LoginForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(LoginForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(LoginForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(LoginForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(() -> { + new LoginForm().setVisible(true); + }); + } + + public void login() { + + Connection con; + + PreparedStatement ps; + try { + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement("SELECT `username`, `password`, `user_type` FROM `users` WHERE `username`=? AND `password`=?"); + ps.setString(1, userNameFld.getText()); + ps.setString(2, String.valueOf(passwordFld.getPassword())); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + userType = rs.getInt("user_type"); + name = rs.getString("username"); + loginMsg.setText("Login Success!!"); + loginMsg.setForeground(Color.blue); + dispose(); + GlobalConstant.name = name; + GlobalConstant.userType = userType; + + if (userType == 1) { + + admin(); + + } else { + + user(); + + } + + + + // userNameFld.setText(""); + //passwordFld.setText(""); + System.out.println("success"); + } else { + loginMsg.setText("Invalid Login!!"); + loginMsg.setForeground(Color.red); + System.out.println("Not success"); + } + + } catch (SQLException ex) { + + Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex); + + } + + + + } + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel aboutLbl; + private javax.swing.JButton clearBtn; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPanel1; + private javax.swing.JButton loginBtn; + private javax.swing.JLabel loginMsg; + public javax.swing.JPasswordField passwordFld; + private javax.swing.JLabel passwordLbl; + public javax.swing.JTextField userNameFld; + private javax.swing.JLabel usernameLbl; + // End of variables declaration//GEN-END:variables + public int userType; + public String name; + + public void admin() { + MainPage mainpage = new MainPage(); + mainpage.setVisible(true); + mainpage.wcLbl.setText("Welcome: " + name); + } + + public void user() { + MainPage mainpage = new MainPage(); + mainpage.setVisible(true); + mainpage.wcLbl.setText("Welcome: " + name); + mainpage.adminPanelBtn.setVisible(false); + mainpage.medicineBtn.setVisible(false); + mainpage.companyBtn.setVisible(false); + } + + +} diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/MainPage.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/MainPage.form new file mode 100644 index 00000000..92f5d564 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/MainPage.form @@ -0,0 +1,308 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jScrollPane1" alignment="0" min="-2" pref="785" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Component id="searchBar" min="-2" pref="715" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="refreshBtn" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="68" max="-2" attributes="0"/> + <Component id="jPanel1" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="358" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="122" max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="19" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="searchBar" pref="34" max="32767" attributes="0"/> + <Component id="refreshBtn" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="57" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="376" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <EmptySpace pref="207" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextField" name="searchBar"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="searchBarActionPerformed"/> + <EventHandler event="keyReleased" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="searchBarKeyReleased"/> + </Events> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="medicineTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="6" rowCount="0"> + <Column editable="true" title="Medicine ID" type="java.lang.Object"/> + <Column editable="true" title="Medicine Name" type="java.lang.Object"/> + <Column editable="true" title="Company Name" type="java.lang.Object"/> + <Column editable="true" title="Medicine Catagory" type="java.lang.Object"/> + <Column editable="true" title="Quantity" type="java.lang.Object"/> + <Column editable="true" title="Price Per Unit" type="java.lang.Object"/> + </Table> + </Property> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Component id="logOutBtn" alignment="0" max="32767" attributes="0"/> + <Component id="myProfileBtn" alignment="0" pref="100" max="32767" attributes="0"/> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="wcLbl" min="-2" pref="391" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="wcName" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="154" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="wcLbl" alignment="3" min="-2" pref="22" max="-2" attributes="0"/> + <Component id="wcName" alignment="3" min="-2" pref="22" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="7" max="-2" attributes="0"/> + <Component id="myProfileBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="logOutBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="52" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="wcLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="wcName"> + </Component> + <Component class="javax.swing.JButton" name="myProfileBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="My Profile"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="myProfileBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="logOutBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Log Out "/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="logOutBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel2"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="44" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="newSelesBtn" min="-2" pref="140" max="-2" attributes="0"/> + <Component id="adminPanelBtn" min="-2" pref="140" max="-2" attributes="0"/> + <Component id="viewSelesBtn" min="-2" pref="140" max="-2" attributes="0"/> + <Component id="medicineBtn" min="-2" pref="140" max="-2" attributes="0"/> + <Component id="companyBtn" alignment="0" min="-2" pref="140" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="50" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="50" max="-2" attributes="0"/> + <Component id="medicineBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="companyBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <Component id="newSelesBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="viewSelesBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="74" max="32767" attributes="0"/> + <Component id="adminPanelBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="27" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="medicineBtn"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Medicines"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="medicineBtnActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="viewSelesBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="View Seles Records"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="viewSelesBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="adminPanelBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Admin Panel"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="adminPanelBtnActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="companyBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Companies"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="companyBtnActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="newSelesBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="New Seles"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="newSelesBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="refreshBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Refresh"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="refreshBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/MainPage.java b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/MainPage.java new file mode 100644 index 00000000..e58af6fe --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/MainPage.java @@ -0,0 +1,404 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package shop; + +import static java.awt.SystemColor.window; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JTextField; +import java.sql.*; +import net.proteanit.sql.DbUtils; + +/** + * + * @author Sabit + */ +public class MainPage extends javax.swing.JFrame { + + /** + * Creates new form MainPage + */ + public MainPage(){ + setTitle("MainPage"); + initComponents(); + updateTable(); + myProfileBtn.setVisible(false); + } + + public void updateTable() { + Connection con; + PreparedStatement ps; + try { + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement("SELECT * FROM medicines"); + + ResultSet rs = ps.executeQuery(); + medicineTable.setModel(DbUtils.resultSetToTableModel(rs)); + + } catch (SQLException ex) { + + Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex); + + } + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + searchBar = new javax.swing.JTextField(); + jScrollPane1 = new javax.swing.JScrollPane(); + medicineTable = new javax.swing.JTable(); + jPanel1 = new javax.swing.JPanel(); + wcLbl = new javax.swing.JLabel(); + wcName = new javax.swing.JLabel(); + myProfileBtn = new javax.swing.JButton(); + logOutBtn = new javax.swing.JButton(); + jPanel2 = new javax.swing.JPanel(); + medicineBtn = new javax.swing.JButton(); + viewSelesBtn = new javax.swing.JButton(); + adminPanelBtn = new javax.swing.JButton(); + companyBtn = new javax.swing.JButton(); + newSelesBtn = new javax.swing.JButton(); + refreshBtn = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + searchBar.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + searchBarActionPerformed(evt); + } + }); + searchBar.addKeyListener(new java.awt.event.KeyAdapter() { + public void keyReleased(java.awt.event.KeyEvent evt) { + searchBarKeyReleased(evt); + } + }); + + medicineTable.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + + }, + new String [] { + "Medicine ID", "Medicine Name", "Company Name", "Medicine Catagory", "Quantity", "Price Per Unit" + } + )); + jScrollPane1.setViewportView(medicineTable); + + wcLbl.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + + myProfileBtn.setText("My Profile"); + myProfileBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + myProfileBtnActionPerformed(evt); + } + }); + + logOutBtn.setText("Log Out "); + logOutBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + logOutBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(logOutBtn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(myProfileBtn, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(wcLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 391, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(wcName, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(154, 154, 154)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(wcLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(wcName, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(7, 7, 7) + .addComponent(myProfileBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(logOutBtn) + .addContainerGap(52, Short.MAX_VALUE)) + ); + + medicineBtn.setBackground(new java.awt.Color(255, 255, 255)); + medicineBtn.setText("Medicines"); + medicineBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + medicineBtnActionPerformed(evt); + } + }); + + viewSelesBtn.setText("View Seles Records"); + viewSelesBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + viewSelesBtnActionPerformed(evt); + } + }); + + adminPanelBtn.setText("Admin Panel"); + adminPanelBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + adminPanelBtnActionPerformed(evt); + } + }); + + companyBtn.setText("Companies"); + companyBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + companyBtnActionPerformed(evt); + } + }); + + newSelesBtn.setText("New Seles"); + newSelesBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + newSelesBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(44, 44, 44) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(newSelesBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(adminPanelBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(viewSelesBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(medicineBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(companyBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(50, Short.MAX_VALUE)) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(50, 50, 50) + .addComponent(medicineBtn) + .addGap(18, 18, 18) + .addComponent(companyBtn) + .addGap(18, 18, 18) + .addComponent(newSelesBtn) + .addGap(18, 18, 18) + .addComponent(viewSelesBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 74, Short.MAX_VALUE) + .addComponent(adminPanelBtn) + .addGap(27, 27, 27)) + ); + + refreshBtn.setText("Refresh"); + refreshBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + refreshBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 785, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addComponent(searchBar, javax.swing.GroupLayout.PREFERRED_SIZE, 715, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(refreshBtn))) + .addGap(68, 68, 68) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(358, 358, 358)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(122, 122, 122) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createSequentialGroup() + .addGap(19, 19, 19) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(searchBar, javax.swing.GroupLayout.DEFAULT_SIZE, 34, Short.MAX_VALUE) + .addComponent(refreshBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGap(57, 57, 57) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 376, javax.swing.GroupLayout.PREFERRED_SIZE))))) + .addContainerGap(207, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void searchBarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchBarActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_searchBarActionPerformed + + private void newSelesBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newSelesBtnActionPerformed + + NewSale ns=new NewSale(); + dispose(); + ns.setVisible(true); + + }//GEN-LAST:event_newSelesBtnActionPerformed + + private void logOutBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logOutBtnActionPerformed + LoginForm login=new LoginForm(); + dispose(); + updateTable(); + login.setVisible(true); + //System.exit(0); + + }//GEN-LAST:event_logOutBtnActionPerformed + + private void adminPanelBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_adminPanelBtnActionPerformed + + AdminPanel ap = new AdminPanel(); + dispose(); + ap.setVisible(true); + + }//GEN-LAST:event_adminPanelBtnActionPerformed + + private void companyBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_companyBtnActionPerformed + + Companies com = new Companies(); + dispose(); + com.setVisible(true); + }//GEN-LAST:event_companyBtnActionPerformed + + private void myProfileBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_myProfileBtnActionPerformed + + ProfileForm profileform = new ProfileForm(); + dispose(); + profileform.setVisible(true); + }//GEN-LAST:event_myProfileBtnActionPerformed + + private void medicineBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_medicineBtnActionPerformed + + Medicines medicine = new Medicines(); + dispose(); + medicine.setVisible(true); + }//GEN-LAST:event_medicineBtnActionPerformed + + private void viewSelesBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewSelesBtnActionPerformed + + SalesRecord salesrecord = new SalesRecord(); + dispose(); + salesrecord.setVisible(true); + + }//GEN-LAST:event_viewSelesBtnActionPerformed + + private void searchBarKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_searchBarKeyReleased + + Search(); + }//GEN-LAST:event_searchBarKeyReleased + + private void refreshBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refreshBtnActionPerformed + + searchBar.setText(""); + updateTable(); + + }//GEN-LAST:event_refreshBtnActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(MainPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(MainPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(MainPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(MainPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new MainPage().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + public javax.swing.JButton adminPanelBtn; + public javax.swing.JButton companyBtn; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JButton logOutBtn; + public javax.swing.JButton medicineBtn; + private javax.swing.JTable medicineTable; + private javax.swing.JButton myProfileBtn; + private javax.swing.JButton newSelesBtn; + private javax.swing.JButton refreshBtn; + private javax.swing.JTextField searchBar; + private javax.swing.JButton viewSelesBtn; + public javax.swing.JLabel wcLbl; + private javax.swing.JLabel wcName; + // End of variables declaration//GEN-END:variables + + public void Search(){ + String sql = "SELECT * FROM medicines WHERE medicine_name=?"; + + Connection con; + PreparedStatement ps; + try { + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement(sql); + ps.setString(1, searchBar.getText()); + ResultSet rs = ps.executeQuery(); + medicineTable.setModel(DbUtils.resultSetToTableModel(rs)); + + } catch (SQLException ex) { + + Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex); + + } + + } + + +} diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Medicines.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Medicines.form new file mode 100644 index 00000000..99fe8dd2 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Medicines.form @@ -0,0 +1,339 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel1" pref="886" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="backBtn" min="-2" pref="115" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jScrollPane1" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel1" min="-2" pref="72" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="409" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="73" max="32767" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Medicines"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="medicineTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="6" rowCount="0"> + <Column editable="true" title="ID" type="java.lang.Object"/> + <Column editable="true" title="Name" type="java.lang.Object"/> + <Column editable="true" title="Type" type="java.lang.Object"/> + <Column editable="true" title="Price" type="java.lang.Object"/> + <Column editable="true" title="Stock" type="java.lang.Object"/> + <Column editable="true" title="Current Stock" type="java.lang.Object"/> + </Table> + </Property> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="medicineTableMouseClicked"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="backBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backBtnActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JPanel" name="jPanel1"> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel2" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="idLbl" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + </Group> + <Component id="jLabel3" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="7" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="companyNameFLd" alignment="0" min="-2" pref="180" max="-2" attributes="0"/> + <Component id="typeFld" min="-2" pref="180" max="-2" attributes="0"/> + <Component id="stockFLd" alignment="0" min="-2" pref="180" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="medicineIdFLd" alignment="0" min="-2" pref="180" max="-2" attributes="0"/> + <Component id="medicineNameFLd" min="-2" pref="180" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel6" alignment="1" min="-2" pref="32" max="-2" attributes="0"/> + <Component id="currentStockLbl" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="24" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pricePerUnitFld" min="-2" pref="179" max="-2" attributes="0"/> + <Component id="currentStockFld" min="-2" pref="100" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="resetBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="insertMedicineBtn" min="-2" pref="71" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="updateBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="DelBtn" min="-2" pref="69" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="0" pref="32" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="idLbl" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="medicineIdFLd" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="medicineNameFLd" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="companyNameFLd" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="typeFld" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="stockFLd" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="pricePerUnitFld" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="currentStockFld" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="currentStockLbl" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="78" max="32767" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="insertMedicineBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="updateBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="DelBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="resetBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="Company:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="text" type="java.lang.String" value="Name:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="text" type="java.lang.String" value="Type:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="text" type="java.lang.String" value="Stock:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="medicineNameFLd"> + </Component> + <Component class="javax.swing.JTextField" name="companyNameFLd"> + </Component> + <Component class="javax.swing.JTextField" name="typeFld"> + </Component> + <Component class="javax.swing.JTextField" name="stockFLd"> + </Component> + <Component class="javax.swing.JButton" name="insertMedicineBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Insert"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="insertMedicineBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="updateBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Update "/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="updateBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="DelBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Delete"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="DelBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="text" type="java.lang.String" value="Price:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="pricePerUnitFld"> + </Component> + <Component class="javax.swing.JLabel" name="idLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Id:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="medicineIdFLd"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JTextField" name="currentStockFld"> + </Component> + <Component class="javax.swing.JLabel" name="currentStockLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="CurrentStock"/> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="resetBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Reset"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="resetBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Medicines.java b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Medicines.java new file mode 100644 index 00000000..9b86c86d --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/Medicines.java @@ -0,0 +1,565 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package shop; + +import java.sql.*; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.management.Query; +import javax.swing.JOptionPane; +import javax.swing.table.DefaultTableModel; +import net.proteanit.sql.DbUtils; + +/** + * + * @author Sabit + */ +public class Medicines extends javax.swing.JFrame { + + /** + * Creates new form Medicines + */ + public Medicines() { + setTitle("Medicines"); + initComponents(); + updateTable(); + medicineIdFLd.setEnabled(false); + updateBtn.setEnabled(false); + DelBtn.setEnabled(false); + idLbl.setVisible(false); + currentStockLbl.setVisible(false); + currentStockFld.setVisible(false); + medicineIdFLd.setVisible(false); + resetBtn.setVisible(false); + LoginForm lf = new LoginForm(); + + } + + String sql = "INSERT INTO medicines(medicine_name,medicine_type,company_name,stock,price_per_unit,current_stock)" + " VALUES (?,?,?,?,?,?)"; + + public void InsertMedicine() { + + Medicines medicine = new Medicines(); + Connection con; + PreparedStatement ps; + try { + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement(sql); + ps.setString(1, medicineNameFLd.getText()); + ps.setString(2, typeFld.getText()); + ps.setString(3, companyNameFLd.getText()); + ps.setString(4, stockFLd.getText()); + ps.setString(5, pricePerUnitFld.getText()); + ps.setString(6, stockFLd.getText()); + + int save = ps.executeUpdate(); + System.out.println("Int:" + save); + + System.out.println("executeQuery"); + + if (save > 0) { + System.out.println("Inserted"); + JOptionPane.showMessageDialog(null, "saved"); + dispose(); + medicine.updateTable(); + medicine.setVisible(true); + dispose(); + + } else { + System.out.println("Not Inserted"); + JOptionPane.showMessageDialog(null, "Not saved"); + + } + + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Insert Valid Data"); + dispose(); + medicine.setVisible(true); + } + + } + + public void updateTable() { + Connection con; + + PreparedStatement ps; + try { + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement("SELECT * FROM medicines"); + + ResultSet rs = ps.executeQuery(); + medicineTable.setModel(DbUtils.resultSetToTableModel(rs)); + + } catch (SQLException ex) { + + Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex); + + } + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel1 = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + medicineTable = new javax.swing.JTable(); + backBtn = new javax.swing.JButton(); + jPanel1 = new javax.swing.JPanel(); + jLabel3 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + jLabel5 = new javax.swing.JLabel(); + medicineNameFLd = new javax.swing.JTextField(); + companyNameFLd = new javax.swing.JTextField(); + typeFld = new javax.swing.JTextField(); + stockFLd = new javax.swing.JTextField(); + insertMedicineBtn = new javax.swing.JButton(); + updateBtn = new javax.swing.JButton(); + DelBtn = new javax.swing.JButton(); + jLabel6 = new javax.swing.JLabel(); + pricePerUnitFld = new javax.swing.JTextField(); + idLbl = new javax.swing.JLabel(); + medicineIdFLd = new javax.swing.JTextField(); + currentStockFld = new javax.swing.JTextField(); + currentStockLbl = new javax.swing.JLabel(); + resetBtn = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N + jLabel1.setText(" Medicines"); + + medicineTable.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + + }, + new String [] { + "ID", "Name", "Type", "Price", "Stock", "Current Stock" + } + )); + medicineTable.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + medicineTableMouseClicked(evt); + } + }); + jScrollPane1.setViewportView(medicineTable); + + backBtn.setText("Back"); + backBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + backBtnActionPerformed(evt); + } + }); + + jLabel3.setText("Company:"); + + jLabel2.setText("Name:"); + + jLabel4.setText("Type:"); + + jLabel5.setText("Stock:"); + + insertMedicineBtn.setText("Insert"); + insertMedicineBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + insertMedicineBtnActionPerformed(evt); + } + }); + + updateBtn.setText("Update "); + updateBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + updateBtnActionPerformed(evt); + } + }); + + DelBtn.setText("Delete"); + DelBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + DelBtnActionPerformed(evt); + } + }); + + jLabel6.setText("Price:"); + + idLbl.setText("Id:"); + + currentStockLbl.setText("CurrentStock"); + + resetBtn.setText("Reset"); + resetBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + resetBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel2) + .addComponent(jLabel4) + .addComponent(idLbl)) + .addGap(18, 18, 18)) + .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel5)) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(7, 7, 7) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(companyNameFLd, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(typeFld, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(stockFLd, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(medicineIdFLd, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(medicineNameFLd, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(currentStockLbl, javax.swing.GroupLayout.Alignment.TRAILING)) + .addGap(24, 24, 24) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pricePerUnitFld, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(currentStockFld, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addComponent(resetBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(insertMedicineBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(updateBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(DelBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(0, 32, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(18, 18, 18) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(idLbl) + .addComponent(medicineIdFLd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(medicineNameFLd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel2)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(companyNameFLd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(typeFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel4)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel5) + .addComponent(stockFLd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel6) + .addComponent(pricePerUnitFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(currentStockFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(currentStockLbl)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 78, Short.MAX_VALUE) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(insertMedicineBtn) + .addComponent(updateBtn) + .addComponent(DelBtn) + .addComponent(resetBtn)) + .addGap(32, 32, 32)) + ); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 886, Short.MAX_VALUE) + .addContainerGap()) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(backBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(jScrollPane1) + .addGap(20, 20, 20)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 409, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 73, Short.MAX_VALUE) + .addComponent(backBtn) + .addGap(21, 21, 21)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void backBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backBtnActionPerformed + // TODO add your handling code here: + MainPage mainpage = new MainPage(); + dispose(); + mainpage.wcLbl.setText("Welcome: " +GlobalConstant.name); + mainpage.setVisible(true); + + }//GEN-LAST:event_backBtnActionPerformed + + private void medicineTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_medicineTableMouseClicked + + int i = medicineTable.getSelectedRow(); + + DefaultTableModel model = (DefaultTableModel) medicineTable.getModel(); + medicineIdFLd.setText(model.getValueAt(i, 0).toString()); + medicineNameFLd.setText(model.getValueAt(i, 1).toString()); + typeFld.setText(model.getValueAt(i, 2).toString()); + companyNameFLd.setText(model.getValueAt(i, 3).toString()); + stockFLd.setText(model.getValueAt(i, 5).toString()); + pricePerUnitFld.setText(model.getValueAt(i, 4).toString()); + currentStockFld.setText(model.getValueAt(i, 6).toString()); + + updateBtn.setEnabled(true); + DelBtn.setEnabled(true); + insertMedicineBtn.setVisible(false); + resetBtn.setVisible(true); + + mainstock = Integer.parseInt(stockFLd.getText().toString()); + System.out.println("Stock:" + mainstock); + currStock = Integer.parseInt(currentStockFld.getText().toString()); + System.out.println("CurrentStock:" + currentStockFld); + + }//GEN-LAST:event_medicineTableMouseClicked + + private void DelBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DelBtnActionPerformed + + deleteMedicine(); + }//GEN-LAST:event_DelBtnActionPerformed + + private void updateBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_updateBtnActionPerformed + + updatemedicine(); + + }//GEN-LAST:event_updateBtnActionPerformed + + private void insertMedicineBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_insertMedicineBtnActionPerformed + + InsertMedicine(); + + }//GEN-LAST:event_insertMedicineBtnActionPerformed + + private void resetBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_resetBtnActionPerformed + + stockFLd.setText("0"); + currentStockFld.setText("0"); + int a, b; + a = Integer.parseInt(stockFLd.getText().toString()); + b = Integer.parseInt(stockFLd.getText().toString()); + + Medicines medicine = new Medicines(); + + Connection con; + PreparedStatement ps; + String sql = "UPDATE medicines SET medicine_name='" + medicineNameFLd.getText() + "',current_stock='" + a + "',medicine_type='" + typeFld.getText() + "',company_name='" + companyNameFLd.getText() + "',stock='" + b + "',price_per_unit='" + pricePerUnitFld.getText() + "' WHERE id='" + medicineIdFLd.getText() + "'"; + try { + + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement(sql); + + int save = ps.executeUpdate(); + + System.out.println("executeQuery"); + + if (save > 0) { + System.out.println("Inserted"); + JOptionPane.showMessageDialog(null, "saved"); + dispose(); + medicine.updateTable(); + medicine.setVisible(true); + dispose(); + + } else { + System.out.println("Not Inserted"); + JOptionPane.showMessageDialog(null, "Not saved"); + + } + + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Insert Valid Data"); + dispose(); + medicine.setVisible(true); + } + }//GEN-LAST:event_resetBtnActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Medicines.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Medicines.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Medicines.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Medicines.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Medicines().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton DelBtn; + private javax.swing.JButton backBtn; + private javax.swing.JTextField companyNameFLd; + private javax.swing.JTextField currentStockFld; + private javax.swing.JLabel currentStockLbl; + private javax.swing.JLabel idLbl; + private javax.swing.JButton insertMedicineBtn; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JPanel jPanel1; + private javax.swing.JScrollPane jScrollPane1; + public javax.swing.JTextField medicineIdFLd; + private javax.swing.JTextField medicineNameFLd; + public javax.swing.JTable medicineTable; + private javax.swing.JTextField pricePerUnitFld; + private javax.swing.JButton resetBtn; + private javax.swing.JTextField stockFLd; + private javax.swing.JTextField typeFld; + private javax.swing.JButton updateBtn; + // End of variables declaration//GEN-END:variables + int mainstock, currStock, temp, add, ad, addcs; + + + public void updatemedicine() { + Medicines medicine = new Medicines(); + + Connection con; + PreparedStatement ps; + ad = Integer.parseInt(stockFLd.getText().toString()); + temp = mainstock - currStock; + addcs = currStock + ad; + System.out.println("tempCurrettStock:" + temp); + add = mainstock + ad; + System.out.println("add:" + add); + + String sql = "UPDATE medicines SET medicine_name='" + medicineNameFLd.getText() + "',current_stock='" + addcs + "',medicine_type='" + typeFld.getText() + "',company_name='" + companyNameFLd.getText() + "',stock='" + add + "',price_per_unit='" + pricePerUnitFld.getText() + "' WHERE id='" + medicineIdFLd.getText() + "'"; + try { + + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", ""); + ps = con.prepareStatement(sql); + + int save = ps.executeUpdate(); + + System.out.println("executeQuery"); + + if (save > 0) { + System.out.println("Inserted"); + JOptionPane.showMessageDialog(null, "saved"); + dispose(); + medicine.updateTable(); + medicine.setVisible(true); + dispose(); + + } else { + System.out.println("Not Inserted"); + JOptionPane.showMessageDialog(null, "Not saved"); + + } + + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Insert Valid Data"); + dispose(); + medicine.setVisible(true); + } + + } + + public void deleteMedicine() { + Medicines medicine = new Medicines(); + + + String sql = "DELETE FROM medicines WHERE id='" + medicineIdFLd.getText() + "'"; + + Connection con; + PreparedStatement ps; + try { + + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement(sql); + + int save = ps.executeUpdate(); + + System.out.println("executeQuery"); + + if (save > 0) { + System.out.println("Deleted"); + JOptionPane.showMessageDialog(null, "Deleted"); + dispose(); + medicine.updateTable(); + medicine.setVisible(true); + dispose(); + + } else { + System.out.println("Not Deleted"); + JOptionPane.showMessageDialog(null, "Not Deleted"); + + } + + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Deleted Valid Data"); + dispose(); + medicine.setVisible(true); + } + + } + +} diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/NewSale.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/NewSale.form new file mode 100644 index 00000000..9f727233 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/NewSale.form @@ -0,0 +1,262 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="54" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="clearBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="164" max="-2" attributes="0"/> + <Component id="sellBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="idLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="0" min="-2" pref="71" max="-2" attributes="0"/> + <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="mTotalBill" min="-2" pref="183" max="-2" attributes="0"/> + <Component id="mPrice" min="-2" pref="183" max="-2" attributes="0"/> + <Component id="buyFld" min="-2" pref="183" max="-2" attributes="0"/> + <Component id="mName" min="-2" pref="183" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="mId" min="-2" pref="50" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="currentStock" min="-2" pref="46" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </Group> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="jScrollPane1" pref="626" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="jLabel6" min="-2" pref="495" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="183" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel6" min="-2" pref="59" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jScrollPane1" min="-2" pref="440" max="-2" attributes="0"/> + <EmptySpace pref="22" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="3" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="idLbl" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="mId" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="currentStock" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="mName" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="buyFld" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel3" alignment="3" min="-2" pref="20" max="-2" attributes="0"/> + <Component id="mPrice" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="mTotalBill" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="clearBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="sellBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="35" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value=" Name"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="mName"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="text" type="java.lang.String" value="Quantity"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="buyFld"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="Price"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="mPrice"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="text" type="java.lang.String" value="Total Bill"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="mTotalBill"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="14" style="1"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mTotalBillActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="medicineTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="5" rowCount="0"> + <Column editable="true" title="Id" type="java.lang.Object"/> + <Column editable="true" title="Medicine Name" type="java.lang.Object"/> + <Column editable="true" title="Type" type="java.lang.Object"/> + <Column editable="true" title="Price" type="java.lang.Object"/> + <Column editable="true" title="Quantity" type="java.lang.Object"/> + </Table> + </Property> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="medicineTableMouseClicked"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="clearBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="sellBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Sell "/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="sellBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="backBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Sell Medicine"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="idLbl"> + <Properties> + <Property name="text" type="java.lang.String" value="Id"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="mId"> + </Component> + <Component class="javax.swing.JTextField" name="currentStock"> + </Component> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/NewSale.java b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/NewSale.java new file mode 100644 index 00000000..f4812d9e --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/NewSale.java @@ -0,0 +1,484 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package shop; + +import java.awt.Color; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql. + PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; +import javax.swing.JTextField; +import javax.swing.table.DefaultTableModel; +import net.proteanit.sql.DbUtils; + +/** + * + * @author Sabit + */ +public class NewSale extends javax.swing.JFrame { + + /** + * Creates new form NewSale + */ + public NewSale() { + setTitle("New Sale"); + + initComponents(); + updateTable(); + LoginForm lf = new LoginForm(); + mId.setVisible(false); + mPrice.setEnabled(false); + sellBtn.setEnabled(false); + mName.setEnabled(false); + buyFld.setEnabled(false); + mTotalBill.setEnabled(false); + idLbl.setVisible(false); + currentStock.setVisible(false); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel1 = new javax.swing.JLabel(); + mName = new javax.swing.JTextField(); + jLabel2 = new javax.swing.JLabel(); + buyFld = new javax.swing.JTextField(); + jLabel3 = new javax.swing.JLabel(); + mPrice = new javax.swing.JTextField(); + jLabel4 = new javax.swing.JLabel(); + mTotalBill = new javax.swing.JTextField(); + jScrollPane1 = new javax.swing.JScrollPane(); + medicineTable = new javax.swing.JTable(); + clearBtn = new javax.swing.JButton(); + sellBtn = new javax.swing.JButton(); + backBtn = new javax.swing.JButton(); + jLabel6 = new javax.swing.JLabel(); + idLbl = new javax.swing.JLabel(); + mId = new javax.swing.JTextField(); + currentStock = new javax.swing.JTextField(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jLabel1.setText(" Name"); + + jLabel2.setText("Quantity"); + + jLabel3.setText("Price"); + + jLabel4.setText("Total Bill"); + + mTotalBill.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + mTotalBill.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + mTotalBillActionPerformed(evt); + } + }); + + medicineTable.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + + }, + new String [] { + "Id", "Medicine Name", "Type", "Price", "Quantity" + } + )); + medicineTable.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + medicineTableMouseClicked(evt); + } + }); + jScrollPane1.setViewportView(medicineTable); + + clearBtn.setText("Clear"); + clearBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + clearBtnActionPerformed(evt); + } + }); + + sellBtn.setText("Sell "); + sellBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + sellBtnActionPerformed(evt); + } + }); + + backBtn.setText("Back"); + backBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + backBtnActionPerformed(evt); + } + }); + + jLabel6.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel6.setText(" Sell Medicine"); + + idLbl.setText("Id"); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(backBtn)) + .addGroup(layout.createSequentialGroup() + .addGap(54, 54, 54) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(clearBtn) + .addGap(164, 164, 164) + .addComponent(sellBtn)) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1) + .addComponent(idLbl) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel3) + .addComponent(jLabel4)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(mTotalBill, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(mPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(buyFld, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(mName, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addComponent(mId, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(currentStock, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))))))) + .addGap(18, 18, 18) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 626, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 495, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(183, 183, 183)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(10, 10, 10) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 440, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(22, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGap(3, 3, 3) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(idLbl) + .addComponent(mId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(currentStock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(mName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel2) + .addComponent(buyFld, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(mPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel4) + .addComponent(mTotalBill, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(30, 30, 30) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(clearBtn) + .addComponent(sellBtn)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(backBtn) + .addGap(35, 35, 35)))) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void mTotalBillActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mTotalBillActionPerformed + + }//GEN-LAST:event_mTotalBillActionPerformed + + private void medicineTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_medicineTableMouseClicked + + int i = medicineTable.getSelectedRow(); + + DefaultTableModel model = (DefaultTableModel) medicineTable.getModel(); + mId.setText(model.getValueAt(i, 0).toString()); + mName.setText(model.getValueAt(i, 1).toString()); + currentStock.setText(model.getValueAt(i, 6).toString()); + mPrice.setText(model.getValueAt(i, 4).toString()); + mTotalBill.setText(Integer.toString(TotalBill)); + buyFld.setEnabled(true); + sellBtn.setEnabled(true); + stock = Integer.parseInt(currentStock.getText().toString()); + + }//GEN-LAST:event_medicineTableMouseClicked + + private void clearBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearBtnActionPerformed + + clear(); + }//GEN-LAST:event_clearBtnActionPerformed + + private void backBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backBtnActionPerformed + + if (GlobalConstant.userType == 1) + { + dispose(); + admin(); + } + else + { + dispose(); + user(); + } + + + }//GEN-LAST:event_backBtnActionPerformed + + private void sellBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sellBtnActionPerformed + + Medicines medicine = new Medicines(); + + NewSale ns = new NewSale(); + Connection con; + PreparedStatement ps; + + try + { + buy = Integer.parseInt(buyFld.getText().toString()); + + } + catch (Exception x) + { + JOptionPane.showMessageDialog(null, "Quantity Empty"); + ns.updateTable(); + } + + System.out.println("Buy:" + buy); + int up = stock - buy; + String sql = "UPDATE medicines SET current_stock='" + up + "'WHERE id='" + mId.getText() + "'"; + + if (stock < buy) + { + JOptionPane.showMessageDialog(null, "Medicine Out Of Stock"); + } + else + { + + try + { + + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", ""); + ps = con.prepareStatement(sql); + int save = ps.executeUpdate(); + + System.out.println("executeQuery"); + + if (save > 0) { + System.out.println("Inserted"); + ns.updateTable(); + medicine.updateTable(); + ns.setVisible(true); + dispose(); + SellsRecord(); + + } else { + System.out.println("Not Inserted"); + JOptionPane.showMessageDialog(null, "Not saved"); + + } + + } + catch (SQLException ex) + { + JOptionPane.showMessageDialog(null, "Insert Valid Data"); + dispose(); + } + } + + + }//GEN-LAST:event_sellBtnActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(NewSale.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(NewSale.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(NewSale.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(NewSale.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new NewSale().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton backBtn; + private javax.swing.JTextField buyFld; + private javax.swing.JButton clearBtn; + private javax.swing.JTextField currentStock; + private javax.swing.JLabel idLbl; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel6; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTextField mId; + private javax.swing.JTextField mName; + private javax.swing.JTextField mPrice; + private javax.swing.JTextField mTotalBill; + private javax.swing.JTable medicineTable; + private javax.swing.JButton sellBtn; + // End of variables declaration//GEN-END:variables + public int Price, Quantity, TotalBill; + public int stock; + int userType; + String name; + int buy; + + public void updateTable() + { + Connection con; + PreparedStatement ps; + try + { + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement("SELECT * FROM medicines"); + + ResultSet rs = ps.executeQuery(); + medicineTable.setModel(DbUtils.resultSetToTableModel(rs)); + + } + catch (SQLException ex) + { + + Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex); + + } + } + + public void clear() { + mId.setText(""); + mName.setText(""); + mPrice.setText(""); + buyFld.setText(""); + mTotalBill.setText(""); + } + + public void SellsRecord() { + + NewSale ns = new NewSale(); + Connection con; + PreparedStatement ps; + + try + { + String sql = "INSERT INTO sellsRecord (mediId,name,quantity,price,totalBill)" + " VALUES (?,?,?,?,?)"; + + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + + Price = Integer.parseInt(mPrice.getText().toString()); + + Quantity = Integer.parseInt(buyFld.getText().toString()); + System.out.println("Quantity:" + Quantity); + TotalBill = Price * Quantity; + System.out.println("total" + TotalBill); + mTotalBill.setText(Integer.toString(TotalBill)); + System.out.println("TotalBill:" + mTotalBill); + + ps = con.prepareStatement(sql); + ps.setString(1, mId.getText()); + ps.setString(2, mName.getText()); + ps.setString(4, mPrice.getText()); + ps.setString(3, buyFld.getText()); + ps.setString(5, mTotalBill.getText()); + + ///////////////Price Count/////////////////////////////// + int save = ps.executeUpdate(); + + System.out.println("executeQuery"); + + if (save > 0) + { + System.out.println("Inserted"); + JOptionPane.showMessageDialog(null, "Sold"); + ns.updateTable(); + dispose(); + } + else + { + System.out.println("Not Inserted"); + JOptionPane.showMessageDialog(null, "Not Sold"); + } + + } + catch (SQLException ex) + { + + Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex); + + } + } + + public void admin() + { + LoginForm lf = new LoginForm(); + MainPage mainpage = new MainPage(); + mainpage.setVisible(true); + mainpage.wcLbl.setText("Welcome: " +GlobalConstant.name); + } + + public void user() + { + LoginForm lf = new LoginForm(); + MainPage mainpage = new MainPage(); + mainpage.wcLbl.setText("Welcome: " +GlobalConstant.name); + mainpage.adminPanelBtn.setVisible(false); + mainpage.medicineBtn.setVisible(false); + mainpage.companyBtn.setVisible(false); + mainpage.setVisible(true); + + } +} diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/ProfileForm.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/ProfileForm.form new file mode 100644 index 00000000..e809eb94 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/ProfileForm.form @@ -0,0 +1,343 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <NonVisualComponents> + <Component class="javax.swing.ButtonGroup" name="buttonGroup1"> + </Component> + </NonVisualComponents> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel9" alignment="0" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="163" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pMobileLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pFirstNameLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pEmailLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pLastNameLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pUserNameLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pAddressLbl" min="-2" max="-2" attributes="0"/> + <Component id="iAmLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pDobLbl" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="pPasswordLbl" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="57" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pEmailFld" alignment="0" max="32767" attributes="0"/> + <Component id="pFirstNameFld" alignment="0" max="32767" attributes="0"/> + <Component id="pUserNameFld" alignment="0" max="32767" attributes="0"/> + <Component id="pMobileFld" alignment="0" max="32767" attributes="0"/> + <Component id="pLastNameFld" alignment="0" max="32767" attributes="0"/> + <Component id="pPasswordFld" alignment="0" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Component id="pMaleRadioBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="pFemaleRadioBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="295" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="pClearBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="pSaveBtn" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jScrollPane1" max="32767" attributes="0"/> + </Group> + <EmptySpace min="223" pref="223" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="pDateChsr" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel9" min="-2" pref="64" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="pFirstNameLbl" min="-2" pref="24" max="-2" attributes="0"/> + <Component id="pFirstNameFld" min="-2" pref="27" max="-2" attributes="0"/> + </Group> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Component id="pLastNameLbl" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Component id="pLastNameFld" pref="27" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="iAmLbl" min="-2" pref="26" max="-2" attributes="0"/> + <Group type="103" alignment="1" groupAlignment="3" attributes="0"> + <Component id="pMaleRadioBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="pFemaleRadioBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="pDobLbl" min="-2" pref="23" max="-2" attributes="0"/> + <Component id="pDateChsr" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pMobileFld" min="-2" pref="29" max="-2" attributes="0"/> + <Component id="pMobileLbl" min="-2" pref="23" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="pEmailLbl" alignment="3" min="-2" pref="34" max="-2" attributes="0"/> + <Component id="pEmailFld" alignment="3" min="-2" pref="27" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="pUserNameLbl" alignment="3" max="32767" attributes="0"/> + <Component id="pUserNameFld" alignment="3" min="-2" pref="30" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="pPasswordLbl" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="pPasswordFld" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="pAddressLbl" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="34" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="pClearBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="pSaveBtn" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="backBtn" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextField" name="pFirstNameFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="pMobileLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Mobile:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="pMobileFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="pEmailLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Email:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="pUserNameLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="User Name:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="pFirstNameLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="First Name:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="pEmailFld"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pEmailFldActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JTextField" name="pUserNameFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="pClearBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pClearBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="pSaveBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Save"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pSaveBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="pLastNameLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Last Name:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="pLastNameFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="pAddressLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Address:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="iAmLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="I am:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="pDobLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Date of Birth:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="24" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Profile"/> + </Properties> + </Component> + <Component class="javax.swing.JRadioButton" name="pMaleRadioBtn"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="buttonGroup1"/> + </Property> + <Property name="text" type="java.lang.String" value="Male"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pMaleRadioBtnActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JRadioButton" name="pFemaleRadioBtn"> + <Properties> + <Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor"> + <ComponentRef name="buttonGroup1"/> + </Property> + <Property name="text" type="java.lang.String" value="Female"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="pFemaleRadioBtnActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="pPasswordLbl"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="12" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Password:"/> + </Properties> + </Component> + <Component class="javax.swing.JPasswordField" name="pPasswordFld"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="pAddressTextArea"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="com.toedter.calendar.JDateChooser" name="pDateChsr"> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/> + </AuxValues> + </Component> + <Component class="javax.swing.JButton" name="backBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backBtnActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/ProfileForm.java b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/ProfileForm.java new file mode 100644 index 00000000..ed063ad4 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/ProfileForm.java @@ -0,0 +1,447 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package shop; + +import java.awt.Color; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; +import javax.swing.JTextField; +//import javax.swing.JTextField; + +/** + * + * @author Sabit + */ +public class ProfileForm extends javax.swing.JFrame { + + /** + * Creates new form ProfileForm + */ + public ProfileForm() { + initComponents(); + setTitle("ProfileForm"); + + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + buttonGroup1 = new javax.swing.ButtonGroup(); + pFirstNameFld = new javax.swing.JTextField(); + pMobileLbl = new javax.swing.JLabel(); + pMobileFld = new javax.swing.JTextField(); + pEmailLbl = new javax.swing.JLabel(); + pUserNameLbl = new javax.swing.JLabel(); + pFirstNameLbl = new javax.swing.JLabel(); + pEmailFld = new javax.swing.JTextField(); + pUserNameFld = new javax.swing.JTextField(); + pClearBtn = new javax.swing.JButton(); + pSaveBtn = new javax.swing.JButton(); + pLastNameLbl = new javax.swing.JLabel(); + pLastNameFld = new javax.swing.JTextField(); + pAddressLbl = new javax.swing.JLabel(); + iAmLbl = new javax.swing.JLabel(); + pDobLbl = new javax.swing.JLabel(); + jLabel9 = new javax.swing.JLabel(); + pMaleRadioBtn = new javax.swing.JRadioButton(); + pFemaleRadioBtn = new javax.swing.JRadioButton(); + pPasswordLbl = new javax.swing.JLabel(); + pPasswordFld = new javax.swing.JPasswordField(); + jScrollPane1 = new javax.swing.JScrollPane(); + pAddressTextArea = new javax.swing.JTextArea(); + pDateChsr = new com.toedter.calendar.JDateChooser(); + backBtn = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + pMobileLbl.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + pMobileLbl.setText("Mobile:"); + + pEmailLbl.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + pEmailLbl.setText("Email:"); + + pUserNameLbl.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + pUserNameLbl.setText("User Name:"); + + pFirstNameLbl.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + pFirstNameLbl.setText("First Name:"); + + pEmailFld.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + pEmailFldActionPerformed(evt); + } + }); + + pClearBtn.setText("Clear"); + pClearBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + pClearBtnActionPerformed(evt); + } + }); + + pSaveBtn.setText("Save"); + pSaveBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + pSaveBtnActionPerformed(evt); + } + }); + + pLastNameLbl.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + pLastNameLbl.setText("Last Name:"); + + pAddressLbl.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + pAddressLbl.setText("Address:"); + + iAmLbl.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + iAmLbl.setText("I am:"); + + pDobLbl.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + pDobLbl.setText("Date of Birth:"); + + jLabel9.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N + jLabel9.setText(" Profile"); + + buttonGroup1.add(pMaleRadioBtn); + pMaleRadioBtn.setText("Male"); + pMaleRadioBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + pMaleRadioBtnActionPerformed(evt); + } + }); + + buttonGroup1.add(pFemaleRadioBtn); + pFemaleRadioBtn.setText("Female"); + pFemaleRadioBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + pFemaleRadioBtnActionPerformed(evt); + } + }); + + pPasswordLbl.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N + pPasswordLbl.setText("Password:"); + + pAddressTextArea.setColumns(20); + pAddressTextArea.setRows(5); + jScrollPane1.setViewportView(pAddressTextArea); + + backBtn.setText("Back"); + backBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + backBtnActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(163, 163, 163) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pMobileLbl) + .addComponent(pFirstNameLbl) + .addComponent(pEmailLbl) + .addComponent(pLastNameLbl) + .addComponent(pUserNameLbl) + .addComponent(pAddressLbl) + .addComponent(iAmLbl) + .addComponent(pDobLbl) + .addComponent(pPasswordLbl))) + .addGroup(layout.createSequentialGroup() + .addGap(29, 29, 29) + .addComponent(backBtn))) + .addGap(57, 57, 57) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pEmailFld) + .addComponent(pFirstNameFld) + .addComponent(pUserNameFld) + .addComponent(pMobileFld) + .addComponent(pLastNameFld) + .addComponent(pPasswordFld) + .addGroup(layout.createSequentialGroup() + .addComponent(pMaleRadioBtn) + .addGap(18, 18, 18) + .addComponent(pFemaleRadioBtn) + .addGap(0, 295, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addComponent(pClearBtn) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(pSaveBtn)) + .addComponent(jScrollPane1)) + .addGap(223, 223, 223)) + .addGroup(layout.createSequentialGroup() + .addComponent(pDateChsr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(pFirstNameLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(pFirstNameFld, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(layout.createSequentialGroup() + .addGap(21, 21, 21) + .addComponent(pLastNameLbl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGap(18, 18, 18) + .addComponent(pLastNameFld, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(iAmLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(pMaleRadioBtn) + .addComponent(pFemaleRadioBtn))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(pDobLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(pDateChsr, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pMobileFld, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(pMobileLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(pEmailLbl, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(pEmailFld, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(21, 21, 21) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(pUserNameLbl, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(pUserNameFld, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(pPasswordLbl) + .addComponent(pPasswordFld, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(pAddressLbl) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(34, 34, 34) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(pClearBtn) + .addComponent(pSaveBtn) + .addComponent(backBtn)) + .addGap(36, 36, 36)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void pEmailFldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pEmailFldActionPerformed + + }//GEN-LAST:event_pEmailFldActionPerformed + + private void pSaveBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pSaveBtnActionPerformed + + Profileform(); + }//GEN-LAST:event_pSaveBtnActionPerformed + + private void pMaleRadioBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pMaleRadioBtnActionPerformed + + gender="male"; + }//GEN-LAST:event_pMaleRadioBtnActionPerformed + + private void pFemaleRadioBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pFemaleRadioBtnActionPerformed + + gender="female"; + }//GEN-LAST:event_pFemaleRadioBtnActionPerformed + + private void backBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backBtnActionPerformed + + AdminPanel main=new AdminPanel(); + dispose(); + main.setVisible(true); + }//GEN-LAST:event_backBtnActionPerformed + + private void pClearBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pClearBtnActionPerformed + + Clear(); + + + }//GEN-LAST:event_pClearBtnActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(ProfileForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(ProfileForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(ProfileForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(ProfileForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new ProfileForm().setVisible(true); + } + }); + } + + public void Clear(){ + + pUserNameFld.setText(""); + pPasswordFld.setText(""); + pFirstNameFld.setText(""); + pLastNameFld.setText(""); + buttonGroup1.clearSelection(); + pDateChsr.setCalendar(null); + pAddressTextArea.setText(""); + pMobileFld.setText(""); + pEmailFld.setText(""); + + + } + + public void Profileform(){ + + AdminPanel ap=new AdminPanel(); + Connection con; + PreparedStatement ps; + try{ + String sql="INSERT INTO users (username,password,first_name,last_name,address,mobile,gender,dob,mail)"+" VALUES (?,?,?,?,?,?,?,?,?)"; + + con =DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps=con.prepareStatement(sql); + ps.setString(1,pUserNameFld.getText()); + ps.setString(2, String.valueOf(pPasswordFld.getPassword())); + ps.setString(3,pFirstNameFld.getText()); + ps.setString(4,pLastNameFld.getText()); + ps.setString(5, pAddressTextArea.getText()); + ps.setString(6, pMobileFld.getText()); + ps.setString(7, gender); + + ps.setString(8, ((JTextField)pDateChsr.getDateEditor().getUiComponent()).getText()); + ps.setString(9, pEmailFld.getText()); + + int save=ps.executeUpdate(); + if(save>0){ + + JOptionPane.showMessageDialog(null, "User Added"); + ap.updateTable(); + ap.setVisible(true); + dispose(); + } + else{ + + JOptionPane.showMessageDialog(null, "User Not Added"); + } + + }catch(SQLException ex){ + + Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex); + + } + } + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton backBtn; + private javax.swing.ButtonGroup buttonGroup1; + private javax.swing.JLabel iAmLbl; + private javax.swing.JLabel jLabel9; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JLabel pAddressLbl; + public javax.swing.JTextArea pAddressTextArea; + private javax.swing.JButton pClearBtn; + public com.toedter.calendar.JDateChooser pDateChsr; + private javax.swing.JLabel pDobLbl; + public javax.swing.JTextField pEmailFld; + private javax.swing.JLabel pEmailLbl; + public javax.swing.JRadioButton pFemaleRadioBtn; + public javax.swing.JTextField pFirstNameFld; + private javax.swing.JLabel pFirstNameLbl; + public javax.swing.JTextField pLastNameFld; + private javax.swing.JLabel pLastNameLbl; + public javax.swing.JRadioButton pMaleRadioBtn; + public javax.swing.JTextField pMobileFld; + private javax.swing.JLabel pMobileLbl; + public javax.swing.JPasswordField pPasswordFld; + private javax.swing.JLabel pPasswordLbl; + private javax.swing.JButton pSaveBtn; + public javax.swing.JTextField pUserNameFld; + private javax.swing.JLabel pUserNameLbl; + // End of variables declaration//GEN-END:variables + + private String gender; + + public void updateUser() { + AdminPanel ap = new AdminPanel(); + + String sql=""; + + Connection con; + PreparedStatement ps; + try { + + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement(sql); + + int save = ps.executeUpdate(); + + System.out.println("executeQuery"); + + if (save > 0) { + System.out.println("Inserted"); + JOptionPane.showMessageDialog(null, "saved"); + dispose(); + ap.updateTable(); + ap.setVisible(true); + dispose(); + + } else { + System.out.println("Not Inserted"); + JOptionPane.showMessageDialog(null, "Not saved"); + + } + + } catch (SQLException ex) { + JOptionPane.showMessageDialog(null, "Insert Valid Data"); + dispose(); + ap.setVisible(true); + } + + } + + + +} diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/SalesRecord.form b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/SalesRecord.form new file mode 100644 index 00000000..b884fad7 --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/SalesRecord.form @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="140" max="-2" attributes="0"/> + <Component id="jLabel2" min="-2" pref="751" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="51" max="-2" attributes="0"/> + <Component id="backBtn" min="-2" pref="106" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="56" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="795" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace pref="380" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel2" min="-2" pref="68" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jScrollPane1" pref="577" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Component id="backBtn" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="86" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="backBtn"> + <Properties> + <Property name="text" type="java.lang.String" value="Back"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="backBtnActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="18" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value=" Sales Record"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTable" name="salesTable"> + <Properties> + <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> + <Table columnCount="3" rowCount="0"> + <Column editable="true" title="Name" type="java.lang.Object"/> + <Column editable="true" title="Quantity" type="java.lang.Object"/> + <Column editable="true" title="Price" type="java.lang.Object"/> + </Table> + </Property> + <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> + <TableColumnModel selectionModel="0"> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> + <Title/> + <Editor/> + <Renderer/> + </Column> + </TableColumnModel> + </Property> + <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> + <TableHeader reorderingAllowed="true" resizingAllowed="true"/> + </Property> + </Properties> + </Component> + </SubComponents> + </Container> + </SubComponents> +</Form> diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/SalesRecord.java b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/SalesRecord.java new file mode 100644 index 00000000..48a3bcaa --- /dev/null +++ b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/SalesRecord.java @@ -0,0 +1,197 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package shop; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.logging.Level; +import java.util.logging.Logger; +import net.proteanit.sql.DbUtils; + +/** + * + * @author Sabit + */ +public class SalesRecord extends javax.swing.JFrame{ + + /** + * Creates new form SalesRecord + */ + public SalesRecord(){ + setTitle("SalesRecord"); + initComponents(); + updateTable(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + backBtn = new javax.swing.JButton(); + jLabel2 = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + salesTable = new javax.swing.JTable(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + backBtn.setText("Back"); + backBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + backBtnActionPerformed(evt); + } + }); + + jLabel2.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N + jLabel2.setText(" Sales Record"); + + salesTable.setModel(new javax.swing.table.DefaultTableModel( + new Object [][] { + + }, + new String [] { + "Name", "Quantity", "Price" + } + )); + jScrollPane1.setViewportView(salesTable); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(140, 140, 140) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 751, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createSequentialGroup() + .addGap(51, 51, 51) + .addComponent(backBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(56, 56, 56) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 795, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap(380, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 577, Short.MAX_VALUE) + .addContainerGap()) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(backBtn) + .addGap(86, 86, 86)))) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void backBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backBtnActionPerformed + + if (GlobalConstant.userType == 1) + { + dispose(); + admin(); + } + else + { + dispose(); + user(); + } + + + }//GEN-LAST:event_backBtnActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(SalesRecord.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(SalesRecord.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(SalesRecord.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(SalesRecord.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new SalesRecord().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton backBtn; + private javax.swing.JLabel jLabel2; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JTable salesTable; + // End of variables declaration//GEN-END:variables + int userType; + String name; + public void updateTable() { + Connection con; + PreparedStatement ps; + try { + con = DriverManager.getConnection("jdbc:mysql://localhost/medical_store", "root", "root"); + ps = con.prepareStatement("SELECT * FROM sellsrecord"); + + ResultSet rs = ps.executeQuery(); + salesTable.setModel(DbUtils.resultSetToTableModel(rs)); + + } catch (SQLException ex) { + + Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex); + + } + } + + public void admin() { + LoginForm lf = new LoginForm(); + MainPage mainpage = new MainPage(); + mainpage.setVisible(true); + mainpage.wcLbl.setText("Welcome: " +GlobalConstant.name); + } + + public void user() { + LoginForm lf = new LoginForm(); + MainPage mainpage = new MainPage(); + mainpage.wcLbl.setText("Welcome: " + GlobalConstant.name); + mainpage.adminPanelBtn.setVisible(false); + mainpage.medicineBtn.setVisible(false); + mainpage.companyBtn.setVisible(false); + mainpage.setVisible(true); + + } + + +} diff --git a/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/medical store.png b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/medical store.png new file mode 100644 index 00000000..2c95e24c Binary files /dev/null and b/Medical Store Shop System + Database + Jar Files/Medical-Store-Management-System/src/shop/medical store.png differ diff --git a/MedicalStore.java b/MedicalStore.java new file mode 100644 index 00000000..1d25f961 --- /dev/null +++ b/MedicalStore.java @@ -0,0 +1,111 @@ +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +public class MedicalStore { + public static class Product { + private int id; + private String name; + private double price; + private int quantity; + + public Product(int id, String name, double price, int quantity) { + this.id = id; + this.name = name; + this.price = price; + this.quantity = quantity; + } + + public int getId() { + return id; + } + + public String getName() { + return name; + } + + public double getPrice() { + return price; + } + + public int getQuantity() { + return quantity; + } + + public void setQuantity(int quantity) { + this.quantity = quantity; + } + } + + private List<Product> products; + + public MedicalStore() { + products = new ArrayList<>(); + } + + public void addProduct(Product product) { + products.add(product); + } + + public void listProducts() { + System.out.println("Products available:"); + for (Product product : products) { + System.out.println(product.getId() + ". " + product.getName() + " - $" + product.getPrice()); + } + } + + public Product findProductById(int id) { + for (Product product : products) { + if (product.getId() == id) { + return product; + } + } + return null; + } + + public void sellProduct(int productId, int quantity) { + Product product = findProductById(productId); + if (product != null && product.getQuantity() >= quantity) { + product.setQuantity(product.getQuantity() - quantity); + System.out.println(quantity + " " + product.getName() + " sold for $" + (product.getPrice() * quantity)); + } else { + System.out.println("Product not available or insufficient quantity."); + } + } + + public static void main(String[] args) { + MedicalStore store = new MedicalStore(); + store.addProduct(new Product(1, "Painkiller", 5.99, 50)); + store.addProduct(new Product(2, "Bandages", 3.49, 100)); + store.addProduct(new Product(3, "Vitamins", 8.99, 30); + + Scanner scanner = new Scanner(System.in); + + while (true) { + System.out.println("\n1. List Products"); + System.out.println("2. Sell Product"); + System.out.println("3. Exit"); + System.out.print("Select an option: "); + + int choice = scanner.nextInt(); + + switch (choice) { + case 1: + store.listProducts(); + break; + case 2: + System.out.print("Enter product ID: "); + int productId = scanner.nextInt(); + System.out.print("Enter quantity: "); + int quantity = scanner.nextInt(); + store.sellProduct(productId, quantity); + break; + case 3: + System.out.println("Exiting..."); + System.exit(0); + default: + System.out.println("Invalid option. Please try again."); + } + } + } +} diff --git a/Merge_Sort.java b/Merge_Sort.java new file mode 100644 index 00000000..a1eda118 --- /dev/null +++ b/Merge_Sort.java @@ -0,0 +1,66 @@ +import java.util.*; + +class Solution { + private static void merge(int[] arr, int low, int mid, int high) { + ArrayList<Integer> temp = new ArrayList<>(); // temporary array + int left = low; // starting index of left half of arr + int right = mid + 1; // starting index of right half of arr + + //storing elements in the temporary array in a sorted manner// + + while (left <= mid && right <= high) { + if (arr[left] <= arr[right]) { + temp.add(arr[left]); + left++; + } else { + temp.add(arr[right]); + right++; + } + } + + // if elements on the left half are still left // + + while (left <= mid) { + temp.add(arr[left]); + left++; + } + + // if elements on the right half are still left // + while (right <= high) { + temp.add(arr[right]); + right++; + } + + // transfering all elements from temporary to arr // + for (int i = low; i <= high; i++) { + arr[i] = temp.get(i - low); + } + } + + public static void mergeSort(int[] arr, int low, int high) { + if (low >= high) return; + int mid = (low + high) / 2 ; + mergeSort(arr, low, mid); // left half + mergeSort(arr, mid + 1, high); // right half + merge(arr, low, mid, high); // merging sorted halves + } +} +public class tUf { + public static void main(String args[]) { + Scanner sc = new Scanner(System.in); + int n = 7; + int arr[] = { 9, 4, 7, 6, 3, 1, 5 }; + System.out.println("Before sorting array: "); + for (int i = 0; i < n; i++) { + System.out.print(arr[i] + " "); + } + System.out.println(); + Solution.mergeSort(arr, 0, n - 1); + System.out.println("After sorting array: "); + for (int i = 0; i < n; i++) { + System.out.print(arr[i] + " "); + } + System.out.println(); + } + +} \ No newline at end of file diff --git a/Merge_Two_Sorted_Linked_List.java b/Merge_Two_Sorted_Linked_List.java new file mode 100644 index 00000000..9488eb6d --- /dev/null +++ b/Merge_Two_Sorted_Linked_List.java @@ -0,0 +1,35 @@ +/** + * Definition for singly-linked list. + * public class ListNode { + * int val; + * ListNode next; + * ListNode() {} + * ListNode(int val) { this.val = val; } + * ListNode(int val, ListNode next) { this.val = val; this.next = next; } + * } + */ +class Solution { + public ListNode mergeTwoLists(ListNode list1, ListNode list2) { + if(list1 == null) return list2; + if(list2 == null) return list1; + if(list1.val>list2.val){ + ListNode temp = list1; + list1 = list2; + list2 = temp; + } + ListNode res = list1; + while(list1!=null && list2!=null){ + ListNode tmp=null; + while(list1!=null && list1.val<=list2.val){ + tmp=list1; + list1=list1.next; + } + tmp.next=list2; + + ListNode temp=list1; + list1=list2; + list2=temp; + } + return res; + } +} \ No newline at end of file diff --git a/MineSweeper Using Python/Minesweeper.py b/MineSweeper Using Python/Minesweeper.py new file mode 100644 index 00000000..1c409a5c --- /dev/null +++ b/MineSweeper Using Python/Minesweeper.py @@ -0,0 +1,138 @@ +import random +import re + +class Board: + def __init__(self, dim_size, num_bombs): + + self.dim_size = dim_size + self.num_bombs = num_bombs + + self.board = self.make_new_board() + self.assign_values_to_board() + + self.dug = set() + + def make_new_board(self): + board = [[None for _ in range(self.dim_size)] for _ in range(self.dim_size)] + bombs_planted = 0 + while bombs_planted < self.num_bombs: + loc = random.randint(0, self.dim_size**2 - 1) + row = loc // self.dim_size + col = loc % self.dim_size + + if board[row][col] == '*': + continue + + board[row][col] = '*' + bombs_planted += 1 + + return board + + def assign_values_to_board(self): + + for r in range(self.dim_size): + for c in range(self.dim_size): + if self.board[r][c] == '*': + continue + self.board[r][c] = self.get_num_neighboring_bombs(r, c) + + def get_num_neighboring_bombs(self, row, col): + num_neighboring_bombs = 0 + for r in range(max(0, row-1), min(self.dim_size-1, row+1)+1): + for c in range(max(0, col-1), min(self.dim_size-1, col+1)+1): + if r == row and c == col: + continue + if self.board[r][c] == '*': + num_neighboring_bombs += 1 + + return num_neighboring_bombs + + def dig(self, row, col): + self.dug.add((row, col)) + + if self.board[row][col] == '*': + return False + elif self.board[row][col] > 0: + return True + + + for r in range(max(0, row-1), min(self.dim_size-1, row+1)+1): + for c in range(max(0, col-1), min(self.dim_size-1, col+1)+1): + if (r, c) in self.dug: + continue + self.dig(r, c) + + return True + + def __str__(self): + visible_board = [[None for _ in range(self.dim_size)] for _ in range(self.dim_size)] + for row in range(self.dim_size): + for col in range(self.dim_size): + if (row,col) in self.dug: + visible_board[row][col] = str(self.board[row][col]) + else: + visible_board[row][col] = ' ' + + string_rep = '' + widths = [] + for idx in range(self.dim_size): + columns = map(lambda x: x[idx], visible_board) + widths.append( + len( + max(columns, key = len) + ) + ) + + # print the csv strings + indices = [i for i in range(self.dim_size)] + indices_row = ' ' + cells = [] + for idx, col in enumerate(indices): + format = '%-' + str(widths[idx]) + "s" + cells.append(format % (col)) + indices_row += ' '.join(cells) + indices_row += ' \n' + + for i in range(len(visible_board)): + row = visible_board[i] + string_rep += f'{i} |' + cells = [] + for idx, col in enumerate(row): + format = '%-' + str(widths[idx]) + "s" + cells.append(format % (col)) + string_rep += ' |'.join(cells) + string_rep += ' |\n' + + str_len = int(len(string_rep) / self.dim_size) + string_rep = indices_row + '-'*str_len + '\n' + string_rep + '-'*str_len + + return string_rep + + +def play(dim_size=10, num_bombs=10): + + board = Board(dim_size, num_bombs) + + safe = True + + while len(board.dug) < board.dim_size ** 2 - num_bombs: + print(board) + + user_input = re.split(',(\\s)*', input("Where would you like to dig? Input as row,col: ")) # '0, 3' + row, col = int(user_input[0]), int(user_input[-1]) + if row < 0 or row >= board.dim_size or col < 0 or col >= dim_size: + print("Invalid location. Try again.") + continue + + safe = board.dig(row, col) + if not safe: + break + if safe: + print("CONGRATULATIONS!!!! YOU ARE VICTORIOUS!") + else: + print("GAME OVER!!! BETTER LUCK NEXT TIME :(") + board.dug = [(r,c) for r in range(board.dim_size) for c in range(board.dim_size)] + print(board) + +if __name__ == '__main__': + play() diff --git a/MonthlyQuarterlySalesReport.java b/MonthlyQuarterlySalesReport.java new file mode 100644 index 00000000..6f7a6737 --- /dev/null +++ b/MonthlyQuarterlySalesReport.java @@ -0,0 +1,42 @@ +import java.util.Arrays; + +public class MonthlyQuarterlySalesReport { + + public static void main(String[] args) { + + // Create an array to store the monthly sales report + int[] monthlySalesReport = new int[]{125000, 93000, 80000, 75000, + 105000, 120000, 90000, 115000, 84000, 90000, 123000, 150000}; + + // Create an array to store the quarterly sales report + int[] quarterlySalesReport = new int[4]; + + // Calculate the quarterly sales report + for (int i = 0; i < 4; i++) { + for (int j = i * 3; j < (i + 1) * 3; j++) { + quarterlySalesReport[i] += monthlySalesReport[j]; + } + } + + // Display the monthly sales report + System.out.println("Monthly sales report:"); + for (int i = 0; i < monthlySalesReport.length; i++) { + System.out.println("Month " + (i + 1) + ": " + monthlySalesReport[i]); + } + + // Display the quarterly sales report + System.out.println("Quarterly sales report:"); + for (int i = 0; i < quarterlySalesReport.length; i++) { + System.out.println("Quarter " + (i + 1) + ": " + quarterlySalesReport[i]); + } + + // Calculate the total sales + int totalSales = 0; + for (int sale : monthlySalesReport) { + totalSales += sale; + } + + // Display the total sales + System.out.println("Total sales: " + totalSales); + } +} \ No newline at end of file diff --git a/Multithread.java b/Multithread.java new file mode 100644 index 00000000..ba694d90 --- /dev/null +++ b/Multithread.java @@ -0,0 +1,25 @@ +class MultithreadExm implements Runnable { + public void run() + { + try { + // It shows that thread is running + System.out.println( + "The thread " + Thread.currentThread().getId() + + " is currently running"); + } + catch (Exception e) { + System.out.println("Catching exception"); + } + } +} +class multithrdexp { + public static void main(String[] args) + { + int n = 5; // Number of threads + for (int i = 0; i < n; i++) { + Thread object + = new Thread(new MultithreadExm()); + object.start(); + } + } +} diff --git a/Multithreading.java b/Multithreading.java new file mode 100644 index 00000000..faba7950 --- /dev/null +++ b/Multithreading.java @@ -0,0 +1,17 @@ +class MyThread extends Thread { + public void run() { + for (int i = 1; i <= 5; i++) { + System.out.println("Thread " + Thread.currentThread().getId() + " - Count " + i); + } + } +} + +public class MultiThreadDemo { + public static void main(String[] args) { + MyThread thread1 = new MyThread(); + MyThread thread2 = new MyThread(); + + thread1.start(); + thread2.start(); + } +} diff --git a/N-Queen.java b/N-Queen.java new file mode 100644 index 00000000..f1950585 --- /dev/null +++ b/N-Queen.java @@ -0,0 +1,114 @@ +// Java program to solve N Queen Problem using backtracking + +public class NQueenProblem { + final int N = 4; + + // A utility function to print solution + void printSolution(int board[][]) + { + for (int i = 0; i < N; i++) { + for (int j = 0; j < N; j++) { + if (board[i][j] == 1) + System.out.print("Q "); + else + System.out.print(". "); + } + System.out.println(); + } + } + + // A utility function to check if a queen can + // be placed on board[row][col]. Note that this + // function is called when "col" queens are already + // placeed in columns from 0 to col -1. So we need + // to check only left side for attacking queens + boolean isSafe(int board[][], int row, int col) + { + int i, j; + + // Check this row on left side + for (i = 0; i < col; i++) + if (board[row][i] == 1) + return false; + + // Check upper diagonal on left side + for (i = row, j = col; i >= 0 && j >= 0; i--, j--) + if (board[i][j] == 1) + return false; + + // Check lower diagonal on left side + for (i = row, j = col; j >= 0 && i < N; i++, j--) + if (board[i][j] == 1) + return false; + + return true; + } + + // A recursive utility function to solve N + // Queen problem + boolean solveNQUtil(int board[][], int col) + { + // Base case: If all queens are placed + // then return true + if (col >= N) + return true; + + // Consider this column and try placing + // this queen in all rows one by one + for (int i = 0; i < N; i++) { + + // Check if the queen can be placed on + // board[i][col] + if (isSafe(board, i, col)) { + + // Place this queen in board[i][col] + board[i][col] = 1; + + // Recur to place rest of the queens + if (solveNQUtil(board, col + 1) == true) + return true; + + // If placing queen in board[i][col] + // doesn't lead to a solution then + // remove queen from board[i][col] + board[i][col] = 0; // BACKTRACK + } + } + + // If the queen can not be placed in any row in + // this column col, then return false + return false; + } + + // This function solves the N Queen problem using + // Backtracking. It mainly uses solveNQUtil () to + // solve the problem. It returns false if queens + // cannot be placed, otherwise, return true and + // prints placement of queens in the form of 1s. + // Please note that there may be more than one + // solutions, this function prints one of the + // feasible solutions. + boolean solveNQ() + { + int board[][] = { { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 } }; + + if (solveNQUtil(board, 0) == false) { + System.out.print("Solution does not exist"); + return false; + } + + printSolution(board); + return true; + } + + // Driver program to test above function + public static void main(String args[]) + { + NQueenProblem Queen = new NQueenProblem(); + Queen.solveNQ(); + } +} +// This code is contributed by Jaspreet Singh diff --git a/NotRandom.java b/NotRandom.java new file mode 100644 index 00000000..b0369b32 --- /dev/null +++ b/NotRandom.java @@ -0,0 +1,16 @@ +public class NotRandom{ + public static void main(String ... args) { + System.out.println(randomString(-229985452)+' '+randomString(-147909649)); + } + + public static String randomString(int seed) { + Random rand = new Random(seed); + StringBuilder sb = new StringBuilder(); + for(int i=0;;i++) { + int n = rand.nextInt(27); + if (n == 0) break; + sb.append((char) ('`' + n)); + } + return sb.toString(); + } +}//printing hello world without actually printing it. diff --git a/Nqueen.java b/Nqueen.java new file mode 100644 index 00000000..321e2d71 --- /dev/null +++ b/Nqueen.java @@ -0,0 +1,114 @@ +// Java program to solve N Queen Problem using backtracking + +public class NQueenProblem { + final int N = 4; + + // A utility function to print solution + void printSolution(int board[][]) + { + for (int i = 0; i < N; i++) { + for (int j = 0; j < N; j++) { + if (board[i][j] == 1) + System.out.print("Q "); + else + System.out.print(". "); + } + System.out.println(); + } + } + + // A utility function to check if a queen can + // be placed on board[row][col]. Note that this + // function is called when "col" queens are already + // placeed in columns from 0 to col -1. So we need + // to check only left side for attacking queens + boolean isSafe(int board[][], int row, int col) + { + int i, j; + + // Check this row on left side + for (i = 0; i < col; i++) + if (board[row][i] == 1) + return false; + + // Check upper diagonal on left side + for (i = row, j = col; i >= 0 && j >= 0; i--, j--) + if (board[i][j] == 1) + return false; + + // Check lower diagonal on left side + for (i = row, j = col; j >= 0 && i < N; i++, j--) + if (board[i][j] == 1) + return false; + + return true; + } + + // A recursive utility function to solve N + // Queen problem + boolean solveNQUtil(int board[][], int col) + { + // Base case: If all queens are placed + // then return true + if (col >= N) + return true; + + // Consider this column and try placing + // this queen in all rows one by one + for (int i = 0; i < N; i++) { + + // Check if the queen can be placed on + // board[i][col] + if (isSafe(board, i, col)) { + + // Place this queen in board[i][col] + board[i][col] = 1; + + // Recur to place rest of the queens + if (solveNQUtil(board, col + 1) == true) + return true; + + // If placing queen in board[i][col] + // doesn't lead to a solution then + // remove queen from board[i][col] + board[i][col] = 0; // BACKTRACK + } + } + + // If the queen can not be placed in any row in + // this column col, then return false + return false; + } + + // This function solves the N Queen problem using + // Backtracking. It mainly uses solveNQUtil () to + // solve the problem. It returns false if queens + // cannot be placed, otherwise, return true and + // prints placement of queens in the form of 1s. + // Please note that there may be more than one + // solutions, this function prints one of the + // feasible solutions. + boolean solveNQ() + { + int board[][] = { { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 } }; + + if (solveNQUtil(board, 0) == false) { + System.out.print("Solution does not exist"); + return false; + } + + printSolution(board); + return true; + } + + // Driver program to test above function + public static void main(String args[]) + { + NQueenProblem Queen = new NQueenProblem(); + Queen.solveNQ(); + } +} +// This code is contributed by Abhishek Shankhadhar diff --git a/Number_Gusses.java b/Number_Gusses.java new file mode 100644 index 00000000..19f65236 --- /dev/null +++ b/Number_Gusses.java @@ -0,0 +1,55 @@ +package com.company; + +import java.util.Random; +import java.util.Scanner; + +class Game{ + public int Computer_input; + public int User_input; + //public int noOfGuesses; + + // public int getNoOfGuesses() { + // return noOfGuesses; + // } + + //public void setNoOfGuesses(int noOfGuesses) { + // this.noOfGuesses = noOfGuesses; + // } + + public Game() { + Random rand=new Random(); + Computer_input = rand.nextInt(100); + } + //method for taking input from user + public void takeUserInput(){ + Scanner input=new Scanner(System.in); + System.out.println("Enter the Number That you want to guess it :"); + User_input=input.nextInt(); + input.close(); //input closed + } + boolean isCorrectNumber(){ + if(User_input==Computer_input){ + System.out.println("Congrats!!!You guess the Correct number.."); + return true; + } + else if(User_input<Computer_input){ + System.out.println("Your number is less than the computer number..."); + } + else if (User_input>Computer_input){ + System.out.println("Your number is greater than the computer number ..."); + } + return false; + } +} +public class Number_Gusses { + public static void main(String[] args) { + Game g=new Game(); + boolean b=false; + while(!b){ + g.takeUserInput(); + b= g.isCorrectNumber(); + System.out.println(b); + } + + } +} diff --git a/OTP generator/app.js b/OTP generator/app.js new file mode 100644 index 00000000..4714f79f --- /dev/null +++ b/OTP generator/app.js @@ -0,0 +1,16 @@ + +let fun=()=>{ + + let a=[0,1,2,3,4,5,6,7,8,9] + + let c=""; + + for(let i=0;i<4;i++){ + c+=a[Math.floor(Math.random()*10)]; + } + + document.getElementById('t1').textContent=c; +} + + +document.getElementById('bt').addEventListener('click',fun) \ No newline at end of file diff --git a/OTP generator/index.html b/OTP generator/index.html new file mode 100644 index 00000000..9cf6a175 --- /dev/null +++ b/OTP generator/index.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>OTP-Generator</title> + <link rel="stylesheet" href="/style.css"> +</head> +<body> + <div class="box"> + <h1 id="t1">0000</h1> + + <button id="bt">Generate</button> + </div> + + + <script src="/app.js"></script> +</body> +</html> \ No newline at end of file diff --git a/OTP generator/style.css b/OTP generator/style.css new file mode 100644 index 00000000..41e69355 --- /dev/null +++ b/OTP generator/style.css @@ -0,0 +1,23 @@ +.box { + width: 500px; + height: 120px; + position: absolute; + top:0; + bottom: 0; + left: 0; + right: 0; + + margin: auto; + + font-size: larger; + + border: 2px solid black; + + + text-align: center; + + border-radius: 20px; + + + background-color: bisque; +} \ No newline at end of file diff --git a/OTP-generator/OTP-generator.java b/OTP-generator/OTP-generator.java new file mode 100644 index 00000000..c89b3937 --- /dev/null +++ b/OTP-generator/OTP-generator.java @@ -0,0 +1,37 @@ +// Java OTP generator using random() method + +import java.util.*; + +class Main { + public static void main(String[] args) + { + int length = 10; + System.out.println(Password(length)); + } + + static char[] Password(int len) + { + System.out.println("Generating password using random() : "); + System.out.print("Your new password is : "); + + String Capital_letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + String Small_letters = "abcdefghijklmnopqrstuvwxyz"; + String numbers = "0123456789"; + String symbols = "!@#$%^&*_=+-/.?<>)"; + + + String values = Capital_letters + Small_letters + numbers + symbols; + + Random random_method = new Random(); + + char[] password = new char[len]; + + for (int i = 0; i < len; i++) + { + password[i] = + values.charAt(random_method.nextInt(values.length())); + + } + return password; + } +} diff --git a/Online Book Store/.DS_Store b/Online Book Store/.DS_Store new file mode 100644 index 00000000..fa460859 Binary files /dev/null and b/Online Book Store/.DS_Store differ diff --git a/Online Book Store/WEB-INF/classes/obs/Cart.class b/Online Book Store/WEB-INF/classes/obs/Cart.class new file mode 100644 index 00000000..2cbf66d4 Binary files /dev/null and b/Online Book Store/WEB-INF/classes/obs/Cart.class differ diff --git a/Online Book Store/WEB-INF/classes/obs/Cart.java b/Online Book Store/WEB-INF/classes/obs/Cart.java new file mode 100644 index 00000000..02947b54 --- /dev/null +++ b/Online Book Store/WEB-INF/classes/obs/Cart.java @@ -0,0 +1,171 @@ +// Cart +package obs; +import java.util.*; +import java.sql.*; +import obs.*; +import javax.ejb.*; +import javax.naming.*; +import obs.order.*; + + + + +public class Cart +{ + ArrayList items = new ArrayList(); + + public Item find(String isbn) + { + Iterator itr = items.iterator(); + Item itm; + while ( itr.hasNext()) + { + itm = (Item) itr.next(); + if ( itm.getIsbn().equals(isbn)) + { + return itm; + } + } // end of while + + return null; + } + + // adds an item if not already existing + // otherwise add 1 to qty + public void addItem(String isbn ) + { + //check whether isbn is already present + Item item = find(isbn); + if ( item != null) + item.addQty(1); + else + { + // get detais from Books tables + + Connection con =null; + obs.User user = new obs.User(); + try + { + con = user.getConnection(); + PreparedStatement ps = con.prepareStatement("select title,price from books where isbn = ? "); + ps.setString(1,isbn); + + ResultSet rs = ps.executeQuery(); + if ( rs.next()) + { + item = new Item(isbn, rs.getString(1), rs.getInt(2) ); + items.add(item); + } + + rs.close(); + ps.close(); + + } + catch(Exception ex) + { + System.out.println(ex.getMessage()); + } + finally + { + try {con.close();} catch(Exception ex) {} + } + } // end of else + } + + public ArrayList getItems() + { return items; } + + public void removeItem(String isbn) + { + Item item = find(isbn); + if ( item != null) + items.remove(item); + } // end or removeItem + + public void clearAll() + { + items.clear(); + } + + public void updateQty(String isbn, int qty) + { + Item item = find(isbn); + if ( item != null) + item.setQty(qty); + } // end of updateQty() + + + public String finalizeOrder(int userid) + { + + try + { + Context ctx = getInitialContext(); + // get access to bean + + OrderHome home = (OrderHome) ctx.lookup("obs.order"); + Order order = home.create(); + + String id= order.addOrder(userid,items); + return id; + } + catch(Exception ex) + { + System.out.println( ex.getMessage()); + return null; + + } + + } // end of finalizeOrder + + + + public boolean cancelOrder(int ordid) + { + + try + { + Context ctx = getInitialContext(); + // get access to bean + + OrderHome home = (OrderHome) ctx.lookup("obs.order"); + Order order = home.create(); + + return order.cancelOrder(ordid); + + } + catch(Exception ex) + { + System.out.println( ex.getMessage()); + return false; + + } + + + } // end of finalizeOrder + + public Context getInitialContext() + { + + String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory"; + + try + { + Hashtable env = new Hashtable(); + env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY); + env.put(Context.PROVIDER_URL,"t3://localhost:7001"); + return new InitialContext(env); + } + catch(Exception ex) + { + System.out.println(ex.getMessage()); + return null; + } + + } + +} + + + + diff --git a/Online Book Store/WEB-INF/classes/obs/Customer.java b/Online Book Store/WEB-INF/classes/obs/Customer.java new file mode 100644 index 00000000..b908a9a3 --- /dev/null +++ b/Online Book Store/WEB-INF/classes/obs/Customer.java @@ -0,0 +1,200 @@ +// User Bean + +package cs; +import java.sql.*; +import java.util.*; +import javax.naming.*; +import javax.rmi.*; + + + +public class Customer +{ + + + private String custname; + private String password; + private String email; + private String phoneno; + + private Context ctx; + + public Context getJNDIContext() + { + return ctx; + } + + public Customer() + { + ctx = getInitialContext(); + } + + public void setCustname(String custname) + { this.custname = custname; } + + public String getCustname() + { return custname; } + + + public void setPhoneno (String phoneno) + { this.phoneno = phoneno; } + + public String getPhoneno() + { return phoneno; } + + public void setPassword(String password) + { this.password= password; } + + public String getPassword() + { return password; } + + public void setEmail (String email) + { this.email = email; } + + public String getEmail() + { return email; } + + // returns true if uname and pwd are valid + public boolean isValid() + { + Connection con = null; + PreparedStatement ps = null; + try + { + con = getConnection(); + ps = con.prepareStatement("select phoneno, email from customers where custname = ? and pwd= ?"); + ps.setString(1,custname); + ps.setString(2,password); + + ResultSet rs = ps.executeQuery(); + boolean found = false; + + if ( rs.next()) + { phoneno = rs.getString("phoneno"); + email = rs.getString("email"); + found = true; + } + return found; + } + catch(Exception ex) + { + System.out.println( ex.getMessage()); + return false; + } + finally + { + clean(con,ps); + } + + } // end of isValid + + public String updatePassword(String newpassword) + { + Connection con = null; + PreparedStatement ps= null; + + try + { + con = getConnection(); + ps = con.prepareStatement("update customers set pwd = ? where custname = ?"); + ps.setString(1,newpassword); + ps.setString(2,custname); + + int cnt = ps.executeUpdate(); + if ( cnt==1 ) + return null; + else + return "Invalid Username!"; + + } + catch(Exception ex) + { + System.out.println( ex.getMessage()); + return ex.getMessage(); + } + finally + { + clean(con,ps); + } + + } // end of updatePassword + + public String registerUser() + { + Connection con = null; + PreparedStatement ps = null; + + try + { + con = getConnection(); + ps = con.prepareStatement("insert into customers values (?,?,?,?)"); + ps.setString(1,custname); + ps.setString(2,password); + ps.setString(3,email); + ps.setString(4,phoneno); + ps.executeUpdate(); + return null; + + } + catch(Exception ex) + { + return ex.getMessage(); + } + finally + { clean(con,ps); } + } + + + + + public void clean(Connection con, PreparedStatement ps) + { + try + { if ( ps != null ) ps.close(); + if ( con != null) con.close(); + } + catch(Exception ex) + { System.out.println(ex.getMessage()); } + } + + public Connection getConnection() throws Exception + { + Class.forName("oracle.jdbc.driver.OracleDriver"); + // connect using Thin driver + Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:oracle8i", + "custsup","custsup"); + + return con; + } + + + public Context getInitialContext() + { + + String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory"; + + try + { + Hashtable env = new Hashtable(); + env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY); + env.put(Context.PROVIDER_URL,"t3://localhost:7001"); + return new InitialContext(env); + } + catch(Exception ex) + { + System.out.println(ex.getMessage()); + return null; + } + + } + + +} // end of bean + + + + + + + + diff --git a/Online Book Store/WEB-INF/classes/obs/Item.class b/Online Book Store/WEB-INF/classes/obs/Item.class new file mode 100644 index 00000000..70dec1c1 Binary files /dev/null and b/Online Book Store/WEB-INF/classes/obs/Item.class differ diff --git a/Online Book Store/WEB-INF/classes/obs/Item.java b/Online Book Store/WEB-INF/classes/obs/Item.java new file mode 100644 index 00000000..cb1e4fa1 --- /dev/null +++ b/Online Book Store/WEB-INF/classes/obs/Item.java @@ -0,0 +1,43 @@ +// Item class +package obs; +public class Item implements java.io.Serializable +{ + + private String isbn,title; + private int price; + private int qty; + + public Item(String isbn,String title, int price) + { + this.isbn = isbn; + this.title = title; + this.price = price; + this.qty = 1; + } + public String getIsbn() + { + return isbn; + } + + public String getTitle() + { + return title; + } + + public int getQty() + { + return qty; + } + + public void setQty(int qty) + { this.qty = qty; } + + public void addQty(int qty) + { this.qty += qty; } + + public int getPrice() + { + return price; + } +} // end of class + \ No newline at end of file diff --git a/Online Book Store/WEB-INF/classes/obs/User.class b/Online Book Store/WEB-INF/classes/obs/User.class new file mode 100644 index 00000000..abc3b317 Binary files /dev/null and b/Online Book Store/WEB-INF/classes/obs/User.class differ diff --git a/Online Book Store/WEB-INF/classes/obs/User.java b/Online Book Store/WEB-INF/classes/obs/User.java new file mode 100644 index 00000000..d0a18c1c --- /dev/null +++ b/Online Book Store/WEB-INF/classes/obs/User.java @@ -0,0 +1,210 @@ +// User Bean + +package obs; +import java.sql.*; +import java.util.*; + + +public class User +{ + private int userid; + private String uname; + private String pwd; + private String email; + private String address; + private String phone; + + private boolean logged = false; + + public int getUserid() + { return userid; } + + public void setUname(String uname) + { this.uname = uname; } + + public String getUname() + { return uname; } + + public void setPwd(String pwd) + { this.pwd= pwd; } + + public String getPwd() + { return pwd; } + + public void setEmail (String email) + { this.email = email; } + + public String getEmail() + { return email; } + + public void setAddress(String address) + { this.address = address; } + + public String getAddress() + { return address; } + + + public void setPhone(String phone) + { this.phone = phone; } + + public String getPhone() + { return phone; } + + + public void login() + { + Connection con = null; + PreparedStatement ps = null; + try + { + con = getConnection(); + ps = con.prepareStatement("select userid,email,phone,address from users where uname = ? and pwd= ?"); + ps.setString(1,uname); + ps.setString(2,pwd); + + ResultSet rs = ps.executeQuery(); + + logged = false; + + if ( rs.next()) + { userid = rs.getInt("userid"); + email = rs.getString("email"); + address = rs.getString("address"); + phone = rs.getString("phone"); + logged = true; + } + + } + catch(Exception ex) + { + System.out.println( ex.getMessage()); + } + finally + { + clean(con,ps); + } + + } // end of isValid + + + + public String updateProfile(String newpwd) + { + Connection con = null; + PreparedStatement ps= null; + + try + { + con = getConnection(); + String cmd = "update users set email=?, phone = ? , address =? "; + + if (! newpwd.equals("")) + cmd += " , pwd = '" + newpwd + "'"; + + cmd = cmd + " where userid = ?"; + + ps = con.prepareStatement(cmd); + ps.setString(1,email); + ps.setString(2,phone); + ps.setString(3,address); + ps.setInt(4,userid); + + int cnt = ps.executeUpdate(); + if ( cnt==1 ) + { + if ( ! newpwd.equals("") ) + pwd = newpwd; + return null; + } + else + return "Invalid User. Unable to update profile."; + + } + catch(Exception ex) + { + System.out.println( ex.getMessage()); + return ex.getMessage(); + } + finally + { + clean(con,ps); + } + + } // end of updateProfile + + + + public String registerUser() + { + Connection con = null; + PreparedStatement ps = null; + + try + { + con = getConnection(); + userid = getNextUserid(con); + ps = con.prepareStatement("insert into users values (?,?,?,?,?,?)"); + ps.setInt(1,userid); + ps.setString(2,uname); + ps.setString(3,pwd); + ps.setString(4,email); + ps.setString(5,address); + ps.setString(6,phone); + ps.executeUpdate(); + logged = true; + return null; + } + catch(Exception ex) + { + return ex.getMessage(); + } + finally + { clean(con,ps); } + } + + public boolean isLogged() + { return logged; } + + + public int getNextUserid(Connection con) throws Exception + { + PreparedStatement ps = null; + ps = con.prepareStatement("select nvl( max(userid),0) + 1 from users"); + ResultSet rs = ps.executeQuery(); + rs.next(); + int nextuserid = rs.getInt(1); + rs.close(); + + return nextuserid; + + } + + + public void clean(Connection con, PreparedStatement ps) + { + try + { if ( ps != null ) ps.close(); + if ( con != null) con.close(); + } + catch(Exception ex) + { System.out.println(ex.getMessage()); } + } + + public Connection getConnection() throws Exception + { + Class.forName("oracle.jdbc.driver.OracleDriver"); + // connect using Thin driver + Connection con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:oracle9i", + "obs","obs"); + return con; + } + +} // end of bean + + + + + + + + diff --git a/Online Book Store/WEB-INF/classes/obs/home.jsp b/Online Book Store/WEB-INF/classes/obs/home.jsp new file mode 100644 index 00000000..d891f3ea --- /dev/null +++ b/Online Book Store/WEB-INF/classes/obs/home.jsp @@ -0,0 +1,7 @@ +<html> +<jsp:userBean name="user" scope="session" class="obs.User" /> + +<div style="font:700 11pt verdana" border=1> +Welcome <b><jsp:getProperty id="user" property="uname"/> </b> +</div> + diff --git a/Online Book Store/WEB-INF/classes/obs/s.bat b/Online Book Store/WEB-INF/classes/obs/s.bat new file mode 100644 index 00000000..c635c2a1 --- /dev/null +++ b/Online Book Store/WEB-INF/classes/obs/s.bat @@ -0,0 +1,3 @@ +path c:\jdk1.4\bin;c:\windows\system32 +set classpath=.;c:\jdk1.4\lib\tools.jar;c:\tomcat\common\lib\servlet.jar;c:\tomcat\common\lib\xerces.jar;d:\tomcat\common\lib\activation.jar;c:\tomcat\common\lib\mail.jar;c:\tomcat\webapps\obs\web-inf\classes;c:\tomcat\webapps\obs\web-inf\lib\order_client.jar;c:\weblogic\weblogic700\server\lib\weblogic.jar + diff --git a/Online Book Store/WEB-INF/lib/order_client.jar b/Online Book Store/WEB-INF/lib/order_client.jar new file mode 100644 index 00000000..e3910cd5 Binary files /dev/null and b/Online Book Store/WEB-INF/lib/order_client.jar differ diff --git a/Online Book Store/WEB-INF/web.xml b/Online Book Store/WEB-INF/web.xml new file mode 100644 index 00000000..34303fb3 --- /dev/null +++ b/Online Book Store/WEB-INF/web.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + +<!DOCTYPE web-app + PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/dtd/web-app_2_3.dtd"> + +<web-app> + +<welcome-file-list> + <welcome-file>login.html</welcome-file> + </welcome-file-list> + +</web-app> diff --git a/Online Book Store/addbook.jsp b/Online Book Store/addbook.jsp new file mode 100644 index 00000000..466eae15 --- /dev/null +++ b/Online Book Store/addbook.jsp @@ -0,0 +1,21 @@ +<jsp:useBean id="cart" class="obs.Cart" scope="session" /> +<jsp:useBean id="user" class="obs.User" scope="session" /> + +<% + // check whether user has logged in, otherwise send user to login page + out.println( user.isLogged()); + + if (!user.isLogged()) + response.sendRedirect("login.html"); + + // read data about item + + String isbn = request.getParameter("isbn"); + + cart.addItem(isbn); + + response.sendRedirect("home.jsp"); + +%> + + \ No newline at end of file diff --git a/Online Book Store/browsebooks.jsp b/Online Book Store/browsebooks.jsp new file mode 100644 index 00000000..c4aaad79 --- /dev/null +++ b/Online Book Store/browsebooks.jsp @@ -0,0 +1,42 @@ +<html> +<style> +h2{color:navy;font:700 20pt arial} +h4 {color:brwon;font:700 11pt verdana} +td {font:10pt verdana} +a {font:12pt verdana;color:navy} + +</style> + +<body bgcolor="beige"> + +<h2>Browse Available Books</h2> + +<form action="browsebooks.jsp" method="post" > +Select Category : +<select name="cat"> +<option value="all">All Categories +<option value="ora">Oracle +<option value=".net">.NET +<option value="java">Java +</select> +<input type=submit value="Browse"> + +<a href="querybooks.jsp">Query Books </a> <a href="gohome.jsp">Home </a> + +</form> + +<% + String cat = request.getParameter("cat"); + if ( cat == null) + request.setAttribute("cond","1=1"); +else + if (!cat.equals("all") ) + request.setAttribute("cond", "cat='" + cat + "'"); + +%> + +<jsp:include page="listbooks.jsp" flush="true"/> + + +</body> +</html> \ No newline at end of file diff --git a/Online Book Store/changeprofile.html b/Online Book Store/changeprofile.html new file mode 100644 index 00000000..6d56e483 --- /dev/null +++ b/Online Book Store/changeprofile.html @@ -0,0 +1,68 @@ +<html> +<style> +h2{color:bottlegreen;font:700 20pt arial} +h4 {color:brwon;font:700 11pt verdana} +td {font:10pt verdana} +a {font:10pt verdana;color:navy} + +</style> + +<body bgcolor="beige"> + +<h2>Change Profile </h2> +<hr> +<form action="register.jsp" method="post"> +<table> +<tr> +<td> +User Name +<td> +<input type=text name=uname size=20>* +</tr> +<tr> +<td> +Password +<td> +<input type=password name=pwd size=20>* +</tr> +<tr> +<td> +Confirm Password +<td> +<input type=password name=pwd2 size=20>* +</tr> + +<tr> +<td> +Email Address +<td> +<input type=text name=email size=30>* +</tr> + +<tr> +<td>Mailing Address +<td> +<textarea name="address" rows=3 cols=30></textarea>* +</td> +</tr> + + +<tr> +<td> +Phone Number +<td> +<input type=text name=phoneno size=30> +</tr> + +</table> +<p> + +<input type=submit value="Register"> +<input type=reset value="Clear All"> +<p> +<a href="login.html">Go Back</a> +</form> + +</center> +</body> +</html> \ No newline at end of file diff --git a/Online Book Store/changeprofile.jsp b/Online Book Store/changeprofile.jsp new file mode 100644 index 00000000..27d96411 --- /dev/null +++ b/Online Book Store/changeprofile.jsp @@ -0,0 +1,94 @@ +<jsp:useBean id="user" scope="session" class="obs.User"/> + +<jsp:setProperty name="user" property="*" /> + +<% + if (!user.isLogged()) + response.sendRedirect("login.html"); + +%> + +<html> +<style> +h2{color:bottlegreen;font:700 16pt arial} +h3{color:navy;font:700 12pt arial} +td {font:10pt verdana} +a {font:10pt verdana;color:bottlegreen} +body {font:10pt verdana} + +</style> + +<body bgcolor="beige"> + +<h2>Change Profile </h2> +<form action="changeprofile.jsp" method="post"> +<h3>Personal Details </h3> +<table> +<tr> +<td> +Email Address +<td> +<input type=text name=email size=30 value=<%=user.getEmail()%>> +</tr> + +<tr> +<td>Mailing Address +<td> +<textarea name="address" rows=3 cols=30><%=user.getAddress()%></textarea> +</td> +</tr> + +<tr> +<td> +Phone Number +<td> +<input type=text name=phone size=30 value='<%=user.getPhone()%>'> +</tr> +</table> + +<h3>Password </h3> + +<table> +<tr> +<td> +New Password +<td> +<input type=password name=pwd size=20> +</tr> +<tr> +<td> +Confirm Password +<td> +<input type=password name=pwd2 size=20> +</tr> + +</table> + +<p> + + +<input type=submit value="Update Profile"> +<input type=reset value="Reset"> <a href="home.jsp">Home Page</a> +</form> + + +<% + + // do it if any invoked by itself + if ( request.getParameter("email") == null) + return; + + String res = user.updateProfile( request.getParameter("pwd") ); + + if ( res == null) + out.println("Profile Updated Successfully."); + else + out.println("Error : " + res); + + out.println("Click <a href=home.jsp>here</a> to continue..."); + +%> + + +</body> +</html> \ No newline at end of file diff --git a/Online Book Store/deleteorder.jsp b/Online Book Store/deleteorder.jsp new file mode 100644 index 00000000..0c2242dd --- /dev/null +++ b/Online Book Store/deleteorder.jsp @@ -0,0 +1,30 @@ +<jsp:useBean id="cart" class="obs.Cart" scope="session" /> +<jsp:useBean id="user" class="obs.User" scope="session" /> + +<% + // check whether user has logged in, otherwise send user to login page + + if (!user.isLogged()) + response.sendRedirect("login.html"); + + // read data about item + + String ordid = request.getParameter("ordid"); + + boolean result = cart.cancelOrder( Integer.parseInt(ordid)); + if ( result ) + out.println("<h2>Order Has Been Cancelled.</h2>"); + else + out.println("<h2>Order could not be cancelled.</h2>"); + + + +%> + +<p> +<a href="ordershistory.jsp">Orders History </a> + +<a href="home.jsp">Home Page </a> + + + \ No newline at end of file diff --git a/Online Book Store/gohome.jsp b/Online Book Store/gohome.jsp new file mode 100644 index 00000000..1bfe41ad --- /dev/null +++ b/Online Book Store/gohome.jsp @@ -0,0 +1,8 @@ +<jsp:useBean id="user" class="obs.User" scope="session" /> + +<% + if ( user.isLogged() ) + response.sendRedirect("home.jsp"); + else + response.sendRedirect("login.html"); +%> diff --git a/Online Book Store/home.jsp b/Online Book Store/home.jsp new file mode 100644 index 00000000..52dec10f --- /dev/null +++ b/Online Book Store/home.jsp @@ -0,0 +1,159 @@ + +<jsp:useBean id="user" scope="session" class="obs.User" /> +<jsp:useBean id="cart" scope="session" class="obs.Cart" /> + + +<%@ page import="java.util.*"%> + +<style> +td {font:10pt verdana} +th {font:700 10pt verdana} +h2 {font:700 16pt arial} +a {font:700 10pt verdana;color:darkgreen} +</style> + +<% + String act = request.getParameter("act"); + + if ( act != null ) + { + if( act.equals("Finalize Order")) + { + String orderid; + + orderid = cart.finalizeOrder( user.getUserid()); + if ( orderid == null) + { + out.println("Sorry! Order Cannot be finalized."); + return; + } + else + { + out.println("Order Has Been Finalized. Order id : " + orderid ); + out.println("<a href=home.jsp>Continue...</a>"); + cart.clearAll(); + return; + } + + + } + + if ( act.equals("remove")) + { + cart.removeItem( request.getParameter("isbn")); + } + else + if ( act.equals("Update Cart")) + { + + String isbn[] = (String []) request.getParameterValues("isbn"); + String qty[] = (String []) request.getParameterValues("qty"); + + for (int i = 0 ;i < isbn.length ;i ++) + cart.updateQty(isbn[i], Integer.parseInt( qty[i])); + + } + else + if ( act.equals("Clear Cart")) + cart.clearAll(); + } // end of outer if + + +%> + + + +<html> +<body bgcolor="beige"> + + +<table border=1 border=1 width=100%> +<tr style="font:700 11pt verdana;background-color:green;color:white"> +<td> +Welcome <b><jsp:getProperty name="user" property="uname"/> </b> +</tr> + +<tr style="font:10pt verdana"> +<td> +<h2>Shopping Cart </h2> + + +<table width=100%> +<tr> +<td width=70%> + +<form action="home.jsp" method="get"> +<table border=1 style="background-color:lightgreen" width="100%"> +<tr> +<th>Book Title +<th>Price +<th>Quantity +<th>Amount +<th> +</tr> + +<% + obs.Item item; + + ArrayList items = cart.getItems(); + Iterator itr = items.iterator(); + int total = 0; + + while ( itr.hasNext()) + { + item = (obs.Item) itr.next(); + total += item.getQty() * item.getPrice(); +%> + +<tr> +<td> +<input type=hidden value=<%=item.getIsbn()%> name=isbn> +<%= item.getTitle()%> +<td align="right"><%= item.getPrice()%> +<td align="center"><input type=text name=qty size=5 value=<%=item.getQty()%>> +<td align="right"><%=item.getQty() * item.getPrice()%> +<td align="center"><a href=home.jsp?act=remove&isbn=<%=item.getIsbn()%>>Remove</a> +</tr> + +<% + } +%> +<tr> +<td colspan=5 style="text-align:center;font:700 12pt verdana;color:navy"> +Total Amount : <%=total%> +</tr> + + +</table> + +</td> +<td> + +<input type=submit value="Update Cart" name="act"> +<p> +<input type=submit value="Clear Cart" name="act"> +<p> +<input type=submit value="Finalize Order" name="act"> + +</tr> +</table> + +</form> + +</td> +</tr> + +<tr> +<td> +[<a href="changeprofile.jsp">Change User Details</a>] +[<a href="browsebooks.jsp">Browse Books</a>] +[<a href="querybooks.jsp">Query Books</a>] +[<a href="ordershistory.jsp">Orders History</a>] +[<a href=logout.jsp> Logout </a>] +</td> +</tr> + +</table> + +</body> +</html> diff --git a/Online Book Store/image.gif b/Online Book Store/image.gif new file mode 100644 index 00000000..87dd41ca Binary files /dev/null and b/Online Book Store/image.gif differ diff --git a/Online Book Store/listbooks.jsp b/Online Book Store/listbooks.jsp new file mode 100644 index 00000000..ef70920c --- /dev/null +++ b/Online Book Store/listbooks.jsp @@ -0,0 +1,58 @@ +<jsp:useBean id="user" scope="session" class="obs.User"/> +<%@ page import="java.sql.*"%> + +<h3>List Of Books </h3> + +<table border=1 width=100%> +<tr style="background-color:green;color:beige;font:700 10pt verdana"> +<th> +<th>Serial No +<th>ISBN +<th>Title +<th>Price +<th>Author +<th>Cateogry +<th>Publisher +</tr> +<% + + String cond = (String) request.getAttribute("cond"); + if ( cond == null) + cond = "1 = 1"; + + Connection con = user.getConnection(); + Statement st= con.createStatement(); + + ResultSet rs = st.executeQuery("select rownum,isbn,title,author,price,cat,pub from books where " + cond); + + while (rs.next()) + { + +%> +<tr> +<td> +<a href=addbook.jsp?isbn=<%=rs.getString("isbn")%>>Add TO Cart </a> +<td><%=rs.getInt(1)%> +<td><%=rs.getString(2)%> +<td><%=rs.getString(3)%> +<td><%=rs.getString(4)%> +<td><%=rs.getInt(5)%> +<td><%=rs.getString(6)%> +<td><%=rs.getString(7)%> +</tr> + +<% + } + rs.close(); + st.close(); + con.close(); +%> + +</table> + + + + + + + \ No newline at end of file diff --git a/Online Book Store/login.html b/Online Book Store/login.html new file mode 100644 index 00000000..43a3634b --- /dev/null +++ b/Online Book Store/login.html @@ -0,0 +1,54 @@ +<html> +<style> +h3 {color:bootlegreen;font:700 12pt arial} +body {font:10pt verdana} +td{font:10pt verdana} +a {font:700 12pt verdana;color:green} +h2 {font:700 16pt arial;color:bootlegreen} +</style> +<body bgcolor="beige" leftmargin=0 +topmargin=0> +<div style="color:beige;font:700 30pt arial;background-color:green;letter-spacing:15pt;text-align:center ">Online Book Store </div> +<table width=100% height=100%> +<tr> +<td width=20% style="background-color:lightgreen" valign=top> +<form action="login.jsp" method="post"> +<h3>Login </h3> +Username +<br> +<input type=text name=uname size=20> +<br> +Password +<br> +<input type=password name=pwd size=20> +<p> +<input type=submit value="Submit"> +<p> +<a href="register.html" style="font:700 10pt verdana">I Am New User</a> +</form> +</td> +<td valign=top> +<h3>Introduction</h3> +This site allows you to purchase books online. All that you have to do is add selected books to shopping cart and finalize the order. Books selected by you will be delivered to your door steps. You can pay only after books are delivered. + +<p> +<b>The following are the required steps :</b> +<ul> +<li>Login if already registered. Otherwise register as a user. Registration is free. +<li>Browser books and add books to shopping cart. Browsing is allowed to everyone, but only registed users can place order. +<li>You can modify shopping cart at your will +<li>Finalize the order. +<li>Pay for books when they are deliverd to your door steps. +</ul> + +<p> +<center> +<a href="browsebooks.jsp">Browse Available Books </a> +<p> +<img src="image.gif"> +</center> +</tr> +</table> + +</body> +</html> diff --git a/Online Book Store/login.jsp b/Online Book Store/login.jsp new file mode 100644 index 00000000..cd69e40b --- /dev/null +++ b/Online Book Store/login.jsp @@ -0,0 +1,25 @@ + +<html> +<body bgcolor="beige"> +<center> + +<jsp:useBean id="user" class="obs.User" scope="session" /> + +<jsp:setProperty name="user" property="*" /> + +<% + user.login(); + if (! user.isLogged()) +%> +<h3>Invalid Login. Click <a href=login.html>here</a> to try again! </h3> +<% + else + response.sendRedirect("home.jsp"); +%> + +</center> +</body> +</html> + + + diff --git a/Online Book Store/logout.jsp b/Online Book Store/logout.jsp new file mode 100644 index 00000000..efe527fa --- /dev/null +++ b/Online Book Store/logout.jsp @@ -0,0 +1,4 @@ +<% + session.invalidate(); + response.sendRedirect("login.html"); +%> diff --git a/Online Book Store/order/Client.java b/Online Book Store/order/Client.java new file mode 100644 index 00000000..162f264d --- /dev/null +++ b/Online Book Store/order/Client.java @@ -0,0 +1,34 @@ +package st.hello; + +import java.rmi.RemoteException; +import java.util.Properties; +import javax.naming.*; +import javax.ejb.*; +import javax.rmi.PortableRemoteObject; + +public class Client { + private static final String JNDI_NAME = "st.hello"; + + public static void main(String[] args) throws Exception + { + String url = "t3://localhost:7001"; + + Properties h = new Properties(); + h.put(Context.INITIAL_CONTEXT_FACTORY, + "weblogic.jndi.WLInitialContextFactory"); + h.put(Context.PROVIDER_URL, url); + Context ctx = new InitialContext(h); + + // Lookup the beans home using JNDI + + Object home = ctx.lookup(JNDI_NAME); + HelloHome hellohome = (HelloHome) PortableRemoteObject.narrow(home,HelloHome.class); + + Hello hello = hellohome.create(); + + System.out.println(hello.sayHello("Srikanth")); + + } + + +} diff --git a/Online Book Store/order/Item.java b/Online Book Store/order/Item.java new file mode 100644 index 00000000..acdda73f --- /dev/null +++ b/Online Book Store/order/Item.java @@ -0,0 +1,45 @@ +// Item class +package obs; + +public class Item + implements java.io.Serializable +{ + + private String isbn,title; + private int price; + private int qty; + + public Item(String isbn,String title, int price) + { + this.isbn = isbn; + this.title = title; + this.price = price; + this.qty = 1; + } + public String getIsbn() + { + return isbn; + } + + public String getTitle() + { + return title; + } + + public int getQty() + { + return qty; + } + + public void setQty(int qty) + { this.qty = qty; } + + public void addQty(int qty) + { this.qty += qty; } + + public int getPrice() + { + return price; + } +} // end of class + \ No newline at end of file diff --git a/Online Book Store/order/Order.java b/Online Book Store/order/Order.java new file mode 100644 index 00000000..deb5c936 --- /dev/null +++ b/Online Book Store/order/Order.java @@ -0,0 +1,13 @@ +package obs.order; + +import java.rmi.RemoteException; +import javax.ejb.EJBObject; +import java.util.*; + +public interface Order extends EJBObject +{ + + public String addOrder(int userid, ArrayList items) + throws RemoteException; + public boolean cancelOrder(int ordid) throws RemoteException; +} diff --git a/Online Book Store/order/OrderBean.java b/Online Book Store/order/OrderBean.java new file mode 100644 index 00000000..b71b79e9 --- /dev/null +++ b/Online Book Store/order/OrderBean.java @@ -0,0 +1,153 @@ +package obs.order; + +import javax.ejb.*; +import javax.naming.*; +import javax.sql.*; +import java.sql.*; +import java.util.*; +import obs.*; + + + +public class OrderBean implements SessionBean { + + public void ejbActivate() {} + public void ejbRemove() {} // end of remove + + public void ejbPassivate() {} + public void setSessionContext(SessionContext ctx) {} + + public void ejbCreate () throws CreateException {} + + + public String addOrder(int userid, ArrayList items) + { + Connection con=null; + String ordid; + PreparedStatement ps=null; + + try + { + + Context ctx = new InitialContext(); + DataSource ds = (DataSource) ctx.lookup("oracle"); + con =ds.getConnection(); + + // get highest order id + 1 for this order + ps= con.prepareStatement("select ordid.nextval from dual"); + ResultSet rs= ps.executeQuery(); + rs.next(); + + ordid = rs.getString(1); + + rs.close(); + + // get total amount + + int totamt =0; + Item item; + + Iterator itr = items.iterator(); + while ( itr.hasNext()) + { + item = (Item) itr.next(); + totamt += item.getPrice() * item.getQty(); + } + + + ps = con.prepareStatement("insert into orders values(?,?,sysdate,?,'n')"); + ps.setString(1,ordid); + ps.setInt(2,userid); + ps.setInt(3,totamt); + + ps.executeUpdate(); + ps.close(); + + // insert into orderitems + + ps = con.prepareStatement("insert into orderitem values(?,?,?,?)"); + + itr = items.iterator(); + while ( itr.hasNext()) + { + item = (Item) itr.next(); + ps.setString(1,ordid); + ps.setString(2, item.getIsbn()); + ps.setInt(3,item.getPrice()); + ps.setInt(4,item.getQty()); + + ps.executeUpdate(); + } + + + return ordid; + + } + catch(Exception ex) + { + ex.printStackTrace(); + } + finally + { + try + { if (ps != null ) ps.close(); + if (con != null) con.close(); + } + catch(Exception ex) {} + } + return null; + + } // end of addOrder + + + + public boolean cancelOrder(int ordid) + { + Connection con=null; + PreparedStatement ps=null; + + try + { + + Context ctx = new InitialContext(); + DataSource ds = (DataSource) ctx.lookup("oracle"); + con =ds.getConnection(); + + // delete from ORDERITEM table + + ps = con.prepareStatement("delete from orderitem where ordid = ?"); + ps.setInt(1,ordid); + + ps.executeUpdate(); + ps.close(); + + // delete from ORDERS table + + ps = con.prepareStatement("delete from orders where ordid = ?"); + ps.setInt(1,ordid); + + int cnt = ps.executeUpdate(); + ps.close(); + + if (cnt == 1) return true; + else return false; + + + } + catch(Exception ex) + { + ex.printStackTrace(); + } + finally + { + try + { if (ps != null ) ps.close(); + if (con != null) con.close(); + } + catch(Exception ex) {} + } + return false; + + } // end of cancelOrder + +} // end of OrderBean diff --git a/Online Book Store/order/OrderHome.java b/Online Book Store/order/OrderHome.java new file mode 100644 index 00000000..7aac9e83 --- /dev/null +++ b/Online Book Store/order/OrderHome.java @@ -0,0 +1,9 @@ +package obs.order; + +import java.rmi.RemoteException; +import javax.ejb.CreateException; +import javax.ejb.EJBHome; + +public interface OrderHome extends EJBHome { + Order create() throws CreateException, RemoteException; +} diff --git a/Online Book Store/order/Se.bat b/Online Book Store/order/Se.bat new file mode 100644 index 00000000..7faa84f3 --- /dev/null +++ b/Online Book Store/order/Se.bat @@ -0,0 +1,4 @@ +set classpath=.;c:\jdk1.4\lib\tools.jar;c:\weblogic\weblogic700\server\lib\weblogic.jar;d:\weblogic7\weblogic700 + +path=c:\weblogic\weblogic700\server\bin;c:\jdk1.4\bin;c:\windows\system32 + diff --git a/Online Book Store/order/application.xml b/Online Book Store/order/application.xml new file mode 100644 index 00000000..b03b248d --- /dev/null +++ b/Online Book Store/order/application.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'> + +<application> + <display-name>Order Bean</display-name> + <description>Online Book Store - Order Bean</description> + + <module> + <ejb>order.jar</ejb> + </module> + +</application> + diff --git a/Online Book Store/order/build.xml b/Online Book Store/order/build.xml new file mode 100644 index 00000000..d4f12873 --- /dev/null +++ b/Online Book Store/order/build.xml @@ -0,0 +1,74 @@ +<project name="complaint" default="all" basedir="."> + + <!-- set global properties for this build --> + <property environment="env"/> + <property file="examples.properties"/> + <property name="build.compiler" value="${JAVAC}"/> + <property name="source" value="."/> + <property name="build" value="${source}/build"/> + <property name="dist" value="${source}/dist"/> + + <target name="all" depends="clean, init, compile_ejb, jar_ejb, ejbc, ear_app,compile_client"/> + + <target name="init"> + <!-- Create the time stamp --> + <tstamp/> + <!-- Create the build directory structure used by compile + and copy the deployment descriptors into it--> + <mkdir dir="${build}"/> + <mkdir dir="${build}/META-INF"/> + <mkdir dir="${dist}"/> + <copy todir="${build}/META-INF"> + <fileset dir="${source}"> + <include name="ejb-jar.xml"/> + <include name="weblogic-ejb-jar.xml"/> + </fileset> + </copy> + </target> + + <!-- Compile ejb classes into the build directory (jar preparation) --> + <target name="compile_ejb"> + <javac srcdir="${source}" destdir="${build}" + includes="Item.java,Order.java, OrderHome.java, OrderBean.java"/> + </target> + + <!-- Update ejb jar file or create it if it doesn't exist; including XML + deployment descriptors --> + <target name="jar_ejb" depends="compile_ejb"> + <jar jarfile="${dist}/order.jar" + basedir="${build}" + update="yes"> + </jar> + </target> + + <!-- Run ejbc to create the deployable jar file --> + <target name="ejbc" depends="jar_ejb"> + <java classname="weblogic.ejbc" fork="yes" failonerror="yes"> + <sysproperty key="weblogic.home" value="${WL_HOME}/server"/> + <arg line="-verbose -compiler javac ${dist}/order.jar"/> + <classpath> + <pathelement path="${CLASSPATH}"/> + </classpath> + </java> + </target> + + <!-- Put the ejb into an ear, to be deployed from the ${APPLICATIONS} dir --> + <target name="ear_app" depends="jar_ejb"> + <ear earfile="${APPLICATIONS}/order.ear" appxml="${source}/application.xml"> + <fileset dir="${dist}" includes="order.jar"/> + </ear> + </target> + + + + <!-- Compile client app into the clientclasses directory, and move the client jar file (created by ejbc) there as well --> + <target name="compile_client"> + <move file="order_client.jar" tofile="${CLIENT_CLASSES}/order_client.jar"/> + + </target> + + <target name="clean"> + <delete dir="${build}"/> + </target> + +</project> diff --git a/Online Book Store/order/build/META-INF/ejb-jar.xml b/Online Book Store/order/build/META-INF/ejb-jar.xml new file mode 100644 index 00000000..e306c3ae --- /dev/null +++ b/Online Book Store/order/build/META-INF/ejb-jar.xml @@ -0,0 +1,19 @@ +<?xml version="1.0"?> + +<!DOCTYPE ejb-jar PUBLIC +'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' +'http://java.sun.com/dtd/ejb-jar_2_0.dtd'> + +<ejb-jar> + <enterprise-beans> + <session> + <ejb-name>Order</ejb-name> + <home>obs.order.OrderHome</home> + <remote>obs.order.Order</remote> + <ejb-class>obs.order.OrderBean</ejb-class> + <session-type>Stateless</session-type> + <transaction-type>Container</transaction-type> + </session> + </enterprise-beans> + <ejb-client-jar>order_client.jar</ejb-client-jar> +</ejb-jar> diff --git a/Online Book Store/order/build/META-INF/weblogic-ejb-jar.xml b/Online Book Store/order/build/META-INF/weblogic-ejb-jar.xml new file mode 100644 index 00000000..6873327f --- /dev/null +++ b/Online Book Store/order/build/META-INF/weblogic-ejb-jar.xml @@ -0,0 +1,13 @@ +<?xml version="1.0"?> + +<!DOCTYPE weblogic-ejb-jar PUBLIC +'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN' +'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'> + +<weblogic-ejb-jar> + <weblogic-enterprise-bean> + <ejb-name>Order</ejb-name> + <jndi-name>obs.order</jndi-name> + </weblogic-enterprise-bean> +</weblogic-ejb-jar> + diff --git a/Online Book Store/order/build/obs/Item.class b/Online Book Store/order/build/obs/Item.class new file mode 100644 index 00000000..72b9006b Binary files /dev/null and b/Online Book Store/order/build/obs/Item.class differ diff --git a/Online Book Store/order/build/obs/order/Order.class b/Online Book Store/order/build/obs/order/Order.class new file mode 100644 index 00000000..63031e63 Binary files /dev/null and b/Online Book Store/order/build/obs/order/Order.class differ diff --git a/Online Book Store/order/build/obs/order/OrderBean.class b/Online Book Store/order/build/obs/order/OrderBean.class new file mode 100644 index 00000000..1bfbed61 Binary files /dev/null and b/Online Book Store/order/build/obs/order/OrderBean.class differ diff --git a/Online Book Store/order/build/obs/order/OrderHome.class b/Online Book Store/order/build/obs/order/OrderHome.class new file mode 100644 index 00000000..b40cd0b9 Binary files /dev/null and b/Online Book Store/order/build/obs/order/OrderHome.class differ diff --git a/Online Book Store/order/ejb-jar.xml b/Online Book Store/order/ejb-jar.xml new file mode 100644 index 00000000..e306c3ae --- /dev/null +++ b/Online Book Store/order/ejb-jar.xml @@ -0,0 +1,19 @@ +<?xml version="1.0"?> + +<!DOCTYPE ejb-jar PUBLIC +'-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' +'http://java.sun.com/dtd/ejb-jar_2_0.dtd'> + +<ejb-jar> + <enterprise-beans> + <session> + <ejb-name>Order</ejb-name> + <home>obs.order.OrderHome</home> + <remote>obs.order.Order</remote> + <ejb-class>obs.order.OrderBean</ejb-class> + <session-type>Stateless</session-type> + <transaction-type>Container</transaction-type> + </session> + </enterprise-beans> + <ejb-client-jar>order_client.jar</ejb-client-jar> +</ejb-jar> diff --git a/Online Book Store/order/examples.properties b/Online Book Store/order/examples.properties new file mode 100644 index 00000000..4deb0bd9 --- /dev/null +++ b/Online Book Store/order/examples.properties @@ -0,0 +1,24 @@ +#choose classic, modern, jikes, or jvc +JAVAC=modern +BEA_HOME=C:/weblogic +WL_HOME=C:/weblogic/weblogic700 +SAMPLES_HOME=C:/weblogic/weblogic700/samples +CLIENT_CLASSES=C:/weblogic/weblogic700/samples/server/stage/examples/clientclasses +SERVER_CLASSES=C:/weblogic/weblogic700/samples/server/stage/examples/serverclasses +EX_WEBAPP_CLASSES=C:/weblogic/weblogic700/samples/server/stage/examples/examplesWebApp/WEB-INF/classes +EX_WEBAPP=C:/weblogic/weblogic700/samples/server/stage/examples/examplesWebApp +APPLICATIONS=C:/weblogic/weblogic700/samples/server/config/examples/applications +CLASSPATH=${java.class.path} +XMLRegistry=C:/weblogic/weblogic700/samples/server/config/examples/xml/registries/examplesXMLRegistry +PORT=7001 +WINDOWS="Windows XP,Windows 2000,Windows NT,Windows 98,Windows 95" +UNIX="HP-UX,Solaris,SunOS,AIX,Linux" + +# Database properties +# These user defined properties are available to automate +# table setup for those examples that use an Oracle database. +DBSERVER= +DBPORT= +SID= +USER= +PASSWORD= diff --git a/Online Book Store/order/setclientenv.bat b/Online Book Store/order/setclientenv.bat new file mode 100644 index 00000000..f6c93888 --- /dev/null +++ b/Online Book Store/order/setclientenv.bat @@ -0,0 +1,4 @@ +set classpath=.;d:\jdk1.4\lib\tools.jar;d:\weblogic7\weblogic700\server\lib\weblogic.jar;d:\weblogic7\weblogic700\samples\server\stage\examples\clientclasses;d:\weblogic7\weblogic700\samples\server\stage\examples\clientclasses\hello_client.jar + +path=d:\weblogic7\weblogic700\server\bin;d:\jdk1.4\bin;c:\windows\system32 + diff --git a/Online Book Store/order/weblogic-ejb-jar.xml b/Online Book Store/order/weblogic-ejb-jar.xml new file mode 100644 index 00000000..6873327f --- /dev/null +++ b/Online Book Store/order/weblogic-ejb-jar.xml @@ -0,0 +1,13 @@ +<?xml version="1.0"?> + +<!DOCTYPE weblogic-ejb-jar PUBLIC +'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN' +'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'> + +<weblogic-ejb-jar> + <weblogic-enterprise-bean> + <ejb-name>Order</ejb-name> + <jndi-name>obs.order</jndi-name> + </weblogic-enterprise-bean> +</weblogic-ejb-jar> + diff --git a/Online Book Store/orderitems.jsp b/Online Book Store/orderitems.jsp new file mode 100644 index 00000000..756e3173 --- /dev/null +++ b/Online Book Store/orderitems.jsp @@ -0,0 +1,91 @@ +<jsp:useBean id="user" scope="session" class="obs.User"/> +<%@page import="java.sql.*"%> + +<html> +<style> +a.topic {font:700 11pt verdana;color:white} +td {font:10pt verdana} +th {font:700 10pt verdana;background-color:green;color:white} +</style> + +<body bgcolor="beige"> +<h1>Order Items </h1> + + + +<% + String ordid = request.getParameter("ordid"); + String status = request.getParameter("status"); + + String cmd = "select oi.isbn,title, oi.price,qty, oi.price * qty amount from orderitem oi, books b where b.isbn = oi.isbn and ordid = " + ordid; + + + Connection con = user.getConnection(); + Statement st = con.createStatement(); + + ResultSet rs = st.executeQuery(cmd); + +%> + +<p> + + +<table width="100%" cellpadding=2 border=1> +<tr> +<th> ISBN +<th> Title +<th> Price +<th> Quantity +<th> Amount +</tr> + +<% + while ( rs.next()) + { +%> + +<tr> +<td> <%=rs.getInt(1)%> +<td> <%= rs.getString(2)%> +<td> <%= rs.getInt(3)%> +<td> <%= rs.getString(4)%> +<td> <%= rs.getString(5)%> +</tr> + +<% + } + + rs.close(); + st.close(); + con.close(); + +%> + + +</table> + +<p> +<% + if ( status.equals("n")) + { +%> + +<a href="deleteorder.jsp?ordid=<%=ordid%>">Cancel This Order</a> + + +<% + + + } +%> + + + +<a href="javascript:history.back()">Back </a> + + + + + + + \ No newline at end of file diff --git a/Online Book Store/ordershistory.jsp b/Online Book Store/ordershistory.jsp new file mode 100644 index 00000000..a386a5c6 --- /dev/null +++ b/Online Book Store/ordershistory.jsp @@ -0,0 +1,107 @@ +<jsp:useBean id="user" scope="session" class="obs.User"/> +<%@page import="java.sql.*"%> + +<html> +<style> +a.topic {font:700 11pt verdana;color:white} +td {font:10pt verdana} +th {font:700 10pt verdana;background-color:green;color:white} +</style> + +<body bgcolor="beige"> +<h1>Orders History </h1> + +<div style="background-color:green}"> + +<table width="100%"> + +<tr align="center"> +<td> +<a class="topic" href="ordershistory.jsp?type=a">All Orders </a> +<td> +<a class="topic" href="ordershistory.jsp?type=n">New Orders </a> +<td> +<a class="topic" href="ordershistory.jsp?type=p">Processed Orders</a> +<td> +<a class="topic" href="ordershistory.jsp?type=d">Dispatched Orders</a> +<td> +<a class="topic" href="ordershistory.jsp?type=c">Completed Orders </a> +</tr> +</table> +</div> + + + + + +<% + String type = request.getParameter("type"); + String cmd = "select ordid, orddate, totamt,decode(status,'n','New','p','Processed','d','Dispatched','Completed') textstatus,status from orders where userid = " + user.getUserid(); + + if ( type != null) + { + + if ( type.equals("n")) + cmd += " and status = 'n'"; + else + if ( type.equals("p")) + cmd += " and status = 'p'"; + else + if ( type.equals("d")) + cmd += " and status = 'd'"; + else + if ( type.equals("c")) + cmd += " and status = 'c'"; + + } + + + Connection con = user.getConnection(); + Statement st = con.createStatement(); + + ResultSet rs = st.executeQuery(cmd); + +%> + +<p> + + +<table width="100%" cellpadding=2 border=1> +<tr> +<th> Order Id +<th> Order Date +<th> Total Amount +<th> Status +</tr> + +<% + while ( rs.next()) + { +%> + +<tr> +<td> <a href="orderitems.jsp?ordid=<%=rs.getInt(1)%>&status=<%=rs.getString(5)%>"> <%=rs.getInt(1)%> </a> +<td> <%= rs.getString(2)%> +<td> <%= rs.getInt(3)%> +<td> <%= rs.getString(4)%> +</tr> + +<% + } + + rs.close(); + st.close(); + con.close(); + +%> + + +</table> + + + + + + + + \ No newline at end of file diff --git a/Online Book Store/querybooks.jsp b/Online Book Store/querybooks.jsp new file mode 100644 index 00000000..e6630108 --- /dev/null +++ b/Online Book Store/querybooks.jsp @@ -0,0 +1,87 @@ +<html> + +<style> +h2{color:navy;font:700 20pt arial} +h4 {color:brwon;font:700 11pt verdana} +td {font:700 10pt verdana} +a {font:700 10pt verdana;color:darkgreen} + +</style> + +<body bgcolor="beige"> + +<h2>Query Books</h2> +<form action="querybooks.jsp" method="post" > +<table> +<tr> +<td> +Category +<td> +<select name="cat"> +<option value="all">All Categories +<option value="ora">Oracle +<option value=".net">.NET +<option value="java">Java +</select> +Title Contains +<input type=text name=title size=20> +</tr> + +<tr> +<td> +Author Name Contains +<td> +<input type=text size=20 name=author> +Price From +<input type=text name=fromprice size=10> +To +<td> +<input type=text name=toprice size=10> +</tr> +</table> +<p> +<input type=submit value="Query"> +<a href="gohome.jsp">Home Page </a> + +</form> + +<% + String cat = request.getParameter("cat"); + if ( cat == null) + return; + + String cond = "1=1"; + + if (!cat.equals("all") ) + cond = cond + " and cat = '" + cat + "'"; + + String title = request.getParameter("title"); + + if ( !title.equals("")) + cond = cond + " and title like '%" + title + "%'"; + + + String author = request.getParameter("author"); + + if ( !author.equals("")) + cond = cond + " and author like '%" + author + "%'"; + + + String fromprice = request.getParameter("fromprice"); + + if ( !fromprice.equals("")) + cond = cond + " and price >= " + fromprice; + + String toprice = request.getParameter("toprice"); + + if ( !toprice.equals("")) + cond = cond + " and price <= " + toprice; + + request.setAttribute("cond", cond); + +%> + +<jsp:include page="listbooks.jsp" flush="true"/> + +</body> +</html> \ No newline at end of file diff --git a/Online Book Store/register.html b/Online Book Store/register.html new file mode 100644 index 00000000..b70fec19 --- /dev/null +++ b/Online Book Store/register.html @@ -0,0 +1,68 @@ +<html> +<style> +h2{color:bottlegreen;font:700 20pt arial} +h4 {color:brwon;font:700 11pt verdana} +td {font:10pt verdana} +a {font:10pt verdana;color:navy} + +</style> + +<body bgcolor="beige"> + +<h2>New User Registration </h2> +<hr> +<form action="register.jsp" method="post"> +<table> +<tr> +<td> +User Name +<td> +<input type=text name=uname size=20>* +</tr> +<tr> +<td> +Password +<td> +<input type=password name=pwd size=20>* +</tr> +<tr> +<td> +Confirm Password +<td> +<input type=password name=pwd2 size=20>* +</tr> + +<tr> +<td> +Email Address +<td> +<input type=text name=email size=30>* +</tr> + +<tr> +<td>Mailing Address +<td> +<textarea name="address" rows=3 cols=30></textarea>* +</td> +</tr> + + +<tr> +<td> +Phone Number +<td> +<input type=text name=phone size=30> +</tr> + +</table> +<p> + +<input type=submit value="Register"> +<input type=reset value="Clear All"> +<p> +<a href="login.html">Go Back</a> +</form> + +</center> +</body> +</html> \ No newline at end of file diff --git a/Online Book Store/register.jsp b/Online Book Store/register.jsp new file mode 100644 index 00000000..2810a2c5 --- /dev/null +++ b/Online Book Store/register.jsp @@ -0,0 +1,29 @@ +<html> +<body bgcolor="wheat"> +<style> +h3 {font:700 12pt verdana;color:maroon} +a {font:12pt verdana;color:navy} +</style> + +<center> + +<jsp:useBean id="user" class="obs.User" scope="session" /> + +<jsp:setProperty name="user" property="*" /> + +<% + String result = user.registerUser(); + + if ( result == null) + response.sendRedirect("home.jsp"); + else + out.println("<h3>Sorry! Registration Failed With Error : <p> " + result + "</h3> <p> <a href=register.html>Try Again </a> "); + +%> + +</center> +</body> +</html> + + + diff --git a/Online Book Store/tables.txt b/Online Book Store/tables.txt new file mode 100644 index 00000000..6acda2ed --- /dev/null +++ b/Online Book Store/tables.txt @@ -0,0 +1,79 @@ +create user obs identified by obs; +grant connect, resource to obs; + +connect obs/obs + +create table users +( userid number(5) primary key, + uname varchar2(20) not null unique, + pwd varchar2(10), + email varchar2(30) unique, + address varchar2(100), + phone varchar2(20) +); + + + +create table books +( isbn number(10) primary key, + title varchar2(30), + author varchar2(50), + pub varchar2(10), + cat varchar2(5), + price number(5) +); + + +create table orders +( ordid number(5) primary key, + userid number(5) references users(userid), + orddate date, + totamt number(6), + status char(1) +); + +create table orderitem +( ordid number(5) references orders(ordid), + isbn number(10) references books(isbn), + price number(5), + qty number(3), + primary key(ordid,isbn) +); + + +insert into users +values(1,'scott','tiger','scott@hotmail.com','12-2-23,Dwarakanagar,VSP-16', +'3434343'); + + +insert into users +values(2,'mike','tyson','tyson@hotmail.com','12-5-23,MVP Colony,VSP-43', +'2234343'); + +insert into books + values('1001','Prof. JSP','Wrox Team', +'Wrox','java',500); + +insert into books + values('5007','Prof. ASP.NET', +'Wrox Team', +'Wrox','.net',675); + +insert into books + values('2045','VB.NET Black Book', 'Steven Holtzner','DreamTech' +,'.net',450); + + +commit; + + + +create sequence ordid start with 1001; + + + + + + + + diff --git a/Online Event Management System/2.html b/Online Event Management System/2.html new file mode 100644 index 00000000..8e9ab55f --- /dev/null +++ b/Online Event Management System/2.html @@ -0,0 +1,24 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +<style type="text/css"> +<!-- +body { + background-color: #99CC66; +} +--> +</style></head> + +<body> +<p><a href="main.html" target="main">Home</a></p> +<p><a href="schedule your meeting.html" target="main">Schedule Events</a></p> +<p><a href="view.jsp" target="main">View Events </a></p> + +<p><a href="ADMINISTRATIVE TASKS AND REPORTS.html" target="main">Administrator tasks</a></p> +<p><a href="List.jsp" target="main">List users</a></p> +<p><a href="Logout.jsp" target="_parent">Logout</a></p> +<p> </p> +</body> +</html> diff --git a/Online Event Management System/ADMINISTRATIVE TASKS AND REPORTS.html b/Online Event Management System/ADMINISTRATIVE TASKS AND REPORTS.html new file mode 100644 index 00000000..e25a02ff --- /dev/null +++ b/Online Event Management System/ADMINISTRATIVE TASKS AND REPORTS.html @@ -0,0 +1,78 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; + font-family: "Times New Roman", Times, serif; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style19 { + color: #660000; + font-size: 20px; +} +--> + </style> +</head> + +<body> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">ADMINISTRATIVE TASKS AND REPORTS </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <ul> + <li class="style19"><a href="cancel meetings.html">Cancel Events</a></li> + <li class="style19"><a href="DELETE ACCOUNT.html">Delete account</a></li> + + <li class="style19"><a href="change password.html">Change password </a></li> + </ul> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</body> +</html> diff --git a/Online Event Management System/Adminpage.html b/Online Event Management System/Adminpage.html new file mode 100644 index 00000000..ffdc7b39 --- /dev/null +++ b/Online Event Management System/Adminpage.html @@ -0,0 +1,14 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +</head> + +<frameset rows="*" cols="217,1021" framespacing="0" frameborder="no" border="0"> + <frame src="2.html"name="left" /> + <frame src="" name="main"/> +</frameset> +<noframes><body> +</body> +</noframes></html> diff --git a/Online Event Management System/BackHomePage.html b/Online Event Management System/BackHomePage.html new file mode 100644 index 00000000..5846b2a8 --- /dev/null +++ b/Online Event Management System/BackHomePage.html @@ -0,0 +1,13 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +</head> + +<frameset rows="352" cols="*" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"> + <frame src="main1231.html" NAME="HAEDING"/> +</frameset> +<noframes><body> +</body> +</noframes></html> diff --git a/Online Event Management System/ChangeAdminPwd.jsp b/Online Event Management System/ChangeAdminPwd.jsp new file mode 100644 index 00000000..6a5c7826 --- /dev/null +++ b/Online Event Management System/ChangeAdminPwd.jsp @@ -0,0 +1,63 @@ +<%@ page language = "java" import= "java.sql.*" %> + +<BODY BGCOLOR="#d3d2d1"> +<br><br> +<% + try{ + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); + + String old_pwd=(String)request.getParameter("old_pwd"); + String new_pwd=(String)request.getParameter("new_pwd"); + + String uid="Admin"; + String sql="select pwd from wbmslogin where userid=? and pwd=? "; + + PreparedStatement pst=con.prepareStatement(sql); + pst.setString(1,uid); + pst.setString(2,old_pwd); + + //System.out.println(sql); + + ResultSet rs=pst.executeQuery(); + if(rs.next()==false) + { +%> + <center> + <h1 align=center> Invalid password <br> Please enter Correct Password </h1> + <a href="ChangeAdminPwd.html"> <h2>Back to Change Password </h2></a> + </center> +<% + } + else + { + sql="update wbmslogin set pwd=? where userid=? "; + pst=con.prepareStatement(sql); + pst.setString(1,new_pwd); + pst.setString(2,uid); + int num=pst.executeUpdate(); + if(num>0) + { +%> + <h1 align=center> Password changed Successfully <br> Now you have to use new Password </h1> +<% + session.putValue("PWD",new_pwd); + } + else + { +%> + <center> + <h1> Password Not Changed </h1> <p> + <a href="change password.html"> <h2>Back to Change Password </h2></a> + </center> +<% + } + } + }catch(Exception e) + { + out.println(e); + } +%> +</BODY> + + diff --git a/Online Event Management System/ChangeFacultyPwd.jsp b/Online Event Management System/ChangeFacultyPwd.jsp new file mode 100644 index 00000000..491c7714 --- /dev/null +++ b/Online Event Management System/ChangeFacultyPwd.jsp @@ -0,0 +1,63 @@ +<%@ page language = "java" import= "java.sql.*" %> + +<BODY BGCOLOR="#d3d2d1"> +<br><br> +<% + try{ + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); + + String old_pwd=(String)request.getParameter("old_pwd"); + String new_pwd=(String)request.getParameter("new_pwd"); + + String uid=request.getParameter("userid"); + String sql="select pwd from wbmslogin where userid=? and pwd=? "; + + PreparedStatement pst=con.prepareStatement(sql); + pst.setString(1,uid); + pst.setString(2,old_pwd); + + //System.out.println(sql); + + ResultSet rs=pst.executeQuery(); + if(rs.next()==false) + { +%> + <center> + <h1 align=center> Invalid password <br> Please enter Correct Password </h1> + <a href="ChangeAdminPwd.html"> <h2>Back to Change Password </h2></a> + </center> +<% + } + else + { + sql="update wbmslogin set pwd=? where userid=? "; + pst=con.prepareStatement(sql); + pst.setString(1,new_pwd); + pst.setString(2,uid); + int num=pst.executeUpdate(); + if(num>0) + { +%> + <h1 align=center> Password changed Successfully <br> Now you have to use new Password </h1> +<% + session.putValue("PWD",new_pwd); + } + else + { +%> + <center> + <h1> Password Not Changed </h1> <p> + <a href="change password.html"> <h2>Back to Change Password </h2></a> + </center> +<% + } + } + }catch(Exception e) + { + out.println(e); + } +%> +</BODY> + + diff --git a/Online Event Management System/CreateUser.jsp b/Online Event Management System/CreateUser.jsp new file mode 100644 index 00000000..e60da6c2 --- /dev/null +++ b/Online Event Management System/CreateUser.jsp @@ -0,0 +1,52 @@ +<%@ page language="java" import="java.sql.*" %> + +<body bgcolor="#FFFFE0"> +<BR><BR><BR> +<% + String uid=request.getParameter("uid"); + String pass=request.getParameter("pass"); +String mail=request.getParameter("mail"); +String coll=request.getParameter("coll"); +String dep=request.getParameter("dep"); +String utype=request.getParameter("utype"); + + +try{ + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); + Statement st=con.createStatement(); + + String sql="select userid from WBMSlogin where userid='"+uid+"'"; + System.out.println(" Query : "+sql); + ResultSet rs=st.executeQuery(sql); + + if(rs.next()) + { + out.println("<center><H1> User ( "+uid+" ) already present <BR>"); + out.println(" Please Choose another Name </H1><BR>"); + out.println("<a href=reg.html>Create New User</a></center>"); + } + else + { + sql="insert into WBMSlogin values('"+uid+"','"+pass+"','"+mail+"','"+coll+"','"+dep+"','"+utype+"')"; + int n=st.executeUpdate(sql); + if(n>0) + { + out.println("<p><center><h1> User ( "+uid+" ) Created </h1></center>"); + out.println("<p><center><h1> <a href='BackHomePage.html'>Back To HOME Page</a></h1></center>"); + out.println("<p><center><h1> <a href='REGISTRATION FORM.html'>Back To Sign in Form</a> </h1></center>"); + } + else + { + out.println("<p><center><h1> User ( "+uid+" ) Can't be Created </h1></center>"); + } + } + }catch(Exception e) + { + out.println(e); + } + +%> + +</body> + diff --git a/Online Event Management System/DELETE ACCOUNT.html b/Online Event Management System/DELETE ACCOUNT.html new file mode 100644 index 00000000..5ccfd73f --- /dev/null +++ b/Online Event Management System/DELETE ACCOUNT.html @@ -0,0 +1,78 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +--> + </style> +</head> + +<body> +<form action="DeleteUser.jsp" method="get"> +<div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">DELETE ACCOUNT</h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p align="left" class="style14"><strong>1.Scheduler ID and password </strong></p> + <p align="left" class="style14"> </p> + <p align="left" class="style14">Scheduler ID + <input name="uid" type="text" size="19" maxlength="19" /> + </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Delete account" /> + </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> + </form> +</body> +</html> diff --git a/Online Event Management System/DeleteFac.jsp b/Online Event Management System/DeleteFac.jsp new file mode 100644 index 00000000..b92b1b2e --- /dev/null +++ b/Online Event Management System/DeleteFac.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" import="java.sql.*" %> + +<body bgcolor="#FFFFE0"> +<% + try{ + String uid=request.getParameter("uid"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); + // ----- Connection Established ------ + + PreparedStatement pst=con.prepareStatement("select userid from wbmslogin where userid=?"); + pst.setString(1,uid); + ResultSet rs=pst.executeQuery(); + if(rs.next()) + { + + pst=con.prepareStatement("delete from wbmslogin where userid=?"); + pst.setString(1,uid); + if((pst.executeUpdate()) > 0) + { + out.println("<br><br><br><br><center><h1> User "+uid+" User deleted. </h1></center> "); + } + else + { + out.println("<br><br><br><br><center><h1> User "+uid+" Can't be Deleted from Login. </h1></center> "); + } + } + else + { + out.println("<br><br><br><br><center><h1> User "+uid+" Does not Exist. </h1></center> "); + } + }catch(Exception e) + { + out.println(e); + } +%> + +<p> +<center> + <a href="DELETE ACCOUNT.html"> Back </a> +</center> + +</body> + + diff --git a/Online Event Management System/DeleteUser.jsp b/Online Event Management System/DeleteUser.jsp new file mode 100644 index 00000000..b92b1b2e --- /dev/null +++ b/Online Event Management System/DeleteUser.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" import="java.sql.*" %> + +<body bgcolor="#FFFFE0"> +<% + try{ + String uid=request.getParameter("uid"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); + // ----- Connection Established ------ + + PreparedStatement pst=con.prepareStatement("select userid from wbmslogin where userid=?"); + pst.setString(1,uid); + ResultSet rs=pst.executeQuery(); + if(rs.next()) + { + + pst=con.prepareStatement("delete from wbmslogin where userid=?"); + pst.setString(1,uid); + if((pst.executeUpdate()) > 0) + { + out.println("<br><br><br><br><center><h1> User "+uid+" User deleted. </h1></center> "); + } + else + { + out.println("<br><br><br><br><center><h1> User "+uid+" Can't be Deleted from Login. </h1></center> "); + } + } + else + { + out.println("<br><br><br><br><center><h1> User "+uid+" Does not Exist. </h1></center> "); + } + }catch(Exception e) + { + out.println(e); + } +%> + +<p> +<center> + <a href="DELETE ACCOUNT.html"> Back </a> +</center> + +</body> + + diff --git a/Online Event Management System/ENGAGEMENT DAIRY.html b/Online Event Management System/ENGAGEMENT DAIRY.html new file mode 100644 index 00000000..d9b5f6a3 --- /dev/null +++ b/Online Event Management System/ENGAGEMENT DAIRY.html @@ -0,0 +1,96 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style18 { + font-size: 24px; + color: #990000; + font-weight: bold; + font-family: "Times New Roman", Times, serif; +} +.style9 {font-size: 14px} +.style20 { + font-size: 22px; + color: #990000; + font-family: "Times New Roman", Times, serif; +} +.style21 {color: #CC0033} +--> + </style> +</head> + +<body> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">PARTICIPANTS ENGAGEMENT DAIRY + </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p class="learnmore"> <span class="style9"> </span></p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"></p> + <p align="left" class="style15"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</body> +</html> diff --git a/Online Event Management System/Facpasswordchange.html b/Online Event Management System/Facpasswordchange.html new file mode 100644 index 00000000..03d07c1c --- /dev/null +++ b/Online Event Management System/Facpasswordchange.html @@ -0,0 +1,85 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +--> + </style> +</head> + +<body> +<form action="ChangeFacultyPwd.jsp" method="get"> +<div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">CHANGE PASSWORD </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p align="left" class="style14"><strong>1.Scheduler ID and password </strong></p> + <p align="left" class="style14"> </p> + <p align="left" class="style14">User ID + <input type="text" name="userid" /> + </p> + + <p align="left" class="style14">Password + <input type="password" name="old_pwd" /> + </p> + <p align="left" class="style14"> Change password + <input type="password" name="new_pwd" /> + </p> + <p align="left" class="style14">Re-type password + <input type="password" name="confirm_pwd" /> +</p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Change password" /> + <input type="reset" value="Reset" /> + </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> + </form> +</body> +</html> diff --git a/Online Event Management System/HEADING.html b/Online Event Management System/HEADING.html new file mode 100644 index 00000000..58b1a07f --- /dev/null +++ b/Online Event Management System/HEADING.html @@ -0,0 +1,23 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +<style type="text/css"> +<!-- +.style1 { + color: #FFFF99; + font-size: 36px; + font-weight: bold; +} +body { + background-color: #336699; +} +--> +</style> +</head> + +<body> +<div align="center"><span class="style1">Event Management System</span></div> +</body> +</html> diff --git a/Online Event Management System/HMeeting.jsp b/Online Event Management System/HMeeting.jsp new file mode 100644 index 00000000..60db2d39 --- /dev/null +++ b/Online Event Management System/HMeeting.jsp @@ -0,0 +1,60 @@ +<html> +<%@page import="java.sql.*" %> +<% + String vsname=request.getParameter("sname"); + String vparent=request.getParameter("parent"); + String vdob=request.getParameter("dob"); + String vmob=request.getParameter("mob"); + String vpreadd=request.getParameter("preadd"); + String vperadd=request.getParameter("peradd"); + String vedu=request.getParameter("edu"); + String vdept=request.getParameter("dept"); + String vadmno=request.getParameter("admno"); + String vssc=request.getParameter("ssc"); + String vinter=request.getParameter("inter"); + String vdoj=request.getParameter("doj"); + String vhtno=request.getParameter("htno"); + String vpwd=request.getParameter("pwd"); + String vrpwd=request.getParameter("rpwd"); + + try{ + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:shyam","scott","tiger"); + String vsql="insert into stumaster1 values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + PreparedStatement ps=con.prepareStatement(vsql); + ps.setString(1,vsname); + ps.setString(2,vparent); + ps.setString(3,vdob); + ps.setString(4,vmob); + ps.setString(5,vpreadd); + ps.setString(6,vperadd); + ps.setString(7,vedu); + ps.setString(8,vdept); + + ps.setString(9,vadmno); + ps.setString(10,vssc); + ps.setString(11,vinter); + ps.setString(12,vdoj); + ps.setString(13,vhtno); + ps.setString(14,vpwd); + ps.setString(15,vrpwd); + + ps.executeUpdate(); + + out.println("<body bgcolor='lightyellow'><h3 align='center'>One Record Inserted Successfully!</h3>"); + + out.println("<br><br><center><table border=8 bordercolor=blue><tr><td><h3 align='cener'><a href='AdminHome.html'>Admin Home Page</h3></a></td></tr>"); + + out.println("<br><br><center><tr><td><h3 align='cener'><a href='studreg.html'> Student Registration page</h3></a></td></tr></table></body>"); + +}catch (Exception e) { + + out.println("SQLException: " + e.getMessage()); + out.println("<h1><a href='studreg.html'> Back To Student Registration </h1></a>>"); + } + +%> + +</body> +</html> + \ No newline at end of file diff --git a/Online Event Management System/HodMeetings.html b/Online Event Management System/HodMeetings.html new file mode 100644 index 00000000..c1c1b7d5 --- /dev/null +++ b/Online Event Management System/HodMeetings.html @@ -0,0 +1,240 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style16 {font-size: 14px; color: #660033;} +--> + </style> +</head> + +<body> +<form action="PMeeting.jsp" method="get"> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header"> SCHEDULE MEETING</h1> + <div id="footer"> + <div id="footeri"> + <div align="center" class="style11">HOD MEETING </div> + <div align="left" class="style12"> + <p align="left" class="style16">Meeting name <span class="style14"> + <input type="text" name="Mname" /> + </span></p> + <p align="left" class="style16">Meeting description + <textarea name="Mdescrip"></textarea> + </p> + <p align="left" class="style16">Meeting type + <select name="Mtype"> + <option>HOD meeting</option> + </select> + </p> + <p align="left" class="style16">Start time + <select name="Stimeh"> + <option>01</option> + <option>02</option> + <option>03</option> + <option>04</option> + <option>05</option> + <option>06</option> + <option>07</option> + <option>08</option> + <option>09</option> + <option>10</option> + <option>10</option> + <option>11</option> + <option>12</option> + </select> + <select name="Stimem"> + <option>01</option> + <option>02</option> + <option>03</option> + <option>04</option> + <option>05</option> + <option>06</option> + <option>07</option> + <option>08</option> + <option>09</option> + <option>10</option> + <option>11</option> + <option>12</option> + <option>13</option> + <option>14</option> + <option>15</option> + <option>16</option> + <option>17</option> + <option>18</option> + <option>19</option> + <option>20</option> + <option>21</option> + <option>22</option> + <option>23</option> + <option>24</option> + <option>25</option> + <option>26</option> + <option>27</option> + <option>28</option> + <option>29</option> + <option>30</option> + <option>31</option> + <option>32</option> + <option>33</option> + <option>34</option> + <option>35</option> + <option>36</option> + <option>37</option> + <option>38</option> + <option>39</option> + <option>40</option> + <option>41</option> + <option>42</option> + <option>43</option> + <option>44</option> + <option>45</option> + <option>46</option> + <option>47</option> + <option>48</option> + <option>49</option> + <option>50</option> + <option>51</option> + <option>52</option> + <option>53</option> + <option>54</option> + <option>55</option> + <option>56</option> + <option>57</option> + <option>58</option> + <option>59</option> + <option>60</option> + </select> + <select name="StimeAMPM"> + <option>AM</option> + <option>PM</option> + </select> + </p> + <p align="left" class="style16">Duration <span class="style14"> + <input name="DurationH" type="text" size="10" maxlength="10" /> + </span> + <select name="Durationm"> + <option>MINS</option> + <option>HRS</option> + </select> + </p> + <p align="left" class="style16">Start date <span class="style14"> + <select name="Sday"> + <option>January</option> + <option>February</option> + <option>March</option> + <option>April</option> + <option>May</option> + <option>June</option> + <option>July</option> + <option>August</option> + <option>September</option> + <option>October</option> + <option>November</option> + <option>December</option> + </select> + </span> + <select name="SMonth"> + <option>01</option> + <option>02</option> + <option>03</option> + <option>04</option> + <option>05</option> + <option>06</option> + <option>07</option> + <option>08</option> + <option>09</option> + <option>10</option> + <option>11</option> + <option>12</option> + <option>13</option> + <option>14</option> + <option>15</option> + <option>16</option> + <option>17</option> + <option>18</option> + <option>19</option> + <option>20</option> + <option>21</option> + <option>22</option> + <option>23</option> + <option>24</option> + <option>25</option> + <option>26</option> + <option>27</option> + <option>28</option> + <option>29</option> + <option>30</option> + <option>31</option> + </select> + <select name="Syear"> + <option>2009</option> + <option>2010</option> + <option>2011</option> + <option>2012</option> + <option>2013</option> + <option>2014</option> + <option>2015</option> + </select> + </p> + <p align="left" class="style16">Meeting options + <input name="Moptions" type="radio" value="radiobutton" /> + single + <input name="Moptions" type="radio" value="radiobutton" /> + weekly + <input name="Moptions" type="radio" value="radiobutton" /> + monthly </p> + <p align="left" class="style16">Number of participants <span class="style14"> + <input name="Nofpat" type="text" size="10" maxlength="10" /> + </span></p> + + </span></p> + <p align="left" class="style16">Set meeting password <span class="style14"> + <input type="password" name="pwd" /> + </span></p> + <p align="left" class="style14">College ID + <input name="Collegeid" type="text" size="10" maxlength="10" /> + </p> + <p align="left" class="style14">E-mail ID + <input type="text" name="Emailid" /> + </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Schedule meeting" /> + </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</form> +</body> +</html> diff --git a/Online Event Management System/List.jsp b/Online Event Management System/List.jsp new file mode 100644 index 00000000..389c89b9 --- /dev/null +++ b/Online Event Management System/List.jsp @@ -0,0 +1,53 @@ + +<%@page import="java.sql.*" %> + +<% + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); +String vsql ; + + try{ + Statement st=con.createStatement(); + vsql="select * from wbmslogin"; + ResultSet Rs=st.executeQuery(vsql); +%> +<html> +<head> +<title><List user </title> +</head> +<body bgcolor="#E2E2E2"> +<h2 align="center">List user</h2> +<table border="1" align=center> +<thead> +<tr bgcolor="#26618D"> +<th><font size="4" COLOR="#FFFF99">USER NAME</th> +<th><font size="4" COLOR="#FFFF99">E-MAIL ID</th> +<th><font size="4" COLOR="#FFFF99">COLLEGE ID</th> +<th><font size="4" COLOR="#FFFF99">DEPARTMENT</th> +<% +while(Rs.next()) +{%><tr bgcolor="#d3d2d1"> + <td><%out.println(Rs.getString(1));%></td> + <td><%out.println(Rs.getString(3));%></td> +<td><%out.println(Rs.getString(4));%></td> +<td><%out.println(Rs.getString(5));%></td> + </tr> +<% + } +%> + +</thead> +</body> +</html> + +<% +} +catch(Exception e){out.println(e.getMessage());} + +%> + + + + + + diff --git a/Online Event Management System/Logout.jsp b/Online Event Management System/Logout.jsp new file mode 100644 index 00000000..04819a68 --- /dev/null +++ b/Online Event Management System/Logout.jsp @@ -0,0 +1,20 @@ +<%@ page language="java" %> + +<body bgcolor="#d3d2d1"> +<% + session.putValue("UID",""); + session.putValue("PWD",""); + +%> + <center> <br><br><br> + <h1> You have Successfully Logged Out </h1> <p> + <h1> Visit Again </h1> + <a href="login.html"><h2> Go to Login </h2></a> + </center> +<% + System.out.println("-------- Logging Out ----------"); + System.out.println(" UID = "+session.getValue("UID")); + System.out.println(" PWD = "+session.getValue("PWD")); +%> +</body> + diff --git a/Online Event Management System/MAIN123.html b/Online Event Management System/MAIN123.html new file mode 100644 index 00000000..fa84d2ae --- /dev/null +++ b/Online Event Management System/MAIN123.html @@ -0,0 +1,14 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Event Management System</title> +</head> + +<frameset rows="70,352" cols="*" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"> + <frame src="HEADING.html" NAME="HEADING"/> + <frame src="main1231.html" NAME="HAEDING"/> +</frameset> +<noframes><body> +</body> +</noframes></html> diff --git a/Online Event Management System/MDelete.jsp b/Online Event Management System/MDelete.jsp new file mode 100644 index 00000000..f4d5b82d --- /dev/null +++ b/Online Event Management System/MDelete.jsp @@ -0,0 +1,25 @@ +<%@ page import="java.io.*,java.util.*" %> +<%@ page import="java.sql.*,javax.sql.*,javax.naming.*" %> +<%@ page session="true" %> +<% + + + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:shyam","scott","tiger"); + Statement stmt=con.createStatement(); + int count=0; + String MeetName=request.getParameter("cancel"); + + count=stmt.executeUpdate("delete MeetingTable where Mname='"+MeetName+"'"); + if(count>0){ + + + out.println("<body bgcolor='yellow'><h1 align='center'>Meeting Deleted Successfully Deleted Successfully!</h1>"); + + + }else{ + out.println("Meeting was not deleted"); + + } + %> \ No newline at end of file diff --git a/Online Event Management System/PAST MEETINGS.html b/Online Event Management System/PAST MEETINGS.html new file mode 100644 index 00000000..11de9fb0 --- /dev/null +++ b/Online Event Management System/PAST MEETINGS.html @@ -0,0 +1,75 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style9 {font-size: 14px} +.style22 {color: #660033; font-size: 16px; font-weight: bold; } +--> + </style> +</head> + +<body> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">PAST MEETINGS </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style22"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> <span class="style9"> </span></p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"></p> + <p class="learnmore"></p> + <p class="learnmore"></p> + <p class="learnmore"></p> + <p align="left" class="style15"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</body> +</html> diff --git a/Online Event Management System/PMeeting.jsp b/Online Event Management System/PMeeting.jsp new file mode 100644 index 00000000..513d67cb --- /dev/null +++ b/Online Event Management System/PMeeting.jsp @@ -0,0 +1,61 @@ +<html> +<%@page import="java.sql.*" %> +<% + +String Mname=request.getParameter("Mname"); +String Mdescrip=request.getParameter("Mdescrip"); +String Mtype=request.getParameter("Mtype"); +String Stimeh=request.getParameter("Stimeh"); +String Stimem=request.getParameter("Stimem"); +String StimeAMPM=request.getParameter("StimeAMPM"); +String DurationH=request.getParameter("DurationH"); +String Durationm=request.getParameter("Durationm"); +String Sday=request.getParameter("Sday"); +String SMonth=request.getParameter("SMonth"); +String Syear=request.getParameter("Syear"); +String Moptions=request.getParameter("Moptions"); +String Nofpat=request.getParameter("Nofpat"); +String pwd=request.getParameter("pwd"); +String Collegeid=request.getParameter("Collegeid"); +String Emailid=request.getParameter("Emailid"); + + + + try{ + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); + String vsql="insert into MeetingTable values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + PreparedStatement ps=con.prepareStatement(vsql); + ps.setString(1,Mname); + ps.setString(2,Mdescrip); + ps.setString(3,Mtype); + ps.setString(4,Stimeh); + ps.setString(5,Stimem); + ps.setString(6,StimeAMPM); + ps.setString(7,DurationH); + ps.setString(8,Durationm); + ps.setString(9,Sday); + ps.setString(10,SMonth); + ps.setString(11,Syear); + ps.setString(12,Moptions); + ps.setString(13,Nofpat); + ps.setString(14,pwd); + ps.setString(15,Collegeid); + ps.setString(16,Emailid); + + ps.executeUpdate(); + + out.println("<body bgcolor='lightyellow'><h3 align='center'><h1>Meeting Scheduled Successfully</h1>"); + + +}catch (Exception e) { + + out.println("SQLException: " + e.getMessage()); + + } + +%> + +</body> +</html> + \ No newline at end of file diff --git a/Online Event Management System/REGISTRATION FORM.html b/Online Event Management System/REGISTRATION FORM.html new file mode 100644 index 00000000..4381e97c --- /dev/null +++ b/Online Event Management System/REGISTRATION FORM.html @@ -0,0 +1,92 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +--> + </style> +</head> + +<body> +<form action="CreateUser.jsp" method="get"> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">REGISTARTION FORM </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p align="left" class="style14">My name + <input type="text" name="uid" /> + </p> + <p align="left" class="style14">Password + <input type="password" name="pass" /> + </p> + <p align="left" class="style14">E-mail ID + <input type="text" name="mail" /> + </p> + <p align="left" class="style14">College ID + <input type="text" name="coll" /> </p> + <p align="left" class="style14">Deparment + <input type="text" name="dep" /> + </p> + + + <p align="left" class="style14">User Type + <input type="text" name="utype" /> + </p> + + + + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" value="Create account" > + <input type="RESET" value="Reset" > + </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> + </form> +</body> +</html> diff --git a/Online Event Management System/ReLogin.html b/Online Event Management System/ReLogin.html new file mode 100644 index 00000000..8676666d --- /dev/null +++ b/Online Event Management System/ReLogin.html @@ -0,0 +1,101 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style16 {font-size: 16px} +.style17 {font-size: 36px} +--> + </style> + + +<script language="JavaScript"> +function valid() +{ +if(document.N1.uids.value=="") +{ +window.alert("Enter name "); +return false +} +else if(document.N1.pwds.value=="") +{ +window.alert("Enter password "); +return false +} + +else +{ + return true +} +} +</script> +</head> + +<body><form NAME="N1"onsubmit="return valid()" method="post" action='login.jsp'> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header"> RELOGIN Invalid User ID </h1> + <div id="footer"> + <div id="footeri"> + <div align="center" class="style11"> + <p> </p> + <p class="style17">LOG IN </p> + </div> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p align="left" class="style15"> </p> + <p align="center" class="style14"><span class="style16">My name</span> + <input name="uids" type="text" /> + </p> + <p align="center" class="style14"><span class="style16">Password</span> + <input name="pwds" type="password" /> + </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Log in" /> + <input type="reset" name="name" value="RESET" /> + </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</form></body> +</html> diff --git a/Online Event Management System/ReLogin2.html b/Online Event Management System/ReLogin2.html new file mode 100644 index 00000000..d8f18543 --- /dev/null +++ b/Online Event Management System/ReLogin2.html @@ -0,0 +1,64 @@ +<html> +<head> +<title> A L</title> +<script language="javascript"> + +function first(){ + document.f1.uid.focus(); +} + +function valid() +{ + if(document.f1.uid.value=="") + { + alert("Please enter login id"); + document.f1.uid.focus(); + return false; + } + if(document.f1.pwd.value==""){ + alert("Please enter your password"); + document.f1.pwd.focus(); + return false; + } +} +</script> +</head> +<body bgcolor=#11112 onLoad=first()> +<table border=0 width=100% bgcolor=#7777> +<tr><td align=center><font size=+4 color=white> A L SURGICALS </td><tr> +<tr><td align=center><font size=+1 color=white>D.No 18-77, 1st Floor Street No:3 Kamalanagar, Chaitanyapuri </td><tr> +<tr><td align=center><font size=+1 color=white> Beside Lane of Indian bank,Dislsuknagar,Hyderbad-60 </td><tr> +</table> + +<br><br> +<form name="f1" onsubmit="return valid()" action="UserLogin.jsp"> +<table border=0 align=center bgcolor=white width=270 height=170> +<caption> <font size=+2 color=white> Invalid User Re- Login</font></caption> +<tr bgcolor=black> +<td colspan=2 align=center><font size=+3 color=white>User Login</td> +</tr> +<tr> +<td><h3>Userid <input type=text name="uid"></h2></td> +</tr> + +<tr> +<td><h3>Password <input type=password name="pwd"></h2></td> +</tr> + +<tr bgcolor=black> +<td align=center><input type=submit value=Login><input type=Reset value=Reset></td> +</tr> +</table> +</form> + + + + +<table border=0 width=100% bgcolor=#7777> +<tr><td align=center><font size=+1 color=white>Contact No:924102023 Ph:040-234567 Email:badrinathsamudrala@gmail.com </td><tr> +</table> + + + +</body> +</html> diff --git a/Online Event Management System/Run.bat b/Online Event Management System/Run.bat new file mode 100644 index 00000000..de88c6ef --- /dev/null +++ b/Online Event Management System/Run.bat @@ -0,0 +1 @@ +jar -cvf WBMS.war . \ No newline at end of file diff --git a/Online Event Management System/SCHEDULED CONFERENCES.html b/Online Event Management System/SCHEDULED CONFERENCES.html new file mode 100644 index 00000000..748e0cb6 --- /dev/null +++ b/Online Event Management System/SCHEDULED CONFERENCES.html @@ -0,0 +1,68 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style9 {font-size: 14px} +.style22 {font-size: 16px} +--> + </style> +</head> + +<body> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header"> VIEW SCHEDULED CONFERENCES </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15 style22">Date Meeting type Start time Duration Scheduler ID</p> + <p align="left" class="style15 style22"> </p> + <p align="left" class="style15 style22"> </p> + <p align="left" class="style15 style22"> </p> + <p align="left" class="style15 style22"> </p> + <p align="left" class="style15 style22"> </p> + <p align="left" class="style15 style22"> </p> + <p align="left" class="style15 style22"> </p> + <p align="left" class="style15 style22"> </p> + <p align="left" class="style15 style22"> </p> + <p align="left" class="style15 style22"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> <span class="style9"> </span></p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</body> +</html> diff --git a/Online Event Management System/Tables.txt b/Online Event Management System/Tables.txt new file mode 100644 index 00000000..eb3ae304 --- /dev/null +++ b/Online Event Management System/Tables.txt @@ -0,0 +1,29 @@ +Admin Table + +create table WBMSlogin( userid varchar2(20) primary key, +pwd varchar2(20), +mailid varchar2(20), +collid varchar2(20), +dept varchar2(20), +usertype varchar2(20)); + + +MeetingTable + +create table MeetingTable( +Mname varchar2(25), +Mdescrip varchar2(100), +Mtype varchar2(25), +Stimeh varchar2(10), +Stimem varchar2(10), +StimeAMPM varchar2(10), +DurationH varchar2(20), +Durationm varchar2(20), +Sday varchar2(20), +SMonth varchar2(20), +Syear varchar2(20), +Moptions varchar2(20), +Nofpat varchar2(20), +pwd varchar2(20), +Collegeid varchar2(20), +Emailid varchar2(20)); diff --git a/Online Event Management System/USER TASKS.html b/Online Event Management System/USER TASKS.html new file mode 100644 index 00000000..cf2d00a3 --- /dev/null +++ b/Online Event Management System/USER TASKS.html @@ -0,0 +1,76 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; + font-family: "Times New Roman", Times, serif; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style19 { + color: #660000; + font-size: 20px; +} +--> + </style> +</head> + +<body> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">USER TASKS </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <ul><li class="style19"><a href="DELETE ACCOUNT.html">Delete account</a></li> + <li class="style19"><a href="UserEdit.html">Edit profile</a></li> + <li class="style19"><a href="Facpasswordchange.html">Change password </a></li> + </ul> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</body> +</html> diff --git a/Online Event Management System/UserEdit.html b/Online Event Management System/UserEdit.html new file mode 100644 index 00000000..cdaa213a --- /dev/null +++ b/Online Event Management System/UserEdit.html @@ -0,0 +1,55 @@ +<HTML> +<HEAD> +<title> Faculty Edit Page</title> + +<script language="javascript"> +function first(){ + document.f1.facultyno.focus(); +} +function check(){ + if(document.f1.facultyno.value.length==0){ + alert("please enter faculty no"); + document.f1.htno.focus(); + return false; + } +} +</script> +</HEAD> + +<BODY onload="javascript:first()"> + + +<table height="10%" width="100%" border=1 bordercolor="yellow" bgcolor=#7777> +<tr><td align="center"><font size=+3 color=white>User Edit </td> + +</tr> + +</table> + + +<form name="f1" action="UserEdit.jsp"> +<br> +<br> +<Center> +<table height="30%" width="30%" border=1 bgcolor=lightyellow bordercolor=red cellpadding=10% cellspacing=10%> + +<tr><td> +<table> +<tr><td><h1>Enter User ID <input type=text name="userid"></td></tr> +<tr> <td> </td><tr> +<tr><td align=center bgcolor=yellow><input type=submit value="submit"> + +<input type=Reset value="Reset"> +</td> +</tr> + +</table> +</td></tr> +</table +</form> + + + + +</BODY> +</HTML> diff --git a/Online Event Management System/UserEdit.jsp b/Online Event Management System/UserEdit.jsp new file mode 100644 index 00000000..62669b00 --- /dev/null +++ b/Online Event Management System/UserEdit.jsp @@ -0,0 +1,63 @@ +<%@ page import="java.io.*,java.util.*" %> +<%@ page import="java.sql.*,javax.sql.*,javax.naming.*" %> +<%@ page session="true" %> +<% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads", "scott", "tiger"); + Statement stmt=con.createStatement(); + String userid=request.getParameter("userid"); + ResultSet rs=stmt.executeQuery("select * from wbmslogin where Userid='"+userid+"'"); + String Uid=""; + String pwd=""; + String mailid=""; + String collid=""; + String dep=""; + String usertype=""; + if(rs.next()){ + Uid=rs.getString(1); + pwd=rs.getString(2); + mailid=rs.getString(3); + collid=rs.getString(4); + dep=rs.getString(5); + usertype=rs.getString(6); + session.setAttribute("userid",Uid); + +%> + + +<html> +<BODY topmargin=0> + + +<table height="15%" width="100%" border=1 bordercolor="yellow" bgcolor=#7777> +<tr><td align="center"><font size=+3 color=white>User Profile Edit </td> + +</tr> + +</table> + + +<FORM name="f1" action="Userupdate.jsp"> +<table height="75%" width="40%" border=1 align="center" bordercolor=red><tr><td> +<table height="100%" width="100%" bgcolor="lightyellow" align="center" valign="top" border="0"> + <tr><td colspan=2 align="Left" bgcolor="#006699"><font color="white"><b>Faculty DETAILS:</b></font></td></tr> + <tr><td align="center">User Name</td><td><input type="text" name="Uid" value="<%=Uid%>"></td></tr> + <tr><td align="center">Password</td><td><input type="password" name="pwd" value="<%=pwd%>"></td></tr> + <tr><td align="center">Mail Id</td><td><input type="text" name="mailid" value="<%=mailid%>"></td></tr> + <tr><td align="center">College Id</td><td><input type="text" name="collid" value="<%=collid%>"></td></tr> + <tr><td align="center">Department</td><td><input type="text" name="dep" value="<%=dep%>"readonly></td></tr> + <tr><td align="center">User Type</td><td><input type="usertype" name="usertype" value="<%=usertype%>"></td></tr> + <tr><td><input type=submit value=UpDate></td></tr> + + + +</table> +</td></tr><table> +</FORM> + +</BODY> +</html> +<%} else{ + out.println("<h1 align='center'> <font color='red'>Please Enter Valid User ID</font></h1>"); + + } + %> \ No newline at end of file diff --git a/Online Event Management System/Userupdate.jsp b/Online Event Management System/Userupdate.jsp new file mode 100644 index 00000000..39a9e4aa --- /dev/null +++ b/Online Event Management System/Userupdate.jsp @@ -0,0 +1,24 @@ +<%@ page isThreadSafe="true" %> +<!--%@ page errorPage="errorpage.jsp" %--> +<%@ page import="java.io.*,java.util.*" %> +<%@ page import="java.sql.*,javax.sql.*,javax.naming.*" %> +<%@ page session="true" %> +<% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads", "scott", "tiger"); + Statement stmt=con.createStatement(); + String Uid=request.getParameter("Uid"); + String pwd=request.getParameter("pwd"); + String mailid=request.getParameter("mailid"); + String collid=request.getParameter("collid"); + String dep=request.getParameter("dep"); + String usertype=request.getParameter("usertype"); + + String str="update wbmslogin set userid='"+Uid+"',pwd='"+pwd+"',mailid='"+mailid+"',collid='"+collid+"',dept='"+dep+"',usertype='"+usertype+"' where userid='"+Uid+"'"; + stmt.executeUpdate(str); + con.commit(); + + out.println("<body bgcolor='yellow'><h1 align='center'>One Record Updated Successfully!</h1>"); + + + +%> \ No newline at end of file diff --git a/Online Event Management System/Validations.txt b/Online Event Management System/Validations.txt new file mode 100644 index 00000000..102f9b83 --- /dev/null +++ b/Online Event Management System/Validations.txt @@ -0,0 +1,31 @@ +function valid1(){ + if(document.f1.fname.value==""){ + alert("Please enter your name"); + document.f1.fname.focus(); + return false; + } + if(document.f1.fdes.value==""){ + alert("Please enter your Designation"); + document.f1.fdes.focus(); + return false; + } + if(document.f1.fquali.value==""){ + alert("Please enter your Qualification"); + document.f1.fquali.focus(); + return false; + } + if(document.f1.years.value=="select") { + alert("Please select your Experinece in Years"); + document.f1.years.focus(); + return false; + } + if(document.f1.months.value=="select") { + alert("Please select your Experinece in Months"); + document.f1.months.focus(); + return false; + } + if(document.f1.edu.value=="select"){ + alert("Please select Education field"); + document.f1.edu.focus(); + return false; + } diff --git a/Online Event Management System/WBMS.war b/Online Event Management System/WBMS.war new file mode 100644 index 00000000..ad52abcf Binary files /dev/null and b/Online Event Management System/WBMS.war differ diff --git a/Online Event Management System/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar b/Online Event Management System/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar new file mode 100644 index 00000000..0539039f Binary files /dev/null and b/Online Event Management System/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar differ diff --git a/Online Event Management System/WEB-INF/login.html b/Online Event Management System/WEB-INF/login.html new file mode 100644 index 00000000..ef57f4da --- /dev/null +++ b/Online Event Management System/WEB-INF/login.html @@ -0,0 +1,101 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style16 {font-size: 16px} +.style17 {font-size: 36px} +--> + </style> + + +<script language="JavaScript"> +function valid() +{ +if(document.N1.uids.value=="") +{ +window.alert("Enter name "); +return false +} +else if(document.N1.pwds.value=="") +{ +window.alert("Enter password "); +return false +} + +else +{ + return true +} +} +</script> +</head> + +<body><form NAME="N1"onsubmit="return valid()" method="post" action='login.jsp'> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">LOG IN </h1> + <div id="footer"> + <div id="footeri"> + <div align="center" class="style11"> + <p> </p> + <p class="style17">LOG IN </p> + </div> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p align="left" class="style15"> </p> + <p align="center" class="style14"><span class="style16">My name</span> + <input name="uids" type="text" /> + </p> + <p align="center" class="style14"><span class="style16">Password</span> + <input name="pwds" type="password" /> + </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Log in" /> + <input type="reset" name="name" value="RESET" /> + </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</form></body> +</html> diff --git a/Online Event Management System/WEB-INF/web.xml b/Online Event Management System/WEB-INF/web.xml new file mode 100644 index 00000000..e7253749 --- /dev/null +++ b/Online Event Management System/WEB-INF/web.xml @@ -0,0 +1,2 @@ +<web-app> +</web-app> diff --git a/Online Event Management System/association meeting.html b/Online Event Management System/association meeting.html new file mode 100644 index 00000000..fd7ffc66 --- /dev/null +++ b/Online Event Management System/association meeting.html @@ -0,0 +1,242 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style16 {font-size: 14px; color: #660033;} +.style17 { + font-size: 24px; + color: #660033; + font-weight: bold; + font-family: "Times New Roman", Times, serif; +} +--> + </style> +</head> + +<body> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header"> SCHEDULE A MEETING </h1> + <div id="footer"> + <div id="footeri"> + <div align="center" class="style11"></div> + <div align="left" class="style12"> + <p align="center" class="style17"> ASSOCIATION MEETING </p> + <p align="left" class="style16">Meeting name <span class="style14"> + <input type="text" name="textfield4" /> + </span></p> + <p align="left" class="style16">Meeting description + <textarea name="textarea2"></textarea> + </p> + <p align="left" class="style16">Meeting type </p> + <p align="left" class="style16">Start time + <select name="select4"> + <option>01</option> + <option>02</option> + <option>03</option> + <option>04</option> + <option>05</option> + <option>06</option> + <option>07</option> + <option>08</option> + <option>09</option> + <option>10</option> + <option>10</option> + <option>11</option> + <option>12</option> + </select> + <select name="select5"> + <option>01</option> + <option>02</option> + <option>03</option> + <option>04</option> + <option>05</option> + <option>06</option> + <option>07</option> + <option>08</option> + <option>09</option> + <option>10</option> + <option>11</option> + <option>12</option> + <option>13</option> + <option>14</option> + <option>15</option> + <option>16</option> + <option>17</option> + <option>18</option> + <option>19</option> + <option>20</option> + <option>21</option> + <option>22</option> + <option>23</option> + <option>24</option> + <option>25</option> + <option>26</option> + <option>27</option> + <option>28</option> + <option>29</option> + <option>30</option> + <option>31</option> + <option>32</option> + <option>33</option> + <option>34</option> + <option>35</option> + <option>36</option> + <option>37</option> + <option>38</option> + <option>39</option> + <option>40</option> + <option>41</option> + <option>42</option> + <option>43</option> + <option>44</option> + <option>45</option> + <option>46</option> + <option>47</option> + <option>48</option> + <option>49</option> + <option>50</option> + <option>51</option> + <option>52</option> + <option>53</option> + <option>54</option> + <option>55</option> + <option>56</option> + <option>57</option> + <option>58</option> + <option>59</option> + <option>60</option> + </select> + <select name="select6"> + <option>AM</option> + <option>PM</option> + </select> + </p> + <p align="left" class="style16">Duration <span class="style14"> + <input name="textfield232" type="text" size="10" maxlength="10" /> + </span> + <select name="select"> + <option>MINS</option> + <option>HRS</option> + </select> + </p> + <p align="left" class="style16">Start date <span class="style14"> + <select name="select7"> + <option>January</option> + <option>February</option> + <option>March</option> + <option>April</option> + <option>May</option> + <option>June</option> + <option>July</option> + <option>August</option> + <option>September</option> + <option>October</option> + <option>November</option> + <option>December</option> + </select> + </span> + <select name="select8"> + <option>01</option> + <option>02</option> + <option>03</option> + <option>04</option> + <option>05</option> + <option>06</option> + <option>07</option> + <option>08</option> + <option>09</option> + <option>10</option> + <option>11</option> + <option>12</option> + <option>13</option> + <option>14</option> + <option>15</option> + <option>16</option> + <option>17</option> + <option>18</option> + <option>19</option> + <option>20</option> + <option>21</option> + <option>22</option> + <option>23</option> + <option>24</option> + <option>25</option> + <option>26</option> + <option>27</option> + <option>28</option> + <option>29</option> + <option>30</option> + <option>31</option> + </select> + <select name="select9"> + <option>2009</option> + <option>2010</option> + <option>2011</option> + <option>2012</option> + <option>2013</option> + <option>2014</option> + <option>2015</option> + </select> + </p> + <p align="left" class="style16">Meeting options + <input name="radiobutton" type="radio" value="radiobutton" /> + single + <input name="radiobutton" type="radio" value="radiobutton" /> + weekly + <input name="radiobutton" type="radio" value="radiobutton" /> + monthly </p> + <p align="left" class="style16">Number of participants <span class="style14"> + <input name="textfield233" type="text" size="10" maxlength="10" /> + </span></p> + <p align="left" class="style16">Schedule meeting with id <span class="style14"> + <input name="textfield2332" type="text" size="10" maxlength="10" /> + </span></p> + <p align="left" class="style16">Set meeting password <span class="style14"> + <input type="password" name="textfield2423" /> + </span></p> + <p align="left" class="style14">College ID + <input name="textfield23" type="text" size="10" maxlength="10" /> + </p> + <p align="left" class="style14">E-mail ID + <input type="text" name="textfield3" /> + </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Schedule meeting" /> + </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</body> +</html> diff --git a/Online Event Management System/cancel meetings.html b/Online Event Management System/cancel meetings.html new file mode 100644 index 00000000..fa10939b --- /dev/null +++ b/Online Event Management System/cancel meetings.html @@ -0,0 +1,70 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style21 {color: #B7B7B8} +.style23 {color: #663333; font-size: 16px; font-weight: bold; } +--> + </style> +</head> + +<body> +<form action="MDelete.jsp" method="get"> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">CANCEL Events </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"><span class="style21">1.nter meeting to be canccelled</span> + <p align="left" class="style23">1. Enter Event name to be cancelled </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14">Event name + <input type="text" name="cancel" /> + </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" value="Cancel Event" /> + </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> + </form> +</body> +</html> diff --git a/Online Event Management System/cancel.jsp b/Online Event Management System/cancel.jsp new file mode 100644 index 00000000..ed6c992d --- /dev/null +++ b/Online Event Management System/cancel.jsp @@ -0,0 +1,45 @@ +<%@ page language="java" import="java.sql.*" %> + +<body bgcolor="#d3d2d1"> +<% + try{ + String uid=request.getParameter("cancel"); + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); + // ----- Connection Established ------ + + PreparedStatement pst=con.prepareStatement("select Mname from MeetingTable where Mname=?"); + pst.setString(1,uid); + ResultSet rs=pst.executeQuery(); + if(rs.next()) + { + + pst=con.prepareStatement("delete from MeetingTable where Mname=?"); + pst.setString(1,uid); + if((pst.executeUpdate()) > 0) + { + out.println("<br><br><br><br><center><h1> "+uid+" meeting is cancelled. </h1></center> "); + } + else + { + out.println("<br><br><br><br><center><h1> "+uid+" CANNOT CANCEL THE MEETING. </h1></center> "); + } + } + else + { + out.println("<br><br><br><br><center><h1> "+uid+" meeting is not scheduled. </h1></center> "); + } + }catch(Exception e) + { + out.println(e); + } +%> + +<p> +<center> + <a href="cancel meetings.html"> BACK </a> +</center> + +</body> + + diff --git a/Online Event Management System/change password.html b/Online Event Management System/change password.html new file mode 100644 index 00000000..8ef9cd9b --- /dev/null +++ b/Online Event Management System/change password.html @@ -0,0 +1,81 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +--> + </style> +</head> + +<body> +<form action="ChangeAdminPwd.jsp" method="get"> +<div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">CHANGE PASSWORD </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p align="left" class="style14"><strong>1.Scheduler ID and password </strong></p> + <p align="left" class="style14"> </p> + <p align="left" class="style14">Password + <input type="password" name="old_pwd" /> + </p> + <p align="left" class="style14"> Change password + <input type="password" name="new_pwd" /> + </p> + <p align="left" class="style14">Re-type password + <input type="password" name="confirm_pwd" /> +</p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Change password" /> + <input type="reset" value="Reset" /> + </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> + </form> +</body> +</html> diff --git a/Online Event Management System/clzimg.jpg b/Online Event Management System/clzimg.jpg new file mode 100644 index 00000000..3f1b464d Binary files /dev/null and b/Online Event Management System/clzimg.jpg differ diff --git a/Online Event Management System/deparmentmeeting.jsp b/Online Event Management System/deparmentmeeting.jsp new file mode 100644 index 00000000..491950f5 --- /dev/null +++ b/Online Event Management System/deparmentmeeting.jsp @@ -0,0 +1,56 @@ +<%@ page import="java.sql.*"%> + + +<%! +Connection con; +Statement st; +String sql,s,t,u,v,w,x,y,z,m,n,o; + + +%> +<body bgcolor="#d3d2d1"> +<% +try +{ + +Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + +s=request.getParameter("a"); +t=request.getParameter("b"); +u=request.getParameter("c"); +v=request.getParameter("d"); +w=request.getParameter("e"); +x=request.getParameter("f"); +y=request.getParameter("g"); +z=request.getParameter("h"); +m=request.getParameter("i"); +n=request.getParameter("j"); +o=request.getParameter("k"); + + + +} +catch(ClassNotFoundException e) +{ +out.println(e.getMessage()); +} + +try +{ + + +con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); + +st=con.createStatement(); + +sql="insert into organizationmeeting values('"+s+"','"+t+"','"+u+"','"+v+"','"+w+"','"+x+"','"+y+"','"+z+"','"+m+"','"+n+"','"+o+"')"; + +st.executeQuery(sql); +} +catch(Exception e) +{ +out.println("ASSOCIATION Meeting Scheduled Sucsessfully"); + +} +%> +</body> diff --git a/Online Event Management System/department meeting.html b/Online Event Management System/department meeting.html new file mode 100644 index 00000000..b9294058 --- /dev/null +++ b/Online Event Management System/department meeting.html @@ -0,0 +1,102 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style16 {font-size: 14px; color: #660033;} +.style17 { + font-size: 24px; + color: #660033; + font-weight: bold; + font-family: "Times New Roman", Times, serif; +} +--> + </style> +</head> + +<body> +<form action="organisationmeeting.jsp" method="get"> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header"> SCHEDULE A EVENT </h1> + <div id="footer"> + <div id="footeri"> + <div align="center" class="style11"></div> + <div align="left" class="style12"> + <p align="center" class="style17">EXTRA CURCULAR ACTIVITIES </p> + <p align="left" class="style16"> Event name <span class="style14"> + <input type="text" name="a" /> + </span></p> + <p align="left" class="style16">Event description + <textarea name="b"></textarea> + </p> + <p align="left" class="style16">Event type <span class="style14"> + <input type="text" name="c" /> + </span></p> + <p align="left" class="style16">Start time <span class="style14"> + <input type="text" name="d" /> + </span></p> + <p align="left" class="style16">Duration <span class="style14"> + <input name="e" type="text" size="10" maxlength="10" /> + </span></p> + <p align="left" class="style16">Start date <span class="style14"> + <input name="f" type="text" size="10" maxlength="10" /> + </span></p> + <p align="left" class="style16">Event options + <input name="g" type="radio" value="radiobutton" /> + single + <input name="g" type="radio" value="radiobutton" /> + weekly + <input name="g" type="radio" value="radiobutton" /> + monthly </p> + <p align="left" class="style16">Number of participants <span class="style14"> + <input name="h" type="text" size="10" maxlength="10" /> + </span></p> + <p align="left" class="style16">Schedule Event with id <span class="style14"> + <input name="i" type="text" size="10" maxlength="10" /> + </span></p> + <p align="left" class="style14">College ID + <input name="j" type="text" size="10" maxlength="10" /> + </p> + <p align="left" class="style14">E-mail ID + <input type="text" name="k" /> + </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Schedule Event" /> + </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> + </form> +</body> +</html> diff --git a/Online Event Management System/edit profile.html b/Online Event Management System/edit profile.html new file mode 100644 index 00000000..f181bee2 --- /dev/null +++ b/Online Event Management System/edit profile.html @@ -0,0 +1,199 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +--> + </style> +</head> + +<body> +<div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">EDIT USER'S PROFILE </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p align="left" class="style15">1.User profile </a> </p> + <p align="left" class="style15"> </p> + <p align="left" class="style14">My name + <input type="text" name="textfield" /> + </p> + <p align="left" class="style14">Gender + + <select name="select"> + <option>Male</option> + <option>Female</option> + </select> + </p> + <p align="left" class="style14">Birthday + + <select name="select4"> + <option>01</option> + <option>02</option> + <option>03</option> + <option>04</option> + <option>05</option> + <option>06</option> + <option>07</option> + <option>08</option> + <option>09</option> + <option>10</option> + <option>11</option> + <option>12</option> + <option>13</option> + <option>14</option> + <option>15</option> + <option>16</option> + <option>17</option> + <option>18</option> + <option>19</option> + <option>20</option> + <option>21</option> + <option>22</option> + <option>23</option> + <option>24</option> + <option>25</option> + <option>26</option> + <option>27</option> + <option>28</option> + <option>29</option> + <option>30</option> + <option>31</option> + </select> + <select name="select2"> + <option>January</option> + <option>February</option> + <option>March</option> + <option>April</option> + <option>May</option> + <option>June</option> + <option>July</option> + <option>August</option> + <option>September</option> + <option>October</option> + <option>November</option> + <option>December</option> + </select> + <select name="select5"> + <option>1970</option> + <option>1971</option> + <option>1972</option> + <option>1973</option> + <option>1974</option> + <option>1975</option> + <option>1976</option> + <option>1977</option> + <option>1978</option> + <option>1979</option> + <option>1980</option> + <option>1981</option> + <option>1982</option> + <option>1983</option> + <option>1984</option> + <option>1985</option> + <option>1986</option> + <option>1987</option> + <option>1988</option> + <option>1989</option> + <option>1990</option> + <option>1991</option> + <option>1992</option> + <option>1993</option> + <option>1994</option> + <option>1995</option> + <option>1996</option> + <option>1997</option> + <option>1998</option> + <option>1999</option> + <option>2000</option> + <option>2001</option> + <option>2002</option> + <option>2003</option> + <option>2004</option> + <option>2005</option> + <option>2006</option> + <option>2007</option> + <option>2008</option> + <option>2009</option> + </select> + </p> + <p align="left" class="style14">College ID + <input name="textfield23" type="text" size="10" maxlength="10" /> + </p> + <p align="left" class="style14">E-mail ID + <input type="text" name="textfield3" /> + </p> + <p align="left" class="style14">Address + <textarea name="textarea2"></textarea> + </p> + <p align="left" class="style14">Phone no + <input type="text" name="textfield32" /> + </p> + <p align="left" class="style14">Deparment + <select name="select3"> + <option>IT</option> + <option>CSC</option> + <option>ECE</option> + <option>EEE</option> + <option>MECh</option> + <option>CIVIL</option> + <option>BIO TECH</option> + </select> + </p> + <p align="left" class="style14">Education + <select name="select6"> + <option>Bachelor degree</option> + <option>Masters degree</option> + <option>Phd</option> + <option>Doctrate holder</option> + </select> + </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Edit profile" /> + <input type="reset" name="Submit3" value="Reset" /> + </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</body> +</html> diff --git a/Online Event Management System/hme pge.html b/Online Event Management System/hme pge.html new file mode 100644 index 00000000..41c4b680 --- /dev/null +++ b/Online Event Management System/hme pge.html @@ -0,0 +1,17 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +</head> + +<frameset rows="73,422" cols="*" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"> + <frame src="HEADING.html" name="HEADING" id="HEADING"/> + <frameset rows="*" cols="215,1023" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"> + <frame src="2.html" name="2" id="2"/> + <frame src="main.html" name="main" id="main"/> + </frameset> +</frameset> +<noframes><body> +</body> +</noframes></html> diff --git a/Online Event Management System/hme1.html b/Online Event Management System/hme1.html new file mode 100644 index 00000000..7bbd2529 --- /dev/null +++ b/Online Event Management System/hme1.html @@ -0,0 +1,23 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +<style type="text/css"> +<!-- +body { + background-color: #336699; +} +.style2 { + font-size: 36px; + font-weight: bold; + color: #FFFF99; +} +--> +</style> +</head> + +<body> +<p align="center" class="style2"> </p> +</body> +</html> diff --git a/Online Event Management System/left frame.html b/Online Event Management System/left frame.html new file mode 100644 index 00000000..51ce012c --- /dev/null +++ b/Online Event Management System/left frame.html @@ -0,0 +1,23 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +<style type="text/css"> +<!-- +body { + background-color: #99CC66; +} +--> +</style></head> + +<body> +<p><a href="main.html" target="main">Home</a></p> +<p><a href="view.jsp" target="main">View scheduled Events </a></p> +<p><a href="view.jsp" target="main">Registration for scheduled Events </a></p> + +<p><a href="USER TASKS.html" target="main">User tasks</a></p> +<p><a href="Logout.jsp" target="_parent">Logout</a></p> +<p> </p> +</body> +</html> diff --git a/Online Event Management System/list users.html b/Online Event Management System/list users.html new file mode 100644 index 00000000..19779873 --- /dev/null +++ b/Online Event Management System/list users.html @@ -0,0 +1,83 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style9 {font-size: 14px} +.style22 { + color: #990000; + font-family: "Times New Roman", Times, serif; + font-size: 24px; + font-weight: bold; +} +--> + </style> +</head> + +<body> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">LIST USERS </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p class="learnmore"> <span class="style9"> </span></p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"></p> + <p align="left" class="style15"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</body> +</html> diff --git a/Online Event Management System/login.html b/Online Event Management System/login.html new file mode 100644 index 00000000..ef57f4da --- /dev/null +++ b/Online Event Management System/login.html @@ -0,0 +1,101 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style16 {font-size: 16px} +.style17 {font-size: 36px} +--> + </style> + + +<script language="JavaScript"> +function valid() +{ +if(document.N1.uids.value=="") +{ +window.alert("Enter name "); +return false +} +else if(document.N1.pwds.value=="") +{ +window.alert("Enter password "); +return false +} + +else +{ + return true +} +} +</script> +</head> + +<body><form NAME="N1"onsubmit="return valid()" method="post" action='login.jsp'> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">LOG IN </h1> + <div id="footer"> + <div id="footeri"> + <div align="center" class="style11"> + <p> </p> + <p class="style17">LOG IN </p> + </div> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p align="left" class="style15"> </p> + <p align="center" class="style14"><span class="style16">My name</span> + <input name="uids" type="text" /> + </p> + <p align="center" class="style14"><span class="style16">Password</span> + <input name="pwds" type="password" /> + </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Log in" /> + <input type="reset" name="name" value="RESET" /> + </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</form></body> +</html> diff --git a/Online Event Management System/login.jsp b/Online Event Management System/login.jsp new file mode 100644 index 00000000..351b9e53 --- /dev/null +++ b/Online Event Management System/login.jsp @@ -0,0 +1,54 @@ +<%@ page import="java.sql.*"%> +<%!Connection con; + Statement st; + ResultSet rs; + String sql; + + +%> +<% +String uid=request.getParameter("uids"); +String pwd=request.getParameter("pwds"); +String type ; + try + { + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + } +catch(ClassNotFoundException e) + { + out.println(e.getMessage()); + } + + try + { + con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); + st=con.createStatement(); + sql="select * from WBMSlogin"; + rs=st.executeQuery(sql); +while(rs.next()) + { + + if((uid.equals(rs.getString(1)))&&(pwd.equals( rs.getString(2)))) + { + type=rs.getString(6); + if(type.equals("admin")) + { + response.sendRedirect("Adminpage.html"); + } + else if(type.equals("faculty")) + { + response.sendRedirect("userhme1.html"); + } +} +} + + response.sendRedirect("ReLogin.html"); + + } + + +catch(Exception e) + { + out.println(e.getMessage()); + } +%> \ No newline at end of file diff --git a/Online Event Management System/loginunmodified.jsp b/Online Event Management System/loginunmodified.jsp new file mode 100644 index 00000000..a5f26eef --- /dev/null +++ b/Online Event Management System/loginunmodified.jsp @@ -0,0 +1,44 @@ +<%@page import="java.sql.*" %> +<% String uid = request.getParameter("uids"); + String pwd = request.getParameter("pwds"); + String utype = request.getParameter("utype"); + + + PreparedStatement pst; + ResultSet Rs; + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); + + try +{ + + pst = con.prepareStatement("select * from WBMSlogin where USERid=? and pwd=?"); + pst.setString(1,uid); + pst.setString(2,pwd); + Rs = pst.executeQuery(); + +while(Rs.next()) +{ session.putValue("UID",uid); + session.putValue("PWD",pwd); + if(uid.equalsIgnoreCase("admin")) + { + response.sendRedirect("Adminpage.html"); + } + else + { + response.sendRedirect("userhme1.html"); + } + +} +out.println("<br><br><br><br><center><h1> Invalid User : "+uid+" ,"+pwd+"</h1></center>"); + out.println("<p> <center> <a href=login.html> GO TO LOGIN </a> </center>"); +} +catch(Exception e){out.println(e.getMessage());} + +%> + + + + + + diff --git a/Online Event Management System/main.html b/Online Event Management System/main.html new file mode 100644 index 00000000..c75694b0 --- /dev/null +++ b/Online Event Management System/main.html @@ -0,0 +1,38 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +<style type="text/css"> +<!-- +body { + background-color: #E2E2E2; +} +.style3 { + font-family: "Times New Roman", Times, serif; + font-size: 16px; + color: #000000; + font-weight: bold; +} +.style4 {font-family: "Times New Roman", Times, serif; font-size: 18px; color: #000000; } +.style6 {color: #E0A403; font-style: italic; font-family: "Times New Roman", Times, serif; font-size: 24px; font-weight: bold; } +--> +</style></head> + +<body> +<p class="style6">Welcome to Event Management</p> +<p class="style4">This software is aimed at scheduling group Event . This is a web-based tool. The user can call for a meeting and send the detailed co-ordinates of the meeting(location, time, date etc...) to all invites. This is usefull for a small office or a department or for that matter any group who is intrested to organise it effectively.</p> +<p class="style3"> </p> +<p class="style6">Functionalities of Event Management</p> +<p class="style4">Facility to schedule a meeting</p> +<p class="style4">Facility to see participants engagement's dairy</p> +<p class="style4">Facility to invite participants over mail</p> +<p class="style4">Facility to cancel the Events</p> +<p class="style4">Participants option for denying the invitation</p> +<p class="style4">User registration</p> +<p class="style4">Administrator privilage to edit user's profile</p> +<p class="style4"> </p> +<p class="style4"> </p> +</body> + +</html> diff --git a/Online Event Management System/main1231.html b/Online Event Management System/main1231.html new file mode 100644 index 00000000..68023b62 --- /dev/null +++ b/Online Event Management System/main1231.html @@ -0,0 +1,31 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +<style type="text/css"> +<!-- +body { + background-color: #E2E2E2; +} +.style4 {font-family: "Times New Roman", Times, serif; font-size: 14px; color: #000000; } +.style6 {color: #E0A403; font-style: italic; font-family: "Times New Roman", Times, serif; font-size: 24px; font-weight: bold; } +.style10 {font-family: "Times New Roman", Times, serif; font-size: 14px; font-weight: bold; color: #E0A403;} +.style12 {color: #E0A403} +--> +</style></head> + +<body> +<p class="style10"><span class="style12">Schedule your meeting: </span><a href="login.html">Sign In</a> <span class="style12">New User:</span><a href="REGISTRATION FORM.html">Sign Up </a></p> +<p class="style6">Welcome to Event Management System</p> +<p class="style4">This software is aimed at scheduling group activities. This is a web-based tool. The user can call for Event activites and send the detailed co-ordinates of the meeting(location, time, date etc...) to all invites. This is usefull for a small office or a department or for that matter any group who is intrested to organise it effectively.</p> +<p class="style6">Functionalities of Event Management System</p> +<p class="style4">Studnets can registration</p> + +<p class="style4">Participants option for denying the invitation</p> +<p class="style4">User registration</p> +<p class="style4">Administrator privilage to edit user's profile</p> +<p class="style4"> </p> +</body> + +</html> diff --git a/Online Event Management System/organization meeting.html b/Online Event Management System/organization meeting.html new file mode 100644 index 00000000..5d69605e --- /dev/null +++ b/Online Event Management System/organization meeting.html @@ -0,0 +1,98 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; + font-weight: bold; + font-family: "Times New Roman", Times, serif; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style16 {font-size: 14px; color: #660033;} +--> + </style> +</head> + +<body> +<form action="organisationmeeting.jsp" method="get"> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header"> SCHEDULE MEETING</h1> + <div id="footer"> + <div id="footeri"> + <div align="center" class="style11">ORGANIZATION MEETING </div> + <div align="left" class="style12"> + <p align="left" class="style16">Meeting name <span class="style14"> + <input type="text" name="a" /> + </span></p> + <p align="left" class="style16">Meeting description + <textarea name="b"></textarea> + </p> + <p align="left" class="style16">Meeting type <span class="style14"> + <input type="text" name="c" /> + </span></p> + <p align="left" class="style16">Start time <span class="style14"> + <input type="text" name="d" /> + </span></p> + <p align="left" class="style16">Duration <span class="style14"> + <input type="text" name="e" /> + </span></p> + <p align="left" class="style16">Start date <span class="style14"> + <input type="text" name="f" /> + </span></p> + <p align="left" class="style16">Meeting options + <input name="g" type="radio" value="single" /> + single + <input name="g" type="radio" value="weekly" /> + weekly + <input name="g" type="radio" value="monthly" /> + monthly </p> + <p align="left" class="style16">Number of participants <span class="style14"> + <input name="h" type="text" size="10" maxlength="10" /> + </span></p> + <p align="left" class="style16">Schedule meeting with id <span class="style14"> + <input name="i" type="text" size="10" maxlength="10" /> + </span></p> + <p align="left" class="style14">College ID + <input name="j" type="text" size="10" maxlength="10" /> + </p> + <p align="left" class="style14">E-mail ID + <input type="text" name="k" /> + </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Schedule meeting" /> + <input type="Reset" name="Submit22" value="Reset" /> + </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> + </form> +</body> +</html> diff --git a/Online Event Management System/principals meetings.html b/Online Event Management System/principals meetings.html new file mode 100644 index 00000000..e39587d6 --- /dev/null +++ b/Online Event Management System/principals meetings.html @@ -0,0 +1,240 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style16 {font-size: 14px; color: #660033;} +--> + </style> +</head> + +<body> +<form action="PMeeting.jsp" method="get"> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header"> SCHEDULE MEETING</h1> + <div id="footer"> + <div id="footeri"> + <div align="center" class="style11">PRINCIPALS MEETING </div> + <div align="left" class="style12"> + <p align="left" class="style16">Meeting name <span class="style14"> + <input type="text" name="Mname" /> + </span></p> + <p align="left" class="style16">Meeting description + <textarea name="Mdescrip"></textarea> + </p> + <p align="left" class="style16">Meeting type + <select name="Mtype"> + <option>Principals meeting</option> + </select> + </p> + <p align="left" class="style16">Start time + <select name="Stimeh"> + <option>01</option> + <option>02</option> + <option>03</option> + <option>04</option> + <option>05</option> + <option>06</option> + <option>07</option> + <option>08</option> + <option>09</option> + <option>10</option> + <option>10</option> + <option>11</option> + <option>12</option> + </select> + <select name="Stimem"> + <option>01</option> + <option>02</option> + <option>03</option> + <option>04</option> + <option>05</option> + <option>06</option> + <option>07</option> + <option>08</option> + <option>09</option> + <option>10</option> + <option>11</option> + <option>12</option> + <option>13</option> + <option>14</option> + <option>15</option> + <option>16</option> + <option>17</option> + <option>18</option> + <option>19</option> + <option>20</option> + <option>21</option> + <option>22</option> + <option>23</option> + <option>24</option> + <option>25</option> + <option>26</option> + <option>27</option> + <option>28</option> + <option>29</option> + <option>30</option> + <option>31</option> + <option>32</option> + <option>33</option> + <option>34</option> + <option>35</option> + <option>36</option> + <option>37</option> + <option>38</option> + <option>39</option> + <option>40</option> + <option>41</option> + <option>42</option> + <option>43</option> + <option>44</option> + <option>45</option> + <option>46</option> + <option>47</option> + <option>48</option> + <option>49</option> + <option>50</option> + <option>51</option> + <option>52</option> + <option>53</option> + <option>54</option> + <option>55</option> + <option>56</option> + <option>57</option> + <option>58</option> + <option>59</option> + <option>60</option> + </select> + <select name="StimeAMPM"> + <option>AM</option> + <option>PM</option> + </select> + </p> + <p align="left" class="style16">Duration <span class="style14"> + <input name="DurationH" type="text" size="10" maxlength="10" /> + </span> + <select name="Durationm"> + <option>MINS</option> + <option>HRS</option> + </select> + </p> + <p align="left" class="style16">Start date <span class="style14"> + <select name="Sday"> + <option>January</option> + <option>February</option> + <option>March</option> + <option>April</option> + <option>May</option> + <option>June</option> + <option>July</option> + <option>August</option> + <option>September</option> + <option>October</option> + <option>November</option> + <option>December</option> + </select> + </span> + <select name="SMonth"> + <option>01</option> + <option>02</option> + <option>03</option> + <option>04</option> + <option>05</option> + <option>06</option> + <option>07</option> + <option>08</option> + <option>09</option> + <option>10</option> + <option>11</option> + <option>12</option> + <option>13</option> + <option>14</option> + <option>15</option> + <option>16</option> + <option>17</option> + <option>18</option> + <option>19</option> + <option>20</option> + <option>21</option> + <option>22</option> + <option>23</option> + <option>24</option> + <option>25</option> + <option>26</option> + <option>27</option> + <option>28</option> + <option>29</option> + <option>30</option> + <option>31</option> + </select> + <select name="Syear"> + <option>2009</option> + <option>2010</option> + <option>2011</option> + <option>2012</option> + <option>2013</option> + <option>2014</option> + <option>2015</option> + </select> + </p> + <p align="left" class="style16">Meeting options + <input name="Moptions" type="radio" value="radiobutton" /> + single + <input name="Moptions" type="radio" value="radiobutton" /> + weekly + <input name="Moptions" type="radio" value="radiobutton" /> + monthly </p> + <p align="left" class="style16">Number of participants <span class="style14"> + <input name="Nofpat" type="text" size="10" maxlength="10" /> + </span></p> + + </span></p> + <p align="left" class="style16">Set meeting password <span class="style14"> + <input type="password" name="pwd" /> + </span></p> + <p align="left" class="style14">College ID + <input name="Collegeid" type="text" size="10" maxlength="10" /> + </p> + <p align="left" class="style14">E-mail ID + <input type="text" name="Emailid" /> + </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" name="Submit2" value="Schedule meeting" /> + </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</form> +</body> +</html> diff --git a/Online Event Management System/reg.html b/Online Event Management System/reg.html new file mode 100644 index 00000000..98e1aebe --- /dev/null +++ b/Online Event Management System/reg.html @@ -0,0 +1,84 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style11 { + font-size: 24px; + color: #663333; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +--> + </style> +</head> + +<body> +<form action="CreateUser.jsp" method="get"> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">REGISTARTION FORM </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style15"> </p> + <p align="left" class="style14">My name + <input type="text" name="uid" /> + </p> + <p align="left" class="style14">Password + <input type="password" name="pass" /> + </p> + <p align="left" class="style14">E-mail ID + <input type="text" name="mail" /> + </p> + <p align="left" class="style14">College ID + <input type="text" name="coll" /> </p> + <p align="left" class="style14">Deparment + <input type="text" name="dep" /> + </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="center" class="style14"> + <input type="submit" value="Create account" > + <input type="RESET" value="Reset" > + </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> + </form> +</body> +</html> diff --git a/Online Event Management System/schedule your meeting.html b/Online Event Management System/schedule your meeting.html new file mode 100644 index 00000000..973c0213 --- /dev/null +++ b/Online Event Management System/schedule your meeting.html @@ -0,0 +1,85 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <title>Free Website Templates</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="style.css" rel="stylesheet" type="text/css" /> + <style type="text/css"> +<!-- +.style1 { + font-family: "Times New Roman", Times, serif; + color: #FFFF99; +} +.style12 { + color: #FF00FF; + font-size: 18px; +} +.style14 { + color: #663333; + font-size: 14px; +} +.style15 { + color: #660033; + font-size: 14px; + font-weight: bold; +} +body { + margin-left: 1cm; + margin-top: 0.5cm; +} +.style9 {font-size: 14px} +.style22 {color: #990000} +.style23 {font-family: "Times New Roman", Times, serif; font-size: 22px;} +a:visited { + color: #BE0404; + text-decoration: none; +} +.style25 {color: #990000; font-size: 14px; font-weight: bold; } +.style26 {font-family: "Times New Roman", Times, serif; font-size: 22px; color: #990000; } +a:link { + text-decoration: none; +} +a:hover { + text-decoration: none; + color: #BE0404; +} +a:active { + text-decoration: none; + color: #BE0404; +} +--> + </style> +</head> + +<body> + <div id="wrapper"> + <div id="wrapperi"> + <div id="wrapperj"> + <h1 align="center" class="style1" id="header">SCHEDULE YOUR MEETING </h1> + <div id="footer"> + <div id="footeri"> + <div align="left" class="style12"> + <p align="left" class="style25"> </p> + <ul class="style22"> + <li class="style26"><a href="principals meetings.html">Principals meeting</a></li> + <li class="style23"><span class="style22"><a href="HodMeetings.html">HOd's meeting </a></span></li> + </ul> + <p class="learnmore"> <span class="style9"> </span></p> + <p class="learnmore"> </p> + <p class="learnmore"> </p> + <p class="learnmore"></p> + <p align="left" class="style15"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="center" class="style14"> </p> + <p align="left" class="style14"> </p> + </div> + </div> + </div> + </div> + </div> + </div> +</body> +</html> diff --git a/Online Event Management System/style.css b/Online Event Management System/style.css new file mode 100644 index 00000000..d4190b48 --- /dev/null +++ b/Online Event Management System/style.css @@ -0,0 +1,292 @@ +body { + font-family: tahoma, helvetica, arial, sans-serif; + font-size: 11px; + text-align: center; + background: #d3d2d1; +} + +h3, p { + font-size: 11px; + margin: 1em 0.5em 0.5em 0.5em; +} + +p { + margin-top: 0.5em; +} + +img { + border: 0; +} + +a { + color: #be0404; + text-decoration: none; +} + +#subright ul a { + text-decoration: underline; +} + +#wrapper { + margin: auto; + text-align: left; + width: 750px; + background: white; +} + +#wrapperi { + padding: 0px 2px; + background: url(images/dot.gif) 319px 0px repeat-y; +} + +#wrapperj { + background: url(images/dot.gif) 526px 0px repeat-y; +} + +#header, #search, #nav, #nav li, h2, #special, #special h3, #footnav, +#strategies li, #strategies ul { + margin: 0; + padding: 0; +} + +#header { + background: #26618d; + border-bottom: 1px solid #fff; + border-top: 2px solid #fff; + margin-bottom: 1px; +} + +.clear { + clear: both; + font-size: 1px; + height: 5px; + margin: 0 0 -4px 0; +} + +#left { + float: left; + width: 310px; +} + +#right { + float: right; + width: 421px; +} + +#search { + background: #eda135 url(images/search_icon.gif) 21px 14px no-repeat; + border-bottom: 2px solid #004b83; + padding: 8px 0px 8px 40px; + margin-bottom: 4px; +} + +#search .text { + width: 180px; +} + +#search .submit { + background: #db8100; + color: #e5e4e2; + border: 1px solid #e5e4e2; +} + +#nav { + float: left; + width: 123px; + margin: 0; + padding: 0; +} + +#nav li { + background: #91aa37 url(images/menu_green_arrow.gif) left center repeat-y; + padding: 3px 0px 4px 36px; + margin-bottom: 2px; + margin-left: 0; + list-style: none; +} + +* html #nav li { /* IE 5.x hack */ + padding-left: 20px; + padd\ing-left: 36px; +} + +#nav a { + color: #efeeed; + text-decoration: none; + font-weight: bold; + font-family: tahoma, helvetica, arial, sans-serif; + font-size: 11px; +} + +#policies { + float: right; + width: 181px; + border: 1px solid #bdbab6; + margin: 0; +} + +#policies h2 { + background: #6584a9; +} + +#policies ul { + padding-left: 25px; + padding-bottom: 1px; + margin: 12px 0 1px 0; +} + +#policies li { + list-style-image: url(images/bullet_dimond.gif); + padding-bottom: 8px; + padding-left: 0; + margin-left: 0; +} + +#news { + background: #f5f4f3; + padding-bottom: 0.5em; + border-top: 4px solid #fff; + color: #666; +} + +#news h2 { + background: #e0a403; +} + +#explore { + margin-top: -1px; + background: #fff url(images/right_bg.jpg) bottom right repeat-x; + border-bottom: 6px solid #fff; +} + +#explorei { + background: url(images/right_woman.jpg) bottom right no-repeat; + padding-bottom: 11px; +} + +#explore ul { + margin-top: 16px; + margin-bottom: 8px; + margin-left: 0; + padding-left: 25px; +} + +#explore a { + color: #000; + text-decoration: underline; +} + +#explore li { + list-style: none; + background: url(images/bullet_arrow.gif) left center no-repeat; + padding: 4px 0 4px 25px; + margin-left: 0; +} + +#explore .orange { + color: #f09d27; +} + +#explore .learnmore { + margin: 5px 0 20px 18px; + +} + +#special { + margin-left: 9px; + margin-top: 10px; + width: 187px; + background: url(images/offer_box_bg.gif) repeat-y; +} + +#special, #special a { + color: #f5f5f5; + text-decoration: none; +} + +#special p { + padding: 0 13px; +} + +#special div { + background: url(images/offer_box_bot.gif) bottom no-repeat; + height: 6px; + font-size: 1px; +} + +#subright { + margin-top: 0px; +} + +#strategies { + float: left; + width: 195px; +} + +#strategies h2 { + background: #6aa100; +} + +#strategies li { + list-style: none; + margin: 0.8em 0.5em; +} + +#solutions { + float: right; + width: 213px; +} + +#solutions h2 { + background: #024c83; +} + +#footer { + text-align: right; + background: #b7b7b8; + color: #666; + border-top: 2px solid #fff; +} + +* html #footer { + height: 1.5em; +} + +#footeri { + padding: 2px 3px 4px 13px; + border-bottom: 2px solid #fff; +} + +#footer .copyright { + float: left; +} + +#footer a { + color: #666; +} + + +.readmore { + text-align: right; + font-weight: bold; +} + +.green { + color: #6aa100; +} +.blue { + color: #4880ab; +} +.orange { + color: #e0a403; +} + +p.photo { + text-align: center; +} + +#callbox { + float: left; + clear: left; + margin: 0; +} \ No newline at end of file diff --git a/Online Event Management System/user hme.html b/Online Event Management System/user hme.html new file mode 100644 index 00000000..41c4b680 --- /dev/null +++ b/Online Event Management System/user hme.html @@ -0,0 +1,17 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +</head> + +<frameset rows="73,422" cols="*" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"> + <frame src="HEADING.html" name="HEADING" id="HEADING"/> + <frameset rows="*" cols="215,1023" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"> + <frame src="2.html" name="2" id="2"/> + <frame src="main.html" name="main" id="main"/> + </frameset> +</frameset> +<noframes><body> +</body> +</noframes></html> diff --git a/Online Event Management System/user.html b/Online Event Management System/user.html new file mode 100644 index 00000000..41c4b680 --- /dev/null +++ b/Online Event Management System/user.html @@ -0,0 +1,17 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +</head> + +<frameset rows="73,422" cols="*" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"> + <frame src="HEADING.html" name="HEADING" id="HEADING"/> + <frameset rows="*" cols="215,1023" framespacing="0" frameborder="no" border="0" bordercolor="#FFFFFF"> + <frame src="2.html" name="2" id="2"/> + <frame src="main.html" name="main" id="main"/> + </frameset> +</frameset> +<noframes><body> +</body> +</noframes></html> diff --git a/Online Event Management System/userframe.html b/Online Event Management System/userframe.html new file mode 100644 index 00000000..5d478a5b --- /dev/null +++ b/Online Event Management System/userframe.html @@ -0,0 +1,23 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +<style type="text/css"> +<!-- +body { + background-color: #99CC66; +} +--> +</style></head> + +<body> +<p><a href="main.html" target="main">Home</a></p> +<p><a href="#" target="main">Messeges</a></p> +<p><a href="SCHEDULED CONFERENCES.html" target="main">View scheduled meetings </a></p> +<p><a href="PAST MEETINGS.html" target="main">Past meetings</a></p> +<p><a href="#" target="main">User tasks</a></p> +<p><a href="#" target="main">Logout</a></p> +<p> </p> +</body> +</html> diff --git a/Online Event Management System/userhme1.html b/Online Event Management System/userhme1.html new file mode 100644 index 00000000..67e65ba3 --- /dev/null +++ b/Online Event Management System/userhme1.html @@ -0,0 +1,14 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +</head> + +<frameset rows="*" cols="217,1021" framespacing="0" frameborder="no" border="0"> + <frame src="left frame.html"name="left" /> + <frame src="main.html" name="main"/> +</frameset> +<noframes><body> +</body> +</noframes></html> diff --git a/Online Event Management System/userleft.html b/Online Event Management System/userleft.html new file mode 100644 index 00000000..f61f59bf --- /dev/null +++ b/Online Event Management System/userleft.html @@ -0,0 +1,26 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<title>Untitled Document</title> +<style type="text/css"> +<!-- +body { + background-color: #99CC66; +} +.style1 {font-family: "Times New Roman", Times, serif} +--> +</style></head> + +<body> +<p><a href="REGISTRATION FORM.html" target="main"></a><span class="style1"><a href="main.html" target="main">Home</a><a href="main.html"></a></span></p> +<p><a href="REGISTRATION FORM.html" target="main"></a><span class="style1"><a href="SCHEDULED CONFERENCES.html" target="main">View scheduled meetings </a></span></p> +<p><span class="style1"><a href="PAST MEETINGS.html" target="main">Past meetings</a></span></p> +<p><span class="style1"><a href="ENGAGEMENT DAIRY.html" target="main">Participants engagement dairy</a></span></p> +<p><span class="style1"><a href="list users.html" target="main">List users</a></span></p> +<p><a href="USER TASKS.html" target="main">User tasks</a><a href="../../../../../Keil/frames/ADMINISTRATIVE TASKS AND REPORTS.html" target="main"></a></p> +<p><a href="#">logout</a></p> +<p><a href="../../../../../Keil/frames/ADMINISTRATIVE TASKS AND REPORTS.html"></a></p> +<p> </p> +</body> +</html> diff --git a/Online Event Management System/view.jsp b/Online Event Management System/view.jsp new file mode 100644 index 00000000..6f786450 --- /dev/null +++ b/Online Event Management System/view.jsp @@ -0,0 +1,68 @@ + +<%@page import="java.sql.*" %> + +<% + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("Jdbc:Odbc:orads","scott","tiger"); +String vsql ; + + try{ + Statement st=con.createStatement(); + vsql="select * from MeetingTable"; + ResultSet Rs=st.executeQuery(vsql); +%> +<html> +<head> +<title><SCHEDULED CONFERENCES</title> +</head> +<body bgcolor="#E2E2E2"> +<h2 align="center">SCHEDULED MEETINGS</h2> +<table border="1" align=center> +<thead> +<tr bgcolor="#26618D"> +<FONT FACE="Times New Roman" COLOR="#FFFF99"> +<th><font size="3" COLOR="#FFFF99">MEETING NAME</th> +<th><font size="3" COLOR="#FFFF99">DESCRIPTION</th> +<th><font size="3" COLOR="#FFFF99">MEETING TYPE</th> +<th><font size="3" COLOR="#FFFF99">TIME</th> +<th><font size="3" COLOR="#FFFF99">DURATION</th> +<th><font size="3" COLOR="#FFFF99">DATE</th> +<th><font size="3" COLOR="#FFFF99">OPTIONS</th> +<th><font size="3" COLOR="#FFFF99">PARTICIPANTS</th> +<th><font size="3" COLOR="#FFFF99">MEETING ID</th> +<th><font size="3" COLOR="#FFFF99">COLLEGE ID</th> +<th><font size="3" COLOR="#FFFF99">E-MAIL ID</th></FONT> +<% +while(Rs.next()) +{%><tr bgcolor="#d3d2d1"> + <td><%out.println(Rs.getString(1));%></td> + <td><%out.println(Rs.getString(2));%></td> + <td><%out.println(Rs.getString(3));%></td> + <td><%out.println(Rs.getString(4));%></td> + <td><%out.println(Rs.getString(5));%></td> + <td><%out.println(Rs.getString(6));%></td> + <td><%out.println(Rs.getString(7));%></td> + <td><%out.println(Rs.getString(8));%></td> + <td><%out.println(Rs.getString(9));%></td> + <td><%out.println(Rs.getString(10));%></td> + <td><%out.println(Rs.getString(11));%></td> + </tr> +<% + } +%> + +</thead> +</body> +</html> + +<% +} +catch(Exception e){out.println(e.getMessage());} + +%> + + + + + + diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/DBUtilR.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/DBUtilR.class new file mode 100644 index 00000000..07670072 Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/DBUtilR.class differ diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/againvote.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/againvote.class new file mode 100644 index 00000000..b3528019 Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/againvote.class differ diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/loginpage.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/loginpage.class new file mode 100644 index 00000000..b46c3132 Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/loginpage.class differ diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/registration.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/registration.class new file mode 100644 index 00000000..a64e8621 Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/registration.class differ diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/thankyou.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/thankyou.class new file mode 100644 index 00000000..e2d3b57e Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/thankyou.class differ diff --git a/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/vote.class b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/vote.class new file mode 100644 index 00000000..a484556a Binary files /dev/null and b/Online Voting System/Online_Voting_System/build/classes/vote/com/servlet/vote.class differ diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/DBUtilR.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/DBUtilR.java new file mode 100644 index 00000000..3e1e94ba --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/DBUtilR.java @@ -0,0 +1,30 @@ +package vote.com.servlet; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.SQLException; + +public class DBUtilR { + static Connection conn = null; + static + { + try { + Class.forName("com.mysql.jdbc.Driver"); + + conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/votingdb", "Vaishnavi", "Nelavetla@537"); + + if(!conn.isClosed()) { + System.out.println("Connection established"); + } + + } catch (ClassNotFoundException | SQLException e) { + System.out.println("Error in DBUtilFile"); + e.printStackTrace(); + } + } + + public static Connection getDBConnection() { + // TODO Auto-generated method stub + return conn; + } +} \ No newline at end of file diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/againvote.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/againvote.java new file mode 100644 index 00000000..e5cf1b2f --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/againvote.java @@ -0,0 +1,18 @@ +package vote.com.servlet; + +import java.io.IOException; + +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +public class againvote extends HttpServlet { + private static final long serialVersionUID = 1L; + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + doGet(request, response); + } + +} diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/loginpage.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/loginpage.java new file mode 100644 index 00000000..aeb579ad --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/loginpage.java @@ -0,0 +1,71 @@ +package vote.com.servlet; + +import jakarta.servlet.RequestDispatcher; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +public class loginpage extends HttpServlet { + private static final long serialVersionUID = 1L; + + final static Connection con=DBUtilR.getDBConnection(); + static PreparedStatement ps = null; + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + PrintWriter out = response.getWriter(); + String card=request.getParameter("cardno"); + Integer pin=Integer.parseInt(request.getParameter("pin")); + + try { + if(check(card,pin)) + { + out.print("Successful Login...You Can Vote Now"); + RequestDispatcher rd=request.getRequestDispatcher("vote.html"); + rd.include(request,response); + } + else { + out.print("Sorry username or password error , Make new account"); + RequestDispatcher rd=request.getRequestDispatcher("registration.html"); + rd.include(request,response); + } + } + catch (SQLException e) { + e.printStackTrace(); + } + + + } + static boolean check(String card,Integer pin) throws SQLException + { + boolean r=false; + ps=con.prepareStatement("Select * from register where cardno=? and pin=?"); + ps.setString(1,card); + ps.setInt(2,pin); + ResultSet rs=ps.executeQuery(); + r=rs.next(); + + return r; + } + + static boolean checkvote(String card) throws SQLException + { + boolean r=false; + ps=con.prepareStatement("Select * from vote where cardno=?"); + ps.setString(1,card); + + ResultSet rs=ps.executeQuery(); + r=rs.next(); + + return r; + } + +} diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/registration.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/registration.java new file mode 100644 index 00000000..43a43dfc --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/registration.java @@ -0,0 +1,75 @@ +package vote.com.servlet; + +import jakarta.servlet.RequestDispatcher; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; + +public class registration extends HttpServlet { + private static final long serialVersionUID = 1L; + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + response.setContentType("text/html"); + PrintWriter out = response.getWriter(); + + + String f=request.getParameter("fname"); + + String c=request.getParameter("cardno"); + String cn=request.getParameter("cono"); + String ad=request.getParameter("add"); + String dob=request.getParameter("dob"); + String email=request.getParameter("email"); + String pin=request.getParameter("pin"); + try + { + + Class.forName("com.mysql.jdbc.Driver"); + Connection con=(Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/votingdb","Vaishnavi","Nelavetla@537"); + PreparedStatement ps=con.prepareStatement("insert into register values(?,?,?,?,?,?,?)"); + ps.setString(1,f); + + ps.setString(2,c); + ps.setString(3,cn); + ps.setString(4,ad); + ps.setString(5,dob); + ps.setString(6,email); + ps.setString(7,pin); + int i=ps.executeUpdate(); + if(i>0) + { + out.print("Successfully your account has been created...PLEASE LOGIN"); + RequestDispatcher rd=request.getRequestDispatcher("loginpage.html"); + rd.include(request,response); + } + else + { + out.print("Failed account creation try again"); + RequestDispatcher rd=request.getRequestDispatcher("registration.html"); + rd.include(request,response); + } + + } + catch (Exception e2) { + out.print("Invalid , Failed account creation try again "+e2); + RequestDispatcher rd=request.getRequestDispatcher("registration.html"); + rd.include(request,response); + } + + out.close(); + +} + protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + doPost(request, response); + } + +} diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/thankyou.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/thankyou.java new file mode 100644 index 00000000..ab05b987 --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/thankyou.java @@ -0,0 +1,17 @@ +package vote.com.servlet; + +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class thankyou extends HttpServlet { + private static final long serialVersionUID = 1L; + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + + } + +} diff --git a/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/vote.java b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/vote.java new file mode 100644 index 00000000..4134f5c3 --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/java/vote/com/servlet/vote.java @@ -0,0 +1,97 @@ +package vote.com.servlet; + +import jakarta.servlet.RequestDispatcher; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.SQLIntegrityConstraintViolationException; + +public class vote extends HttpServlet { + private static final long serialVersionUID = 1L; + + final static Connection con=DBUtilR.getDBConnection(); + static PreparedStatement ps = null; + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException + { + response.setContentType("text/html"); + PrintWriter out = response.getWriter(); + + + String f=request.getParameter("cardno"); + String l=request.getParameter("party"); + try + { + + Class.forName("com.mysql.jdbc.Driver"); + Connection con=(Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/votingdb","Vaishnavi","Nelavetla@537"); + + if(checkLogin(f)) + { + + ps=con.prepareStatement("insert into vote values(?,?)"); + ps.setString(1,f); + ps.setString(2,l); + int i=ps.executeUpdate(); + if(i>0) + { + out.print("Your Vote has been submitted successfully..."); + RequestDispatcher rd=request.getRequestDispatcher("thankyou.html"); + rd.include(request,response); + } + else + { + out.print("Failed to submit vote, try again"); + RequestDispatcher rd=request.getRequestDispatcher("vote.html"); + rd.include(request,response); + } + } + else + { + out.print("Please enter correct card number"); + RequestDispatcher rd=request.getRequestDispatcher("vote.html"); + rd.include(request,response); + } + } + catch (SQLIntegrityConstraintViolationException e2) { + out.print("Please select any party"); + RequestDispatcher rd=request.getRequestDispatcher("vote.html"); + rd.include(request,response); + } + catch(Exception e) + { + out.print(" " +e); + RequestDispatcher rd=request.getRequestDispatcher("vote.html"); + rd.include(request,response); + } + out.close(); + + +} + protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + doPost(request, response); +} + + + +static boolean checkLogin(String card) throws SQLException +{ + boolean r=false; + ps=con.prepareStatement("Select * from register where cardno = ?"); + ps.setString(1,card); + + ResultSet rs=ps.executeQuery(); + r=rs.next(); + + return r; +} +} diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/META-INF/MANIFEST.MF b/Online Voting System/Online_Voting_System/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.28.jar b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.28.jar new file mode 100644 index 00000000..ac8904ee Binary files /dev/null and b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/mysql-connector-java-8.0.28.jar differ diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/servlet-api.jar b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/servlet-api.jar new file mode 100644 index 00000000..11cd71a7 Binary files /dev/null and b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/lib/servlet-api.jar differ diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/web.xml b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..a07d6d82 --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:web="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd" version="5.0"> + <servlet> + <description></description> + <display-name>againvote</display-name> + <servlet-name>againvote</servlet-name> + <servlet-class>vote.com.servlet.againvote</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>againvote</servlet-name> + <url-pattern>/againvote</url-pattern> + </servlet-mapping> + <display-name>Online_Voting_System</display-name> + <welcome-file-list> + <welcome-file>againvote.html</welcome-file> + <welcome-file>loginpage.html</welcome-file> + <welcome-file>registration.html</welcome-file> + <welcome-file>thankyou.html</welcome-file> + <welcome-file>vote.html</welcome-file> + </welcome-file-list> + <servlet> + <description></description> + <display-name>DBUtilR</display-name> + <servlet-name>DBUtilR</servlet-name> + <servlet-class>vote.com.servlet.DBUtilR</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>DBUtilR</servlet-name> + <url-pattern>/DBUtilR</url-pattern> + </servlet-mapping> + <servlet> + <description></description> + <display-name>loginpage</display-name> + <servlet-name>loginpage</servlet-name> + <servlet-class>vote.com.servlet.loginpage</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>loginpage</servlet-name> + <url-pattern>/loginpage</url-pattern> + </servlet-mapping> + <servlet> + <description></description> + <display-name>registration</display-name> + <servlet-name>registration</servlet-name> + <servlet-class>vote.com.servlet.registration</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>registration</servlet-name> + <url-pattern>/registration</url-pattern> + </servlet-mapping> + <servlet> + <description></description> + <display-name>thankyou</display-name> + <servlet-name>thankyou</servlet-name> + <servlet-class>vote.com.servlet.thankyou</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>thankyou</servlet-name> + <url-pattern>/thankyou</url-pattern> + </servlet-mapping> + <servlet> + <description></description> + <display-name>vote</display-name> + <servlet-name>vote</servlet-name> + <servlet-class>vote.com.servlet.vote</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>vote</servlet-name> + <url-pattern>/vote</url-pattern> + </servlet-mapping> +</web-app> \ No newline at end of file diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/againvote.html b/Online Voting System/Online_Voting_System/src/main/webapp/againvote.html new file mode 100644 index 00000000..4da7bdd2 --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/webapp/againvote.html @@ -0,0 +1,210 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="UTF-8"> +<title>Welcome</title> +</head> +<link href="https://fonts.googleapis.com/css?family=Josefin+Sans" rel="stylesheet"> +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> + +<!--javascript--> +<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> +<style> + body { + font-family: 'Josefin Sans', sans-serif; + box-sizing: border-box; +} +.container-fluid{ + height: 100%; + margin: 0; + padding: 0; + width: 100%; + background: #FFF; +} +/* ============= Animation background ========= */ +.background { + background: linear-gradient(132deg, #FC415A, #591BC5, #212335); + background-size: 400% 400%; + animation: Gradient 400s ease infinite; + position: relative; + height: 100vh; + width: 100%; + overflow: hidden; + padding:0; + margin:0px; +} +.cube { + position: absolute; + top: 80vh; + left: 45vw; + width: 10px; + height: 10px; + border: solid 1px #D7D4E4; + transform-origin: top left; + transform: scale(0) rotate(0deg) translate(-50%, -50%); + animation: cube 12s ease-in forwards infinite; +} +.cube:nth-child(2n) { + border-color: #FFF ; +} +.cube:nth-child(2) { + animation-delay: -10s; + left: 25vw; + top: 40vh; +} +.cube:nth-child(3) { + animation-delay: -14s; + left: 75vw; + top: 50vh; +} +.cube:nth-child(4) { + animation-delay: -16s; + left: 90vw; + top: 10vh; +} +.cube:nth-child(5) { + animation-delay: -18s; + left: 10vw; + top: 85vh; +} +.cube:nth-child(6) { + animation-delay: -20s; + left: 50vw; + top: 10vh; +} +/* ================= Header ============ */ +header{ + position: absolute; + top:0%; + left: 0%; + width:100%; + margin: 0; + padding: 0; +} +/* navbar */ +nav{ + color: #FFF; + float: right; + margin:30px 90px; +} +nav ul{ + list-style: none; +} +nav ul li { + float: left; + transition: .3s; +} +nav ul li a{ + text-decoration: none; + color: #EFEEF5; + transition: .5; + font-size: 15px; + margin-left:16px; +} +nav ul li:hover a{ + text-decoration: none; + color: #591BC5;; +} +nav ul li:hover{ + height: 45px; + padding-top: 30px; + margin-top: -30px; + background: #EFEEF5; + text-decoration: none; + transform: skew(15deg); +} +/* Logo */ +.logo{ + width: 35px; + height: 35px; + background: #EFEEF5; + margin: 40px 63px; + float: left; + transform: rotate(-30deg); +} +.logo span{ + color: #591BC5; + font-size: 2em; + line-height: 1.4; + padding-left: 5px; + font-weight: bold; +} +/* Header content & title & button*/ +.header-content{ + margin-top:25%; + text-align: center; + color: #EFEEF5; +} +.header-content h1{ + text-transform: uppercase; + font-size: 3em; + letter-spacing: 1px; +} +.header-content p { + font-size: 20px; + line-height: 1.5; + margin: 20px auto; +} +.header-content button{ + width: 140px; + margin:20px 10px; + color: #591BC5; + font-size: 17px; + border:1px solid #EFEEF5; + font-weight: 500; + background: #EFEEF5; + border-radius: 20px; + padding: 10px; + cursor:pointer; + transition: .3s; +} +.header-content button:hover{ + border-radius: 0; +} +/* Animate Background*/ +@keyframes Gradient { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} +@keyframes cube { + from { + transform: scale(0) rotate(0deg) translate(-50%, -50%); + opacity: 1; + } + to { + transform: scale(20) rotate(960deg) translate(-50%, -50%); + opacity: 0; + } +} +</style> +<!-- Background & animion & navbar & title --> + <div class="container-fluid"> +<!-- Background animtion--> + <div class="background"> + <div class="cube"></div> + <div class="cube"></div> + <div class="cube"></div> + <div class="cube"></div> + <div class="cube"></div> + </div> +<!-- header --> + <header> +<!-- navbar --> +<!-- title & content --> + <section class="header-content"> + <form action="loginpage" method="post" class="container"> + <h1> + <a href = "loginpage.html">Welcome</a> + </h1> + </form> + </section> + </header> \ No newline at end of file diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/loginpage.html b/Online Voting System/Online_Voting_System/src/main/webapp/loginpage.html new file mode 100644 index 00000000..8beafb2d --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/webapp/loginpage.html @@ -0,0 +1,180 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="UTF-8"> +<title>LOGIN</title> +</head> +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> + +<!--javascript--> +<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> +<style> +* { + box-sizing: border-box; +} +body { + font-family: 'Rubik', sans-serif; + margin: 0; + padding: 0; +} +.container { + display: flex; + height: 100vh; +} +.left-section { + overflow: hidden; + display: flex; + flex-wrap: wrap; + flex-direction: column; + justify-content: center; + -webkit-animation-name: left-section; + animation-name: left-section; + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-delay: 1s; + animation-delay: 1s; +} +.right-section { + flex: 1; + background: linear-gradient(to right, #f50629 0%, #fd9d08 100%); + transition: 1s; + background-image: url(https://cdn3.iconfinder.com/data/icons/isometric-illustrations-7/350/622-512.png); + background-size: cover; + background-repeat: no-repeat; + background-position: center; +} +.header > h1 { + margin: 0; + color: #f50629; +} +.header > h4 { + margin-top: 10px; + font-weight: normal; + font-size: 15px; + color: rgba(0, 0, 0, 0.4); +} +.form { + max-width: 80%; + display: flex; + flex-direction: column; +} +.form > p { + text-align: right; +} +.form > p > a { + color: #000; + font-size: 14px; +} +.form-field { + height: 46px; + padding: 0 16px; + border: 2px solid #ddd; + border-radius: 4px; + font-family: 'Rubik', sans-serif; + outline: 0; + transition: .2s; + margin-top: 20px; +} +.form-field:focus { + border-color: #0f7ef1; +} +.form > button { + padding: 12px 10px; + border: 0; + background: linear-gradient(to right, #f50629 0%, #fd9d08 100%); + border-radius: 3px; + margin-top: 10px; + color: #fff; + letter-spacing: 1px; + font-family: 'Rubik', sans-serif; +} +.animation { + -webkit-animation-name: move; + animation-name: move; + -webkit-animation-duration: .4s; + animation-duration: .4s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-delay: 2s; + animation-delay: 2s; +} + +.a1 { + -webkit-animation-delay: 2s; + animation-delay: 2s; +} +.a2 { + -webkit-animation-delay: 2.1s; + animation-delay: 2.1s; +} +.a3 { + -webkit-animation-delay: 2.2s; + animation-delay: 2.2s; +} +.a4 { + -webkit-animation-delay: 2.3s; + animation-delay: 2.3s; +} +.a5 { + -webkit-animation-delay: 2.4s; + animation-delay: 2.4s; +} +.a6 { + -webkit-animation-delay: 2.5s; + animation-delay: 2.5s; +} +@keyframes move { + 0% { + opacity: 0; + visibility: hidden; + -webkit-transform: translateY(-40px); + transform: translateY(-40px); + } + 100% { + opacity: 1; + visibility: visible; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} +@keyframes left-section { + 0% { + opacity: 0; + width: 0; + } + 100% { + opacity: 1; + padding: 20px 40px; + width: 440px; + } +} + </style> +<body> + +<div class="container"> + <div class="left-section"> + <div class="header"> + <h1 class="animation a1">Online Voting System</h1> + <h4 class="animation a2">"The Ballot is Stronger Than Bullet"</h4> + </div> + <form action="vote" method="post"> + <div class="form"> + +<input type="number" class="form-field animation a3" placeholder="Enter Voter Card Number" name="cardno" required> + <input type="password" class="form-field animation a4" placeholder="Enter pin" name="pin" required> + + <button class="animation a6"><a href="vote.html">LOGIN</a></button> + <button class="animation a6"><a href="registration.html">NEW USER REGISTER</a></button> + + </div> + </form> + </div> + <div class="right-section"></div> +</div> + +</body> +</html> \ No newline at end of file diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/registration.html b/Online Voting System/Online_Voting_System/src/main/webapp/registration.html new file mode 100644 index 00000000..5b4afcf7 --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/webapp/registration.html @@ -0,0 +1,192 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="ISO-8859-1"> +<title>Register</title> +</head> +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> + +<!--javascript--> +<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> +<style> +* { + box-sizing: border-box; +} +body { + font-family: 'Rubik', sans-serif; + margin: 0; + padding: 0; +} +.container { + display: flex; + height: 100vh; +} +.left-section { + overflow: hidden; + display: flex; + flex-wrap: wrap; + flex-direction: column; + justify-content: center; + -webkit-animation-name: left-section; + animation-name: left-section; + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-delay: 1s; + animation-delay: 1s; +} +.right-section { + flex: 1; + +} +.header > h1 { + margin: 0; + color: #f50629; +} +.header > h4 { + margin-top: 10px; + font-weight: normal; + font-size: 15px; + color: rgba(0, 0, 0, 0.4); +} +.form { + max-width: 80%; + display: flex; + flex-direction: column; +} +.form > p { + text-align: right; +} +.form > p > a { + color: #000; + font-size: 14px; +} +.form-field { + height: 46px; + padding: 0 16px; + border: 2px solid #ddd; + border-radius: 4px; + font-family: 'Rubik', sans-serif; + outline: 0; + transition: .2s; + margin-top: 20px; +} +.form-field:focus { + border-color: #0f7ef1; +} +.form > button { + padding: 12px 10px; + border: 0; + background: linear-gradient(to right, #f50629 0%, #fd9d08 100%); + border-radius: 3px; + margin-top: 10px; + color: #fff; + letter-spacing: 1px; + font-family: 'Rubik', sans-serif; +} +.animation { + -webkit-animation-name: move; + animation-name: move; + -webkit-animation-duration: .4s; + animation-duration: .4s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-delay: 2s; + animation-delay: 2s; +} + +.a1 { + -webkit-animation-delay: 2s; + animation-delay: 2s; +} +.a2 { + -webkit-animation-delay: 2.1s; + animation-delay: 2.1s; +} +.a3 { + -webkit-animation-delay: 2.2s; + animation-delay: 2.2s; +} +.a4 { + -webkit-animation-delay: 2.3s; + animation-delay: 2.3s; +} +.a5 { + -webkit-animation-delay: 2.4s; + animation-delay: 2.4s; +} +.a6 { + -webkit-animation-delay: 2.5s; + animation-delay: 2.5s; +} +@keyframes move { + 0% { + opacity: 0; + visibility: hidden; + -webkit-transform: translateY(-40px); + transform: translateY(-40px); + } + 100% { + opacity: 1; + visibility: visible; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} +@keyframes left-section { + 0% { + opacity: 0; + width: 0; + } + 100% { + opacity: 1; + padding: 20px 40px; + width: 440px; + } +} + </style> + </head> +<body> + +<div class="container"> + <div class="left-section"> + <div class="header"> + <h1 class="animation a1">REGISTRATION</h1> + </div> + <form action="registration" method="post"> + <div class="form"> + +<b>Name:</b> + <input type="text" placeholder="Enter First Name" name="fname" required><span class="validity"></span><br> + + + <b>Voter Card Number:</b> + <input type="number" placeholder="Enter Voter Card Number" name="cardno" required><span class="validity"></span><br> + + <b>Contact Number:</b> + <input type="tel" placeholder="Enter Contact Number" name="cono" required><span class="validity"></span><br> + + <b>Address:</b> + <input type="text" placeholder="Enter Address" name="add" required><span class="validity"></span><br> + + <b>Date Of Birth:(YYYY/MM/DD)</b> + <input type="date" placeholder="Enter Date Of Birth" name="dob" required><span class="validity"></span><br> + + <b>Email:</b> + <input type="email" placeholder="Enter Email address" name="email" required><span class="validity"></span><br> + + <b>Enter Pin:</b> + <input type="password" placeholder="Enter 4 digit Pin to set" name="pin" required><span class="validity"></span><br> + + <button class="animation a6">Register</button> + </div> + </form> + </div> + <div class="right-section"></div> +</div> + +</body> +</html> \ No newline at end of file diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/thankyou.html b/Online Voting System/Online_Voting_System/src/main/webapp/thankyou.html new file mode 100644 index 00000000..d014fdf9 --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/webapp/thankyou.html @@ -0,0 +1,91 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="ISO-8859-1"> +<title>ThankYou</title> +</head> +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> + +<!--javascript--> +<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> +<style> +html,body { + font-family: 'Raleway', sans-serif; +} +.thankyou-page ._header { + background: #fee028; + padding: 100px 30px; + text-align: center; + background: #fee028; +} +.thankyou-page ._header .logo { + max-width: 200px; + margin: 0 auto 50px; +} + +.thankyou-page ._header h1 { + font-size: 80px; + font-weight: 800; + color: white; + margin: 0; +} +.thankyou-page ._body { + margin: -70px 0 30px; +} +.thankyou-page ._body ._box { + margin: auto; + max-width: 80%; + padding: 50px; + background: white; + border-radius: 3px; + box-shadow: 0 0 35px rgba(10, 10, 10,0.12); + -moz-box-shadow: 0 0 35px rgba(10, 10, 10,0.12); + -webkit-box-shadow: 0 0 35px rgba(10, 10, 10,0.12); +} +.thankyou-page ._body ._box h2 { + font-size: 40px; + font-weight: 600; + color: #4ab74a; +} +.thankyou-page ._footer { + text-align: center; + padding: 50px 30px; +} + +.thankyou-page ._footer .btn { + background: #4ab74a; + color: white; + border: 0; + font-size: 18px; + font-weight: 600; + border-radius: 0; + letter-spacing: 0.8px; + padding: 20px 33px; + text-transform: uppercase; +} +</style> +</head> +</body> +<div class="thankyou-page"> + <div class="_header"> + <div class="logo"> + </div> + <h1><center>THANK YOU...!!!</center></h1> + </div> + <form action="thankyou" method="post" class="container"> + <div class="_body"> + <div class="_box"> + <h2> + <strong><center>Your Vote has been counted</center></strong> + </h2> + </div> + </div> + <div class="_footer"> + <a href="againvote.html" class="btn btn-primary"><b class="r">BACK TO HOME</b></a> + </form> + </div> +</div> +</body> +</html> \ No newline at end of file diff --git a/Online Voting System/Online_Voting_System/src/main/webapp/vote.html b/Online Voting System/Online_Voting_System/src/main/webapp/vote.html new file mode 100644 index 00000000..4888f624 --- /dev/null +++ b/Online Voting System/Online_Voting_System/src/main/webapp/vote.html @@ -0,0 +1,187 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="UTF-8"> +<title>Vote Here</title> + +<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> + +<!--javascript--> +<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> + +<style> +* { + box-sizing: border-box; +} +body { + font-family: 'Rubik', sans-serif; + background: #fee028; + margin: 0; + padding: 0; +} +.container { + display: flex; + height: 100vh; +} +.left-section { + overflow: hidden; + display: flex; + flex-wrap: wrap; + flex-direction: column; + justify-content: center; + -webkit-animation-name: left-section; + animation-name: left-section; + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-delay: 1s; + animation-delay: 1s; +} +.right-section { + flex: 1; + +} +.header > h1 { + margin: 0; + color: #f50629; +} +.header > h4 { + margin-top: 10px; + font-weight: normal; + font-size: 15px; + color: rgba(0, 0, 0, 0.4); +} +.form { + max-width: 80%; + display: flex; + flex-direction: column; +} +.form > p { + text-align: right; +} +.form > p > a { + color: #000; + font-size: 14px; +} +.form-field { + height: 46px; + padding: 0 16px; + border: 2px solid #ddd; + border-radius: 4px; + font-family: 'Rubik', sans-serif; + outline: 0; + transition: .2s; + margin-top: 20px; +} +.form-field:focus { + border-color: #0f7ef1; +} +.form > button { + padding: 12px 10px; + border: 0; + background: linear-gradient(to right, #f50629 0%, #fd9d08 100%); + border-radius: 3px; + margin-top: 10px; + color: #fff; + letter-spacing: 1px; + font-family: 'Rubik', sans-serif; +} +.animation { + -webkit-animation-name: move; + animation-name: move; + -webkit-animation-duration: .4s; + animation-duration: .4s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-delay: 2s; + animation-delay: 2s; +} + +.a1 { + -webkit-animation-delay: 2s; + animation-delay: 2s; +} +.a2 { + -webkit-animation-delay: 2.1s; + animation-delay: 2.1s; +} +.a3 { + -webkit-animation-delay: 2.2s; + animation-delay: 2.2s; +} +.a4 { + -webkit-animation-delay: 2.3s; + animation-delay: 2.3s; +} +.a5 { + -webkit-animation-delay: 2.4s; + animation-delay: 2.4s; +} +.a6 { + -webkit-animation-delay: 2.5s; + animation-delay: 2.5s; +} +@keyframes move { + 0% { + opacity: 0; + visibility: hidden; + -webkit-transform: translateY(-40px); + transform: translateY(-40px); + } + 100% { + opacity: 1; + visibility: visible; + -webkit-transform: translateY(0); + transform: translateY(0); + } +} +@keyframes left-section { + 0% { + opacity: 0; + width: 0; + } + 100% { + opacity: 1; + padding: 20px 40px; + width: 440px; + } +} + </style> +<body> + +<div class="container"> + <div class="left-section"> + <div class="header"> + <h1 class="animation a1">Cast Your Vote</h1> + <h4 class="animation a2">"Choose the right!"</h4> + </div> + <form action="vote" method="post"> + <div class="form"> +<input type="number" placeholder="Voter card Number" name="cardno" required><br> +<b>Select Party You want to vote:</b><br> +<select name="party" class="form-item__element form-item__element--select" required> +<option disabled selected value=" ">Please select value</option> +<option>Bahujan Samaj Party(BSP)</option> +<option>Bharatiya Janata Party(BJP)</option> +<option>Communist Party of India</option> +<option>Communist Party of India (Marxist)</option> +<option>Indian National Congress</option> +<option>All India Trinamool Congress</option> +<option>Aam Aadmi Party(AAP)</option> +<option>None of Above</option> +</select> + + <button class="animation a6">VOTE</button> + + + </div> + </form> + </div> + <div class="right-section"></div> +</div> + +</body> +</html> \ No newline at end of file diff --git a/Online Voting System/README.md b/Online Voting System/README.md new file mode 100644 index 00000000..0be88591 --- /dev/null +++ b/Online Voting System/README.md @@ -0,0 +1,54 @@ +# Online-voting-system-using-servlets + +This is an Online voting system which can be used for conducting elections in online-mode. + + +-------REQUIREMENTS + + +1.apache version 10 and database connectivity + + +2.eclipse workspace + + +3.mysql-connector + + +4.servlet-api + + +-------TECHNOLOGIES USED + + +1.HTML/CSS/JavaScript for frontend + + +2.MySQL for backend + + +3.Java servlets + + +-------MUST READ !! + + +Total number of pages - 5 + + +Welcome page,Login page(For already registered candidates),Register page(for new registrations),Vote page(to select the respective vote),Thankyou page + + +1.A user needs to get registered himself/herself in the portal first. + + +2.Voterid and password are used to login the specific user. + + +3.The user can access the vote page by entering his asked credentials. + + +4.Loginpage directs you to vote page where user can cast the vote. + + +5.With one voterid vote can be casted only once and this directs to thankyoupage. diff --git a/OnlineJavaTest.java b/OnlineJavaTest.java new file mode 100644 index 00000000..1c89a8de --- /dev/null +++ b/OnlineJavaTest.java @@ -0,0 +1,187 @@ +/*Online Java Paper Test*/ + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; + +class OnlineTest extends JFrame implements ActionListener +{ + JLabel l; + JRadioButton jb[]=new JRadioButton[5]; + JButton b1,b2; + ButtonGroup bg; + int count=0,current=0,x=1,y=1,now=0; + int m[]=new int[10]; + OnlineTest(String s) + { + super(s); + l=new JLabel(); + add(l); + bg=new ButtonGroup(); + for(int i=0;i<5;i++) + { + jb[i]=new JRadioButton(); + add(jb[i]); + bg.add(jb[i]); + } + b1=new JButton("Next"); + b2=new JButton("Bookmark"); + b1.addActionListener(this); + b2.addActionListener(this); + add(b1);add(b2); + set(); + l.setBounds(30,40,450,20); + jb[0].setBounds(50,80,100,20); + jb[1].setBounds(50,110,100,20); + jb[2].setBounds(50,140,100,20); + jb[3].setBounds(50,170,100,20); + b1.setBounds(100,240,100,30); + b2.setBounds(270,240,100,30); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setLayout(null); + setLocation(250,100); + setVisible(true); + setSize(600,350); + } + public void actionPerformed(ActionEvent e) + { + if(e.getSource()==b1) + { + if(check()) + count=count+1; + current++; + set(); + if(current==9) + { + b1.setEnabled(false); + b2.setText("Result"); + } + } + if(e.getActionCommand().equals("Bookmark")) + { + JButton bk=new JButton("Bookmark"+x); + bk.setBounds(480,20+30*x,100,30); + add(bk); + bk.addActionListener(this); + m[x]=current; + x++; + current++; + set(); + if(current==9) + b2.setText("Result"); + setVisible(false); + setVisible(true); + } + for(int i=0,y=1;i<x;i++,y++) + { + if(e.getActionCommand().equals("Bookmark"+y)) + { + if(check()) + count=count+1; + now=current; + current=m[y]; + set(); + ((JButton)e.getSource()).setEnabled(false); + current=now; + } + } + + if(e.getActionCommand().equals("Result")) + { + if(check()) + count=count+1; + current++; + //System.out.println("correct ans="+count); + JOptionPane.showMessageDialog(this,"correct ans="+count); + System.exit(0); + } + } + void set() + { + jb[4].setSelected(true); + if(current==0) + { + l.setText("Que1: Which one among these is not a primitive datatype?"); + jb[0].setText("int");jb[1].setText("Float");jb[2].setText("boolean");jb[3].setText("char"); + } + if(current==1) + { + l.setText("Que2: Which class is available to all the class automatically?"); + jb[0].setText("Swing");jb[1].setText("Applet");jb[2].setText("Object");jb[3].setText("ActionEvent"); + } + if(current==2) + { + l.setText("Que3: Which package is directly available to our class without importing it?"); + jb[0].setText("swing");jb[1].setText("applet");jb[2].setText("net");jb[3].setText("lang"); + } + if(current==3) + { + l.setText("Que4: String class is defined in which package?"); + jb[0].setText("lang");jb[1].setText("Swing");jb[2].setText("Applet");jb[3].setText("awt"); + } + if(current==4) + { + l.setText("Que5: Which institute is best for java coaching?"); + jb[0].setText("Utek");jb[1].setText("Aptech");jb[2].setText("SSS IT");jb[3].setText("jtek"); + } + if(current==5) + { + l.setText("Que6: Which one among these is not a keyword?"); + jb[0].setText("class");jb[1].setText("int");jb[2].setText("get");jb[3].setText("if"); + } + if(current==6) + { + l.setText("Que7: Which one among these is not a class? "); + jb[0].setText("Swing");jb[1].setText("Actionperformed");jb[2].setText("ActionEvent"); + jb[3].setText("Button"); + } + if(current==7) + { + l.setText("Que8: which one among these is not a function of Object class?"); + jb[0].setText("toString");jb[1].setText("finalize");jb[2].setText("equals"); + jb[3].setText("getDocumentBase"); + } + if(current==8) + { + l.setText("Que9: which function is not present in Applet class?"); + jb[0].setText("init");jb[1].setText("main");jb[2].setText("start");jb[3].setText("destroy"); + } + if(current==9) + { + l.setText("Que10: Which one among these is not a valid component?"); + jb[0].setText("JButton");jb[1].setText("JList");jb[2].setText("JButtonGroup"); + jb[3].setText("JTextArea"); + } + l.setBounds(30,40,450,20); + for(int i=0,j=0;i<=90;i+=30,j++) + jb[j].setBounds(50,80+i,200,20); + } + boolean check() + { + if(current==0) + return(jb[1].isSelected()); + if(current==1) + return(jb[2].isSelected()); + if(current==2) + return(jb[3].isSelected()); + if(current==3) + return(jb[0].isSelected()); + if(current==4) + return(jb[2].isSelected()); + if(current==5) + return(jb[2].isSelected()); + if(current==6) + return(jb[1].isSelected()); + if(current==7) + return(jb[3].isSelected()); + if(current==8) + return(jb[1].isSelected()); + if(current==9) + return(jb[2].isSelected()); + return false; + } + public static void main(String s[]) + { + new OnlineTest("Online Test Of Java"); + } +} diff --git a/Online_Exam_System.java b/Online_Exam_System.java new file mode 100644 index 00000000..7301d938 --- /dev/null +++ b/Online_Exam_System.java @@ -0,0 +1,187 @@ +/*Online Java Paper Test*/ + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; + +class OnlineTest extends JFrame implements ActionListener +{ + JLabel l; + JRadioButton jb[]=new JRadioButton[5]; + JButton b1,b2; + ButtonGroup bg; + int count=0,current=0,x=1,y=1,now=0; + int m[]=new int[10]; + OnlineTest(String s) + { + super(s); + l=new JLabel(); + add(l); + bg=new ButtonGroup(); + for(int i=0;i<5;i++) + { + jb[i]=new JRadioButton(); + add(jb[i]); + bg.add(jb[i]); + } + b1=new JButton("Next"); + b2=new JButton("Bookmark"); + b1.addActionListener(this); + b2.addActionListener(this); + add(b1);add(b2); + set(); + l.setBounds(30,40,450,20); + jb[0].setBounds(50,80,100,20); + jb[1].setBounds(50,110,100,20); + jb[2].setBounds(50,140,100,20); + jb[3].setBounds(50,170,100,20); + b1.setBounds(100,240,100,30); + b2.setBounds(270,240,100,30); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setLayout(null); + setLocation(250,100); + setVisible(true); + setSize(600,350); + } + public void actionPerformed(ActionEvent e) + { + if(e.getSource()==b1) + { + if(check()) + count=count+1; + current++; + set(); + if(current==9) + { + b1.setEnabled(false); + b2.setText("Result"); + } + } + if(e.getActionCommand().equals("Bookmark")) + { + JButton bk=new JButton("Bookmark"+x); + bk.setBounds(480,20+30*x,100,30); + add(bk); + bk.addActionListener(this); + m[x]=current; + x++; + current++; + set(); + if(current==9) + b2.setText("Result"); + setVisible(false); + setVisible(true); + } + for(int i=0,y=1;i<x;i++,y++) + { + if(e.getActionCommand().equals("Bookmark"+y)) + { + if(check()) + count=count+1; + now=current; + current=m[y]; + set(); + ((JButton)e.getSource()).setEnabled(false); + current=now; + } + } + + if(e.getActionCommand().equals("Result")) + { + if(check()) + count=count+1; + current++; + //System.out.println("correct ans="+count); + JOptionPane.showMessageDialog(this,"correct ans="+count); + System.exit(0); + } + } + void set() + { + jb[4].setSelected(true); + if(current==0) + { + l.setText("Que1: Which one among these is not a primitive datatype?"); + jb[0].setText("int");jb[1].setText("Float");jb[2].setText("boolean");jb[3].setText("char"); + } + if(current==1) + { + l.setText("Que2: Which class is available to all the class automatically?"); + jb[0].setText("Swing");jb[1].setText("Applet");jb[2].setText("Object");jb[3].setText("ActionEvent"); + } + if(current==2) + { + l.setText("Que3: Which package is directly available to our class without importing it?"); + jb[0].setText("swing");jb[1].setText("applet");jb[2].setText("net");jb[3].setText("lang"); + } + if(current==3) + { + l.setText("Que4: String class is defined in which package?"); + jb[0].setText("lang");jb[1].setText("Swing");jb[2].setText("Applet");jb[3].setText("awt"); + } + if(current==4) + { + l.setText("Que5: Which institute is best for java coaching?"); + jb[0].setText("Utek");jb[1].setText("Aptech");jb[2].setText("SSS IT");jb[3].setText("jtek"); + } + if(current==5) + { + l.setText("Que6: Which one among these is not a keyword?"); + jb[0].setText("class");jb[1].setText("int");jb[2].setText("get");jb[3].setText("if"); + } + if(current==6) + { + l.setText("Que7: Which one among these is not a class? "); + jb[0].setText("Swing");jb[1].setText("Actionperformed");jb[2].setText("ActionEvent"); + jb[3].setText("Button"); + } + if(current==7) + { + l.setText("Que8: which one among these is not a function of Object class?"); + jb[0].setText("toString");jb[1].setText("finalize");jb[2].setText("equals"); + jb[3].setText("getDocumentBase"); + } + if(current==8) + { + l.setText("Que9: which function is not present in Applet class?"); + jb[0].setText("init");jb[1].setText("main");jb[2].setText("start");jb[3].setText("destroy"); + } + if(current==9) + { + l.setText("Que10: Which one among these is not a valid component?"); + jb[0].setText("JButton");jb[1].setText("JList");jb[2].setText("JButtonGroup"); + jb[3].setText("JTextArea"); + } + l.setBounds(30,40,450,20); + for(int i=0,j=0;i<=90;i+=30,j++) + jb[j].setBounds(50,80+i,200,20); + } + boolean check() + { + if(current==0) + return(jb[1].isSelected()); + if(current==1) + return(jb[2].isSelected()); + if(current==2) + return(jb[3].isSelected()); + if(current==3) + return(jb[0].isSelected()); + if(current==4) + return(jb[2].isSelected()); + if(current==5) + return(jb[2].isSelected()); + if(current==6) + return(jb[1].isSelected()); + if(current==7) + return(jb[3].isSelected()); + if(current==8) + return(jb[1].isSelected()); + if(current==9) + return(jb[2].isSelected()); + return false; + } + public static void main(String s[]) + { + new OnlineTest("Online Test Of Java"); + } +} \ No newline at end of file diff --git a/OpenWeatherMap.java b/OpenWeatherMap.java new file mode 100644 index 00000000..ebcda222 --- /dev/null +++ b/OpenWeatherMap.java @@ -0,0 +1,38 @@ +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; + +public class WeatherApp { + + public static void main(String[] args) { + String apiKey = "YOUR_API_KEY"; // Replace with your OpenWeatherMap API key + String city = "New York"; // Replace with the desired city + + try { + String apiUrl = "http://api.openweathermap.org/data/2.5/weather?q=" + city + "&appid=" + apiKey; + URL url = new URL(apiUrl); + + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + + BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream())); + String line; + StringBuilder response = new StringBuilder(); + + while ((line = reader.readLine()) != null) { + response.append(line); + } + reader.close(); + + // Parse and display the weather information + String weatherData = response.toString(); + System.out.println("Weather Data:"); + System.out.println(weatherData); + + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/OrderBook/src/main/orderbook/Helpers.java b/OrderBook/src/main/orderbook/Helpers.java new file mode 100644 index 00000000..36071092 --- /dev/null +++ b/OrderBook/src/main/orderbook/Helpers.java @@ -0,0 +1,20 @@ +import java.io.*; +import java.nio.file.*; + +public class Helpers { + + public static void printFileContents(String filePath) { + try { + String content = Files.readString(Paths.get(filePath)); + System.out.println(content); + } catch (IOException e) { + System.err.println("Unable to open " + filePath); + } + } + + public static void printFill(OrderFill fill, int quantity, long startTime, long endTime) { + double averagePrice = fill.unitsTransacted > 0 ? fill.totalValue / fill.unitsTransacted : 0.0; + long timeTaken = endTime - startTime; + System.out.println("Filled "+fill.unitsTransacted+"/"+quantity+" units @ $"+averagePrice+" avg. price in "+timeTaken+" ns"); + } +} diff --git a/OrderBook/src/main/orderbook/OrderBook.java b/OrderBook/src/main/orderbook/OrderBook.java new file mode 100644 index 00000000..fe33975f --- /dev/null +++ b/OrderBook/src/main/orderbook/OrderBook.java @@ -0,0 +1,144 @@ +import java.util.*; + +class Order { + int quantity; + double price; + String side; + + Order(int quantity, double price, String side) { + this.quantity = quantity; + this.price = price; + this.side = side; + } +} + +final class Orderbook { + private final TreeMap<Double, List<Order>> bids = new TreeMap<>(Collections.reverseOrder()); + private final TreeMap<Double, List<Order>> asks = new TreeMap<>(); + + public Orderbook(boolean generateDummies) { + if (generateDummies) { + Random random = new Random(12); + + for (int i = 0; i < 10; i++) { + double randomPrice = 90.0 + random.nextInt(1001) / 100.0; + addOrder(random.nextInt(100) + 1, randomPrice, "BUY"); + addOrder(random.nextInt(100) + 1, randomPrice, "BUY"); + } + + for (int i = 0; i < 10; i++) { + double randomPrice = 100.0 + random.nextInt(1001) / 100.0; + addOrder(random.nextInt(100) + 1, randomPrice, "SELL"); + addOrder(random.nextInt(100) + 1, randomPrice, "SELL"); + } + + } + } + + public void addOrder(int qty, double price, String side) { + Order order = new Order(qty, price, side.equals("BUY") ? "BUY" : "SELL"); + TreeMap<Double, List<Order>> book = side.equals("BUY") ? bids : asks; + + book.computeIfAbsent(price, k -> new ArrayList<>()).add(order); + } + + public void print() { + System.out.println("========== Orderbook ========="); + printLeg(asks, "ASK"); + + double bestAsk = bestQuote("SELL"); + double bestBid = bestQuote("BUY"); + System.out.println("====== " + String.format("%.2f", (bestAsk - bestBid) / bestBid * 10000) + "bps ======"); + + printLeg(bids, "BUY"); + System.out.println("==============================\n\n"); + } + + private void printLeg(TreeMap<Double, List<Order>> book, String side) { + if (side.equals("ASK")) { + for (Map.Entry<Double, List<Order>> entry : book.entrySet()) { + printPriceLevel(entry.getKey(), entry.getValue(), "31"); + } + } else { + NavigableSet<Double> descendingKeys = book.navigableKeySet().descendingSet(); + for (Double key : descendingKeys) { + printPriceLevel(key, book.get(key), "32"); + } + } + } + + private void printPriceLevel(double price, List<Order> orders, String color) { + int totalQuantity = 0; + for (Order order : orders) { + totalQuantity += order.quantity; + } + System.out.printf("\t\033[1;%sm\u20B9%6.2f%5d\033[0m ", color, price, totalQuantity); + for (int i = 0; i < totalQuantity / 10; i++) { + System.out.print("█"); + } + System.out.println(); + } + + private double bestQuote(String side) { + TreeMap<Double, List<Order>> book = side.equals("BUY") ? bids : asks; + return book.isEmpty() ? 0.0 : book.firstKey(); + } + + + + public OrderFill handleOrder(String type, int orderQuantity, String side, double price) { + int unitsTransacted = 0; + double totalValue = 0.0; + + TreeMap<Double, List<Order>> book = side.equals("BUY") ? asks : bids; + + Iterator<Map.Entry<Double, List<Order>>> iterator = book.entrySet().iterator(); + while (iterator.hasNext() && orderQuantity > 0) { + Map.Entry<Double, List<Order>> entry = iterator.next(); + double priceLevel = entry.getKey(); + + if (type.equals("LIMIT") && ((side.equals("BUY") && priceLevel > price) + || (side.equals("SELL") && priceLevel < price))) { + break; + } + + List<Order> orders = entry.getValue(); + Iterator<Order> orderIterator = orders.iterator(); + while (orderIterator.hasNext() && orderQuantity > 0) { + Order order = orderIterator.next(); + + if (order.quantity > orderQuantity) { + unitsTransacted += orderQuantity; + totalValue += orderQuantity * priceLevel; + order.quantity -= orderQuantity; + orderQuantity = 0; + } else { + unitsTransacted += order.quantity; + totalValue += order.quantity * priceLevel; + orderQuantity -= order.quantity; + orderIterator.remove(); + } + } + + if (orders.isEmpty()) { + iterator.remove(); + } + } + + if (type.equals("LIMIT") && orderQuantity > 0) { + addOrder(orderQuantity, price, side.equals("BUY") ? "BUY" : "SELL"); + } + + return new OrderFill(unitsTransacted, totalValue); + } +} + +class OrderFill { + int unitsTransacted; + double totalValue; + + OrderFill(int unitsTransacted, double totalValue) { + this.unitsTransacted = unitsTransacted; + this.totalValue = totalValue; + } +} diff --git a/OrderBook/src/main/orderbook/OrderBookApp.java b/OrderBook/src/main/orderbook/OrderBookApp.java new file mode 100644 index 00000000..1fa9c351 --- /dev/null +++ b/OrderBook/src/main/orderbook/OrderBookApp.java @@ -0,0 +1,68 @@ +import java.util.Scanner; + +public class OrderBookApp { + + public static void main(String[] args) { + Orderbook ob = new Orderbook(true); + Scanner scanner = new Scanner(System.in); + System.out.println(""" + ___ _ ____ _ __ _ \r + / _ \\ _ __ __| | ___ _ __| __ ) ___ ___ | | __ / / (_) __ ___ ____ _ \r + | | | | '__/ _` |/ _ \\ '__| _ \\ / _ \\ / _ \\| |/ / / / | |/ _` \\ \\ / / _` |\r + | |_| | | | (_| | __/ | | |_) | (_) | (_) | < / / | | (_| |\\ V / (_| |\r + \\___/|_| \\__,_|\\___|_| |____/ \\___/ \\___/|_|\\_\\ /_/ _/ |\\__,_| \\_/ \\__,_|\r + |__/ """ // + // + // + // + // + ); + while (true) { + System.out.println("Options\n-----------------------------------\n|1. Print Orderbook |\n|2. Submit order |\n|3. Exit |\n-----------------------------------\nChoice: "); + int action = scanner.nextInt(); + + if (action == 1) { + ob.print(); + } else if (action == 2) { + System.out.println("Enter order type:\n1. Market order\n2. Limit order\nSelection: "); + int orderTypeInput = scanner.nextInt(); + String orderType = (orderTypeInput == 1) ? "MARKET" : "LIMIT"; + + System.out.println("\nEnter side:\n1. Buy\n2. Sell\nSelection: "); + int sideInput = scanner.nextInt(); + String side = (sideInput == 1) ? "BUY" : "SELL"; + + System.out.println("\nEnter order quantity: "); + int quantity = scanner.nextInt(); + + if (orderType.equals("MARKET")) { + System.out.println("\nSubmitting market " + (side.equals("BUY") ? "buy" : "sell") + + " order for " + quantity + " units..\n"); + + long startTime = System.nanoTime(); + OrderFill fill = ob.handleOrder(orderType, quantity, side, 0.0); + long endTime = System.nanoTime(); + + Helpers.printFill(fill, quantity, startTime, endTime); + } else if (orderType.equals("LIMIT")) { + System.out.println("\nEnter limit price: "); + double price = scanner.nextDouble(); + + System.out.println("\nSubmitting limit " + (side.equals("BUY") ? "buy" : "sell") + + " order for " + quantity + " units @ \u20B9" + price + "..\n"); + + long startTime = System.nanoTime(); + OrderFill fill = ob.handleOrder(orderType, quantity, side, price); + long endTime = System.nanoTime(); + + Helpers.printFill(fill, quantity, startTime, endTime); + } + System.out.println(); + } else if(action == 3) { + break; + } + } + scanner.close(); + System.out.println("Program terminated."); + } +} diff --git a/PDF Sorting with Keyword, Size, and Page Range Filters b/PDF Sorting with Keyword, Size, and Page Range Filters new file mode 100644 index 00000000..5fcb3178 --- /dev/null +++ b/PDF Sorting with Keyword, Size, and Page Range Filters @@ -0,0 +1,160 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; +import java.util.regex.Pattern; + +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.text.PDFTextStripper; + +public class PDFSorterGUI extends JFrame { + private JTextField folderTextField; + private JTextField keywordsTextField; + private JTextField sizeTextField; + private JTextField pageRangeTextField; + private JTextArea logTextArea; + + private Map<String, String> keywordToDirectoryMap = new HashMap<>(); + private long minSizeBytes; + private int startPage; + private int endPage; + + public PDFSorterGUI() { + setTitle("PDF Sorter"); + setSize(600, 400); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + JPanel panel = new JPanel(); + panel.setLayout(new GridLayout(6, 2)); + + panel.add(new JLabel("Select Folder:")); + folderTextField = new JTextField(); + panel.add(folderTextField); + + panel.add(new JLabel("Keywords (comma-separated):")); + keywordsTextField = new JTextField(); + panel.add(keywordsTextField); + + panel.add(new JLabel("Minimum Size (bytes):")); + sizeTextField = new JTextField(); + panel.add(sizeTextField); + + panel.add(new JLabel("Page Range (e.g., 1-5):")); + pageRangeTextField = new JTextField(); + panel.add(pageRangeTextField); + + JButton sortButton = new JButton("Sort PDFs"); + sortButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + String folderPath = folderTextField.getText(); + String keywords = keywordsTextField.getText(); + String sizeStr = sizeTextField.getText(); + String pageRangeStr = pageRangeTextField.getText(); + + // Parse keywords + String[] keywordArray = keywords.split(","); + keywordToDirectoryMap.clear(); + for (String keyword : keywordArray) { + keywordToDirectoryMap.put(keyword.trim(), "/path/to/sorted/directory"); // Replace with actual directory + } + + // Parse minimum size + try { + minSizeBytes = Long.parseLong(sizeStr); + } catch (NumberFormatException ex) { + logTextArea.append("Invalid minimum size value.\n"); + return; + } + + // Parse page range + String[] pageRange = pageRangeStr.split("-"); + if (pageRange.length != 2) { + logTextArea.append("Invalid page range format.\n"); + return; + } + try { + startPage = Integer.parseInt(pageRange[0]); + endPage = Integer.parseInt(pageRange[1]); + } catch (NumberFormatException ex) { + logTextArea.append("Invalid page range values.\n"); + return; + } + + // Sort the PDFs + sortPDFs(folderPath); + } + }); + + panel.add(new JLabel()); + panel.add(sortButton); + + logTextArea = new JTextArea(); + logTextArea.setEditable(false); + + JScrollPane scrollPane = new JScrollPane(logTextArea); + + getContentPane().add(panel, BorderLayout.NORTH); + getContentPane().add(scrollPane, BorderLayout.CENTER); + } + + private void sortPDFs(String folderPath) { + File directory = new File(folderPath); + File[] files = directory.listFiles(); + + if (files != null) { + for (File file : files) { + if (file.isFile() && file.getName().endsWith(".pdf")) { + try { + PDDocument document = PDDocument.load(file); + long fileSize = file.length(); + + if (fileSize < minSizeBytes) { + continue; + } + + PDFTextStripper pdfTextStripper = new PDFTextStripper(); + int pageCount = document.getNumberOfPages(); + + if (pageCount < startPage || pageCount > endPage) { + continue; + } + + String text = pdfTextStripper.getText(document); + + for (Map.Entry<String, String> entry : keywordToDirectoryMap.entrySet()) { + String keyword = entry.getKey(); + String destinationDirectory = entry.getValue(); + + if (Pattern.compile(Pattern.quote(keyword), Pattern.CASE_INSENSITIVE).matcher(text).find()) { + File destination = new File(destinationDirectory, file.getName()); + if (file.renameTo(destination)) { + logTextArea.append("Moved " + file.getName() + " to " + destinationDirectory + "\n"); + } else { + logTextArea.append("Failed to move " + file.getName() + "\n"); + } + break; + } + } + + document.close(); + } catch (IOException e) { + logTextArea.append("Error processing PDF: " + file.getName() + "\n"); + e.printStackTrace(); + } + } + } + } + } + + public static void main(String[] args) { + SwingUtilities.invokeLater(() -> { + PDFSorterGUI sorterGUI = new PDFSorterGUI(); + sorterGUI.setVisible(true); + }); + } +} diff --git a/Password Manager.java b/Password Manager.java new file mode 100644 index 00000000..954f716b --- /dev/null +++ b/Password Manager.java @@ -0,0 +1,66 @@ +import java.util.ArrayList; +import java.util.Scanner; + +class PasswordEntry { + private String website; + private String username; + private String password; + + public PasswordEntry(String website, String username, String password) { + this.website = website; + this.username = username; + this.password = password; + } + + // Getters and setters for password entry details +} + +public class PasswordManagerApp { + private static ArrayList<PasswordEntry> passwordEntries = new ArrayList<>(); + private static String masterPassword; + + public static void main(String[] args) { + // Implement a login system using the master password + // If the user logs in successfully, proceed to the password manager interface + + Scanner scanner = new Scanner(System.in); + + while (true) { + displayMenu(); + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + switch (choice) { + case 1: + addPasswordEntry(scanner); + break; + case 2: + viewPasswordEntries(); + break; + case 3: + generatePassword(scanner); + break; + case 4: + changeMasterPassword(scanner); + break; + case 5: + System.out.println("Goodbye!"); + System.exit(0); + default: + System.out.println("Invalid choice. Please try again."); + } + } + } + + // Implement methods for adding, viewing, generating, and managing password entries + + private static void displayMenu() { + System.out.println("\nPassword Manager"); + System.out.println("1. Add a new password entry"); + System.out.println("2. View password entries"); + System.out.println("3. Generate a new password"); + System.out.println("4. Change master password"); + System.out.println("5. Exit"); + System.out.print("Enter your choice: "); + } +} diff --git a/PasswordUtil.java b/PasswordUtil.java new file mode 100644 index 00000000..982ecbf2 --- /dev/null +++ b/PasswordUtil.java @@ -0,0 +1,63 @@ +import java.util.Random; + +public class PasswordUtil { + + public static boolean validate(String password) { +// return password.matches("((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%]).{8,20})"); + return validate2(password); + } + + public static boolean hasSymbol(String password) { + return password.matches(".*[@#$%].*"); + } + + public static boolean hasUppercase(String password) { + return password.matches(".*[A-Z].*"); + } + + public static boolean hasLowerCase(String password) { + return password.matches(".*[a-z].*"); + } + + public static boolean hasDigit(String password) { + return password.matches(".*\\d.*"); + } + + public static boolean validate2(String pass) { + boolean flag = true; + + if (pass.length() < 8) { + //Password must have more than 8 chars + flag = false; + } else if (!hasDigit(pass)) { + //Password must contains digit + flag = false; + } else if (!hasSymbol(pass)) { + //Password must contains symbol + flag = false; + } else if (!hasUppercase(pass)) { + //Password must contains Upper case + flag = false; + } else if (!hasLowerCase(pass)) { + //Password must contains Lower case + flag = false; + } + + return flag; + } + + public static String generatePassword(int len) { + Random rnd = new Random(); + String AB = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@#$%&"; + StringBuilder sb = new StringBuilder(len); + for (int i = 0; i < len; i++) { + sb.append(AB.charAt(rnd.nextInt(AB.length()))); + } + if(validate2(sb.toString())){ + return sb.toString(); + }else{ + return generatePassword(12); + } + } + +} diff --git a/Password_Generator/Password Generator/bin/Alphabet.class b/Password_Generator/Password Generator/bin/Alphabet.class new file mode 100644 index 00000000..fcb556c9 Binary files /dev/null and b/Password_Generator/Password Generator/bin/Alphabet.class differ diff --git a/Password_Generator/Password Generator/bin/Generator.class b/Password_Generator/Password Generator/bin/Generator.class new file mode 100644 index 00000000..94329a88 Binary files /dev/null and b/Password_Generator/Password Generator/bin/Generator.class differ diff --git a/Password_Generator/Password Generator/bin/GeneratorTest.class b/Password_Generator/Password Generator/bin/GeneratorTest.class new file mode 100644 index 00000000..76bde683 Binary files /dev/null and b/Password_Generator/Password Generator/bin/GeneratorTest.class differ diff --git a/Password_Generator/Password Generator/bin/Password.class b/Password_Generator/Password Generator/bin/Password.class new file mode 100644 index 00000000..7b4b2439 Binary files /dev/null and b/Password_Generator/Password Generator/bin/Password.class differ diff --git a/Password_Generator/Password Generator/src/Alphabet.java b/Password_Generator/Password Generator/src/Alphabet.java new file mode 100644 index 00000000..ac7800c5 --- /dev/null +++ b/Password_Generator/Password Generator/src/Alphabet.java @@ -0,0 +1,31 @@ + + + +public class Alphabet { + + public static final String UPPERCASE_LETTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + public static final String LOWERCASE_LETTERS = "abcdefghijklmnopqrstuvwxyz"; + public static final String NUMBERS = "1234567890"; + public static final String SYMBOLS = "!@#$%^&*()-_=+\\/~?"; + + private final StringBuilder pool; + + + public Alphabet(boolean uppercaseIncluded, boolean lowercaseIncluded, boolean numbersIncluded, boolean specialCharactersIncluded) { + + pool = new StringBuilder(); + + if (uppercaseIncluded) pool.append(UPPERCASE_LETTERS); + + if (lowercaseIncluded) pool.append(LOWERCASE_LETTERS); + + if (numbersIncluded) pool.append(NUMBERS); + + if (specialCharactersIncluded) pool.append(SYMBOLS); + + } + + public String getAlphabet() { + return pool.toString(); + } +} diff --git a/Password_Generator/Password Generator/src/Generator.java b/Password_Generator/Password Generator/src/Generator.java new file mode 100644 index 00000000..12066290 --- /dev/null +++ b/Password_Generator/Password Generator/src/Generator.java @@ -0,0 +1,172 @@ +import java.util.Objects; +import java.util.Scanner; + +public class Generator { + Alphabet alphabet; + public static Scanner keyboard; + + public Generator(Scanner scanner) { + keyboard = scanner; + } + + public Generator(boolean IncludeUpper, boolean IncludeLower, boolean IncludeNum, boolean IncludeSym) { + alphabet = new Alphabet(IncludeUpper, IncludeLower, IncludeNum, IncludeSym); + } + + public void mainLoop() { + System.out.println("Welcome to Ziz Password Services :)"); + printMenu(); + + String userOption = "-1"; + + while (!userOption.equals("4")) { + + userOption = keyboard.next(); + + switch (userOption) { + case "1" -> { + requestPassword(); + printMenu(); + } + case "2" -> { + checkPassword(); + printMenu(); + } + case "3" -> { + printUsefulInfo(); + printMenu(); + } + case "4" -> printQuitMessage(); + default -> { + System.out.println(); + System.out.println("Kindly select one of the available commands"); + printMenu(); + } + } + } + } + + private Password GeneratePassword(int length) { + final StringBuilder pass = new StringBuilder(""); + + final int alphabetLength = alphabet.getAlphabet().length(); + + int max = alphabetLength - 1; + int min = 0; + int range = max - min + 1; + + for (int i = 0; i < length; i++) { + int index = (int) (Math.random() * range) + min; + pass.append(alphabet.getAlphabet().charAt(index)); + } + + return new Password(pass.toString()); + } + + private void printUsefulInfo() { + System.out.println(); + System.out.println("Use a minimum password length of 8 or more characters if permitted"); + System.out.println("Include lowercase and uppercase alphabetic characters, numbers and symbols if permitted"); + System.out.println("Generate passwords randomly where feasible"); + System.out.println("Avoid using the same password twice (e.g., across multiple user accounts and/or software systems)"); + System.out.println("Avoid character repetition, keyboard patterns, dictionary words, letter or number sequences," + + "\nusernames, relative or pet names, romantic links (current or past) " + + "and biographical information (e.g., ID numbers, ancestors' names or dates)."); + System.out.println("Avoid using information that the user's colleagues and/or " + + "acquaintances might know to be associated with the user"); + System.out.println("Do not use passwords which consist wholly of any simple combination of the aforementioned weak components"); + } + + private void requestPassword() { + boolean IncludeUpper = false; + boolean IncludeLower = false; + boolean IncludeNum = false; + boolean IncludeSym = false; + + boolean correctParams = false; + + System.out.println(); + System.out.println("Hello, welcome to the Password Generator :) answer" + + " the following questions by Yes or No \n"); + + do { + System.out.println("Do you want Lowercase letters \"abcd...\" to be used? "); + String input = keyboard.nextLine(); + + if (isInclude(input)) IncludeLower = true; + + System.out.println("Do you want Uppercase letters \"ABCD...\" to be used? "); + input = keyboard.nextLine(); + + if (isInclude(input)) IncludeUpper = true; + + System.out.println("Do you want Numbers \"1234...\" to be used? "); + input = keyboard.nextLine(); + + if (isInclude(input)) IncludeNum = true; + + System.out.println("Do you want Symbols \"!@#$...\" to be used? "); + input = keyboard.nextLine(); + + if (isInclude(input)) IncludeSym = true; + + //No Pool Selected + if (!IncludeUpper && !IncludeLower && !IncludeNum && !IncludeSym) { + System.out.println("You have selected no characters to generate your " + + "password at least one of your answers should be Yes"); + correctParams = true; + } + + System.out.println("Great! Now enter the length of the password"); + int length = keyboard.nextInt(); + + final Generator generator = new Generator(IncludeUpper, IncludeLower, IncludeNum, IncludeSym); + final Password password = generator.GeneratePassword(length); + + System.err.println("Your generated password -> " + password); + + } while (correctParams); + } + + private boolean isInclude(String Input) { + if (Input.equalsIgnoreCase("yes")) { + return true; + } else { + if (!Input.equalsIgnoreCase("no")) { + PasswordRequestError(); + } + return false; + } + } + + private void PasswordRequestError() { + System.out.println("You have entered something incorrect let's go over it again \n"); + } + + private void checkPassword() { + String input; + final Scanner in = new Scanner(System.in); + + System.out.print("\nEnter your password:"); + input = in.nextLine(); + + final Password p = new Password(input); + + System.out.println(p.calculateScore()); + + in.close(); + } + + private void printMenu() { + System.out.println(); + System.out.println("Enter 1 - Password Generator"); + System.out.println("Enter 2 - Password Strength Check"); + System.out.println("Enter 3 - Useful Information"); + System.out.println("Enter 4 - Quit"); + System.out.print("Choice:"); + } + + private void printQuitMessage() { + System.out.println("Closing the program bye bye!"); + } +} diff --git a/Password_Generator/Password Generator/src/GeneratorTest.java b/Password_Generator/Password Generator/src/GeneratorTest.java new file mode 100644 index 00000000..1d54e72e --- /dev/null +++ b/Password_Generator/Password Generator/src/GeneratorTest.java @@ -0,0 +1,38 @@ +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +class GeneratorTest { + + private final Password password= new Password("Secret"); + private final Alphabet firstAlphabet = new Alphabet(true,false,false,false); + private final Alphabet secondAlphabet = new Alphabet(false,true,true,true); + private final Generator generator = new Generator(true,false,false,false); +// private final Password generatedPassword = generator.GeneratePassword(4); + + @Test + void test1() { + assertEquals("Secret", password.toString()); + } + + @Test + void test2() { + assertEquals(firstAlphabet.getAlphabet(), Alphabet.UPPERCASE_LETTERS); + } + + @Test + void test3() { + assertEquals(secondAlphabet.getAlphabet(), Alphabet.LOWERCASE_LETTERS + Alphabet.NUMBERS + Alphabet.SYMBOLS); + } + + @Test + void test4() { + assertEquals(generator.alphabet.getAlphabet(), Alphabet.UPPERCASE_LETTERS); + } + + @Test + void test5() { + assertEquals(generator.alphabet.getAlphabet().length(), 26); + } + +} diff --git a/Password_Generator/Password Generator/src/Main.java b/Password_Generator/Password Generator/src/Main.java new file mode 100644 index 00000000..5f6fbc70 --- /dev/null +++ b/Password_Generator/Password Generator/src/Main.java @@ -0,0 +1,12 @@ +import java.util.Scanner; + +public class Main { + + public static final Scanner keyboard = new Scanner(System.in); + + public static void main(String[] args) { + Generator generator = new Generator(keyboard); + generator.mainLoop(); + keyboard.close(); + } +} diff --git a/Password_Generator/Password Generator/src/Password.java b/Password_Generator/Password Generator/src/Password.java new file mode 100644 index 00000000..201b6474 --- /dev/null +++ b/Password_Generator/Password Generator/src/Password.java @@ -0,0 +1,84 @@ + +public class Password { + String Value; + int Length; + + public Password(String s) { + Value = s; + Length = s.length(); + } + + public int CharType(char C) { + int val; + + // Char is Uppercase Letter + if ((int) C >= 65 && (int) C <= 90) + val = 1; + + // Char is Lowercase Letter + else if ((int) C >= 97 && (int) C <= 122) { + val = 2; + } + + // Char is Digit + else if ((int) C >= 60 && (int) C <= 71) { + val = 3; + } + + // Char is Symbol + else { + val = 4; + } + + return val; + } + + public int PasswordStrength() { + String s = this.Value; + boolean UsedUpper = false; + boolean UsedLower = false; + boolean UsedNum = false; + boolean UsedSym = false; + int type; + int Score = 0; + + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + type = CharType(c); + + if (type == 1) UsedUpper = true; + if (type == 2) UsedLower = true; + if (type == 3) UsedNum = true; + if (type == 4) UsedSym = true; + } + + if (UsedUpper) Score += 1; + if (UsedLower) Score += 1; + if (UsedNum) Score += 1; + if (UsedSym) Score += 1; + + if (s.length() >= 8) Score += 1; + if (s.length() >= 16) Score += 1; + + return Score; + } + + public String calculateScore() { + int Score = this.PasswordStrength(); + + if (Score == 6) { + return "This is a very good password :D check the Useful Information section to make sure it satisfies the guidelines"; + } else if (Score >= 4) { + return "This is a good password :) but you can still do better"; + } else if (Score >= 3) { + return "This is a medium password :/ try making it better"; + } else { + return "This is a weak password :( definitely find a new one"; + } + } + + @Override + public String toString() { + return Value; + } +} diff --git a/Password_Generator/Password-Generator.iml b/Password_Generator/Password-Generator.iml new file mode 100644 index 00000000..7be62446 --- /dev/null +++ b/Password_Generator/Password-Generator.iml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/Password Generator/src" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module-library"> + <library name="JUnit5.8.1"> + <CLASSES> + <root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter/5.8.1/junit-jupiter-5.8.1.jar!/" /> + <root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar!/" /> + <root url="jar://$MAVEN_REPOSITORY$/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar!/" /> + <root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar!/" /> + <root url="jar://$MAVEN_REPOSITORY$/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar!/" /> + <root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar!/" /> + <root url="jar://$MAVEN_REPOSITORY$/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar!/" /> + <root url="jar://$MAVEN_REPOSITORY$/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> \ No newline at end of file diff --git a/Password_Generator/README.md b/Password_Generator/README.md new file mode 100644 index 00000000..7422e43f --- /dev/null +++ b/Password_Generator/README.md @@ -0,0 +1,29 @@ +# Password-Generator +This project is a Java Console Application to generate Random passwords and performing a password strength check. + +I decided to build this project during the Winter Break of my second year after taking the Object-Oriented Effective Java Programming course, I wanted to build something interesting with Java to practice and see what I could do on my own. However, I still wasn't sure what I wanted to do. Then one night, I was explaining to my father the importance of having a strong password for his social media accounts I got the idea of doing a random password generator, a week later it was done. While working on it I decided to include a password strength checker feature that checks for the overall strength of the entered password and I was pretty happy with how it came out but I realised that it was not very straightforward to use for someone who does not know how it is supposed to work so I decided to create a GUI for the application for the next step it is available in the Password-Services repository + +Functionalities: + +1- Generating a Password: +* The user must answer by Yes or No the questions to know if he desires to use Uppercase/Lowercase letters, Numbers or Symbols +* The user then enters the desired length of the password +* A password alphabet is generated according to the Yes/No answers it is a String that contains the choices of the user +* Depending on the length random characters from the password alphabet are selected and put back to back to form a totally random string according to the user's needs +* The randomly generated password is then displayed on the console + +2- Checking a Password's Strength: + +The Strength check is based on the following criteria: +* The password uses Uppercase Letters +* The password uses Lowercase Letters +* The password uses Numbers +* The password uses Symbols +* The length of the password is 8 or more (8 is often the minimum required length for a decent password) +* The length of the password is 16 or more (16 is considered to be the minimum length for good password) + +These are used to calculate a score for the password used to know what message to display to the user weak/medium/good/great password + +3- Displaying Useful Information: + +This is a minor feature that displays on the console so information for the user about password security (Avoid using the same password twice/ Avoid character repetition, keyboard patterns, dictionary words, letter or number sequences, etc.) diff --git a/Password_Generator/out/production/Password-Generator/Alphabet.class b/Password_Generator/out/production/Password-Generator/Alphabet.class new file mode 100644 index 00000000..fb9e89d1 Binary files /dev/null and b/Password_Generator/out/production/Password-Generator/Alphabet.class differ diff --git a/Password_Generator/out/production/Password-Generator/Generator.class b/Password_Generator/out/production/Password-Generator/Generator.class new file mode 100644 index 00000000..24f3df34 Binary files /dev/null and b/Password_Generator/out/production/Password-Generator/Generator.class differ diff --git a/Password_Generator/out/production/Password-Generator/GeneratorTest.class b/Password_Generator/out/production/Password-Generator/GeneratorTest.class new file mode 100644 index 00000000..fb32d6d8 Binary files /dev/null and b/Password_Generator/out/production/Password-Generator/GeneratorTest.class differ diff --git a/Password_Generator/out/production/Password-Generator/Main.class b/Password_Generator/out/production/Password-Generator/Main.class new file mode 100644 index 00000000..8a5ef950 Binary files /dev/null and b/Password_Generator/out/production/Password-Generator/Main.class differ diff --git a/Password_Generator/out/production/Password-Generator/Password.class b/Password_Generator/out/production/Password-Generator/Password.class new file mode 100644 index 00000000..fae24007 Binary files /dev/null and b/Password_Generator/out/production/Password-Generator/Password.class differ diff --git a/Patience_game/PatienceGame.java b/Patience_game/PatienceGame.java new file mode 100644 index 00000000..d70533bf --- /dev/null +++ b/Patience_game/PatienceGame.java @@ -0,0 +1,300 @@ +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Scanner; +import java.util.Stack; + +public class PatienceGame { + + private static final int NUM_LANES = 7; + private static final int NUM_SUITS = 4; + private static final int NUM_CARDS_PER_SUIT = 13; + + private Stack<Card> drawPile = new Stack<>(); + private List<Stack<Card>> lanes = new ArrayList<>(NUM_LANES); + private List<Stack<Card>> suitPiles = new ArrayList<>(NUM_SUITS); + private Stack<Card> uncoveredPile = new Stack<>(); + private int score = 0; + private int moves = 0; + + public PatienceGame() { + initializeGame(); + } + + // Add this method to the PatienceGame class + private void moveUncoveredCardToSuit(char suitLabel) { + int suitIndex = getLabelIndex(suitLabel); + if (suitIndex >= NUM_LANES && suitIndex < NUM_LANES + NUM_SUITS) { + if (uncoveredPile.isEmpty()) { + System.out.println("Uncovered pile is empty."); + } else { + Card card = uncoveredPile.peek(); + if (suitPiles.get(suitIndex - NUM_LANES).isEmpty()) { + if (card.getValue() == 1) { + suitPiles.get(suitIndex - NUM_LANES).push(uncoveredPile.pop()); + calculateScore(card, 'P', suitLabel); + moves++; + } else { + System.out.println("Invalid move. Only Aces can start a new pile."); + } + } else { + Card topCard = suitPiles.get(suitIndex - NUM_LANES).peek(); + if ( + topCard.isOneValueHigher(card) && + topCard.getSuit() == card.getSuit() + ) { + suitPiles.get(suitIndex - NUM_LANES).push(uncoveredPile.pop()); + calculateScore(card, 'P', suitLabel); + moves++; + } else { + System.out.println("Invalid move. Check the destination pile."); + } + } + } + } else { + System.out.println("Invalid command. Cannot move to a lane."); + } + } + + private void initializeGame() { + // Create and shuffle a deck of cards + List<Card> deck = new ArrayList<>(); + for (int suit = 0; suit < NUM_SUITS; suit++) { + for (int value = 1; value <= NUM_CARDS_PER_SUIT; value++) { + deck.add(new Card(suit, value)); + } + } + Collections.shuffle(deck); + + // Initialize the draw pile with the shuffled deck + drawPile.addAll(deck); + + // Initialize lanes and suit piles + for (int i = 0; i < NUM_LANES; i++) { + lanes.add(new Stack<>()); + } + for (int i = 0; i < NUM_SUITS; i++) { + suitPiles.add(new Stack<>()); + } + } + + public void playGame() { + Scanner scanner = new Scanner(System.in); + while (true) { + displayGameState(); + System.out.print("Enter a command (Q, D, or move): "); + String command = scanner.nextLine().toUpperCase(); + + if (command.equals("Q")) { + System.out.println("Game Over. Final Score: " + score); + break; + } else if (command.equals("D")) { + drawCard(); + } else if (command.length() == 2) { + moveCard(command); + } else if (command.length() == 3) { + moveMultipleCards(command); + } else { + System.out.println("Invalid command. Please try again."); + } + + if (isGameOver()) { + System.out.println("Congratulations! You won the game!"); + break; + } + } + scanner.close(); + } + + private void displayGameState() { + + String[] ranks = {"2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K", "A"}; + String[] suits = {"H", "D", "S", "C"}; + + for (String suit : suits) { + for (String rank : ranks) { + String card = rank + suit; + System.out.print(card + " "); + } + System.out.println(); // Start a new line for the next suit + } + + System.out.println("Score: " + score); + System.out.println("Moves: " + moves); + System.out.println("Draw Pile: " + drawPile.size() + " cards"); + System.out.println("Uncovered Pile: " + uncoveredPile.size() + " cards"); + for (int i = 0; i < NUM_LANES; i++) { + System.out.println( + "Lane " + (i + 1) + ": " + lanes.get(i).size() + " cards" + ); + } + for (int i = 0; i < NUM_SUITS; i++) { + System.out.println( + "Suit " + + Card.SUIT_LABELS[i] + + ": " + + suitPiles.get(i).size() + + " cards" + ); + } + } + + private void drawCard() { + if (!drawPile.isEmpty()) { + Card card = drawPile.pop(); + uncoveredPile.push(card); + moves++; + } else { + System.out.println("Draw pile is empty. Cannot draw a card."); + } + } + + private void moveCard(String command) { + char fromLabel = command.charAt(0); + char toLabel = command.charAt(1); + int fromIndex = getLabelIndex(fromLabel); + int toIndex = getLabelIndex(toLabel); + + if (fromIndex != -1 && toIndex != -1) { + if (fromLabel == 'P') { + moveUncoveredCardToSuit(toLabel); + } else if (fromLabel >= '1' && fromLabel <= '7') { + Card card = lanes.get(fromIndex).peek(); + if (canMoveCard(card, toIndex)) { + lanes.get(toIndex).push(lanes.get(fromIndex).pop()); + calculateScore(card, fromLabel, toLabel); + moves++; + } else { + System.out.println("Invalid move. Check the destination pile."); + } + } + } else { + System.out.println("Invalid labels."); + } + } + + private void moveMultipleCards(String command) { + char fromLabel = command.charAt(0); + char toLabel = command.charAt(1); + int number = Character.getNumericValue(command.charAt(2)); + int fromIndex = getLabelIndex(fromLabel); + int toIndex = getLabelIndex(toLabel); + + if (fromIndex != -1 && toIndex != -1) { + if (lanes.get(fromIndex).size() >= number) { + List<Card> cardsToMove = new ArrayList<>(); + for (int i = 0; i < number; i++) { + cardsToMove.add( + lanes.get(fromIndex).get(lanes.get(fromIndex).size() - 1 - i) + ); + } + if (canMoveCards(cardsToMove, toIndex)) { + for (Card card : cardsToMove) { + lanes.get(toIndex).push(lanes.get(fromIndex).pop()); + calculateScore(card, fromLabel, toLabel); + } + moves++; + } else { + System.out.println("Invalid move. Check the destination pile."); + } + } else { + System.out.println("Not enough cards in the source lane."); + } + } else { + System.out.println("Invalid labels."); + } + } + + private int getLabelIndex(char label) { + if (label == 'P') { + return NUM_LANES; + } else if (label >= '1' && label <= '7') { + return Character.getNumericValue(label) - 1; + } else if (label >= 'D' && label <= 'S') { + return NUM_LANES + label - 'D'; + } + return -1; + } + + private boolean canMoveCard(Card card, int toIndex) { + if (lanes.get(toIndex).isEmpty()) { + return card.getValue() == 13; // Only Kings can start a new pile + } else { + Card topCard = lanes.get(toIndex).peek(); + return topCard.isOneValueHigher(card) && topCard.isOppositeColor(card); + } + } + + private boolean canMoveCards(List<Card> cards, int toIndex) { + if (lanes.get(toIndex).isEmpty()) { + return cards.get(0).getValue() == 13; // Only Kings can start a new pile + } else { + Card topCard = lanes.get(toIndex).peek(); + return ( + topCard.isOneValueHigher(cards.get(cards.size() - 1)) && + topCard.isOppositeColor(cards.get(cards.size() - 1)) + ); + } + } + + private void calculateScore(Card card, char fromLabel, char toLabel) { + if (fromLabel == 'P' && (toLabel >= 'D' && toLabel <= 'S')) { + score += 10; // From uncovered pile to suit + } else if ( + fromLabel >= '1' && fromLabel <= '7' && (toLabel >= 'D' && toLabel <= 'S') + ) { + score += 20; // From lane to suit + } else if ( + (fromLabel >= '1' && fromLabel <= '7') && + (toLabel >= '1' && toLabel <= '7') + ) { + score += 5; // Between lanes + } + } + + private boolean isGameOver() { + for (Stack<Card> suitPile : suitPiles) { + if (suitPile.size() < NUM_CARDS_PER_SUIT) { + return false; + } + } + return true; + } + + public static void main(String[] args) { + PatienceGame game = new PatienceGame(); + game.playGame(); + } +} + +class Card { + public static final String[] SUIT_LABELS = {"D", "H", "C", "S"}; + private int suit; + private int value; + + public Card(int suit, int value) { + this.suit = suit; + this.value = value; + } + + public int getSuit() { + return suit; + } + + public int getValue() { + return value; + } + + public char getLabel() { + return SUIT_LABELS[suit].charAt(0); + } + + public boolean isOneValueHigher(Card other) { + return this.value - other.value == 1; + } + +public boolean isOppositeColor(Card other) { + return (this.suit < 2 && other.suit >= 2) || (this.suit >= 2 && other.suit < 2); +} + +} \ No newline at end of file diff --git a/Pirate_Adventure_Game/src/entities/Crabby.java b/Pirate_Adventure_Game/src/entities/Crabby.java new file mode 100644 index 00000000..c7b83b2b --- /dev/null +++ b/Pirate_Adventure_Game/src/entities/Crabby.java @@ -0,0 +1,76 @@ +package entities; + +import main.Game; + +import java.awt.*; +import java.awt.geom.Rectangle2D; + +import static utils.Constants.EnemyConstants.*; +import static utils.Constants.Directions.*; + +public class Crabby extends Enemy { + private Rectangle2D.Float attackBox; + private int attackBoxOffsetX; + + public Crabby(float x, float y) { + super(x, y, CRABBY_WIDTH, CRABBY_HEIGHT, CRABBY); + initHitbox(x, y, (int) (22 * Game.SCALE), (int) (27 * Game.SCALE)); + initAttackBox(); + } + + private void initAttackBox() { + attackBox = new Rectangle2D.Float(x, y, (int) (70 * Game.SCALE), (int) (25 * Game.SCALE)); + attackBoxOffsetX = (int) (Game.SCALE); + } + + public void update(int[][] levelData, Player player) { + updateMove(levelData, player); + updateAnimationMovement(); + updateAttackBox(); + } + + private void updateAttackBox() { + attackBox.x = hitbox.x - attackBoxOffsetX; + attackBox.y = hitbox.y; + } + + private void updateMove(int[][] levelData, Player player) { + if (firstUpdate) + firstUpdateCheck(levelData); + if (inAir) { + updateInAir(levelData); + } else { + switch (enemyState) { + case IDLE: + newState(RUNNING); + break; + case RUNNING: + if (canSeePlayer(levelData, player)) + turnTowardsPlayer(player); + if (isPlayerCloseToAttack(player)) + newState(ATTACK); + move(levelData); + break; + } + } + } + + public void drawAttackBox(Graphics graphics, int xLevelOffset) { + graphics.setColor(Color.red); + graphics.drawRect((int) (attackBox.x - xLevelOffset), (int) attackBox.y, (int) attackBox.width, (int) attackBox.height); + } + + public int flipX() { + if (walkDir == RIGHT) + return width; + else + return 0; + } + + public int flipW() { + if (walkDir == RIGHT) + return -1; + else + return 1; + } +} \ No newline at end of file diff --git a/Pirate_Adventure_Game/src/entities/Enemy.java b/Pirate_Adventure_Game/src/entities/Enemy.java new file mode 100644 index 00000000..26a11c7d --- /dev/null +++ b/Pirate_Adventure_Game/src/entities/Enemy.java @@ -0,0 +1,162 @@ +package entities; + +import main.Game; + +import java.awt.*; + +import static utils.Constants.EnemyConstants.*; +import static utils.HelpMethods.*; +import static utils.Constants.Directions.*; + + +public abstract class Enemy extends Entity { + protected int animationIndex, enemyState, enemyType; + protected int animationMovement, animationSpeed = 25; + protected boolean firstUpdate = true; + protected boolean inAir = false; + protected float fallSpeed; + protected float gravity = 0.04f * Game.SCALE; + protected float walkSpeed = 0.35f * Game.SCALE; + protected int walkDir = LEFT; + protected int tileY; + protected float attackDistance = Game.TILES_SIZE; + + public Enemy(float x, float y, int width, int height, int enemyType) { + super(x, y, width, height); + this.enemyType = enemyType; + initHitbox(x, y, width, height); + } + + protected void firstUpdateCheck(int[][] levelData) { + if (!isEntityOnFloor(hitbox, levelData)) + inAir = true; + firstUpdate = false; + } + + protected void updateInAir(int[][] levelData) { + if (canMoveHere(hitbox.x, hitbox.y + fallSpeed, hitbox.width, hitbox.height, levelData)) { + hitbox.y += fallSpeed; + fallSpeed += gravity; + } else { + inAir = false; + hitbox.y = getEntityYPosUnderRoofOrAboveFloor(hitbox, fallSpeed); + tileY = (int) (hitbox.y / Game.TILES_SIZE); + } + } + + protected void move(int[][] levelData) { + float xSpeed = 0; + if (walkDir == LEFT) + xSpeed = -walkSpeed; + else + xSpeed = walkSpeed; + if (canMoveHere(hitbox.x + xSpeed, hitbox.y, hitbox.width, hitbox.height, levelData)) + if (isFloor(hitbox, xSpeed, levelData)) { + hitbox.x += xSpeed; + return; + } + changeWalkDir(); + } + + protected void turnTowardsPlayer(Player player) { + if (player.hitbox.x > hitbox.x) + walkDir = RIGHT; + else + walkDir = LEFT; + } + + protected boolean canSeePlayer(int[][] levelData, Player player) { + int playerTileY = (int) (player.getHitbox().y / Game.TILES_SIZE); + if (playerTileY == tileY) + if (isPlayerInRange(player)) { + if (isSightClear(levelData, hitbox, player.hitbox, tileY)) + return true; + } + return false; + } + + protected boolean isPlayerInRange(Player player) { + int absValue = (int) Math.abs(player.hitbox.x - hitbox.x); + return absValue <= attackDistance * 5; + } + + protected boolean isPlayerCloseToAttack(Player player) { + int absValue = (int) Math.abs(player.hitbox.x - hitbox.x); + return absValue <= attackDistance; + } + + protected void newState(int enemyState) { + this.enemyState = enemyState; + animationMovement = 0; + animationIndex = 0; + } + + protected void updateAnimationMovement() { + animationMovement++; + if (animationMovement >= animationSpeed) { + animationMovement = 0; + animationIndex++; + if (animationIndex >= getPositionsAmount(enemyType, enemyState)) { + animationIndex = 0; + if (enemyState == ATTACK) + enemyState = IDLE; + } + } + } + + public void update(int[][] levelData) { + updateMove(levelData); + updateAnimationMovement(); + } + + private void updateMove(int[][] levelData) { + if (firstUpdate) { + if (!isEntityOnFloor(hitbox, levelData)) + inAir = true; + firstUpdate = false; + } + if (inAir) { + if (canMoveHere(hitbox.x, hitbox.y + fallSpeed, hitbox.width, hitbox.height, levelData)) { + hitbox.y += fallSpeed; + fallSpeed += gravity; + } else { + inAir = false; + hitbox.y = getEntityYPosUnderRoofOrAboveFloor(hitbox, fallSpeed); + } + } else { + switch (enemyState) { + case IDLE: + enemyState = RUNNING; + break; + case RUNNING: + float xSpeed = 0; + if (walkDir == LEFT) + xSpeed = -walkSpeed; + else + xSpeed = walkSpeed; + if (canMoveHere(hitbox.x + xSpeed, hitbox.y, hitbox.width, hitbox.height, levelData)) + if (isFloor(hitbox, xSpeed, levelData)) { + hitbox.x += xSpeed; + return; + } + changeWalkDir(); + break; + } + } + } + + protected void changeWalkDir() { + if (walkDir == LEFT) + walkDir = RIGHT; + else + walkDir = LEFT; + } + + public int getAnimationIndex() { + return animationIndex; + } + + public int getEnemyState() { + return enemyState; + } +} \ No newline at end of file diff --git a/Pirate_Adventure_Game/src/entities/EnemyManager.java b/Pirate_Adventure_Game/src/entities/EnemyManager.java new file mode 100644 index 00000000..fb9c220c --- /dev/null +++ b/Pirate_Adventure_Game/src/entities/EnemyManager.java @@ -0,0 +1,54 @@ +package entities; + +import gamestates.Playing; +import utils.LoadSave; + +import java.awt.*; +import java.awt.image.BufferedImage; +import java.util.ArrayList; + +import static utils.Constants.EnemyConstants.*; + +public class EnemyManager { + private Playing playing; + private BufferedImage[][] crabbyArr; + private ArrayList<Crabby> crabbies = new ArrayList<Crabby>(); + + public EnemyManager(Playing playing) { + this.playing = playing; + loadEnemyImgs(); + addEnemies(); + } + + private void addEnemies() { + crabbies = LoadSave.getCrabs(); + System.out.println("size of crabs: " + crabbies.size()); + } + + private void loadEnemyImgs() { + crabbyArr = new BufferedImage[5][9]; + BufferedImage temp = LoadSave.getPositionsAtlas(LoadSave.CRABBY_ATLAS); + for (int i = 0; i < crabbyArr.length; i++) + for (int j = 0; j < crabbyArr[i].length; j++) + crabbyArr[i][j] = temp.getSubimage(j * CRABBY_WIDTH_DEFAULT, i * CRABBY_HEIGHT_DEFAULT, CRABBY_WIDTH_DEFAULT, CRABBY_HEIGHT_DEFAULT); + } + + public void update(int[][] levelData, Player player) { + for (Crabby c : crabbies) + c.update(levelData, player); + } + + public void draw(Graphics graphics, int xLevelOffset) { + drawCrabs(graphics, xLevelOffset); + } + + private void drawCrabs(Graphics graphics, int xLevelOffset) { + for (Crabby c : crabbies) { + graphics.drawImage(crabbyArr[c.getEnemyState()][c.getAnimationIndex()], + (int) c.getHitbox().x - xLevelOffset + c.flipX(), + (int) c.getHitbox().y, CRABBY_WIDTH * c.flipW(), CRABBY_HEIGHT, null); + c.drawAttackBox(graphics, xLevelOffset); + } + } + +} diff --git a/Pirate_Adventure_Game/src/entities/Entity.java b/Pirate_Adventure_Game/src/entities/Entity.java new file mode 100644 index 00000000..f716b69a --- /dev/null +++ b/Pirate_Adventure_Game/src/entities/Entity.java @@ -0,0 +1,32 @@ +package entities; + +import java.awt.*; +import java.awt.geom.Rectangle2D; + +public abstract class Entity { + protected float x, y; + protected int width, height; + + protected Rectangle2D.Float hitbox; + + public Entity(float x, float y, int width, int height) { + this.x = x; + this.y = y; + this.height = height; + this.width = width; + } + + protected void initHitbox(float x, float y, float width, float height) { + hitbox = new Rectangle2D.Float(x, y, width, height); + } + + + protected void drawHitbox(Graphics graphics, int xLevelOffset) { + graphics.setColor(Color.PINK); + graphics.drawRect((int) hitbox.x - xLevelOffset, (int) hitbox.y, (int) hitbox.width, (int) hitbox.height); + } + + public Rectangle2D.Float getHitbox() { + return hitbox; + } +} diff --git a/Pirate_Adventure_Game/src/entities/Player.java b/Pirate_Adventure_Game/src/entities/Player.java new file mode 100644 index 00000000..0bc82697 --- /dev/null +++ b/Pirate_Adventure_Game/src/entities/Player.java @@ -0,0 +1,277 @@ +package entities; + +import main.Game; +import utils.LoadSave; + +import java.awt.*; +import java.awt.geom.Rectangle2D; +import java.awt.image.BufferedImage; + +import static utils.Constants.PlayerConstants.*; + +import static utils.HelpMethods.*; +import static utils.HelpMethods.getEntityXPosNextToWall; + +public class Player extends Entity { + + private BufferedImage[][] pirateAnimation; + + private int animationMovement, animationIndex, animationSpeed = 25; + private int playerAction = STAYING; + private boolean moving = false, attacking = false; + private int[][] levelData; + private float playerSpeed = 1.0f * Game.SCALE; + private boolean left, right, up, down, jump; + private float xDrawOffset = 21 * Game.SCALE; + private float yDrawOffset = 4 * Game.SCALE; + private float airSpeed = 0f; + private float gravity = 0.04f * Game.SCALE; + private float jumpSpeed = -2.25f * Game.SCALE; + private float fallSpeedAfterCollision = 0.5f * Game.SCALE; + private boolean inAir = false; + + private BufferedImage statusBarImg; + + private int statusBarWidth = (int) (192 * Game.SCALE); + private int statusBarHeight = (int) (58 * Game.SCALE); + private int statusBarX = (int) (10 * Game.SCALE); + private int statusBarY = (int) (10 * Game.SCALE); + + + private int healthBarWidth = (int) (150 * Game.SCALE); + private int healthBarHeight = (int) (4 * Game.SCALE); + private int healthBarXStart = (int) (34 * Game.SCALE); + private int healthBarYStart = (int) (14 * Game.SCALE); + private int maxHealth = 100; + private int currentHealth = maxHealth; + private int healthWidth = healthBarWidth; + private Rectangle2D.Float attackBox; + private int flipX = 0; + private int flipW = 1; + + + public Player(float x, float y, int width, int height) { + super(x, y, width, height); + loadAnimations(); + initHitbox(x, y, (int) (20 * Game.SCALE), (int) (27 * Game.SCALE)); + initAttackBox(); + } + + private void initAttackBox() { + attackBox = new Rectangle2D.Float(x, y, (int) (20 * Game.SCALE), (int) (20 * Game.SCALE)); + } + + public boolean isLeft() { + return left; + } + + public void setLeft(boolean left) { + this.left = left; + } + + public boolean isRight() { + return right; + } + + public void setRight(boolean right) { + this.right = right; + } + + public void setAttacking(boolean attacking) { + this.attacking = attacking; + } + + public boolean isUp() { + return up; + } + + public void setUp(boolean up) { + this.up = up; + } + + public boolean isDown() { + return down; + } + + public void setDown(boolean down) { + this.down = down; + } + + public void setJump(boolean jump) { + this.jump = jump; + } + + public void resetDirectionBoolean() { + left = false; + right = false; + up = false; + down = false; + } + + public void update() { + updateHealthBar(); + updateAttackBox(); + updatePosition(); + updateAnimationMovement(); + setAnimation(); + } + + private void updateAttackBox() { + if (right) { + attackBox.x = hitbox.x + hitbox.width + (int) (Game.SCALE * 10); + } else if (left) { + attackBox.x = hitbox.x - hitbox.width - (int) (Game.SCALE * 10); + } + attackBox.y = hitbox.y + (Game.SCALE * 10); + } + + private void updateHealthBar() { + healthWidth = (int) ((currentHealth / (float) maxHealth) * healthBarWidth); + } + + public void render(Graphics graphics, int levelOffset) { + graphics.drawImage(pirateAnimation[playerAction][animationIndex], + (int) (hitbox.x - xDrawOffset) - levelOffset + flipX, + (int) (hitbox.y - yDrawOffset), + width * flipW, height, null); +// drawHitbox(graphics, levelOffset); + drawAttackBox(graphics, levelOffset); + + drawUI(graphics); + } + + private void drawAttackBox(Graphics graphics, int levelOffsetX) { + graphics.setColor(Color.red); + graphics.drawRect((int) attackBox.x - levelOffsetX, (int) attackBox.y, (int) attackBox.width, (int) attackBox.height); + } + + private void drawUI(Graphics graphics) { + graphics.drawImage(statusBarImg, statusBarX, statusBarY, statusBarWidth, statusBarHeight, null); + graphics.setColor(Color.red); + graphics.fillRect(healthBarXStart + statusBarX, healthBarYStart + statusBarY, healthWidth, healthBarHeight); + } + + private void loadAnimations() { + BufferedImage img = LoadSave.getPositionsAtlas(LoadSave.PLAYER_ATLAS); + + pirateAnimation = new BufferedImage[7][8]; + for (int i = 0; i < pirateAnimation.length; i++) + for (int j = 0; j < pirateAnimation[i].length; j++) { + pirateAnimation[i][j] = img.getSubimage(j * 64, i * 40, 64, 40); + } + statusBarImg = LoadSave.getPositionsAtlas(LoadSave.STATUS_BAR); + } + + public void loadLevelData(int[][] levelData) { + this.levelData = levelData; + if (!isEntityOnFloor(hitbox, levelData)) + inAir = true; + } + + private void updatePosition() { + moving = false; + if (jump) + jump(); + + if (!inAir) + if (!right && !left || (right && left)) + return; + + float xSpeed = 0; + + if (left) { + xSpeed -= playerSpeed; + flipX = width; + flipW = -1; + } + if (right) { + xSpeed += playerSpeed; + flipX = 0; + flipW = 1; + } + if (!inAir) { + if (!isEntityOnFloor(hitbox, levelData)) + inAir = true; + } + + if (inAir) { + if (canMoveHere(hitbox.x, hitbox.y + airSpeed, hitbox.width, hitbox.height, levelData)) { + hitbox.y += airSpeed; + airSpeed += gravity; + updateXPos(xSpeed); + } else { + hitbox.y = getEntityYPosUnderRoofOrAboveFloor(hitbox, airSpeed); + if (airSpeed > 0) + resetInAir(); + else + airSpeed = fallSpeedAfterCollision; + updateXPos(xSpeed); + } + } else + updateXPos(xSpeed); + moving = true; + } + + private void jump() { + if (inAir) + return; + inAir = true; + airSpeed = jumpSpeed; + } + + private void resetInAir() { + inAir = false; + airSpeed = 0; + } + + private void updateXPos(float xSpeed) { + if (canMoveHere(hitbox.x + xSpeed, hitbox.y, hitbox.width, hitbox.height, levelData)) { + hitbox.x += xSpeed; + } else { + hitbox.x = getEntityXPosNextToWall(hitbox, xSpeed); + } + } + + public void chaneHealth(int value) { + currentHealth += value; + if (currentHealth <= 0) + currentHealth = 0; + else if (currentHealth >= maxHealth) + currentHealth = maxHealth; + } + + private void setAnimation() { + int startAnimation = playerAction; + if (moving) + playerAction = RUNNING; + else + playerAction = STAYING; + if (inAir) { + if (airSpeed < 0) + playerAction = JUMP; + else + playerAction = FALLING; + } + if (attacking) + playerAction = ATTACK; + if (startAnimation != playerAction) + resetAnimationMovement(); + } + + private void resetAnimationMovement() { + animationMovement = 0; + animationIndex = 0; + } + + private void updateAnimationMovement() { + animationMovement++; + if (animationMovement >= animationSpeed) { + animationMovement = 0; + animationIndex++; + if (animationIndex >= getSpriteAmount(playerAction)) { + animationIndex = 0; + attacking = false; + } + } + } +} diff --git a/Pirate_Adventure_Game/src/gamestates/GameState.java b/Pirate_Adventure_Game/src/gamestates/GameState.java new file mode 100644 index 00000000..80181fee --- /dev/null +++ b/Pirate_Adventure_Game/src/gamestates/GameState.java @@ -0,0 +1,6 @@ +package gamestates; + +public enum GameState { + PLAYING, MENU, OPTIONS, QUIT; + public static GameState state = MENU; +} diff --git a/Pirate_Adventure_Game/src/gamestates/Menu.java b/Pirate_Adventure_Game/src/gamestates/Menu.java new file mode 100644 index 00000000..21fc4349 --- /dev/null +++ b/Pirate_Adventure_Game/src/gamestates/Menu.java @@ -0,0 +1,106 @@ +package gamestates; + +import main.Game; +import ui.MenuButton; +import utils.LoadSave; + +import java.awt.*; +import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; + +public class Menu extends State implements StateMethods { + private MenuButton[] buttons = new MenuButton[3]; + private BufferedImage backgroundImg, backgroundImgPink; + private int menuX, menuY, menuWidth, menuHeight; + + public Menu(Game game) { + super(game); + loadButtons(); + loadBackground(); + backgroundImgPink = LoadSave.getPositionsAtlas(LoadSave.MENU_BACKGROUND_IMG); + } + + private void loadBackground() { + backgroundImg = LoadSave.getPositionsAtlas(LoadSave.MENU_BOARD); + menuWidth = (int) (backgroundImg.getWidth() * Game.SCALE); + menuHeight = (int) (backgroundImg.getHeight() * Game.SCALE); + menuX = Game.GAME_WIDTH / 2 - menuWidth / 2; + menuY = (int) (45 * Game.SCALE); + + } + + private void loadButtons() { + buttons[0] = new MenuButton(Game.GAME_WIDTH / 2, (int) (150 * Game.SCALE), 0, GameState.PLAYING); + buttons[1] = new MenuButton(Game.GAME_WIDTH / 2, (int) (220 * Game.SCALE), 1, GameState.OPTIONS); + buttons[2] = new MenuButton(Game.GAME_WIDTH / 2, (int) (290 * Game.SCALE), 2, GameState.QUIT); + + } + + @Override + public void update() { + for (MenuButton mb : buttons) + mb.update(); + } + + @Override + public void draw(Graphics graphics) { + graphics.drawImage(backgroundImgPink, 0, 0, Game.GAME_WIDTH, Game.GAME_HEIGHT, null); + graphics.drawImage(backgroundImg, menuX, menuY, menuWidth, menuHeight, null); + for (MenuButton mb : buttons) + mb.draw(graphics); + } + + @Override + public void mouseClicked(MouseEvent e) { + + } + + @Override + public void mousePressed(MouseEvent e) { + for (MenuButton mb : buttons) + if (isIn(e, mb)) { + mb.setMousePressed(true); + break; + } + } + + @Override + public void mouseReleased(MouseEvent e) { + for (MenuButton mb : buttons) { + if (isIn(e, mb)) { + if (mb.isMousePressed()) + mb.applyGameState(); + break; + } + } + resetButtons(); + } + + private void resetButtons() { + for (MenuButton mb : buttons) + mb.resetBools(); + } + + @Override + public void mouseMoved(MouseEvent e) { + for (MenuButton mb : buttons) + mb.setMouseOver(false); + for (MenuButton mb : buttons) + if (isIn(e, mb)) { + mb.setMouseOver(true); + break; + } + } + + @Override + public void keyPressed(KeyEvent e) { + if (e.getKeyCode() == KeyEvent.VK_ENTER) + GameState.state = GameState.PLAYING; + } + + @Override + public void keyReleased(KeyEvent e) { + + } +} diff --git a/Pirate_Adventure_Game/src/gamestates/Playing.java b/Pirate_Adventure_Game/src/gamestates/Playing.java new file mode 100644 index 00000000..c0a89aa9 --- /dev/null +++ b/Pirate_Adventure_Game/src/gamestates/Playing.java @@ -0,0 +1,178 @@ +package gamestates; + +import entities.EnemyManager; +import entities.Player; +import levels.LevelManager; +import main.Game; +import ui.PauseOverlay; +import utils.LoadSave; + +import java.awt.*; +import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; +import java.util.Random; + +import static utils.Constants.Environment.*; + +public class Playing extends State implements StateMethods { + private Player player; + private LevelManager levelManager; + private EnemyManager enemyManager; + private PauseOverlay pauseOverlay; + private boolean paused = false; + private int xLevelOffset; + private int leftBorder = (int) (0.2 * Game.GAME_WIDTH); + private int rightBorder = (int) (0.8 * Game.GAME_WIDTH); + private int levelTilesWide = LoadSave.getLevelData()[0].length; + private int maxTilesOffset = levelTilesWide - Game.TILES_IN_WIDTH; + private int maxLevelOffsetX = maxTilesOffset * Game.TILES_SIZE; + private BufferedImage backgroundIMG, bigCloud, smallCloud; + private int[] smallCloudsPos; + private Random rnd = new Random(); + + + public Playing(Game game) { + super(game); + initClasses(); + backgroundIMG = LoadSave.getPositionsAtlas(LoadSave.PLAYING_BACKGROUND_IMG); + bigCloud = LoadSave.getPositionsAtlas(LoadSave.BIG_CLOUDS); + smallCloud = LoadSave.getPositionsAtlas(LoadSave.SMALL_CLOUDS); + smallCloudsPos = new int[8]; + for (int i = 0; i < smallCloudsPos.length; i++) + smallCloudsPos[i] = (int) (90 * Game.SCALE) + rnd.nextInt((int) (100 * Game.SCALE)); + + } + + private void initClasses() { + levelManager = new LevelManager(game); + enemyManager = new EnemyManager(this); + player = new Player(200, 200, (int) (64 * Game.SCALE), (int) (40 * Game.SCALE)); + player.loadLevelData(levelManager.getCurrentLevel().getLevelData()); + pauseOverlay = new PauseOverlay(this); + } + + @Override + public void update() { + if (!paused) { + levelManager.update(); + player.update(); + enemyManager.update(levelManager.getCurrentLevel().getLevelData(), player); + checkCloseToBorder(); + } else + pauseOverlay.update(); + } + + private void checkCloseToBorder() { + int playerX = (int) player.getHitbox().x; + int diff = playerX - xLevelOffset; + if (diff > rightBorder) + xLevelOffset += diff - rightBorder; + else if (diff < leftBorder) + xLevelOffset += diff - leftBorder; + + if (xLevelOffset > maxLevelOffsetX) + xLevelOffset = maxLevelOffsetX; + else if (xLevelOffset < 0) + xLevelOffset = 0; + } + + @Override + public void draw(Graphics graphics) { + graphics.drawImage(backgroundIMG, 0, 0, Game.GAME_WIDTH, Game.GAME_HEIGHT, null); + drawClouds(graphics); + levelManager.draw(graphics, xLevelOffset); + player.render(graphics, xLevelOffset); + enemyManager.draw(graphics, xLevelOffset); + if (paused) { + graphics.setColor(new Color(0, 0, 0, 150)); + graphics.fillRect(0, 0, Game.GAME_WIDTH, Game.GAME_HEIGHT); + pauseOverlay.draw(graphics); + } + } + + private void drawClouds(Graphics graphics) { + for (int i = 0; i < 3; i++) + graphics.drawImage(bigCloud, i * BIG_CLOUD_WIDTH - (int) (xLevelOffset * 0.3), (int) (204 * Game.SCALE), BIG_CLOUD_WIDTH, BIG_CLOUD_HEIGHT, null); + for (int i = 0; i < smallCloudsPos.length; i++) + graphics.drawImage(smallCloud, i * 4 * SMALL_CLOUD_WIDTH - -(int) (xLevelOffset * 0.7), smallCloudsPos[i], SMALL_CLOUD_WIDTH, SMALL_CLOUD_HEIGHT, null); + + } + + @Override + public void mouseClicked(MouseEvent e) { + if (e.getButton() == MouseEvent.BUTTON1) + player.setAttacking(true); + } + + @Override + public void mousePressed(MouseEvent e) { + if (paused) + pauseOverlay.mousePressed(e); + } + + @Override + public void mouseReleased(MouseEvent e) { + if (paused) + pauseOverlay.mouseReleased(e); + } + + @Override + public void mouseMoved(MouseEvent e) { + if (paused) + pauseOverlay.mouseMoved(e); + } + + public void mouseDragged(MouseEvent e) { + if (paused) + pauseOverlay.mouseDragged(e); + } + + @Override + public void keyPressed(KeyEvent e) { + switch (e.getKeyCode()) { + case KeyEvent.VK_A: + player.setLeft(true); + break; + case KeyEvent.VK_D: + player.setRight(true); + break; + case KeyEvent.VK_SPACE: + player.setJump(true); + break; + case KeyEvent.VK_ESCAPE: + paused = !paused; + break; + } + } + + @Override + public void keyReleased(KeyEvent e) { + switch (e.getKeyCode()) { + case KeyEvent.VK_A: + player.setLeft(false); + break; + case KeyEvent.VK_D: + player.setRight(false); + break; + case KeyEvent.VK_SPACE: + player.setJump(false); + break; + } + } + + public Player getPlayer() { + return player; + } + + public void windowFocusLost() { + player.resetDirectionBoolean(); + } + + public void unpauseGame() { + paused = false; + } + + public void resetAll() { + } +} diff --git a/Pirate_Adventure_Game/src/gamestates/State.java b/Pirate_Adventure_Game/src/gamestates/State.java new file mode 100644 index 00000000..4c028d55 --- /dev/null +++ b/Pirate_Adventure_Game/src/gamestates/State.java @@ -0,0 +1,22 @@ +package gamestates; + +import main.Game; +import ui.MenuButton; + +import java.awt.event.MouseEvent; + +public class State { + protected Game game; + + public State(Game game) { + this.game = game; + } + + public boolean isIn(MouseEvent e, MenuButton mb){ + return mb.getBounds().contains(e.getX(), e.getY()); + } + + public Game getGame() { + return game; + } +} diff --git a/Pirate_Adventure_Game/src/gamestates/StateMethods.java b/Pirate_Adventure_Game/src/gamestates/StateMethods.java new file mode 100644 index 00000000..ab94fab2 --- /dev/null +++ b/Pirate_Adventure_Game/src/gamestates/StateMethods.java @@ -0,0 +1,24 @@ +package gamestates; + +import java.awt.*; +import java.awt.event.KeyEvent; +import java.awt.event.MouseEvent; + +public interface StateMethods { + public void update(); + + public void draw(Graphics graphics); + + public void mouseClicked(MouseEvent e); + + public void mousePressed(MouseEvent e); + + public void mouseReleased(MouseEvent e); + + public void mouseMoved(MouseEvent e); + + public void keyPressed(KeyEvent e); + + public void keyReleased(KeyEvent e); + +} diff --git a/Pirate_Adventure_Game/src/images/background_elements.png b/Pirate_Adventure_Game/src/images/background_elements.png new file mode 100644 index 00000000..dc4487fb Binary files /dev/null and b/Pirate_Adventure_Game/src/images/background_elements.png differ diff --git a/Pirate_Adventure_Game/src/images/big_clouds.png b/Pirate_Adventure_Game/src/images/big_clouds.png new file mode 100644 index 00000000..c46d9580 Binary files /dev/null and b/Pirate_Adventure_Game/src/images/big_clouds.png differ diff --git a/Pirate_Adventure_Game/src/images/button_templates.png b/Pirate_Adventure_Game/src/images/button_templates.png new file mode 100644 index 00000000..73be9d15 Binary files /dev/null and b/Pirate_Adventure_Game/src/images/button_templates.png differ diff --git a/Pirate_Adventure_Game/src/images/crabby_positions.png b/Pirate_Adventure_Game/src/images/crabby_positions.png new file mode 100644 index 00000000..e322186a Binary files /dev/null and b/Pirate_Adventure_Game/src/images/crabby_positions.png differ diff --git a/Pirate_Adventure_Game/src/images/health_power_bar.png b/Pirate_Adventure_Game/src/images/health_power_bar.png new file mode 100644 index 00000000..62c77cf4 Binary files /dev/null and b/Pirate_Adventure_Game/src/images/health_power_bar.png differ diff --git a/Pirate_Adventure_Game/src/images/level_one_data.png b/Pirate_Adventure_Game/src/images/level_one_data.png new file mode 100644 index 00000000..d37d8fd6 Binary files /dev/null and b/Pirate_Adventure_Game/src/images/level_one_data.png differ diff --git a/Pirate_Adventure_Game/src/images/level_one_data_long.png b/Pirate_Adventure_Game/src/images/level_one_data_long.png new file mode 100644 index 00000000..731bed26 Binary files /dev/null and b/Pirate_Adventure_Game/src/images/level_one_data_long.png differ diff --git a/Pirate_Adventure_Game/src/images/menu_background.png b/Pirate_Adventure_Game/src/images/menu_background.png new file mode 100644 index 00000000..52705abe Binary files /dev/null and b/Pirate_Adventure_Game/src/images/menu_background.png differ diff --git a/Pirate_Adventure_Game/src/images/menu_board.png b/Pirate_Adventure_Game/src/images/menu_board.png new file mode 100644 index 00000000..bdee1c2d Binary files /dev/null and b/Pirate_Adventure_Game/src/images/menu_board.png differ diff --git a/Pirate_Adventure_Game/src/images/pause_menu.png b/Pirate_Adventure_Game/src/images/pause_menu.png new file mode 100644 index 00000000..f16a5656 Binary files /dev/null and b/Pirate_Adventure_Game/src/images/pause_menu.png differ diff --git a/Pirate_Adventure_Game/src/images/pirate_positions.png b/Pirate_Adventure_Game/src/images/pirate_positions.png new file mode 100644 index 00000000..200eff1d Binary files /dev/null and b/Pirate_Adventure_Game/src/images/pirate_positions.png differ diff --git a/Pirate_Adventure_Game/src/images/playing_bg_img.png b/Pirate_Adventure_Game/src/images/playing_bg_img.png new file mode 100644 index 00000000..3f2a66cd Binary files /dev/null and b/Pirate_Adventure_Game/src/images/playing_bg_img.png differ diff --git a/Pirate_Adventure_Game/src/images/small_clouds.png b/Pirate_Adventure_Game/src/images/small_clouds.png new file mode 100644 index 00000000..ae487305 Binary files /dev/null and b/Pirate_Adventure_Game/src/images/small_clouds.png differ diff --git a/Pirate_Adventure_Game/src/images/sound_button.png b/Pirate_Adventure_Game/src/images/sound_button.png new file mode 100644 index 00000000..1b9c4474 Binary files /dev/null and b/Pirate_Adventure_Game/src/images/sound_button.png differ diff --git a/Pirate_Adventure_Game/src/images/urm_buttons.png b/Pirate_Adventure_Game/src/images/urm_buttons.png new file mode 100644 index 00000000..40189624 Binary files /dev/null and b/Pirate_Adventure_Game/src/images/urm_buttons.png differ diff --git a/Pirate_Adventure_Game/src/images/volume_buttons.png b/Pirate_Adventure_Game/src/images/volume_buttons.png new file mode 100644 index 00000000..20f8efd8 Binary files /dev/null and b/Pirate_Adventure_Game/src/images/volume_buttons.png differ diff --git a/Pirate_Adventure_Game/src/inputs/KeyboardInputs.java b/Pirate_Adventure_Game/src/inputs/KeyboardInputs.java new file mode 100644 index 00000000..2ce97c6d --- /dev/null +++ b/Pirate_Adventure_Game/src/inputs/KeyboardInputs.java @@ -0,0 +1,48 @@ +package inputs; + +import gamestates.GameState; +import main.GamePanel; + +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; + +public class KeyboardInputs implements KeyListener { + private GamePanel gamePanel; + + public KeyboardInputs(GamePanel gamePanel) { + this.gamePanel = gamePanel; + } + + @Override + public void keyTyped(KeyEvent e) { + + } + + @Override + public void keyPressed(KeyEvent e) { + switch (GameState.state) { + case MENU: + gamePanel.getGame().getMenu().keyPressed(e); + break; + case PLAYING: + gamePanel.getGame().getPlaying().keyPressed(e); + break; + default: + break; + } + } + + @Override + public void keyReleased(KeyEvent e) { + switch (GameState.state) { + case MENU: + gamePanel.getGame().getMenu().keyReleased(e); + break; + case PLAYING: + gamePanel.getGame().getPlaying().keyReleased(e); + break; + default: + break; + } + } +} diff --git a/Pirate_Adventure_Game/src/inputs/MouseInputs.java b/Pirate_Adventure_Game/src/inputs/MouseInputs.java new file mode 100644 index 00000000..b717a7b6 --- /dev/null +++ b/Pirate_Adventure_Game/src/inputs/MouseInputs.java @@ -0,0 +1,90 @@ +package inputs; + +import gamestates.GameState; +import main.GamePanel; + +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; + +public class MouseInputs implements MouseListener, MouseMotionListener { + private GamePanel gamePanel; + + public MouseInputs(GamePanel gamePanel) { + this.gamePanel = gamePanel; + } + + @Override + public void mouseClicked(MouseEvent e) { + switch (GameState.state) { + case PLAYING: + gamePanel.getGame().getPlaying().mouseClicked(e); + break; + default: + break; + } + } + + @Override + public void mouseMoved(MouseEvent e) { + switch (GameState.state) { + case MENU: + gamePanel.getGame().getMenu().mouseMoved(e); + break; + case PLAYING: + gamePanel.getGame().getPlaying().mouseMoved(e); + break; + default: + break; + } + } + + @Override + public void mousePressed(MouseEvent e) { + switch (GameState.state) { + case MENU: + gamePanel.getGame().getMenu().mousePressed(e); + break; + case PLAYING: + gamePanel.getGame().getPlaying().mousePressed(e); + break; + default: + break; + } + } + + @Override + public void mouseReleased(MouseEvent e) { + switch (GameState.state) { + case MENU: + gamePanel.getGame().getMenu().mouseReleased(e); + break; + case PLAYING: + gamePanel.getGame().getPlaying().mouseReleased(e); + break; + default: + break; + } + } + + @Override + public void mouseEntered(MouseEvent e) { + + } + + @Override + public void mouseExited(MouseEvent e) { + + } + + @Override + public void mouseDragged(MouseEvent e) { + switch (GameState.state) { + case PLAYING: + gamePanel.getGame().getPlaying().mouseDragged(e); + break; + default: + break; + } + } +} diff --git a/Pirate_Adventure_Game/src/levels/Level.java b/Pirate_Adventure_Game/src/levels/Level.java new file mode 100644 index 00000000..57a8cf0d --- /dev/null +++ b/Pirate_Adventure_Game/src/levels/Level.java @@ -0,0 +1,17 @@ +package levels; + +public class Level { + private int[][] levelData; + + public Level(int[][] levelData) { + this.levelData = levelData; + } + + public int getComponentIndex(int x, int y) { + return levelData[y][x]; + } + + public int[][] getLevelData() { + return levelData; + } +} diff --git a/Pirate_Adventure_Game/src/levels/LevelManager.java b/Pirate_Adventure_Game/src/levels/LevelManager.java new file mode 100644 index 00000000..ad50642b --- /dev/null +++ b/Pirate_Adventure_Game/src/levels/LevelManager.java @@ -0,0 +1,51 @@ +package levels; + +import main.Game; +import utils.LoadSave; + +import java.awt.*; +import java.awt.image.BufferedImage; + +import static main.Game.TILES_SIZE; + +public class LevelManager { + private Game game; + private BufferedImage[] levelElement; + private Level levelOne; + + public LevelManager(Game game) { + this.game = game; + // levelElement= LoadSave.getPositionsAtlas(LoadSave.LEVEL_ATLAS); + importBackgroundElements(); + levelOne = new Level(LoadSave.getLevelData()); + } + + private void importBackgroundElements() { + BufferedImage img = LoadSave.getPositionsAtlas(LoadSave.LEVEL_ATLAS); + levelElement = new BufferedImage[12 * 4]; + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 12; j++) { + int index = i * 12 + j; + levelElement[index] = img.getSubimage(j * 32, i * 32, 32, 32); + } + } + } + + public void draw(Graphics graphics, int levelOffset) { + for (int i = 0; i < Game.TILES_IN_HEIGHT; i++) { + for (int j = 0; j < levelOne.getLevelData()[0].length; j++) { + int index = levelOne.getComponentIndex(j, i); + graphics.drawImage(levelElement[index], TILES_SIZE * j - levelOffset, TILES_SIZE * i, TILES_SIZE, TILES_SIZE, null); + } + } + } + + public void update() { + + } + + public Level getCurrentLevel() { + return levelOne; + } + +} diff --git a/Pirate_Adventure_Game/src/main/Game.java b/Pirate_Adventure_Game/src/main/Game.java new file mode 100644 index 00000000..86979765 --- /dev/null +++ b/Pirate_Adventure_Game/src/main/Game.java @@ -0,0 +1,126 @@ +package main; + +import gamestates.GameState; +import gamestates.Menu; +import gamestates.Playing; + +import java.awt.*; + +public class Game implements Runnable { + private GameWindow gameWindow; + private GamePanel gamePanel; + private Thread gameThread; + private final int FPS_SET = 120; + private final int UPS_SET = 200; + private Playing playing; + private Menu menu; + + public final static int TILES_DEFAULT_SIZE = 32; + public final static float SCALE = 1.2f; + public final static int TILES_IN_WIDTH = 26; + public final static int TILES_IN_HEIGHT = 14; + public final static int TILES_SIZE = (int) (TILES_DEFAULT_SIZE * SCALE); + public final static int GAME_WIDTH = TILES_SIZE * TILES_IN_WIDTH; + public final static int GAME_HEIGHT = TILES_SIZE * TILES_IN_HEIGHT; + + public Game() { + initClasses(); + gamePanel = new GamePanel(this); + gameWindow = new GameWindow(gamePanel); + gamePanel.requestFocus(); + startGameLoop(); + } + + private void initClasses() { + menu = new Menu(this); + playing = new Playing(this); + } + + private void startGameLoop() { + gameThread = new Thread(this); + gameThread.start(); + } + + public void update() { + switch (GameState.state) { + case MENU: + menu.update(); + break; + case PLAYING: + playing.update(); + break; + default: + break; + } + } + + public void render(Graphics graphics) { + switch (GameState.state) { + case MENU: + menu.draw(graphics); + break; + case PLAYING: + playing.draw(graphics); + break; + case OPTIONS: + case QUIT: + default: + System.exit(0); + break; + } + } + + @Override + public void run() { + double timePerFrame = 1000000000.0 / FPS_SET; + double timePerUpdate = 1000000000.0 / UPS_SET; + long previousTime = System.nanoTime(); + int frames = 0; + int updates = 0; + long lastCheck = System.currentTimeMillis(); + + double deltaU = 0; + double deltaF = 0; + + while (true) { + long currentTime = System.nanoTime(); + + deltaU += (currentTime - previousTime) / timePerUpdate; + deltaF += (currentTime - previousTime) / timePerFrame; + + previousTime = currentTime; + + if (deltaU >= 1) { + update(); + updates++; + deltaU--; + } + + if (deltaF >= 1) { + gamePanel.repaint(); + frames++; + deltaF--; + } + + if (System.currentTimeMillis() - lastCheck >= 1000) { + lastCheck = System.currentTimeMillis(); + System.out.println("FPS: " + frames + " | UPS: " + updates); + frames = 0; + updates = 0; + } + } + } + + public void windowFocusLost() { + if (GameState.state == GameState.PLAYING) + playing.getPlayer().resetDirectionBoolean(); + } + + public Menu getMenu() { + return menu; + } + + public Playing getPlaying() { + return playing; + } +} diff --git a/Pirate_Adventure_Game/src/main/GamePanel.java b/Pirate_Adventure_Game/src/main/GamePanel.java new file mode 100644 index 00000000..b157b3e1 --- /dev/null +++ b/Pirate_Adventure_Game/src/main/GamePanel.java @@ -0,0 +1,46 @@ +package main; + +import inputs.KeyboardInputs; +import inputs.MouseInputs; + +import javax.swing.*; +import java.awt.*; + +import static main.Game.GAME_HEIGHT; +import static main.Game.GAME_WIDTH; + +public class GamePanel extends JPanel { + private MouseInputs mouseInputs; + private Game game; + + + public GamePanel(Game game) { + mouseInputs = new MouseInputs(this); + this.game = game; + setPanelSize(); + addKeyListener(new KeyboardInputs(this)); + addMouseListener(mouseInputs); + addMouseMotionListener(mouseInputs); + } + + public Game getGame() { + return game; + } + + private void setPanelSize() { + Dimension size = new Dimension(GAME_WIDTH, GAME_HEIGHT); + // setMinimumSize(size); + setPreferredSize(size); + // setMaximumSize(size); + System.out.println("size : " + GAME_WIDTH + " : " + GAME_HEIGHT); + } + + public void paintComponent(Graphics graphics) { + super.paintComponent(graphics); + game.render(graphics); + } + + public void updateGame() { + + } +} diff --git a/Pirate_Adventure_Game/src/main/GameWindow.java b/Pirate_Adventure_Game/src/main/GameWindow.java new file mode 100644 index 00000000..1f95a339 --- /dev/null +++ b/Pirate_Adventure_Game/src/main/GameWindow.java @@ -0,0 +1,32 @@ +package main; + +import javax.swing.*; +import java.awt.event.WindowEvent; +import java.awt.event.WindowFocusListener; + +public class GameWindow { + private JFrame jFrame; + + public GameWindow(GamePanel gamePanel) { + + jFrame = new JFrame(); + // jFrame.setSize(1000, 520);// 850, 490 + jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + jFrame.add(gamePanel); + jFrame.setResizable(false); + jFrame.pack(); + jFrame.setLocationRelativeTo(null); + jFrame.setVisible(true); + jFrame.addWindowFocusListener(new WindowFocusListener() { + @Override + public void windowGainedFocus(WindowEvent e) { + gamePanel.getGame().windowFocusLost(); + } + + @Override + public void windowLostFocus(WindowEvent e) { + + } + }); + } +} diff --git a/Pirate_Adventure_Game/src/main/Main.java b/Pirate_Adventure_Game/src/main/Main.java new file mode 100644 index 00000000..23f35854 --- /dev/null +++ b/Pirate_Adventure_Game/src/main/Main.java @@ -0,0 +1,6 @@ +package main; +public class Main { + public static void main(String[] args) { + new Game(); + } +} \ No newline at end of file diff --git a/Pirate_Adventure_Game/src/ui/GameOverlay.java b/Pirate_Adventure_Game/src/ui/GameOverlay.java new file mode 100644 index 00000000..55b4e814 --- /dev/null +++ b/Pirate_Adventure_Game/src/ui/GameOverlay.java @@ -0,0 +1,32 @@ +package ui; + +import gamestates.GameState; +import gamestates.Playing; +import main.Game; + +import java.awt.*; +import java.awt.event.KeyEvent; + +public class GameOverlay { + + private Playing playing; + + public GameOverlay(Playing playing) { + this.playing = playing; + } + + public void draw(Graphics graphics) { + graphics.setColor(new Color(0, 0, 200)); + graphics.fillRect(0, 0, Game.GAME_HEIGHT, Game.GAME_HEIGHT); + graphics.setColor(Color.white); + graphics.drawString("Game Over", Game.GAME_WIDTH / 2, 150); + graphics.drawString("Press esc to enter Main Menu!", Game.GAME_WIDTH / 2, 300); + } + + public void keyPressed(KeyEvent e) { + if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { + playing.resetAll(); + GameState.state = GameState.MENU; + } + } +} diff --git a/Pirate_Adventure_Game/src/ui/MenuButton.java b/Pirate_Adventure_Game/src/ui/MenuButton.java new file mode 100644 index 00000000..007213d1 --- /dev/null +++ b/Pirate_Adventure_Game/src/ui/MenuButton.java @@ -0,0 +1,79 @@ +package ui; + +import gamestates.GameState; +import utils.LoadSave; + +import java.awt.*; +import java.awt.image.BufferedImage; + +import static utils.Constants.UI.Buttons.*; + +public class MenuButton { + private int xPos, yPos, rowIndex, index; + private int xOffsetCenter = B_WIDTH / 2; + private GameState state; + private BufferedImage[] imgs; + private boolean mouseOver, mousePressed; + private Rectangle bounds; + + public MenuButton(int xPos, int yPos, int rowIndex, GameState state) { + this.xPos = xPos; + this.yPos = yPos; + this.rowIndex = rowIndex; + this.state = state; + loadImg(); + initBounds(); + } + + private void initBounds() { + bounds = new Rectangle(xPos - xOffsetCenter, yPos, B_WIDTH, B_HEIGHT); + } + + private void loadImg() { + imgs = new BufferedImage[3]; + BufferedImage temp = LoadSave.getPositionsAtlas(LoadSave.MENU_BUTTONS); + for (int i = 0; i < imgs.length; i++) + imgs[i] = temp.getSubimage(i * B_WIDTH_DEFAULT, rowIndex * B_HEIGHT_DEFAULT, B_WIDTH_DEFAULT, B_HEIGHT_DEFAULT); + } + + public void applyGameState() { + GameState.state = state; + } + + public void resetBools() { + mouseOver = false; + mousePressed = false; + } + + public void draw(Graphics graphics) { + graphics.drawImage(imgs[index], xPos - xOffsetCenter, yPos, B_WIDTH, B_HEIGHT, null); + } + + public void update() { + index = 0; + if (mouseOver) + index = 1; + if (mousePressed) + index = 2; + } + + public boolean isMouseOver() { + return mouseOver; + } + + public void setMouseOver(boolean mouseOver) { + this.mouseOver = mouseOver; + } + + public boolean isMousePressed() { + return mousePressed; + } + + public void setMousePressed(boolean mousePressed) { + this.mousePressed = mousePressed; + } + + public Rectangle getBounds() { + return bounds; + } +} diff --git a/Pirate_Adventure_Game/src/ui/PauseButton.java b/Pirate_Adventure_Game/src/ui/PauseButton.java new file mode 100644 index 00000000..a23307ce --- /dev/null +++ b/Pirate_Adventure_Game/src/ui/PauseButton.java @@ -0,0 +1,61 @@ +package ui; + +import java.awt.*; + +public class PauseButton { + + protected int x, y, width, height; + protected Rectangle bounds; + + public PauseButton(int x, int y, int width, int height) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + createBounds(); + } + + private void createBounds() { + bounds = new Rectangle(x, y, width, height); + } + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public int getY() { + return y; + } + + public void setY(int y) { + this.y = y; + } + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public Rectangle getBounds() { + return bounds; + } + + public void setBounds(Rectangle bounds) { + this.bounds = bounds; + } +} diff --git a/Pirate_Adventure_Game/src/ui/PauseOverlay.java b/Pirate_Adventure_Game/src/ui/PauseOverlay.java new file mode 100644 index 00000000..43a48d8f --- /dev/null +++ b/Pirate_Adventure_Game/src/ui/PauseOverlay.java @@ -0,0 +1,159 @@ +package ui; + +import gamestates.GameState; +import gamestates.Playing; +import main.Game; +import utils.Constants; +import utils.LoadSave; + +import java.awt.*; +import java.awt.event.MouseEvent; +import java.awt.image.BufferedImage; + +import static utils.Constants.UI.PauseButtons.SOUND_SIZE; +import static utils.Constants.UI.URMButtons.URM_SIZE; +import static utils.Constants.UI.VolumeButtons.*; + +public class PauseOverlay { + private BufferedImage backgroundImg; + private int backgroundX, backgroundY, backgroundWidth, backgroundHeight; + private SoundButton musicButton, soundEffectsButton; + private UrmButton menuB, replyB, unpauseB; + private Playing playing; + private VolumeButton volumeButton; + + public PauseOverlay(Playing playing) { + this.playing = playing; + loadBackground(); + createSoundButtons(); + createUrmButtons(); + createVolumeButton(); + } + + private void createVolumeButton() { + int vX = (int) (309 * Game.SCALE); + int vY = (int) (278 * Game.SCALE); + volumeButton = new VolumeButton(vX, vY, SLIDER_WIDTH, VOLUME_HEIGHT); + } + + private void createUrmButtons() { + int menuX = (int) (313 * Game.SCALE); + int replyX = (int) (387 * Game.SCALE); + int unpauseX = (int) (462 * Game.SCALE); + int bY = (int) (325 * Game.SCALE); + menuB = new UrmButton(menuX, bY, URM_SIZE, URM_SIZE, 2); + replyB = new UrmButton(replyX, bY, URM_SIZE, URM_SIZE, 1); + unpauseB = new UrmButton(unpauseX, bY, URM_SIZE, URM_SIZE, 0); + + } + + private void createSoundButtons() { + int soundX = (int) (450 * Game.SCALE); + int musicY = (int) (140 * Game.SCALE); + int soundEffectsY = (int) (186 * Game.SCALE); + musicButton = new SoundButton(soundX, musicY, SOUND_SIZE, SOUND_SIZE); + soundEffectsButton = new SoundButton(soundX, soundEffectsY, SOUND_SIZE, SOUND_SIZE); + + } + + private void loadBackground() { + backgroundImg = LoadSave.getPositionsAtlas(LoadSave.PAUSE_BACKGROUND); + backgroundWidth = (int) (backgroundImg.getWidth() * Game.SCALE); + backgroundHeight = (int) (backgroundImg.getHeight() * Game.SCALE); + backgroundX = Game.GAME_WIDTH / 2 - backgroundWidth / 2; + backgroundY = (int) (25 * Game.SCALE); + + } + + public void update() { + musicButton.update(); + soundEffectsButton.update(); + menuB.update(); + replyB.update(); + unpauseB.update(); + volumeButton.update(); + } + + public void draw(Graphics graphics) { + graphics.drawImage(backgroundImg, backgroundX, backgroundY, backgroundWidth, backgroundHeight, null); + musicButton.draw(graphics); + soundEffectsButton.draw(graphics); + menuB.draw(graphics); + replyB.draw(graphics); + unpauseB.draw(graphics); + volumeButton.draw(graphics); + } + + public void mouseDragged(MouseEvent e) { + if(volumeButton.isMousePressed()) + volumeButton.changeX(e.getX()); + } + + public void mousePressed(MouseEvent e) { + if (isIn(e, musicButton)) + musicButton.setMousePressed(true); + else if (isIn(e, soundEffectsButton)) + soundEffectsButton.setMousePressed(true); + else if (isIn(e, menuB)) + menuB.setMousePressed(true); + else if (isIn(e, replyB)) + replyB.setMousePressed(true); + else if (isIn(e, unpauseB)) + unpauseB.setMousePressed(true); + else if (isIn(e, volumeButton)) + volumeButton.setMousePressed(true); + } + + public void mouseReleased(MouseEvent e) { + if (isIn(e, musicButton)) { + if (musicButton.isMousePressed()) + musicButton.setMuted(!musicButton.isMuted()); + } else if (isIn(e, soundEffectsButton)) { + if (soundEffectsButton.isMousePressed()) + soundEffectsButton.setMuted(!soundEffectsButton.isMuted()); + } else if (isIn(e, menuB)) { + if (menuB.isMousePressed()) { + GameState.state = GameState.MENU; + playing.unpauseGame(); + } + } else if (isIn(e, replyB)) { + if (replyB.isMousePressed()) + System.out.println("reply level!"); + } else if (isIn(e, unpauseB)) { + if (unpauseB.isMousePressed()) + playing.unpauseGame(); + } + musicButton.resetBools(); + soundEffectsButton.resetBools(); + menuB.resetBools(); + replyB.resetBools(); + unpauseB.resetBools(); + volumeButton.resetBools(); + } + + public void mouseMoved(MouseEvent e) { + musicButton.setMouseOver(false); + soundEffectsButton.setMouseOver(false); + menuB.setMouseOver(false); + replyB.setMouseOver(false); + unpauseB.setMouseOver(false); + volumeButton.setMouseOver(false); + + if (isIn(e, musicButton)) + musicButton.setMouseOver(true); + else if (isIn(e, soundEffectsButton)) + soundEffectsButton.setMouseOver(true); + else if (isIn(e, menuB)) + menuB.setMouseOver(true); + else if (isIn(e, replyB)) + replyB.setMouseOver(true); + else if (isIn(e, unpauseB)) + unpauseB.setMouseOver(true); + else if (isIn(e, volumeButton)) + volumeButton.setMouseOver(true); + } + + private boolean isIn(MouseEvent e, PauseButton button) { + return button.getBounds().contains(e.getX(), e.getY()); + } +} diff --git a/Pirate_Adventure_Game/src/ui/SoundButton.java b/Pirate_Adventure_Game/src/ui/SoundButton.java new file mode 100644 index 00000000..0bdd21ae --- /dev/null +++ b/Pirate_Adventure_Game/src/ui/SoundButton.java @@ -0,0 +1,75 @@ +package ui; + +import utils.LoadSave; + +import java.awt.*; +import java.awt.image.BufferedImage; + +import static utils.Constants.UI.PauseButtons.*; + +public class SoundButton extends PauseButton { + private BufferedImage[][] soundImgs; + private boolean mouseOver, mousePressed; + private boolean muted; + private int rowIndex, colIndex; + + public SoundButton(int x, int y, int width, int height) { + super(x, y, width, height); + loadSoundImgs(); + } + + private void loadSoundImgs() { + BufferedImage temp = LoadSave.getPositionsAtlas(LoadSave.SOUND_BUTTONS); + soundImgs = new BufferedImage[2][3]; + for (int i = 0; i < soundImgs.length; i++) { + for (int j = 0; j < soundImgs[i].length; j++) { + soundImgs[i][j] = temp.getSubimage(j * SOUND_SIZE_DEFAULT, i * SOUND_SIZE_DEFAULT, SOUND_SIZE_DEFAULT, SOUND_SIZE_DEFAULT); + } + } + } + + public void update() { + if (muted) + rowIndex = 1; + else + rowIndex = 0; + colIndex = 0; + if (mouseOver) + colIndex = 1; + if (mousePressed) + colIndex = 2; + } + + public void resetBools() { + mouseOver = false; + mousePressed = false; + } + + public void draw(Graphics graphics) { + graphics.drawImage(soundImgs[rowIndex][colIndex], x, y, width, height, null); + } + + public boolean isMouseOver() { + return mouseOver; + } + + public void setMouseOver(boolean mouseOver) { + this.mouseOver = mouseOver; + } + + public boolean isMousePressed() { + return mousePressed; + } + + public void setMousePressed(boolean mousePressed) { + this.mousePressed = mousePressed; + } + + public boolean isMuted() { + return muted; + } + + public void setMuted(boolean muted) { + this.muted = muted; + } +} diff --git a/Pirate_Adventure_Game/src/ui/UrmButton.java b/Pirate_Adventure_Game/src/ui/UrmButton.java new file mode 100644 index 00000000..e7990f36 --- /dev/null +++ b/Pirate_Adventure_Game/src/ui/UrmButton.java @@ -0,0 +1,66 @@ +package ui; + +import utils.LoadSave; + +import java.awt.*; +import java.awt.image.BufferedImage; + +import static utils.Constants.UI.URMButtons.URM_DEFAULT_SIZE; +import static utils.Constants.UI.URMButtons.URM_SIZE; + +public class UrmButton extends PauseButton { + private BufferedImage[] imgs; + private int rowIndex, index; + private boolean mouseOver, mousePressed; + + public UrmButton(int x, int y, int width, int height, int rowIndex) { + super(x, y, width, height); + this.rowIndex = rowIndex; + loadImgs(); + } + + private void loadImgs() { + BufferedImage temp = LoadSave.getPositionsAtlas(LoadSave.URM_BUTTONS); + imgs = new BufferedImage[3]; + for (int i = 0; i < imgs.length; i++) { + imgs[i] = temp.getSubimage(i * URM_DEFAULT_SIZE, rowIndex * URM_DEFAULT_SIZE, URM_DEFAULT_SIZE, URM_DEFAULT_SIZE); + } + } + + public void update() { + index = 0; + if (mouseOver) + index = 1; + if (mousePressed) + index = 2; + } + + public void draw(Graphics graphics) { + graphics.drawImage(imgs[index], x, y, URM_SIZE, URM_SIZE, null); + } + + public void mouseResetBools() { + mouseOver = false; + mousePressed = false; + } + + public boolean isMouseOver() { + return mouseOver; + } + + public void setMouseOver(boolean mouseOver) { + this.mouseOver = mouseOver; + } + + public boolean isMousePressed() { + return mousePressed; + } + + public void setMousePressed(boolean mousePressed) { + this.mousePressed = mousePressed; + } + public void resetBools() { + mouseOver = false; + mousePressed = false; + } +} diff --git a/Pirate_Adventure_Game/src/ui/VolumeButton.java b/Pirate_Adventure_Game/src/ui/VolumeButton.java new file mode 100644 index 00000000..545a7a75 --- /dev/null +++ b/Pirate_Adventure_Game/src/ui/VolumeButton.java @@ -0,0 +1,86 @@ +package ui; + +import utils.LoadSave; + +import java.awt.*; +import java.awt.image.BufferedImage; + +import static utils.Constants.UI.VolumeButtons.*; + +public class VolumeButton extends PauseButton { + private BufferedImage[] imgs; + private BufferedImage slider; + private int index = 0; + private int buttonX, minX, maxX; + private boolean mouseOver, mousePressed; + + public VolumeButton(int x, int y, int width, int height) { + super(x + width / 2, y, VOLUME_WIDTH, height); + bounds.x -= VOLUME_WIDTH / 2; + buttonX = x + width / 2; + this.x = x; + this.width = width; + minX = x + VOLUME_WIDTH / 2; + maxX = x + width - VOLUME_WIDTH / 2; + loadImgs(); + } + + private void loadImgs() { + BufferedImage temp = LoadSave.getPositionsAtlas(LoadSave.VOLUME_BUTTONS); + imgs = new BufferedImage[3]; + for (int i = 0; i < imgs.length; i++) + imgs[i] = temp.getSubimage(i * VOLUME_DEFAULT_WIDTH, 0, VOLUME_DEFAULT_WIDTH, VOLUME_DEFAULT_HEIGHT); + + slider = temp.getSubimage(3 * VOLUME_DEFAULT_WIDTH, 0, SLIDER_DEFAULT_WIDTH, VOLUME_DEFAULT_HEIGHT); + } + + public void update() { + index = 0; + if (mouseOver) + index = 1; + if (mousePressed) + index = 2; + } + + public void draw(Graphics graphics) { + graphics.drawImage(slider, x, y, width, height, null); + graphics.drawImage(imgs[index], buttonX - VOLUME_WIDTH / 2, y, VOLUME_WIDTH, height, null); + } + + public void changeX(int x) { + if (x < minX) + buttonX = minX; + else if (x > maxX) + buttonX = maxX; + else + buttonX = x; + + bounds.x = buttonX - VOLUME_WIDTH / 2; + } + + public void mouseResetBools() { + mouseOver = false; + mousePressed = false; + } + + public boolean isMouseOver() { + return mouseOver; + } + + public void setMouseOver(boolean mouseOver) { + this.mouseOver = mouseOver; + } + + public boolean isMousePressed() { + return mousePressed; + } + + public void setMousePressed(boolean mousePressed) { + this.mousePressed = mousePressed; + } + + public void resetBools() { + mouseOver = false; + mousePressed = false; + } +} diff --git a/Pirate_Adventure_Game/src/utils/Constants.java b/Pirate_Adventure_Game/src/utils/Constants.java new file mode 100644 index 00000000..1c1234cf --- /dev/null +++ b/Pirate_Adventure_Game/src/utils/Constants.java @@ -0,0 +1,125 @@ +package utils; + +import main.Game; + +import javax.management.monitor.GaugeMonitor; + +public class Constants { + + public static class EnemyConstants { + public static final int CRABBY = 0; + + public static final int IDLE = 0; + public static final int RUNNING = 1; + public static final int ATTACK = 2; + public static final int HIT = 3; + public static final int DEAD = 4; + + public static final int CRABBY_WIDTH_DEFAULT = 72; + public static final int CRABBY_HEIGHT_DEFAULT = 32; + + public static final int CRABBY_WIDTH = (int) (CRABBY_WIDTH_DEFAULT * Game.SCALE); + public static final int CRABBY_HEIGHT = (int) (CRABBY_HEIGHT_DEFAULT * Game.SCALE); + public static final int CRABBY_DRAWOFFSET_X = (int) (26 * Game.SCALE); + public static final int CRABBY_DRAWOFFSET_Y = (int) (9 * Game.SCALE); + + + public static final int getPositionsAmount(int enemy_type, int enemy_state) { + switch (enemy_type) { + case CRABBY: + switch (enemy_state) { + case IDLE: + return 9; + case RUNNING: + return 6; + case ATTACK: + return 7; + case HIT: + return 4; + case DEAD: + return 5; + } + } + return 0; + } + } + + public static class Environment { + public static final int BIG_CLOUD_WIDTH_DEFAULT = 448; + public static final int BIG_CLOUD_HEIGHT_DEFAULT = 101; + public static final int BIG_CLOUD_WIDTH = (int) (BIG_CLOUD_WIDTH_DEFAULT * Game.SCALE); + public static final int BIG_CLOUD_HEIGHT = (int) (BIG_CLOUD_HEIGHT_DEFAULT * Game.SCALE); + + public static final int SMALL_CLOUD_WIDTH_DEFAULT = 74; + public static final int SMALL_CLOUD_HEIGHT_DEFAULT = 24; + public static final int SMALL_CLOUD_WIDTH = (int) (SMALL_CLOUD_WIDTH_DEFAULT * Game.SCALE); + public static final int SMALL_CLOUD_HEIGHT = (int) (SMALL_CLOUD_HEIGHT_DEFAULT * Game.SCALE); + + + } + + public static class UI { + public static class Buttons { + public static final int B_WIDTH_DEFAULT = 140; + public static final int B_HEIGHT_DEFAULT = 56; + public static final int B_WIDTH = (int) (B_WIDTH_DEFAULT * Game.SCALE); + public static final int B_HEIGHT = (int) (B_HEIGHT_DEFAULT * Game.SCALE); + } + + public static class PauseButtons { + public static final int SOUND_SIZE_DEFAULT = 42; + public static final int SOUND_SIZE = (int) (SOUND_SIZE_DEFAULT * Game.SCALE); + } + + public static class URMButtons { + public static final int URM_DEFAULT_SIZE = 56; + public static final int URM_SIZE = (int) (URM_DEFAULT_SIZE * Game.SCALE); + } + + public static class VolumeButtons { + public static final int VOLUME_DEFAULT_WIDTH = 28; + public static final int VOLUME_DEFAULT_HEIGHT = 44; + public static final int SLIDER_DEFAULT_WIDTH = 215; + public static final int VOLUME_WIDTH = (int) (VOLUME_DEFAULT_WIDTH * Game.SCALE); + public static final int VOLUME_HEIGHT = (int) (VOLUME_DEFAULT_HEIGHT * Game.SCALE); + public static final int SLIDER_WIDTH = (int) (SLIDER_DEFAULT_WIDTH * Game.SCALE); + } + } + + public static class Directions { + public static final int LEFT = 0; + public static final int RIGHT = 1; + public static final int UP = 2; + public static final int DOWN = 3; + + } + + public static class PlayerConstants { + public static final int STAYING = 0; + public static final int RUNNING = 1; + public static final int JUMP = 2; + public static final int FALLING = 3; + public static final int ATTACK = 4; + public static final int HIT = 5; + public static final int DEAD = 6; + + public static int getSpriteAmount(int player) { + switch (player) { + case DEAD: + return 8; + case RUNNING: + return 6; + case STAYING: + return 5; + case HIT: + return 4; + case JUMP: + case ATTACK: + return 3; + case FALLING: + default: + return 1; + } + } + } +} diff --git a/Pirate_Adventure_Game/src/utils/HelpMethods.java b/Pirate_Adventure_Game/src/utils/HelpMethods.java new file mode 100644 index 00000000..5ef13733 --- /dev/null +++ b/Pirate_Adventure_Game/src/utils/HelpMethods.java @@ -0,0 +1,88 @@ +package utils; + +import main.Game; + +import java.awt.*; +import java.awt.geom.Rectangle2D; + +public class HelpMethods { + public static boolean canMoveHere(float x, float y, float width, float height, int[][] levelData) { + if (!isSolid(x, y, levelData)) + if (!isSolid(x + width, y + height, levelData)) + if (!isSolid(x + width, y, levelData)) + if (!isSolid(x, y + height, levelData)) + return true; + return false; + } + + private static boolean isSolid(float x, float y, int[][] levelData) { + int maxWidth = levelData[0].length * Game.TILES_SIZE; + if (x < 0 || x >= maxWidth) + return true; + if (y < 0 || y >= Game.GAME_HEIGHT) + return true; + float xIndex = x / Game.TILES_SIZE; + float yIndex = y / Game.TILES_SIZE; + return isTileSolid((int) xIndex, (int) yIndex, levelData); + } + + public static boolean isTileSolid(int xTile, int yTile, int[][] levelData) { + int value = levelData[yTile][xTile]; + if (value >= 48 || value < 0 || value != 11) + return true; + return false; + } + + public static float getEntityXPosNextToWall(Rectangle2D.Float hitbox, float xSpeed) { + int currentTile = (int) (hitbox.x / Game.TILES_SIZE); + if (xSpeed > 0) { + int tileXPos = currentTile * Game.TILES_SIZE; + int xOffset = (int) (Game.TILES_SIZE - hitbox.width); + return tileXPos + xOffset - 1; + } else + return currentTile * Game.TILES_SIZE; + } + + public static float getEntityYPosUnderRoofOrAboveFloor(Rectangle2D.Float hitbox, float airSpeed) { + int currentTile = (int) (hitbox.y / Game.TILES_SIZE); + if (airSpeed > 0) { + int tileYPos = currentTile * Game.TILES_SIZE; + int yOffset = (int) (Game.TILES_SIZE - hitbox.height); + return tileYPos + yOffset - 1; + } else + return currentTile * Game.TILES_SIZE; + + } + + public static boolean isEntityOnFloor(Rectangle2D.Float hitbox, int[][] levelData) { + if (!isSolid(hitbox.x, hitbox.y + hitbox.height + 1, levelData)) + if (!isSolid(hitbox.x + hitbox.width, hitbox.y + hitbox.height + 1, levelData)) + return false; + return true; + } + + public static boolean isFloor(Rectangle2D.Float hitbox, float xSpeed, int[][] levelData) { + return isSolid(hitbox.x + xSpeed, hitbox.y + hitbox.height + 1, levelData); + } + + public static boolean isAllTilesWalkable(int xStart, int xEnd, int y, int[][] levelData) { + for (int i = 0; i < xEnd - xStart; i++) { + if (isTileSolid(xStart + i, y, levelData)) + return false; + if (!isTileSolid(xStart + i, y + 1, levelData)) + return false; + } + return true; + } + + public static boolean isSightClear(int[][] levelData, Rectangle2D.Float firstHitbox, Rectangle2D.Float secondHitbox, int yTile) { + int firstXTile = (int) (firstHitbox.x / Game.TILES_SIZE); + int secondXTile = (int) (secondHitbox.x / Game.TILES_SIZE); + if (firstXTile > secondXTile) + return isAllTilesWalkable(secondXTile, firstXTile, yTile, levelData); + else + return isAllTilesWalkable(firstXTile, secondXTile, yTile, levelData); + } + + +} diff --git a/Pirate_Adventure_Game/src/utils/LoadSave.java b/Pirate_Adventure_Game/src/utils/LoadSave.java new file mode 100644 index 00000000..30e5be27 --- /dev/null +++ b/Pirate_Adventure_Game/src/utils/LoadSave.java @@ -0,0 +1,80 @@ +package utils; + +import entities.Crabby; +import main.Game; + +import javax.imageio.ImageIO; +import java.awt.*; +import java.awt.image.BufferedImage; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; + +import static utils.Constants.EnemyConstants.CRABBY; + +public class LoadSave { + public static final String PLAYER_ATLAS = "images/pirate_positions.png"; + public static final String LEVEL_ATLAS = "images/background_elements.png"; + //public static final String LEVEL_ONE_DATA = "images/level_one_data.png"; + public static final String LEVEL_ONE_DATA = "images/level_one_data_long.png"; + public static final String MENU_BUTTONS = "images/button_templates.png"; + public static final String MENU_BOARD = "images/menu_board.png"; + public static final String PAUSE_BACKGROUND = "images/pause_menu.png"; + public static final String SOUND_BUTTONS = "images/sound_button.png"; + public static final String URM_BUTTONS = "images/urm_buttons.png"; + public static final String VOLUME_BUTTONS = "images/volume_buttons.png"; + public static final String MENU_BACKGROUND_IMG = "images/menu_background.png"; + public static final String PLAYING_BACKGROUND_IMG = "images/playing_bg_img.png"; + public static final String BIG_CLOUDS = "images/big_clouds.png"; + public static final String SMALL_CLOUDS = "images/small_clouds.png"; + public static final String CRABBY_ATLAS = "images/crabby_positions.png"; + public static final String STATUS_BAR = "images/health_power_bar.png"; + + + + public static BufferedImage getPositionsAtlas(String fileName) { + BufferedImage img = null; + InputStream is = LoadSave.class.getResourceAsStream("/" + fileName); + try { + img = ImageIO.read(is); + + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return img; + } + + public static ArrayList<Crabby> getCrabs() { + BufferedImage img = getPositionsAtlas(LEVEL_ONE_DATA); + ArrayList<Crabby> list = new ArrayList<Crabby>(); + for (int i = 0; i < img.getHeight(); i++) + for (int j = 0; j < img.getWidth(); j++) { + Color color = new Color(img.getRGB(j, i)); + int value = color.getGreen(); + if (value == CRABBY) + list.add(new Crabby(j * Game.TILES_SIZE, i * Game.TILES_SIZE)); + } + return list; + } + + public static int[][] getLevelData() { + BufferedImage img = getPositionsAtlas(LEVEL_ONE_DATA); + int[][] levelData = new int[img.getHeight()][img.getWidth()]; + for (int i = 0; i < img.getHeight(); i++) { + for (int j = 0; j < img.getWidth(); j++) { + Color color = new Color(img.getRGB(j, i)); + int value = color.getRed(); + if (value >= 12 * 4) + value = 0; + levelData[i][j] = value; + } + } + return levelData; + } +} diff --git a/Pong Game/Ball.java b/Pong Game/Ball.java new file mode 100644 index 00000000..72a248bf --- /dev/null +++ b/Pong Game/Ball.java @@ -0,0 +1,45 @@ +import java.awt.*; + +import java.util.*; + + + +public class Ball extends Rectangle{ + + Random random; + int xVelocity; + int yVelocity; + int initialSpeed = 4 ; + + Ball(int x, int y, int width, int height){ + super(x, y, width, height); + random = new Random(); + int randomXDirection = random.nextInt(2); + + if(randomXDirection==0) + randomXDirection--; + setXDirection(randomXDirection*initialSpeed); + + int randomYDirection = random.nextInt(2); + + if(randomYDirection==0) + randomYDirection--; + setXDirection(randomYDirection*initialSpeed); + } + + public void setXDirection(int randomXDirection){ + xVelocity = randomXDirection; + + } + public void setYDirection(int randomYDirection){ + yVelocity=randomYDirection; + } + public void move(){ + x+=xVelocity; + y+=yVelocity; + } + public void draw(Graphics g){ + g.setColor(Color.white); + g.fillOval(x, y, height, width); + } +} diff --git a/Pong Game/GameFrame.java b/Pong Game/GameFrame.java new file mode 100644 index 00000000..c606eca5 --- /dev/null +++ b/Pong Game/GameFrame.java @@ -0,0 +1,22 @@ +import java.awt.*; + +import javax.swing.*; + + + +public class GameFrame extends JFrame{ + + GamePanel panel; + GameFrame(){ + panel = new GamePanel(); + this.add(panel); + this.setTitle("Pong Game"); + this.setResizable(false); + this.setBackground(Color.black); + this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + this.pack(); + this.setVisible(true); + this.setLocationRelativeTo(null); + + } +} diff --git a/Pong Game/GamePanel.java b/Pong Game/GamePanel.java new file mode 100644 index 00000000..50057651 --- /dev/null +++ b/Pong Game/GamePanel.java @@ -0,0 +1,143 @@ +import java.awt.*; +import java.awt.event.*; +import java.util.*; +import javax.swing.*; + +public class GamePanel extends JPanel implements Runnable{ + + static final int GAME_WIDTH = 1000; + static final int GAME_HEIGHT = (int)(GAME_WIDTH * (0.5555)); + static final Dimension SCREEN_SIZE = new Dimension(GAME_WIDTH,GAME_HEIGHT); + static final int BALL_DIAMETER = 20; + static final int PADDLE_WIDTH = 25; + static final int PADDLE_HEIGHT = 100; + Thread gameThread; + Image image; + Graphics graphics; + Random random; + Paddle paddle1; + Paddle paddle2; + Ball ball; + Score score; + + GamePanel(){ + newPaddles(); + newBall(); + score = new Score(GAME_WIDTH,GAME_HEIGHT); + this.setFocusable(true); + this.addKeyListener(new AL()); + this.setPreferredSize(SCREEN_SIZE); + + gameThread = new Thread(this); + gameThread.start(); + } + + public void newBall() { + random = new Random(); + ball = new Ball((GAME_WIDTH/2)-(BALL_DIAMETER/2),random.nextInt(GAME_HEIGHT-BALL_DIAMETER),BALL_DIAMETER,BALL_DIAMETER); + } + public void newPaddles() { + paddle1 = new Paddle(0,(GAME_HEIGHT/2)-(PADDLE_HEIGHT/2),PADDLE_WIDTH,PADDLE_HEIGHT,1); + paddle2 = new Paddle(GAME_WIDTH-PADDLE_WIDTH,(GAME_HEIGHT/2)-(PADDLE_HEIGHT/2),PADDLE_WIDTH,PADDLE_HEIGHT,2); + } + public void paint(Graphics g) { + image = createImage(getWidth(),getHeight()); + graphics = image.getGraphics(); + draw(graphics); + g.drawImage(image,0,0,this); + } + public void draw(Graphics g) { + paddle1.draw(g); + paddle2.draw(g); + ball.draw(g); + score.draw(g); +Toolkit.getDefaultToolkit().sync(); // I forgot to add this line of code in the video, it helps with the animation + + } + public void move() { + paddle1.move(); + paddle2.move(); + ball.move(); + } + public void checkCollision() { + + //bounce ball off top & bottom window edges + if(ball.y <=0) { + ball.setYDirection(-ball.yVelocity); + } + if(ball.y >= GAME_HEIGHT-BALL_DIAMETER) { + ball.setYDirection(-ball.yVelocity); + } + //bounce ball off paddles + if(ball.intersects(paddle1)) { + ball.xVelocity = Math.abs(ball.xVelocity); + ball.xVelocity++; //optional for more difficulty + if(ball.yVelocity>0) + ball.yVelocity++; //optional for more difficulty + else + ball.yVelocity--; + ball.setXDirection(ball.xVelocity); + ball.setYDirection(ball.yVelocity); + } + if(ball.intersects(paddle2)) { + ball.xVelocity = Math.abs(ball.xVelocity); + ball.xVelocity++; //optional for more difficulty + if(ball.yVelocity>0) + ball.yVelocity++; //optional for more difficulty + else + ball.yVelocity--; + ball.setXDirection(-ball.xVelocity); + ball.setYDirection(ball.yVelocity); + } + //stops paddles at window edges + if(paddle1.y<=0) + paddle1.y=0; + if(paddle1.y >= (GAME_HEIGHT-PADDLE_HEIGHT)) + paddle1.y = GAME_HEIGHT-PADDLE_HEIGHT; + if(paddle2.y<=0) + paddle2.y=0; + if(paddle2.y >= (GAME_HEIGHT-PADDLE_HEIGHT)) + paddle2.y = GAME_HEIGHT-PADDLE_HEIGHT; + //give a player 1 point and creates new paddles & ball + if(ball.x <=0) { + score.player2++; + newPaddles(); + newBall(); + System.out.println("Player 2: "+score.player2); + } + if(ball.x >= GAME_WIDTH-BALL_DIAMETER) { + score.player1++; + newPaddles(); + newBall(); + System.out.println("Player 1: "+score.player1); + } + } + public void run() { + //game loop + long lastTime = System.nanoTime(); + double amountOfTicks =60.0; + double ns = 1000000000 / amountOfTicks; + double delta = 0; + while(true) { + long now = System.nanoTime(); + delta += (now -lastTime)/ns; + lastTime = now; + if(delta >=1) { + move(); + checkCollision(); + repaint(); + delta--; + } + } + } + public class AL extends KeyAdapter{ + public void keyPressed(KeyEvent e) { + paddle1.keyPressed(e); + paddle2.keyPressed(e); + } + public void keyReleased(KeyEvent e) { + paddle1.keyReleased(e); + paddle2.keyReleased(e); + } + } +} diff --git a/Pong Game/Paddle.java b/Pong Game/Paddle.java new file mode 100644 index 00000000..90407aac --- /dev/null +++ b/Pong Game/Paddle.java @@ -0,0 +1,76 @@ +import java.awt.*; +import java.awt.event.*; + + + +public class Paddle extends Rectangle{ + int id; + int yVelocity; + int speed=10; + Paddle(int x, int y, int PADDLE_WIDTH, int PADDLE_HEIGHT, int id){ + super(x,y,PADDLE_WIDTH,PADDLE_HEIGHT); + this.id=id; + } + + public void keyPressed(KeyEvent e){ + switch (id){ + case 1: + if(e.getKeyCode()==KeyEvent.VK_W){ + setYDirection(-speed); + move(); + } + if(e.getKeyCode()==KeyEvent.VK_S){ + setYDirection(speed); + move(); + } + break; + case 2: + if(e.getKeyCode()==KeyEvent.VK_UP){ + setYDirection(-speed); + move(); + } + if(e.getKeyCode()==KeyEvent.VK_DOWN){ + setYDirection(speed); + move(); + } + break; + } + } + public void keyReleased(KeyEvent e){ + switch (id){ + case 1: + if(e.getKeyCode()==KeyEvent.VK_W){ + setYDirection(0); + move(); + } + if(e.getKeyCode()==KeyEvent.VK_S){ + setYDirection(0); + move(); + } + break; + case 2: + if(e.getKeyCode()==KeyEvent.VK_UP){ + setYDirection(0); + move(); + } + if(e.getKeyCode()==KeyEvent.VK_DOWN){ + setYDirection(0); + move(); + } + break; + } + } + public void setYDirection(int yDirection){ + yVelocity = yDirection; + } + public void move(){ + y=y+yVelocity; + } + public void draw(Graphics g){ + if (id==1) + g.setColor(Color.BLUE); + else + g.setColor(Color.red); + g.fillRect(x, y, width, height); + } +} diff --git a/Pong Game/PongGame.java b/Pong Game/PongGame.java new file mode 100644 index 00000000..d39f3674 --- /dev/null +++ b/Pong Game/PongGame.java @@ -0,0 +1,8 @@ +public class PongGame { + + public static void main(String[] args) { + + GameFrame frame = new GameFrame(); + + } +} diff --git a/Pong Game/README.md b/Pong Game/README.md new file mode 100644 index 00000000..5118113a --- /dev/null +++ b/Pong Game/README.md @@ -0,0 +1,26 @@ +# Java-Pong-Game + +This is a desktop application, built using Java, to play basic pong game. + + + +- In the top-centre, it is the Score of the match. +- The Control for blue paddle are 'W'(for up) and 'S'(for down) keys, and for red one, the controls are default up(↑) and down(↓) keys. + +#### Click here to see the full gameplay [Demo](https://user-images.githubusercontent.com/77228428/190872810-9b564f0c-4171-4336-9fe6-7098aec247bc.mp4). + +## Setup the Project on your local system + +- It is really simple to setup the project on your local system. +- You need to `fork` this repository, then clone that forked repository by `git clone <link of your fork>` in any folder of your system. +- You have cloned this repository successfully. Now, there are few pre-requisite before running the project, these are the following - + 1. Java must be installed correctly on your system. + + 2. Any code editor or IDE for opening the project. My preference would IntelliJ Idea as IDE. +- After meeting above requirements you are ready to use the project. +- Open your IDE/editor and then open this project in that. If Project SDK is not configured, you need to setup that manually. +- Now finally, simply run the Pong.java file. + +You can add features as you like and make a pull request. A pull request is highly appreciable. + +Thank you diff --git a/Pong Game/Score.java b/Pong Game/Score.java new file mode 100644 index 00000000..665bdce8 --- /dev/null +++ b/Pong Game/Score.java @@ -0,0 +1,23 @@ +import java.awt.*; + + + + +public class Score extends Rectangle{ + static int GAME_WIDTH; + static int GAME_HEIGHT; + int player1; + int player2; + + Score(int GAME_WIDTH, int GAME_HEIGHT){ + Score.GAME_WIDTH = GAME_WIDTH; + Score.GAME_HEIGHT=GAME_HEIGHT; + } + public void draw(Graphics g){ + g.setColor(Color.white); + g.setFont(new Font("Consolas", Font.PLAIN,60)); + g.drawLine(GAME_WIDTH/2,0,GAME_WIDTH/2,GAME_HEIGHT); + g.drawString(String.valueOf(player1/10)+String.valueOf(player1%10), (GAME_WIDTH/2)-85, 50); + g.drawString(String.valueOf(player2/10)+String.valueOf(player2%10), (GAME_WIDTH/2)+20, 50); + } +} diff --git a/PrintTicket1.class b/PrintTicket1.class new file mode 100644 index 00000000..cc8d33ee Binary files /dev/null and b/PrintTicket1.class differ diff --git a/PrintTicket1.java b/PrintTicket1.java new file mode 100644 index 00000000..609e6d6c --- /dev/null +++ b/PrintTicket1.java @@ -0,0 +1,103 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + +public class PrintTicket1 extends JFrame +{ + public PrintTicket1(String sFrom, String sTo, String sClass, Integer iAdult, Integer iChildren, Integer iInfant, String sBookingDate, Integer iPrice, String sTime) + { + Container c=getContentPane(); + c.setLayout(new BorderLayout()); + + + JPanel Panel2 = new JPanel(null); + + Panel2.setPreferredSize(new Dimension(500,200)); + + JLabel LTitle = new JLabel("<html><b><font color=\"#C71585\",size=\"7\">AirLine Ticket</font></b></html>"); + JLabel LFrom = new JLabel("<html><b><font color=\"#000000\">From : </font></b><font color=\"#778899\">"+ sFrom+"</font></html>" ); + JLabel LTo = new JLabel("<html><font color=\"#000000\">To : </font><font color=\"#778899\">"+sTo+"</font></html>"); + JLabel LClass = new JLabel("<html><font color=\"#000000\">Class : </font><font color=\"#778899\">"+sClass+"</font></html>" ); + JLabel LBookingDate = new JLabel("<html><font color=\"#000000\">Traveling Date : </font><font color=\"#778899\">"+ sBookingDate+"</font></html>" ); + JLabel LPrice = new JLabel("<html><font color=\"#000000\">Total Price : </font><font color=\"#778899\">"+ iPrice+"</font></html>" ); + JLabel LTime = new JLabel("<html><font color=\"#000000\">DepatureTime : </font><font color=\"#778899\">"+ sTime+"</font></html>" ); + JLabel LAdult = new JLabel("<html><font color=\"#000000\">Adult : </font><font color=\"#778899\">"+iAdult+"</font></html>" ); + JLabel LChildren = new JLabel("<html><font color=\"#000000\">Children : </font><font color=\"#778899\">"+ iChildren+"</font></html>" ); + JLabel LInfant = new JLabel("<html><font color=\"#000000\">Infant : </font><font color=\"#778899\">"+iInfant+"</font></html>" ); + JLabel LWishes = new JLabel("<html><body><I><font color=\"#D2B48C\">Wish you a happy journy</font></I></body></html>"); + + + JLabel LTicketNo=new JLabel("<html><font color=\"#000000\">TicketNumber : </font></html>"); + JLabel LBookedBy=new JLabel("<html><font color=\"#000000\">BookedBy : </font></html>"); + + JLabel LEmpty = new JLabel("---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"); + JLabel LDemo = new JLabel("<html><U><font color=\"#8FBC8F\">AirLine-Project Developed By</font></U></html>"); + JLabel LFranklin=new JLabel("<html><I><font color=\"#8FBC8F\">R Franklin Bourgia Singh</font></I></html>"); + JLabel LRavi=new JLabel("<html><I><font color=\"#8FBC8F\">V.R Ravi Sankar</font></I></html>"); + JLabel LMayuran=new JLabel("<html><I><font color=\"#8FBC8F\">B Mayuran</font></I></html>"); + JLabel LSathya=new JLabel("<html><I><font color=\"#8FBC8F\">Sathyaraj</font></I></html>"); + + + LTitle.setBounds(170,15,500,45); + LFrom.setBounds(20,80,300,20); + + LTo.setBounds(20,125,300,20); + LClass.setBounds(20,170,300,20); + LBookingDate.setBounds(20,215,300,20); + LPrice.setBounds(20,260,300,20); + LTime.setBounds(20,305,300,20); + LAdult.setBounds(20,345,300,20); + LChildren.setBounds(20,385,300,20); + LInfant.setBounds(20,430,300,20); + + LWishes.setBounds(530,435,300,20); + + + LTicketNo.setBounds(320,80,300,20); + LBookedBy.setBounds(320,125,300,20); + + LEmpty.setBounds(3,445,1000,20); + + LDemo.setBounds(280,465,300,20); + LFranklin.setBounds(285,485,300,20); + LRavi.setBounds(285,505,300,20); + LMayuran.setBounds(285,525,300,20); + LSathya.setBounds(285,545,300,20); + + + Panel2.add(LTitle); + Panel2.add(LFrom); + Panel2.add(LTo); + Panel2.add(LClass); + Panel2.add(LBookingDate); + Panel2.add(LAdult); + Panel2.add(LChildren); + Panel2.add(LInfant); + Panel2.add(LPrice); + Panel2.add(LTime); + //Panel2.add(LEmpty); + + Panel2.add(LWishes); + + Panel2.add(LTicketNo); + Panel2.add(LBookedBy); + Panel2.add(LEmpty); + Panel2.add(LDemo); + + + Panel2.add(Yugesh Verma); + Panel2.add(gopi pal); + Panel2.add(neeraj); + Panel2.add(sunil); + + + Panel2.setBackground(Color.white); + + c.add(Panel2, BorderLayout.CENTER); + + + //pack(); + setSize(700,650); + setVisible(true); + } +} diff --git a/Project.java b/Project.java new file mode 100644 index 00000000..b871ffa3 --- /dev/null +++ b/Project.java @@ -0,0 +1,44 @@ +package com.company; +import java.util.Scanner; +import java.util.Random; + +public class Project { + public static void main(String[] args) { + //0 for Rock + //1 for paper + //2 for scissors + //taking input from user... + + Scanner input=new Scanner(System.in); + System.out.print("Enter 0 for Rock, 1 for Paper, 2 for Scissors : "); + int user_Input=input.nextInt(); + input.close();//closing the input + //randomly takes input from computer.... + + Random rand=new Random(); + int Computer_input=rand.nextInt(3); + + + if(user_Input==Computer_input){ + System.out.println("Match Draw"); + } + else if(user_Input==0 && Computer_input==1 || user_Input==2 && Computer_input==0 || user_Input==1 && Computer_input==2 ){ + System.out.println("Congrats You Win"); + } + else{ + System.out.println("Computer Win"); + } + + + if(Computer_input==0){ + System.out.println("Computer Choice = Rock"); + } + else if(Computer_input==1){ + System.out.println("Computer Choice = Paper"); + } + else if(Computer_input==2){ + System.out.println("Computer Choice = Scissors"); + } + + } +} diff --git a/Puzzle Game/Puzzle Game using AWT.java b/Puzzle Game/Puzzle Game using AWT.java new file mode 100644 index 00000000..c4fe82d5 --- /dev/null +++ b/Puzzle Game/Puzzle Game using AWT.java @@ -0,0 +1,178 @@ +import java.awt.*; +import java.awt.event.*; +import javax.swing.JOptionPane; +public class Puzzle extends Frame implements ActionListener{ +Button b1,b2,b3,b4,b5,b6,b7,b8,b9; +Puzzle(){ + super("Puzzle - JavaTpoint"); + b1=new Button("1"); + b1.setBounds(50,100,40,40); + b2=new Button("2"); + b2.setBounds(100,100,40,40); + b3=new Button("3"); + b3.setBounds(150,100,40,40); + b4=new Button("4"); + b4.setBounds(50,150,40,40); + b5=new Button("5"); + b5.setBounds(100,150,40,40); + b6=new Button("6"); + b6.setBounds(150,150,40,40); + b7=new Button("7"); + b7.setBounds(50,200,40,40); + b8=new Button(""); + b8.setBounds(100,200,40,40); + b9=new Button("8"); + b9.setBounds(150,200,40,40); + + b1.addActionListener(this); + b2.addActionListener(this); + b3.addActionListener(this); + b4.addActionListener(this); + b5.addActionListener(this); + b6.addActionListener(this); + b7.addActionListener(this); + b8.addActionListener(this); + b9.addActionListener(this); + + add(b1);add(b2);add(b3);add(b4);add(b5);add(b6);add(b7);add(b8);add(b9); + setSize(400,400); + setLayout(null); + setVisible(true); +} +public void actionPerformed(ActionEvent e){ + if(e.getSource()==b1){ + String label=b1.getLabel(); + if(b2.getLabel().equals("")){ + b2.setLabel(label); + b1.setLabel(""); + } + if(b4.getLabel().equals("")){ + b4.setLabel(label); + b1.setLabel(""); + } + } + if(e.getSource()==b2){ + String label=b2.getLabel(); + if(b1.getLabel().equals("")){ + b1.setLabel(label); + b2.setLabel(""); + } + if(b3.getLabel().equals("")){ + b3.setLabel(label); + b2.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b2.setLabel(""); + } + } + if(e.getSource()==b3){ + String label=b3.getLabel(); + if(b2.getLabel().equals("")){ + b2.setLabel(label); + b3.setLabel(""); + } + if(b6.getLabel().equals("")){ + b6.setLabel(label); + b3.setLabel(""); + } + } + if(e.getSource()==b4){ + String label=b4.getLabel(); + if(b1.getLabel().equals("")){ + b1.setLabel(label); + b4.setLabel(""); + } + if(b7.getLabel().equals("")){ + b7.setLabel(label); + b4.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b4.setLabel(""); + } + } + if(e.getSource()==b5){ + String label=b5.getLabel(); + if(b2.getLabel().equals("")){ + b2.setLabel(label); + b5.setLabel(""); + } + if(b6.getLabel().equals("")){ + b6.setLabel(label); + b5.setLabel(""); + } + if(b4.getLabel().equals("")){ + b4.setLabel(label); + b5.setLabel(""); + } + if(b8.getLabel().equals("")){ + b8.setLabel(label); + b5.setLabel(""); + } + } + if(e.getSource()==b6){ + String label=b6.getLabel(); + if(b9.getLabel().equals("")){ + b9.setLabel(label); + b6.setLabel(""); + } + if(b3.getLabel().equals("")){ + b3.setLabel(label); + b6.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b6.setLabel(""); + } + } + if(e.getSource()==b7){ + String label=b7.getLabel(); + if(b4.getLabel().equals("")){ + b4.setLabel(label); + b7.setLabel(""); + } + if(b8.getLabel().equals("")){ + b8.setLabel(label); + b7.setLabel(""); + } + } + if(e.getSource()==b8){ + String label=b8.getLabel(); + if(b9.getLabel().equals("")){ + b9.setLabel(label); + b8.setLabel(""); + } + if(b7.getLabel().equals("")){ + b7.setLabel(label); + b8.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b8.setLabel(""); + } + } + if(e.getSource()==b9){ + String label=b9.getLabel(); + if(b6.getLabel().equals("")){ + b6.setLabel(label); + b9.setLabel(""); + } + if(b8.getLabel().equals("")){ + b8.setLabel(label); + b9.setLabel(""); + } + } + + //congrats code + if(b1.getLabel().equals("1")&&b2.getLabel().equals("2")&&b3.getLabel() + .equals("3")&&b4.getLabel().equals("4")&&b5.getLabel().equals("5") + &&b6.getLabel().equals("6")&&b7.getLabel().equals("7")&&b8.getLabel() + .equals("8")&&b9.getLabel().equals("")){ + JOptionPane.showMessageDialog(this,"Congratulations! You won."); + } +} +public static void main(String[] args) { + new Puzzle(); +} +} \ No newline at end of file diff --git a/Quick Sort b/Quick Sort new file mode 100644 index 00000000..b9d13adc --- /dev/null +++ b/Quick Sort @@ -0,0 +1,58 @@ +import java.util.*; + +public class quick_sort { + + static void swap(int[] arr, int i, int j) + { + int temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + } + + static int partition(int[] arr, int low, int high) + { + int pivot = arr[high]; + + + int i = (low - 1); + + for (int j = low; j <= high - 1; j++) { + + if (arr[j] < pivot) { + i++; + swap(arr, i, j); + } + } + swap(arr, i + 1, high); + return (i + 1); + } + + static void quickSort(int[] arr, int low, int high) + { + if (low < high) { + + int pi = partition(arr, low, high); + + quickSort(arr, low, pi - 1); + quickSort(arr, pi + 1, high); + } + } + public static void printArr(int[] arr) + { + for (int i = 0; i < arr.length; i++) { + System.out.print(arr[i] + " "); + } + } + + public static void main(String[] args) { + Scanner sc =new Scanner(System.in); + int n=sc.nextInt(); + int[] arr=new int[n]; + for(int i=0;i<n;i++) { + arr[i]=sc.nextInt(); + } + quickSort(arr,0,n-1); + printArr(arr); + } + +} diff --git a/Quiz Management System/quiz.exe b/Quiz Management System/quiz.exe new file mode 100644 index 00000000..9e32126d Binary files /dev/null and b/Quiz Management System/quiz.exe differ diff --git a/Quiz project/AnswerKey.txt b/Quiz project/AnswerKey.txt new file mode 100644 index 00000000..c0f5f3be --- /dev/null +++ b/Quiz project/AnswerKey.txt @@ -0,0 +1,3 @@ +c +c +d diff --git a/Quiz project/Client.java b/Quiz project/Client.java new file mode 100644 index 00000000..13207995 --- /dev/null +++ b/Quiz project/Client.java @@ -0,0 +1,49 @@ +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.net.Socket; +import java.util.Scanner; + +class Client { + public static void main(String[] args) { + int port = 999; + System.out.print("Enter your Participant ID (1/2/3): "); + Scanner scanner = new Scanner(System.in); + int id = scanner.nextInt(); + scanner.nextLine(); + port += id; + Socket socket = null; + try { + socket = new Socket("localhost", port); + } catch (Exception e) { + System.out.println("!! ERROR while Connecting to the Server !!"); + System.out.println("** Host has not yet created the Quiz, Host should connect first **"); + System.exit(1); + } + System.out.println("Connected to server.."); + System.out.print("Enter your name: "); + String name = scanner.nextLine(); + try { + DataInputStream dataInputStream = new DataInputStream(socket.getInputStream()); + DataOutputStream dataOutputStream = new DataOutputStream(socket.getOutputStream()); + dataOutputStream.writeUTF(name); + int total_ques = dataInputStream.readInt(); + int time_per_ques = dataInputStream.readInt(); + for (int i = 0; i < total_ques; i++) { + String ques = dataInputStream.readUTF(); + String options = dataInputStream.readUTF(); + System.out.println(ques); + System.out.println(options); + timer t = new timer(); + String ans = t.getInput(time_per_ques); + dataOutputStream.writeUTF(ans); + } + + System.out.println("!! You had successfully completed the Quiz !!"); + System.out.println("***Contact the owner for Final Score***"); + socket.close(); + } catch (IOException e) { + System.out.println(e); + } + } +} diff --git a/Quiz project/ClientThread.java b/Quiz project/ClientThread.java new file mode 100644 index 00000000..3ea2b4a5 --- /dev/null +++ b/Quiz project/ClientThread.java @@ -0,0 +1,110 @@ +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.concurrent.TimeUnit; + +class Quiz { + int quesNum = 0; + int threadnum = 0; + static String Question, Option, Answer; + static boolean has_started = false; + + void sendQues(DataOutputStream dataOutputStream, int count) throws IOException, InterruptedException { + threadnum++; + if (threadnum < 3) { + synchronized (this) { + wait(); + } + } + if (!has_started) { + if (Initiator.initiator()) { // call initiator if everything is fine + System.out.println("!! Quiz is LIVE now !!"); + System.out.println("-------------------------"); + } + has_started = true; + } + dataOutputStream.writeUTF(Question); + dataOutputStream.writeUTF(Option); + if (threadnum == 3) + synchronized (this) { + Answer = reader.readAns(); + threadnum = 0; + notifyAll(); + } + TimeUnit.SECONDS.sleep(5); + } + + int receiveAns(DataInputStream dataInputStream) throws IOException { + String ans = dataInputStream.readUTF(); + if (ans.equals(Answer)) + return 1; + return 0; + } +} + +public class ClientThread extends Thread { + static int count = 0, name_count = 0, total_ques = 0, time_per_ques = 0; + final static Quiz quiz = new Quiz(); + static boolean isAnswering = false; + String name; + int port, score = 0; + + ClientThread(int port) { + this.port = port; + } + + public static void initialise(int total_ques, int time_per_ques) { + ClientThread.total_ques = total_ques; + ClientThread.time_per_ques = time_per_ques; + } + + @Override + public void run() { + try { + ServerSocket serverSocket = new ServerSocket(port); + // connecting to Server.. + Socket socket = serverSocket.accept(); + DataOutputStream dataOutputStream = new DataOutputStream(socket.getOutputStream()); + DataInputStream dataInputStream = new DataInputStream(socket.getInputStream()); + name = dataInputStream.readUTF(); + dataOutputStream.writeInt(total_ques); + dataOutputStream.writeInt(time_per_ques); + System.out.println(name + " Connected."); + count++; + + while (quiz.quesNum < total_ques) { + + if (port == 1000) { + String[] list = reader.readQues(); + // call readQues which reads Question from generated file + quiz.Question = list[0]; + quiz.Option = list[1]; + } else { + Thread.sleep(1000); + } + quiz.sendQues(dataOutputStream, count); + if (port == 1000) + isAnswering = true; + score += quiz.receiveAns(dataInputStream); + if (port == 1000) { + isAnswering = false; + count = 0; + quiz.quesNum++; + } else { + if (quiz.quesNum == total_ques - 1 && isAnswering) + break; + Thread.sleep(500); + } + } + serverSocket.close(); + // Print participants score on Host side + System.out.println(name + "'s score: " + score); + } catch (IOException e) { + e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } +} diff --git a/Quiz project/General_Knowledge.txt b/Quiz project/General_Knowledge.txt new file mode 100644 index 00000000..767aef77 --- /dev/null +++ b/Quiz project/General_Knowledge.txt @@ -0,0 +1,61 @@ +Which country gifted the Statue of Liberty to USA in 1886? +a.) France b.) Canada c.) Brazil d.) England +The council of ministers is responsible to the- +(a) Rasja Sabha (b) President (c) Lok Sabha (d) Prime Minister +Dead Sea is located between which two countries? +a.) Jordan and Sudan b.) Jordan and Israel c.) Turkey and UAE d.) UAE and Egypt +In which ocean Bermuda Triangle region is located? +a.) Atlantic b.) Indian c.) Pacific d.) Arctic +Which country is known as the playground of Europe? +a.) Austria b.) Holland c.) Switzerland d.) Italy +Which country is also known as the Land of Rising Sun? +a.) Japan b.) New Zealand c.) Fiji d.) China +Which country is known as the Land of Thunderbolts? +a.) China b.) Bhutan c.) Mongolia d.) Thailand +Which continent has the highest number of countries? +a.) Asia b.) Europe c.) North America d.) Africa +In which country, white elephant is found? +a.) India b.) Sri Lanka c.) Thailand d.) Malaysia +Total number of oceans in the World is +a.) 3 b.) 5 c.) 7 d.) 12 +Which country is also known as the Land of Thousand Lakes? +a.) Iceland b.) Norway c.) Finland d.) Switzerland +Which Plateau is known as the Roof of the World? +a.) Andes b.) Himalaya c.) Karakoram d.) Pamir +The world’s longest straight road without any corners is located in +a.) USA b.) Australia c.) Saudi Arabia d.) China +Which one is the biggest island in the World? +a.) Borneo b.) Finland c.) Sumatra d.) Greenland +In which year Hong Kong became a part of China after British Rule? +a.) 1982 b.) 1989 c.) 1995 d.) 1997 +Which one is the World highest-altitude civilian airport? +a.) Daocheng Yading Airport, China b.) Kushok Bakula Airport, Leh c.) Qamdo Airport, China d.) None of the above +Which river is flowing through Grand Canyon in Arizona, USA? +a.) Missouri River b.) Colorado River c.) Mississippi River d.) Yukon River +Which one is the largest tropical rain forest in the world? +a.) Amazon b.) Bosawas c.) Southeast Asian Rain Forest d.) Daintree Rain Forest +How many countries were participated as founding member of United Nation? +a.) 45 b.) 50 c.) 51 d.) 75 +Which one is the longest continental mountain range in the world? +a.) Himalaya b.) Andes c.) Rocky Mountains d.) Ural Mountains +The State of Climate Ambition is a report released by which organization? +a.)UNGA b.)UNDP c.)IMD d.)WHO +The executive power of the Union is vested in which one of the below? +A. Prime minister B. Home minister C. Vice-president D. President +The Pressure groups are: +a.) Political organisations b.) Economic organisation c.) Moral organisations d.) Organisations of universal character +When was the first Parliamentary Forum on Children constituted? +a.) 2006 b.) 2007 c.) 2008 d.) 2009 +What is the minimum age to become a member of Lok Sabha? +a.) 30 years b.) 18 years c.) 25 years d.) 35 years +The concept of Federal System in Indian Constitution is taken from: +a.) Ireland b.) Australia c.) Germany d.) Canada +In which year was the Anti-Defection law passed? +a.)1950 b.)1960 c.)1985 d.)2005 +Which country has become the first one to approve oral Covid pill? +a) US b) UK c) Canada d) India +Which company has shut down its facial recognition system? +a) Apple b) Google c) Facebook d) Microsoft +India will achieve net-zero carbon emissions by which year, as per PM Modi. +a) 2040 b) 2050 c) 2070 d) 2090 + diff --git a/Quiz project/General_Knowledge_sol.txt b/Quiz project/General_Knowledge_sol.txt new file mode 100644 index 00000000..c97cb474 --- /dev/null +++ b/Quiz project/General_Knowledge_sol.txt @@ -0,0 +1,30 @@ +a +c +b +a +c +a +b +d +c +b +c +d +c +d +d +a +b +a +c +b +b +d +d +a +c +d +c +b +c +c \ No newline at end of file diff --git a/Quiz project/Host.java b/Quiz project/Host.java new file mode 100644 index 00000000..a5336f00 --- /dev/null +++ b/Quiz project/Host.java @@ -0,0 +1,19 @@ +abstract class Host { + + // call subject selector + void subject() { + subject_selector.select_subjet(); + } + + // call Question_setter + boolean questions() { + return question_setter.set_questions(); + } + + // call Set_time ` + + public void time(int wait) { + Set_time.set(wait); + } + +} diff --git a/Quiz project/Initiator.java b/Quiz project/Initiator.java new file mode 100644 index 00000000..bbb85e82 --- /dev/null +++ b/Quiz project/Initiator.java @@ -0,0 +1,68 @@ +import java.util.Scanner; + +public class Initiator extends Thread { + + public static boolean initiator() { + + boolean flag = false; + int countdown = 5; + Scanner scan = new Scanner(System.in); + while (flag == false) { + + System.out.println("!! Enter 'START' to begin the Quiz !!"); + + String input = scan.nextLine(); + + if (input.equals("START")) { + System.out.print("Quiz starting in " + countdown); + while (countdown-- > 0) { + try { + Thread.sleep(1500); + } catch (InterruptedException e) { + } + System.out.print("\b" + countdown); + } + System.out.println(""); + flag = true; + return flag; + } else { + System.out.println( + "Please enter 'START' correctly. If you not want to start quiz then just enter 'QUIT'"); + String in = scan.next(); + if (in.equals("QUIT")) { + System.out.print("EXITING the Quiz"); + int i = 2; + while (i-- > 0) { + for (int j = 0; j < 3; j++) { + + System.out.print("."); + try { + Thread.sleep(700); + } catch (InterruptedException e) { + } + if (j == 2) { + System.out.print("\b\b\b"); + } + } + } + return false; + } + if (in.equals("START")) { + input = "START"; + System.out.print("Quiz starting in " + countdown); + while (countdown-- > 0) { + try { + Thread.sleep(1500); + } catch (InterruptedException e) { + } + System.out.print("\b" + countdown); + } + System.out.println(""); + return true; + + } + } + } + return true; + } +} diff --git a/Quiz project/Main.java b/Quiz project/Main.java new file mode 100644 index 00000000..1e707c5d --- /dev/null +++ b/Quiz project/Main.java @@ -0,0 +1,42 @@ +import java.util.Scanner; + +public class Main extends Host{ + public static void main(String[] args) { + + Host Host_obj = new Main(); + + synchronized (Host_obj) { + + // select subject + Host_obj.subject(); + + // select questions + boolean Questions = Host_obj.questions(); + if (Questions) { + System.out.println("Successfully selected " + question_setter.ques + " questions for the Quiz.."); + } else { + System.out.println("!! Unable to select questions !!"); + } + + // select time for each question + System.out.print("Enter time(in seconds) for each question : "); + int time; + Scanner scan = new Scanner(System.in); + + time = scan.nextInt(); + Host_obj.time(time); + + System.out.println("Waiting for participants to connect.."); + + // Creating ClientThreads and connect to server. + ClientThread.initialise(question_setter.ques, Set_time.t); + ClientThread clientThread = new ClientThread(1000); + ClientThread clientThread1 = new ClientThread(1001); + ClientThread clientThread2 = new ClientThread(1002); + + clientThread.start(); + clientThread1.start(); + clientThread2.start(); + } + } +} \ No newline at end of file diff --git a/Quiz project/Questions.txt b/Quiz project/Questions.txt new file mode 100644 index 00000000..01013cae --- /dev/null +++ b/Quiz project/Questions.txt @@ -0,0 +1,6 @@ +Which of these packages contains the exception Stack Overflow in Java? +a) java.io b) java.system c) java.lang d) java.util +Which of these class is a superclass of every class in Java? +a) ArrayList class b) Abstract class c) Object class d) String class +Which of this method of class String is used to obtain a length of String object? +a) get() b) Sizeof() c) lengthof() d) length() diff --git a/Quiz project/Science.txt b/Quiz project/Science.txt new file mode 100644 index 00000000..edec097f --- /dev/null +++ b/Quiz project/Science.txt @@ -0,0 +1,60 @@ +Give the SI unit of resistivity. +a) ohm/metre2 b) ohm metre2 c) ohm metre d) ohm/metre +The equation → ∑e = ∑IR is applicable to which law? +a) Kirchhoff’s second law b) Kirchhoff’s junction rule c) Kirchhoff’s third law d) Newton’s Law +Which among the following is not attracted by magnets? +a) Iron b) Cobalt c) Copper d) Nickel +Holes are charge carriers in which one of the following? +a) Intrinsic semiconductors b) Ionic solids c) n-type semiconductors d) Metals +At absolute zero, Si acts as which of the following? +a) Non-metal b) Metal c) Insulator d) Capacitor +What is the semiconductor diode used as? +a) Oscillator b) Amplifier c) Rectifier d) Modulator +What is a Zener diode used as? +a) Oscillator b) Regulator c) Rectifier d) Filter +What is a transistor made up of? +a) Chip b) Insulator c) Semiconductor d) Metal +What are sunglasses made of? +a) Colored glasses b) Tin glass c) Silica d) Polaroids +Which of the following causes dispersion? +a) Refraction b) Reflection c) Total internal reflection d) Total internal dispersion +What will be the color of the sky in the absence of the atmosphere? +a) White b) Dark c) Blue d) Pink +Which among the following is denoted by δ? +a) Horizontal component b) Magnetic meridian c) Magnetic declination d) Magnetic inclination +At the magnetic North Pole of the Earth, what is the value of the angle of dip? +a) Zero b) Minimum c) Infinity d) Maximum +What is the net magnetic flux through a closed surface? +a) Positive b) Negative c) Zero d) Depends on the nature of the surface +Which among the following is the source of the magnetic field (magnetism)? +a) Mechanical origin b) Electrical origin c) Chemical origin d) Potential origin +Diamond is an example of _______ +a) solid with hydrogen bonding b) electrovalent solid c) covalent solid d) glass +Which of the following is not a crystal system? +a) Cubic b) Trigonal c) Triclinic d) Hexaclinic +Which type of solid crystals will conduct heat and electricity? +a) Ionic b) Covalent c) Molecular d) Metallic +Quartz is an example of ___________ +a) molecular solids b) ionic solids c) covalent solids d) metallic solids +Which of the following is a true solution? +a) Salt solution b) Ink c) Blood d) Starch solution +What is pumice stone an example of? +a) Solid aerosol b) Emulsion c) Liquid aerosol d) Solid foam +Which of the following forces is involved in physical adsorption? +a) Gravitational force b) Magnetic force c) Van der Waals force d) Electromagnetic force +Which of the following is present at the time of cracking of hydrocarbons? +a) Copper b) Zeolite c) Nickel d) Molybdenum +How does a catalyst change during a reaction? +a) Physically b) Mass-wise c) Chemically d) Quantitatively +Identify the compound which does not act as a target for drug action in the human body? +a) RNA b) DNA c) Vitamin C d) Protein +Alitame is ______ times sweeter than cane sugar. +a) 50 b) 100 c) 600 d) 2000 +Dishwashing liquids are examples of ______ +a) soaps b) anionic detergents c) cationic detergents d) non-ionic detergents +Amines are derivatives of ______ +a) NCl3 b) NH3 c) N2 d) CH3NH2 +How many lone pairs of electrons does the nitrogen atom of amines have? +a) 0 b) 1 c) 2 d) 3 +Which of the following is the least reactive functional group? +a) Alcohols b) Ethers c) Aldehydes d) Ketones \ No newline at end of file diff --git a/Quiz project/Science_sol.txt b/Quiz project/Science_sol.txt new file mode 100644 index 00000000..ad6599d8 --- /dev/null +++ b/Quiz project/Science_sol.txt @@ -0,0 +1,30 @@ +c +a +c +a +a +c +b +c +d +a +b +d +d +c +b +c +d +d +c +a +d +c +b +a +c +d +d +b +b +b \ No newline at end of file diff --git a/Quiz project/Set_time.java b/Quiz project/Set_time.java new file mode 100644 index 00000000..b1901fa8 --- /dev/null +++ b/Quiz project/Set_time.java @@ -0,0 +1,12 @@ + class Set_time extends Thread { + + static protected int t; + + static void set(int time) { + System.out.println("Participants have to answer each question in " + time + " seconds"); + + t = time; + + } + +} diff --git a/Quiz project/programming.txt b/Quiz project/programming.txt new file mode 100644 index 00000000..b5bc36c7 --- /dev/null +++ b/Quiz project/programming.txt @@ -0,0 +1,60 @@ +Which Set class should be most popular in a multi-threading environment, considering performance constraint? +a.)HashSet b.)ConcurrentSkipListSet c.)LinkedHashSet d.)CopyOnWriteArraySet +Which Map class should be most popular in a multi-threading environment, considering performance constraint? +a.)Hashtable b.)CopyOnWriteMap c.)ConcurrentHashMap d.)ConcurrentMap +Which allows the removal of elements from a collection? +a.)Enumeration b.)Iterator c.)Both d.)None of the above +In a stack, if a user tries to remove an element from an empty stack it is called _________ +a) Underflow b) Empty collection c) Overflow d) Garbage Collection +The self organizing list improves the efficiency of _______ +a) binary search b) jump search c) sublist search d) linear search +Symbol tables during compilation of program is efficiently implemented using __________ +a) a singly linked list b) a doubly linked list c) a self organizing list d) an array +The self organizing list improves _____ +a) average access time b) insertion c) deletion d) binary search +Which of these cannot be used for a variable name in Java? +a) identifier & keyword b) identifier c) keyword d) none of the mentioned +Which of the following is not a segment of memory in java? +a) Code Segment b) Register Segment c) Stack Segment d) Heap Segment +Which exception is thrown when java is out of memory? +a) MemoryError b) OutOfMemoryError c) MemoryOutOfBoundsException d) MemoryFullException +Which of these class is a superclass of every class in Java? +a) ArrayList class b) Abstract class c) Object class d) String class +Which of these keywords can be used to prevent Method overriding in Java? +a) final b) protected c) static d) constant +Which of these packages contains the exception Stack Overflow in Java? +a) java.io b) java.system c) java.lang d) java.util +Which one of the following is not an access modifier? +a) Protected b) Void c) Public d) Private +Which of this method of class String is used to obtain a length of String object? +a) get() b) Sizeof() c) lengthof() d) length() +Which of these constructors is used to create an empty String object? +a) String() b) String(void) c) String(0) d) None of the mentioned +Which of these is a method to clear all the data present in output buffers? +a) clear() b) flush() c) fflush() d) close() +Which of these is a super class of Character wrapper? +a) Long b) Digits c) Float d) Number +Which concept of Java is a way of converting real world objects in terms of class? +a) Polymorphism b) Encapsulation c) Abstraction d) Inheritance +Which of this method is used to find out that a thread is still running or not? +a) run() b) Alive() c) isAlive() d) checkRun() +Which of these method is used to implement Runnable interface? +a) stop() b) run() c) runThread() d) stopThread() +Which of the following allows us to call generic methods as a normal method? +a) Type Interface b) Interface c) Inner class d) All of the mentioned +Which of these is not a bitwise operator? +a) & b) &= c) |= d) <= +Which of these keywords is used to define interfaces in Java? +a) intf b) Intf c) interface d) Interface +Which of these access specifiers must be used for main() method? +a) private b) public c) protected d) none of the mentioned +What is the process by which we can control what parts of a program can access the members of a class? +a) Polymorphism b) Abstraction c) Encapsulation d) Recursion +Which of these access specifier must be used for class so that it can be inherited by another subclass? +a) public b) private c) protected d) none of the mentioned +Which of this keyword must be used to inherit a class? +a) super b) this c) extent d) extends +What is not type of inheritance? +a) Single inheritance b) Double inheritance c) Hierarchical inheritance d) Multiple inheritance +If super class and subclass have same variable name, which keyword should be used to use super class? +a) super b) this c) upper d) classname \ No newline at end of file diff --git a/Quiz project/programming_sol.txt b/Quiz project/programming_sol.txt new file mode 100644 index 00000000..2a73de9a --- /dev/null +++ b/Quiz project/programming_sol.txt @@ -0,0 +1,30 @@ +b +b +d +a +d +c +a +c +b +b +c +a +c +b +d +a +b +d +c +c +b +a +d +c +b +c +a +d +b +a \ No newline at end of file diff --git a/Quiz project/question_setter.java b/Quiz project/question_setter.java new file mode 100644 index 00000000..f5b93901 --- /dev/null +++ b/Quiz project/question_setter.java @@ -0,0 +1,83 @@ +import java.io.*; +import java.util.*; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.stream.*; + +public class question_setter { + public static int ques = 0; + + public static boolean set_questions() { + Set<Integer> que = new HashSet<Integer>(); + + Scanner s = new Scanner(System.in); + System.out.print("Enter number of Questions in Quiz: "); + int n = s.nextInt(); + + ques = n;// varaible ques contain no. of questions for Quiz + + System.out.println("Selecting qustions of " + subject_selector.subject + " ..."); + try { + Thread.sleep(2000); + } catch (InterruptedException e) { + System.out.print(e); + } + + int num = 0; + try { + FileWriter fw1 = new FileWriter("Questions.txt"); + FileWriter fw2 = new FileWriter("AnswerKey.txt"); + + while (n-- > 0) { + + boolean flag = false; + + while (!flag) { + num = (int) (Math.random() * 100); + + if (num <= 30 && num % 2 == 1) { + if (que.contains(num)) { + flag = false; + } else { + que.add(num); + flag = true; + } + } + } + num--; + + for (int i = 0; i < 2; i++) { + String line1; + try (Stream<String> lines = Files.lines(Paths.get(subject_selector.subject + ".txt"))) { + line1 = lines.skip(num).findFirst().get(); + + fw1.write(line1 + '\n'); + } + num++; + } + num--; + String line2; + try (Stream<String> lines = Files.lines(Paths.get(subject_selector.subject + "_sol" + ".txt"))) { + line2 = lines.skip((int) (num / 2)).findFirst().get(); + + fw2.write(line2 + '\n'); + } + + catch (IOException e) { + System.out.println(e); + } + + num += 2; + } + + fw1.close(); + fw2.close(); + } + + catch (IOException e) { + System.out.println(e); + } + + return true; + } +} \ No newline at end of file diff --git a/Quiz project/reader.java b/Quiz project/reader.java new file mode 100644 index 00000000..642802e5 --- /dev/null +++ b/Quiz project/reader.java @@ -0,0 +1,32 @@ +import java.io.*; +import java.util.Scanner; + +public class reader { + + static int currentQues = 0; + static FileInputStream fis1 = null, fis2 = null; + static Scanner sc1 = null, sc2 = null; + + //It reads the questions from Question.txt and returns the one question and its option + static String[] readQues() throws FileNotFoundException { + if (currentQues == 0) { + fis1 = new FileInputStream("Questions.txt"); + sc1 = new Scanner(fis1); + } + String[] list = new String[2]; + list[0] = sc1.nextLine(); + list[1] = sc1.nextLine(); + currentQues++; + return list; + } + + //It reads the answer of selected question from AnswerKey.txt and returns its correct option + static String readAns() throws FileNotFoundException { + if (currentQues == 1) { + fis2 = new FileInputStream("AnswerKey.txt"); + sc2 = new Scanner(fis2); + } + String ans = sc2.nextLine(); + return ans; + } +} \ No newline at end of file diff --git a/Quiz project/subject_selector.java b/Quiz project/subject_selector.java new file mode 100644 index 00000000..54fd766f --- /dev/null +++ b/Quiz project/subject_selector.java @@ -0,0 +1,30 @@ +import java.util.Scanner; + +public class subject_selector { + protected static String subject; + + static String select_subjet() { + + System.out.println("Select Subject by entering its option(1/2/3):-"); + System.out.println("1.) Programming 2.) General Knowledge 3.) Science"); + Scanner scan = new Scanner(System.in); + + int s = scan.nextInt(); + switch (s) { + case 1: + subject = "programming"; + break; + case 2: + subject = "General_knowledge"; + break; + case 3: + subject = "Science"; + break; + default: + System.out.println("Please select valid subject"); + System.exit(1); + } + return subject; + } + +} diff --git a/Quiz project/timer.java b/Quiz project/timer.java new file mode 100644 index 00000000..b0a5f855 --- /dev/null +++ b/Quiz project/timer.java @@ -0,0 +1,37 @@ +import java.util.Timer; +import java.util.TimerTask; +import java.io.*; + +public class timer { + private String str = "", str2 = ""; + BufferedReader in; + Timer timer = new Timer(); + boolean hasRun = false; + + TimerTask task = new TimerTask() { + @Override + public void run() { + hasRun = true; + if (str.equals("")) { + System.out.println("you had enter nothing. Press 'Enter' to proceed to next ques."); + System.out.println("------------------------------------------"); + } + timer.cancel(); + } + }; + + public String getInput(int seconds) throws IOException { + timer.schedule(task, seconds * 1000); + System.out.println("Answer within " + seconds + " seconds: "); + System.out.print("Your ans: "); + in = new BufferedReader(new InputStreamReader(System.in)); + str2 = in.readLine(); + if (!hasRun) { + timer.cancel(); + str = str2; + } + System.out.println("------------------------------------------"); + return str; + } + +} \ No newline at end of file diff --git a/QuizApp.java b/QuizApp.java new file mode 100644 index 00000000..8eeb4b0a --- /dev/null +++ b/QuizApp.java @@ -0,0 +1,41 @@ +import java.util.Scanner; + +public class QuizApp { + public static void main(String[] args) { + // Define some sample questions and answers + String[] questions = { + "What is the capital of France?", + "What is the largest planet in our solar system?", + "Who wrote Romeo and Juliet?" + }; + + String[] answers = { + "Paris", + "Jupiter", + "William Shakespeare" + }; + + // Initialize the quiz + int score = 0; + Scanner scanner = new Scanner(System.in); + + // Iterate through the questions + for (int i = 0; i < questions.length; i++) { + System.out.println(questions[i]); + String userAnswer = scanner.nextLine(); + + if (userAnswer.equalsIgnoreCase(answers[i])) { + System.out.println("Correct!\n"); + score++; + } else { + System.out.println("Incorrect. The correct answer is: " + answers[i] + "\n"); + } + } + + // Display the final score + System.out.println("Quiz complete! Your score is: " + score + " out of " + questions.length); + + // Close the scanner + scanner.close(); + } +} diff --git a/QuizUp/Login.java b/QuizUp/Login.java new file mode 100644 index 00000000..26e0d95d --- /dev/null +++ b/QuizUp/Login.java @@ -0,0 +1,76 @@ + +package quiz.application; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + + + +public class Login extends JFrame implements ActionListener { + + JButton rules, back; + JTextField tfname; + Login() { + getContentPane().setBackground(Color.WHITE); + setLayout(null); + + ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/login.jpeg")); + JLabel image = new JLabel(i1); + add(image); + + JLabel heading = new JLabel("QUIZ UP"); + heading.setBounds(810, 60, 300, 45); + heading.setFont(new Font("Consolas", Font.BOLD, 40)); + heading.setForeground(Color.DARK_GRAY); + add(heading); + + JLabel name = new JLabel("Enter Your Name"); + name.setBounds(810, 150, 300, 20); + name.setFont(new Font("Mongolian Baiti", Font.BOLD, 20)); + name.setForeground(Color.DARK_GRAY); + add(name); + + tfname = new JTextField(); + tfname.setBounds(735, 200, 300, 25); + tfname.setFont(new Font("Times New Roman", Font.BOLD, 20)); + add(tfname); + + rules = new JButton("Proceed"); + rules.setBounds(735, 270, 120, 25); + add(rules); + rules.setBackground(new Color(0,0,0)); + rules.addActionListener(this); + rules.setForeground(Color.WHITE); + + back = new JButton("Back"); + back.setBounds(915, 270, 120, 25); + add(back); + back.setBackground(new Color(0,0,0)); + back.addActionListener(this); + back.setForeground(Color.WHITE); + + image.setBounds(0, 0, 600, 500); + setSize(1200, 500); + setLocation(200, 150); + setVisible(true); + } + + public void actionPerformed(ActionEvent ae){ + if (ae.getSource() == rules) { + String name = tfname.getText(); + setVisible(false); + new Rules(name); + }else if (ae.getSource() == back) { + setVisible(false); + } + } + + public static void main(String args[]) { + Login login = new Login(); + + } + } + + + diff --git a/QuizUp/Quiz.java b/QuizUp/Quiz.java new file mode 100644 index 00000000..8fa994ca --- /dev/null +++ b/QuizUp/Quiz.java @@ -0,0 +1,333 @@ +package quiz.application; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + + +public class Quiz extends JFrame implements ActionListener { + + String questions[][] = new String[10][5]; + String answers[][] = new String[10][2]; + String useranswers[][] = new String[10][1]; + JLabel qno, question; + JRadioButton opt1, opt2, opt3, opt4; + ButtonGroup groupoptions; + JButton next, submit, lifeline; + + public static int timer = 15; + public static int ans_given = 0; + public static int count = 0; + public static int score = 0; + + //database variables + Connection connection; + ResultSet resultSetQuestions; + ResultSet resultSetOptions; + ResultSet resultSetSolutions; + String name; + + Quiz(String name) { + try { + connection = DriverManager.getConnection("jdbc:mysql://localhost:3306/quiz_application", "root", "root"); + retrieveDataFromDatabase(); // Call a method to fetch questions from the database + } catch (SQLException e) { + e.printStackTrace(); + } + this.name = name; + setBounds(50, 0, 1440, 850); + getContentPane().setBackground(Color.WHITE); + setLayout(null); + + ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/quiz.jpg")); + JLabel image = new JLabel(i1); + image.setBounds(0, 0, 1440, 392); + add(image); + + qno = new JLabel(); + qno.setBounds(100, 450, 50, 30); + qno.setFont(new Font("Tahoma", Font.PLAIN, 24)); + add(qno); + + question = new JLabel(); + question.setBounds(150, 450, 900, 30); + question.setFont(new Font("Tahoma", Font.PLAIN, 24)); + add(question); + + + + opt1 = new JRadioButton(); + opt1.setBounds(170, 520, 700, 30); + opt1.setBackground(Color.WHITE); + opt1.setFont(new Font("Dialog", Font.PLAIN, 20)); + add(opt1); + + opt2 = new JRadioButton(); + opt2.setBounds(170, 560, 700, 30); + opt2.setBackground(Color.WHITE); + opt2.setFont(new Font("Dialog", Font.PLAIN, 20)); + add(opt2); + + opt3 = new JRadioButton(); + opt3.setBounds(170, 600, 700, 30); + opt3.setBackground(Color.WHITE); + opt3.setFont(new Font("Dialog", Font.PLAIN, 20)); + add(opt3); + + opt4 = new JRadioButton(); + opt4.setBounds(170, 640, 700, 30); + opt4.setBackground(Color.WHITE); + opt4.setFont(new Font("Dialog", Font.PLAIN, 20)); + add(opt4); + + groupoptions = new ButtonGroup(); + groupoptions.add(opt1); + groupoptions.add(opt2); + groupoptions.add(opt3); + groupoptions.add(opt4); + + next = new JButton("Next"); + next.setBounds(1100, 550, 200, 40); + next.setFont(new Font("Tahoma", Font.PLAIN, 22)); + next.setBackground(new Color(30, 144, 255)); + next.setForeground(Color.WHITE); + next.addActionListener(this); + add(next); + + lifeline = new JButton("50-50 Lifeline"); + lifeline.setBounds(1100, 630, 200, 40); + lifeline.setFont(new Font("Tahoma", Font.PLAIN, 22)); + lifeline.setBackground(new Color(30, 144, 255)); + lifeline.setForeground(Color.WHITE); + lifeline.addActionListener(this); + add(lifeline); + + submit = new JButton("Submit"); + submit.setBounds(1100, 710, 200, 40); + submit.setFont(new Font("Tahoma", Font.PLAIN, 22)); + submit.setBackground(new Color(30, 144, 255)); + submit.setForeground(Color.WHITE); + submit.addActionListener(this); + submit.setEnabled(false); + add(submit); + + start(count); + + setVisible(true); + } + + + private void retrieveDataFromDatabase() { + try { + String questionsSql = "SELECT * FROM quiz_questions"; + PreparedStatement questionsStatement = connection.prepareStatement(questionsSql); + + + + resultSetQuestions = questionsStatement.executeQuery(); + + + System.out.println(resultSetOptions); + int i = 0; + while (resultSetQuestions.next() && i < 10) { + questions[i][0] = resultSetQuestions.getString("question_text"); + // Populate other columns as needed + + // Retrieve choices and solutions based on question IDs + int questionId = resultSetQuestions.getInt("question_id"); + + retrieveOptionsForQuestion(questionId, i); + retrieveSolutionForQuestion(questionId, i); + + i++; + } + } catch (SQLException e) { + e.printStackTrace(); + } + } + + private void retrieveOptionsForQuestion(int questionId, int i) { + try{ + String choicesSql = "SELECT * FROM quiz_choices where question_id = " + questionId; + PreparedStatement choicesStatement = connection.prepareStatement(choicesSql); + resultSetOptions = choicesStatement.executeQuery(); +// System.out.println(resultSetOptions); + + // Implement code to retrieve choices from the database based on question ID and populate choices array + int j=1; + while ( resultSetOptions.next() && j < 5) { + questions[i][j] = resultSetOptions.getString("choice_text"); +// System.out.println(questionId[i][j]); + j++; + } + }catch(SQLException e) { + e.printStackTrace(); + } + } + + private void retrieveSolutionForQuestion(int questionId, int i) { + // Implement code to retrieve solutions from the database based on question ID and populate answers array + try{ + String solutionsSql = "SELECT * FROM quiz_answers where question_id = " + questionId; + PreparedStatement solutionsStatement = connection.prepareStatement(solutionsSql); + resultSetSolutions = solutionsStatement.executeQuery(); +// System.out.println(resultSetOptions); + + // Implement code to retrieve choices from the database based on question ID and populate choices array + int j=1; + while ( resultSetSolutions.next() && j < 2) { + answers[i][j] = resultSetSolutions.getString("answer_text"); +// System.out.println(questionId[i][j]); + j++; + } + }catch(SQLException e) { + e.printStackTrace(); + } + } + + + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == next) { + repaint(); + opt1.setEnabled(true); + opt2.setEnabled(true); + opt3.setEnabled(true); + opt4.setEnabled(true); + + ans_given = 1; + if (groupoptions.getSelection() == null) { + useranswers[count][0] = ""; + } else { + useranswers[count][0] = groupoptions.getSelection().getActionCommand(); + } + + if (count == 8) { + next.setEnabled(false); + submit.setEnabled(true); + } + + count++; + start(count); + } else if (ae.getSource() == lifeline) { + if (count == 2 || count == 4 || count == 6 || count == 8 || count == 9) { + opt2.setEnabled(false); + opt3.setEnabled(false); + } else { + opt1.setEnabled(false); + opt4.setEnabled(false); + } + lifeline.setEnabled(false); + } else if (ae.getSource() == submit) { + ans_given = 1; + if (groupoptions.getSelection() == null) { + useranswers[count][0] = ""; + } else { + useranswers[count][0] = groupoptions.getSelection().getActionCommand(); + } + + for (int i = 0; i < useranswers.length; i++) { + if (useranswers[i][0].equals(answers[i][1])) { + score += 10; + } else { + score += 0; + } + } + setVisible(false); + new Score(name, score); + } + } + + public void paint(Graphics g) { + super.paint(g); + + String time = "Time left - " + timer + " seconds"; // 15 + g.setColor(Color.RED); + g.setFont(new Font("Tahoma", Font.BOLD, 25)); + + if (timer > 0) { + g.drawString(time, 1100, 500); + } else { + g.drawString("Times up!!", 1100, 500); + } + + timer--; // 14 + + try { + Thread.sleep(1000); + repaint(); + } catch (Exception e) { + e.printStackTrace(); + } + + if (ans_given == 1) { + ans_given = 0; + timer = 15; + } else if (timer < 0) { + timer = 15; + opt1.setEnabled(true); + opt2.setEnabled(true); + opt3.setEnabled(true); + opt4.setEnabled(true); + + if (count == 8) { + next.setEnabled(false); + submit.setEnabled(true); + } + if (count == 9) { // submit button + if (groupoptions.getSelection() == null) { + useranswers[count][0] = ""; + } else { + useranswers[count][0] = groupoptions.getSelection().getActionCommand(); + } + + for (int i = 0; i < useranswers.length; i++) { + if (useranswers[i][0].equals(answers[i][1])) { + score += 10; + } else { + score += 0; + } + } + setVisible(false); + new Score(name, score); + } else { // next button + if (groupoptions.getSelection() == null) { + useranswers[count][0] = ""; + } else { + useranswers[count][0] = groupoptions.getSelection().getActionCommand(); + } + count++; // 0 // 1 + start(count); + } + } + + } + + public void start(int count) { + qno.setText("" + (count + 1) + ". "); + question.setText(questions[count][0]); + opt1.setText(questions[count][1]); + opt1.setActionCommand(questions[count][1]); + + opt2.setText(questions[count][2]); + opt2.setActionCommand(questions[count][2]); + + opt3.setText(questions[count][3]); + opt3.setActionCommand(questions[count][3]); + + opt4.setText(questions[count][4]); + opt4.setActionCommand(questions[count][4]); + + groupoptions.clearSelection(); + } + + public static void main(String[] args) { + new Quiz("User"); + } +} \ No newline at end of file diff --git a/QuizUp/Rules.java b/QuizUp/Rules.java new file mode 100644 index 00000000..03aa76e0 --- /dev/null +++ b/QuizUp/Rules.java @@ -0,0 +1,72 @@ +package quiz.application; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + +public class Rules extends JFrame implements ActionListener{ + + String name; + JButton start, back; + + Rules(String name) { + this.name = name; + getContentPane().setBackground(Color.WHITE); + setLayout(null); + + JLabel heading = new JLabel("Welcome " + name + " to Quiz Up"); + heading.setBounds(50, 20, 700, 30); + heading.setFont(new Font("Viner Hand ITC", Font.BOLD, 28)); + heading.setForeground(new Color(30, 144, 254)); + add(heading); + + JLabel rules = new JLabel(); + rules.setBounds(20, 90, 700, 350); + rules.setFont(new Font("Tahoma", Font.PLAIN, 16)); + rules.setText( + "<html>"+ + "1. Time Limit: Each question has a 15-second time constraint." + "<br><br>" + + "2. Correct Answers: Every question has one correct answer." + "<br><br>" + + "3. 50-50 Lifeline: Players can use this lifeline once to eliminate two incorrect answer options." + "<br><br>" + + "4. Time Management: Players should answer within the 15-second time limit." + "<br><br>" + + "5. Scoring: Points awarded for correct answers." + "<br><br>" + + "6. Incorrect Answers: No penalties for wrong answers." + "<br><br>" + + "7. Lifeline Usage: Tap the 50-50 lifeline button during any question." + "<br><br>" + + "8. Fair Play: Follow the rules for fair and enjoyable gameplay." + "<br><br>" + + "<html>" + ); + add(rules); + + back = new JButton("Back"); + back.setBounds(250, 500, 100, 30); + back.setBackground(new Color(30, 144, 254)); + back.setForeground(Color.WHITE); + back.addActionListener(this); + add(back); + + start = new JButton("Start"); + start.setBounds(400, 500, 100, 30); + start.setBackground(new Color(30, 144, 254)); + start.setForeground(Color.WHITE); + start.addActionListener(this); + add(start); + + setSize(800, 650); + setLocation(350, 100); + setVisible(true); + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == start) { + setVisible(false); + new Quiz(name); + } else { + setVisible(false); + new Login(); + } + } + + public static void main(String[] args) { + new Rules("User"); + } +} \ No newline at end of file diff --git a/QuizUp/Score.java b/QuizUp/Score.java new file mode 100644 index 00000000..809e4ffc --- /dev/null +++ b/QuizUp/Score.java @@ -0,0 +1,49 @@ +package quiz.application; + +import java.awt.*; +import javax.swing.*; +import java.awt.event.*; + +public class Score extends JFrame implements ActionListener { + + Score(String name, int score) { + setBounds(400, 150, 750, 550); + getContentPane().setBackground(Color.WHITE); + setLayout(null); + + ImageIcon i1 = new ImageIcon(ClassLoader.getSystemResource("icons/score.png")); + Image i2 = i1.getImage().getScaledInstance(300, 250, Image.SCALE_DEFAULT); + ImageIcon i3 = new ImageIcon(i2); + JLabel image = new JLabel(i3); + image.setBounds(0, 200, 300, 250); + add(image); + + JLabel heading = new JLabel("Thankyou " + name + " for playing Quiz Up"); + heading.setBounds(45, 30, 700, 30); + heading.setFont(new Font("Tahoma", Font.PLAIN, 26)); + add(heading); + + JLabel lblscore = new JLabel("Your score is " + score); + lblscore.setBounds(350, 200, 300, 30); + lblscore.setFont(new Font("Tahoma", Font.PLAIN, 26)); + add(lblscore); + + JButton submit = new JButton("Play Again"); + submit.setBounds(380, 270, 120, 30); + submit.setBackground(new Color(30, 144, 255)); + submit.setForeground(Color.WHITE); + submit.addActionListener(this); + add(submit); + + setVisible(true); + } + + public void actionPerformed(ActionEvent ae) { + setVisible(false); + new Login(); + } + + public static void main(String[] args) { + new Score("User", 0); + } +} \ No newline at end of file diff --git a/Quotes/app.js b/Quotes/app.js new file mode 100644 index 00000000..96f11f26 --- /dev/null +++ b/Quotes/app.js @@ -0,0 +1,20 @@ +'use strict' + + +const b=()=>{ + + let a=document.querySelector('.par'); + + + fetch('https://animechan.vercel.app/api/random').then((user)=>{ + return user.json(); + }).then((mess)=>{ + a.textContent=mess.quote; + console.log(mess.anime); + }) + // .catch((data)=>{ + // a=data; + // }) +} + +document.getElementById('btn').addEventListener('click',b); diff --git a/Quotes/index.html b/Quotes/index.html new file mode 100644 index 00000000..1db43feb --- /dev/null +++ b/Quotes/index.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>new</title> + <link rel="stylesheet" href="./style.css"> + + <link rel="preconnect" href="https://fonts.googleapis.com"> +<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> +<link href="https://fonts.googleapis.com/css2?family=Comic+Neue:ital,wght@1,700&family=Roboto:ital,wght@1,900&display=swap" rel="stylesheet"> +</head> +<body> + + <div class="box"> + + <div class="par"> + Fortune favors the bold + </div> + + + <div class="br"> + <button id="btn">Next</button> + </div> + + </div> + + + <script src="./app.js"></script> +</body> +</html> \ No newline at end of file diff --git a/Quotes/style.css b/Quotes/style.css new file mode 100644 index 00000000..56d03e43 --- /dev/null +++ b/Quotes/style.css @@ -0,0 +1,40 @@ +.box{ + height: 200px; + width: auto; + border: 2px solid black; + + display:flex; + justify-content:center ; + align-items: center; + + border-radius: 10px; + + background-color:wheat; + font-family: 'Comic Neue', cursive; +font-family: 'Roboto', sans-serif; + +font-size: larger; + +/* color: aliceblue; */ +} + +.br{ + position:absolute; +top: 30%; +left:40% +} + +#btn{ + background-color: #011801; /* Green */ + border: none; + color: white; + padding: 15px 32px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 20px; + + border-radius: 10px; +} + + diff --git a/README.md b/README.md index 2291abb6..8b137891 100644 --- a/README.md +++ b/README.md @@ -1,64 +1 @@ -# Web-Development-Projects - - -<div align="center"> - -[](https://github.com/kishanrajput23/Hacktoberfest-2022) -<img src="https://img.shields.io/badge/HacktoberFest-2022-blueviolet" alt="Hacktober Badge"/> -<img src="https://img.shields.io/static/v1?label=%E2%AD%90&message=If%20Useful&style=style=flat&color=BC4E99" alt="Star Badge"/> -<a href="https://github.com/kishanrajput23" ><img src="https://img.shields.io/badge/Contributions-welcome-green.svg?style=flat&logo=github" alt="Contributions" /></a> - -</div> - - -### This repository aims to help code beginners with their first successful pull request and open source contribution. :partying_face: - -:star: Feel free to use this project to make your first contribution to an open-source project on GitHub. Practice making your first pull request to a public repository before doing the real thing! - -:star: Make sure to grab some cool swags during Hacktoberfest by getting involved in the open-source community. - -### This repository is open to all members of the GitHub community. Any member can contribute to this project! :grin: - -## What is Hacktoberfest? :thinking: -A month-long celebration from October 1st to October 31st presented by [Digital Ocean](https://hacktoberfest.digitalocean.com/) and [DEV Community](https://dev.to/) collaborated with [GitHub](https://github.com/blog/2433-celebrate-open-source-this-october-with-hacktoberfest) to get people involved in [Open Source](https://github.com/open-source). Create your very first pull request to any public repository on GitHub and contribute to the open-source developer community. - -[https://hacktoberfest.digitalocean.com/](https://hacktoberfest.digitalocean.com/) - -## Rules :fire: -To qualify for the __official limited edition Hacktoberfest shirt__, you must register [here](https://hacktoberfest.digitalocean.com/) and make four Pull Requests (PRs) between October 1-31, 2022 (in any time zone). PRs can be made to any public repository on GitHub, not only the ones with issues labeled Hacktoberfest. This year, the __first 40,000__ participants who complete Hacktoberfest can elect to receive one of two prizes: a tree planted in their name, or the Hacktoberfest 2022 t-shirt. - -## Steps to follow :scroll: - -### Tip : Complete this process in GitHub (in your browser) - -```mermaid -flowchart LR - Fork[Fork the project]-->branch[Create a New Branch] - branch-->Edit[Edit file] - Edit-->commit[Commit the changes] - commit -->|Finally|creatpr((Create a Pull Request)) - - ``` - - -Star the repository by pressing the topmost-right button to start your wonderful journey. - - -## Awesome contributors :star_struck: -<a href="https://github.com/kishanrajput23/Java-Projects-Collections/graphs/contributors"> - <img src="https://contributors-img.web.app/image?repo=kishanrajput23/Java-Projects-Collections" /> -</a> - -Made with [contributors-img](https://contributors-img.web.app). - - -## Help Contributing Guides :crown: - -We love to have `articles` and `codes` in different languages and the `betterment` of existing ones. - -Please discuss it with us first by creating a new issue. - -:tada: :confetti_ball: :smiley: _**Happy Contributing**_ :smiley: :confetti_ball: :tada: - -## Author 🙋♂️ : [Find Me Here](https://linktr.ee/kishan_rajput23) diff --git a/Radix Sorting Algo.java b/Radix Sorting Algo.java new file mode 100644 index 00000000..fc0a1ffa --- /dev/null +++ b/Radix Sorting Algo.java @@ -0,0 +1,65 @@ + +import java.util.Arrays; + +class RadixSort { + + // Using counting sort to sort the elements in the basis of significant places + void countingSort(int array[], int size, int place) { + int[] output = new int[size + 1]; + int max = array[0]; + for (int i = 1; i < size; i++) { + if (array[i] > max) + max = array[i]; + } + int[] count = new int[max + 1]; + + for (int i = 0; i < max; ++i) + count[i] = 0; + + // Calculate count of elements + for (int i = 0; i < size; i++) + count[(array[i] / place) % 10]++; + + // Calculate cumulative count + for (int i = 1; i < 10; i++) + count[i] += count[i - 1]; + + // Place the elements in sorted order + for (int i = size - 1; i >= 0; i--) { + output[count[(array[i] / place) % 10] - 1] = array[i]; + count[(array[i] / place) % 10]--; + } + + for (int i = 0; i < size; i++) + array[i] = output[i]; + } + + // Function to get the largest element from an array + int getMax(int array[], int n) { + int max = array[0]; + for (int i = 1; i < n; i++) + if (array[i] > max) + max = array[i]; + return max; + } + + // Main function to implement radix sort + void radixSort(int array[], int size) { + // Get maximum element + int max = getMax(array, size); + + // Apply counting sort to sort elements based on place value. + for (int place = 1; max / place > 0; place *= 10) + countingSort(array, size, place); + } + + // Driver code + public static void main(String args[]) { + int[] data = { 121, 432, 564, 23, 1, 45, 788 }; + int size = data.length; + RadixSort rs = new RadixSort(); + rs.radixSort(data, size); + System.out.println("Sorted Array in Ascending Order: "); + System.out.println(Arrays.toString(data)); + } +} diff --git a/RandomClass.java b/RandomClass.java new file mode 100644 index 00000000..31b839f3 --- /dev/null +++ b/RandomClass.java @@ -0,0 +1,45 @@ +// Java program to demonstrate +// method calls of Random class +import java.util.Random; + +public class Test +{ + public static void main(String[] args) + { + Random random = new Random(); + System.out.println(random.nextInt(10)); + System.out.println(random.nextBoolean()); + System.out.println(random.nextDouble()); + System.out.println(random.nextFloat()); + System.out.println(random.nextGaussian()); + byte[] bytes = new byte[10]; + random.nextBytes(bytes); + System.out.printf("["); + for(int i = 0; i< bytes.length; i++) + { + System.out.printf("%d ", bytes[i]); + } + System.out.printf("]\n"); + + System.out.println(random.nextLong()); + System.out.println(random.nextInt()); + + long seed = 95; + random.setSeed(seed); + + // Note: Running any of the code lines below + // will keep the program running as each of the + // methods below produce an unlimited random + // values of the corresponding type + + /* System.out.println("Sum of all the elements in the IntStream returned = " + + random.ints().count()); + System.out.println("Count of all the elements in the DoubleStream returned = " + + random.doubles().count()); + System.out.println("Count of all the elements in the LongStream returned = " + + random.longs().count()); + + */ + +} +} diff --git a/RandomPasswordGenerator/PasswordGenerator.java b/RandomPasswordGenerator/PasswordGenerator.java new file mode 100644 index 00000000..e0bbd759 --- /dev/null +++ b/RandomPasswordGenerator/PasswordGenerator.java @@ -0,0 +1,52 @@ +import java.security.NoSuchAlgorithmException; +import java.security.SecureRandom; +import java.util.Random; + +public class PasswordGenerator { + private static final String UPPER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + private static final String LOWER = "abcdefghijklmnopqrstuvwxyz"; + private static final String DIGITS = "0123456789"; + private static final String SPECIAL = "!@#$%^&*()-_=+[]{}|;:'\",.<>?"; + + public static String generatePassword(int length, boolean useUpper, boolean useLower, boolean useDigits, boolean useSpecial) { + if (length <= 0) { + throw new IllegalArgumentException("Password length must be greater than 0"); + } + + StringBuilder characters = new StringBuilder(); + if (useUpper) characters.append(UPPER); + if (useLower) characters.append(LOWER); + if (useDigits) characters.append(DIGITS); + if (useSpecial) characters.append(SPECIAL); + + if (characters.length() == 0) { + throw new IllegalArgumentException("At least one character type (upper, lower, digits, special) must be selected"); + } + + Random random; + try { + random = SecureRandom.getInstanceStrong(); // Strong cryptographic random number generator + } catch (NoSuchAlgorithmException e) { + random = new SecureRandom(); + } + + StringBuilder password = new StringBuilder(length); + for (int i = 0; i < length; i++) { + int randomIndex = random.nextInt(characters.length()); + password.append(characters.charAt(randomIndex)); + } + + return password.toString(); + } + + public static void main(String[] args) { + int length = 12; // Change the desired password length + boolean useUpper = true; + boolean useLower = true; + boolean useDigits = true; + boolean useSpecial = true; + + String password = generatePassword(length, useUpper, useLower, useDigits, useSpecial); + System.out.println("Generated Password: " + password); + } +} diff --git a/Restaurant-management-system/.gitattributes b/Restaurant-management-system/.gitattributes new file mode 100644 index 00000000..dfe07704 --- /dev/null +++ b/Restaurant-management-system/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/Restaurant-management-system/Controller.java b/Restaurant-management-system/Controller.java new file mode 100644 index 00000000..2e4ed54c --- /dev/null +++ b/Restaurant-management-system/Controller.java @@ -0,0 +1,1923 @@ +/** + * Kazunori Hayashi +* Version 1.0 29/7/ +* 2013 + */ + +import java.util.*; +import java.io.*; +import java.text.*; + +public class Controller +{ + //define scene + public final static int SCENE_MAIN_MENU = 0; //main menu + public final static int SCENE_LOGIN = 1; //login + public final static int SCENE_LOGOUT = 2; + public final static int SCENE_MENU_LIST = 3; + public final static int SCENE_ORDER = 4; + public final static int SCENE_EMPLOYEE_LIST = 5; + public final static int SCENE_EDIT_EMPLOYEE = 6; + public final static int SCENE_EDIT_MENU_ITEM = 7; + public final static int SCENE_GENERATE_REPORTS = 8; + + //define user type + public final static int USER_ANONYMOUS = 0; + public final static int USER_EMPLOYEE = 1; + public final static int USER_MANAGER = 2; + + private UserInterface cView; //Reference of userinterface + private Database cDatabase; + + //parameter + private int scene; + private int state; //normally "0", if something happen (ex. quit program) this have some value. + private int userType; + private int currentUserID; + private String currentUserName; + private String todaysDate; + + public Controller() + { + this.cDatabase = new Database(); + this.cView = new UserInterface(this.cDatabase); + this.scene = SCENE_MAIN_MENU; + this.userType = USER_ANONYMOUS; + this.currentUserID = 0; + this.currentUserName = ""; + + //get todays date + Date date = new Date(); + SimpleDateFormat stf = new SimpleDateFormat("yyyy/MM/dd"); + todaysDate = stf.format(date); + cView.setTodaysDate(todaysDate); + + try + { + cDatabase.loadFiles(); + this.state = 0; + } + catch(DatabaseException de) + { + this.state = -1; + printErrorMessageToView(de.getErrMessage()); + } + } + + /*********************************************************** + * Main menu + **********************************************************/ + //---------------------------------------------------------- + // Select number from mein menu + //---------------------------------------------------------- + private void selectMenu() + { + cView.showMainMenu( userType); + + int selection = 0; + while( selection == 0 && this.state == 0) + { + try + { + printMessageToView("Please make a selection:"); + String key = cView.userInput(); + + if(key.equalsIgnoreCase("Q")) //quit program + { + printMessageToView("Are you sure to quit program? (Y:YES)"); + key = cView.userInput(); + if (key.equalsIgnoreCase("Y")) { + this.state = 1; //If state > 0, program will finish + } + else + { + //reflesh view + cView.showMainMenu(userType); + } + } + else if(key.equalsIgnoreCase("F")) //clock out + { + printMessageToView("Are you sure to clock out? (Y:YES)"); + key = cView.userInput(); + if (key.equalsIgnoreCase("Y")) { + Staff rStaff = cDatabase.findStaffByID(currentUserID); + if(rStaff.getWorkState() == Staff.WORKSTATE_FINISH) + { + printMessageToView("You already clocked out."); + } + else + { + rStaff.clockOut(); + printMessageToView("Thanks for your hard work!!"); + } + } + pause(3); + //reflesh view + cView.showMainMenu(userType); + } + else + { + selection = Integer.parseInt(key); + if( selectionCheck( selection)) + { + this.scene = selection; + } + else + { + //reflesh view + cView.showMainMenu(userType); + + } + } + } + catch(Exception e) + { + //String errMessage = e.toString() + ":" + e.getMessage(); + //printMessageToView(errMessage); + } + } + } + + public void mainLoop() + { + while( state == 0) + { + switch( this.scene) + { + case SCENE_MAIN_MENU: + selectMenu(); + break; + case SCENE_LOGIN: + userLogin(); + break; + case SCENE_LOGOUT: + userLogout(); + break; + case SCENE_MENU_LIST: + showMenuList(); + break; + case SCENE_ORDER: + selectOrderMenu(); + break; + case SCENE_EMPLOYEE_LIST: + showStaffList(); + break; + case SCENE_EDIT_EMPLOYEE: + chooseEditStaffMode(); + break; + case SCENE_EDIT_MENU_ITEM: + chooseEditMenuItemMode(); + break; + case SCENE_GENERATE_REPORTS: + //generateSalesReports(); + generateReports(); + break; + default: + this.scene = SCENE_MAIN_MENU; + break; + } + if(state == -1) //error + printErrorMessageToView("Error"); + } + + //finish program + cView.finish(); + } + //---------------------------------------------------------- + // Check if the number selected is appropriate and + // if the user is eligible to operate + //---------------------------------------------------------- + private boolean selectionCheck(int selection) + { + boolean result = true; + switch(userType) + { + case USER_ANONYMOUS: + if( selection <= 0 || SCENE_LOGIN < selection) + result = false; + break; + case USER_EMPLOYEE: + if( selection <= 0 || SCENE_ORDER < selection) + result = false; + break; + case USER_MANAGER: + if( selection <= 0 || SCENE_GENERATE_REPORTS < selection) + result = false; + break; + } + return result; + } + + /*********************************************************** + * Login mode + **********************************************************/ + private void userLogin() + { + cView.loginView(); + printMessageToView("Login as manager? (Y/N)"); + + String key = cView.userInput(); + if( key.equalsIgnoreCase("Q"))// back to main menu + { + scene = SCENE_MAIN_MENU; + return; + } + + while (!key.equalsIgnoreCase("Y") && !key.equalsIgnoreCase("N")) + { + printMessageToView("Please enter 'Y' or 'N'\nLogin as manager? (Y/N)"); + key = cView.userInput(); + } + + if (key.equalsIgnoreCase("Y")) { + loginCheck(true); //search manager data + } else if (key.equalsIgnoreCase("N")) { + loginCheck(false); //search employee data + } + // back to main menu + scene = SCENE_MAIN_MENU; + } + + //---------------------------------------------------------- + // Find user + //---------------------------------------------------------- + private void loginCheck( boolean isManager) + { + String searchClassName; + int inputID = 0; + String iuputPassword = ""; + String key = ""; + + printMessageToView("Enter your ID."); + while(inputID == 0) + { + key = cView.userInput(); + try{ + inputID = Integer.parseInt(key); + } + catch(Exception e) + { + printMessageToView("Only number is accepted.\nEnter your ID."); + } + } + printMessageToView("Enter your password."); + iuputPassword = cView.userInput(); + + //---------search user---------- + Staff rStaff = cDatabase.findStaffByID(inputID); + + if(isManager) searchClassName = "Manager"; + else searchClassName = "Employee"; + + if( rStaff != null)//User data is found + { + //Search only particular target(Manager or Employee) + if( rStaff.getClass().getName().equalsIgnoreCase(searchClassName)) + { + if(rStaff.getPassword().equals(iuputPassword)) + { + printMessageToView("Login successful!!"); + if(rStaff.getWorkState() == 0) //Not clocked in yet + { + rStaff.clockIn(); + } + if(isManager) userType = USER_MANAGER; + else userType = USER_EMPLOYEE; + currentUserID = inputID; + currentUserName = rStaff.getFullName(); + cView.setUserName(currentUserName); //show user name on the view + } + else + { + printMessageToView("Password unmatching."); + } + } + else //ID is found but type(Manager or Employee) is umnatching + { + printMessageToView("Not found."); + } + } + else + printMessageToView("Not found."); + + + pause(2); + } + //---------------------------------------------------------- + // Logout (Set state as Anonymous) + //---------------------------------------------------------- + private void userLogout() + { + //cView.loginView(); + printMessageToView("Are you sure to log out? (YES:y)"); + + String key = cView.userInput(); + if(key.equalsIgnoreCase("Y")) + { + userType = USER_ANONYMOUS; + currentUserID = 0; + currentUserName = ""; + cView.setUserName(currentUserName); + } + scene = SCENE_MAIN_MENU; + } + /*********************************************************** + * Edit employee mode + **********************************************************/ + //---------------------------------------------------------- + // Choose edit mode (1:Add 2:Update 3:Delete) + //---------------------------------------------------------- + private void chooseEditStaffMode() + { + String key; + int inputNumber = 0; + + cView.staffManagementView(); + printMessageToView("Choose number:"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Q")) //Back to main menu + { + scene = SCENE_MAIN_MENU; + return; + } + + while(inputNumber == 0) + { + try + { + inputNumber = Integer.parseInt(key); + switch(inputNumber) + { + case 1: //add new employee + addNewStaff(); + break; + case 2: + updateStaff(); + break; + case 3: + deleteStaff(); + break; + default: + printMessageToView("Choose 1 to 3:"); + key = cView.userInput(); + break; + } + } + catch(Exception e) + { + printMessageToView("Choose 1 to 3:"); + key = cView.userInput(); + } + } + } + //---------------------------------------------------------- + // Add new staff + //---------------------------------------------------------- + private void addNewStaff() + { + int newID=0; + String newFirstName; + String newLastName; + String newPassword; + String key; + + boolean done = false; + //-------------------- loop until new staff is added or enter "Q" ---------- + while(!done) + { + cView.addNewStaffView(); + newID = generateID(); + if (newID == 0) + { + //back to mein menu + scene = SCENE_MAIN_MENU; + return; + } + + printMessageToView("Enter first name:"); + newFirstName = cView.userInput(); + printMessageToView("Enter last name:"); + newLastName = cView.userInput(); + printMessageToView("Enter password:"); + newPassword = cView.userInput(); + + printMessageToView("Is the staff manager?(Y/N)"); + key = cView.userInput(); + int staffType = 0; //1:manager 2:employee + + while(staffType == 0) + { + if(key.equalsIgnoreCase("Y")) + { + staffType = 1; + break; + } + else if(key.equalsIgnoreCase("N")) + { + staffType = 2; + break; + } + else + { + printMessageToView("Please enter 'Y' or 'N'"); + key = cView.userInput(); + } + } + //Check all input + printMessageToView("--------------------------------------"); + printMessageToView("NewID:" + newID); + printMessageToView("New staff name:" + newFirstName + " " + newLastName); + printMessageToView("Password:" + newPassword); + switch(staffType) + { + case 1: + printMessageToView("The staff will be added as manager."); + break; + case 2: + printMessageToView("The staff will be added as employee."); + break; + } + + printMessageToView("\nOK? (Y:yes)"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Y")) + { + boolean isManager = false; + if(staffType == 1) + isManager = true; + try + { + cDatabase.addStaff(newID, newLastName, newFirstName, newPassword, isManager); + printMessageToView("New staff information is added."); + done = true; + } + catch(DatabaseException dbe) + { + printErrorMessageToView(dbe.getErrMessage()); + pause(2); + } + } + } + //---------------- Staff is added (loop end)----------------------------- + + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + scene = SCENE_MAIN_MENU; + } + + //---------------------------------------------------------- + // Make and check new ID (used by addEmployee method only) + //---------------------------------------------------------- + private int generateID() + { + int newID = 0; + String key; + + printMessageToView("Choose user ID for new staff:"); + key = cView.userInput(); + + while(newID == 0) + { + //Back to main menu + if(key.equalsIgnoreCase("Q")) + return 0; + try + { + newID = Integer.parseInt(key); + if(newID > 9999) + { + printMessageToView( "Please enter less than 10000"); + key = cView.userInput(); + newID = 0; + } + else + { + //Check if there is same ID + Staff rStaff = cDatabase.findStaffByID(newID); + //if(found) + if(rStaff != null) + { + printMessageToView( "ID:" + newID + "is already used by " + rStaff.getFirstName() + " " + + rStaff.getLastName() + "."); + printMessageToView("Please try another number:"); + key = cView.userInput(); + newID = 0; + } + } + } + catch(Exception e) + { + printMessageToView("Please enter valid integer."); + key = cView.userInput(); + } + + } + return newID; + } + + //---------------------------------------------------------- + // Update staff info + //---------------------------------------------------------- + private void updateStaff() + { + String key; + int inputNumber = 0; + Staff rStaff = null; + boolean done = false; + + cView.showStaffList(); + + //------------- Input ID check ---------------- + while(inputNumber == 0) + { + printMessageToView("Choose user ID to edit:"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Q")) + { + //scene = SCENE_MAIN_MENU; + printMessageToView("Transaction is canceled."); + pause(2); + return; + } + + try + { + //findUser + inputNumber = Integer.parseInt(key); + rStaff = cDatabase.findStaffByID(inputNumber); + + if(rStaff == null) + { + inputNumber = 0; + printErrorMessageToView("ID is not found."); + } + } + catch(Exception e) + { + printErrorMessageToView("ID must be valid number."); + } + } + //------------- Input ID check end ---------------- + + //------------- Choose update staff menu ---------------- + cView.updateStaffView(rStaff); + inputNumber = 0; + + while(inputNumber == 0) + { + key = cView.userInput(); + + if(key.equalsIgnoreCase("Q")) + { + printMessageToView("Transaction is canceled."); + pause(2); + return; + } + + try{ + inputNumber = Integer.parseInt(key); + if(inputNumber < 1 || 5 < inputNumber) + { + inputNumber = 0; + printMessageToView("Input 1 to 5"); + } + } + catch(Exception e) + { + printMessageToView("Input valid integer:"); + } + } + //------------- Choose update staff menu End---------------- + + //------------- Edit Staff data ---------------- + DateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); + while(!done){ + cView.clearScreen(); + cView.showStaffData(rStaff); + try + { + switch(inputNumber) + { + case 1: //edit last name + printMessageToView("Input new last name:"); + key = cView.userInput(); + //rStaff.setLastName(key); + cDatabase.editStaffData(rStaff, cDatabase.EDIT_LAST_NAME, key); + cView.showStaffData(rStaff); + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + done = true; + break; + case 2: //edit first name + printMessageToView("Input new first name:"); + key = cView.userInput(); + //rStaff.setFirstName(key); + cDatabase.editStaffData(rStaff, cDatabase.EDIT_FIRST_NAME, key); + cView.showStaffData(rStaff); + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + done = true; + break; + case 3:// Forth clock out + byte state = rStaff.getWorkState(); + switch(state) + { + case Staff.WORKSTATE_ACTIVE: + rStaff.clockOut(); + printMessageToView("Staff:" + rStaff.getFullName() + " has been clocked out."); + pause(2); + + break; + case Staff.WORKSTATE_FINISH: + printErrorMessageToView("Staff:" + rStaff.getFullName() + " already clocked out."); + pause(3); + break; + default: + printErrorMessageToView("Staff:" + rStaff.getFullName() + "has not been on work today."); + pause(3); + break; + } + done = true; + break; + case 4://change start time + if(rStaff.getWorkState() == 0) + { + printErrorMessageToView("You can not change start time of the staff not working."); + pause(3); + return; + } + + printMessageToView("Enter new start time (HH:mm)"); + key = cView.userInput(); + if(key.equalsIgnoreCase("Q")) + { + printMessageToView("Transaction is canceled."); + pause(2); + return; + } + key = todaysDate + " " + key + ":00"; //YYYY/MM/DD HH:mm:ss + try + { + Date newTime = sdf.parse(key); + if(rStaff.changeStartTime(newTime)) + { + printMessageToView("Start time has been changed."); + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + done = true; + } + else + { + printErrorMessageToView("changeStartTime error"); + pause(3); + } + } + catch(ParseException pe) + { + printErrorMessageToView("Parse error"); + printMessageToView("Follow the format 'HH:mm' (ex: 16:30)"); + pause(3); + } + break; + case 5://change finish time + if(rStaff.getWorkState() != Staff.WORKSTATE_FINISH) + { + printErrorMessageToView("You can not change finish time of the staff not working."); + pause(3); + return; + } + + printMessageToView("Enter new finish time (HH:mm)"); + key = cView.userInput(); + if(key.equalsIgnoreCase("Q")) + { + printMessageToView("Transaction is canceled."); + pause(2); + return; + } + key = todaysDate + " " + key + ":00"; //YYYY/MM/DD HH:mm:ss + + try + { + Date newTime = sdf.parse(key); + if(rStaff.changeFinishTime(newTime)) + { + printMessageToView("Finish time has been changed."); + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + done = true; + } + else + { + printErrorMessageToView("changeFinishTime error"); + pause(3); + } + } + catch(ParseException pe) + { + printErrorMessageToView("Parse error"); + printMessageToView("Follow the format 'HH:mm' (ex: 16:30)"); + pause(3); + } + break; + default: + printErrorMessageToView("This line must not be used!!"); + printErrorMessageToView("Check Controller class"); + pause(2); + break; + } + } + catch(DatabaseException dbe) + { + printErrorMessageToView(dbe.getErrMessage()); + pause(3); + } + //------------- End of edit Staff data ---------------- + } + //----- end loop(loop until done is true) --------- + + if(rStaff.getID() == currentUserID) + { + currentUserName = rStaff.getFullName(); + cView.setUserName(currentUserName); + } + } + + //---------------------------------------------------------- + // Delete staff + //---------------------------------------------------------- + private void deleteStaff() + { + String key; + int inputNumber = 0; + Staff rStaff = null; + + cView.showStaffList(); + printMessageToView("Choose user ID to delete:"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Q")) //Back to main menu + { + scene = SCENE_MAIN_MENU; + return; + } + + while(inputNumber == 0) + { + try + { + //findUser + inputNumber = Integer.parseInt(key); + rStaff = cDatabase.findStaffByID(inputNumber); + + if(rStaff == null) + { + printMessageToView("ID is not found."); + pause(2); + // back to main menu + scene = SCENE_MAIN_MENU; + return; + } + + printMessageToView("Staff ID:" + rStaff.getID() + " Name:" + rStaff.getFirstName() + + " " + rStaff.getLastName() + "will be deleted. OK? (YES:y)"); + + key = cView.userInput(); + if(!key.equalsIgnoreCase("Y")) + { + printMessageToView("The transaction is canceled."); + pause(2); + scene = SCENE_MAIN_MENU; + return; + } + + cDatabase.deleteStaff(rStaff); + /*if(rStaff.getClass().getName().equalsIgnoreCase("Manager")) + cDatabase.updateStaffFile(true);//update manager file + else + cDatabase.updateStaffFile(false);//update employee file*/ + + printMessageToView("Deleted."); + pause(2); + } + catch(Exception e) + { + printErrorMessageToView("ID must be valid number. Input again:"); + key = cView.userInput(); + } + } + } + /*********************************************************** + * Order mode + **********************************************************/ + //---------------------------------------------------------- + // Choose order mode (1:Create order 2:Close order 3:Cancel order) + //---------------------------------------------------------- + private void selectOrderMenu() + { + String key; + int inputNumber = 0; + + Staff rStaff = cDatabase.findStaffByID(currentUserID); + if(rStaff.getWorkState() == Staff.WORKSTATE_FINISH) + { + printErrorMessageToView("You already clocked out."); + pause(2); + scene = SCENE_MAIN_MENU; + return; + } + + while(inputNumber == 0) + { + cView.showOrderMenu(); + printMessageToView("Choose number:"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Q")) //Back to main menu + { + scene = SCENE_MAIN_MENU; + return; + } + + try + { + inputNumber = Integer.parseInt(key); + if(inputNumber < 1 || 5 < inputNumber) + { + inputNumber = 0; + printErrorMessageToView("Choose 1 to 5:"); + pause(2); + } + } + catch(Exception e) + { + printErrorMessageToView("Choose 1 to 5:"); + pause(2); + } + } + + switch(inputNumber) + { + case 1: //Create + createOrder(); + break; + case 2: //Update + updateOrder(); + break; + case 3://Close + closeOrder(); + break; + case 4://Cancel + cancelOrder(); + break; + case 5://Show order list + showOrderList(); + /*cView.showOrderList(); + //printMessageToView("Please enter something to exit."); + //key = cView.userInput(); + printMessageToView("Enter order ID to display detail. (Q:quit)"); + key = cView.userInput(); + if(!key.equalsIgnoreCase("Q")) + { + try + { + } + + }*/ + break; + default: + printErrorMessageToView("This line must not be exexuted!! Check program of selectOrderMenu()"); + key = cView.userInput(); + break; + } + } + + private void showOrderList() + { + boolean done = false; + String key; + + while(!done) + { + cView.showOrderList(); + printMessageToView("Enter order ID to display detail. (Q:quit)"); + key = cView.userInput(); + if(key.equalsIgnoreCase("Q")) //Exit + { + return; + } + + try{ + int ID = Integer.parseInt(key); + Order rOrder = cDatabase.findOrderByID(ID); + if( rOrder == null) + { + printErrorMessageToView("Not found."); + pause(2); + } + else + { + cView.clearScreen(); + cView.showOrderDetail(ID); + printMessageToView("Please enter something to exit."); + key = cView.userInput(); + done = true; + } + } + catch(Exception e) + { + printErrorMessageToView("Enter valid integer."); + pause(2); + } + } + } + + private void createOrder() + { + int newOrderID = cDatabase.addOrder(currentUserID, currentUserName); + editOrderItem(newOrderID); + } + + private void updateOrder() + { + cView.showOrderList(); + int updateOrderID = findOrder(); + if( updateOrderID == -1) + return; + + Order rOrder = cDatabase.findOrderByID(updateOrderID); + if( currentUserID != rOrder.getStaffID()) + { + printErrorMessageToView("You are not eligible to update the order."); + printMessageToView("(The order belonges to " + rOrder.getStaffName() + ")"); + pause(2); + return; + } + + int orderState = rOrder.getState(); + switch(orderState) + { + case Order.ORDER_CLOSED: + printMessageToView("The order is already closed."); + pause(2); + break; + case Order.ORDER_CANCELED: + printMessageToView("The order was canceled."); + pause(2); + break; + default: + editOrderItem(updateOrderID); + break; + } + + } + + private void editOrderItem(int editOrderID) + { + boolean done = false; + String key; + int inputNumber = 0; + + while(!done) + { + cView.editOrderView(); + printMessageToView("Choose number:"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Q")) //Exit + { + done = true; + } + else + { + try + { + inputNumber = Integer.parseInt(key); + switch(inputNumber) + { + case 1: //add new item + addNewOrderItem(editOrderID); + break; + case 2: + deleteOrderItem(editOrderID); + break; + case 3: //showOrderDetail + cView.clearScreen(); + cView.showOrderDetail(editOrderID); + printMessageToView("Please enter something to exit."); + key = cView.userInput(); + break; + default: + printMessageToView("Choose 1 to 4."); + pause(2); + break; + } + } + catch(Exception e) + { + printMessageToView("Choose 1 to 4."); + pause(2); + } + } + } + } + + public void addNewOrderItem(int orderID) + { + boolean done = false; + int addItemID = 0; + byte addItemQuantity = 0; + MenuItem rNewItem = null; + String key; + + while(!done) + { + cView.addOrderItemView(); + //input menu id + while(addItemID == 0) + { + try + { + printMessageToView("Choose MenuID:"); + key = cView.userInput(); + if(key.equalsIgnoreCase("Q")) //Exit + { + printMessageToView("Transaction canceled."); + pause(2); + return; + } + addItemID = Integer.parseInt(key); + rNewItem = cDatabase.findMenuItemByID(addItemID); + if(rNewItem == null) + { + printErrorMessageToView("MenuID[" + addItemID + "]is not found."); + addItemID = 0; + } + } + catch(Exception e) + { + printErrorMessageToView("Enter valid id number."); + } + } + + //input quantity + while(addItemQuantity == 0) + { + try + { + printMessageToView("Enter quantity:"); + key = cView.userInput(); + if(key.equalsIgnoreCase("Q")) //Exit + { + printMessageToView("Transaction canceled."); + pause(2); + return; + } + addItemQuantity = Byte.parseByte(key); + if( addItemQuantity <= 0) + { + printErrorMessageToView("Enter positive number."); + addItemQuantity = 0; + } + } + catch(NumberFormatException nfe) + { + printErrorMessageToView("Quantity is too large!!"); + } + catch(Exception e) + { + printErrorMessageToView("Enter valid id number."); + } + } + + //Check all input + printMessageToView("MenuID:" + addItemID + " MenuName:" + rNewItem.getName() + + " Quantity:" + addItemQuantity); + + printMessageToView("OK?(yes:y)"); + key = cView.userInput(); + if(!key.equalsIgnoreCase("Y")) + { + printMessageToView("canceled."); + addItemID = 0; + addItemQuantity = 0; + rNewItem = null; + continue; //back to beginning the loop + } + + + //////////ADD!!!(database)///////////// + cDatabase.addOrderItem(orderID, rNewItem, addItemQuantity); + + printMessageToView("Add another item?(yes:y)"); + key = cView.userInput(); + if(!key.equalsIgnoreCase("Y"))//finish adding item + { + done = true; + } + else//continue adding item + { + //initialize + addItemID = 0; + addItemQuantity = 0; + rNewItem = null; + } + } + } + + public void deleteOrderItem(int orderID) + { + String key; + boolean done = false; + int deleteNo = 0; + + Order rOrder = cDatabase.findOrderByID(orderID); + if( currentUserID != rOrder.getStaffID()) + { + printErrorMessageToView("You are not eligible to delete the order."); + printMessageToView("(The order belonges to " + rOrder.getStaffName() + ")"); + pause(2); + return; + } + + while(!done) + { + try + { + //show order detail/////// + cView.deleteOrderItemView(); + cView.showOrderDetail(orderID); + printMessageToView("Choose number to delete or type Q to exit):"); + key = cView.userInput(); + if(key.equalsIgnoreCase("Q")) //Exit + { + return; + } + deleteNo = Integer.parseInt(key) - 1; //index actually starts from zero + if(!cDatabase.deleteOrderItem(orderID, deleteNo)) + { + printErrorMessageToView("Not found."); + pause(2); + continue; //delete error + } + cView.deleteOrderItemView(); + cView.showOrderDetail(orderID); + printMessageToView("Deleted."); + printMessageToView("Delete another item?(yes:y)"); + key = cView.userInput(); + if( !key.equalsIgnoreCase("Y")) + done = true; + } + catch(Exception e) + { + printErrorMessageToView("Enter valid integer."); + pause(2); + } + } + } + + private void closeOrder() + { + cView.closeOrderView(); + + int closeOrderID = findOrder(); + if(closeOrderID == -1) return; + + Order rOrder = cDatabase.findOrderByID(closeOrderID); + if( currentUserID != rOrder.getStaffID()) + { + printErrorMessageToView("You are not eligible to delete the order."); + printMessageToView("(The order belonges to " + rOrder.getStaffName() + ")"); + pause(3); + return; + } + + if(rOrder.getState() != 0) + { + printMessageToView("The order is already closed or canceled."); + pause(2); + return; + } + + printMessageToView("Are you sure to close this order?(YES:y)"); + String key = cView.userInput(); + + if(key.equalsIgnoreCase("Y"))//back to previous menu + { + cDatabase.closeOrder(closeOrderID); + printMessageToView("The order have been closed."); + pause(2); + } + } + + private void cancelOrder() + { + cView.cancelOrderView(); + + int cancelOrderID = findOrder(); + if(cancelOrderID == -1) return; + + Order rOrder = cDatabase.findOrderByID(cancelOrderID); + if( currentUserID != rOrder.getStaffID()) + { + printErrorMessageToView("You are not eligible to delete the order."); + printMessageToView("(The order belonges to " + rOrder.getStaffName() + ")"); + pause(3); + return; + } + + if( rOrder.getState() != 0) + { + printMessageToView("The order is already closed or canceled."); + pause(2); + return; + } + + printMessageToView("Are you sure to cancel this order?(YES:y)"); + String key = cView.userInput(); + + if(key.equalsIgnoreCase("Y"))//back to previous menu + { + cDatabase.cancelOrder(cancelOrderID); + printMessageToView("The order have been canceled."); + pause(2); + } + } + + private int findOrder() + { + String key; + int imputID = -1; + + while(imputID == -1) + { + printMessageToView("Choose orderID:"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Q"))//back to previous menu + { + break; + } + + try + { + imputID = Integer.parseInt(key); + if( imputID < 0) + { + printErrorMessageToView("ID must be positive integer."); + imputID = -1;//initiarise + continue; //back to begining of loop + } + + Order rOrder = cDatabase.findOrderByID(imputID); + if(rOrder == null)//order not found + { + printErrorMessageToView("OrderID[" + imputID + "]is not found."); + imputID = -1;//initiarise + continue; //back to begining of loop + } + } + catch(Exception e) + { + printMessageToView("Enter valid Integer."); + } + } + return imputID; + } + + /*********************************************************** + * Edit menu item mode + **********************************************************/ + //---------------------------------------------------------- + // Choose edit mode (1:Add 2:Update 3:Delete) + //---------------------------------------------------------- + private void chooseEditMenuItemMode() + { + String key; + int inputNumber = 0; + + cView.choseEditMenuView(); + printMessageToView("Choose number:"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Q")) //Back to main menu + { + scene = SCENE_MAIN_MENU; + return; + } + + while(inputNumber == 0) + { + try + { + inputNumber = Integer.parseInt(key); + switch(inputNumber) + { + case 1: //add new employee + addNewMenuItem(); + break; + case 2: + updateMenuItem(); + break; + case 3: + deleteMenuItem(); + break; + default: + printMessageToView("Choose 1 to 3:"); + key = cView.userInput(); + break; + } + } + catch(Exception e) + { + printMessageToView("Choose 1 to 3:"); + key = cView.userInput(); + } + } + } + + //---------------------------------------------------------- + // Make and check new ID (used by addMenuItem method only) + //---------------------------------------------------------- + private int generateMenuID() + { + int newID = 0; + String key; + + printMessageToView("Choose ID for new item:"); + key = cView.userInput(); + + while(newID == 0) + { + //Back to main menu + if(key.equalsIgnoreCase("Q")) + return 0; + try + { + newID = Integer.parseInt(key); + if(newID > 9999) + { + printMessageToView( "Please enter less than 10000"); + key = cView.userInput(); + newID = 0; + } + else + { + //Check if there is same ID + MenuItem rMenuItem = cDatabase.findMenuItemByID(newID); + //if(found) + if(rMenuItem != null) + { + printMessageToView( "ID:" + newID + "is already used by " + rMenuItem.getName()); + printMessageToView("Please try another number:"); + key = cView.userInput(); + newID = 0; + } + } + } + catch(Exception e) + { + printMessageToView("Please enter valid integer."); + key = cView.userInput(); + } + + } + return newID; + } + //---------------------------------------------------------- + // Add new menu item + //---------------------------------------------------------- + private void addNewMenuItem() + { + int newID=0; + String newName; + double newPrice; + byte newType; + String key; + + cView.addMenuItemView(); + //cView.clearScreen(); + //displayTi("********* Add new item **********"); + + boolean done = false; + //-------------------- loop until new item is added or enter "Q" ---------- + while(!done) + { + newID = generateMenuID(); + if (newID == 0) + { + //back to mein menu + //scene = SCENE_MAIN_MENU; + return; + } + + printMessageToView("Enter item name:"); + newName = cView.userInput(); + + newPrice = 0; + printMessageToView("Enter price:"); + key = cView.userInput(); + while(newPrice == 0) + { + try + { + newPrice = Double.parseDouble(key); + if(newPrice <= 0) + { + printMessageToView("Enter positive number:"); + key = cView.userInput(); + newPrice = 0; + } + } + catch(Exception e) + { + printMessageToView("Enter valid number:"); + key = cView.userInput(); + } + } + + newType = 0; + printMessageToView("Enter item type(1:MAIN 2:DRINK 3:ALCOHOL 4:DESSERT):"); + key = cView.userInput(); + while(newType == 0) + { + try + { + newType = Byte.parseByte(key); + if(newType < 1 || 4< newType) + { + printMessageToView("Enter 1 to 4:"); + key = cView.userInput(); + newType = 0; + } + } + catch(Exception e) + { + printMessageToView("Enter valid number:"); + key = cView.userInput(); + } + } + + //Check all input + printMessageToView("NewID:" + newID); + printMessageToView("New item name:" + newName); + printMessageToView("New item price:" + newPrice); + switch(newType) + { + case MenuItem.MAIN: + printMessageToView("New item type:MAIN"); + break; + case MenuItem.DRINK: + printMessageToView("New item type:DRINK"); + break; + case MenuItem.ALCOHOL: + printMessageToView("New item type:ALCOHOL"); + break; + case MenuItem.DESSERT: + printMessageToView("New item type:DESSERT"); + break; + } + + printMessageToView("\nOK? (Y:yes)"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Y")) + { + try + { + cDatabase.addMenuItem(newID, newName, newPrice, newType); + printMessageToView("New menu item is added."); + } + catch(DatabaseException dbe) + { + printErrorMessageToView("Add menu item error."); + } + + done = true; + } + } + //---------------- MenuItem is added (loop end)----------------------------- + + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + //scene = SCENE_MAIN_MENU; + } + + + //---------------------------------------------------------- + // Edit menu item + //---------------------------------------------------------- + private void updateMenuItem() + { + String key = ""; + int inputNumber = 0; + MenuItem rMenuItem = null; + + cView.showMenuList(); + printMessageToView("-----------------------------------------"); + + while(rMenuItem == null) + { + printMessageToView("Choose menu ID to edit:"); + key = cView.userInput(); + if(key.equalsIgnoreCase("Q")) //Back to main menu + { + printMessageToView("Transaction is canceled."); + pause(2); + return; + } + + try + { + //findUser + inputNumber = Integer.parseInt(key); + rMenuItem = cDatabase.findMenuItemByID(inputNumber); + + if(rMenuItem == null) + { + printErrorMessageToView("ID is not found."); + } + } + catch(Exception e) + { + printErrorMessageToView("ID must be valid number."); + } + } + + + //-------------- Choose Edit number ----------------- + cView.editMenuItemView(rMenuItem); + /*cView.clearScreen(); + cView.showMenuItemData(rMenuItem); + printMessageToView("\nChoose Edit number\n"); + printMessageToView("1:Name"); + printMessageToView("2:Price"); + printMessageToView("3:Type"); + printMessageToView("4:Set promotion price"); + printMessageToView("5:Reset item state"); + printMessageToView("Q:Quit");*/ + printMessageToView("Choose Edit number:"); + inputNumber = 0; + + while(inputNumber == 0) + { + key = cView.userInput(); + if(key.equalsIgnoreCase("Q")) //Back to main menu + { + printMessageToView("Transaction is canceled."); + pause(2); + return; + } + + try{ + inputNumber = Integer.parseInt(key); + if(inputNumber < 1 || 5 < inputNumber) + { + inputNumber = 0; + printMessageToView("Enter 1 to 5:"); + } + } + catch(Exception e) + { + printMessageToView("Input valid integer:"); + } + } + //-------------- End choosing edit number ----------------- + + //-------------- Edit item start ----------------- + + boolean done = false; + while(!done) + { + cView.clearScreen(); + cView.showMenuItemData(rMenuItem); + printMessageToView("-----------------------------------------"); + try + { + switch(inputNumber) + { + case 1: //edit name + printMessageToView("Input new name:"); + key = cView.userInput(); + cDatabase.editMenuItemData(rMenuItem, cDatabase.EDIT_ITEM_NAME, key); + cView.showMenuItemData(rMenuItem); + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + break; + case 2: //edit price + printMessageToView("Input new price:"); + key = cView.userInput(); + cDatabase.editMenuItemData(rMenuItem, cDatabase.EDIT_ITEM_PRICE, key); + cView.showMenuItemData(rMenuItem); + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + break; + case 3: //edit type + printMessageToView("Input new type(1:Main 2:Drink 3:Alcohol 4:Dessert):"); + key = cView.userInput(); + cDatabase.editMenuItemData(rMenuItem, cDatabase.EDIT_ITEM_TYPE, key); + cView.showMenuItemData(rMenuItem); + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + break; + case 4: + printMessageToView("Input promotion price( normaly $" + rMenuItem.gerRegularPrice() + "):"); + key = cView.userInput(); + double promotionPrice = Double.parseDouble(key); + if(promotionPrice >= rMenuItem.gerRegularPrice()) + { + printErrorMessageToView("Promotion Price(" + promotionPrice + + ") should be lower than normal price(" + rMenuItem.gerRegularPrice() + ")!!"); + pause(2); + continue; + } + else if(promotionPrice < 0) + { + printErrorMessageToView("Enter positive number."); + pause(2); + continue; + } + else + { + /////database////// + cDatabase.setMenuItemAsPromotionItem(rMenuItem, promotionPrice); + cView.showMenuItemData(rMenuItem); + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + } + break; + case 5: + cDatabase.resetMenuState(rMenuItem); + cView.showMenuItemData(rMenuItem); + printMessageToView("Item state have been initialized."); + printMessageToView("Please enter something to exit"); + key = cView.userInput(); + break; + default: + printMessageToView("This line must not be execute!! Please check program.(Controller class)"); + pause(2); + break; + } + done = true; + } + catch(DatabaseException dbe) + { + printErrorMessageToView(dbe.getErrMessage()); + pause(2); + } + catch( Exception e) + { + printErrorMessageToView("'" + key + "'" + "is not acceptable. Please enter only number."); + pause(2); + } + //-------------- Edit item end ----------------- + } + //back to main menu + //scene = SCENE_MAIN_MENU; + } + + //---------------------------------------------------------- + // Delete menuItem + //---------------------------------------------------------- + private void deleteMenuItem() + { + String key; + int inputNumber = 0; + MenuItem rMenuItem = null; + + while(inputNumber == 0) + { + try + { + //findUser + while(rMenuItem == null) + { + cView.showMenuList(); + printMessageToView("Choose menu item ID to delete:"); + key = cView.userInput(); + if(key.equalsIgnoreCase("Q")) //Back to main menu + { + //scene = SCENE_MAIN_MENU; + return; + } + inputNumber = Integer.parseInt(key); + rMenuItem = cDatabase.findMenuItemByID(inputNumber); + if(rMenuItem == null) + { + printMessageToView("Item is not found.:"); + pause(2); + } + } + + printMessageToView("MenuItem ID:" + rMenuItem.getID()); + printMessageToView(" Name:" + rMenuItem.getName()); + printMessageToView("Price:" + rMenuItem.getPrice()); + printMessageToView("will be deleted. OK? (YES:y)"); + + key = cView.userInput(); + if(!key.equalsIgnoreCase("Y")) + { + printMessageToView("The transaction is canceled."); + pause(2); + //scene = SCENE_MAIN_MENU; + return; + } + + cDatabase.deleteMenuItem(rMenuItem); + + printMessageToView("Deleted."); + pause(2); + } + catch(Exception e) + { + printMessageToView("ID must be valid number."); + pause(2); + } + } + } + + /*********************************************************** + * Display database data + **********************************************************/ + private void showMenuList() + { + cView.showMenuList(); + printMessageToView("Please enter something to exit."); + cView.userInput(); + // back to main menu + scene = SCENE_MAIN_MENU; + } + + private void showStaffList() + { + cView.showStaffList(); + printMessageToView("Please enter something to exit."); + cView.userInput(); + // back to main menu + scene = SCENE_MAIN_MENU; + } + + + private void printMessageToView(String message) + { + cView.displayMessage(message); + } + + private void printErrorMessageToView(String message) + { + cView.displayErrorMessage(message); + } + + // create pause for some seconds + private void pause( long secs) + { + try + { + Thread.currentThread().sleep(secs * 1000); + } + catch(InterruptedException e) + { + e.printStackTrace(); + } + } + /*********************************************************** + * Generate reports + *********************************************************/ + private void generateReports() + { + String key; + int selection = 0; + + cView.generateReportView(); + printMessageToView("Choose number:"); + while(selection == 0) + { + try + { + key = cView.userInput(); + if(key.equalsIgnoreCase("Q")) + { + //Back to main menu + scene = SCENE_MAIN_MENU; + return; + } + + selection = Integer.parseInt(key); + + String filename; + + switch(selection) + { + case 1: + generateSalesReports(); + + break; + case 2: + generatePaymentReports(); + break; + default: + selection = 0; + printMessageToView("Choose 1 or 2:"); + break; + } + } + catch(Exception e) + { + printMessageToView("Choose 1 or 2:"); + } + } + } + + private void generateSalesReports() + { + String key; + + cView.showOrderList(); + printMessageToView("Print out? (YES:y)"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Y")) + { + if(!cDatabase.checkIfAllOrderClosed()) + { + printMessageToView("All orders must be closed or canceled before generate report."); + printMessageToView("Do you want to close all orders? (YES:y)"); + key = cView.userInput(); + if(key.equalsIgnoreCase("Y")) + { + cDatabase.closeAllOrder(); + } + else + { + scene = SCENE_MAIN_MENU; + return; + } + } + + try + { + String filename = cDatabase.generateOrderReport(todaysDate); + printMessageToView("File <" + filename + "> has been generated."); + printMessageToView("Done."); + printMessageToView("Please enter something to exit."); + key = cView.userInput(); + } + catch(DatabaseException de) + { + printErrorMessageToView(de.getErrMessage()); + pause(3); + } + } + // back to main menu + scene = SCENE_MAIN_MENU; + } + + private void generatePaymentReports() + { + String key; + + cView.showPaymentList(); + printMessageToView("Print out? (YES:y)"); + key = cView.userInput(); + + if(key.equalsIgnoreCase("Y")) + { + //if(!cDatabase.checkIfAllOrderClosed()) + if(!cDatabase.checkIfAllStaffCheckout()) + { + printMessageToView("There still exist some staff being active."); + printMessageToView("All staff must be checked out before generate a payment report."); + printMessageToView("Do you want to make all staff finished work? (YES:y)"); + key = cView.userInput(); + if(key.equalsIgnoreCase("Y")) + { + cDatabase.forthClockOutAllStaff(); + + } + else + { + scene = SCENE_MAIN_MENU; + return; + } + } + + try + { + String filename = cDatabase.generatePaymentReport(todaysDate); + printMessageToView("File <" + filename + "> has been generated."); + printMessageToView("Please enter something to exit."); + key = cView.userInput(); + } + catch(DatabaseException de) + { + printErrorMessageToView(de.getErrMessage()); + pause(3); + } + } + // back to main menu + scene = SCENE_MAIN_MENU; + } +} diff --git a/Restaurant-management-system/Controller_GUI.java b/Restaurant-management-system/Controller_GUI.java new file mode 100644 index 00000000..8f49249d --- /dev/null +++ b/Restaurant-management-system/Controller_GUI.java @@ -0,0 +1,672 @@ + +/** + * Write a description of class Controller_GUI here. + * + * @author (your name) + * @version (a version number or a date) + */ +import java.util.*; +import java.text.*; + +public class Controller_GUI +{ + private UserInterface_GUI cView; + private Database cDatabase; + private int userType; + private int currentUserID; + private String currentUserName; + private String todaysDate; + + private int todaysOrderCnt; //Today's order count + private double totalSales; //Today's total sales + private int todaysCancelCnt; //Today's cancel count + private double cancelTotal; //Total cost of today's canceled orders + + + private String errorMessage; + + //define user type + public final static int USER_ANONYMOUS = 0; + public final static int USER_EMPLOYEE = 1; + public final static int USER_MANAGER = 2; + + public Controller_GUI() + { + this.cDatabase = new Database(); + try + { + cDatabase.loadFiles(); + } + catch(DatabaseException de) + { + System.out.println(de.getErrMessage()); + System.exit(0); + } + + cView = new UserInterface_GUI( this); + + Date date = new Date(); + SimpleDateFormat stf = new SimpleDateFormat("yyyy/MM/dd"); + todaysDate = stf.format(date); + cView.setVisible(true); + cView.setTodaysDate(todaysDate); + this.userType = USER_ANONYMOUS; + + todaysOrderCnt = 0; + totalSales = 0; + todaysCancelCnt = 0; + cancelTotal = 0; + } + + private void setErrorMessage(String errorMessage) + { + this.errorMessage = errorMessage; + } + + public String getErrorMessage() + { + String result = this.errorMessage; + this.errorMessage = ""; + return result; + } + + public int getTodaysOrderCnt() + { + return this.todaysOrderCnt; + } + + public int getTodaysCancelCnt() + { + return this.todaysCancelCnt; + } + + public double getTotalSales() + { + return this.totalSales; + } + + public double getCancelTotal() + { + return this.cancelTotal; + } + + public double getOrderTotalCharge(int orderID) + { + return cDatabase.getOrderTotalCharge(orderID); + } + + public int getOrderState(int orderID) + { + return cDatabase.getOrderState(orderID); + } + + public String getCurrentUserName() + { + return this.currentUserName; + } + + public boolean checkIfUserClockedOut() + { + Staff rStaff = cDatabase.findStaffByID(currentUserID); + + if( rStaff == null) return false; + if( rStaff.getWorkState() == Staff.WORKSTATE_ACTIVE) + return true; + else + return false; + } + + /*********************************************************** + * Login + **********************************************************/ + //---------------------------------------------------------- + // Find user + //---------------------------------------------------------- + public boolean loginCheck( int inputID, String inputPassword, boolean isManager) + { + String searchClassName; + + //---------search user---------- + Staff rStaff = cDatabase.findStaffByID(inputID); + + if(isManager) searchClassName = "Manager"; + else searchClassName = "Employee"; + + if( rStaff != null)//User data is found + { + //Search only particular target(Manager or Employee) + if( rStaff.getClass().getName().equalsIgnoreCase(searchClassName)) + { + if(rStaff.getPassword().equals(inputPassword)) + { + if(rStaff.getWorkState() == 0) //Not clocked in yet + { + rStaff.clockIn(); + } + if(isManager) + { + userType = USER_MANAGER; + cView.changeMode(cView.MODE_MANAGER); + } + else + { + userType = USER_EMPLOYEE; + cView.changeMode(cView.MODE_EMPLOYEE); + } + currentUserID = inputID; + currentUserName = rStaff.getFullName(); + cView.setLoginUserName(currentUserName); //show user name on the view + + return true; //Login success + } + else + { + setErrorMessage("Password unmatch."); + //printErrorMessageToView("Password unmatching."); + return false; + } + } + else //ID is found but type(Manager or Employee) is umnatching + { + setErrorMessage("Not found."); + //printErrorMessageToView("Not found."); + return false; + } + } + else + { + setErrorMessage("Not found."); + return false; + } + + } + + //---------------------------------------------------------- + // Logout (Set state as Anonymous) + //---------------------------------------------------------- + public void userLogout() + { + userType = USER_ANONYMOUS; + currentUserID = 0; + cView.setLoginUserName(""); + } + + /*********************************************************** + * Staff management + **********************************************************/ + public boolean addNewStaff(int newID, String newPassword, String newFirstName, String newLastName, boolean isManager) + { + Staff rStaff = cDatabase.findStaffByID(newID); + if(rStaff != null) + { + setErrorMessage("ID:" + newID + " is arleady used by " + rStaff.getFullName()); + return false; + } + + try + { + cDatabase.addStaff(newID, newPassword, newFirstName, newLastName, isManager); + return true; + } + catch(DatabaseException de) + { + setErrorMessage(de.getErrMessage()); + return false; + } + } + + public boolean updateStaff(int id, String newPassword, String newFirstName, String newLastName) + { + try + { + cDatabase.editStaffData(id, newPassword, newFirstName, newLastName); + return true; + } + catch(DatabaseException de) + { + setErrorMessage(de.getErrMessage()); + return false; + } + } + + public boolean deleteStaff(int id) + { + Staff rStaff = cDatabase.findStaffByID(id); + if(rStaff == null) + { + setErrorMessage("StaffID:" + id + " is not found."); + return false; + } + + try + { + cDatabase.deleteStaff(rStaff); + } + catch(DatabaseException de) + { + setErrorMessage(de.getErrMessage()); + return false; + } + return true; + } + + public Staff getStaffData(int staffID) + { + return cDatabase.findStaffByID(staffID); + } + + public boolean clockOut() + { + return clockOut(currentUserID); + } + + public boolean clockOut(int staffID) + { + Staff rStaff = cDatabase.findStaffByID(staffID); + + byte state = rStaff.getWorkState(); + boolean result = false; + switch(state) + { + case Staff.WORKSTATE_ACTIVE: + rStaff.clockOut(); + result = true; + break; + case Staff.WORKSTATE_FINISH: + setErrorMessage("Staff:" + rStaff.getFullName() + " already clocked out."); + break; + default: + setErrorMessage("Staff:" + rStaff.getFullName() + "has not been on work today."); + break; + } + + return result; + } + + public void clockOutAll() + { + cDatabase.forthClockOutAllStaff(); + } + + /*********************************************************** + * Menu management + **********************************************************/ + public boolean addNewMenuItem(int newID, String newName, double newPrice, byte menuType) + { + MenuItem rMenuItem = cDatabase.findMenuItemByID(newID); + if(rMenuItem != null) + { + setErrorMessage("ID:" + newID + " is arleady used by " + rMenuItem.getName()); + return false; + } + + try + { + cDatabase.addMenuItem(newID, newName, newPrice, menuType); + return true; + } + catch(DatabaseException de) + { + setErrorMessage(de.getErrMessage()); + return false; + } + } + + public boolean updateMenuItem(int id, String newName, double newPrice, byte menuType) + { + try + { + cDatabase.editMenuItemData(id, newName, newPrice, menuType); + return true; + } + catch(DatabaseException de) + { + setErrorMessage(de.getErrMessage()); + return false; + } + } + + public boolean deleteMenuItem(int id) + { + MenuItem rMenuItem= cDatabase.findMenuItemByID(id); + if(rMenuItem == null) + { + setErrorMessage("Menu item ID:" + id + " is not found."); + return false; + } + + try + { + cDatabase.deleteMenuItem(rMenuItem); + } + catch(DatabaseException de) + { + setErrorMessage(de.getErrMessage()); + return false; + } + return true; + } + + public MenuItem getMenuItemData(int menuItemID) + { + return cDatabase.findMenuItemByID(menuItemID); + } + /*********************************************************** + * Order management + **********************************************************/ + public int createOrder() + { + return cDatabase.addOrder(currentUserID, currentUserName); + //editOrderItem(newOrderID); + } + + public boolean addNewOrderItem(int orderID, int addItemID, byte addItemQuantity) + { + Order rOrder = cDatabase.findOrderByID(orderID); + if( currentUserID != rOrder.getStaffID()) + { + setErrorMessage("You are not eligible to edit the order.\nThe order belonges to " + rOrder.getStaffName() + ")"); + //printErrorMessageToView("You are not eligible to edit the order.\nThe order belonges to " + rOrder.getStaffName() + ")"); + return false; + } + + MenuItem rNewItem = null; + + rNewItem = cDatabase.findMenuItemByID(addItemID); + if(rNewItem == null) + { + setErrorMessage("MenuID[" + addItemID + "]is not found."); + //printErrorMessageToView("MenuID[" + addItemID + "]is not found."); + addItemID = 0; + return false; + } + + //////////ADD!!!(database)///////////// + cDatabase.addOrderItem(orderID, rNewItem, addItemQuantity); + return true; + } + + public boolean deleteOrderItem(int orderID, int deleteNo) + { + Order rOrder = cDatabase.findOrderByID(orderID); + if( currentUserID != rOrder.getStaffID()) + { + setErrorMessage("You are not eligible to delete the order.\nThe order belonges to " + rOrder.getStaffName() + ")"); + //printErrorMessageToView("You are not eligible to delete the order.\nThe order belonges to " + rOrder.getStaffName() + ")"); + return false; + } + + deleteNo -=1; //index actually starts from zero + if(!cDatabase.deleteOrderItem(orderID, deleteNo)) + { + //printErrorMessageToView("Not found."); + setErrorMessage("Not found."); + return false; + } + return true; + } + + public boolean closeOrder(int closeOrderID) + { + Order rOrder = cDatabase.findOrderByID(closeOrderID); + if( currentUserID != rOrder.getStaffID()) + { + setErrorMessage("You are not eligible to delete the order.\n(The order belonges to " + rOrder.getStaffName() + ")"); + return false; + } + + if(rOrder.getState() != 0) + { + setErrorMessage("The order is already closed or canceled."); + return false; + } + cDatabase.closeOrder(closeOrderID); + todaysOrderCnt++; + totalSales += rOrder.getTotal(); + return true; + } + + public boolean cancelOrder(int cancelOrderID) + { + Order rOrder = cDatabase.findOrderByID(cancelOrderID); + if( currentUserID != rOrder.getStaffID()) + { + setErrorMessage("You are not eligible to delete the order.\n(The order belonges to " + rOrder.getStaffName() + ")"); + return false; + } + + if( rOrder.getState() != 0) + { + setErrorMessage("The order is already closed or canceled."); + return false; + } + + cDatabase.cancelOrder(cancelOrderID); + todaysCancelCnt++; + cancelTotal += rOrder.getTotal(); + return true; + } + + public void closeAllOrder() + { + cDatabase.closeAllOrder(); + } + + /*********************************************************** + * Reports + * return:Report file name + **********************************************************/ + public String generateSalesReport() + { + if(!cDatabase.checkIfAllOrderClosed()) + { + setErrorMessage("All orders must be closed or canceled before generate reports."); + return null; + } + + try + { + return cDatabase.generateOrderReport(todaysDate); + } + catch(DatabaseException de) + { + setErrorMessage(de.getErrMessage()); + return null; + } + } + + public String generatePaymentReport() + { + if(!cDatabase.checkIfAllStaffCheckout()) + { + setErrorMessage("All staff must be checked out before generate a payment report."); + return null; + } + + try + { + return cDatabase.generatePaymentReport(todaysDate); + } + catch(DatabaseException de) + { + setErrorMessage(de.getErrMessage()); + return null; + } + } + + /*********************************************************** + * Create stiring lists + **********************************************************/ + public ArrayList<String> createStaffList() + { + Iterator<Staff> it = cDatabase.getStaffList().iterator(); + ArrayList<String> initData = new ArrayList<String>(); + + while (it.hasNext()) { + Staff re = (Staff)it.next(); + String fullName = re.getFullName(); + String output = String.format("Staff ID:%4d Name:%-25s", + re.getID(), fullName); + switch(re.getWorkState()) + { + case Staff.WORKSTATE_ACTIVE: + output += "[From:" + re.getStartTime() + "]"; + break; + case Staff.WORKSTATE_FINISH: + output += "[From:" + re.getStartTime() + " to " + re.getFinishTime() + "]"; + break; + default: + output += "[Not on work]"; + break; + } + + //if(re.getClass().getName().equalsIgnoreCase("Manager")) + if(re instanceof Manager) + { + output += " * Manager *"; + } + initData.add(output); + } + + return initData; + } + + public ArrayList<String> createOrderList() + { + Iterator<Order> it = cDatabase.getOrderList().iterator(); + String state; + ArrayList<String> initData = new ArrayList<String>(); + String output; + + while (it.hasNext()) { + Order re = it.next(); + switch(re.getState()) + { + case Order.ORDER_CLOSED: + state = "Closed"; + break; + case Order.ORDER_CANCELED: + state = "Canceled"; + break; + default: + state = "-"; + break; + } + + output = String.format("Order ID:%4d StaffName:%-20s Total:$%5.2f State:%-8s\n", + re.getOrderID(),re.getStaffName(),re.getTotal(),state); + initData.add(output); + } + if(initData.isEmpty()) + initData.add("No order."); + return initData; + } + + public ArrayList<String> createOrderItemlList(int orderID) + //private void createOrderItemlList( int orderID, JList list) + { + Order rOrder = cDatabase.findOrderByID(orderID); + ArrayList<String> initData = new ArrayList<String>(); + + if(rOrder == null) + { + initData.add("No order information"); + //list.setListData(initData); + return initData; + } + + String output; + + Iterator<OrderDetail> it = rOrder.getOrderDetail().iterator(); + OrderDetail re; + + int count = 0; + + while (it.hasNext()) { + re = it.next(); + output = String.format("%-4d|%-24s|%5d|%5.2f", + ++count, re.getItemName(), re.getQuantity(), re.getTotalPrice()); + initData.add(output); + } + if(initData.isEmpty()) + initData.add("No item"); + //list.setListData(initData); + return initData; + } + + public ArrayList<String> createMenuList(int disuplayMenuType) + { + Iterator<MenuItem> it = cDatabase.getMenuList().iterator(); + ArrayList<String> initData = new ArrayList<String>(); + + while (it.hasNext()) { + MenuItem re = (MenuItem)it.next(); + byte menuType = re.getType(); + //displayMenuType != ALL && ... + if(disuplayMenuType!= 0 && disuplayMenuType != menuType) + continue; + String strMenuType; + switch( menuType) + { + case MenuItem.MAIN: + strMenuType = "Main"; + break; + case MenuItem.DRINK: + strMenuType = "Drink"; + break; + case MenuItem.ALCOHOL: + strMenuType = "Alcohol"; + break; + case MenuItem.DESSERT: + strMenuType = "Dessert"; + break; + default: + strMenuType = "Undefined"; + break; + } + String output = String.format("Menu ID:%4d Name:%-20s Price:%5.2f Type:%s", + re.getID(),re.getName(),re.getPrice(),strMenuType); + if(re.getState() == MenuItem.PROMOTION_ITEM) + { + output += " ** Today's Special!! **"; + } + + initData.add(output); + } + if(initData.isEmpty()) + initData.add("No order."); + return initData; + } + + public String createPaymentList() + { + double totalPayment = 0; + int staffNum = 0; + String output = ""; + + Iterator<Staff> it = cDatabase.getStaffList().iterator(); + while (it.hasNext()) + { + Staff re = it.next(); + + if(re.getWorkState() == Staff.WORKSTATE_FINISH) + { + double pay = re.culculateWages(); + output += String.format("Staff ID:%4d StaffName:%-20s Work time:%5.2f Pay:%5.2f\n", + re.getID(),re.getFullName(),re.culculateWorkTime(), pay); + staffNum++; + totalPayment += pay; + } + else if(re.getWorkState() == Staff.WORKSTATE_ACTIVE) + { + output += String.format("Staff ID:%4d StaffName:%-20s * On work *\n", + re.getID(),re.getFullName()); + staffNum++; + } + } + output += "-------------------------------------------------------\n"; + output += String.format("Total payment:$%.2f (%d)", totalPayment, staffNum); + return output; + //displayMessage("Total payment:$" + totalPayment + "(" + staffNum + ")"); + } +} diff --git a/Restaurant-management-system/Database.java b/Restaurant-management-system/Database.java new file mode 100644 index 00000000..9114d45e --- /dev/null +++ b/Restaurant-management-system/Database.java @@ -0,0 +1,876 @@ +/** + * Kazunori Hayashi +* Version 1.0 29/7/2013 + */ +import java.util.*; +import java.io.*; +import java.lang.*; +import java.util.Comparator; + +public class Database +{ + private final static String STAFF_FILE = "dataFiles/staff.txt"; + private final static String MANAGER_FILE = "dataFiles/manager.txt"; + private final static String MENU_FILE = "dataFiles/menu_item.txt"; + private final static String REPORT_FILE = "dataFiles/reports/report_"; + private final static String PAYMENT_FILE = "dataFiles/reports/payment_"; + private final static String WAGE_INFO_FILE = "dataFiles/wage_info.txt"; + + private ArrayList<Staff> staffList = new ArrayList<Staff>(); + private ArrayList<MenuItem> menuList = new ArrayList<MenuItem>(); + private ArrayList<Order> orderList = new ArrayList<Order>(); + + private Date date; + int todaysOrderCounts; + /**************************************************************************** + * Constructor + ***************************************************************************/ + public Database() + { + date = new Date(); + todaysOrderCounts = 0; //Load order file?? + } + /**************************************************************************** + * Getter + ***************************************************************************/ + public ArrayList<Staff> getStaffList() + { + return staffList; + } + + public ArrayList<MenuItem> getMenuList() + { + return menuList; + } + + public ArrayList<Order> getOrderList() + { + return orderList; + } + + public int getTodaysOrderCount() + { + return this.todaysOrderCounts; + } + + //---------------------------------------------------------- + // Find staff from ID + //---------------------------------------------------------- + public Staff findStaffByID(int id) + { + Iterator<Staff> it = staffList.iterator(); + Staff re = null; + boolean found = false; + + if(id < 0){ + return null; + } + + while (it.hasNext() && !found) { + re = (Staff)it.next(); + if( re.getID() == id) + { + found = true; + } + } + + if(found) + return re; + else + return null; + } + + //---------------------------------------------------------- + // Find menu item from ID + //---------------------------------------------------------- + public MenuItem findMenuItemByID(int id) + { + Iterator<MenuItem> it = menuList.iterator(); + MenuItem re = null; + boolean found = false; + + if(id < 0){ + return null; + } + + while (it.hasNext() && !found) { + re = (MenuItem)it.next(); + if( re.getID() == id) + { + found = true; + } + } + + if(found) + return re; + else + return null; + } + + //---------------------------------------------------------- + // Find order from ID + //---------------------------------------------------------- + public Order findOrderByID(int id) + { + Iterator<Order> it = orderList.iterator(); + Order re = null; + boolean found = false; + + if(id < 0){ + return null; + } + + while (it.hasNext() && !found) { + re = it.next(); + if( re.getOrderID() == id) + { + found = true; + } + } + + if(found) + return re; + else + return null; + } + /**************************************************************************** + * Manipurate datas + ***************************************************************************/ + //--------------------------------------------------------------- + // Staff information + //--------------------------------------------------------------- + //edit staff data + // rStaff reference the staff + // which 1:Lastname 2:Firstname 3:passward + public final static int EDIT_LAST_NAME = 1; + public final static int EDIT_FIRST_NAME = 2; + public final static int EDIT_PASSWORD = 3; + + public void editStaffData(int staffID, String newPassword, String newFirstName, String newLastName) throws DatabaseException + { + Staff rStaff = findStaffByID(staffID); + rStaff.setPassword(newPassword); + rStaff.setLastName(newLastName); + rStaff.setFirstName(newFirstName); + + try + { + if(rStaff instanceof Manager) + //if(rStaff.getClass().getName().equalsIgnoreCase("Manager")) + updateStaffFile(true);//update manager file + else + updateStaffFile(false);//update employee file + } + catch(DatabaseException dbe) + { + throw dbe; + } + } + + public void editStaffData(Staff rStaff, int which, String newData) throws DatabaseException + { + switch(which) + { + case EDIT_LAST_NAME: + rStaff.setLastName(newData); + break; + case EDIT_FIRST_NAME: + rStaff.setFirstName(newData); + break; + case EDIT_PASSWORD: + rStaff.setPassword(newData); + break; + default: + break; + } + + try + { + if(rStaff instanceof Manager) + //if(rStaff.getClass().getName().equalsIgnoreCase("Manager")) + updateStaffFile(true);//update manager file + else + updateStaffFile(false);//update employee file + } + catch(DatabaseException dbe) + { + throw dbe; + } + } + + public void deleteStaff(Staff rStaff) throws DatabaseException + { + boolean isManager = false; + staffList.remove(rStaff); + //if(rStaff.getClass().getName().equalsIgnoreCase("Manager")) + if(rStaff instanceof Manager) + isManager = true; + try + { + updateStaffFile(isManager); + } + catch(DatabaseException dbe) + { + throw dbe; + } + } + + + public void addStaff(int newID, String newPassward, String newFirstName, String newLastName, boolean isManager) throws DatabaseException + { + Staff newStaff; + if(isManager) + newStaff = new Manager(newID, newLastName, newFirstName, newPassward); + else + newStaff = new Employee(newID, newLastName, newFirstName, newPassward); + staffList.add(newStaff); + if(newStaff instanceof Manager) + //if(newStaff.getClass().getName().equalsIgnoreCase("Manager")) + isManager = true; + try + { + updateStaffFile(isManager); + } + catch(DatabaseException dbe) + { + throw dbe; + } + } + + //--------------------------------------------------------------- + // MenuItem + //--------------------------------------------------------------- + //edit menu item data + // rMenuItem reference the MenuItem + // which 1:name 2:price 3:type + public final static int EDIT_ITEM_NAME = 1; + public final static int EDIT_ITEM_PRICE = 2; + public final static int EDIT_ITEM_TYPE = 3; + + public void editMenuItemData(int id, String newName, double newPrice, byte menuType) throws DatabaseException + { + MenuItem rMenuItem = findMenuItemByID(id); + rMenuItem.setName(newName); + rMenuItem.setPrice(newPrice); + rMenuItem.setType(menuType); + + /*try + { + updateMenuFile(); + } + catch(DatabaseException dbe) + { + throw dbe; + }*/ + } + + public void editMenuItemData(MenuItem rMenuItem, int which, String newData) throws DatabaseException + { + try + { + switch(which) + { + case EDIT_ITEM_NAME: + rMenuItem.setName(newData); + break; + case EDIT_ITEM_PRICE: + double newPrice = Double.parseDouble(newData); + if(newPrice < 0) + throw new DatabaseException("Price must be positive number"); + else + rMenuItem.setPrice(newPrice); + break; + case EDIT_ITEM_TYPE: + byte newType = Byte.parseByte(newData); + if(newType < MenuItem.MAIN || MenuItem.DESSERT < newType) + throw new DatabaseException("Type must be between " + MenuItem.MAIN + + " and " + MenuItem.DESSERT + ")"); + else + rMenuItem.setType(Byte.parseByte(newData)); + break; + default: + break; + } + } + catch(DatabaseException e) + { + throw e; + } + catch(Exception e) + { + throw new DatabaseException(e.getMessage()); + } + } + + public void setMenuItemAsPromotionItem(MenuItem rMenuItem, double price) + { + rMenuItem.setState(MenuItem.PROMOTION_ITEM, price); + } + + public void resetMenuState(MenuItem rMenuItem) + { + rMenuItem.resetState(); + } + + public void deleteMenuItem(MenuItem rMenuItem) throws DatabaseException + { + menuList.remove(rMenuItem); + /*try + { + updateMenuFile(); + } + catch(DatabaseException dbe) + { + throw dbe; + }*/ + } + + public void addMenuItem(int newID, String newName, double newPrice, byte newType) throws DatabaseException + { + MenuItem newMenuItem = new MenuItem(newID, newName,newPrice, newType); + menuList.add(newMenuItem); + Collections.sort(menuList, new MenuItemComparator()); + /*try + { + updateMenuFile(); + } + catch(DatabaseException dbe) + { + throw dbe; + }*/ + } + //--------------------------------------------------------------- + // Order + //--------------------------------------------------------------- + public int addOrder(int staffID, String staffName) + { + int newOrderID = ++todaysOrderCounts; + Order newOrder = new Order(staffID, staffName); + newOrder.setOrderID( newOrderID); + orderList.add(newOrder); + return newOrderID; + } + + public void addOrderItem(int orderID, MenuItem rItem, byte quantity) + { + Order rOrder = findOrderByID(orderID); + rOrder.addItem(rItem, quantity); + } + + public boolean deleteOrderItem(int orderID, int index) + { + Order rOrder = findOrderByID(orderID); + if(rOrder == null) + return false; + return rOrder.deleteItem(index); + } + + + //Cancel order: order data is not deleted from the database(Just put cancel flag on) + public boolean cancelOrder(int orderID) + { + Order rOrder = findOrderByID(orderID); + if(rOrder == null) + return false; + rOrder.setState(Order.ORDER_CANCELED); + return true; + } + //Delete order: order data is deleted from the database + public boolean deleteOrder(int orderID) + { + Order rOrder = findOrderByID(orderID); + if(rOrder == null) + return false; + orderList.remove(rOrder); + todaysOrderCounts--; + return true; + } + + public boolean closeOrder(int orderID) + { + Order rOrder = findOrderByID(orderID); + if(rOrder == null) + return false; + rOrder.setState(Order.ORDER_CLOSED); + return true; + } + + public void closeAllOrder() + { + Iterator<Order> it = orderList.iterator(); + Order re = null; + + while (it.hasNext()) { + re = it.next(); + if( re.getState() == 0)//neither closed and canceled + { + re.setState(Order.ORDER_CLOSED); + } + } + } + + public int getOrderState(int orderID) + { + Order re = findOrderByID(orderID); + if(re == null) + return -1; + return re.getState(); + } + + public double getOrderTotalCharge(int orderID) + { + Order re = findOrderByID(orderID); + if(re == null) + return -1; + return re.getTotal(); + } + + public boolean checkIfAllOrderClosed() + { + Iterator<Order> it = orderList.iterator(); + Order re = null; + + while (it.hasNext()) { + re = it.next(); + if( re.getState() == 0)//neither closed and canceled + { + return false; + } + } + return true; + } + + public boolean checkIfAllStaffCheckout() + { + Iterator<Staff> it = staffList.iterator(); + Staff re = null; + + while (it.hasNext()) { + re = it.next(); + if( re.getWorkState() == Staff.WORKSTATE_ACTIVE) + { + return false; + } + } + return true; + } + + public void forthClockOutAllStaff() + { + Iterator<Staff> it = staffList.iterator(); + Staff re = null; + + while (it.hasNext()) { + re = it.next(); + if( re.getWorkState() == Staff.WORKSTATE_ACTIVE) + { + re.clockOut(); + } + } + } + /**************************************************************************** + * File load + ***************************************************************************/ + public void loadFiles() throws DatabaseException + { + loadStaffFile(); + loadManagerFile(); + Collections.sort(staffList, new StaffComparator()); + loadMenuFile(); + loadWageInfoFile(); + } + + private void loadStaffFile() throws DatabaseException + { + try { + BufferedReader reader = new BufferedReader(new FileReader(STAFF_FILE)); + String line = reader.readLine(); + + while (line != null) { + String[] record = line.split(","); + + String id = record[0].trim(); + String passward = record[1].trim(); + String firstName = record[2].trim(); + String lastName = record[3].trim(); + + // Add the data from file to the registerCourses array list + Employee rEmployee = new Employee(Integer.parseInt(id),lastName, firstName, passward); + staffList.add(rEmployee); + line = reader.readLine(); + } + reader.close(); + } catch (IOException ioe) { + String message = ioe.getMessage() + ioe.getStackTrace(); + throw new DatabaseException(message); + } + } + + private void loadManagerFile() throws DatabaseException + { + try { + BufferedReader reader = new BufferedReader(new FileReader(MANAGER_FILE)); + String line = reader.readLine(); + + while (line != null) { + String[] record = line.split(","); + + String id = record[0].trim(); + String passward = record[1].trim(); + String firstName = record[2].trim(); + String lastName = record[3].trim(); + + // Add the data from file to the registerCourses array list + Manager rManager = new Manager(Integer.parseInt(id),lastName,firstName, passward); + staffList.add(rManager); + line = reader.readLine(); + } + reader.close(); + } catch (IOException ioe) { + String message = ioe.getMessage() + ioe.getStackTrace(); + throw new DatabaseException(message); + } + } + + private void loadMenuFile() throws DatabaseException + { + try { + BufferedReader reader = new BufferedReader(new FileReader(MENU_FILE)); + String line = reader.readLine(); + + while (line != null) { + String[] record = line.split(","); + + String id = record[0].trim(); + String name = record[1].trim(); + String price = record[2].trim(); + String type = record[3].trim(); + + // Add the data from file to the registerCourses array list + MenuItem rMenuItem = new MenuItem(Integer.parseInt(id), name, Double.parseDouble(price), Byte.parseByte(type)); + menuList.add(rMenuItem); + line = reader.readLine(); + } + reader.close(); + } catch (IOException ioe) { + String message = ioe.getMessage() + ioe.getStackTrace(); + throw new DatabaseException(message); + } + } + + private void loadWageInfoFile() throws DatabaseException + { + try { + BufferedReader reader = new BufferedReader(new FileReader(WAGE_INFO_FILE)); + String line = reader.readLine(); + + while (line != null) { + String[] record = line.split(","); + + String id = record[0].trim(); + String rate = record[1].trim(); + + double dRate = Double.parseDouble(rate); + int iId = Integer.parseInt(id); + + Staff rStaff = findStaffByID(iId); + if(rStaff == null) + { + throw new DatabaseException("Load wage file error\n Staff ID:" + iId + " is not found."); + } + rStaff.setWageRate(dRate); + + line = reader.readLine(); + } + reader.close(); + } catch (IOException ioe) { + String message = ioe.getMessage() + ioe.getStackTrace(); + throw new DatabaseException(message); + } + catch(Exception e) + { + String message = e.getMessage() + e.getStackTrace(); + throw new DatabaseException(message); + } + } + + /**************************************************************************** + * File Edit + ***************************************************************************/ + public void updateStaffFile(boolean isManager) throws DatabaseException + { + Writer writer; + String id; + String line; + String fileName; + String tempFileName = "dataFiles/temp.txt"; + + if(isManager) + fileName =MANAGER_FILE; + else + fileName = STAFF_FILE; + + Collections.sort(staffList, new StaffComparator()); + File tempFile = new File(tempFileName); + + try{ + writer = new BufferedWriter(new FileWriter(tempFile)); + Iterator it = staffList.iterator(); + + while (it.hasNext()) + { + Staff re = (Staff)it.next(); + + //-------- skip writing data ---------- + if(isManager) + { + //skip employee data + if(re instanceof Employee) + //if(re.getClass().getName().equalsIgnoreCase("Employee")) + continue; + } + else + { + //skip managere data + //if(re.getClass().getName().equalsIgnoreCase("Manager")) + if(re instanceof Manager) + continue; + } + + writer.write(re.getID() + "," + re.getPassword() + "," + re.getFirstName() + "," + re.getLastName()+ "\r\n"); + } + writer.flush(); + writer.close(); + } + catch(IOException e) + { + String message = e.getMessage() + e.getStackTrace(); + throw new DatabaseException(message); + } + + //delete current file + File deleteFile = new File(fileName); + deleteFile.delete(); + + // renames temporaly file to new file + File newFile = new File(fileName); + tempFile.renameTo(newFile); + + updateWageFile(); + } + + public void updateWageFile() throws DatabaseException + { + Writer writer; + String id; + String line; + String fileName; + String tempFileName = "dataFiles/temp.txt"; + + File tempFile = new File(tempFileName); + + try{ + writer = new BufferedWriter(new FileWriter(tempFile)); + Iterator it = staffList.iterator(); + + while (it.hasNext()) + { + Staff re = (Staff)it.next(); + writer.write(re.getID() + "," + re.getWageRate() + "\r\n"); + } + writer.flush(); + writer.close(); + } + catch(IOException e) + { + String message = e.getMessage() + e.getStackTrace(); + throw new DatabaseException(message); + } + + //delete current file + File deleteFile = new File(WAGE_INFO_FILE); + deleteFile.delete(); + + // renames temporaly file to new file + File newFile = new File(WAGE_INFO_FILE); + tempFile.renameTo(newFile); + } + + public void updateMenuFile() throws DatabaseException + { + Writer writer; + String id; + String line; + String tempFileName = "dataFiles/temp.txt"; + + //Collections.sort(menuList, new MenuItemComparator()); + File tempFile = new File(tempFileName); + + try{ + writer = new BufferedWriter(new FileWriter(tempFile)); + Iterator it = menuList.iterator(); + + while (it.hasNext()) + { + MenuItem re = (MenuItem)it.next(); + + writer.write(re.getID() + "," + re.getName() + "," + re.getPrice() + "," + re.getType()+ "\r\n"); + } + writer.flush(); + writer.close(); + } + catch(IOException e) + { + String message = e.getMessage() + e.getStackTrace(); + throw new DatabaseException(message); + } + + //delete current file + File deleteFile = new File(MENU_FILE); + deleteFile.delete(); + + // renames temporaly file to new file + File newFile = new File(MENU_FILE); + tempFile.renameTo(newFile); + } + + public String generateOrderReport( String todaysDate) throws DatabaseException + { + Writer writer = null; + String line; + int state; + double totalAllOrder = 0; + String generateFileName; + File newFile; + int orderCnt = 0; + int cancelCnt = 0; + double cancelTotal = 0; + + String[] record = todaysDate.split("/"); + String today = record[0].trim() + "_" + record[1].trim() + "_" + record[2].trim(); + generateFileName = REPORT_FILE + today + ".txt"; + newFile = new File(generateFileName); + + try{ + writer = new BufferedWriter(new FileWriter(newFile)); + + line = "*********** Order List (" + today + ") ***********\r\n"; + writer.write(line); + + Iterator<Order> it = orderList.iterator(); + while (it.hasNext()) + { + Order re = it.next(); + state = re.getState(); + String stateString = ""; + double totalOfEachOrder = re.getTotal(); + switch(state) + { + case Order.ORDER_CLOSED: + stateString = ""; + totalAllOrder += totalOfEachOrder; + orderCnt++; + break; + case Order.ORDER_CANCELED: + stateString = "Canceled"; + cancelTotal += totalOfEachOrder; + cancelCnt++; + break; + default: + stateString = ""; + totalAllOrder += totalOfEachOrder; + orderCnt++; + break; + } + String output = String.format("Order ID:%4d StaffName:%-30s Total:$%-5.2f %s\r\n", + re.getOrderID(),re.getStaffName(),totalOfEachOrder, stateString); + writer.write(output); + + + } + writer.write("-------------------------------------------------------\r\n"); + + writer.write("Total sales:$" + totalAllOrder + "(" + orderCnt + ")" + + " Canceled:$" + cancelTotal + "(" + cancelCnt + ")\r\n"); + writer.flush(); + writer.close(); + } + catch(IOException e) + { + String message = e.getMessage() + e.getStackTrace(); + newFile.delete(); + throw new DatabaseException(message); + } + return generateFileName; + //System.out.println("File <" + generateFileName + "> has been generated."); + } + + public String generatePaymentReport( String todaysDate) throws DatabaseException + { + Writer writer = null; + String line; + double totalPayment = 0; + String generateFileName; + File newFile; + int staffNum = 0; + + String[] record = todaysDate.split("/"); + String today = record[0].trim() + "_" + record[1].trim() + "_" + record[2].trim(); + generateFileName = PAYMENT_FILE + today + ".txt"; + newFile = new File(generateFileName); + + try{ + writer = new BufferedWriter(new FileWriter(newFile)); + + line = "*********** Payment List (" + today + ") ***********\r\n"; + writer.write(line); + + Iterator<Staff> it = staffList.iterator(); + while (it.hasNext()) + { + Staff re = it.next(); + + if(re.getWorkState() == Staff.WORKSTATE_FINISH) + { + double pay = re.culculateWages(); + String output = String.format("Order ID:%4d StaffName:%-30s Work time:%-5.2f Pay:%-5.2f\r\n", + re.getID(),re.getFullName(),re.culculateWorkTime(), pay); + writer.write(output); + staffNum++; + totalPayment += pay; + } + } + writer.write("-------------------------------------------------------\r\n"); + + writer.write("Total payment:$" + totalPayment + "(" + staffNum + ")\r\n"); + writer.flush(); + writer.close(); + } + catch(IOException e) + { + String message = e.getMessage() + e.getStackTrace(); + newFile.delete(); + throw new DatabaseException(message); + } + return generateFileName; + } + + /**************************************************************************** + * Comparator + ***************************************************************************/ + private class StaffComparator implements Comparator<Staff> { + + @Override + public int compare(Staff s1, Staff s2) { + return s1.getID() < s2.getID() ? -1 : 1; + } + } + + private class MenuItemComparator implements Comparator<MenuItem> { + + @Override + public int compare(MenuItem m1, MenuItem m2) { + return m1.getID() < m2.getID() ? -1 : 1; + } + } +} diff --git a/Restaurant-management-system/DatabaseException.java b/Restaurant-management-system/DatabaseException.java new file mode 100644 index 00000000..13dd1e1d --- /dev/null +++ b/Restaurant-management-system/DatabaseException.java @@ -0,0 +1,12 @@ +public class DatabaseException extends Exception { + public String errMsg; + public DatabaseException(String msg) + { + errMsg = msg; + } + + public String getErrMessage() + { + return errMsg; + } +} diff --git a/Restaurant-management-system/Employee.java b/Restaurant-management-system/Employee.java new file mode 100644 index 00000000..723c7f14 --- /dev/null +++ b/Restaurant-management-system/Employee.java @@ -0,0 +1,31 @@ +/** + * Kazunori Hayashi +* Version 1.0 29/7/2013 + */ +public class Employee extends Staff +{ + private static final double MINIMUM_RATE = 13.5; + + public Employee() + { + super(); + } + public Employee( int newID, String newLastName, String newFirstName, String newPassward) + { + super(newID, newLastName, newFirstName, newPassward); + wageRate = MINIMUM_RATE; + } + + public void setWageRate(double newRate) + { + if( newRate < MINIMUM_RATE) + wageRate = MINIMUM_RATE; + else + wageRate = newRate; + } + + public double culculateWages() + { + return wageRate * culculateWorkTime(); + } +} diff --git a/Restaurant-management-system/META-INF/MANIFEST.MF b/Restaurant-management-system/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5caa54a2 --- /dev/null +++ b/Restaurant-management-system/META-INF/MANIFEST.MF @@ -0,0 +1,4 @@ +Manifest-Version: 1.0 +Created-By: 1.7.0_45 (Oracle Corporation) +Main-Class: RMS_GUI + diff --git a/Restaurant-management-system/Manager.java b/Restaurant-management-system/Manager.java new file mode 100644 index 00000000..a4dc6cd4 --- /dev/null +++ b/Restaurant-management-system/Manager.java @@ -0,0 +1,34 @@ +/** + * Kazunori Hayashi +* Version 1.0 29/7/2013 + */ +public class Manager extends Staff +{ + private static final double MINIMUM_RATE = 100.0; + + public Manager() + { + super(); + } + public Manager( int newID, String newLastName, String newFirstName, String newPassward) + { + super(newID, newLastName, newFirstName, newPassward); + wageRate = MINIMUM_RATE; + } + + public void setWageRate(double newRate) + { + if(wageRate < MINIMUM_RATE) + newRate = MINIMUM_RATE; + wageRate = newRate; + } + + + public double culculateWages() + { + if(getWorkState() != WORKSTATE_FINISH) + return 0; + + return this.wageRate; + } +} diff --git a/Restaurant-management-system/MenuItem.java b/Restaurant-management-system/MenuItem.java new file mode 100644 index 00000000..b59c61df --- /dev/null +++ b/Restaurant-management-system/MenuItem.java @@ -0,0 +1,98 @@ +/** + * Kazunori Hayashi +* Version 1.0 29/7/2013 + */ + +public class MenuItem +{ + //definition of menu item type + public final static int MAIN = 1; + public final static int DRINK = 2; + public final static int ALCOHOL = 3; + public final static int DESSERT = 4; + + private int ID; + private String name; + private byte type; + private double price; + + private byte state; + private double promotion_price; + public final static byte PROMOTION_ITEM = 1; + public final static byte SEASONAL_ITEM = 2; + + public MenuItem(int newID, String newName, double newPrice, byte newType) + { + this.ID = newID; + this.name = newName; + this.price = newPrice; + this.type = newType; + this.state = 0; + this.promotion_price = 0; + } + + //setter + public void setName( String newName) + { + this.name = newName; + } + + public void setPrice( double newPrice) + { + this.price = newPrice; + } + + public void setType( byte newType) + { + this.type = newType; + } + + public void setState( byte newState, double tempPrice) + { + this.state = newState; + this.promotion_price = tempPrice; + } + + public void resetState() + { + this.state = 0; + this.promotion_price = 0; + } + + + //getter + int getID() + { + return this.ID; + } + + String getName() + { + return this.name; + } + + double getPrice() + { + if(this.state != 0 && this.promotion_price != 0) + { + return this.promotion_price; + } + else + return this.price; + } + + double gerRegularPrice() + { + return this.price; + } + + byte getType() + { + return this.type; + } + + byte getState() + { + return this.state; + } +} diff --git a/Restaurant-management-system/Order.java b/Restaurant-management-system/Order.java new file mode 100644 index 00000000..abe19086 --- /dev/null +++ b/Restaurant-management-system/Order.java @@ -0,0 +1,125 @@ +/** + * Kazunori Hayashi +* Version 1.0 29/7/2013 + */ + +import java.util.*; + +public class Order +{ + final public static int ORDER_CLOSED = 1; + final public static int ORDER_CANCELED = 2; + + private int orderID; + private int staffID; + private String staffName; + private String date; + private int state; //0:arrive 1:closed 2:canceled + private double total; + private ArrayList<OrderDetail> orderDetailList = new ArrayList<OrderDetail>(); + + /** + * Constructor for objects of class Order + */ + public Order(int newStaffID, String newStaffName) + { + this.orderID =-1; + this.state = 0; + this.staffID = newStaffID; + this.staffName = newStaffName; + this.total = 0; + } + /** + *Getter + */ + int getOrderID() + { + return this.orderID; + } + int getStaffID() + { + return this.staffID; + } + String getStaffName() + { + return this.staffName; + } + int getState() + { + return this.state; + } + double getTotal() + { + return this.total; + } + ArrayList<OrderDetail> getOrderDetail() + { + return this.orderDetailList; + } + + /** + * Setter + */ + public void setOrderID(int newID) + { + this.orderID = newID; + } + + public void setState(int state) + { + this.state = state; + } + + public void addItem(MenuItem rNewMenuItem, byte quantity) + { + Iterator<OrderDetail> it = orderDetailList.iterator(); + OrderDetail re; + + boolean found = false; + + while( it.hasNext() && !found) + { + re = it.next(); + if( rNewMenuItem.getID() == re.getItemID()) + { + found = true; + re.addQuantity(quantity); + } + } + + if(!found) + { + OrderDetail detail = new OrderDetail(rNewMenuItem, quantity); + orderDetailList.add(detail); + + } + + calculateTotal(); + } + + public boolean deleteItem(int index) + { + try + { + orderDetailList.remove(index); + calculateTotal(); + return true; + } + catch(Exception e) + { + //System.out.println(e.toString() + ":" + e.getMessage()); + return false; + } + } + + public void calculateTotal() + { + total = 0; + OrderDetail re; + Iterator<OrderDetail> it = orderDetailList.iterator(); + while (it.hasNext()) { + re = it.next(); + total += re.getTotalPrice(); + } + } +} diff --git a/Restaurant-management-system/OrderDetail.java b/Restaurant-management-system/OrderDetail.java new file mode 100644 index 00000000..dbf19e5b --- /dev/null +++ b/Restaurant-management-system/OrderDetail.java @@ -0,0 +1,56 @@ +/** + * Kazunori Hayashi +* Version 1.0 29/7/2013 + */ + +public class OrderDetail +{ + private int itemID; + private String itemName; + private double price; + private byte quantity; + private double totalPrice; + + /** + * Constructor for objects of class OrderDetail + */ + public OrderDetail(MenuItem newMenuItem, byte newQuantity) + { + this.itemID = newMenuItem.getID(); + this.itemName = newMenuItem.getName(); + this.price = newMenuItem.getPrice(); + this.quantity = newQuantity; + this.totalPrice = this.price * this.quantity; + } + + /************************************************** + * Getter + *************************************************/ + public int getItemID() + { + return this.itemID; + } + public String getItemName() + { + return this.itemName; + } + public double getPrice() + { + return this.price; + } + public byte getQuantity() + { + return this.quantity; + } + public double getTotalPrice() + { + return this.totalPrice; + } + + public void addQuantity(byte add) + { + quantity += add; + totalPrice = price * quantity; + } + +} diff --git a/Restaurant-management-system/RMS.java b/Restaurant-management-system/RMS.java new file mode 100644 index 00000000..8e02a94f --- /dev/null +++ b/Restaurant-management-system/RMS.java @@ -0,0 +1,12 @@ +/** + * Kazunori Hayashi +* Version 1.0 13/7/ +* 2013 + */ +public class RMS +{ + public static void main(String[] args) { + Controller cController = new Controller(); + cController.mainLoop(); + } +} diff --git a/Restaurant-management-system/RMS_GUI.jar b/Restaurant-management-system/RMS_GUI.jar new file mode 100644 index 00000000..76396a1f Binary files /dev/null and b/Restaurant-management-system/RMS_GUI.jar differ diff --git a/Restaurant-management-system/RMS_GUI.java b/Restaurant-management-system/RMS_GUI.java new file mode 100644 index 00000000..590ec420 --- /dev/null +++ b/Restaurant-management-system/RMS_GUI.java @@ -0,0 +1,12 @@ +/** + * Kazunori Hayashi +* Version 1.0 02/08/2013 + */ +public class RMS_GUI +{ + public static void main(String[] args) { + Controller_GUI cController = new Controller_GUI(); + //cController.mainLoop(); + } +} + diff --git a/Restaurant-management-system/Staff.java b/Restaurant-management-system/Staff.java new file mode 100644 index 00000000..343141c5 --- /dev/null +++ b/Restaurant-management-system/Staff.java @@ -0,0 +1,203 @@ +/** + * Kazunori Hayashi +* Version 1.0 29/7/2013 + */ +import java.util.*; +import java.text.*; + +public abstract class Staff +{ + private int ID; + private String lastName; + private String firstName; + private String password; + private byte state; + + private Order[] orderList; + + //protected byte workState; //0:not active 1:active (on wark) 2:finish work + protected Date startWorkTime; + protected Date finishWorkTime; + protected double wageRate; + + //------------------------------------------------------------ + // constructor + //------------------------------------------------------------ + public Staff() + { + ID = 0; + lastName=""; + firstName=""; + startWorkTime = null; + finishWorkTime = null; + state = 0; + } + + public Staff( int newID, String newLastName, String newFirstName, String newPassword) + { + setID( newID); + setLastName(newLastName); + setFirstName(newFirstName); + setPassword( newPassword); + startWorkTime = null; + finishWorkTime = null; + state = 0; + //workState = 0; + } + + //------------------------------------------------------------ + // setter + //------------------------------------------------------------ + protected void setID( int newID) + { + this.ID = newID; + } + protected void setLastName(String newLastName) + { + this.lastName = newLastName; + } + protected void setFirstName(String newFirstName) + { + this.firstName = newFirstName; + } + protected void setPassword(String newPassword) + { + this.password = newPassword; + } + protected void setWorkState(byte newState) + { + this.state = newState; + } + + /*protected void setState(byte newState) + { + this.workState = newState; + }*/ + //------------------------------------------------------------ + // getter + //------------------------------------------------------------ + public int getID() + { + return this.ID; + } + public String getLastName() + { + return this.lastName; + } + public String getFirstName() + { + return this.firstName; + } + public String getFullName() + { + String fullName = this.firstName + " " + this.lastName; + return fullName; + } + public String getPassword() + { + return this.password; + } + public double getWageRate() + { + return this.wageRate; + } + + public static final byte WORKSTATE_NON_ACTIVE = 0; + public static final byte WORKSTATE_ACTIVE = 1; + public static final byte WORKSTATE_FINISH = 2; + public byte getWorkState() + { + return this.state; + } + + public String getStartTime() + { + if(startWorkTime == null) + return "getStartTime Error"; + DateFormat df = new SimpleDateFormat("HH:mm"); + return df.format(startWorkTime); + } + + public String getFinishTime() + { + if(finishWorkTime == null) + return "getFinishTime Error"; + DateFormat df = new SimpleDateFormat("HH:mm"); + return df.format(finishWorkTime); + } + //------------------------------------------------------------ + // other methods + //------------------------------------------------------------ + public void clockIn() + { + startWorkTime = new Date(System.currentTimeMillis()); + state = WORKSTATE_ACTIVE; + } + + public boolean clockOut() + { + if(state != WORKSTATE_ACTIVE) + return false; + finishWorkTime = new Date(System.currentTimeMillis()); + state = WORKSTATE_FINISH; + return true; + } + + public boolean changeStartTime(Date newStartTime) + { + if(state == WORKSTATE_FINISH && newStartTime.after(finishWorkTime)) + { + return false; + } + + if( newStartTime.after(new Date(System.currentTimeMillis()))) + { + return false; + } + + startWorkTime = newStartTime; + return true; + } + + public boolean changeFinishTime(Date newFinishTime) + { + if(newFinishTime.before(startWorkTime)) + { + return false; + } + + if( newFinishTime.after(new Date(System.currentTimeMillis()))) + { + return false; + } + + finishWorkTime = newFinishTime; + return true; + } + + public double culculateWorkTime() + { + if(getWorkState() != WORKSTATE_FINISH) + return 0; + + long diffTimeMin = (finishWorkTime.getTime() - startWorkTime.getTime()) / 60000;//convert Milli sec to Minutes + long baseTime = diffTimeMin / 60; + long fraction = diffTimeMin % 60; + double addTime; + + if( fraction < 15) + addTime = 0; + else if(fraction < 30) + addTime = 0.25; + else if(fraction < 45) + addTime = 0.5; + else + addTime = 0.75; + + double workTime = (double)baseTime + addTime; + return workTime; + } + + protected abstract void setWageRate(double newRate); + protected abstract double culculateWages(); +} diff --git a/Restaurant-management-system/UserInterface.java b/Restaurant-management-system/UserInterface.java new file mode 100644 index 00000000..4be3dfdd --- /dev/null +++ b/Restaurant-management-system/UserInterface.java @@ -0,0 +1,531 @@ +/** + * Kazunori Hayashi +* Version 1.0 29/7/ +* 2013 + */ + +import java.util.*; +import java.io.*; + +public class UserInterface { + private Scanner inputScanner; + private String loginUserName; + private Database crDatabase; //reference of database + private String todaysDate; + + /**************************************************************************** + * Constructor + ***************************************************************************/ + public UserInterface(Database rDatabase) { + this.inputScanner = new Scanner(System.in); + this.loginUserName = ""; + this.crDatabase = rDatabase; + } + + /**************************************************************************** + * Setter + ***************************************************************************/ + private void setLoginUserName(String newName) + { + this.loginUserName = newName; + } + + public void setTodaysDate(String today) + { + this.todaysDate = today; + } + + /**************************************************************************** + * Private methods + ***************************************************************************/ + private void displayTitle(String title) + { + String output = String.format("// %-65s//", title); + displayMessage("//////////////////////////////////////////////////////////////////////"); + displayMessage(output); + displayMessage("//////////////////////////////////////////////////////////////////////"); + } + + + /**************************************************************************** + * Public methods + ***************************************************************************/ + public void clearScreen() { + System.out.println('\u000c'); + } + + //Normally used by controller + public void displayMessage(String message) + { + System.out.println(message); + } + + public void displayErrorMessage(String message) + { + System.out.println("** Error:" + message + "**"); + } + + public String userInput() + { + String result = inputScanner.next(); + inputScanner.nextLine();//clear buffer + return result; + } + + public void setUserName( String userName) + { + //setLoginUserName(firstName + " " + lastName); + setLoginUserName(userName); + } + + public void finish() + { + clearScreen(); + } + + /**************************************************************************** + * Display methods + ***************************************************************************/ + //////////////////////////////////////////////////////////////////////////// + // Main menu + //////////////////////////////////////////////////////////////////////////// + public void showMainMenu(int userType) + { + clearScreen(); + displayTitle("Main menu"); + if(loginUserName != "") + displayMessage("Login user:" + loginUserName); + displayMessage("----------[Menu]----------"); + displayMessage("[1] Login"); + if( userType != Controller.USER_ANONYMOUS) + { + displayMessage("[2] Log out"); + displayMessage("[3] Show menu list"); + displayMessage("[4] Order management"); + + } + if( userType == Controller.USER_MANAGER) + { + displayMessage("-------[Management]------"); + displayMessage("[5] Show employee list"); + displayMessage("[6] Staff management"); + displayMessage("[7] Edit menu items"); + displayMessage("[8] Generate reports"); + } + displayMessage("--------------------------"); + if( userType != Controller.USER_ANONYMOUS) + displayMessage("[F] Clocked out"); + displayMessage("[Q] Quit"); + } + //////////////////////////////////////////////////////////////////////////// + // Login + //////////////////////////////////////////////////////////////////////////// + public void loginView() + { + clearScreen(); + displayTitle("Login"); + } + //////////////////////////////////////////////////////////////////////////// + // Order + //////////////////////////////////////////////////////////////////////////// + //--------------------------------------------------------------- + // Order management main menu + //--------------------------------------------------------------- + public void showOrderMenu() + { + clearScreen(); + displayTitle("Order"); + displayMessage("[1] Create order"); + displayMessage("[2] Update order"); + displayMessage("[3] Close order"); + displayMessage("[4] Cancel order"); + displayMessage("[5] Show order list"); + displayMessage("[Q] Back to main menu"); + displayMessage("-----------------------------------------"); + } + + public void addMenuItemView() + { + clearScreen(); + displayTitle("Add menu item"); + } + + public void editMenuItemView(MenuItem rMenuItem) + { + clearScreen(); + showMenuItemData(rMenuItem); + displayMessage("-----------------------------------------"); + displayMessage("[1]:Name"); + displayMessage("[2]:Price"); + displayMessage("[3]:Type"); + displayMessage("[4]:Set promotion price"); + displayMessage("[5]:Reset item state"); + displayMessage("[Q]:Quit"); + displayMessage("-----------------------------------------"); + } + //--------------------------------------------------------------- + // Edit order detail menu (Create order or Update order) + //--------------------------------------------------------------- + public void editOrderView() + { + clearScreen(); + displayTitle("Edit Order"); + displayMessage("[1] Add new item"); + displayMessage("[2] Delete item"); + displayMessage("[3] Show order detail"); + displayMessage("[Q] Quit"); + displayMessage("-----------------------------------------"); + } + + public void addOrderItemView() + { + clearScreen(); + displayTitle("Add Order Item"); + sub_showMenuList(); + } + + public void deleteOrderItemView() + { + clearScreen(); + displayTitle("Delete Order Item"); + } + + public void closeOrderView() + { + clearScreen(); + displayTitle("Close order"); + showOrderList(); + } + + public void cancelOrderView() + { + clearScreen(); + displayTitle("Cancel order"); + showOrderList(); + } + + public void generateReportView() + { + clearScreen(); + displayTitle("Generate reports"); + displayMessage("[1] Sales repors"); + displayMessage("[2] Payment list"); + displayMessage("[Q] Quit"); + displayMessage("-----------------------------------------"); + } + + + + //////////////////////////////////////////////////////////////////////////// + // Staff + //////////////////////////////////////////////////////////////////////////// + //--------------------------------------------------------------- + // Staff management main menu + //--------------------------------------------------------------- + public void addNewStaffView() + { + clearScreen(); + displayTitle("Add new staff"); + } + + public void staffManagementView() + { + clearScreen(); + displayTitle("Edit Staff"); + displayMessage("[1] Add new staff"); + displayMessage("[2] Update staff info"); + displayMessage("[3] Delete staff info"); + displayMessage("[Q] Back to main menu"); + displayMessage("-----------------------------------------"); + } + + public void updateStaffView( Staff rStaff) + { + clearScreen(); + showStaffData(rStaff); + displayMessage("\nChoose Edit number\n"); + displayMessage("[1]:Last name"); + displayMessage("[2]:First name"); + displayMessage("[3]:Forth clock out"); + displayMessage("[4]:Change start time"); + displayMessage("[5]:Change finish time"); + displayMessage("[Q]:Quit"); + } + + //////////////////////////////////////////////////////////////////////////// + // Menu + //////////////////////////////////////////////////////////////////////////// + public void choseEditMenuView() + { + clearScreen(); + displayTitle("Edit Menu"); + displayMessage("[1] Add new item"); + displayMessage("[2] Update item"); + displayMessage("[3] Delete item"); + displayMessage("[Q] Quit"); + displayMessage("-----------------------------------------"); + } + /**************************************************************************** + * Show data lists in the database + ***************************************************************************/ + //--------------------------------------------------------------- + // Order information + //--------------------------------------------------------------- + public void showOrderList() + { + Iterator<Order> it = crDatabase.getOrderList().iterator(); + String state; + String output; + double totalAllOrder = 0; + int orderCnt = 0; + int cancelCnt = 0; + double cancelTotal = 0; + + clearScreen(); + displayTitle("Order List (" + todaysDate + ")"); + while (it.hasNext()) { + Order re = it.next(); + double totalOfEachOrder = re.getTotal(); + switch(re.getState()) + { + case Order.ORDER_CLOSED: + state = "Closed"; + totalAllOrder += totalOfEachOrder; + orderCnt++; + break; + case Order.ORDER_CANCELED: + state = "Canceled"; + cancelTotal += totalOfEachOrder; + cancelCnt++; + break; + default: + state = "-"; + totalAllOrder += totalOfEachOrder; + orderCnt++; + break; + } + + output = String.format("Order ID:%4d StaffName:%-20s Total:$%5.2f State:%-8s", + re.getOrderID(),re.getStaffName(),totalOfEachOrder,state); + displayMessage(output); + } + displayMessage("-------------------------------------------------------"); + displayMessage("Total sales:$" + totalAllOrder + "(" + orderCnt + ")" + + " Canceled:$" + cancelTotal + "(" + cancelCnt + ")\r\n"); + } + + public void showOrderDetail( int orderID) + { + Order rOrder = crDatabase.findOrderByID(orderID); + double totalCharge = 0; + + displayTitle("Order Details"); + displayMessage("OrderID:" + orderID); + displayMessage("Order Date:" + todaysDate); + displayMessage("Employee Name:" + rOrder.getStaffName()); + displayMessage(""); + + String output; + output = String.format("%-4s %-9s %-24s %-9s %s","No.", "Menu ID", "Menu Name", "Quantity", "Charge"); + displayMessage(output); + + Iterator<OrderDetail> it = rOrder.getOrderDetail().iterator(); + OrderDetail re; + int count = 1; + + + while (it.hasNext()) { + re = it.next(); + double totalPliceOfItem = re.getTotalPrice(); + output = String.format("%-4d|%-9s|%-24s|%9d|%5.2f", + count, re.getItemID(), re.getItemName(), re.getQuantity(), totalPliceOfItem); + displayMessage(output); + totalCharge += totalPliceOfItem; + count++; + } + if(count == 0) + displayMessage("No item"); + else + { + output = String.format("%-6.2f", totalCharge); + displayMessage("--------------------------------------------------------"); + displayMessage(" Total charge:" + output); + } + } + //--------------------------------------------------------------- + // Staff information + //--------------------------------------------------------------- + public void showStaffData( Staff rStaff) + { + displayMessage("*************** Employee Data ***************"); + displayMessage("Staff last name:" + rStaff.getLastName()); + displayMessage("Staff first name:" + rStaff.getFirstName()); + if(rStaff.getClass().getName().equalsIgnoreCase("Manager")) + { + displayMessage("** Manager **"); + displayMessage("Wage rate:" + rStaff.getWageRate() + " per day"); + } + else + { + displayMessage("** Part time staff **"); + displayMessage("Wage rate:" + rStaff.getWageRate() + " per hour"); + } + } + + public void showPaymentList() + { + double totalPayment = 0; + int staffNum = 0; + + clearScreen(); + displayTitle("Payment List (" + todaysDate + ")"); + + Iterator<Staff> it = crDatabase.getStaffList().iterator(); + while (it.hasNext()) + { + Staff re = it.next(); + + if(re.getWorkState() == Staff.WORKSTATE_FINISH) + { + double pay = re.culculateWages(); + String output = String.format("Order ID:%4d StaffName:%-20s Work time:%5.2f Pay:%5.2f", + re.getID(),re.getFullName(),re.culculateWorkTime(), pay); + displayMessage(output); + staffNum++; + totalPayment += pay; + } + else if(re.getWorkState() == Staff.WORKSTATE_ACTIVE) + { + String output = String.format("Order ID:%4d StaffName:%-20s * On work *", + re.getID(),re.getFullName()); + displayMessage(output); + staffNum++; + } + } + displayMessage("-------------------------------------------------------"); + String output = String.format("Total payment:$%.2f (%d)", totalPayment, staffNum); + displayMessage(output); + //displayMessage("Total payment:$" + totalPayment + "(" + staffNum + ")"); + } + + public void showStaffList() + { + clearScreen(); + Iterator<Staff> it = crDatabase.getStaffList().iterator(); + + displayTitle("Employee List"); + while (it.hasNext()) { + Staff re = (Staff)it.next(); + String fullName = re.getFirstName() + " " + re.getLastName(); + String output = String.format("Staff ID:%4d Name:%-20s", + re.getID(), fullName); + switch(re.getWorkState()) + { + case Staff.WORKSTATE_ACTIVE: + output += "[From:" + re.getStartTime() + "]"; + break; + case Staff.WORKSTATE_FINISH: + output += "[From:" + re.getStartTime() + " to " + re.getFinishTime() + "]"; + break; + default: + output += "[Not on work]"; + break; + } + + if(re.getClass().getName().equalsIgnoreCase("Manager")) + { + output += " * Manager *"; + } + displayMessage(output); + + /*displayMessage("Staff ID :" + re.getID()+ " Name:" + + re.getFirstName() + " " + re.getLastName());*/ + } + } + //--------------------------------------------------------------- + // Menu information + //--------------------------------------------------------------- + public void showMenuList() + { + clearScreen(); + displayTitle("Menu List"); + sub_showMenuList(); + } + + private void sub_showMenuList() + { + Iterator<MenuItem> it = crDatabase.getMenuList().iterator(); + + while (it.hasNext()) { + MenuItem re = (MenuItem)it.next(); + byte menuType = re.getType(); + String strMenuType; + switch( menuType) + { + case MenuItem.MAIN: + strMenuType = "Main"; + break; + case MenuItem.DRINK: + strMenuType = "Drink"; + break; + case MenuItem.ALCOHOL: + strMenuType = "Alcohol"; + break; + case MenuItem.DESSERT: + strMenuType = "Dessert"; + break; + default: + strMenuType = "Undefined"; + break; + } + String output = String.format("Menu ID:%4d Name:%-20s Price:%5.2f Type:%s", + re.getID(),re.getName(),re.getPrice(),strMenuType); + if(re.getState() == MenuItem.PROMOTION_ITEM) + { + output += " ** Today's Special!! **"; + } + displayMessage(output); + } + } + + //Display menu item detail + public void showMenuItemData( MenuItem rMenuItem) + { + displayTitle("Menu item Data"); + //displayMessage("******** Menu item Data *********"); + displayMessage("Name:" + rMenuItem.getName()); + + if(rMenuItem.getState() == MenuItem.PROMOTION_ITEM) + { + displayMessage("Promotion Price:" + rMenuItem.getPrice()); + } + else + { + displayMessage("Price:" + rMenuItem.getPrice()); + } + + byte menuType = rMenuItem.getType(); + switch( menuType) + { + case MenuItem.MAIN: + displayMessage("Type:Main"); + break; + case MenuItem.DRINK: + displayMessage("Type:Drink"); + break; + case MenuItem.ALCOHOL: + displayMessage("Type:Alcohol"); + break; + case MenuItem.DESSERT: + displayMessage("Type:Dessert"); + break; + default: + displayMessage("Type:Undefined"); + break; + } + if(rMenuItem.getState() == MenuItem.PROMOTION_ITEM) + displayMessage("State: Today's special!!"); + else + displayMessage("State: Regular item"); + } +} diff --git a/Restaurant-management-system/UserInterface_GUI.java b/Restaurant-management-system/UserInterface_GUI.java new file mode 100644 index 00000000..7c4a8c7b --- /dev/null +++ b/Restaurant-management-system/UserInterface_GUI.java @@ -0,0 +1,2301 @@ +import java.awt.*; +import java.awt.event.*; +import java.text.SimpleDateFormat; +import java.util.Date; +import javax.swing.*; +import javax.swing.border.*; +import javax.swing.event.*; + +import java.util.*; + +public class UserInterface_GUI extends JFrame implements ActionListener +{ + private Container con; + private Controller_GUI rcController; + private String currentUserName; + + // components for menu + private JMenuBar menuBar; + private JMenu mnFile; + private JMenuItem mntm1, mntm2; + + + //-------- Master panel -------------- + //Main content panel(CENTER) + private JPanel mainPanel; + + //Head panel (North) + private JPanel headPanel; + private JLabel headTitle; + private JButton headBtnLogin; + private JButton headBtnLogout; + + //Main button panel(WEST) + private JPanel mainBtnsPanel; + // Main buttons + + private JButton mainBtnShowMenu; + private JButton mainBtnManageOrder; + // Main buttons for management + private JButton mainBtnManageEmployee; + private JButton mainBtnManageMenuItem; + private JButton mainBtnShowTotalSales; + private JButton mainBtnShowPayment; + + //Information panel(SOUTH) + private JPanel infoPanel; + private JLabel labelLoginUserName; + private JButton btnClockOut; + private JTextArea taMessage; + + //-------- Contents panel -------------- + // components for home panel + private JPanel homePanel; + private JLabel homeImage; + + private LoginPanel cLoginPanel; + private MenuListPanel cMenuListPanel; + private OrderListPanel cOrderListPanel; + private OrderDetailPanel cOrderDetailPanel; + private EmployeeListPanel cEmployeeListPanel; + private EditEmployeePanel cEditEmployeePanel; + private MenuManagementPanel cMenuManagementPanel; + private EditMenuItemPanel cEditMenuItemPanel; + private TotalSalesPanel cTotalSalesPanel; + private PaymentPanel cPaymentPanel; + + + private final static int WINDOW_X = 100; + private final static int WINDOW_Y = 100; + private final static int WINDOW_WIDTH = 900; + private final static int WINDOW_HEIGHT = 600; + /** + * Constructor for objects of class UserInterface_GUI + */ + public UserInterface_GUI(Controller_GUI rController) + { + this.rcController = rController; + this.con = getContentPane(); + + // Set frame + setTitle("Valentino Restaurant Management System"); + setBounds(WINDOW_X, WINDOW_Y, WINDOW_WIDTH, WINDOW_HEIGHT); + setResizable(false); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + createMasterPanelConpornents(); + currentUserName = ""; + setLoginUserName(currentUserName); + + //------- Create main content panels + //Home panel + homePanel = new JPanel(); + homeImage = new JLabel(); + + //Random generator = new Random(); + int i = new Random().nextInt(4)+1; + homeImage.setHorizontalAlignment(SwingConstants.CENTER); + homeImage.setVerticalAlignment(SwingConstants.CENTER); + homeImage.setIcon(new ImageIcon("images/home" + i + ".jpg")); + homePanel.add(homeImage); + homePanel.setBackground(Color.WHITE); + mainPanel.add("Home", homePanel); + + cLoginPanel = new LoginPanel(); + mainPanel.add("Login", cLoginPanel); + cMenuListPanel = new MenuListPanel(); + mainPanel.add("MenuList", cMenuListPanel); + cOrderListPanel = new OrderListPanel(); + mainPanel.add("OrderList", cOrderListPanel); + cOrderDetailPanel = new OrderDetailPanel(); + mainPanel.add("OrderDetail", cOrderDetailPanel); + cEmployeeListPanel = new EmployeeListPanel(); + mainPanel.add("EmployeeList", cEmployeeListPanel); + cEditEmployeePanel = new EditEmployeePanel(); + mainPanel.add("EditEmployee", cEditEmployeePanel); + cMenuManagementPanel = new MenuManagementPanel(); + mainPanel.add("MenuManagement", cMenuManagementPanel); + cEditMenuItemPanel = new EditMenuItemPanel(); + mainPanel.add("EditMenuItem", cEditMenuItemPanel); + cTotalSalesPanel = new TotalSalesPanel(); + mainPanel.add("TotalSalesPanel", cTotalSalesPanel); + cPaymentPanel = new PaymentPanel(); + mainPanel.add("PaymentPanel", cPaymentPanel); + + changeMode(MODE_ANONYMOUS); + } + + private void createMasterPanelConpornents() + { + // Add menu to frame + menuBar = new JMenuBar(); + setJMenuBar(menuBar); + + mnFile = new JMenu("File"); + menuBar.add(mnFile); + + mntm1 = new JMenuItem("[1] Login"); + mnFile.add(mntm1); + mntm1.addActionListener(this); + + mntm2 = new JMenuItem("[2] Exit"); + mnFile.add(mntm2); + mntm2.addActionListener(this); + + //----------- Create main panels ------------ + con.setLayout(new BorderLayout()); + + //head panel + headPanel = new JPanel(); + headPanel.setBackground(Color.BLACK); + headPanel.setLayout(new FlowLayout()); + headTitle = new JLabel("Valentino Restaurant Management System"); + headTitle.setForeground(Color.WHITE); + headTitle.setPreferredSize(new Dimension(500, 30)); + headTitle.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 24)); + headBtnLogin = new JButton("Login"); + headBtnLogin.addActionListener(this); + headBtnLogout = new JButton("Logout"); + headBtnLogout.addActionListener(this); + headPanel.add(headTitle); + headPanel.add(headBtnLogin); + headPanel.add(headBtnLogout); + con.add(headPanel, BorderLayout.NORTH); + + //main content panel + mainPanel = new JPanel(); + mainPanel.setOpaque(true); + mainPanel.setLayout(new CardLayout()); + con.add(mainPanel, BorderLayout.CENTER); + + //main operate buttons panel + mainBtnsPanel = new JPanel(); + mainBtnsPanel.setLayout(new GridLayout(0,1)); + + mainBtnShowMenu = new JButton("Show menu"); + mainBtnShowMenu.addActionListener(this); + mainBtnsPanel.add(mainBtnShowMenu); + + mainBtnManageOrder = new JButton("Order management"); + mainBtnManageOrder.addActionListener(this); + mainBtnsPanel.add(mainBtnManageOrder); + + mainBtnManageEmployee = new JButton("Manage employees"); + mainBtnManageEmployee.addActionListener(this); + mainBtnsPanel.add(mainBtnManageEmployee); + + mainBtnManageMenuItem = new JButton("Manage menu items"); + mainBtnManageMenuItem.addActionListener(this); + mainBtnsPanel.add(mainBtnManageMenuItem); + + mainBtnShowTotalSales = new JButton("Show total sales"); + mainBtnShowTotalSales.addActionListener(this); + mainBtnsPanel.add(mainBtnShowTotalSales); + + mainBtnShowPayment = new JButton("Show payments"); + mainBtnShowPayment.addActionListener(this); + mainBtnsPanel.add(mainBtnShowPayment); + + con.add(mainBtnsPanel, BorderLayout.WEST); + + //Information panel + infoPanel = new JPanel(); + infoPanel.setLayout(new FlowLayout()); + labelLoginUserName = new JLabel(); + labelLoginUserName.setPreferredSize(new Dimension(150, 50)); + taMessage = new JTextArea(3,50); + taMessage.setEditable(false); + taMessage.setText("Wellcome!!"); + taMessage.setOpaque(true); + btnClockOut = new JButton("Clock out"); + btnClockOut.setEnabled(false); + btnClockOut.addActionListener(this); + LineBorder border = new LineBorder(Color.BLACK, 3, true); + taMessage.setBorder(border); + taMessage.setBackground(Color.WHITE); + infoPanel.add(labelLoginUserName); + infoPanel.add(btnClockOut); + infoPanel.add(taMessage); + con.add(infoPanel, BorderLayout.SOUTH); + } + + + public void setLoginUserName(String newName) + { + currentUserName = newName; + if(newName == "") + { + labelLoginUserName.setText("Please login first."); + } + else + { + labelLoginUserName.setText("<html>Login user<br>" + newName + "</html>"); + } + } + + public final static byte MODE_ANONYMOUS = 0; + public final static byte MODE_EMPLOYEE = 1; + public final static byte MODE_MANAGER = 2; + + public void changeMode(byte state) + { + switch(state) + { + case MODE_ANONYMOUS: + headBtnLogout.setEnabled(false); + mainBtnShowMenu.setEnabled(false); + mainBtnManageOrder.setEnabled(false); + mainBtnManageEmployee.setEnabled(false); + mainBtnManageMenuItem.setEnabled(false); + mainBtnShowTotalSales.setEnabled(false); + mainBtnShowPayment.setEnabled(false); + break; + case MODE_EMPLOYEE: + headBtnLogout.setEnabled(true); + mainBtnShowMenu.setEnabled(true); + mainBtnManageOrder.setEnabled(true); + mainBtnManageEmployee.setEnabled(false); + mainBtnManageMenuItem.setEnabled(false); + mainBtnShowTotalSales.setEnabled(false); + mainBtnShowPayment.setEnabled(false); + break; + case MODE_MANAGER: + headBtnLogout.setEnabled(true); + mainBtnShowMenu.setEnabled(true); + mainBtnManageOrder.setEnabled(true); + mainBtnManageEmployee.setEnabled(true); + mainBtnManageMenuItem.setEnabled(true); + mainBtnShowTotalSales.setEnabled(true); + mainBtnShowPayment.setEnabled(true); + break; + } + } + + public void setTodaysDate(String today) + { + //// + } + + void setClockOutButton() + { + if(rcController.checkIfUserClockedOut()) + btnClockOut.setEnabled(true); + else + btnClockOut.setEnabled(false); + } + //-------------------------------------------------------- + // Display message on an information panel + //-------------------------------------------------------- + public void displayMessage(String message) + { + taMessage.setForeground(Color.BLACK); + taMessage.setText(message); + } + + public void displayErrorMessage(String message) + { + taMessage.setForeground(Color.RED); + taMessage.setText(message); + } + + //======================================================== + // Show dialog message + //======================================================== + final static int DIALOG_YES = JOptionPane.YES_OPTION; + final static int DIALOG_NO = JOptionPane.NO_OPTION; + final static int DIALOG_CANCEL = JOptionPane.CANCEL_OPTION; + + public int showYesNoDialog(String title, String message) + { + int option = JOptionPane.showConfirmDialog(this, message, title, JOptionPane.YES_NO_OPTION, + JOptionPane.QUESTION_MESSAGE); + return option; + } + + public int showYesNoCancelDiaglog(String title, String message) + { + int option = JOptionPane.showConfirmDialog(this, message, title, JOptionPane.YES_NO_CANCEL_OPTION, + JOptionPane.QUESTION_MESSAGE); + return option; + } + + public void showErrorDialog(String title, String message) + { + JOptionPane.showMessageDialog(this, message, title, JOptionPane.ERROR_MESSAGE); + } + + public void showConfirmDialog(String title, String message) + { + JOptionPane.showMessageDialog(this, message, title, JOptionPane.PLAIN_MESSAGE); + } + + + + + private int getIDfromString(String stringLine, int length) + { + int index = stringLine.indexOf("ID:"); //Search string of "ID:" + if(index == -1) + { + showErrorDialog("Error", "String 'ID:' is not found!!"); + return -1; + } + + try + { + String strID = stringLine.substring(index + 3, index + 3 + length); + int id = Integer.parseInt(strID.trim()); + return id; + } + catch(Exception e) + { + showErrorDialog("Error", "Parse error"); + return -1; + } + } + //======================================================== + // Master panel action + //======================================================== + public void actionPerformed(ActionEvent ae) { + + if(ae.getSource() == mntm2) + { + System.exit(0); + } + else if (ae.getSource() == mainBtnShowMenu) + { + //((CardLayout) mainPanel.getLayout()).show( mainPanel, "MenuList"); + changeMainPanel("MenuList"); + cMenuListPanel.init(); + } + else if (ae.getSource() == mainBtnManageOrder) + { + //((CardLayout) mainPanel.getLayout()).show( mainPanel, "OrderList"); + changeMainPanel("OrderList"); + cOrderListPanel.init(); + } + else if (ae.getSource() == mainBtnManageEmployee) + { + changeMainPanel("EmployeeList"); + cEmployeeListPanel.init(); + } + else if (ae.getSource() == mainBtnManageMenuItem) + { + changeMainPanel("MenuManagement"); + cMenuManagementPanel.init(); + } + else if (ae.getSource() == mainBtnShowTotalSales) + { + changeMainPanel("TotalSalesPanel"); + cTotalSalesPanel.init(); + } + else if (ae.getSource() == mainBtnShowPayment) + { + changeMainPanel("PaymentPanel"); + cPaymentPanel.init(); + } + else if (ae.getSource() == headBtnLogin || ae.getSource() == mntm1) { + changeMainPanel("Login"); + cLoginPanel.init(); + displayMessage("Enter your login ID and password."); + } + else if (ae.getSource() == headBtnLogout) { + if( showYesNoDialog("Logout","Are you sure to logout?") == DIALOG_YES) + { + rcController.userLogout(); + changeMainPanel("Home"); + changeMode(MODE_ANONYMOUS); + setClockOutButton(); + } + } + else if (ae.getSource() == btnClockOut){ + if( showYesNoDialog("Clock out","Are you sure to clock out?") == DIALOG_YES) + { + rcController.clockOut(); + setClockOutButton(); + } + } + } + + /**************************************************************** + * Login panel + *****************************************************************/ + private class LoginPanel extends JPanel implements ActionListener + { + // components for login panel + //private JPanel loginPanel; + private JLabel lblUserID; + private JTextField tfUserID; + private JLabel lblPassword; + private JPasswordField pwPassword; + private JCheckBox chbIsManager; + private JButton btnLoginOK; + public LoginPanel() + { + //loginPanel = new JPanel(); + GridBagLayout gbLayout = new GridBagLayout(); + this.setLayout( gbLayout); + GridBagConstraints gbc = new GridBagConstraints(); + lblUserID = new JLabel("UserID:"); + lblUserID.setPreferredSize(new Dimension(100, 30)); + gbc.gridx = 0; + gbc.gridy = 0; + gbLayout.setConstraints(lblUserID, gbc); + this.add(lblUserID); + + tfUserID = new JTextField(20); + tfUserID.setInputVerifier(new IntegerInputVerifier(0)); + gbc.gridx = 1; + gbc.gridy = 0; + gbLayout.setConstraints(tfUserID, gbc); + this.add(tfUserID); + + lblPassword = new JLabel("Password:"); + lblPassword.setPreferredSize(new Dimension(100, 30)); + gbc.gridx = 0; + gbc.gridy = 1; + gbLayout.setConstraints(lblPassword, gbc); + this.add(lblPassword); + + pwPassword = new JPasswordField(20); + gbc.gridx = 1; + gbc.gridy = 1; + gbLayout.setConstraints(pwPassword, gbc); + this.add(pwPassword); + + chbIsManager = new JCheckBox("Login as manager"); + gbc.gridx = 0; + gbc.gridy = 2; + gbc.gridwidth = 2; + gbLayout.setConstraints(chbIsManager, gbc); + this.add(chbIsManager); + + btnLoginOK = new JButton("Login"); + btnLoginOK.addActionListener(this); + gbc.gridx = 0; + gbc.gridy = 3; + gbc.gridwidth = 2; + gbLayout.setConstraints(btnLoginOK, gbc); + this.add(btnLoginOK); + } + + private void setUserID(String id) + { + tfUserID.setText(id); + } + + private void setPassword(String password) + { + pwPassword.setText(password); + } + + public void init() + { + setUserID(""); + setPassword(""); + tfUserID.setBackground( UIManager.getColor( "TextField.background" ) ); + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == btnLoginOK) + { + //Check whether current focuced compornent have to verify their value + if (btnLoginOK.getVerifyInputWhenFocusTarget()) { + //Try to get focus + btnLoginOK.requestFocusInWindow(); + if (!btnLoginOK.hasFocus()) { //Can not get focus ?� the compornent have not been verified + return; + } + } + //if(!inputVerified) + // return; + + char[] password; + boolean isManager = chbIsManager.isSelected(); + + byte state = -1; + + String inputID = tfUserID.getText(); + + if(inputID.equals("")) + { + displayErrorMessage("Enter user ID"); + return; + } + + + password= pwPassword.getPassword(); + String inputPassword = new String(password); + if(inputPassword.equals("")) + { + displayErrorMessage("Enter password"); + return; + } + + if( rcController.loginCheck(Integer.parseInt(inputID), inputPassword, isManager)) + { + showConfirmDialog("Message", "Login success!!"); + displayMessage("Wellcome, " + currentUserName); + tfUserID.setText(""); + pwPassword.setText(""); + changeMainPanel("Home"); + setClockOutButton(); + } + else + { + displayErrorMessage(rcController.getErrorMessage()); + } + } + } + } + + private void changeMainPanel(String panelName) + { + ((CardLayout) mainPanel.getLayout()).show( mainPanel, panelName); + displayMessage("Main paanel change :" + panelName); + } + + /**************************************************************** + * Menu list panel + *****************************************************************/ + private class MenuListPanel extends JPanel implements ActionListener + { + private JScrollPane scrollPanel; + private JTextArea displayArea; + private JPanel btnPanel; + private JButton btnAll; + private JButton btnMain; + private JButton btnDrink; + private JButton btnAlcohol; + private JButton btnDessert; + + public MenuListPanel() + { + this.setLayout( new BorderLayout()); + displayArea = new JTextArea(); + displayArea.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + displayArea.setEditable(false); + displayArea.setMargin(new Insets(5, 5, 5, 5)); + scrollPanel = new JScrollPane(displayArea); + scrollPanel.setPreferredSize(new Dimension(200, 400)); + add(scrollPanel, BorderLayout.CENTER); + + btnPanel = new JPanel(); + btnPanel.setLayout( new FlowLayout()); + btnAll = new JButton("All"); + btnAll.addActionListener(this); + btnMain = new JButton("Main"); + btnMain.addActionListener(this); + btnDrink = new JButton("Drink"); + btnDrink.addActionListener(this); + btnAlcohol = new JButton("Alcohol"); + btnAlcohol.addActionListener(this); + btnDessert = new JButton("Dessert"); + btnDessert.addActionListener(this); + + btnPanel.add(btnAll); + btnPanel.add(btnMain); + btnPanel.add(btnDrink); + btnPanel.add(btnAlcohol); + btnPanel.add(btnDessert); + + add(btnPanel, BorderLayout.SOUTH); + } + + public void init() + { + showMenuList(0); + //displayArea.setText(str); + //showAllMenuList(displayArea); + } + + private void showMenuList(int menuType) + { + displayArea.setText(""); + ArrayList<String> menuList = rcController.createMenuList(menuType); + for(int i = 0; i < menuList.size(); i++) + displayArea.append(menuList.get(i) + "\n"); + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == btnAll) + { + showMenuList(0); + //showAllMenuList(displayArea); + } + else if (ae.getSource() == btnMain) + { + showMenuList(MenuItem.MAIN); + //showParticularMenuList(MenuItem.MAIN, displayArea); + } + else if (ae.getSource() == btnDrink) + { + showMenuList(MenuItem.DRINK); + //showParticularMenuList(MenuItem.DRINK, displayArea); + } + else if (ae.getSource() == btnAlcohol) + { + showMenuList(MenuItem.ALCOHOL); + //showParticularMenuList(MenuItem.ALCOHOL, displayArea); + } + else if (ae.getSource() == btnDessert) + { + showMenuList(MenuItem.DESSERT); + //showParticularMenuList(MenuItem.DESSERT, displayArea); + } + } + } + + /**************************************************************** + * MenuManagementPanel + *****************************************************************/ + private class MenuManagementPanel extends JPanel implements ActionListener + { + private JScrollPane scrollPanel; + private JList displayList; + private JButton btnAddNewMenuItem; + private JButton btnEditMenuItem; + private JButton btnDeleteMenuItem; + + public MenuManagementPanel() + { + GridBagLayout gbLayout = new GridBagLayout(); + this.setLayout( gbLayout); + GridBagConstraints gbc = new GridBagConstraints(); + + scrollPanel = new JScrollPane(); + gbc.insets = new Insets(10, 10, 10, 10); + gbc.gridx = 0; + gbc.gridy = 0; + gbc.fill = GridBagConstraints.BOTH; + gbc.weightx = 1.0; + gbc.weighty = 1.0; + gbc.gridwidth = 3; + gbLayout.setConstraints(scrollPanel, gbc); + this.add(scrollPanel); + + btnAddNewMenuItem = new JButton("Add new menu item"); + btnAddNewMenuItem.addActionListener(this); + gbc.gridx = 0; + gbc.gridy = 1; + gbc.gridwidth = 1; + gbc.weighty = 0; + gbc.weightx = 0.5; + gbc.fill = GridBagConstraints.HORIZONTAL; + gbLayout.setConstraints(btnAddNewMenuItem, gbc); + this.add(btnAddNewMenuItem); + + btnEditMenuItem = new JButton("Edit menu item"); + btnEditMenuItem.addActionListener(this); + gbc.gridx = 1; + gbc.gridy = 1; + gbLayout.setConstraints(btnEditMenuItem, gbc); + this.add(btnEditMenuItem); + + btnDeleteMenuItem = new JButton("Delete menu item"); + btnDeleteMenuItem.addActionListener(this); + gbc.gridx = 2; + gbc.gridy = 1; + gbLayout.setConstraints(btnDeleteMenuItem, gbc); + this.add(btnDeleteMenuItem); + + displayList = new JList(); + displayList.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + displayList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + } + + public void init() + { + showMenuList(); + } + + private void showMenuList() + { + displayList.setListData(rcController.createMenuList(0).toArray()); + scrollPanel.getViewport().setView(displayList); + } + + private int getSelectedMenuID() + { + String orderLine = (String)displayList.getSelectedValue(); + if (orderLine == null) + return -1; + + return getIDfromString( orderLine, 4); + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == btnAddNewMenuItem) + { + cEditMenuItemPanel.init(0); + changeMainPanel("EditMenuItem"); + } + else if (ae.getSource() == btnEditMenuItem) + { + int menuID = getSelectedMenuID(); + if( menuID == -1) return; + cEditMenuItemPanel.init(menuID); + changeMainPanel("EditMenuItem"); + } + else if (ae.getSource() == btnDeleteMenuItem) + { + int deleteMenuID = getSelectedMenuID(); + if( deleteMenuID == -1) return; + + if( showYesNoDialog("", "Are you sure to delete the menu item?") == DIALOG_YES) + { + if(!rcController.deleteMenuItem(deleteMenuID)) + { + showErrorDialog("Error", rcController.getErrorMessage()); + } + else + { + displayMessage("Deleted."); + init(); + } + } + } + } + } + + /**************************************************************** + * Edit menu item panel + *****************************************************************/ + private class EditMenuItemPanel extends JPanel implements ActionListener + { + private JLabel lblMenuItemID; + private JTextField tbMenuItemID; + private JLabel lblName; + private JTextField tbName; + private JLabel lblPrice; + private JTextField tbPrice; + private JLabel lblType; + private JComboBox cbType; + private JButton btnOK; + + private boolean isUpdate; + + public EditMenuItemPanel() + { + GridBagLayout gbLayout = new GridBagLayout(); + this.setLayout( gbLayout); + GridBagConstraints gbc = new GridBagConstraints(); + + lblMenuItemID = new JLabel("Menu item ID:"); + lblMenuItemID.setPreferredSize(new Dimension(100, 30)); + gbc.gridx = 0; + gbc.gridy = 0; + gbc.anchor = GridBagConstraints.WEST; + gbLayout.setConstraints(lblMenuItemID, gbc); + this.add(lblMenuItemID); + + tbMenuItemID = new JTextField(4); + tbMenuItemID.setInputVerifier(new IntegerInputVerifier(1,10000)); + gbc.gridx = 1; + gbc.gridy = 0; + gbLayout.setConstraints(tbMenuItemID, gbc); + this.add(tbMenuItemID); + + lblName = new JLabel("Menu item name:"); + lblName.setPreferredSize(new Dimension(100, 30)); + gbc.gridx = 0; + gbc.gridy = 1; + gbLayout.setConstraints(lblName, gbc); + this.add(lblName); + + tbName = new JTextField(20); + gbc.gridx = 1; + gbc.gridy = 1; + gbLayout.setConstraints(tbName, gbc); + this.add(tbName); + + lblPrice = new JLabel("Menu item price:"); + lblPrice.setPreferredSize(new Dimension(100, 30)); + gbc.gridx = 0; + gbc.gridy = 2; + gbLayout.setConstraints(lblPrice, gbc); + this.add(lblPrice); + + tbPrice = new JTextField(10); + tbPrice.setInputVerifier(new DoubleInputVerifier(1,10000)); + gbc.gridx = 1; + gbc.gridy = 2; + gbLayout.setConstraints(tbPrice, gbc); + this.add(tbPrice); + + lblType = new JLabel("Menu item type:"); + lblType.setPreferredSize(new Dimension(100, 30)); + gbc.gridx = 0; + gbc.gridy = 3; + gbLayout.setConstraints(lblType, gbc); + this.add(lblType); + + String[] combodata = {"Main", "Drink", "Alcohol", "Dessert"}; + cbType = new JComboBox(combodata); + gbc.gridx = 1; + gbc.gridy = 3; + gbLayout.setConstraints(cbType, gbc); + this.add(cbType); + + btnOK = new JButton("OK"); + btnOK.addActionListener(this); + gbc.gridx = 0; + gbc.gridy = 4; + gbc.gridwidth = 2; + gbLayout.setConstraints(btnOK, gbc); + this.add(btnOK); + } + + private void setMenuID(String id) + { + tbMenuItemID.setText(id); + } + + private void setItemName(String name) + { + tbName.setText(name); + } + + private void setPrice(String price) + { + tbPrice.setText(price); + } + + private void setType(String type) + { + cbType.setSelectedItem(type); + } + + + public void init(int menuItemID) + { + //------------- Add new menu item ------------ + if( menuItemID == 0) + { + setMenuID(""); + tbMenuItemID.setEditable(true); + setItemName(""); + setPrice(""); + setType("Main"); + isUpdate = false; + return; + } + + //------------- Update menu item ------------ + + MenuItem rMenuItem = rcController.getMenuItemData(menuItemID); + isUpdate = true; + + if( rMenuItem == null) + { + showErrorDialog("Error", "Get menu item data failed."); + setItemName(""); + setPrice(""); + setType("Main"); + return; + } + setMenuID(Integer.toString(rMenuItem.getID())); + setItemName(rMenuItem.getName()); + setPrice(Double.toString(rMenuItem.getPrice())); + tbPrice.setBackground( UIManager.getColor( "TextField.background" ) ); + switch( rMenuItem.getType()) + { + case MenuItem.MAIN: + setType("Main"); + break; + case MenuItem.DRINK: + setType("Drink"); + break; + case MenuItem.ALCOHOL: + setType("Alcohol"); + break; + case MenuItem.DESSERT: + setType("Dessert"); + break; + } + tbMenuItemID.setEditable(false); + tbMenuItemID.setBackground( UIManager.getColor( "TextField.background" ) ); + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == btnOK) + { + //if( !inputVerified) return; + //Check whether current focuced compornent have to verify their value + if (btnOK.getVerifyInputWhenFocusTarget()) { + //Try to get focus + btnOK.requestFocusInWindow(); + if (!btnOK.hasFocus()) { //Can not get focus ?� the compornent have not been verified + return; + } + } + + if( tbMenuItemID.getText().equals("") || tbName.getText().equals("") || tbPrice.getText().equals("")) + { + displayErrorMessage("Fill all form!!"); + return; + } + + int menuItemID = Integer.parseInt(tbMenuItemID.getText()); + + String strMenuType = (String)cbType.getSelectedItem(); + byte menuType; + + if( strMenuType.equals("Main")) + { + menuType = MenuItem.MAIN; + } + else if( strMenuType.equals("Drink")) + { + menuType = MenuItem.DRINK; + } + else if( strMenuType.equals("Alcohol")) + { + menuType = MenuItem.ALCOHOL; + } + else //Dessert + { + menuType = MenuItem.DESSERT; + } + + if(isUpdate) + { + if(! rcController.updateMenuItem(menuItemID , tbName.getText(), Double.parseDouble(tbPrice.getText()), menuType)) + { + showErrorDialog("Error", rcController.getErrorMessage()); + return; + } + showConfirmDialog("Message", "Update successful!!"); + } + else + { + if(! rcController.addNewMenuItem(menuItemID , tbName.getText(), Double.parseDouble(tbPrice.getText()), menuType)) + { + showErrorDialog("Error", rcController.getErrorMessage()); + return; + } + showConfirmDialog("Message", "New menu item is added!!"); + } + init(menuItemID); + } + } + } + + /**************************************************************** + * Employee list panel + *****************************************************************/ + private class EmployeeListPanel extends JPanel implements ActionListener + { + private JScrollPane scrollPanel; + private JList displayList; + //private JPanel btnPanel; + private JButton btnAddStaff; + private JButton btnEditStaff; + private JButton btnDeleteStaff; + private JButton btnClockOut; + + public EmployeeListPanel() + { + GridBagLayout gbLayout = new GridBagLayout(); + this.setLayout( gbLayout); + GridBagConstraints gbc = new GridBagConstraints(); + + scrollPanel = new JScrollPane(); + gbc.insets = new Insets(10, 10, 10, 10); + gbc.gridx = 0; + gbc.gridy = 0; + gbc.fill = GridBagConstraints.BOTH; + gbc.weightx = 1.0; + gbc.weighty = 1.0; + gbc.gridwidth = 4; + gbLayout.setConstraints(scrollPanel, gbc); + this.add(scrollPanel); + + btnAddStaff = new JButton("Add new staff"); + btnAddStaff.addActionListener(this); + gbc.gridx = 0; + gbc.gridy = 1; + gbc.gridwidth = 1; + gbc.weighty = 0; + gbc.weightx = 0.25; + gbc.fill = GridBagConstraints.HORIZONTAL; + gbLayout.setConstraints(btnAddStaff, gbc); + this.add(btnAddStaff); + + btnEditStaff = new JButton("Edit staff"); + btnEditStaff.addActionListener(this); + gbc.gridx = 1; + gbc.gridy = 1; + gbLayout.setConstraints(btnEditStaff, gbc); + this.add(btnEditStaff); + + btnDeleteStaff = new JButton("Delete staff"); + btnDeleteStaff.addActionListener(this); + gbc.gridx = 2; + gbc.gridy = 1; + gbLayout.setConstraints(btnDeleteStaff, gbc); + this.add(btnDeleteStaff); + + btnClockOut = new JButton("Clock out"); + btnClockOut.addActionListener(this); + gbc.gridx = 3; + gbc.gridy = 1; + gbLayout.setConstraints(btnClockOut, gbc); + this.add(btnClockOut); + + displayList = new JList(); + displayList.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + displayList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + } + + public void init() + { + showStaffList(); + } + + public void showStaffList() + { + displayList.setListData(rcController.createStaffList().toArray()); + scrollPanel.getViewport().setView(displayList); + } + + private int getSelectedStaffID() + { + String orderLine = (String)displayList.getSelectedValue(); + if (orderLine == null) + return -1; + + return getIDfromString( orderLine, 4); + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == btnAddStaff) + { + cEditEmployeePanel.init(0); + changeMainPanel("EditEmployee"); + } + else if (ae.getSource() == btnEditStaff) + { + int staffID = getSelectedStaffID(); + if( staffID == -1) return; + cEditEmployeePanel.init(staffID); + changeMainPanel("EditEmployee"); + } + else if (ae.getSource() == btnDeleteStaff) + { + int deleteStaffID = getSelectedStaffID(); + if( deleteStaffID == -1) return; + + if( showYesNoDialog("", "Are you sure to delete the staff?") == DIALOG_YES) + { + if(!rcController.deleteStaff(deleteStaffID)) + { + showErrorDialog("Error", rcController.getErrorMessage()); + } + else + { + displayMessage("Deleted."); + init(); + } + } + } + else if (ae.getSource() == btnClockOut) + { + int staffID = getSelectedStaffID(); + if( staffID == -1) return; + if(showYesNoDialog("", "Are you sure to make the staff clocked out?") == DIALOG_NO) + return; + if( rcController.clockOut(staffID) == false) + showErrorDialog("Error", rcController.getErrorMessage()); + else + { + displayMessage("The staff have been clocked out."); + init(); + } + } + } + } + + /**************************************************************** + * Edit employee panel + *****************************************************************/ + private class EditEmployeePanel extends JPanel implements ActionListener + { + private JLabel lblStaffID; + private JTextField tbStaffID; + private JLabel lblFirstName; + private JTextField tbFirstName; + private JLabel lblLastName; + private JTextField tbLastName; + private JLabel lblPassword; + private JPasswordField tbPassword; + private JButton btnOK; + + private boolean isUpdate; + + public EditEmployeePanel() + { + GridBagLayout gbLayout = new GridBagLayout(); + this.setLayout( gbLayout); + GridBagConstraints gbc = new GridBagConstraints(); + + lblStaffID = new JLabel("StaffID:"); + lblStaffID.setPreferredSize(new Dimension(100, 30)); + gbc.gridx = 0; + gbc.gridy = 0; + gbc.anchor = GridBagConstraints.WEST; + gbLayout.setConstraints(lblStaffID, gbc); + this.add(lblStaffID); + + tbStaffID = new JTextField(4); + tbStaffID.setInputVerifier(new IntegerInputVerifier(1,10000)); + gbc.gridx = 1; + gbc.gridy = 0; + gbLayout.setConstraints(tbStaffID, gbc); + this.add(tbStaffID); + + lblFirstName = new JLabel("FirstName:"); + lblFirstName.setPreferredSize(new Dimension(100, 30)); + gbc.gridx = 0; + gbc.gridy = 1; + gbLayout.setConstraints(lblFirstName, gbc); + this.add(lblFirstName); + + tbFirstName = new JTextField(20); + gbc.gridx = 1; + gbc.gridy = 1; + gbLayout.setConstraints(tbFirstName, gbc); + this.add(tbFirstName); + + lblLastName = new JLabel("LastName:"); + lblLastName.setPreferredSize(new Dimension(100, 30)); + gbc.gridx = 0; + gbc.gridy = 2; + gbLayout.setConstraints(lblLastName, gbc); + this.add(lblLastName); + + tbLastName = new JTextField(20); + gbc.gridx = 1; + gbc.gridy = 2; + gbLayout.setConstraints(tbLastName, gbc); + this.add(tbLastName); + + lblPassword = new JLabel("Password:"); + lblPassword.setPreferredSize(new Dimension(100, 30)); + gbc.gridx = 0; + gbc.gridy = 3; + gbLayout.setConstraints(lblPassword, gbc); + this.add(lblPassword); + + tbPassword = new JPasswordField(20); + gbc.gridx = 1; + gbc.gridy = 3; + gbLayout.setConstraints(tbPassword, gbc); + this.add(tbPassword); + + btnOK = new JButton("OK"); + btnOK.addActionListener(this); + gbc.gridx = 0; + gbc.gridy = 4; + gbc.gridwidth = 2; + gbLayout.setConstraints(btnOK, gbc); + this.add(btnOK); + } + + private void setUserID(int id) + { + tbStaffID.setText(Integer.toString(id)); + } + + private void setPassword(String password) + { + tbPassword.setText(password); + } + + private void setLastName(String lastName) + { + tbLastName.setText(lastName); + } + + private void setFirstName(String firstName) + { + tbFirstName.setText(firstName); + } + + public void init(int employeeID) + { + //------------- Add new staff ------------ + if( employeeID == 0) + { + setUserID(0); + tbStaffID.setEditable(true); + setPassword(""); + setLastName(""); + setFirstName(""); + isUpdate = false; + return; + } + + //------------- Update staff ------------ + + Staff rStaff = rcController.getStaffData(employeeID); + isUpdate = true; + + if( rStaff == null) + { + showErrorDialog("Error", "Get staff data failed."); + setLastName(""); + setFirstName(""); + return; + } + setUserID(rStaff.getID()); + setPassword(rStaff.getPassword()); + setLastName(rStaff.getLastName()); + setFirstName(rStaff.getFirstName()); + tbStaffID.setEditable(false); + tbStaffID.setBackground( UIManager.getColor( "TextField.background" ) ); + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == btnOK) + { + //if( !inputVerified) return; + //Check whether current focuced compornent have to verify their value + if (btnOK.getVerifyInputWhenFocusTarget()) { + //Try to get focus + btnOK.requestFocusInWindow(); + if (!btnOK.hasFocus()) { //Can not get focus ?� the compornent have not been verified + return; + } + } + + + int test = tbPassword.getPassword().length; + + if(tbPassword.getPassword().length == 0 || tbFirstName.getText().equals("") || tbLastName.getText().equals("")) + { + displayErrorMessage("Fill all form!!"); + return; + } + + int staffID = Integer.parseInt(tbStaffID.getText()); + + if(isUpdate) + { + if(! rcController.updateStaff(staffID , new String(tbPassword.getPassword()), tbFirstName.getText(), tbLastName.getText())) + { + showErrorDialog("Error", rcController.getErrorMessage()); + return; + } + showConfirmDialog("Message", "Update successful!!"); + } + else + { + boolean isManager = false; + + if( showYesNoDialog("", "Add as Manager?") == DIALOG_YES) + isManager = true; + + if(!rcController.addNewStaff(staffID, + new String(tbPassword.getPassword()), + tbFirstName.getText(), + tbLastName.getText(), + isManager)) + { + showErrorDialog("Error", rcController.getErrorMessage()); + return; + } + showConfirmDialog("Message", "New staff is added!!"); + + } + init(staffID); + } + } + } + + /**************************************************************** + * Order list panel + *****************************************************************/ + private class OrderListPanel extends JPanel implements ActionListener + { + private JScrollPane scrollPanel; + //private JTextArea displayArea; + private JPanel btnPanel; + private JButton btnNewOrder; + private JButton btnEditOrder; + private JButton btnCloseOrder; + private JButton btnCancelOrder; + private JLabel lblTotalSales; + private JLabel lblTotalCount; + private JLabel lblCancelTotal; + private JLabel lblCancelCount; + private JList displayList; + + public OrderListPanel() + { + GridBagLayout gbLayout = new GridBagLayout(); + this.setLayout( gbLayout); + GridBagConstraints gbc = new GridBagConstraints(); + /*displayArea = new JTextArea(); + displayArea.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + displayArea.setEditable(false); + displayArea.setMargin(new Insets(5, 5, 5, 5));*/ + scrollPanel = new JScrollPane(); + scrollPanel.setPreferredSize(new Dimension(500, 300)); + gbc.gridx = 0; + gbc.gridy = 0; + gbc.gridwidth = 4; + gbLayout.setConstraints(scrollPanel, gbc); + this.add(scrollPanel); + + lblTotalCount = new JLabel(); + lblTotalCount.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + gbc.gridx = 0; + gbc.gridy = 1; + gbc.gridwidth = 2; + gbc.insets = new Insets(10, 10, 10, 10); + gbLayout.setConstraints(lblTotalCount, gbc); + this.add(lblTotalCount); + + lblTotalSales = new JLabel(); + lblTotalSales.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + gbc.gridx = 2; + gbc.gridy = 1; + gbc.gridwidth = 2; + gbLayout.setConstraints(lblTotalSales, gbc); + this.add(lblTotalSales); + + lblCancelCount = new JLabel(); + lblCancelCount.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + gbc.gridx = 0; + gbc.gridy = 2; + gbc.gridwidth = 2; + gbLayout.setConstraints(lblCancelCount, gbc); + this.add(lblCancelCount); + + lblCancelTotal = new JLabel(); + lblCancelTotal.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + gbc.gridx = 2; + gbc.gridy = 2; + gbc.gridwidth = 2; + gbLayout.setConstraints(lblCancelTotal, gbc); + this.add(lblCancelTotal); + + btnNewOrder = new JButton("New"); + btnNewOrder.addActionListener(this); + gbc.gridx = 0; + gbc.gridy = 3; + gbc.gridwidth = 1; + gbc.weightx = 0.25; + gbc.fill = GridBagConstraints.HORIZONTAL; + gbLayout.setConstraints(btnNewOrder, gbc); + this.add(btnNewOrder); + + btnEditOrder = new JButton("Edit"); + btnEditOrder.addActionListener(this); + gbc.gridx = 1; + gbc.gridy = 3; + gbLayout.setConstraints(btnEditOrder, gbc); + this.add(btnEditOrder); + + btnCloseOrder = new JButton("Close"); + btnCloseOrder.addActionListener(this); + gbc.gridx = 2; + gbc.gridy = 3; + gbLayout.setConstraints(btnCloseOrder, gbc); + this.add(btnCloseOrder); + + btnCancelOrder = new JButton("Cancel"); + btnCancelOrder.addActionListener(this); + gbc.gridx = 3; + gbc.gridy = 3; + gbLayout.setConstraints(btnCancelOrder, gbc); + this.add(btnCancelOrder); + + displayList = new JList(); + } + + private void setTotalCount( int count) + { + lblTotalCount.setText("Today's order: " + count); + } + + private void setTotalSales( double sales) + { + lblTotalSales.setText("Total:$ " + sales); + } + + private void setCancelCount( int count) + { + lblCancelCount.setText("Canceled orders: " + count); + } + + private void setCancelTotal( double sales) + { + lblCancelTotal.setText("Cancel total:$ " + sales); + } + + private void showOrderList() + { + displayList.setListData(rcController.createOrderList().toArray()); + scrollPanel.getViewport().setView(displayList); + + setTotalCount(rcController.getTodaysOrderCnt()); + setTotalSales(rcController.getTotalSales()); + setCancelCount(rcController.getTodaysCancelCnt()); + setCancelTotal(rcController.getCancelTotal()); + + } + + public void init() + { + showOrderList(); + } + + private int getSelectedOrderID() + { + String orderLine = (String)displayList.getSelectedValue(); + if (orderLine == null) + return -1; + + return getIDfromString( orderLine, 4); + } + + private String getSelectedOrderStaffName() + { + String stringLine = (String)displayList.getSelectedValue(); + if (stringLine == null) + return null; + + int index = stringLine.indexOf("Name:"); //Search string of "ID:" + if(index == -1) + { + showErrorDialog("Error", "String 'Name:' is not found!!"); + return null; + } + + + String staffName = stringLine.substring(index + 5, index + 5 + 22); + return staffName.trim(); + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == btnNewOrder) + { + //((CardLayout) mainPanel.getLayout()).show( mainPanel, "OrderDetail"); + changeMainPanel("OrderDetail"); + int orderID = rcController.createOrder(); + String staffName = rcController.getCurrentUserName(); + cOrderDetailPanel.init(orderID, staffName); + //cOrderListPanel.init(); + } + else if (ae.getSource() == btnEditOrder) + { + int orderID = getSelectedOrderID(); + String staffName = getSelectedOrderStaffName(); + if(orderID == -1) return; + + ((CardLayout) mainPanel.getLayout()).show( mainPanel, "OrderDetail"); + //int orderID = cController.createOrder(); + cOrderDetailPanel.init(orderID, staffName); + } + else if (ae.getSource() == btnCloseOrder) + { + int orderID = getSelectedOrderID(); + if(orderID == -1) return; + + if( showYesNoDialog("Close order","Are you sure to close the order?") == DIALOG_YES) + { + if( !rcController.closeOrder(orderID)) + displayErrorMessage(rcController.getErrorMessage()); + showOrderList(); + } + } + else if (ae.getSource() == btnCancelOrder) + { + int orderID = getSelectedOrderID(); + if(orderID == -1) return; + + if( showYesNoDialog("Close order","Are you sure to close the order?") == DIALOG_YES) + { + if(!rcController.cancelOrder(orderID)) + displayErrorMessage(rcController.getErrorMessage()); + showOrderList(); + } + } + } + } + + /**************************************************************** + * Order detail panel + *****************************************************************/ + private class OrderDetailPanel extends JPanel implements ActionListener, ListSelectionListener + { + //Right + private JLabel lblRightTitle; + + private JScrollPane menuScrollPanel; + private JButton btnAll; + private JButton btnMain; + private JButton btnDrink; + private JButton btnAlcohol; + private JButton btnDessert; + + //Left + private JLabel lblLeftTitle; + private JLabel lblLeftInfo; + private JScrollPane orderScrollPanel; + //private JTextArea displayArea; + private JPanel btnPanel; + private JButton btnAddItem; + private JButton btnDeleteItem; + private JLabel lblQuantity; + private JTextField tfQuantity; + + private JLabel lblTotalSales; + private JLabel lblOrderState; + private JLabel lblStaffName; + private JList orderItemList; + private JList menuList; + + private int currentOrderID; + private int orderItemCnt; + private int currentOrderState; + + private JPanel orderDetailPanel; + private JPanel menuListPanel; + + public OrderDetailPanel() + { + this.setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS)); + //this.insets = new Insets(5, 5, 5, 5); + + orderDetailPanel = new JPanel(); + //orderDetailPanel.setSize(new Dimension(270, 600)); + + GridBagLayout gbLayout = new GridBagLayout(); + orderDetailPanel.setLayout( gbLayout); + GridBagConstraints gbc = new GridBagConstraints(); + + lblLeftTitle = new JLabel("Order detail"); + + //lblLeftTitle.setMaximumSize(new Dimension(350, 50)); + gbc.gridx = 0; + gbc.gridy = 0; + gbc.gridwidth = 4; + gbc.fill = GridBagConstraints.BOTH; + gbc.insets = new Insets(5, 5, 5, 5); + gbLayout.setConstraints(lblLeftTitle, gbc); + orderDetailPanel.add(lblLeftTitle); + + lblLeftInfo = new JLabel("No Item name quantity price"); + gbc.gridx = 0; + gbc.gridy = 1; + gbc.gridwidth = 4; + gbLayout.setConstraints(lblLeftInfo, gbc); + orderDetailPanel.add(lblLeftInfo); + + orderScrollPanel = new JScrollPane(); + gbc.gridx = 0; + gbc.gridy = 2; + gbc.ipadx = 0; + gbc.ipady = 0; + gbc.weighty = 1.0; + //gbc.fill = GridBagConstraints.VERTICAL; + gbLayout.setConstraints(orderScrollPanel, gbc); + orderDetailPanel.add(orderScrollPanel); + + lblTotalSales = new JLabel(); + gbc.gridx = 0; + gbc.gridy = 3; + gbc.weighty = 0; + gbc.gridwidth = 4; + //gbc.fill = GridBagConstraints.BOTH; + gbLayout.setConstraints(lblTotalSales, gbc); + orderDetailPanel.add(lblTotalSales); + + lblOrderState = new JLabel(); + gbc.gridx = 0; + gbc.gridy = 4; + gbLayout.setConstraints(lblOrderState, gbc); + orderDetailPanel.add(lblOrderState); + + lblStaffName = new JLabel(); + gbc.gridx = 0; + gbc.gridy = 5; + gbc.gridwidth = 4; + gbLayout.setConstraints(lblStaffName, gbc); + orderDetailPanel.add(lblStaffName); + + lblQuantity = new JLabel("Quantity"); + gbc.ipadx = 20; + gbc.gridx = 0; + gbc.gridy = 6; + gbc.gridwidth = 2; + gbLayout.setConstraints(lblQuantity, gbc); + orderDetailPanel.add(lblQuantity); + + tfQuantity = new JTextField(); + tfQuantity.setInputVerifier(new IntegerInputVerifier(1,100)); + tfQuantity.addActionListener(this); + gbc.gridx = 0; + gbc.gridy = 7; + gbLayout.setConstraints(tfQuantity, gbc); + orderDetailPanel.add(tfQuantity); + + btnAddItem = new JButton("Add"); + btnAddItem.addActionListener(this); + gbc.gridx = 2; + gbc.gridy = 6; + gbc.gridwidth = 1; + gbc.gridheight = 2; + gbLayout.setConstraints(btnAddItem, gbc); + orderDetailPanel.add(btnAddItem); + + btnDeleteItem = new JButton("Delete"); + btnDeleteItem.addActionListener(this); + gbc.gridx = 3; + gbc.gridy = 6; + gbLayout.setConstraints(btnDeleteItem, gbc); + orderDetailPanel.add(btnDeleteItem); + + + //Right panel + menuListPanel = new JPanel(); + + menuListPanel.setLayout( gbLayout); + + lblRightTitle = new JLabel("Menu list"); + gbc.gridx = 0; + gbc.gridy = 0; + gbc.ipadx = 0; + gbc.gridwidth = 5; + gbc.gridheight = 1; + gbc.fill = GridBagConstraints.BOTH; + gbLayout.setConstraints(lblRightTitle, gbc); + menuListPanel.add(lblRightTitle); + + menuScrollPanel = new JScrollPane(); + //menuScrollPanel.setPreferredSize(new Dimension(270, 300)); + //menuScrollPanel.setMaximumSize(new Dimension(Short.MAX_VALUE, Short.MAX_VALUE)); + gbc.gridy = 1; + gbc.weighty = 1.0; + + gbLayout.setConstraints(menuScrollPanel, gbc); + menuListPanel.add(menuScrollPanel); + + btnAll = new JButton("All"); + btnAll.addActionListener(this); + gbc.gridx = 0; + gbc.gridy = 2; + gbc.gridwidth = 1; + gbc.weighty = 0; + gbc.fill = GridBagConstraints.BOTH; + gbLayout.setConstraints(btnAll, gbc); + menuListPanel.add(btnAll); + + btnMain = new JButton("Main"); + btnMain.addActionListener(this); + gbc.gridx = 1; + gbc.gridy = 2; + gbLayout.setConstraints(btnMain, gbc); + menuListPanel.add(btnMain); + + btnDrink = new JButton("Drink"); + btnDrink.addActionListener(this); + gbc.gridx = 2; + gbc.gridy = 2; + gbLayout.setConstraints(btnDrink, gbc); + menuListPanel.add(btnDrink); + + btnAlcohol = new JButton("Alcohol"); + btnAlcohol.addActionListener(this); + gbc.gridx = 3; + gbc.gridy = 2; + gbLayout.setConstraints(btnAlcohol, gbc); + menuListPanel.add(btnAlcohol); + + btnDessert = new JButton("Dessert"); + btnDessert.addActionListener(this); + gbc.gridx = 4; + gbc.gridy = 2; + gbLayout.setConstraints(btnDessert, gbc); + menuListPanel.add(btnDessert); + + LineBorder border = new LineBorder(Color.BLACK, 1, false); + menuListPanel.setBorder(border); + orderDetailPanel.setBorder(border); + this.add(orderDetailPanel); + this.add(menuListPanel); + + + //menuListPanel.setMaximumSize(new Dimension(350, 600)); + + orderItemList = new JList(); + orderItemList.setFont(new Font(Font.MONOSPACED,Font.PLAIN,10)); + orderItemList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + menuList = new JList(); + menuList.addListSelectionListener(this); + menuList.setFont(new Font(Font.MONOSPACED,Font.PLAIN,10)); + menuList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); + + } + + public void init(int orderID, String staffName) + { + currentOrderID = orderID; + currentOrderState = rcController.getOrderState(orderID); + switch(currentOrderState) + { + case Order.ORDER_CLOSED: + setOrderState("Closed"); + break; + case Order.ORDER_CANCELED: + setOrderState("Canceled"); + break; + default: + break; + } + + if(currentOrderState != 0) + { + btnAddItem.setEnabled(false); + btnDeleteItem.setEnabled(false); + } + else + { + btnAddItem.setEnabled(true); + btnDeleteItem.setEnabled(true); + } + + refleshOrderDetailList(); + menuList.setListData(rcController.createMenuList(0).toArray()); + menuScrollPanel.getViewport().setView(menuList); + tfQuantity.setText(""); + tfQuantity.setBackground( UIManager.getColor( "TextField.background" ) ); + setStaffName(staffName); + } + + private void setTotal(double total) + { + lblTotalSales.setText("Total charge: $" + total); + } + + private void setOrderState(String state) + { + lblOrderState.setText("Order state: " + state); + } + + private void setStaffName(String name) + { + lblStaffName.setText("Staff name: " + name); + } + + private void refleshOrderDetailList() + { + ArrayList<String> list = rcController.createOrderItemlList(currentOrderID); + setTotal(rcController.getOrderTotalCharge(currentOrderID)); + orderItemCnt = list.size(); + orderItemList.setListData(list.toArray()); + //createOrderItemlList(currentOrderID, orderItemList); + orderScrollPanel.getViewport().setView(orderItemList); + } + + private int getOrderDetailIndexFromString(String orderLine) + { + try + { + String strIndex = orderLine.substring(0, 4); + int index = Integer.parseInt(strIndex.trim()); + return index; + } + catch(Exception e) + { + //showErrorDialog("Error", "Parse error"); + return -1; + } + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == btnAddItem) + { + //if(!inputVerified) + // return; + //Check whether current focuced compornent have to verify their value + if (btnAddItem.getVerifyInputWhenFocusTarget()) { + //Try to get focus + btnAddItem.requestFocusInWindow(); + if (!btnAddItem.hasFocus()) { //Can not get focus ?� the compornent have not been verified + return; + } + } + + String menuLine = (String)menuList.getSelectedValue(); + if (menuLine == null) + return; + + int id = getIDfromString( menuLine, 4); + if(id == -1) + return; + if( tfQuantity.getText().equals("")) + { + showErrorDialog("Error", "Enter quantity!!"); + return; + } + byte quantity = Byte.parseByte(tfQuantity.getText().trim()); + /*if( quantity <= 0 || 100 <= quantity) + { + displayErrorMessage("Quantity must be between 1 and 100"); + return; + }*/ + displayMessage("Menu ID = "+ id + " Quantity = " + quantity); + if( rcController.addNewOrderItem(currentOrderID, id, quantity) == false) + { + displayErrorMessage("addNewOrderItem Error!!\n" + rcController.getErrorMessage()); + } + refleshOrderDetailList(); + //auto scroll + orderItemList.ensureIndexIsVisible(orderItemCnt-1); + + } + else if (ae.getSource() == btnDeleteItem) + { + String orderLine = (String)orderItemList.getSelectedValue(); + if(orderLine == null) + return; + + int index = getOrderDetailIndexFromString(orderLine); + if(index == -1) + return; + if( rcController.deleteOrderItem(currentOrderID, index) == false) + { + displayErrorMessage("deleteOrderItem Error!!\n" + rcController.getErrorMessage()); + } + refleshOrderDetailList(); + } + else if (ae.getSource() == btnAll) + { + menuList.setListData(rcController.createMenuList(0).toArray()); + menuScrollPanel.getViewport().setView(menuList); + } + else if (ae.getSource() == btnMain) + { + //createParticularMenuList(MenuItem.MAIN, menuList); + menuList.setListData(rcController.createMenuList(MenuItem.MAIN).toArray()); + menuScrollPanel.getViewport().setView(menuList); + } + else if (ae.getSource() == btnDrink) + { + //createParticularMenuList(MenuItem.DRINK, menuList); + menuList.setListData(rcController.createMenuList(MenuItem.DRINK).toArray()); + menuScrollPanel.getViewport().setView(menuList); + } + else if (ae.getSource() == btnAlcohol) + { + //createParticularMenuList(MenuItem.ALCOHOL, menuList); + menuList.setListData(rcController.createMenuList(MenuItem.ALCOHOL).toArray()); + menuScrollPanel.getViewport().setView(menuList); + } + else if (ae.getSource() == btnDessert) + { + //createParticularMenuList(MenuItem.DESSERT, menuList); + menuList.setListData(rcController.createMenuList(MenuItem.DESSERT).toArray()); + menuScrollPanel.getViewport().setView(menuList); + } + } + + public void valueChanged( ListSelectionEvent e ) { + if( e.getValueIsAdjusting() == true ){ //when mouce click happens + if( e.getSource() == menuList ){ + tfQuantity.setText("1"); + } + } + } + } + + /**************************************************************** + * Total sales panel + *****************************************************************/ + private class TotalSalesPanel extends JPanel implements ActionListener + { + private JScrollPane scrollPanel; + private JList displayList; + private JButton btnPrint; + private JButton btnCloseAllOrder; + private JLabel lblTotalSales; + private JLabel lblTotalCount; + private JLabel lblCancelTotal; + private JLabel lblCancelCount; + + + public TotalSalesPanel() + { + GridBagLayout gbLayout = new GridBagLayout(); + this.setLayout( gbLayout); + GridBagConstraints gbc = new GridBagConstraints(); + + scrollPanel = new JScrollPane(); + //scrollPanel.setPreferredSize(new Dimension(500, 300)); + gbc.gridx = 0; + gbc.gridy = 0; + gbc.gridwidth = 4; + gbc.weightx = 1.0; + gbc.weighty = 1.0; + gbc.insets = new Insets(5, 5, 5, 5); + gbc.fill = GridBagConstraints.BOTH; + gbLayout.setConstraints(scrollPanel, gbc); + this.add(scrollPanel); + + lblTotalCount = new JLabel(); + lblTotalCount.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + gbc.gridx = 0; + gbc.gridy = 1; + gbc.gridwidth = 2; + gbc.weighty = 0; + gbLayout.setConstraints(lblTotalCount, gbc); + this.add(lblTotalCount); + + lblTotalSales = new JLabel(); + lblTotalSales.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + gbc.gridx = 2; + gbc.gridy = 1; + gbLayout.setConstraints(lblTotalSales, gbc); + this.add(lblTotalSales); + + lblCancelCount = new JLabel(); + lblCancelCount.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + gbc.gridx = 0; + gbc.gridy = 2; + gbLayout.setConstraints(lblCancelCount, gbc); + this.add(lblCancelCount); + + lblCancelTotal = new JLabel(); + lblCancelTotal.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + gbc.gridx = 2; + gbc.gridy = 2; + gbLayout.setConstraints(lblCancelTotal, gbc); + this.add(lblCancelTotal); + + btnPrint = new JButton("Generate text file"); + btnPrint.addActionListener(this); + gbc.gridx = 0; + gbc.gridy = 3; + gbc.gridwidth = 2; + gbLayout.setConstraints(btnPrint, gbc); + this.add(btnPrint); + + btnCloseAllOrder = new JButton("Close all order"); + btnCloseAllOrder.addActionListener(this); + gbc.gridx = 2; + gbc.gridy = 3; + gbLayout.setConstraints(btnCloseAllOrder, gbc); + this.add(btnCloseAllOrder); + + displayList = new JList(); + } + + private void setTotalCount( int count) + { + lblTotalCount.setText("Today's order: " + count); + } + + private void setTotalSales( double sales) + { + lblTotalSales.setText("Total:$ " + sales); + } + + private void setCancelCount( int count) + { + lblCancelCount.setText("Canceled orders: " + count); + } + + private void setCancelTotal( double sales) + { + lblCancelTotal.setText("Cancel total:$ " + sales); + } + + private void showOrderList() + { + displayList.setListData(rcController.createOrderList().toArray()); + scrollPanel.getViewport().setView(displayList); + + setTotalCount(rcController.getTodaysOrderCnt()); + setTotalSales(rcController.getTotalSales()); + setCancelCount(rcController.getTodaysCancelCnt()); + setCancelTotal(rcController.getCancelTotal()); + } + + public void init() + { + showOrderList(); + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == btnPrint) + { + String createFineName = rcController.generateSalesReport(); + if( createFineName == null) + displayErrorMessage(rcController.getErrorMessage()); + else + displayMessage(createFineName + " have been generated."); + } + else if (ae.getSource() == btnCloseAllOrder) + { + if (showYesNoDialog("", "Are you sure to close all order?") == DIALOG_YES) + { + rcController.closeAllOrder(); + init(); + displayMessage(""); + } + } + } + } + + /**************************************************************** + * Payment panel + *****************************************************************/ + private class PaymentPanel extends JPanel implements ActionListener + { + private JScrollPane scrollPanel; + private JTextArea displayArea; + private JButton btnPrint; + private JButton btnAllClockOut; + + public PaymentPanel() + { + GridBagLayout gbLayout = new GridBagLayout(); + this.setLayout( gbLayout); + GridBagConstraints gbc = new GridBagConstraints(); + + displayArea = new JTextArea(); + displayArea.setFont(new Font(Font.MONOSPACED,Font.PLAIN,16)); + displayArea.setEditable(false); + displayArea.setMargin(new Insets(5, 5, 5, 5)); + scrollPanel = new JScrollPane(displayArea); + gbc.gridx = 0; + gbc.gridy = 0; + gbc.gridwidth = 2; + gbc.weightx = 1.0; + gbc.weighty = 1.0; + gbc.insets = new Insets(5, 5, 5, 5); + gbc.fill = GridBagConstraints.BOTH; + gbLayout.setConstraints(scrollPanel, gbc); + this.add(scrollPanel); + + btnPrint = new JButton("Create payment report file"); + btnPrint.addActionListener(this); + gbc.gridx = 0; + gbc.gridy = 1; + gbc.gridwidth = 1; + gbc.weighty = 0; + gbLayout.setConstraints(btnPrint, gbc); + this.add(btnPrint); + + btnAllClockOut = new JButton("Clock out for all staff"); + btnAllClockOut.addActionListener(this); + gbc.gridx = 1; + gbc.gridy = 1; + gbc.gridwidth = 1; + gbc.weighty = 0; + gbLayout.setConstraints(btnAllClockOut, gbc); + this.add(btnAllClockOut); + } + + + + public void init() + { + displayArea.setText(rcController.createPaymentList()); + } + + public void actionPerformed(ActionEvent ae) { + if (ae.getSource() == btnPrint) + { + String createFineName = rcController.generatePaymentReport(); + if( createFineName == null) + displayErrorMessage(rcController.getErrorMessage()); + else + displayMessage(createFineName + " have been generated."); + } + else if (ae.getSource() == btnAllClockOut) + { + if (showYesNoDialog("", "Are you sure to meke all staff clocked out?") == DIALOG_YES) + { + rcController.clockOutAll(); + init(); + } + } + } + } + /**************************************************************** + * Input validation + *****************************************************************/ + + private class IntegerInputVerifier extends InputVerifier{ + private int state = 0; //0:no range check 1:min check 2:min and max check + private int MAX = 0; + private int MIN = 0; + + public IntegerInputVerifier() + { + super(); + } + + public IntegerInputVerifier(int min) + { + super(); + MIN = min; + state = 1; + } + + public IntegerInputVerifier(int min, int max) + { + super(); + MIN = min; + MAX = max; + state = 2; + } + + @Override public boolean verify(JComponent c) + { + JTextField textField = (JTextField)c; + boolean result = false; + + try + { + int number = Integer.parseInt(textField.getText()); + + switch(state) + { + case 0: + result = true; + case 1: + if( number < MIN) + { + //UIManager.getLookAndFeel().provideErrorFeedback(c); + displayErrorMessage("Minimum input is " + MIN); + textField.setBackground( Color.red ); + result = false; + } + else + { + textField.setBackground( UIManager.getColor( "TextField.background" ) ); + result = true; + } + break; + case 2: + if( number < MIN) + { + displayErrorMessage("Minimum input is " + MIN); + textField.setBackground( Color.red ); + result = false; + } + else + { + if(number > MAX) + { + displayErrorMessage("Maximum input is " + MAX); + textField.setBackground( Color.red ); + result = false; + } + else + { + textField.setBackground( UIManager.getColor( "TextField.background" ) ); + result = true; + } + } + break; + } + }catch(NumberFormatException e) { + displayErrorMessage("Only number is allowed."); + textField.setBackground( Color.red ); + result = false; + } + return result; + } + } + + private class DoubleInputVerifier extends InputVerifier{ + private int state = 0; //0:no range check 1:min check 2:min and max check + private double MAX = 0; + private double MIN = 0; + + public DoubleInputVerifier() + { + super(); + } + + public DoubleInputVerifier(double min) + { + super(); + MIN = min; + state = 1; + } + + public DoubleInputVerifier(double min, double max) + { + super(); + MIN = min; + MAX = max; + state = 2; + } + + @Override public boolean verify(JComponent c) + { + JTextField textField = (JTextField)c; + boolean result = false; + + try + { + double number = Double.parseDouble(textField.getText()); + + switch(state) + { + case 0: + result = true; + case 1: + if( number < MIN) + { + //UIManager.getLookAndFeel().provideErrorFeedback(c); + displayErrorMessage("Minimum input is " + MIN); + textField.setBackground( Color.red ); + result = false; + } + else + { + textField.setBackground( UIManager.getColor( "TextField.background" ) ); + result = true; + } + break; + case 2: + if( number < MIN) + { + displayErrorMessage("Minimum input is " + MIN); + textField.setBackground( Color.red ); + result = false; + } + else + { + if(number > MAX) + { + displayErrorMessage("Maximum input is " + MAX); + textField.setBackground( Color.red ); + result = false; + } + else + { + textField.setBackground( UIManager.getColor( "TextField.background" ) ); + result = true; + } + } + break; + } + }catch(NumberFormatException e) { + displayErrorMessage("Only number is allowed."); + textField.setBackground( Color.red ); + result = false; + } + return result; + } + } +} diff --git a/Restaurant-management-system/dataFiles/manager.txt b/Restaurant-management-system/dataFiles/manager.txt new file mode 100644 index 00000000..b6f75add --- /dev/null +++ b/Restaurant-management-system/dataFiles/manager.txt @@ -0,0 +1,2 @@ +7,password,yugesh,verma +1000,java,Hello,Java diff --git a/Restaurant-management-system/dataFiles/menu_item.txt b/Restaurant-management-system/dataFiles/menu_item.txt new file mode 100644 index 00000000..eacf5568 --- /dev/null +++ b/Restaurant-management-system/dataFiles/menu_item.txt @@ -0,0 +1,13 @@ +101,Pizza,7.0,1 +102,Mushroom pasta,5.95,1 +103,Meatball pasta,6.5,1 +104,Cheese Ravioli,5.95,1 +200,Milk,3.5,2 +201,Coke,3.5,2 +202,Sprite,3.5,2 +203,Tea,4.0,2 +302,Glass wine red,7.0,3 +303,Bottle wine white,30.0,3 +304,Bottle wine red,30.0,3 +401,Tiramisu,6.0,4 +402,Ice cream,5.0,4 diff --git a/Restaurant-management-system/dataFiles/report_2013_07_24.txt b/Restaurant-management-system/dataFiles/report_2013_07_24.txt new file mode 100644 index 00000000..8bf99507 --- /dev/null +++ b/Restaurant-management-system/dataFiles/report_2013_07_24.txt @@ -0,0 +1,6 @@ +*********** Order List (2013_07_24) *********** +Order ID: 1 StaffName:Kazunori Hayashi Total:$35.0 State:1 +Order ID: 2 StaffName:Kazunori Hayashi Total:$1315.0 State:1 +Order ID: 3 StaffName:Kazunori Hayashi Total:$36.0 State:2 +------------------------------------------------------- +Total sales:$1350.0 Canceled:$36.0(1) diff --git a/Restaurant-management-system/dataFiles/report_2013_07_25.txt b/Restaurant-management-system/dataFiles/report_2013_07_25.txt new file mode 100644 index 00000000..9871a6b9 --- /dev/null +++ b/Restaurant-management-system/dataFiles/report_2013_07_25.txt @@ -0,0 +1,5 @@ +*********** Order List (2013_07_25) *********** +Order ID: 1 StaffName:Kazunori Hayashi Total:$93.0 Canceled +Order ID: 2 StaffName:Kazunori Hayashi Total:$35.0 +------------------------------------------------------- +Total sales:$35.0(1) Canceled:$93.0(1) diff --git a/Restaurant-management-system/dataFiles/reports/payment_2013_07_26.txt b/Restaurant-management-system/dataFiles/reports/payment_2013_07_26.txt new file mode 100644 index 00000000..3472c35c --- /dev/null +++ b/Restaurant-management-system/dataFiles/reports/payment_2013_07_26.txt @@ -0,0 +1,6 @@ +*********** Payment List (2013_07_26) *********** +Order ID:1111 StaffName:Tesuton test Work time:5.0 Pay:67.5 +Order ID:1212 StaffName:Toefl Kirai Work time:3.5 Pay:49.0 +Order ID:5555 StaffName:Kazunori Hayashi Work time:5.5 Pay:110.0 +------------------------------------------------------- +Total payment:$226.5(3) diff --git a/Restaurant-management-system/dataFiles/reports/payment_2013_07_29.txt b/Restaurant-management-system/dataFiles/reports/payment_2013_07_29.txt new file mode 100644 index 00000000..0013818f --- /dev/null +++ b/Restaurant-management-system/dataFiles/reports/payment_2013_07_29.txt @@ -0,0 +1,4 @@ +*********** Payment List (2013_07_29) *********** +Order ID:5555 StaffName:Kazunori Hayashi Work time:0.00 Pay:110.00 +------------------------------------------------------- +Total payment:$110.0(1) diff --git a/Restaurant-management-system/dataFiles/reports/payment_2013_08_15.txt b/Restaurant-management-system/dataFiles/reports/payment_2013_08_15.txt new file mode 100644 index 00000000..7023a131 --- /dev/null +++ b/Restaurant-management-system/dataFiles/reports/payment_2013_08_15.txt @@ -0,0 +1,6 @@ +*********** Payment List (2013_08_15) *********** +Order ID:1111 StaffName:Tesuton Testole Work time:0.00 Pay:0.00 +Order ID:1212 StaffName:Toefl Kirai Work time:0.00 Pay:0.00 +Order ID:5555 StaffName:Kazunori Hayashi Work time:0.00 Pay:110.00 +------------------------------------------------------- +Total payment:$110.0(3) diff --git a/Restaurant-management-system/dataFiles/reports/report_2013_07_24.txt b/Restaurant-management-system/dataFiles/reports/report_2013_07_24.txt new file mode 100644 index 00000000..8bf99507 --- /dev/null +++ b/Restaurant-management-system/dataFiles/reports/report_2013_07_24.txt @@ -0,0 +1,6 @@ +*********** Order List (2013_07_24) *********** +Order ID: 1 StaffName:Kazunori Hayashi Total:$35.0 State:1 +Order ID: 2 StaffName:Kazunori Hayashi Total:$1315.0 State:1 +Order ID: 3 StaffName:Kazunori Hayashi Total:$36.0 State:2 +------------------------------------------------------- +Total sales:$1350.0 Canceled:$36.0(1) diff --git a/Restaurant-management-system/dataFiles/reports/report_2013_07_25.txt b/Restaurant-management-system/dataFiles/reports/report_2013_07_25.txt new file mode 100644 index 00000000..9871a6b9 --- /dev/null +++ b/Restaurant-management-system/dataFiles/reports/report_2013_07_25.txt @@ -0,0 +1,5 @@ +*********** Order List (2013_07_25) *********** +Order ID: 1 StaffName:Kazunori Hayashi Total:$93.0 Canceled +Order ID: 2 StaffName:Kazunori Hayashi Total:$35.0 +------------------------------------------------------- +Total sales:$35.0(1) Canceled:$93.0(1) diff --git a/Restaurant-management-system/dataFiles/reports/report_2013_07_26.txt b/Restaurant-management-system/dataFiles/reports/report_2013_07_26.txt new file mode 100644 index 00000000..2d89a630 --- /dev/null +++ b/Restaurant-management-system/dataFiles/reports/report_2013_07_26.txt @@ -0,0 +1,7 @@ +*********** Order List (2013_07_26) *********** +Order ID: 1 StaffName:Tesuton test Total:$28.0 +Order ID: 2 StaffName:Toefl Kirai Total:$30.0 +Order ID: 3 StaffName:Kazunori Hayashi Total:$14.0 +Order ID: 4 StaffName:Kazunori Hayashi Total:$14.0 Canceled +------------------------------------------------------- +Total sales:$72.0(3) Canceled:$14.0(1) diff --git a/Restaurant-management-system/dataFiles/reports/report_2013_07_29.txt b/Restaurant-management-system/dataFiles/reports/report_2013_07_29.txt new file mode 100644 index 00000000..0fb6d0e9 --- /dev/null +++ b/Restaurant-management-system/dataFiles/reports/report_2013_07_29.txt @@ -0,0 +1,3 @@ +*********** Order List (2013_07_29) *********** +------------------------------------------------------- +Total sales:$0.0(0) Canceled:$0.0(0) diff --git a/Restaurant-management-system/dataFiles/reports/report_2013_07_30.txt b/Restaurant-management-system/dataFiles/reports/report_2013_07_30.txt new file mode 100644 index 00000000..8b76f9b4 --- /dev/null +++ b/Restaurant-management-system/dataFiles/reports/report_2013_07_30.txt @@ -0,0 +1,5 @@ +*********** Order List (2013_07_30) *********** +Order ID: 1 StaffName:Kazunori Hayashi Total:$38.85 +Order ID: 2 StaffName:Kazunori Hayashi Total:$19.50 +------------------------------------------------------- +Total sales:$58.35(2) Canceled:$0.0(0) diff --git a/Restaurant-management-system/dataFiles/reports/report_2013_08_15.txt b/Restaurant-management-system/dataFiles/reports/report_2013_08_15.txt new file mode 100644 index 00000000..ecb9dfef --- /dev/null +++ b/Restaurant-management-system/dataFiles/reports/report_2013_08_15.txt @@ -0,0 +1,5 @@ +*********** Order List (2013_08_15) *********** +Order ID: 1 StaffName:Kazunori Hayashi Total:$253.95 +Order ID: 2 StaffName:Kazunori Hayashi Total:$125.40 +------------------------------------------------------- +Total sales:$379.35(2) Canceled:$0.0(0) diff --git a/Restaurant-management-system/dataFiles/staff.txt b/Restaurant-management-system/dataFiles/staff.txt new file mode 100644 index 00000000..715a1272 --- /dev/null +++ b/Restaurant-management-system/dataFiles/staff.txt @@ -0,0 +1,7 @@ +1111,password,Tesuton,Testole +1212,password2,Toefl,Kirai +1234,password3,Davit,Honbey +3333,david,David,Gatta +4321,pass,Isono,Katsuo +4322,test,test,test +4444,hogehoge,Hukitsu,Namae diff --git a/Restaurant-management-system/dataFiles/wage_info.txt b/Restaurant-management-system/dataFiles/wage_info.txt new file mode 100644 index 00000000..7624e508 --- /dev/null +++ b/Restaurant-management-system/dataFiles/wage_info.txt @@ -0,0 +1,9 @@ +7,100.0 +1000,100.0 +1111,13.5 +1212,14.0 +1234,14.25 +3333,13.5 +4321,14.0 +4322,13.5 +4444,14.0 diff --git a/Restaurant-management-system/demo_images/order.jpg b/Restaurant-management-system/demo_images/order.jpg new file mode 100644 index 00000000..f2a4d2b2 Binary files /dev/null and b/Restaurant-management-system/demo_images/order.jpg differ diff --git a/Restaurant-management-system/demo_images/showmenu.png b/Restaurant-management-system/demo_images/showmenu.png new file mode 100644 index 00000000..8e67c242 Binary files /dev/null and b/Restaurant-management-system/demo_images/showmenu.png differ diff --git a/Restaurant-management-system/images/Logo.jpg b/Restaurant-management-system/images/Logo.jpg new file mode 100644 index 00000000..86cf81ea Binary files /dev/null and b/Restaurant-management-system/images/Logo.jpg differ diff --git a/Restaurant-management-system/images/home.jpg b/Restaurant-management-system/images/home.jpg new file mode 100644 index 00000000..6c02675b Binary files /dev/null and b/Restaurant-management-system/images/home.jpg differ diff --git a/Restaurant-management-system/images/home1.jpg b/Restaurant-management-system/images/home1.jpg new file mode 100644 index 00000000..6c02675b Binary files /dev/null and b/Restaurant-management-system/images/home1.jpg differ diff --git a/Restaurant-management-system/images/home2.jpg b/Restaurant-management-system/images/home2.jpg new file mode 100644 index 00000000..10eb77d5 Binary files /dev/null and b/Restaurant-management-system/images/home2.jpg differ diff --git a/Restaurant-management-system/images/home3.jpg b/Restaurant-management-system/images/home3.jpg new file mode 100644 index 00000000..cf50dc32 Binary files /dev/null and b/Restaurant-management-system/images/home3.jpg differ diff --git a/Restaurant-management-system/images/home4.jpg b/Restaurant-management-system/images/home4.jpg new file mode 100644 index 00000000..1a8e47e0 Binary files /dev/null and b/Restaurant-management-system/images/home4.jpg differ diff --git a/Resume Builder/.DS_Store b/Resume Builder/.DS_Store new file mode 100644 index 00000000..9016e4d1 Binary files /dev/null and b/Resume Builder/.DS_Store differ diff --git a/Resume Builder/WebContent/AddAchievement.jsp b/Resume Builder/WebContent/AddAchievement.jsp new file mode 100644 index 00000000..6a5f23b6 --- /dev/null +++ b/Resume Builder/WebContent/AddAchievement.jsp @@ -0,0 +1,27 @@ + +<%@page import="org.pk.resume.builder.session.AchievementSessionConstant"%> +<%@page import="org.pk.resume.builder.beans.Achievements"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<% + String str = request.getParameter("next"); + if(str.equals("Add")) + { + Achievements achieve = new Achievements(); + + achieve.setName(request.getParameter(AchievementSessionConstant.NAME)); + achieve.setTitle(request.getParameter(AchievementSessionConstant.TITLE)); + achieve.setPlace(request.getParameter(AchievementSessionConstant.PLACE)); + achieve.setDate(request.getParameter(AchievementSessionConstant.DATE)); + GlobalConstants.achievements.add(achieve); + response.sendRedirect("Other_Achievement.jsp"); + } + else + { + response.sendRedirect("Project.jsp"); + } + + + %> \ No newline at end of file diff --git a/Resume Builder/WebContent/AddNewEducation.jsp b/Resume Builder/WebContent/AddNewEducation.jsp new file mode 100644 index 00000000..86797bec --- /dev/null +++ b/Resume Builder/WebContent/AddNewEducation.jsp @@ -0,0 +1,32 @@ + +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.pk.resume.builder.beans.Education"%> +<%@page import="org.pk.resume.builder.session.EducationSession"%> +<%@page import="org.pk.resume.builder.dao.UserService"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> + <% + String str = request.getParameter("next"); + if(str.equals("Add")) + { + UserService us = new UserService(); + Education education = new Education(); + education.setCollegeName(request.getParameter(EducationSession.SCHOOL_NAME)); + education.setDegree(request.getParameter(EducationSession.DEGREE)); + education.setSubject(request.getParameter(EducationSession.SUBJECT)); + education.setYear(request.getParameter(EducationSession.YEAR)); + education.setBoard(request.getParameter(EducationSession.BOARD)); + education.setObtainedMarks(request.getParameter(EducationSession.OBTAINED_MARKS)); + education.setTotalMarks(request.getParameter(EducationSession.TOTAL_MARKS)); + education.setPercentage(request.getParameter(EducationSession.PERCENTAGE)); + GlobalConstants.educations.add(education); + response.sendRedirect("EducationalDetails.jsp"); + } + else + { + response.sendRedirect("ExperienceDetails.jsp"); + } + + + %> \ No newline at end of file diff --git a/Resume Builder/WebContent/AddNewExperiences.jsp b/Resume Builder/WebContent/AddNewExperiences.jsp new file mode 100644 index 00000000..ebb51dbd --- /dev/null +++ b/Resume Builder/WebContent/AddNewExperiences.jsp @@ -0,0 +1,31 @@ + +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.pk.resume.builder.session.ExperienceSession"%> +<%@page import="org.pk.resume.builder.beans.Experience"%> +<%@page import="org.pk.resume.builder.dao.UserService"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<% + String str = request.getParameter("next"); + if(str.equals("Add")) + { + Experience experience = new Experience(); + experience.setEmployer(request.getParameter(ExperienceSession.EMPLOYER)); + experience.setDesignation(request.getParameter(ExperienceSession.DESIGNATION)); + experience.setJoiningDate(request.getParameter(ExperienceSession.JOININIG_DATE)); + experience.setLeavingDate(request.getParameter(ExperienceSession.LEAVING_DATE)); + experience.setWorking(request.getParameter(ExperienceSession.WORKING)); + experience.setSubjectThaught(request.getParameter(ExperienceSession.SUBJECT_THAUGHT)); + experience.setCourse(request.getParameter(ExperienceSession.COURSE)); + experience.setExperience(request.getParameter(ExperienceSession.EXPERIENCE)); + GlobalConstants.experiences.add(experience); + response.sendRedirect("ExperienceDetails.jsp"); + } + else + { + response.sendRedirect("ParticipationDetails.jsp"); + } + + + %> \ No newline at end of file diff --git a/Resume Builder/WebContent/AddNewParticipation.jsp b/Resume Builder/WebContent/AddNewParticipation.jsp new file mode 100644 index 00000000..da44dc5a --- /dev/null +++ b/Resume Builder/WebContent/AddNewParticipation.jsp @@ -0,0 +1,38 @@ +<%@page import="org.pk.resume.builder.beans.Participation"%> +<%@page import="org.pk.resume.builder.session.ParticipationSessionConstant"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<% + String str = request.getParameter("next"); + if(str.equals("Add")) + { + Participation part = new Participation(); + + part.setId(1); + part.setParticipation(Participation.getParticipation(request + .getParameter(ParticipationSessionConstant.PARTICIPATION))); + part.setStartDate(request + .getParameter(ParticipationSessionConstant.START_DATE)); + part.setEndDate(request + .getParameter(ParticipationSessionConstant.END_DATE)); + part.setSponsores(request + .getParameter(ParticipationSessionConstant.SPONSOR)); + part.setNote(request + .getParameter(ParticipationSessionConstant.NOTE)); + part.setTopic(request + .getParameter(ParticipationSessionConstant.TOPIC)); + part.setPlace(request + .getParameter(ParticipationSessionConstant.PLACE)); + + GlobalConstants.participations.add(part); + response.sendRedirect("ParticipationDetails.jsp"); + } + else + { + response.sendRedirect("Other_Achievement.jsp"); + } + + + %> \ No newline at end of file diff --git a/Resume Builder/WebContent/AddPersonalDetails.jsp b/Resume Builder/WebContent/AddPersonalDetails.jsp new file mode 100644 index 00000000..791ec811 --- /dev/null +++ b/Resume Builder/WebContent/AddPersonalDetails.jsp @@ -0,0 +1,27 @@ +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.pk.resume.builder.session.PersonSession"%> +<%@page import="org.pk.resume.builder.beans.Personal"%> +<% + Personal personal = new Personal(); + personal.setName(request.getParameter(PersonSession.NAME)); + personal.setSurname(request.getParameter(PersonSession.SURNAME)); + personal.setFatherName(request.getParameter(PersonSession.FATHER_NAME)); + personal.setMotherName(request.getParameter(PersonSession.MOTHER_NAME)); + personal.setGender(request.getParameter(PersonSession.GENDER)); + personal.setDob(request.getParameter(PersonSession.DOB)); + personal.setAge(request.getParameter(PersonSession.AGE)); + personal.setNationality(request.getParameter(PersonSession.NATIONALITY)); + personal.setAddress(request.getParameter(PersonSession.ADDRESS)); + personal.setPlace(request.getParameter(PersonSession.PLACE)); + personal.setMobileNo(request.getParameter(PersonSession.CONTACT_NO)); + personal.setMaritalStatus(request.getParameter(PersonSession.MARITAL_STATUS)); + personal.setEmailId(request.getParameter(PersonSession.MAIL)); + personal.setLangaugeProf(request.getParameter(PersonSession.LANGUAGES)); + personal.setCareerObjectives(request.getParameter(PersonSession.CAREER_OBJECTIVES)); + personal.setStrengths(request.getParameter(PersonSession.STRENGTHS)); + personal.setHobbies(request.getParameter(PersonSession.HOBBIES)); + + session.setAttribute(GlobalConstants.PERSONAL_DETAILS, personal); + response.sendRedirect("EducationalDetails.jsp"); + + %> \ No newline at end of file diff --git a/Resume Builder/WebContent/AddProjects.jsp b/Resume Builder/WebContent/AddProjects.jsp new file mode 100644 index 00000000..8c5aa785 --- /dev/null +++ b/Resume Builder/WebContent/AddProjects.jsp @@ -0,0 +1,26 @@ +<%@page import="org.pk.resume.builder.session.ProjectSessionConstant"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.pk.resume.builder.beans.Projects"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<% + String str = request.getParameter("next"); + if(str.equals("Add")) + { + Projects project = new Projects(); + project.setTitte(request.getParameter(ProjectSessionConstant.TITLE)); + project.setGuide(request.getParameter(ProjectSessionConstant.GUIDE)); + project.setFrontEnd(request.getParameter(ProjectSessionConstant.FRONT_END)); + project.setBackEnd(request.getParameter(ProjectSessionConstant.BACK_END)); + project.setInputs(request.getParameter(ProjectSessionConstant.INPUTS)); + project.setOutputs(request.getParameter(ProjectSessionConstant.OUTPUTS)); + project.setDescription(request.getParameter(ProjectSessionConstant.DESCRIPTION)); + GlobalConstants.projects.add(project); + response.sendRedirect("Project.jsp"); + } + else + { + response.sendRedirect("References.jsp"); + } + %> \ No newline at end of file diff --git a/Resume Builder/WebContent/AddReferences.jsp b/Resume Builder/WebContent/AddReferences.jsp new file mode 100644 index 00000000..cad49c1b --- /dev/null +++ b/Resume Builder/WebContent/AddReferences.jsp @@ -0,0 +1,30 @@ +<%@page import="org.pk.resume.builder.session.ReferencesSessionConstant"%> +<%@page import="org.pk.resume.builder.beans.References"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<% + String str = request.getParameter("next"); + if(str.equals("Add")) + { + + References ref = new References(); + + ref.setName(request.getParameter(ReferencesSessionConstant.NAME)); + ref.setDesignation(request.getParameter(ReferencesSessionConstant.DESIGNATION)); + ref.setAffiliation(request.getParameter(ReferencesSessionConstant.AFFILIATION)); + ref.setEmailId(request.getParameter(ReferencesSessionConstant.EMAILID)); + ref.setContactNo(request.getParameter(ReferencesSessionConstant.CONTACTNO)); + + GlobalConstants.references.add(ref); + response.sendRedirect("References.jsp"); + + } + else + { + response.sendRedirect("SaveDetails.jsp"); + } + + + %> \ No newline at end of file diff --git a/Resume Builder/WebContent/EducationalDetails.jsp b/Resume Builder/WebContent/EducationalDetails.jsp new file mode 100644 index 00000000..b765b525 --- /dev/null +++ b/Resume Builder/WebContent/EducationalDetails.jsp @@ -0,0 +1,131 @@ +<%@page import="org.pk.resume.builder.beans.Education"%> +<%@page import="java.util.ArrayList"%> +<%@page import="org.pk.resume.builder.dao.UserService"%> +<%@page import="org.pk.resume.builder.session.EducationSession"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.apache.tomcat.jni.Global"%> +<%@page import="org.pk.resume.builder.session.PersonSession"%> +<%@page import="org.pk.resume.builder.beans.Personal"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<script type="text/javascript"> + $(document).ready(function() { + $("#addEdu").click(function() { + var element = document.getElementById("tblData"); + element.appendChild("<tr></tr>"); + }); + }); +</script> +<title>Home Page Resume Builder</title> +</head> +<body> + <% + UserService us = new UserService(); + ArrayList<Education> educations = GlobalConstants.educations; + %> + + <jsp:include page="Menu.jsp" /> + <fieldset> + <legend> Educational Details </legend> + <table style="text-align: center; width: 100%;" align="center" border="1" + cellspacing="0"> + <tr> + <th>Sr No</th> + <th>School/College Name</th> + <th>Degree</th> + <th>Subject</th> + <th>Year</th> + <th>Board/ University</th> + <th>Obtained Marks</th> + <th>Total Marks</th> + <th>%</th> + </tr> + + <% + if(educations != null && !educations.isEmpty()) + { + for(int i=0; i<educations.size();i++) + { + Education ed = educations.get(i); + %> + <tr> + <td><%=i+1%></td> + <td><%=ed.getCollegeName()%></td> + <td><%=ed.getDegree()%></td> + <td><%=ed.getSubject()%></td> + <td><%=ed.getYear()%></td> + <td><%=ed.getBoard()%></td> + <td><%=ed.getObtainedMarks()%></td> + <td><%=ed.getTotalMarks()%></td> + <td><%=ed.getPercentage()%></td> + </tr> + <% + }} + %> + </table> + <br> + <form action="AddNewEducation.jsp" method="post"> + <table> + + <tr> + <td>School/College Name</td> + <td><input type="text" + name="<%=EducationSession.SCHOOL_NAME%>" + id="<%=EducationSession.SCHOOL_NAME%>" /></td> + </tr> + <tr> + <td>Degree</td> + <td><input type="text" name="<%=EducationSession.DEGREE%>" + id="<%=EducationSession.DEGREE%>" /></td> + </tr> + <tr> + <td>Subject</td> + <td><input type="text" name="<%=EducationSession.SUBJECT%>" + id="<%=EducationSession.SUBJECT%>" /></td> + </tr> + <tr> + <td>Year</td> + <td><input type="text" name="<%=EducationSession.YEAR%>" + id="<%=EducationSession.YEAR%>" /></td> + </tr> + <tr> + <td>Board / University</td> + <td><input type="text" name="<%=EducationSession.BOARD%>" + id="<%=EducationSession.BOARD%>" /></td> + </tr> + <tr> + <td>obtained Marks</td> + <td><input type="text" + name="<%=EducationSession.OBTAINED_MARKS%>" + id="<%=EducationSession.OBTAINED_MARKS%>" /></td> + </tr> + <tr> + <td>Total Marks</td> + <td><input type="text" + name="<%=EducationSession.TOTAL_MARKS%>" + id="<%=EducationSession.TOTAL_MARKS%>" /></td> + </tr> + <tr> + <td>%</td> + <td><input type="text" name="<%=EducationSession.PERCENTAGE%>" + id="<%=EducationSession.PERCENTAGE%>" /></td> + </tr> + + <tr> + <td></td> + <td colspan="2"><input type="submit" value="Add" name="next" /></td> + <td colspan="2"><input type="submit" value="Next" name="next" /></td> + <td></td><td></td><td></td> + <td colspan="2"><input type="reset" value="Reset" /></td> + </tr> + + </table> + </form> + </fieldset> +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/ExperienceDetails.jsp b/Resume Builder/WebContent/ExperienceDetails.jsp new file mode 100644 index 00000000..ed7eae4f --- /dev/null +++ b/Resume Builder/WebContent/ExperienceDetails.jsp @@ -0,0 +1,133 @@ +<%@page import="org.pk.resume.builder.beans.Experience"%> +<%@page import="java.util.ArrayList"%> +<%@page import="org.pk.resume.builder.dao.UserService"%> +<%@page import="org.pk.resume.builder.beans.Education"%> +<%@page import="org.pk.resume.builder.session.ExperienceSession"%> +<%@page import="org.pk.resume.builder.session.EducationSession"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.apache.tomcat.jni.Global"%> +<%@page import="org.pk.resume.builder.session.PersonSession"%> +<%@page import="org.pk.resume.builder.beans.Personal"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<script type="text/javascript"> + $(document).ready(function() { + $("#addEdu").click(function() { + var element = document.getElementById("tblData"); + element.appendChild("<tr></tr>"); + }); + }); +</script> +<title>Home Page Resume Builder</title> +</head> +<body> + <% + UserService us = new UserService(); + ArrayList<Experience> experiences = GlobalConstants.experiences; + %> + <% + /*Education education = new Education(); + education.setCollegeName(request.getParameter(EducationSession.SCHOOL_NAME)); + education.setDegree(request.getParameter(EducationSession.DEGREE)); + education.setSubject(request.getParameter(EducationSession.SUBJECT)); + education.setYear(request.getParameter(EducationSession.YEAR)); + education.setBoard(request.getParameter(EducationSession.BOARD)); + education.setObtainedMarks(request.getParameter(EducationSession.OBTAINED_MARKS)); + education.setTotalMarks(request.getParameter(EducationSession.TOTAL_MARKS)); + education.setPercentage(request.getParameter(EducationSession.PERCENTAGE)); + session.setAttribute(GlobalConstants.EDUCATIONAL_DETAILS, education);*/ + %> + <jsp:include page="Menu.jsp"/> + <fieldset> + <legend> Experience Details </legend> + <table style="text-align: center; width: 100%;" align="center" border="1" cellspacing="0"> + <tr> + <th>Sr No</th> + <th>Employer</th> + <th>Designation</th> + <th>Joining Date</th> + <th>Leaving Date</th> + <th>Working</th> + <th>experience</th> + <th>Subject Taught</th> + <th>Course</th> + </tr> + + <% + if(experiences != null && !experiences.isEmpty()) + { + for(int i=0; i<experiences.size();i++) + { + Experience ex = experiences.get(i); + %> + <tr> + <td><%=i+1%></td> + <td><%=ex.getEmployer()%></td> + <td><%=ex.getDesignation()%></td> + <td><%=ex.getJoiningDate()%></td> + <td><%=ex.getLeavingDate()%></td> + <td><%=ex.getWorking()%></td> + <td><%=ex.getExperience()%></td> + <td><%=ex.getSubjectThaught()%></td> + <td><%=ex.getCourse()%></td> + </tr> + <% + }} + %> + </table> + <br> + <form action="AddNewExperiences.jsp" method="post"> + <table> + <tr> + <td>Employer</td> + <td><input type="text" name="<%=ExperienceSession.EMPLOYER %>" size="32" /></td> + </tr> + <tr> + <td>Designation</td> + <td><input type="text" + name="<%=ExperienceSession.DESIGNATION %>" size="32" /></td> + </tr> + <tr> + <td>Joining Date</td> + <td><input type="text" + name="<%=ExperienceSession.JOININIG_DATE %>" size="32" /></td> + </tr> + <tr> + <td>Leaving Date</td> + <td><input type="text" + name="<%=ExperienceSession.LEAVING_DATE %>" size="32" /></td> + </tr> + <tr> + <td>Working</td> + <td><textarea rows="3" cols="25" + name="<%=ExperienceSession.WORKING %>" ></textarea></td> + </tr> + <tr> + <td>experience</td> + <td><input type="text" + name="<%=ExperienceSession.EXPERIENCE %>" size="32" /></td> + </tr> + <tr> + <td>Subject Taught</td> + <td><textarea rows="3" cols="25" + name="<%=ExperienceSession.SUBJECT_THAUGHT %>"></textarea></td> + </tr> + <tr> + <td>Course</td> + <td><input type="text" name="<%=ExperienceSession.COURSE %>" size="32" /></td> + </tr> + <tr> + <td></td> + <td colspan="2"><input type="submit" value="Add" name="next"/></td> + <td colspan="2"><input type="submit" value="Next" name="next" /></td> + <td></td><td></td><td></td> + <td><input type="reset" value="Reset" /></td> + </tr> + </table> + </form> + </fieldset> +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/HomePage.jsp b/Resume Builder/WebContent/HomePage.jsp new file mode 100644 index 00000000..fcedcae9 --- /dev/null +++ b/Resume Builder/WebContent/HomePage.jsp @@ -0,0 +1,16 @@ +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Resume Builder</title> +</head> +<body> + <center><b><%=GlobalConstants.MESSAGE%></b></center> + <a href="PersonalDetails.jsp" > Fill Resume </a> <br> + <a href="ViewResume.jsp"> Print Resume</a> + +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/META-INF/MANIFEST.MF b/Resume Builder/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/Resume Builder/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/Resume Builder/WebContent/Menu.jsp b/Resume Builder/WebContent/Menu.jsp new file mode 100644 index 00000000..1d152c2c --- /dev/null +++ b/Resume Builder/WebContent/Menu.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> + +| <a href="index.jsp">Home</a> | +<a href="PersonalDetails.jsp">Personal Details</a> | +<a href="EducationalDetails.jsp">Education Details</a> | +<a href="ExperienceDetails.jsp">Experience Details</a> | +<a href="ParticipationDetails.jsp">Participation Details</a> | +<a href="Other_Achievement.jsp">Achievements Details</a> | +<a href="Project.jsp">Project Details</a> | +<a href="References.jsp">Reference Details</a> | diff --git a/Resume Builder/WebContent/Other_Achievement.jsp b/Resume Builder/WebContent/Other_Achievement.jsp new file mode 100644 index 00000000..c87e0efa --- /dev/null +++ b/Resume Builder/WebContent/Other_Achievement.jsp @@ -0,0 +1,88 @@ +<%@page import="org.pk.resume.builder.beans.Achievements"%> +<%@page import="java.util.ArrayList"%> +<%@page import="org.pk.resume.builder.dao.UserService"%> +<%@page + import="org.pk.resume.builder.session.AchievementSessionConstant"%> +<%@page + import="org.pk.resume.builder.session.ExpertActivitySessionConstant"%> +<%@page import="org.pk.resume.builder.beans.ExpertActivities"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + <% + UserService us = new UserService(); + ArrayList<Achievements> achievements = GlobalConstants.achievements; + %> + <jsp:include page="Menu.jsp"/> + <fieldset> + <legend>Achievements</legend> + <table style="text-align: center; width: 100%;" align="center" border="1" cellspacing="0"> + <tr> + <th>Sr No</th> + <th>Name</th> + <th>Title</th> + <th>Place</th> + <th>Date</th> + </tr> + + <% + if(achievements != null && !achievements.isEmpty()) + { + for(int i=0; i<achievements.size();i++) + { + Achievements achieve = achievements.get(i); + %> + <tr> + <td><%=i+1%></td> + <td><%=achieve.getName()%></td> + <td><%=achieve.getTitle()%></td> + <td><%=achieve.getPlace()%></td> + <td><%=achieve.getDate()%></td> + </tr> + <% + }} + %> + </table> + <br> + <form method="post" action="AddAchievement.jsp"> + <table> + <tr> + <td>Name of Achievement</td> + <td><input type="text" + name="<%=AchievementSessionConstant.NAME%>"></td> + </tr> + <tr> + <td>Title</td> + <td><input type="text" name="title"></td> + </tr> + + <tr> + <td>Place of Achievement</td> + <td><input type="text" + name="<%=AchievementSessionConstant.PLACE%>"></td> + </tr> + + <tr> + <td>Date of Achievement</td> + <td><input type="text" + name="<%=AchievementSessionConstant.DATE%>"></td> + </tr> + <tr> + <td></td> + <td colspan="2"><input type="submit" value="Add" name="next"/></td> + <td colspan="2"><input type="submit" value="Next" name="next" /></td> + <td></td><td></td><td></td> + <td><input type="reset" value="Reset" /></td> + </tr> + </table> + </form> + </fieldset> +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/ParticipationDetails.jsp b/Resume Builder/WebContent/ParticipationDetails.jsp new file mode 100644 index 00000000..036120ff --- /dev/null +++ b/Resume Builder/WebContent/ParticipationDetails.jsp @@ -0,0 +1,116 @@ +<%@page import="java.util.ArrayList"%> +<%@page import="org.pk.resume.builder.dao.UserService"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.pk.resume.builder.session.BookSessionConstant"%> +<%@page import="org.pk.resume.builder.beans.Book"%> +<%@page import="org.pk.resume.builder.session.ParticipationSessionConstant"%> +<%@page import="org.pk.resume.builder.beans.Participation.ParticipationName"%> +<%@page import="org.pk.resume.builder.beans.Participation"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Add Participation</title> +</head> +<body> + <% + UserService us = new UserService(); + ArrayList<Participation> part = GlobalConstants.participations; + %> + <jsp:include page="Menu.jsp"/> + <fieldset> + <legend>Participation Details</legend> + <table style="text-align: center; width: 100%;" align="center" border="1" cellspacing="0"> + <tr> + <th>Sr No</th> + <th>Name</th> + <th>Start Date</th> + <th>Ending Date</th> + <th>Sponsors</th> + <th>Topic</th> + <th>Note</th> + <th>Place</th> + </tr> + + <% + if(part != null && !part.isEmpty()) + { + for(int i=0; i<part.size();i++) + { + Participation parts = part.get(i); + %> + <tr> + <td><%=i+1%></td> + <td><%=parts.getParticipation()%></td> + <td><%=parts.getStartDate()%></td> + <td><%=parts.getEndDate()%></td> + <td><%=parts.getSponsores()%></td> + <td><%=parts.getTopic()%></td> + <td><%=parts.getNote()%></td> + <td><%=parts.getPlace()%></td> + </tr> + <% + }} + %> + </table> + <br> + <form method="post" action="AddNewParticipation.jsp"> + <table> + <tr> + <td>Name of Participation :-</td> + <td><select + name="<%=ParticipationSessionConstant.PARTICIPATION%>"> + <% + for(Participation.ParticipationName p : ParticipationName.values()){ + %> + <option value="<%=p.name()%>"> + <%=p.name()%> + </option> + <% + } + %> + </select></td> + </tr> + <tr> + <td>Duration :-</td> + <td><input type="text" + name="<%=ParticipationSessionConstant.START_DATE%>"></td> + <td>To</td> + <td><input type="text" + name="<%=ParticipationSessionConstant.END_DATE%>"></td> + </tr> + <tr> + <td>Sponsored by :-</td> + <td><input type="text" + name="<%=ParticipationSessionConstant.SPONSOR%>"></td> + </tr> + <tr> + <td>Note :-</td> + <td><textarea name="<%=ParticipationSessionConstant.NOTE%>"></textarea> + </td> + </tr> + <tr> + <td>Topic :-</td> + <td><input type="text" + name="<%=ParticipationSessionConstant.TOPIC%>"></td> + </tr> + <tr> + <td>Place :-</td> + <td><input type="text" + name="<%=ParticipationSessionConstant.PLACE%>"></td> + </tr> + <tr> + <td></td> + <td colspan="2"><input type="submit" value="Add" name="next"/></td> + <td colspan="2"><input type="submit" value="Next" name="next" /></td> + <td></td><td></td><td></td> + <td><input type="reset" value="Reset" /></td> + </tr> + </table> + </form> + </fieldset> + +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/PersonalDetails.jsp b/Resume Builder/WebContent/PersonalDetails.jsp new file mode 100644 index 00000000..d388bdec --- /dev/null +++ b/Resume Builder/WebContent/PersonalDetails.jsp @@ -0,0 +1,139 @@ +<%@page import="org.pk.resume.builder.session.PersonSession"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<link rel="stylesheet" type="text/css" href="TextBox.css" /> + +<title>*Personal Details* - Resume Builder</title> +</head> +<body> + <jsp:include page="Menu.jsp" /> + <fieldset> + <legend align="center"><b>**Personal Details**</b> </legend> + <!-- <form action="control?action=personal" method="post"> --> + <form action="EducationalDetails.jsp" method="post"> + <table cellspacing="30px"> + <tr> + <td>Full Name</td> + <td><input type="text" name="<%=PersonSession.NAME%>" + id="<%=PersonSession.NAME%>" class="textbox" + placeholder="Name" /></td> + + <td><input type="text" name="<%=PersonSession.SURNAME%>" + id="<%=PersonSession.SURNAME%>" class="textbox" + placeholder="Surname" /></td> + </tr> + <tr> + <td>Parent's Info.</td> + <td><input type="text" name="<%=PersonSession.FATHER_NAME%>" + id="<%=PersonSession.FATHER_NAME%>" class="textbox" + placeholder="Father's Name" /></td> + + <td><input type="text" name="<%=PersonSession.MOTHER_NAME%>" + id="<%=PersonSession.MOTHER_NAME%>" class="textbox" + placeholder="Mother's Name" /></td> + </tr> + + <tr> + <td>D.O.B. </td> + <td><input type="text" name="<%=PersonSession.DOB%>" + id="<%=PersonSession.DOB%>" class="textbox2" + placeholder="dd/mm/yyyy" /></td> + + <td><input type="text" name="<%=PersonSession.AGE%>" + id="<%=PersonSession.AGE%>" class="textbox" placeholder="Age" /></td> + </tr> + + <tr> + <td>Gender</td> + + <td><select name="<%=PersonSession.GENDER%>" + id="<%=PersonSession.GENDER%>" class="selectbx"> + <option>-- select --</option> + <option value="MALE">MALE</option> + <option value="FEMALE">FEMALE</option> + </select> Marital Status :- </td> + + <td><select + name="<%=PersonSession.MARITAL_STATUS%>" + id="<%=PersonSession.MARITAL_STATUS%>" class="selectbx" title=""Marital Status"> + <option>-- select --</option> + <option value="MARRIED">MARRIED</option> + <option value="UNMARRIED">UNMARRIED</option> + </select></td> + </tr> + + <tr> + <td>Contact</td> + + <td><input type="text" name="<%=PersonSession.CONTACT_NO%>" + id="<%=PersonSession.CONTACT_NO%>" class="textbox" + placeholder="+00-0000000000" /></td> + + <td><input type="text" name="<%=PersonSession.MAIL%>" + id="<%=PersonSession.MAIL%>" class="textbox" + placeholder="Mail-ID - {xyz@gmail.com}" /></td> + <td></td> + </tr> + + <tr> + <td>Languages known</td> + + <td><input type="text" name="<%=PersonSession.LANGUAGES%>" + id="<%=PersonSession.LANGUAGES%>" class="textbox" /></td> + + <td><input type="text" + name="<%=PersonSession.NATIONALITY%>" + id="<%=PersonSession.NATIONALITY%>" class="textbox" placeholder="Nationality {INDIAN}" /></td> + </tr> + + <tr> + <td>Address</td> + + <td><textarea class="textarea" + name="<%=PersonSession.ADDRESS%>" id="<%=PersonSession.ADDRESS%>"></textarea></td> + + <td><input type="text" name="<%=PersonSession.PLACE%>" + id="<%=PersonSession.PLACE%>" class="textbox" + placeholder="Place" /></td> + + </tr> + + <tr> + <td>Career Objectives</td> + + <td><textarea class="textarea" + name="<%=PersonSession.CAREER_OBJECTIVES%>" + id="<%=PersonSession.CAREER_OBJECTIVES%>"></textarea></td> + </tr> + <tr> + <td>My Strengths</td> + <td><textarea class="textarea" + name="<%=PersonSession.STRENGTHS%>" + id="<%=PersonSession.STRENGTHS%>"></textarea></td> + <td></td> + </tr> + + <tr> + <td>Hobbies</td> + <td><textarea class="textarea" + name="<%=PersonSession.HOBBIES%>" id="<%=PersonSession.HOBBIES%>"></textarea></td> + <td></td> + <td></td> + + </tr> + <tr> + + <td colspan="2"> + <center><input type="submit" value="Next" class="button" /></center></td> + <td><input type="reset" value="Reset" class="button" /></td> + + </tr> + + </table> + </form> + </fieldset> +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/Project.jsp b/Resume Builder/WebContent/Project.jsp new file mode 100644 index 00000000..dd47d746 --- /dev/null +++ b/Resume Builder/WebContent/Project.jsp @@ -0,0 +1,108 @@ +<%@page import="org.pk.resume.builder.beans.Projects"%> +<%@page import="java.util.ArrayList"%> +<%@page import="org.pk.resume.builder.dao.UserService"%> +<%@page import="org.pk.resume.builder.session.ProjectSessionConstant"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page + import="org.pk.resume.builder.session.AchievementSessionConstant"%> +<%@page import="org.pk.resume.builder.beans.Achievements"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + <% + UserService us = new UserService(); + ArrayList<Projects> projects = GlobalConstants.projects; + %> + <jsp:include page="Menu.jsp"/> + <fieldset> + <legend>Achievements</legend> + <table style="text-align: center; width: 100%;" align="center" border="1" cellspacing="0"> + <tr> + <th>Sr No</th> + <th>Title</th> + <th>Front End</th> + <th>Back End</th> + <th>Inputs</th> + <th>Outputs</th> + <th>Description</th> + </tr> + + <% + if(projects != null && !projects.isEmpty()) + { + for(int i=0; i<projects.size();i++) + { + Projects project = projects.get(i); + %> + <tr> + <td><%=i+1%></td> + <td><%=project.getTitte()%></td> + <td><%=project.getFrontEnd()%></td> + <td><%=project.getBackEnd() %></td> + <td><%=project.getInputs()%></td> + <td><%=project.getOutputs()%></td> + <td><%=project.getDescription()%></td> + </tr> + <% + }} + %> + </table> + <br> + + <form method="post" action="AddProjects.jsp"> + <table> + <tr> + <td>Title of Project</td> + <td><input type="text" name="<%=ProjectSessionConstant.TITLE%>"></td> + </tr> + <tr> + <td>Guide of Project</td> + <td><input type="text" + name="<%=ProjectSessionConstant.GUIDE%>"></td> + </tr> + + <tr> + <td>Front End</td> + <td><input type="text" + name="<%=ProjectSessionConstant.FRONT_END%>"></td> + </tr> + + <tr> + <td>Back End</td> + <td><input type="text" + name="<%=ProjectSessionConstant.BACK_END%>"></td> + </tr> + + <tr> + <td>Input</td> + <td><input type="text" + name="<%=ProjectSessionConstant.INPUTS%>"></td> + </tr> + <tr> + <td>Output</td> + <td><input type="text" + name="<%=ProjectSessionConstant.OUTPUTS%>"></td> + </tr> + <tr> + <td>Description</td> + <td><input type="text" + name="<%=ProjectSessionConstant.DESCRIPTION%>"></td> + </tr> + <tr> + <td></td> + <td colspan="2"><input type="submit" value="Add" name="next"/></td> + <td colspan="2"><input type="submit" value="Next" name="next" /></td> + <td></td><td></td><td></td> + <td><input type="reset" value="Reset" /></td> + </tr> + </table> + </form> + </fieldset> +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/References.jsp b/Resume Builder/WebContent/References.jsp new file mode 100644 index 00000000..c5e2cc38 --- /dev/null +++ b/Resume Builder/WebContent/References.jsp @@ -0,0 +1,96 @@ +<%@page import="org.pk.resume.builder.beans.References"%> +<%@page import="java.util.ArrayList"%> +<%@page import="org.pk.resume.builder.dao.UserService"%> +<%@page import="org.pk.resume.builder.session.ReferencesSessionConstant"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.pk.resume.builder.session.ProjectSessionConstant"%> +<%@page import="org.pk.resume.builder.beans.Projects"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + <% + UserService us = new UserService(); + ArrayList<References> refers = GlobalConstants.references; + %> + <jsp:include page="Menu.jsp"/> + <fieldset> + <legend>Achievements</legend> + <table style="text-align: center; width: 100%;" align="center" border="1" cellspacing="0"> + <tr> + <th>Sr No</th> + <th>Name</th> + <th>Designation</th> + <th>Affiliation</th> + <th>Contact NO</th> + <th>Email-ID</th> + </tr> + + <% + if(refers != null && !refers.isEmpty()) + { + for(int i=0; i<refers.size();i++) + { + References refs = refers.get(i); + %> + <tr> + <td><%=i+1%></td> + <td><%=refs.getName()%></td> + <td><%=refs.getDesignation()%></td> + <td><%=refs.getAffiliation()%></td> + <td><%=refs.getContactNo()%></td> + <td><%=refs.getEmailId()%></td> + </tr> + <% + }} + %> + </table> + <br> + + <form method="post" action="AddReferences.jsp"> + <table> + <tr> + <td>Name of Reference</td> + <td><input type="text" + name="<%=ReferencesSessionConstant.NAME%>"></td> + </tr> + <tr> + <td>Designation</td> + <td><input type="text" + name="<%=ReferencesSessionConstant.DESIGNATION%>"></td> + </tr> + + <tr> + <td>Affiliation</td> + <td><input type="text" + name="<%=ReferencesSessionConstant.AFFILIATION%>"></td> + </tr> + + <tr> + <td>Email</td> + <td><input type="text" + name="<%=ReferencesSessionConstant.EMAILID%>"></td> + </tr> + <tr> + <td>Contact No.</td> + <td><input type="text" + name="<%=ReferencesSessionConstant.CONTACTNO%>"></td> + </tr> + <tr> + <td></td> + <td colspan="2"><input type="submit" value="Add" name="next"/></td> + <td colspan="2"><input type="submit" value="Next" name="next" /></td> + <td></td><td></td><td></td> + <td><input type="reset" value="Reset" /></td> + </tr> + + </table> + </form> + </fieldset> +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/SaveDetails.jsp b/Resume Builder/WebContent/SaveDetails.jsp new file mode 100644 index 00000000..5f1e7bab --- /dev/null +++ b/Resume Builder/WebContent/SaveDetails.jsp @@ -0,0 +1,51 @@ +<%@page import="java.util.ArrayList"%> +<%@page import="org.pk.resume.builder.beans.References"%> +<%@page import="org.pk.resume.builder.beans.Projects"%> +<%@page import="org.pk.resume.builder.beans.Achievements"%> +<%@page import="org.pk.resume.builder.beans.ExpertActivities"%> +<%@page import="org.pk.resume.builder.beans.Membership"%> +<%@page import="org.pk.resume.builder.beans.Participation"%> +<%@page import="org.pk.resume.builder.beans.Book"%> +<%@page import="org.pk.resume.builder.beans.Conference"%> +<%@page import="org.pk.resume.builder.beans.Journal"%> +<%@page import="org.pk.resume.builder.beans.Experience"%> +<%@page import="org.pk.resume.builder.beans.Education"%> +<%@page import="org.pk.resume.builder.beans.Personal"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.pk.resume.builder.dao.UserService"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> +<% + UserService us = new UserService(); + Personal personal = (Personal) session.getAttribute(GlobalConstants.PERSONAL_DETAILS); + ArrayList<Education> education = GlobalConstants.educations; + ArrayList<Experience> experience = GlobalConstants.experiences; + ArrayList<Participation> part = GlobalConstants.participations; + ArrayList<Achievements> achieve = GlobalConstants.achievements; + ArrayList<Projects> project = GlobalConstants.projects; + ArrayList<References> ref = GlobalConstants.references; + try { + us.insertPersonalDetails(personal); + us.insertEducationalDetails(education); + us.insertExperiences(experience); + us.inserParticipation(part); + us.insertAchievement(achieve); + us.insertProject(project); + us.insertReference(ref); + GlobalConstants.MESSAGE = "Saved Successfully... Click 'Print Resume' to View Preview & Print"; + } catch(Exception ex) { + out.println("Error in Insertion = "+ex); + ex.printStackTrace(); + GlobalConstants.MESSAGE = "Error - "+ex+"... Try Again..."; + } + response.sendRedirect("HomePage.jsp"); +%> +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/TextBox.css b/Resume Builder/WebContent/TextBox.css new file mode 100644 index 00000000..519b00ec --- /dev/null +++ b/Resume Builder/WebContent/TextBox.css @@ -0,0 +1,97 @@ + + .textbox{ + height: 25px; + border:1px solid gray; + -webkit-border-radius:5px; + -moz-border-radius:5px; + border-radius:5px; + outline:0; + width: 300px; + + } + .textbox:hover + { + border-color: cyan; + } + + .textbox2{ + height: 25px; + border:1px solid gray; + -webkit-border-radius:5px; + -moz-border-radius:5px; + border-radius:5px; + outline:0; + width: 235px; + } + .textbox2:hover + { + border-color: cyan; + } + + .textbox3{ + height: 25px; + border:1px solid gray; + -webkit-border-radius:5px; + -moz-border-radius:5px; + border-radius:5px; + outline:0; + width: 190px; + } + .textbox3:hover + { + border-color: cyan; + } + + .textarea{ + height: 50px; + border:1px solid #848484; + -webkit-border-radius:5px; + -moz-border-radius:5px; + border-radius:5px; + outline:0; + width: 300px; + } + .textarea:hover + { + border-color: orange; + } + + .button{ + height: 25px; + border:1px solid black; + -webkit-border-radius:10px; + -moz-border-radius:10px; + border-radius:10px; + outline:1; + width: 100px; + background-color: gray; + color:black; + font-size: medium; + border-bottom-color:black; + border-bottom-width:medium; + border-right-color: black; + border-right-width:medium; + } + .button:hover + { + border-color: red; + } + + .selectbx{ + height: 30px; + border:1px solid gray; + -webkit-border-radius:5px; + -moz-border-radius:5px; + border-radius:5px; + outline:0; + width: 200px; + } + .selectbx:hover + { + border-color: magenta; + } + + .border{ + border-width:medium; + border-color:silver; + } \ No newline at end of file diff --git a/Resume Builder/WebContent/ViewPreview.jsp b/Resume Builder/WebContent/ViewPreview.jsp new file mode 100644 index 00000000..96e96aec --- /dev/null +++ b/Resume Builder/WebContent/ViewPreview.jsp @@ -0,0 +1,498 @@ +<%@page import="org.pk.resume.builder.beans.Personal"%> +<%@page import="org.pk.resume.builder.beans.Education"%> +<%@page import="org.pk.resume.builder.beans.Experience"%> +<%@page import="org.pk.resume.builder.beans.Conference"%> +<%@page import="org.pk.resume.builder.beans.Journal"%> +<%@page import="org.pk.resume.builder.beans.Book"%> +<%@page import="org.pk.resume.builder.beans.Participation"%> +<%@page import="org.pk.resume.builder.beans.Membership"%> +<%@page import="org.pk.resume.builder.beans.ExpertActivities"%> +<%@page import="org.pk.resume.builder.beans.Achievements"%> +<%@page import="org.pk.resume.builder.beans.Projects"%> +<%@page import="org.pk.resume.builder.beans.References"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.pk.resume.builder.session.ReferencesSessionConstant"%> +<%@page import="org.apache.tomcat.jni.Global"%> + +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + +<head> + +<script type="text/javascript"> + $(document).ready(function() { + $("#addEdu").click(function() { + var element = document.getElementById("tblData"); + element.appendChild("<tr></tr>"); + }); + }); +</script> + +<title>Home Page Resume Builder</title> + +</head> +<body> + + <% + References ref = new References(); + + ref.setName(request.getParameter(ReferencesSessionConstant.NAME)); + ref.setDesignation(request + .getParameter(ReferencesSessionConstant.DESIGNATION)); + ref.setAffiliation(request + .getParameter(ReferencesSessionConstant.AFFILIATION)); + ref.setEmailId(request + .getParameter(ReferencesSessionConstant.EMAILID)); + ref.setContactNo(request + .getParameter(ReferencesSessionConstant.CONTACTNO)); + + session.setAttribute(GlobalConstants.REFERENCES_DETAILS, ref); + + Personal personal = (Personal) session + .getAttribute(GlobalConstants.PERSONAL_DETAILS); + Education education = (Education) session + .getAttribute(GlobalConstants.EDUCATIONAL_DETAILS); + Experience experience = (Experience) session + .getAttribute(GlobalConstants.EXPERIENCE_DETAILS); + Journal journal = (Journal) session + .getAttribute(GlobalConstants.JOURNAL_DETAILS); + Conference conference = (Conference) session + .getAttribute(GlobalConstants.CONFERENCE_DETAILS); + Book book = (Book) session + .getAttribute(GlobalConstants.BOOK_DETAILS); + Participation part = (Participation) session + .getAttribute(GlobalConstants.PARTICIPATION_DETAILS); + Membership member = (Membership) session + .getAttribute(GlobalConstants.MEMBERSHIP_DETAILS); + ExpertActivities expAct = (ExpertActivities) session + .getAttribute(GlobalConstants.EXPERT_ACTIVITY); + Achievements achieve = (Achievements) session + .getAttribute(GlobalConstants.ACHIEVEMENTS_DETAILS); + Projects project = (Projects) session + .getAttribute(GlobalConstants.PROJRCT_DETAILS); + ref = (References) session + .getAttribute(GlobalConstants.REFERENCES_DETAILS); + %> + + <form action="SaveDetails.jsp" method="post"> + + <fieldset> + <legend align="center">*Personal Details*</legend> + <table align="center" cellspacing="0"> + <tr> + <td>Name</td> + <td> -: <%=personal.getName()%></td> + </tr> + <tr> + <td>Father Name</td> + <td> -: <%=personal.getFatherName()%></td> + </tr> + <tr> + <td>Gender</td> + <td> -: <%=personal.getGender()%></td> + </tr> + <tr> + <td>DOB</td> + <td> -: <%=personal.getDob()%></td> + </tr> + <tr> + <td>Age</td> + <td> -: <%=personal.getAge()%></td> + </tr> + <tr> + <td>Address</td> + <td> -: <%=personal.getAddress()%></td> + </tr> + <tr> + <td>Contact</td> + <td> -: <%=personal.getMobileNo()%></td> + </tr> + <tr> + <td>Marital Status</td> + <td> -: <%=personal.getMaritalStatus()%></td> + </tr> + <tr> + <td>Mail</td> + <td> -: <%=personal.getEmailId()%></td> + </tr> + <tr> + <td>Languages known</td> + <td> -: <%=personal.getLangaugeProf()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*Educational Details*</legend> + <table border="1" align="center" cellspacing="0"> + <tr> + <th>SR No</th> + <th>School/College Name</th> + <th>Degree</th> + <th>Subject</th> + <th>Year</th> + <th>Board / University</th> + <th>obtained Marks</th> + <th>Total Marks</th> + <th>%</th> + </tr> + <tr> + <td>1</td> + <td><%=education.getCollegeName()%></td> + <td><%=education.getDegree()%></td> + <td><%=education.getSubject()%></td> + <td><%=education.getYear()%></td> + <td><%=education.getBoard()%></td> + <td><%=education.getObtainedMarks()%></td> + <td><%=education.getTotalMarks()%></td> + <td><%=education.getPercentage()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*Experience Details*</legend> + <table align="center" border="1" cellspacing="0"> + <tr> + <td>Employer</td> + <td> -: <%=experience.getEmployer()%></td> + </tr> + <tr> + <td>Designation</td> + <td> -: <%=experience.getDesignation()%></td> + </tr> + <tr> + <td>Joining Date</td> + <td> -: <%=experience.getJoiningDate()%></td> + </tr> + <tr> + <td>Leaving Date</td> + <td> -:<%=experience.getLeavingDate()%></td> + </tr> + <tr> + <td>Working</td> + <td> -: <%=experience.getWorking()%></td> + </tr> + <tr> + <td>experience</td> + <td> -: <%=experience.getExperience()%></td> + </tr> + <tr> + <td>Subject Taught</td> + <td> -: <%=experience.getSubjectThaught()%></td> + </tr> + <tr> + <td>Course</td> + <td> -: <%=experience.getCourse()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*Journal details*</legend> + <table align="center" border="1" cellspacing="0"> + <tr> + <td>Type Of Journal</td> + <td> -: <%=journal.getPublicationType()%></td> + </tr> + <tr> + <td>Name Of Journal</td> + <td> -: <%=journal.getName()%></td> + </tr> + <tr> + <td>Paper Title</td> + <td> -: <%=journal.getPaperTitle()%></td> + </tr> + <tr> + <td>Author/Author's</td> + <td> -: <%=journal.getAuthor()%></td> + </tr> + <tr> + <td>Date of Publication</td> + <td> -: <%=journal.getPublicationDate()%></td> + </tr> + <tr> + <td>Place</td> + <td> -: <%=journal.getPlace()%></td> + </tr> + <tr> + <td>Volume/Issue</td> + <td> -:<%=journal.getVolume()%></td> + </tr> + <tr> + <td>Page No.</td> + <td> -: <%=journal.getPageNo()%></td> + </tr> + <tr> + <td>DOI No.</td> + <td> -: <%=journal.getDoiNo()%></td> + </tr> + <tr> + <td>Link/URLs</td> + <td> -:<%=journal.getLink()%></td> + </tr> + <tr> + <td>Impact Factors</td> + <td> -: <%=journal.getImpactFactor()%></td> + </tr> + <tr> + <td>Type of Impact</td> + <td> -: <%=journal.getImpactType()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*Conference detail*</legend> + <table align="center" border="1" cellspacing="0"> + <tr> + <td>Type Of Conference</td> + <td> -: <%=conference.getPublicationType()%></td> + </tr> + <tr> + <td>Name of Conference</td> + <td> -: <%=conference.getName()%></td> + </tr> + + <tr> + <td>Paper Title</td> + <td> -: <%=conference.getPaperTitle()%></td> + </tr> + <tr> + <td>Author/Author's</td> + <td> -: <%=conference.getAuthor()%></td> + </tr> + <tr> + <td>Date of Publication</td> + <td> -: <%=conference.getPublicationDate()%></td> + </tr> + <tr> + <td>Place</td> + <td> -: <%=conference.getPlace()%></td> + </tr> + <tr> + <td>Page No</td> + <td> -: <%=conference.getPageNo()%></td> + </tr> + <tr> + <td>DOI No</td> + <td> -: <%=conference.getDoiNo()%></td> + </tr> + <tr> + <td>Link/URLs</td> + <td> -: <%=conference.getLink()%></td> + </tr> + <tr> + <td>Impact Factors</td> + <td> -: <%=conference.getImpactFactor()%></td> + </tr> + <tr> + <td>Type of Impact</td> + <td> -: <%=conference.getImpactType()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*Book details*</legend> + <table align="center" border="1" cellspacing="0"> + <tr> + <td>Book Name</td> + <td> -: <%=book.getBook_title()%></td> + </tr> + <tr> + <td>Author</td> + <td> -: <%=book.getAuthor()%></td> + </tr> + <tr> + <td>Publisher</td> + <td> -: <%=book.getPublisher()%></td> + </tr> + <tr> + <td>ISBN No</td> + <td> -: <%=book.getIsbn_no()%></td> + </tr> + <tr> + <td>Publication Date</td> + <td> -: <%=book.getPublication_date()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*Participation Detail*</legend> + <table align="center" border="1" cellspacing="0"> + <tr> + <td>Name of Participation</td> + <td> -: <%=part.getParticipation()%></td> + </tr> + <tr> + <td>Duration</td> + <td> -: <%=part.getStartDate()%> to <%=part.getEndDate()%></td> + + </tr> + <tr> + <td>Sponsored by</td> + <td> -: <%=part.getSponsores()%></td> + </tr> + <tr> + <td>Note</td> + <td> -: <%=part.getNote()%></td> + </tr> + <tr> + <td>Topic</td> + <td> -: <%=part.getTopic()%></td> + </tr> + <tr> + <td>Place</td> + <td> -: <%=part.getPlace()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*Membership Detail*</legend> + <table align="center" border="1" cellspacing="0"> + <tr> + <th>Sr. no.</th> + <th>Professional Body Name</th> + <th>Place</th> + <th>Joining</th> + <th>Membership Type</th> + <th>Membership NO</th> + </tr> + <tr> + <td>1</td> + <td><%=member.getProfessionalBodyName()%></td> + <td><%=member.getPlace()%></td> + <td><%=member.getJoiningYear()%></td> + <td><%=member.getMembershipType()%></td> + <td><%=member.getMembershipNo()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*Expert Role detail*</legend> + <table align="center" border="1" cellspacing="0"> + <tr> + <td>Expert Role</td> + <td> -: <%=expAct.getExportRole()%></td> + </tr> + <tr> + <td>Level</td> + <td> -: <%=expAct.getLevel()%></td> + </tr> + <tr> + <td>Activity Type</td> + <td> -: <%=expAct.getActivityType()%></td> + </tr> + <tr> + <td>Place</td> + <td> -: <%=expAct.getPlace()%></td> + </tr> + <tr> + <td>ISBN No</td> + <td> -: <%=expAct.getIsbnNo()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*Achievement detail*</legend> + <table align="center" border="1" cellspacing="0"> + <tr> + <td>Name of Achievement</td> + <td> -: <%=achieve.getName()%></td> + </tr> + <tr> + <td>Title</td> + <td> -: <%=achieve.getTitle()%></td> + </tr> + + <tr> + <td>Place of Achievement</td> + <td> -: <%=achieve.getPlace()%></td> + </tr> + + <tr> + <td>Date of Achievement</td> + <td> -: <%=achieve.getDate()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*Projects detail*</legend> + <table align="center" border="1" cellspacing="0"> + <tr> + <td>Title of Project</td> + <td> -: <%=project.getTitte()%></td> + </tr> + <tr> + <td>Guide of Project</td> + <td> -: <%=project.getGuide()%></td> + </tr> + + <tr> + <td>Front End</td> + <td> -: <%=project.getFrontEnd()%></td> + </tr> + + <tr> + <td>Input</td> + <td> -: <%=project.getInputs()%></td> + </tr> + <tr> + <td>Output</td> + <td> -: <%=project.getOutputs()%></td> + </tr> + <tr> + <td>Description</td> + <td> -: <%=project.getDescription()%></td> + </tr> + </table> + </fieldset> + + <fieldset> + <legend align="center">*References*</legend> + <table align="center" border="1"cellspacing="0"> + <tr> + <td>Name of Reference</td> + <td> -: <%=ref.getName()%></td> + </tr> + <tr> + <td>Designation</td> + <td> -: <%=ref.getDesignation()%></td> + </tr> + + <tr> + <td>Affiliation</td> + <td> -: <%=ref.getAffiliation()%></td> + </tr> + + <tr> + <td>Email</td> + <td> -: <%=ref.getEmailId()%></td> + </tr> + <tr> + <td>Contact No</td> + <td> -: <%=ref.getContactNo()%></td> + </tr> + + </table> + </fieldset> + + <fieldset> + <table align="center"> + <tr> + <td><input type="submit" name="save" value="Save"></td> + </tr> + </table> + </fieldset> + + </form> +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/ViewResume.jsp b/Resume Builder/WebContent/ViewResume.jsp new file mode 100644 index 00000000..a7c5a600 --- /dev/null +++ b/Resume Builder/WebContent/ViewResume.jsp @@ -0,0 +1,342 @@ +<%@page import="org.pk.resume.builder.beans.References"%> +<%@page import="org.pk.resume.builder.beans.Projects"%> +<%@page import="org.pk.resume.builder.beans.Achievements"%> +<%@page import="org.pk.resume.builder.beans.ExpertActivities"%> +<%@page import="org.pk.resume.builder.beans.Membership"%> +<%@page import="org.pk.resume.builder.beans.Participation"%> +<%@page import="org.pk.resume.builder.beans.Book"%> +<%@page import="org.pk.resume.builder.beans.Conference"%> +<%@page import="org.pk.resume.builder.beans.Journal"%> +<%@page import="java.util.ArrayList"%> +<%@page import="org.pk.resume.builder.dao.UserService"%> +<%@page import="org.pk.resume.builder.session.ExperienceSession"%> +<%@page import="org.pk.resume.builder.beans.Experience"%> +<%@page import="org.pk.resume.builder.session.EducationSession"%> +<%@page import="org.pk.resume.builder.beans.Education"%> +<%@page import="org.pk.resume.builder.constants.GlobalConstants"%> +<%@page import="org.apache.tomcat.jni.Global"%> +<%@page import="org.pk.resume.builder.beans.Personal"%> +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<title>*Preview and Prints* - Resume Builder</title> +</head> +<body bgcolor="lightgray"> + + <% + UserService us = new UserService(); + + Personal personal = us.getPersonalDetails(); + System.out.println(personal); + ArrayList<Education> educations = us.getEducationDetails(); + ArrayList<Experience> experiences = us.getExperienceDetails(); + ArrayList<Participation> participations = us.getParticipationDetails(); + ArrayList<Achievements> achievements = us.getAchievementDetails(); + ArrayList<Projects> projects = us.getProjectDetails(); + ArrayList<References> refers = us.getReferencesDetails(); + %> + <form action="control?action=resume" method="post"> + <fieldset> + <center> + <h2>RESUME</h2> + </center> + <hr width="200" class="border"> + + <center> + <h4>Personal Info</h4> + </center> + <hr class="border"> + <table align="center" > + <tr> + <td><b>Mr. <%=personal.getName()%></b></td> + </tr> + + <tr> + <td><%=personal.getAddress()%></td> + </tr> + <tr> + <td>Contact no :- <%=personal.getMobileNo()%></td> + </tr> + <tr> + <td>Mail id :- <%=personal.getEmailId()%></td> + </tr> + + <tr> + <td>D.O.B :- <%=personal.getDob()%></td> + </tr> + <tr> + <td>Languages known :- <%=personal.getLangaugeProf()%></td> + </tr> + </table> + + <hr class="border"> + <h4> Career Objectives</h4> + + <%=personal.getCareerObjectives() %> + <hr class="border"> + <h4> My Strength's</h4> + + <%=personal.getStrengths() %> + <!-- <hr width="150" style="border-width: thick;">--><br><br> + <fieldset> + <center> + <h4>Educational Info</h4> + </center> + <hr class="border"> + <% + for (int i = 0; i < educations.size(); i++) { + Education education = educations.get(i); + %> + + <b><%=i+1%>) + Year <%=education.getYear()%></b> <br> + + <b>Education :-</b> + <%=education.getDegree()%> + In + <%=education.getSubject()%> + <br> + + <b>Institute :-</b> + <%=education.getCollegeName()%> + <br> + + <b>University :-</b> + <%=education.getBoard()%> + <br> + <table border="1" id="tblData" cellspacing="0" align="center"> + <tr> + <th>obtained Marks</th> + <th>Total Marks</th> + <th>Percentage</th> + </tr> + <tr> + <td><%=education.getObtainedMarks()%></td> + <td><%=education.getTotalMarks()%></td> + <td><%=education.getPercentage()%></td> + </tr> + + </table> + <% + } + %> + </fieldset> + <fieldset> + <center> + <h4>My Experience</h4> + </center> + <hr class="border"> + <h4> + <u>Employment Details</u> + </h4> + <% + for (int i = 0; i < experiences.size(); i++) { + Experience experience = experiences.get(i); + %> + + + <b><%=i+1%>) + <%=experience.getEmployer()%></b><br> + <b>Designation + :- </b> + <%=experience.getDesignation()%> + <br> + <b>Experience + :- </b> + <%=experience.getExperience()%> + <br> + <b>Joining + at :- </b> + <%=experience.getJoiningDate()%> + To + <%=experience.getLeavingDate()%> + <br> + <b>Working + :- </b> + <%=experience.getWorking()%> + <br> + <% + } + %> + + </fieldset> + <fieldset> + <center> + <h4>My Participation</h4> + </center> + <hr class="border"> + <% + for (int i = 0; i < participations.size(); i++) { + Participation part = participations.get(i); + %> + + <b><%=i+1%>) + <%=part.getTopic()%></b><br> + <b>Type + :- </b> + <%=part.getParticipation()%> + <br> + <b>Sponsors + :- </b> + <%=part.getSponsores()%> + <br> + <b>Place + :- </b> + <%=part.getPlace()%> + <br> + <b>About + :- </b> + <%=part.getNote()%> + <br> + <b>Date + attended :- </b> + <%=part.getStartDate()%> + To + <%=part.getEndDate()%> + <br> + <% + } + %> + </fieldset> + + <fieldset> + <center> + <h4>Projects</h4> + </center> + <hr class="border"> + <% + for (int i = 0; i < projects.size(); i++) { + Projects project = projects.get(i); + %> + <b><%=i+1%>) + <%=project.getTitte()%> </b><br> + <b>Front-End + :- </b> + <%=project.getFrontEnd()%> + <br> + <b>Inputs + :- </b> + <%=project.getInputs()%> + <br> + <b>Outputs + :- </b> + <%=project.getOutputs()%> + <br> + <b>About + :- </b> + <%=project.getDescription()%> + <br> + <b>Guide + :- </b> + <%=project.getGuide()%> + <br> + + <% + } + %> + </fieldset> + + <fieldset> + <center> + <h4>Achievements</h4> + </center> + <hr class="border"> + <% + for (int i = 0; i < achievements.size(); i++) { + Achievements achieve = achievements.get(i); + %> + <b><%=i+1%>) + <%=achieve.getTitle()%> for <%=achieve.getName()%> </b><br> + <b>Place + :- </b> + <%=achieve.getPlace()%> + <br> + <b>Date + :- </b> + <%=achieve.getDate()%> + <br> + <% + } + %> + </fieldset> + + <fieldset> + <center> + <h4>References</h4> + </center> + <hr class="border"> + <% + for (int i = 0; i < refers.size(); i++) { + References ref = refers.get(i); + %> + + <b><%=i+1%>) + <%=ref.getName()%> </b><br> + <b>Designation + :- </b> + <%=ref.getDesignation()%> + <br> + <b>Affiliation + :- </b> + <%=ref.getAffiliation()%> + <br> + <b>Contact + no. :- </b> + <%=ref.getContactNo()%> + <br> + <b>Email + id :- </b> + <%=ref.getEmailId()%> + <br> + <% + } + %> + </fieldset> + <fieldset> + <center> + <h4>Personal Info</h4> + </center> + <hr class="border""> + <table align="center"> + <tr> + <td>Father Name :- <%=personal.getFatherName()%></td> + </tr> + + <tr> + <td>Mother Name :- <%=personal.getMotherName()%></td> + </tr> + + <tr> + <td>Gender :- <%=personal.getGender()%></td> + </tr> + + <tr> + <td>D.O.B :- <%=personal.getDob()%></td> + </tr> + + <tr> + <td>Age :- <%=personal.getAge()%></td> + </tr> + + <tr> + <td>Marital :- <%=personal.getMaritalStatus()%> + + <tr> + <td>Nationality :- <%=personal.getNationality()%></td> + </tr> + + <tr> + <td>Hobbies :- <%=personal.getHobbies()%></td> + </tr> + </table> + </fieldset> + </fieldset> + </form> + <center> + <input type="button" onClick="window.print()" + value="Print Your Resume" /> + </center> +</body> +</html> \ No newline at end of file diff --git a/Resume Builder/WebContent/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar b/Resume Builder/WebContent/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar new file mode 100644 index 00000000..e9d2529d Binary files /dev/null and b/Resume Builder/WebContent/WEB-INF/lib/mysql-connector-java-5.1.5-bin.jar differ diff --git a/Resume Builder/WebContent/WEB-INF/web.xml b/Resume Builder/WebContent/WEB-INF/web.xml new file mode 100644 index 00000000..f21b8209 --- /dev/null +++ b/Resume Builder/WebContent/WEB-INF/web.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE xml> +<web-app xmlns:web="http://xmlns.jcp.org/xml/ns/javaee"> + <display-name>Resume Builder</display-name> + <welcome-file-list> + <welcome-file>index.jsp</welcome-file> + </welcome-file-list> + <servlet> + <servlet-name>controller</servlet-name> + <servlet-class>org.pk.resume.builder.controller.BaseController</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>controller</servlet-name> + <url-pattern>/control</url-pattern> + </servlet-mapping> +</web-app> \ No newline at end of file diff --git a/Resume Builder/WebContent/index.jsp b/Resume Builder/WebContent/index.jsp new file mode 100644 index 00000000..4575ca06 --- /dev/null +++ b/Resume Builder/WebContent/index.jsp @@ -0,0 +1 @@ +<jsp:forward page="HomePage.jsp" /> \ No newline at end of file diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Achievements.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Achievements.class new file mode 100644 index 00000000..5c40ba34 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Achievements.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Book.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Book.class new file mode 100644 index 00000000..3478b3a9 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Book.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Conference.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Conference.class new file mode 100644 index 00000000..7036dd16 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Conference.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Education.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Education.class new file mode 100644 index 00000000..eb7a345a Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Education.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Experience.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Experience.class new file mode 100644 index 00000000..4f63068a Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Experience.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/ExpertActivities$ActivityType.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/ExpertActivities$ActivityType.class new file mode 100644 index 00000000..5e70959a Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/ExpertActivities$ActivityType.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/ExpertActivities.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/ExpertActivities.class new file mode 100644 index 00000000..cb06f134 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/ExpertActivities.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Journal.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Journal.class new file mode 100644 index 00000000..87278966 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Journal.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Membership.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Membership.class new file mode 100644 index 00000000..3220e499 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Membership.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Participation$ParticipationName.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Participation$ParticipationName.class new file mode 100644 index 00000000..dacc37c8 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Participation$ParticipationName.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Participation.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Participation.class new file mode 100644 index 00000000..353d1574 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Participation.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Personal.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Personal.class new file mode 100644 index 00000000..a9ec4f01 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Personal.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/Projects.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/Projects.class new file mode 100644 index 00000000..f0a798e2 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/Projects.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/beans/References.class b/Resume Builder/build/classes/org/pk/resume/builder/beans/References.class new file mode 100644 index 00000000..7d80b7ff Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/beans/References.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/constants/GlobalConstants.class b/Resume Builder/build/classes/org/pk/resume/builder/constants/GlobalConstants.class new file mode 100644 index 00000000..bf6bc0d9 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/constants/GlobalConstants.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/dao/DBConnect.class b/Resume Builder/build/classes/org/pk/resume/builder/dao/DBConnect.class new file mode 100644 index 00000000..b09d12df Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/dao/DBConnect.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/dao/Main.class b/Resume Builder/build/classes/org/pk/resume/builder/dao/Main.class new file mode 100644 index 00000000..d2767ef3 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/dao/Main.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/dao/UserService.class b/Resume Builder/build/classes/org/pk/resume/builder/dao/UserService.class new file mode 100644 index 00000000..d0637a5d Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/dao/UserService.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/AchievementSessionConstant.class b/Resume Builder/build/classes/org/pk/resume/builder/session/AchievementSessionConstant.class new file mode 100644 index 00000000..2de8bad4 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/AchievementSessionConstant.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/BookSessionConstant.class b/Resume Builder/build/classes/org/pk/resume/builder/session/BookSessionConstant.class new file mode 100644 index 00000000..9668b730 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/BookSessionConstant.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/ConferenceSessionConstant.class b/Resume Builder/build/classes/org/pk/resume/builder/session/ConferenceSessionConstant.class new file mode 100644 index 00000000..6dbcd7c4 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/ConferenceSessionConstant.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/EducationSession.class b/Resume Builder/build/classes/org/pk/resume/builder/session/EducationSession.class new file mode 100644 index 00000000..45203364 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/EducationSession.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/ExperienceSession.class b/Resume Builder/build/classes/org/pk/resume/builder/session/ExperienceSession.class new file mode 100644 index 00000000..8e79ddcf Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/ExperienceSession.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/ExpertActivitySessionConstant.class b/Resume Builder/build/classes/org/pk/resume/builder/session/ExpertActivitySessionConstant.class new file mode 100644 index 00000000..20623ad2 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/ExpertActivitySessionConstant.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/JournalSessionConstant.class b/Resume Builder/build/classes/org/pk/resume/builder/session/JournalSessionConstant.class new file mode 100644 index 00000000..584f0f8c Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/JournalSessionConstant.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/MembershipSessionConstant.class b/Resume Builder/build/classes/org/pk/resume/builder/session/MembershipSessionConstant.class new file mode 100644 index 00000000..877ec766 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/MembershipSessionConstant.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/ParticipationSessionConstant.class b/Resume Builder/build/classes/org/pk/resume/builder/session/ParticipationSessionConstant.class new file mode 100644 index 00000000..6e700433 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/ParticipationSessionConstant.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/PersonSession.class b/Resume Builder/build/classes/org/pk/resume/builder/session/PersonSession.class new file mode 100644 index 00000000..2f60537b Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/PersonSession.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/ProjectSessionConstant.class b/Resume Builder/build/classes/org/pk/resume/builder/session/ProjectSessionConstant.class new file mode 100644 index 00000000..ee1fb891 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/ProjectSessionConstant.class differ diff --git a/Resume Builder/build/classes/org/pk/resume/builder/session/ReferencesSessionConstant.class b/Resume Builder/build/classes/org/pk/resume/builder/session/ReferencesSessionConstant.class new file mode 100644 index 00000000..07ec9ad7 Binary files /dev/null and b/Resume Builder/build/classes/org/pk/resume/builder/session/ReferencesSessionConstant.class differ diff --git a/Resume Builder/database/ResumeBuilder(BlankDb).sql b/Resume Builder/database/ResumeBuilder(BlankDb).sql new file mode 100644 index 00000000..b72050cd --- /dev/null +++ b/Resume Builder/database/ResumeBuilder(BlankDb).sql @@ -0,0 +1,212 @@ +-- MySQL Administrator dump 1.4 +-- +-- ------------------------------------------------------ +-- Server version 5.0.22-community-nt + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + + +-- +-- Create schema resumebuilder +-- + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ resumebuilder; +USE resumebuilder; + +-- +-- Table structure for table `resumebuilder`.`achievement` +-- + +DROP TABLE IF EXISTS `achievement`; +CREATE TABLE `achievement` ( + `id` int(10) unsigned NOT NULL auto_increment, + `user_id` int(10) unsigned NOT NULL default '0', + `name` varchar(400) NOT NULL default '', + `title` varchar(300) NOT NULL default '', + `place` varchar(45) NOT NULL default '', + `ach_date` varchar(45) NOT NULL default '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `resumebuilder`.`achievement` +-- + +/*!40000 ALTER TABLE `achievement` DISABLE KEYS */; +/*!40000 ALTER TABLE `achievement` ENABLE KEYS */; + + +-- +-- Table structure for table `resumebuilder`.`eductional_details` +-- + +DROP TABLE IF EXISTS `eductional_details`; +CREATE TABLE `eductional_details` ( + `id` int(10) unsigned NOT NULL auto_increment, + `user_id` int(10) unsigned NOT NULL default '0', + `name` varchar(45) NOT NULL default '', + `degree` varchar(45) NOT NULL default '', + `subject` varchar(45) NOT NULL default '', + `year` varchar(45) NOT NULL default '', + `board_or_university` varchar(45) NOT NULL default '', + `obtained_marks` varchar(20) NOT NULL default '0', + `total_marks` varchar(20) NOT NULL default '0', + `percentage` varchar(20) NOT NULL default '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `resumebuilder`.`eductional_details` +-- + +/*!40000 ALTER TABLE `eductional_details` DISABLE KEYS */; +/*!40000 ALTER TABLE `eductional_details` ENABLE KEYS */; + + +-- +-- Table structure for table `resumebuilder`.`experience` +-- + +DROP TABLE IF EXISTS `experience`; +CREATE TABLE `experience` ( + `id` int(10) unsigned NOT NULL auto_increment, + `user_id` int(10) unsigned NOT NULL default '0', + `employer` varchar(45) NOT NULL default '', + `designation` varchar(45) NOT NULL default '', + `joining_date` varchar(13) NOT NULL default '', + `leaving_date` varchar(13) NOT NULL default '', + `work` varchar(200) NOT NULL default '', + `experience` varchar(500) NOT NULL default '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `resumebuilder`.`experience` +-- + +/*!40000 ALTER TABLE `experience` DISABLE KEYS */; +/*!40000 ALTER TABLE `experience` ENABLE KEYS */; + + +-- +-- Table structure for table `resumebuilder`.`participation` +-- + +DROP TABLE IF EXISTS `participation`; +CREATE TABLE `participation` ( + `id` int(10) unsigned NOT NULL auto_increment, + `user_id` int(10) unsigned NOT NULL default '0', + `part_name` varchar(45) NOT NULL default '', + `start_date` varchar(45) NOT NULL default '', + `end_date` varchar(45) NOT NULL default '', + `sponsores` varchar(45) NOT NULL default '', + `note` varchar(1000) NOT NULL default '', + `topic` varchar(200) NOT NULL default '', + `place` varchar(45) NOT NULL default '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `resumebuilder`.`participation` +-- + +/*!40000 ALTER TABLE `participation` DISABLE KEYS */; +/*!40000 ALTER TABLE `participation` ENABLE KEYS */; + + +-- +-- Table structure for table `resumebuilder`.`personal_details` +-- + +DROP TABLE IF EXISTS `personal_details`; +CREATE TABLE `personal_details` ( + `id` int(10) unsigned NOT NULL auto_increment, + `name` varchar(45) NOT NULL default '', + `father_name` varchar(45) NOT NULL default '', + `sex` varchar(45) NOT NULL default '', + `dob` varchar(20) NOT NULL default '', + `age` int(10) unsigned NOT NULL default '0', + `contact` varchar(20) NOT NULL default '', + `marital_status` varchar(45) NOT NULL default '', + `address` varchar(100) NOT NULL default '', + `email_id` varchar(45) NOT NULL default '', + `langauge_proficiencies` varchar(75) NOT NULL default '', + `mother_name` varchar(45) NOT NULL default '', + `nationality` varchar(45) NOT NULL default '', + `career_objectives` varchar(150) NOT NULL default '', + `strength` varchar(100) NOT NULL default '', + `hobbies` varchar(100) NOT NULL default '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `resumebuilder`.`personal_details` +-- + +/*!40000 ALTER TABLE `personal_details` DISABLE KEYS */; +/*!40000 ALTER TABLE `personal_details` ENABLE KEYS */; + + +-- +-- Table structure for table `resumebuilder`.`projects` +-- + +DROP TABLE IF EXISTS `projects`; +CREATE TABLE `projects` ( + `id` int(10) unsigned NOT NULL auto_increment, + `user_id` int(10) unsigned NOT NULL default '0', + `title` varchar(100) NOT NULL default '', + `guide` varchar(100) NOT NULL default '', + `front_end` varchar(100) NOT NULL default '', + `back_end` varchar(100) NOT NULL default '', + `input` varchar(1000) NOT NULL default '', + `output` varchar(1000) NOT NULL default '', + `description` varchar(1000) NOT NULL default '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `resumebuilder`.`projects` +-- + +/*!40000 ALTER TABLE `projects` DISABLE KEYS */; +/*!40000 ALTER TABLE `projects` ENABLE KEYS */; + + +-- +-- Table structure for table `resumebuilder`.`reference` +-- + +DROP TABLE IF EXISTS `reference`; +CREATE TABLE `reference` ( + `id` int(10) unsigned NOT NULL auto_increment, + `name` varchar(45) NOT NULL default '', + `designation` varchar(45) NOT NULL default '', + `affilation` varchar(45) NOT NULL default '', + `email` varchar(45) NOT NULL default '', + `contact_no` varchar(45) NOT NULL default '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Dumping data for table `resumebuilder`.`reference` +-- + +/*!40000 ALTER TABLE `reference` DISABLE KEYS */; +/*!40000 ALTER TABLE `reference` ENABLE KEYS */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; diff --git a/Resume Builder/src/org/pk/resume/builder/beans/Achievements.java b/Resume Builder/src/org/pk/resume/builder/beans/Achievements.java new file mode 100644 index 00000000..d9af18af --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/Achievements.java @@ -0,0 +1,40 @@ +package org.pk.resume.builder.beans; + +public class Achievements { + + private String name; + private String title; + private String place; + private String date; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public String getPlace() { + return place; + } + public void setPlace(String place) { + this.place = place; + } + public String getDate() { + return date; + } + public void setDate(String date) { + this.date = date; + } + @Override + public String toString() { + return "Achievements { Name = " + this.name + ",Title = " + this.title + +",Place = "+ this.place + ",Date = " + this.date + " } "; + } + + +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/Book.java b/Resume Builder/src/org/pk/resume/builder/beans/Book.java new file mode 100644 index 00000000..7c81cc5a --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/Book.java @@ -0,0 +1,50 @@ +package org.pk.resume.builder.beans; + +public class Book { + + int userid; + String book_title; + String author; + String publisher; + String isbn_no; + String publication_date; + + public int getUserid() { + return userid; + } + public void setUserid(int userid) { + this.userid = userid; + } + public String getBook_title() { + return book_title; + } + public void setBook_title(String book_title) { + this.book_title = book_title; + } + public String getAuthor() { + return author; + } + public void setAuthor(String author) { + this.author = author; + } + public String getPublisher() { + return publisher; + } + public void setPublisher(String publisher) { + this.publisher = publisher; + } + public String getIsbn_no() { + return isbn_no; + } + public void setIsbn_no(String isbn_no) { + this.isbn_no = isbn_no; + } + public String getPublication_date() { + return publication_date; + } + public void setPublication_date(String publication_date) { + this.publication_date = publication_date; + } + + +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/Conference.java b/Resume Builder/src/org/pk/resume/builder/beans/Conference.java new file mode 100644 index 00000000..9a5c4955 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/Conference.java @@ -0,0 +1,90 @@ +package org.pk.resume.builder.beans; + +public class Conference { + String name; + String paperTitle; + String author; + String publicationDate; + String place; + String volume; + String pageNo; + String doiNo; + String link; + String impactFactor; + String impactType; + String publicationType; + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getPaperTitle() { + return paperTitle; + } + public void setPaperTitle(String paperTitle) { + this.paperTitle = paperTitle; + } + public String getAuthor() { + return author; + } + public void setAuthor(String author) { + this.author = author; + } + public String getPublicationDate() { + return publicationDate; + } + public void setPublicationDate(String publicationDate) { + this.publicationDate = publicationDate; + } + public String getPlace() { + return place; + } + public void setPlace(String place) { + this.place = place; + } + public String getVolume() { + return volume; + } + public void setVolume(String volume) { + this.volume = volume; + } + public String getPageNo() { + return pageNo; + } + public void setPageNo(String pageNo) { + this.pageNo = pageNo; + } + public String getDoiNo() { + return doiNo; + } + public void setDoiNo(String dioNo) { + this.doiNo = dioNo; + } + public String getLink() { + return link; + } + public void setLink(String link) { + this.link = link; + } + public String getImpactFactor() { + return impactFactor; + } + public void setImpactFactor(String impactFactor) { + this.impactFactor = impactFactor; + } + public String getImpactType() { + return impactType; + } + public void setImpactType(String impactType) { + this.impactType = impactType; + } + public String getPublicationType() { + return publicationType; + } + public void setPublicationType(String publicationType) { + this.publicationType = publicationType; + } + +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/Education.java b/Resume Builder/src/org/pk/resume/builder/beans/Education.java new file mode 100644 index 00000000..6431d78d --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/Education.java @@ -0,0 +1,83 @@ +package org.pk.resume.builder.beans; + +public class Education { + private int id; + private int userId; + private String collegeName; + private String degree; + private String subject; + private String year; + private String board; + private String obtainedMarks; + private String totalMarks; + private String percentage; + + public String getPercentage() { + return percentage; + } + public void setPercentage(String percentage) { + this.percentage = percentage; + } + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public int getUserId() { + return userId; + } + public void setUserId(int userId) { + this.userId = userId; + } + public String getCollegeName() { + return collegeName; + } + public void setCollegeName(String collegeName) { + this.collegeName = collegeName; + } + public String getDegree() { + return degree; + } + public void setDegree(String degree) { + this.degree = degree; + } + public String getSubject() { + return subject; + } + public void setSubject(String subject) { + this.subject = subject; + } + public String getYear() { + return year; + } + public void setYear(String year) { + this.year = year; + } + public String getBoard() { + return board; + } + public void setBoard(String board) { + this.board = board; + } + public String getObtainedMarks() { + return obtainedMarks; + } + public void setObtainedMarks(String obtainedMarks) { + this.obtainedMarks = obtainedMarks; + } + public String getTotalMarks() { + return totalMarks; + } + public void setTotalMarks(String totalMarks) { + this.totalMarks = totalMarks; + } + + @Override + public String toString() { + return "Educational {id=" + this.id + ",school="+this.collegeName+", degree=" + this.degree + + ", subject=" + this.subject + ", year=" + this.year + + ", board=" + this.board + ", obtainedMarks=" + this.obtainedMarks + ", totalMarks=" + + this.totalMarks + " }"; + } +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/Experience.java b/Resume Builder/src/org/pk/resume/builder/beans/Experience.java new file mode 100644 index 00000000..286ae798 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/Experience.java @@ -0,0 +1,86 @@ +package org.pk.resume.builder.beans; + +public class Experience { + + private int id; + private int userId; + private String employer; + private String designation; + private String joiningDate; + private String leavingDate; + private String working; + private String experience; + private String subjectThaught; + private String course; + + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public int getUserId() { + return userId; + } + public void setUserId(int userId) { + this.userId = userId; + } + public String getEmployer() { + return employer; + } + public void setEmployer(String employer) { + this.employer = employer; + } + public String getDesignation() { + return designation; + } + public void setDesignation(String designation) { + this.designation = designation; + } + public String getJoiningDate() { + return joiningDate; + } + public void setJoiningDate(String joiningDate) { + this.joiningDate = joiningDate; + } + public String getLeavingDate() { + return leavingDate; + } + public void setLeavingDate(String leavingDate) { + this.leavingDate = leavingDate; + } + public String getWorking() { + return working; + } + public void setWorking(String working) { + this.working = working; + } + public String getExperience() { + return experience; + } + public void setExperience(String experience) { + this.experience = experience; + } + public String getSubjectThaught() { + return subjectThaught; + } + public void setSubjectThaught(String subjectThaught) { + this.subjectThaught = subjectThaught; + } + public String getCourse() { + return course; + } + public void setCourse(String course) { + this.course = course; + } + + @Override + public String toString() { + return "Experience {id=" + this.id + ", employer=" + this.employer + + ", designation=" + this.designation + ", joiningDate=" + this.joiningDate + + ", leavingDate=" + this.leavingDate + ", working=" + this.working + ", experience=" + + this.experience + ", subjectThaught=" + this.subjectThaught + + ", course=" + this.course+" }"; + } + +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/ExpertActivities.java b/Resume Builder/src/org/pk/resume/builder/beans/ExpertActivities.java new file mode 100644 index 00000000..de310a78 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/ExpertActivities.java @@ -0,0 +1,82 @@ +package org.pk.resume.builder.beans; + + +public class ExpertActivities { + private int id; + private String exportRole; + private String level; + private String place; + private String isbnNo; + + public enum ActivityType { + + JOURNAL, CONFERENCE, WORKSHOPS + } + public ActivityType actName; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getExportRole() { + return exportRole; + } + + public void setExportRole(String exportRole) { + this.exportRole = exportRole; + } + + public String getLevel() { + return level; + } + + public void setLevel(String level) { + this.level = level; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public String getIsbnNo() { + return isbnNo; + } + + public void setIsbnNo(String isbnNo) { + this.isbnNo = isbnNo; + } + + public ActivityType getActivityType() { + return actName; + } + + public void setActivityType(ActivityType actName) { + this.actName = actName; + } + + public static ActivityType getActivityType(String actName) { + for (ActivityType aName : ActivityType.values()) { + if (actName.equals(aName.name())) { + return aName; + } + } + return null; + } + + @Override + public String toString() { + return "Expert Activity { id = " + this.id + ",Expert Role = " + this.exportRole + + ",Level = " + this.level + ",Activity Type = " + this.actName + + ",Place = " + this.place + ",ISBN NO = " + this.isbnNo + " }"; + } + + +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/Journal.java b/Resume Builder/src/org/pk/resume/builder/beans/Journal.java new file mode 100644 index 00000000..b71fc3e1 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/Journal.java @@ -0,0 +1,149 @@ +package org.pk.resume.builder.beans; + +public class Journal { + + String name; + String paperTitle; + String author; + String publicationDate; + String place; + String volume; + String pageNo; + String doiNo; + String link; + String impactFactor; + String impactType; + String publicationType; + + public Journal(){} + + /** + * @param name + * @param paperTitle + * @param author + * @param publicationDate + * @param place + * @param volume + * @param pageNo + * @param doiNo + * @param link + * @param impactFactor + * @param impactType + * @param publicationType + */ + public Journal(String name, String paperTitle, String author, + String publicationDate, String place, String volume, String pageNo, + String doiNo, String link, String impactFactor, String impactType, + String publicationType) { + super(); + this.name = name; + this.paperTitle = paperTitle; + this.author = author; + this.publicationDate = publicationDate; + this.place = place; + this.volume = volume; + this.pageNo = pageNo; + this.doiNo = doiNo; + this.link = link; + this.impactFactor = impactFactor; + this.impactType = impactType; + this.publicationType = publicationType; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPaperTitle() { + return paperTitle; + } + + public void setPaperTitle(String paperTitle) { + this.paperTitle = paperTitle; + } + + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public String getPublicationDate() { + return publicationDate; + } + + public void setPublicationDate(String publicationDate) { + this.publicationDate = publicationDate; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public String getVolume() { + return volume; + } + + public void setVolume(String volume) { + this.volume = volume; + } + + public String getPageNo() { + return pageNo; + } + + public void setPageNo(String pageNo) { + this.pageNo = pageNo; + } + + public String getDoiNo() { + return doiNo; + } + + public void setDoiNo(String dioNo) { + this.doiNo = dioNo; + } + + public String getLink() { + return link; + } + + public void setLink(String link) { + this.link = link; + } + + public String getImpactFactor() { + return impactFactor; + } + + public void setImpactFactor(String impactFactor) { + this.impactFactor = impactFactor; + } + + public String getImpactType() { + return impactType; + } + + public void setImpactType(String impactType) { + this.impactType = impactType; + } + + public String getPublicationType() { + return publicationType; + } + + public void setPublicationType(String publicationType) { + this.publicationType = publicationType; + } + +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/Membership.java b/Resume Builder/src/org/pk/resume/builder/beans/Membership.java new file mode 100644 index 00000000..7e889f11 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/Membership.java @@ -0,0 +1,87 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.pk.resume.builder.beans; + +/** + * + * @author Pankaj + */ +public class Membership { + private int id; + private String professionalBodyName; + private String place; + private String joiningYear; + private String membershipType; + private String membershipNo; + + public Membership() { + } + + public Membership(int id, String professionalBodyName, String place, String joiningYear, String membershipType, String membershipNo) { + this.id = id; + this.professionalBodyName = professionalBodyName; + this.place = place; + this.joiningYear = joiningYear; + this.membershipType = membershipType; + this.membershipNo = membershipNo; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getProfessionalBodyName() { + return professionalBodyName; + } + + public void setProfessionalBodyName(String professionalBodyName) { + this.professionalBodyName = professionalBodyName; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public String getJoiningYear() { + return joiningYear; + } + + public void setJoiningYear(String joiningYear) { + this.joiningYear = joiningYear; + } + + public String getMembershipType() { + return membershipType; + } + + public void setMembershipType(String membershipType) { + this.membershipType = membershipType; + } + + public String getMembershipNo() { + return membershipNo; + } + + public void setMembershipNo(String membershipNo) { + this.membershipNo = membershipNo; + } + + @Override + public String toString() { + return "Membership { id = " + this.id + ", Professional Body Name = " + this.professionalBodyName + + ", Place = " + this.place + ", Joining Year = " + this.joiningYear + + ", Membership Type = " + this.membershipType + ", Membership No. = " + this.membershipNo + "}"; + } + +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/Participation.java b/Resume Builder/src/org/pk/resume/builder/beans/Participation.java new file mode 100644 index 00000000..668463fd --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/Participation.java @@ -0,0 +1,130 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package org.pk.resume.builder.beans; + +/** + * + * @author Pankaj + */ +public final class Participation { + + + + private int id; + //private String participationName; + private String startDate; + private String endDate; + private String sponsores; + private String note; + private String topic; + private String place; + + public enum ParticipationName { + + TRAINING, WORKSHOPS, FDP, STTP, OTHERS + } + public ParticipationName partName; + + + + public Participation() { + } + + public Participation(ParticipationName partName, String startDate, String endDate, String sponsores, String note, String topic, String place) { + this.setId(id); + this.setStartDate(startDate); + this.setEndDate(endDate); + this.setSponsores(sponsores); + this.setNote(note); + this.setTopic(topic); + this.setPlace(place); + this.setParticipation(partName); + } + + + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getStartDate() { + return startDate; + } + + public void setStartDate(String startDate) { + this.startDate = startDate; + } + + public String getEndDate() { + return endDate; + } + + public void setEndDate(String endDate) { + this.endDate = endDate; + } + + public String getSponsores() { + return sponsores; + } + + public void setSponsores(String sponsores) { + this.sponsores = sponsores; + } + + public String getNote() { + return note; + } + + public void setNote(String Note) { + this.note = Note; + } + + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public ParticipationName getParticipation() { + return partName; + } + + public void setParticipation(ParticipationName partName) { + this.partName = partName; + } + + public static ParticipationName getParticipation(String partName) { + for (ParticipationName pName : ParticipationName.values()) { + if (partName.equals(pName.name())) { + return pName; + } + } + return null; + } + + @Override + public String toString() { + return "Participation { id = " + this.id + ",Partcipation name = " + this.partName + + ",Start Date = " + this.startDate + ",End Date = " + this.endDate + + ",Sponsores = " + this.sponsores + ",Note = " + this.note + ",Topic = " + this.topic + + ",Place = " + this.place + "}"; + } + +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/Personal.java b/Resume Builder/src/org/pk/resume/builder/beans/Personal.java new file mode 100644 index 00000000..0eb5ca8b --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/Personal.java @@ -0,0 +1,180 @@ +package org.pk.resume.builder.beans; + +public class Personal { + private int id; + private String name; + private String fatherName; + private String motherName; + private String surname; + private String gender; + private String dob; + private String mobileNo; + private String emailId; + private String address; + private String place; + private String age; + private String nationality; + private String maritalStatus; + private String langaugeProf; + private String careerObjectives; + private String strengths; + private String hobbies; + + public String getSurname() { + return surname; + } + + public void setSurname(String surname) { + this.surname = surname; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public String getMotherName() { + return motherName; + } + + public void setMotherName(String motherName) { + this.motherName = motherName; + } + + public String getNationality() { + return nationality; + } + + public void setNationality(String nationality) { + this.nationality = nationality; + } + + public String getCareerObjectives() { + return careerObjectives; + } + + public void setCareerObjectives(String careerObjectives) { + this.careerObjectives = careerObjectives; + } + + public String getStrengths() { + return strengths; + } + + public void setStrengths(String strengths) { + this.strengths = strengths; + } + + public String getHobbies() { + return hobbies; + } + + public void setHobbies(String hobbies) { + this.hobbies = hobbies; + } + + public Personal() { + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public String getDob() { + return dob; + } + + public void setDob(String dob) { + this.dob = dob; + } + + public String getMobileNo() { + return mobileNo; + } + + public void setMobileNo(String mobileNo) { + this.mobileNo = mobileNo; + } + + public String getEmailId() { + return emailId; + } + + public void setEmailId(String emailId) { + this.emailId = emailId; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getAge() { + return age; + } + + public void setAge(String age) { + this.age = age; + } + + public String getMaritalStatus() { + return maritalStatus; + } + + public void setMaritalStatus(String maritalStatus) { + this.maritalStatus = maritalStatus; + } + + public String getFatherName() { + return fatherName; + } + + public void setFatherName(String fatherName) { + this.fatherName = fatherName; + } + + + public String getLangaugeProf() { + return langaugeProf; + } + + public void setLangaugeProf(String langaugeProf) { + this.langaugeProf = langaugeProf; + } + + @Override + public String toString() { + return "Personal {id=" + this.id + ", name=" + this.name + + ", fatherName=" + this.fatherName + ", gender=" + this.gender + + ", dob=" + this.dob + ", age=" + this.age + ", address=" + + this.address + ", contact=" + this.mobileNo + + ", maritalStatus=" + this.maritalStatus + ", mail=" + + this.emailId + ", Languages known="+this.langaugeProf+" }"; + } +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/Projects.java b/Resume Builder/src/org/pk/resume/builder/beans/Projects.java new file mode 100644 index 00000000..5e369d6d --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/Projects.java @@ -0,0 +1,76 @@ +package org.pk.resume.builder.beans; + +public class Projects { + private String titte; + private String guide; + private String frontEnd; + private String backEnd; + public String getBackEnd() { + return backEnd; + } + + public void setBackEnd(String backEnd) { + this.backEnd = backEnd; + } + + private String inputs; + private String outputs; + private String description; + + public String getTitte() { + return titte; + } + + public void setTitte(String titte) { + this.titte = titte; + } + + public String getGuide() { + return guide; + } + + public void setGuide(String guide) { + this.guide = guide; + } + + public String getFrontEnd() { + return frontEnd; + } + + public void setFrontEnd(String frontEnd) { + this.frontEnd = frontEnd; + } + + public String getInputs() { + return inputs; + } + + public void setInputs(String inputs) { + this.inputs = inputs; + } + + public String getOutputs() { + return outputs; + } + + public void setOutputs(String outputs) { + this.outputs = outputs; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public String toString() { + return "Projects { Titte = " + this.titte + ",Guide = " + this.guide + + ",Front End = "+ this.frontEnd + ",Inputs = " + this.inputs + + ",Outputs = " + this.outputs + ",Description = " + this.description + " } "; + } + + +} diff --git a/Resume Builder/src/org/pk/resume/builder/beans/References.java b/Resume Builder/src/org/pk/resume/builder/beans/References.java new file mode 100644 index 00000000..e26a741f --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/beans/References.java @@ -0,0 +1,57 @@ +package org.pk.resume.builder.beans; + +public class References { + private String name; + private String designation; + private String affiliation; + private String emailId; + private String contactNo; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDesignation() { + return designation; + } + + public void setDesignation(String designation) { + this.designation = designation; + } + + public String getAffiliation() { + return affiliation; + } + + public void setAffiliation(String affiliation) { + this.affiliation = affiliation; + } + + public String getEmailId() { + return emailId; + } + + public void setEmailId(String emailId) { + this.emailId = emailId; + } + + public String getContactNo() { + return contactNo; + } + + public void setContactNo(String contactNo) { + this.contactNo = contactNo; + } + + @Override + public String toString() { + return "References { Name = " + this.name + ",Designation = " + this.designation + + ",Affiliation = " + this.affiliation + ",Email Id = " + this.emailId + + ",Contact No = " + this.contactNo + " } "; + } + +} diff --git a/Resume Builder/src/org/pk/resume/builder/constants/GlobalConstants.java b/Resume Builder/src/org/pk/resume/builder/constants/GlobalConstants.java new file mode 100644 index 00000000..3afe2472 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/constants/GlobalConstants.java @@ -0,0 +1,24 @@ +package org.pk.resume.builder.constants; + +import java.util.ArrayList; +import org.pk.resume.builder.beans.Achievements; +import org.pk.resume.builder.beans.Education; +import org.pk.resume.builder.beans.Experience; +import org.pk.resume.builder.beans.Participation; +import org.pk.resume.builder.beans.Projects; +import org.pk.resume.builder.beans.References; + +public class GlobalConstants +{ + public static String JSP_PAGE = "index.jsp"; + + public static String MESSAGE = "Click 'Fill Resume' To Insert Details..."; + + public static String PERSONAL_DETAILS = "user_details"; + public static ArrayList<Education> educations = new ArrayList<Education>(); + public static ArrayList<Experience> experiences = new ArrayList<Experience>(); + public static ArrayList<Participation> participations =new ArrayList<Participation>(); + public static ArrayList<Achievements> achievements= new ArrayList<Achievements>(); + public static ArrayList<Projects> projects = new ArrayList<Projects>(); + public static ArrayList<References> references = new ArrayList<References>(); +} \ No newline at end of file diff --git a/Resume Builder/src/org/pk/resume/builder/controller/BaseController.java b/Resume Builder/src/org/pk/resume/builder/controller/BaseController.java new file mode 100644 index 00000000..08155c8f --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/controller/BaseController.java @@ -0,0 +1,96 @@ +/*package org.pk.resume.builder.controller; + +import java.io.IOException; +import javax.servlet.http.*; +import org.pk.resume.builder.beans.Achievements; +import org.pk.resume.builder.beans.Book; +import org.pk.resume.builder.beans.Conference; +import org.pk.resume.builder.beans.Education; +import org.pk.resume.builder.beans.Experience; +import org.pk.resume.builder.beans.ExpertActivities; +import org.pk.resume.builder.beans.Journal; +import org.pk.resume.builder.beans.Membership; +import org.pk.resume.builder.beans.Participation; +import org.pk.resume.builder.beans.Personal; +import org.pk.resume.builder.beans.Projects; +import org.pk.resume.builder.beans.References; +import org.pk.resume.builder.constants.GlobalConstants; +import org.pk.resume.builder.dao.UserService; + +public class BaseController extends HttpServlet { + private static final long serialVersionUID = 4481510681863866579L; + private UserService userServices = new UserService(); + + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) { + String action = request.getParameter("action"); + doPostAction(action, request, response); + } + + public void doPostAction(String action, HttpServletRequest request, + HttpServletResponse response) { + try { + if(action.equals("resume")) + { + HttpSession session = request.getSession(); + + Personal personal = (Personal) session.getAttribute(GlobalConstants.PERSONAL_DETAILS); + Education education = (Education) session.getAttribute(GlobalConstants.EDUCATIONAL_DETAILS); + Experience experience = (Experience) session.getAttribute(GlobalConstants.EXPERIENCE_DETAILS); + Journal journal=(Journal)session.getAttribute(GlobalConstants.JOURNAL_DETAILS); + Conference conference=(Conference)session.getAttribute(GlobalConstants.CONFERENCE_DETAILS); + Book book=(Book)session.getAttribute(GlobalConstants.BOOK_DETAILS); + Participation part = (Participation) session.getAttribute(GlobalConstants.PARTICIPATION_DETAILS); + Membership member = (Membership) session.getAttribute(GlobalConstants.MEMBERSHIP_DETAILS); + ExpertActivities expAct = (ExpertActivities) session.getAttribute(GlobalConstants.EXPERT_ACTIVITY); + Achievements achieve = (Achievements) session.getAttribute(GlobalConstants.ACHIEVEMENTS_DETAILS); + Projects project = (Projects) session.getAttribute(GlobalConstants.PROJRCT_DETAILS); + References ref = (References) session.getAttribute(GlobalConstants.REFERENCES_DETAILS); + + boolean p = userServices.insertPersonalDetails(personal); + + + + //GlobalConstants.JSP_PAGE = "Final.jsp"; + + + /*if(userServices.insertPersonalDetails(personal)) + { + GlobalConstants.MESSAGE = "Personal Details Inserted Sucesfully"; + if(userServices.insertEducationalDetails(education)) + { + GlobalConstants.MESSAGE = "Educational Details Inserted Sucesfully"; + if(userServices.insertExperienceDetails(experience)) + { + GlobalConstants.MESSAGE = "Experience Details Inseted Sucesfully"; + session.setAttribute(GlobalConstants.PERSONAL_DETAILS, null); + session.setAttribute(GlobalConstants.EDUCATIONAL_DETAILS, null); + session.setAttribute(GlobalConstants.EXPERIENCE_DETAILS, null); + + } + else + { + GlobalConstants.MESSAGE = "Error in Experience Details Insertion"; + } + } + else + { + GlobalConstants.MESSAGE = "Error in Educational Details Insertion"; + } + } + else + { + GlobalConstants.MESSAGE = "Error in Personal Details Insertion"; + } + response.sendRedirect(GlobalConstants.JSP_PAGE); + } + else + { + response.sendRedirect("index.jsp"); + } + } catch (IOException e) { + e.printStackTrace(); + } + } +}*/ \ No newline at end of file diff --git a/Resume Builder/src/org/pk/resume/builder/dao/DBConnect.java b/Resume Builder/src/org/pk/resume/builder/dao/DBConnect.java new file mode 100644 index 00000000..9226618a --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/dao/DBConnect.java @@ -0,0 +1,594 @@ +package org.pk.resume.builder.dao; + +import java.sql.*; +import java.util.ArrayList; + +import org.pk.resume.builder.beans.Achievements; +import org.pk.resume.builder.beans.Education; +import org.pk.resume.builder.beans.Experience; +import org.pk.resume.builder.beans.Participation; +import org.pk.resume.builder.beans.Personal; +import org.pk.resume.builder.beans.Projects; +import org.pk.resume.builder.beans.References; + +public class DBConnect { + private static Connection connection = null; + private static String DRIVER_NAME = "com.mysql.jdbc.Driver"; + private static String DATABASE_NAME = "resumebuilder"; + private static String DB_URL = "jdbc:mysql://localhost:3306/" + + DBConnect.DATABASE_NAME; + private static String USER_NAME = "root"; + private static String PASSWORD = "root"; + + public static Connection getConnection() { + Connection con = null; + try { + Class.forName(DRIVER_NAME); + con = DriverManager.getConnection(DB_URL, USER_NAME, PASSWORD); + return con; + } catch (ClassNotFoundException cne) { + System.out.println(cne); + } catch (SQLException sqle) { + System.out.println(sqle.toString()); + } + return con; + } + + public void closeConnection() { + try { + + if (connection != null) + connection.close(); + } catch (SQLException sqle) { + System.out.println(sqle.toString()); + } + } + + public boolean insertPersonalDetails(Personal personal) { + String SQL = "INSERT INTO personal_details(name, father_name, sex, dob, age, " + + "contact, marital_status, address, email_id,langauge_proficiencies," + + "mother_name, nationality, career_objectives, strengths, hobbies, surname, place) " + + "VALUES('" + + personal.getName() + + "', '" + + personal.getFatherName() + + "','" + + personal.getGender() + + "','" + + personal.getDob() + + "','" + + personal.getAge() + + "','" + + personal.getMobileNo() + + "','" + + personal.getMaritalStatus() + + "','" + + personal.getAddress() + + "','" + + personal.getEmailId() + + "','" + + personal.getLangaugeProf() + + "','" + + personal.getMotherName() + + "','" + + personal.getNationality() + + "','" + + personal.getCareerObjectives() + + "','" + + personal.getStrengths() + + "','" + + personal.getHobbies() + + "','" + + personal.getSurname() + + "','" + + personal.getPlace() + + "')"; + + System.out.println("SQL >> " + SQL); + connection = getConnection(); + boolean result = Boolean.FALSE; + try { + if (connection != null) { + Statement st = connection.createStatement(); + int update = st.executeUpdate(SQL); + if (update > 0) + result = Boolean.TRUE; + closeConnection(); + } else { + System.out + .println("Connection is null in insertPersonalDetails"); + } + } catch (SQLException sqle) { + System.out.println("sqle in insertPersonalDetails - " + sqle); + } + return result; + } + + public boolean insertEducationalDetails(ArrayList<Education> education) { + for(Education edu : education) + { + if(!insertEducationalDetails(edu)) + return false; + } + return true; + } + + public boolean insertEducationalDetails(Education education) { + String SQL = "INSERT INTO eductional_details (name, degree, " + + "subject, year, board_or_university, " + + "obtained_marks, total_marks,percentage) " + + "VALUES('" + + education.getCollegeName() + + "','" + + education.getDegree() + + "','" + + education.getSubject() + + "', '" + + education.getYear() + + "','" + + education.getBoard() + + "', '" + + education.getObtainedMarks() + + "', '" + + education.getTotalMarks() + + "', '" + + education.getPercentage() + + "')"; + System.out.println("SQL >> " + SQL); + connection = getConnection(); + boolean result = Boolean.FALSE; + try { + if (connection != null) { + Statement st = connection.createStatement(); + int update = st.executeUpdate(SQL); + if (update > 0) + result = Boolean.TRUE; + closeConnection(); + } else { + System.out + .println("Connection is null in insertEducationalDetails"); + } + } catch (SQLException sqle) { + System.out.println("sqle in insertEducationalDetails - " + sqle); + } + return result; + } + + public boolean insertExperiences(ArrayList<Experience> experience) { + for(Experience exp : experience) + { + if(!insertExperienceDetails(exp)) + return false; + } + return true; + } + + public boolean insertExperienceDetails(Experience experience) { + String SQL = "INSERT INTO experience (employer, designation, " + + "joining_date, leaving_date, work, experience) " + + "VALUES('" + + experience.getEmployer() + + "', '" + + experience.getDesignation() + + "', '" + + experience.getJoiningDate() + + "', '" + + experience.getLeavingDate() + + "', '" + + experience.getWorking() + + "', '" + + experience.getExperience() + + "')"; + System.out.println("SQL >> " + SQL); + connection = getConnection(); + boolean result = Boolean.FALSE; + try { + if (connection != null) { + Statement st = connection.createStatement(); + int update = st.executeUpdate(SQL); + if (update > 0) + result = Boolean.TRUE; + closeConnection(); + } else { + System.out + .println("Connection is null in insertExperienceDetails"); + } + } catch (SQLException sqle) { + System.out.println("sqle in insertExperienceDetails - " + sqle); + } + return result; + } + + public boolean insertParticipations(ArrayList<Participation> parts) { + for(Participation part : parts) + { + if(!insertParticipation(part)) + return false; + } + return true; + } + + public boolean insertParticipation(Participation part) { + String SQL = "insert into participation(part_name, start_date, " + + "end_date, sponsores, note, topic, place)" + + " values( '" + + part.getParticipation().name() + + "', '" + + part.getStartDate() + + "', '" + + part.getEndDate() + + "', '" + + part.getSponsores() + + "', '" + + part.getNote() + + "','" + + part.getTopic() + + "','" + + part.getPlace() + + "')"; + System.out.println("SQL >> " + SQL); + boolean result = false; + connection = getConnection(); + try { + if (connection != null) { + Statement st = connection.createStatement(); + int update = st.executeUpdate(SQL); + if (update > 0) { + result = Boolean.TRUE; + } + closeConnection(); + } else { + System.out.println("Connection is null in InsertParticipation"); + } + } catch (SQLException sqle) { + System.out.println("sqle in InsertParticipation - " + sqle); + } + return result; + } + + public boolean insertAchievements(ArrayList<Achievements> achievements) { + for(Achievements achieve : achievements) + { + if(!insertAchievement(achieve)) + return false; + } + return true; + } + + public boolean insertAchievement(Achievements achievement) { + String SQL = "insert into achievement(name, title, place, ach_date)" + + " values ('" + + achievement.getName() + + "','" + + achievement.getTitle() + + "','" + + achievement.getPlace() + + "','" + + achievement.getDate() + + "')"; + System.out.println("SQL >> " + SQL); + boolean result = false; + connection = getConnection(); + try { + if (connection != null) { + Statement st = connection.createStatement(); + int update = st.executeUpdate(SQL); + if (update > 0) { + result = Boolean.TRUE; + } + closeConnection(); + } else { + System.out.println("Connection is null in insertAchievement"); + } + } catch (SQLException sqle) { + System.out.println("sqle in insertAchievement - " + sqle); + } + return result; + } + + public boolean insertProjects(ArrayList<Projects> projects) { + for(Projects project : projects) + { + if(!insertProject(project)) + return false; + } + return true; + } + + + public boolean insertProject(Projects projects) { + String SQL = "insert into projects(title, guide," + + "front_end, back_end, input, output, description)" + + " values('" + + projects.getTitte() + + "','" + + projects.getGuide() + + "','" + + projects.getFrontEnd() + + "','" + + projects.getBackEnd() + + "','" + + projects.getInputs() + + "','" + + projects.getOutputs() + + "','" + + projects.getDescription() + + "')"; + System.out.println("SQL >> " + SQL); + boolean result = false; + connection = getConnection(); + try { + if (connection != null) { + Statement st = connection.createStatement(); + int update = st.executeUpdate(SQL); + if (update > 0) { + result = Boolean.TRUE; + } + closeConnection(); + } else { + System.out.println("Connection is null in insertProject"); + } + } catch (SQLException sqle) { + System.out.println("sqle in insertProject - " + sqle); + } + return result; + } + + public boolean insertReferences(ArrayList<References> references) { + for(References reference : references) + { + if(!insertReference(reference)) + return false; + } + return true; + } + + public boolean insertReference(References reference) { + String SQL = "insert into reference(name, designation, affilation, email, contact_no)" + + " values('" + + reference.getName() + + "','" + + reference.getDesignation() + + "','" + + reference.getAffiliation() + + "','" + + reference.getEmailId() + + "','" + + reference.getContactNo() + + "')"; + System.out.println("SQL >> " + SQL); + boolean result = false; + connection = getConnection(); + try { + if (connection != null) { + Statement st = connection.createStatement(); + int update = st.executeUpdate(SQL); + if (update > 0) { + result = Boolean.TRUE; + } + closeConnection(); + } else { + System.out.println("Connection is null in insertReference"); + } + } catch (SQLException sqle) { + System.out.println("sqle in insertReference - " + sqle); + } + return result; + } + + public Personal getPersonalDetails() { + String SQL = "SELECT * FROM personal_details"; + System.out.println("SQL >> " + SQL); + connection = getConnection(); + Personal result = null; + try { + if (connection != null) { + Statement st = connection.createStatement(); + ResultSet rs = st.executeQuery(SQL); + if (rs.next()) { + result = new Personal(); + result.setName(rs.getString("name")); + result.setFatherName(rs.getString("father_name")); + result.setGender(rs.getString("sex")); + result.setDob(rs.getString("dob")); + result.setAge(rs.getString("age")); + result.setMobileNo(rs.getString("contact")); + result.setMaritalStatus(rs.getString("marital_status")); + result.setAddress(rs.getString("address")); + result.setEmailId(rs.getString("email_id")); + result.setLangaugeProf(rs.getString("langauge_proficiencies")); + result.setMotherName(rs.getString("mother_name")); + result.setNationality(rs.getString("nationality")); + result.setCareerObjectives(rs.getString("career_objectives")); + result.setStrengths(rs.getString("strengths")); + result.setHobbies(rs.getString("hobbies")); + } + closeConnection(); + } else { + System.out.println("Connection is null in getPersonalDetails"); + } + } catch (SQLException sqle) { + System.out.println("sqle in getPersonalDetails - " + sqle); + } + return result; + } + + public ArrayList<Education> getEducationalDetails() { + String SQL = "SELECT * FROM eductional_details"; + System.out.println("SQL >> " + SQL); + connection = getConnection(); + ArrayList<Education> results = new ArrayList<>(); + try { + if (connection != null) { + Statement st = connection.createStatement(); + ResultSet rs = st.executeQuery(SQL); + while (rs.next()) { + Education result = new Education(); + result.setCollegeName(rs.getString("name")); + result.setDegree(rs.getString("degree")); + result.setSubject(rs.getString("subject")); + result.setYear(rs.getString("year")); + result.setBoard(rs.getString("board_or_university")); + result.setObtainedMarks(rs.getString("obtained_marks")); + result.setTotalMarks(rs.getString("total_marks")); + result.setPercentage(rs.getString("percentage")); + results.add(result); + } + closeConnection(); + } else { + System.out + .println("Connection is null in getEducationalDetails"); + } + } catch (SQLException sqle) { + System.out.println("sqle in getEducationalDetails - " + sqle); + } + return results; + } + + public ArrayList<Experience> getExperienceDetails() { + String SQL = "SELECT * FROM experience"; + System.out.println("SQL >> " + SQL); + connection = getConnection(); + ArrayList<Experience> results = new ArrayList<>(); + try { + if (connection != null) { + Statement st = connection.createStatement(); + ResultSet rs = st.executeQuery(SQL); + while (rs.next()) { + Experience result = new Experience(); + result.setEmployer(rs.getString("employer")); + result.setDesignation(rs.getString("designation")); + result.setJoiningDate(rs.getString("joining_date")); + result.setLeavingDate(rs.getString("leaving_date")); + result.setWorking(rs.getString("work")); + result.setExperience(rs.getString("experience")); + results.add(result); + } + closeConnection(); + } else { + System.out + .println("Connection is null in getExperienceDetails"); + } + } catch (SQLException sqle) { + System.out.println("sqle in getExperienceDetails - " + sqle); + } + return results; + } + + public ArrayList<Participation> getParticipationDetails() { + ArrayList<Participation> participation = new ArrayList<Participation>(0); + String SQL = "select * from participation"; + connection = getConnection(); + try { + if (connection != null) { + Statement st = connection.createStatement(); + ResultSet rs = st.executeQuery(SQL); + while (rs.next()) { + + participation.add(new Participation( + Participation.getParticipation( + rs.getString("part_name")), + rs.getString("start_date"), + rs.getString("end_date"), + rs.getString("sponsores"), + rs.getString("note"), + rs.getString("topic"), + rs.getString("place"))); + + } + closeConnection(); + } else { + System.out.println("Conection null in getParticipationDetails"); + } + } catch (Exception e) { + System.out.print("Error in getParticipationDetails - " + e); + } + + return participation; + } + + public ArrayList<Achievements> getAchievementDetails() { + ArrayList<Achievements> achievementDetails = new ArrayList<>(0); + String SQL = "select * from achievement"; + connection = getConnection(); + try { + if (connection != null) { + Statement st = connection.createStatement(); + ResultSet rs = st.executeQuery(SQL); + while (rs.next()) { + Achievements achieve = new Achievements(); + achieve.setName(rs.getString("name")); + achieve.setTitle(rs.getString("title")); + achieve.setPlace(rs.getString("place")); + achieve.setDate(rs.getString("ach_date")); + achievementDetails.add(achieve); + } + closeConnection(); + } else { + System.out.println("Conection null in getAchievementDetails"); + } + } catch (Exception e) { + System.out.print("Error in getAchievementDetails- " + e); + } + + return achievementDetails; + } + + public ArrayList<Projects> getProjectDetails() { + ArrayList<Projects> projectDetails = new ArrayList<>(0); + String SQL = "select * from projects"; + connection = getConnection(); + try { + if (connection != null) { + Statement st = connection.createStatement(); + ResultSet rs = st.executeQuery(SQL); + while (rs.next()) { + Projects project = new Projects(); + project.setTitte(rs.getString("title")); + project.setGuide(rs.getString("guide")); + project.setFrontEnd(rs.getString("front_end")); + project.setBackEnd(rs.getString("back_end")); + project.setInputs(rs.getString("input")); + project.setOutputs(rs.getString("output")); + project.setDescription(rs.getString("description")); + projectDetails.add(project); + } + closeConnection(); + } else { + System.out.println("Conection null in getProjectDetails"); + } + } catch (Exception e) { + System.out.print("Error in getProjectDetails - " + e); + } + return projectDetails; + } + + public ArrayList<References> getReferencesDetails() { + + String SQL = "SELECT * FROM reference"; + System.out.println("SQL>>" + SQL); + ArrayList<References> referencesDetails = new ArrayList<>(); + connection = getConnection(); + try { + if (connection != null) { + Statement st = connection.createStatement(); + ResultSet rs = st.executeQuery(SQL); + while (rs.next()) { + References refer = new References(); + refer.setName(rs.getString("name")); + refer.setDesignation(rs.getString("designation")); + refer.setAffiliation(rs.getString("affilation")); + refer.setEmailId(rs.getString("email")); + refer.setContactNo(rs.getString("contact_no")); + referencesDetails.add(refer); + } + closeConnection(); + } else { + System.out.println("Conection null in getReferencesDetails"); + } + } catch (Exception e) { + System.out.print("Error in getReferencesDetails - " + e); + } + return referencesDetails; + } +} diff --git a/Resume Builder/src/org/pk/resume/builder/dao/Main.java b/Resume Builder/src/org/pk/resume/builder/dao/Main.java new file mode 100644 index 00000000..9ba84cb5 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/dao/Main.java @@ -0,0 +1,151 @@ +package org.pk.resume.builder.dao; + + +public class Main { + + public static void main(String[] args) { + + /*Personal p = new Personal(); + p.setName("name"); + p.setFatherName("father_name"); + p.setDob("1991-02-12"); + p.setAge("23"); + p.setAddress("jalgaon"); + p.setEmailId("prvnp@gmail.com"); + p.setGender("MALE"); + p.setLangaugeProf("Marathi, English, Hindi"); + p.setMaritalStatus("Single"); + p.setMobileNo("1234567890"); + + if(us.insertPersonalDetails(p)) + { + System.out.println("Personal Inserted"); + } + else + { + System.out.println("Personal Error"); + } + Experience exp = new Experience(); + + exp.setCourse("10"); + exp.setDesignation("junior developer"); + exp.setEmployer("fsdfdf"); + exp.setExperience("gg"); + exp.setJoiningDate("2015-02-1"); + exp.setLeavingDate("2015-04-1"); + exp.setSubjectThaught("dfsdfsdfd"); + exp.setWorking("fgfghfg"); + + if(us.insertExperienceDetails(exp)) + { + System.out.println("Education dfasfds"); + } + else + { + System.out.println("Education Error"); + } + + Journal j = new Journal(); + j.setAuthor("fffffff"); + j.setDoiNo("123"); + j.setImpactFactor("sdfsdfsffffff"); + j.setLink("www.ggf"); + j.setName("vdfgs"); + j.setPageNo("111"); + j.setPaperTitle("title"); + j.setPlace("aaaa"); + j.setPublicationDate("2014-01-01"); + j.setPublicationType("vggggggggg"); + j.setVolume("vvvv"); + + + if(us.insertJournalDetails(j)){ + System.out.println("journal insert"); + }else{ + System.out.println("journal errror"); + } + + Conference j = new Conference(); + j.setAuthor("fffffff"); + j.setDoiNo("123"); + j.setImpactFactor("sdfsdfsffffff"); + j.setLink("www.ggf"); + j.setName("vdfgs"); + j.setPageNo("111"); + j.setPaperTitle("title"); + j.setPlace("aaaa"); + j.setPublicationDate("2014-01-01"); + j.setPublicationType("vggggggggg"); + j.setVolume("vvvv"); + + + if(us.insertConferenceDetails(j)){ + System.out.println("journal insert"); + }else{ + System.out.println("journal errror"); + } + + + References ref = new References(); + ref.setAffiliation("vvvvvvvv"); + ref.setContactNo("123454667890"); + ref.setDesignation("junior developer"); + ref.setEmailId("ppp@gmail.com"); + ref.setName("fgggggg"); + + if(us.insertReference(ref)){ + System.out.println("journal insert"); + }else{ + System.out.println("journal errror"); + } + + ExpertActivities exp = new ExpertActivities(); + exp.setActivityType(ExpertActivities.getActivityType(ExpertActivities.ActivityType.JOURNAL.name())); + exp.setExportRole("fff"); + exp.setIsbnNo("123"); + exp.setLevel("middle"); + exp.setPlace("jalgaon"); + + if(us.insertExpertActivities(exp)) + { + System.out.println("expert"); + } + else + { + System.out.println("expert errro"); + } + + Achievements ac = new Achievements(); + ac.setDate("2015-1-1"); + ac.setName("dsddsd"); + ac.setPlace("gfg"); + ac.setTitle("dddddd"); + + if(us.insertAchievement(ac)) + { + System.out.println("expert"); + } + else + { + System.out.println("expert vggv"); + } + + + Projects pro = new Projects(); + pro.setDescription("vvvvvv"); + pro.setFrontEnd("java"); + pro.setGuide("rizawan"); + pro.setInputs("ffff"); + pro.setOutputs("cccc"); + pro.setTitte("hi"); + + if(us.insertProject(pro)) + { + System.out.println("project"); + } + else + { + System.out.println("project fff"); + }*/ + } +} diff --git a/Resume Builder/src/org/pk/resume/builder/dao/UserService.java b/Resume Builder/src/org/pk/resume/builder/dao/UserService.java new file mode 100644 index 00000000..7a65fb45 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/dao/UserService.java @@ -0,0 +1,71 @@ +package org.pk.resume.builder.dao; + +import java.util.ArrayList; +import org.pk.resume.builder.beans.Achievements; +import org.pk.resume.builder.beans.Education; +import org.pk.resume.builder.beans.Experience; +import org.pk.resume.builder.beans.Participation; +import org.pk.resume.builder.beans.Personal; +import org.pk.resume.builder.beans.Projects; +import org.pk.resume.builder.beans.References; + +public class UserService +{ + private DBConnect dbConnection = new DBConnect(); + + public boolean insertPersonalDetails(Personal personal){ + return dbConnection.insertPersonalDetails(personal); + } + + public boolean insertEducationalDetails(ArrayList<Education> education){ + return dbConnection.insertEducationalDetails(education); + } + + public boolean insertExperiences(ArrayList<Experience> experience){ + return dbConnection.insertExperiences(experience); + } + + public boolean inserParticipation(ArrayList<Participation> part){ + return dbConnection.insertParticipations(part); + } + + public boolean insertAchievement(ArrayList<Achievements> achievement){ + return dbConnection.insertAchievements(achievement); + } + + public boolean insertProject(ArrayList<Projects> projects){ + return dbConnection.insertProjects(projects); + } + + public boolean insertReference(ArrayList<References> reference){ + return dbConnection.insertReferences(reference); + } + + public Personal getPersonalDetails(){ + return dbConnection.getPersonalDetails(); + } + + public ArrayList<Education> getEducationDetails(){ + return dbConnection.getEducationalDetails(); + } + + public ArrayList<Experience> getExperienceDetails(){ + return dbConnection.getExperienceDetails(); + } + + public ArrayList<Participation> getParticipationDetails(){ + return dbConnection.getParticipationDetails(); + } + + public ArrayList<Achievements> getAchievementDetails(){ + return dbConnection.getAchievementDetails(); + } + + public ArrayList<Projects> getProjectDetails(){ + return dbConnection.getProjectDetails(); + } + + public ArrayList<References> getReferencesDetails(){ + return dbConnection.getReferencesDetails(); + } +} \ No newline at end of file diff --git a/Resume Builder/src/org/pk/resume/builder/session/AchievementSessionConstant.java b/Resume Builder/src/org/pk/resume/builder/session/AchievementSessionConstant.java new file mode 100644 index 00000000..ad2e7414 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/AchievementSessionConstant.java @@ -0,0 +1,10 @@ +package org.pk.resume.builder.session; + +public class AchievementSessionConstant +{ + public static String NAME = "name"; + public static String TITLE = "title"; + public static String PLACE = "place"; + public static String DATE = "date"; + +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/BookSessionConstant.java b/Resume Builder/src/org/pk/resume/builder/session/BookSessionConstant.java new file mode 100644 index 00000000..f6484bbf --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/BookSessionConstant.java @@ -0,0 +1,12 @@ +package org.pk.resume.builder.session; + +public class BookSessionConstant { + + public static String BOOK_NAME="book_name"; + public static String BOOK_AUTHOR="book_author"; + public static String PUBLISHER="publisher"; + public static String ISBN_NO="isbn_no"; + public static String PUBLICATION_DATE="publication_date"; + + +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/ConferenceSessionConstant.java b/Resume Builder/src/org/pk/resume/builder/session/ConferenceSessionConstant.java new file mode 100644 index 00000000..0f33ddba --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/ConferenceSessionConstant.java @@ -0,0 +1,18 @@ +package org.pk.resume.builder.session; + +public class ConferenceSessionConstant { + + public static String CONFERENCE_NAME="conference_name"; + public static String CONFERENCE_TYPE="conference_type"; + public static String PAPER_TITLE="paper_title"; + public static String AUTHOR="author"; + public static String DOPUBLICATION="dopublication"; + public static String PLACE="place"; + public static String VOLUME="volume"; + public static String PAGE_N0="page_no"; + public static String DOI_NO="doi_no"; + public static String LINK = "link"; + public static String IMPACT_FACTOR="impact_factor"; + public static String IMPACT_TYPE="impact_type"; + +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/EducationSession.java b/Resume Builder/src/org/pk/resume/builder/session/EducationSession.java new file mode 100644 index 00000000..b95fa51c --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/EducationSession.java @@ -0,0 +1,13 @@ +package org.pk.resume.builder.session; + +public class EducationSession { + + public static String SCHOOL_NAME = "school_name"; + public static String DEGREE = "degree"; + public static String SUBJECT = "subject"; + public static String YEAR = "year"; + public static String BOARD = "board"; + public static String OBTAINED_MARKS = "obtained_marks"; + public static String TOTAL_MARKS = "total_marks"; + public static String PERCENTAGE = "percentage"; +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/ExperienceSession.java b/Resume Builder/src/org/pk/resume/builder/session/ExperienceSession.java new file mode 100644 index 00000000..51ee4134 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/ExperienceSession.java @@ -0,0 +1,14 @@ +package org.pk.resume.builder.session; + +public class ExperienceSession { + + public static String EMPLOYER = "employer"; + public static String DESIGNATION = "designation"; + public static String JOININIG_DATE = "joining_date"; + public static String LEAVING_DATE = "leaving_date"; + public static String WORKING = "working"; + public static String EXPERIENCE = "experience"; + public static String SUBJECT_THAUGHT = "subject_thaught"; + public static String COURSE = "course"; + +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/ExpertActivitySessionConstant.java b/Resume Builder/src/org/pk/resume/builder/session/ExpertActivitySessionConstant.java new file mode 100644 index 00000000..66f52840 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/ExpertActivitySessionConstant.java @@ -0,0 +1,11 @@ +package org.pk.resume.builder.session; + +public class ExpertActivitySessionConstant { + + public static String EXPERT_ROLE = "expert_role"; + public static String LEVEL = "level"; + public static String ACTIVITY_TYPE = "activity_type"; + public static String PLACE = "place"; + public static String ISBN_NO = "isbn_no"; + +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/JournalSessionConstant.java b/Resume Builder/src/org/pk/resume/builder/session/JournalSessionConstant.java new file mode 100644 index 00000000..7b26fa26 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/JournalSessionConstant.java @@ -0,0 +1,20 @@ +package org.pk.resume.builder.session; + +public class JournalSessionConstant { + + public static String JOURNAL_NAME="journal_name"; + public static String JOURNAL_TYPE="journal_type"; + public static String PAPER_TITLE="paper_title"; + public static String AUTHOR="author"; + public static String DOPUBLICATION="dopublication"; + public static String PLACE="place"; + public static String VOLUME="volume"; + public static String PAGE_N0="page_no"; + public static String DOI_NO="doi_no"; + public static String LINK = "link"; + public static String IMPACT_FACTOR="impact_factor"; + public static String IMPACT_TYPE="impact_type"; + + + +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/MembershipSessionConstant.java b/Resume Builder/src/org/pk/resume/builder/session/MembershipSessionConstant.java new file mode 100644 index 00000000..4c392c32 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/MembershipSessionConstant.java @@ -0,0 +1,10 @@ +package org.pk.resume.builder.session; + +public class MembershipSessionConstant +{ + public static String NAME = "name"; + public static String PLACE = "place"; + public static String JOINING = "joining_year"; + public static String MEMBERSHIP_TYPE = "membership_type"; + public static String MEMBERSHIP_NO = "membership_no"; +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/ParticipationSessionConstant.java b/Resume Builder/src/org/pk/resume/builder/session/ParticipationSessionConstant.java new file mode 100644 index 00000000..2da009c5 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/ParticipationSessionConstant.java @@ -0,0 +1,12 @@ +package org.pk.resume.builder.session; + +public class ParticipationSessionConstant +{ + public static String PARTICIPATION = "parti"; + public static String START_DATE = "start_date"; + public static String END_DATE = "end_date"; + public static String SPONSOR = "sponsor"; + public static String NOTE = "note"; + public static String TOPIC = "topic"; + public static String PLACE = "place"; +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/PersonSession.java b/Resume Builder/src/org/pk/resume/builder/session/PersonSession.java new file mode 100644 index 00000000..0611de29 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/PersonSession.java @@ -0,0 +1,23 @@ +package org.pk.resume.builder.session; + +public class PersonSession { + + public static String NAME = "name"; + public static String FATHER_NAME = "father_name"; + public static String MOTHER_NAME = "mother_name"; + public static String SURNAME = "surname"; + public static String GENDER = "gender"; + public static String DOB = "dob"; + public static String AGE = "age"; + public static String NATIONALITY = "nationality"; + public static String ADDRESS = "address"; + public static String PLACE = "place"; + public static String CONTACT_NO = "contact"; + public static String MARITAL_STATUS = "marital_status"; + public static String MAIL = "mail"; + public static String LANGUAGES = "languages"; + public static String CAREER_OBJECTIVES = "career_objectives"; + public static String STRENGTHS = "strengths"; + public static String HOBBIES = "hobbies"; + +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/ProjectSessionConstant.java b/Resume Builder/src/org/pk/resume/builder/session/ProjectSessionConstant.java new file mode 100644 index 00000000..4ca32f64 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/ProjectSessionConstant.java @@ -0,0 +1,13 @@ +package org.pk.resume.builder.session; + +public class ProjectSessionConstant { + + public static String TITLE = "title"; + public static String GUIDE = "guide"; + public static String FRONT_END = "front_end"; + public static String BACK_END = "back_end"; + public static String INPUTS = "inputs"; + public static String OUTPUTS = "outputs"; + public static String DESCRIPTION = "description"; + +} diff --git a/Resume Builder/src/org/pk/resume/builder/session/ReferencesSessionConstant.java b/Resume Builder/src/org/pk/resume/builder/session/ReferencesSessionConstant.java new file mode 100644 index 00000000..9425bd61 --- /dev/null +++ b/Resume Builder/src/org/pk/resume/builder/session/ReferencesSessionConstant.java @@ -0,0 +1,11 @@ +package org.pk.resume.builder.session; + +public class ReferencesSessionConstant { + + public static String NAME = "name"; + public static String DESIGNATION = "designation"; + public static String AFFILIATION = "affiliation"; + public static String EMAILID = "emailId"; + public static String CONTACTNO = "contactNo"; + +} diff --git a/Reversal_Algorithm b/Reversal_Algorithm new file mode 100644 index 00000000..35ac5724 --- /dev/null +++ b/Reversal_Algorithm @@ -0,0 +1,31 @@ +package Algo; + +public class Reversal_Algorithm { + + public static void main(String[] args) { + // TODO Auto-generated method stub + int []arr= {1,2,3,4,5,6,7}; + int k=3; + RotateArray(arr,k); + for(int i=0;i<arr.length;i++) { + System.out.print(arr[i]+" "); + } + } + public static void RotateArray(int []arr,int k) { + int n=arr.length; + k=k%n; + Reverse(arr,0,n-1); + Reverse(arr,0,k-1); + Reverse(arr,k,n-1); + } + public static void Reverse(int []arr,int i,int j) { + while(i<j) { + int temp=arr[i]; + arr[i]=arr[j]; + arr[j]=temp; + i++; + j--; + } + } + +} diff --git a/ReverseLinkedList.java b/ReverseLinkedList.java new file mode 100644 index 00000000..cfaf1544 --- /dev/null +++ b/ReverseLinkedList.java @@ -0,0 +1,44 @@ +class ListNode { + int val; + ListNode next; + + ListNode(int val) { + this.val = val; + } +} + +public class ReverseLinkedList { + public ListNode reverseList(ListNode head) { + ListNode prev = null; + ListNode current = head; + + while (current != null) { + ListNode nextTemp = current.next; + current.next = prev; + prev = current; + current = nextTemp; + } + + return prev; + } + + public static void main(String[] args) { + // Create a sample linked list: 1 -> 2 -> 3 -> 4 -> 5 + ListNode head = new ListNode(1); + head.next = new ListNode(2); + head.next.next = new ListNode(3); + head.next.next.next = new ListNode(4); + head.next.next.next.next = new ListNode(5); + + ReverseLinkedList solution = new ReverseLinkedList(); + ListNode reversedHead = solution.reverseList(head); + + // Print the reversed linked list: 5 -> 4 -> 3 -> 2 -> 1 + ListNode current = reversedHead; + while (current != null) { + System.out.print(current.val + " -> "); + current = current.next; + } + System.out.println("null"); + } +} diff --git a/ReverseWords.java b/ReverseWords.java new file mode 100644 index 00000000..9e5005d4 --- /dev/null +++ b/ReverseWords.java @@ -0,0 +1,27 @@ +// Reverse words in a String without using functions + +import java.util.Scanner; + +public class Main { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + System.out.print("Original string : "); + + String originalStr = scanner.nextLine(); + scanner.close(); + + String words[] = originalStr.split("\\s"); + String reversedString = ""; + + //Reverse each word's position + for (int i = 0; i < words.length; i++) { + if (i == words.length - 1) + reversedString = words[i] + reversedString; + else + reversedString = " " + words[i] + reversedString; + } + + // Displaying the string after reverse + System.out.print("Reversed string : " + reversedString); + } +} diff --git a/Reverse_Linked_List.java b/Reverse_Linked_List.java new file mode 100644 index 00000000..edb03a52 --- /dev/null +++ b/Reverse_Linked_List.java @@ -0,0 +1,23 @@ +/** + * Definition for singly-linked list. + * public class ListNode { + * int val; + * ListNode next; + * ListNode() {} + * ListNode(int val) { this.val = val; } + * ListNode(int val, ListNode next) { this.val = val; this.next = next; } + * } + */ + +class Solution { + public ListNode reverseList(ListNode head) { + ListNode newHead = null; + while (head != null) { + ListNode next = head.next; + head.next = newHead; + newHead = head; + head = next; + } + return newHead; + } +} \ No newline at end of file diff --git a/Riddle Game/riddle_game.java b/Riddle Game/riddle_game.java new file mode 100644 index 00000000..1435ca6e --- /dev/null +++ b/Riddle Game/riddle_game.java @@ -0,0 +1,83 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +public class RiddleGame extends JFrame { + private String[] riddles = { + "I speak without a mouth and hear without ears. I have no body, but I come alive with wind. What am I?", + "I'm not alive, but I can grow; I don't have lungs, but I need air; I don't have a mouth, but water kills me. What am I?", + "I have keys but can't open locks. What am I?", + "I am taken from a mine, and shut up in a wooden case, from which I am never released, and yet I am used by almost every person. What am I?", + "The more you take, the more you leave behind. What am I?", + "I have cities but no houses, forests but no trees, and rivers but no water. What am I?", + "I'm tall when I'm young and short when I'm old. What am I?" + }; + private String[] answers = { + "An echo", + "A fire", + "A piano", + "Pencil lead (graphite)", + "Footsteps", + "A map", + "A candle" + }; + + private int currentRiddleIndex = 0; + private JLabel riddleLabel; + private JTextField answerField; + private JButton submitButton; + + public RiddleGame() { + setTitle("Riddle Game"); + setSize(400, 200); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setLayout(new BorderLayout()); + + riddleLabel = new JLabel(riddles[currentRiddleIndex]); + answerField = new JTextField(20); + submitButton = new JButton("Submit"); + + JPanel centerPanel = new JPanel(); + centerPanel.setLayout(new GridLayout(3, 1)); + centerPanel.add(riddleLabel); + centerPanel.add(answerField); + centerPanel.add(submitButton); + + add(centerPanel, BorderLayout.CENTER); + + submitButton.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + checkAnswer(); + } + }); + } + + private void checkAnswer() { + String userAnswer = answerField.getText().trim().toLowerCase(); + String correctAnswer = answers[currentRiddleIndex].toLowerCase(); + + if (userAnswer.equals(correctAnswer)) { + JOptionPane.showMessageDialog(this, "Correct!"); + } else { + JOptionPane.showMessageDialog(this, "Incorrect. Try again."); + } + + currentRiddleIndex++; + if (currentRiddleIndex < riddles.length) { + riddleLabel.setText(riddles[currentRiddleIndex]); + answerField.setText(""); + } else { + JOptionPane.showMessageDialog(this, "Congratulations! You've completed all the riddles."); + System.exit(0); + } + } + + public static void main(String[] args) { + SwingUtilities.invokeLater(() -> { + RiddleGame game = new RiddleGame(); + game.setVisible(true); + }); + } +} diff --git a/RiddleQuestGame/game.java b/RiddleQuestGame/game.java new file mode 100644 index 00000000..3506e2fd --- /dev/null +++ b/RiddleQuestGame/game.java @@ -0,0 +1,38 @@ +import java.util.Random; +import java.util.Scanner; + +public class RiddleQuest { + public static void main(String[] args) { + Random random = new Random(); + int secretNumber = random.nextInt(100) + 1; // Random number between 1 and 100 + int attempts = 10; // Number of attempts allowed + + System.out.println("Welcome to the Unknown Hard Game!"); + System.out.println("You have to guess a number between 1 and 100 in " + attempts + " attempts."); + + Scanner scanner = new Scanner(System.in); + int guess; + boolean hasGuessedCorrectly = false; + + for (int i = 1; i <= attempts; i++) { + System.out.print("Attempt " + i + ": Enter your guess: "); + guess = scanner.nextInt(); + + if (guess == secretNumber) { + hasGuessedCorrectly = true; + System.out.println("Congratulations! You've guessed the number."); + break; + } else if (guess < secretNumber) { + System.out.println("The number is higher."); + } else { + System.out.println("The number is lower."); + } + } + + if (!hasGuessedCorrectly) { + System.out.println("Sorry, you've run out of attempts. The secret number was " + secretNumber + "."); + } + + scanner.close(); + } +} diff --git a/RiddleQuestGame/readme.md b/RiddleQuestGame/readme.md new file mode 100644 index 00000000..fe4e55c2 --- /dev/null +++ b/RiddleQuestGame/readme.md @@ -0,0 +1,44 @@ +# Riddle Quest + +Welcome to **Riddle Quest**, a challenging number-guessing game in Java! + + + +## Overview + +In Riddle Quest, you'll embark on a journey to solve the ultimate numerical riddle. Your mission is to guess the hidden number within a limited number of attempts. Can you conquer the enigmatic digits? + +## How to Play + +1. **Prerequisites**: Ensure that you have Java installed on your computer. + +2. **Getting Started**: + - Compile the `RiddleQuest.java` file: + ```bash + javac RiddleQuest.java + ``` + - Run the game: + ```bash + java RiddleQuest + ``` + +3. **Gameplay**: + - You have a total of 10 attempts to guess the secret number. + - After each guess, you'll receive hints to help you find the correct number. + - If you guess the number within the limited attempts, you win the game! + +4. **Win or Lose**: + - If you successfully guess the number, you'll be crowned the Riddle Quest champion. + - If you run out of attempts, the game will reveal the secret number, and you can try again. + +5. **Customization**: + - You can customize the game by modifying the code. Adjust the range of numbers, the number of attempts, or add unique features to make it your own. + +## Screenshots + +Include images or gifs of your game in action to make your README more engaging. + +## Contributing + +Contributions are welcome! If you have ideas for improvements or additional features, feel free to submit a pull request. + diff --git a/Rock game b/Rock game new file mode 100644 index 00000000..d7fc71a6 --- /dev/null +++ b/Rock game @@ -0,0 +1,71 @@ + import java.util.*; + import java.util.Random; + class Main{ + //ROCK PAPER SCISSOR GAME + public static void main(String []args){ + Scanner sc=new Scanner(System.in); + Random r=new Random(); + int a=0,b=0; + //a:you,b:computer points + System.out.println(" ROCK=0\n SCISSOR=1\n PAPER=2"); + for(int i=0;i<=5;i++){ + int x=sc.nextInt(); + int y=r.nextInt(2); + + if(x==y){ + System.out.println("you:"+x); + System.out.println("computer:"+y); + System.out.println("DRAW\n PLAY AGAIN"); + a++; + b++; + } + else if(x==0&&y==1){ + System.out.println("you:"+x); + System.out.println("computer:"+y); + System.out.println("you win\n PLAY AGAIN"); + a++; + } + else if(x==0&&y==2){ + System.out.println("you:"+x); + System.out.println("computer:"+y); + System.out.println("computer win\n PLAY AGAIN"); + b++; + } + else if(x==1&&y==2){ + System.out.println("you:"+x); + System.out.println("computer:"+y); + System.out.println("you win\n PLAY AGAIN"); + a++; + } + else if(y==0&&x==1){ + System.out.println("you:"+x); + System.out.println("computer:"+y); + System.out.println("computer win\n PLAY AGAIN"); + b++; + } + else if(y==0&&x==2){ + System.out.println("you:"+x); + System.out.println("computer:"+y); + System.out.println("you win\n PLAY AGAIN"); + a++; + } + else if(x==2&&y==1){ + System.out.println("you:"+x); + System.out.println("computer:"+y); + System.out.println("computer win\n PLAY AGAIN"); + b++; + } + else{ + System.out.println("you:"+x); + System.out.println("computer:"+y); + System.out.println("invalid"); + } + } + if(a>b){ + System.out.println("\n YOU WIN."); + } + else{ + System.out.println("\n COMPUTER WIN."); + } + } + } diff --git a/RockPaperScissor.js b/RockPaperScissor.js new file mode 100644 index 00000000..0bd8b3dc --- /dev/null +++ b/RockPaperScissor.js @@ -0,0 +1,46 @@ +import java.util.Scanner; +import java.util.Random; + +public class RockPaperScissors { + public static void main(String[] args) { + playGame(); + } + + public static String computerPlay() { + String[] choices = {"Rock", "Paper", "Scissors"}; + Random random = new Random(); + int randomIndex = random.nextInt(3); + return choices[randomIndex]; + } + + public static String playRound(String playerSelection, String computerSelection) { + playerSelection = playerSelection.toLowerCase(); + computerSelection = computerSelection.toLowerCase(); + + if (playerSelection.equals(computerSelection)) { + return "It's a tie!"; + } + + if ((playerSelection.equals("rock") && computerSelection.equals("scissors")) || + (playerSelection.equals("scissors") && computerSelection.equals("paper")) || + (playerSelection.equals("paper") && computerSelection.equals("rock"))) { + return "You win! " + playerSelection + " beats " + computerSelection; + } + + return "You lose! " + computerSelection + " beats " + playerSelection; + } + + public static void playGame() { + Scanner scanner = new Scanner(System.in); + + for (int i = 0; i < 5; i++) { + System.out.print("Rock, Paper, or Scissors? "); + String playerSelection = scanner.nextLine().trim(); + String computerSelection = computerPlay(); + String roundResult = playRound(playerSelection, computerSelection); + System.out.println(roundResult); + } + + scanner.close(); + } +} diff --git a/RockpaperScissorgame.java b/RockpaperScissorgame.java new file mode 100644 index 00000000..77a491a6 --- /dev/null +++ b/RockpaperScissorgame.java @@ -0,0 +1,35 @@ +import java.util.Random; +import java.util.Scanner; + +public class Rockpapergame { + public static void main(String[] args) { + + Scanner sc= new Scanner(System.in); + Random rc = new Random(); + + System.out.println("enter 0 for rock, 1 for Paper and 2 for scissor"); + int user = sc.nextInt(); + + int computer = rc.nextInt(3); + + if (user == computer ) { + System.out.println("draw"); + } else if ( user==0 && computer==1 || user ==1 && computer==2 || user==2 && computer==0){ + System.out.println("you lost"); + } else { + System.out.println("you win "); + } + System.out.println("computer chose : " +computer); + if (computer==0){ + System.out.println("computer chose rock"); + }else if (computer==1 ) { + System.out.println("computer chose paper"); + + + }else { + System.out.println("computer chose rock"); + } + + + } +} diff --git a/Save1.class b/Save1.class new file mode 100644 index 00000000..4dcab002 Binary files /dev/null and b/Save1.class differ diff --git a/Save2.class b/Save2.class new file mode 100644 index 00000000..fa4b0a67 Binary files /dev/null and b/Save2.class differ diff --git a/Scientific Calculator/.DS_Store b/Scientific Calculator/.DS_Store new file mode 100644 index 00000000..fd239cf2 Binary files /dev/null and b/Scientific Calculator/.DS_Store differ diff --git a/Scientific Calculator/build.xml b/Scientific Calculator/build.xml new file mode 100644 index 00000000..5c7f54f5 --- /dev/null +++ b/Scientific Calculator/build.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<!-- By default, only the Clean and Build commands use this build script. --> +<!-- Commands such as Run, Debug, and Test only use this build script if --> +<!-- the Compile on Save feature is turned off for the project. --> +<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> +<!-- in the project's Project Properties dialog box.--> +<project name="calculator" default="default" basedir="."> + <description>Builds, tests, and runs the project calculator.</description> + <import file="nbproject/build-impl.xml"/> + <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-jar: called before JAR building + -post-jar: called after JAR building + -post-clean: called after cleaning build products + + (Targets beginning with '-' are not intended to be called on their own.) + + Example of inserting an obfuscator after compilation could look like this: + + <target name="-post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Another way to customize the build is by overriding existing main targets. + The targets of interest are: + + -init-macrodef-javac: defines macro for javac compilation + -init-macrodef-junit: defines macro for junit execution + -init-macrodef-debug: defines macro for class debugging + -init-macrodef-java: defines macro for class execution + -do-jar: JAR building + run: execution of project + -javadoc-build: Javadoc generation + test-report: JUnit report generation + + An example of overriding the target for project execution could look like this: + + <target name="run" depends="calculator-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that the overridden target depends on the jar target and not only on + the compile target as the regular run target does. Again, for a list of available + properties which you can use, check the target you are overriding in the + nbproject/build-impl.xml file. + + --> +</project> diff --git a/Scientific Calculator/build/built-jar.properties b/Scientific Calculator/build/built-jar.properties new file mode 100644 index 00000000..18b33f0e --- /dev/null +++ b/Scientific Calculator/build/built-jar.properties @@ -0,0 +1,4 @@ +#Sat, 12 Dec 2015 00:46:39 +0530 + + +C\:\\Users\\KHAN\\Documents\\NetBeansProjects\\finis= diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$1.class b/Scientific Calculator/build/classes/sibincalculator/calcu$1.class new file mode 100644 index 00000000..b7e9316c Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$1.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$10.class b/Scientific Calculator/build/classes/sibincalculator/calcu$10.class new file mode 100644 index 00000000..2b2fd63f Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$10.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$11.class b/Scientific Calculator/build/classes/sibincalculator/calcu$11.class new file mode 100644 index 00000000..7e1eacf4 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$11.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$12.class b/Scientific Calculator/build/classes/sibincalculator/calcu$12.class new file mode 100644 index 00000000..940ccb87 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$12.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$13.class b/Scientific Calculator/build/classes/sibincalculator/calcu$13.class new file mode 100644 index 00000000..277517dc Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$13.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$14.class b/Scientific Calculator/build/classes/sibincalculator/calcu$14.class new file mode 100644 index 00000000..6c771719 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$14.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$15.class b/Scientific Calculator/build/classes/sibincalculator/calcu$15.class new file mode 100644 index 00000000..2c9b80ec Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$15.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$16.class b/Scientific Calculator/build/classes/sibincalculator/calcu$16.class new file mode 100644 index 00000000..7cc40cf0 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$16.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$17.class b/Scientific Calculator/build/classes/sibincalculator/calcu$17.class new file mode 100644 index 00000000..6b1e3055 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$17.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$18.class b/Scientific Calculator/build/classes/sibincalculator/calcu$18.class new file mode 100644 index 00000000..31674bd2 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$18.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$19.class b/Scientific Calculator/build/classes/sibincalculator/calcu$19.class new file mode 100644 index 00000000..94a870a1 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$19.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$2.class b/Scientific Calculator/build/classes/sibincalculator/calcu$2.class new file mode 100644 index 00000000..7b0fcd58 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$2.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$20.class b/Scientific Calculator/build/classes/sibincalculator/calcu$20.class new file mode 100644 index 00000000..3cef9df2 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$20.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$21.class b/Scientific Calculator/build/classes/sibincalculator/calcu$21.class new file mode 100644 index 00000000..db793abd Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$21.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$22.class b/Scientific Calculator/build/classes/sibincalculator/calcu$22.class new file mode 100644 index 00000000..bca61102 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$22.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$23.class b/Scientific Calculator/build/classes/sibincalculator/calcu$23.class new file mode 100644 index 00000000..b97da442 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$23.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$24.class b/Scientific Calculator/build/classes/sibincalculator/calcu$24.class new file mode 100644 index 00000000..e88c1661 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$24.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$25.class b/Scientific Calculator/build/classes/sibincalculator/calcu$25.class new file mode 100644 index 00000000..a70dfa73 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$25.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$26.class b/Scientific Calculator/build/classes/sibincalculator/calcu$26.class new file mode 100644 index 00000000..3eab29be Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$26.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$27.class b/Scientific Calculator/build/classes/sibincalculator/calcu$27.class new file mode 100644 index 00000000..7c3cf683 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$27.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$28.class b/Scientific Calculator/build/classes/sibincalculator/calcu$28.class new file mode 100644 index 00000000..e1b84f1e Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$28.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$29.class b/Scientific Calculator/build/classes/sibincalculator/calcu$29.class new file mode 100644 index 00000000..c169ed11 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$29.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$3.class b/Scientific Calculator/build/classes/sibincalculator/calcu$3.class new file mode 100644 index 00000000..76916d0b Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$3.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$30.class b/Scientific Calculator/build/classes/sibincalculator/calcu$30.class new file mode 100644 index 00000000..4cd1f1f6 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$30.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$31.class b/Scientific Calculator/build/classes/sibincalculator/calcu$31.class new file mode 100644 index 00000000..062aa61c Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$31.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$32.class b/Scientific Calculator/build/classes/sibincalculator/calcu$32.class new file mode 100644 index 00000000..8b24619e Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$32.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$33.class b/Scientific Calculator/build/classes/sibincalculator/calcu$33.class new file mode 100644 index 00000000..b36e0cbc Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$33.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$34.class b/Scientific Calculator/build/classes/sibincalculator/calcu$34.class new file mode 100644 index 00000000..4c592586 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$34.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$35.class b/Scientific Calculator/build/classes/sibincalculator/calcu$35.class new file mode 100644 index 00000000..c83221a6 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$35.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$36.class b/Scientific Calculator/build/classes/sibincalculator/calcu$36.class new file mode 100644 index 00000000..e4435a5d Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$36.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$37.class b/Scientific Calculator/build/classes/sibincalculator/calcu$37.class new file mode 100644 index 00000000..a92d8937 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$37.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$38.class b/Scientific Calculator/build/classes/sibincalculator/calcu$38.class new file mode 100644 index 00000000..7f66f54e Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$38.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$39.class b/Scientific Calculator/build/classes/sibincalculator/calcu$39.class new file mode 100644 index 00000000..a287b783 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$39.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$4.class b/Scientific Calculator/build/classes/sibincalculator/calcu$4.class new file mode 100644 index 00000000..d0c98394 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$4.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$40.class b/Scientific Calculator/build/classes/sibincalculator/calcu$40.class new file mode 100644 index 00000000..94c2575d Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$40.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$41.class b/Scientific Calculator/build/classes/sibincalculator/calcu$41.class new file mode 100644 index 00000000..a3551e40 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$41.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$42.class b/Scientific Calculator/build/classes/sibincalculator/calcu$42.class new file mode 100644 index 00000000..1d258487 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$42.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$43.class b/Scientific Calculator/build/classes/sibincalculator/calcu$43.class new file mode 100644 index 00000000..fdf756b2 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$43.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$44.class b/Scientific Calculator/build/classes/sibincalculator/calcu$44.class new file mode 100644 index 00000000..539e60f2 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$44.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$45.class b/Scientific Calculator/build/classes/sibincalculator/calcu$45.class new file mode 100644 index 00000000..11ea3bfc Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$45.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$46.class b/Scientific Calculator/build/classes/sibincalculator/calcu$46.class new file mode 100644 index 00000000..b36f7ff7 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$46.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$5.class b/Scientific Calculator/build/classes/sibincalculator/calcu$5.class new file mode 100644 index 00000000..05d92c9e Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$5.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$6.class b/Scientific Calculator/build/classes/sibincalculator/calcu$6.class new file mode 100644 index 00000000..26e7ed01 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$6.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$7.class b/Scientific Calculator/build/classes/sibincalculator/calcu$7.class new file mode 100644 index 00000000..89cde97e Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$7.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$8.class b/Scientific Calculator/build/classes/sibincalculator/calcu$8.class new file mode 100644 index 00000000..ededf3e9 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$8.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu$9.class b/Scientific Calculator/build/classes/sibincalculator/calcu$9.class new file mode 100644 index 00000000..90610b94 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu$9.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu.class b/Scientific Calculator/build/classes/sibincalculator/calcu.class new file mode 100644 index 00000000..c5e43109 Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/calcu.class differ diff --git a/Scientific Calculator/build/classes/sibincalculator/calcu.form b/Scientific Calculator/build/classes/sibincalculator/calcu.form new file mode 100644 index 00000000..6481066e --- /dev/null +++ b/Scientific Calculator/build/classes/sibincalculator/calcu.form @@ -0,0 +1,930 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jPanel1" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton43" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jButton37" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton38" min="-2" max="-2" attributes="0"/> + <Component id="jButton45" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="57" max="-2" attributes="0"/> + <Component id="jButton33" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> + <Component id="jTextField1" min="-2" pref="396" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton34" min="-2" max="-2" attributes="0"/> + <Component id="jButton15" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="116" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="33" max="-2" attributes="0"/> + <Component id="jTextField1" min="-2" pref="33" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="jButton34" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jButton15" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="15" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton37" alignment="3" min="-2" pref="33" max="-2" attributes="0"/> + <Component id="jButton38" alignment="3" min="-2" pref="33" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton43" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jButton45" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jButton33" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace pref="51" max="32767" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel2"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.MatteColorBorderInfo"> + <MatteColorBorder/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace pref="29" max="32767" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="103" alignment="1" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jButton7" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton8" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton9" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton42" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton4" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton5" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton6" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton41" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton2" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton3" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton39" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jButton10" min="-2" pref="41" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton11" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton40" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton44" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton39" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton6" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton41" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton7" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton8" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton9" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton42" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton10" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton11" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton40" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton44" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="text" type="java.lang.String" value="2"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="text" type="java.lang.String" value="3"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton4"> + <Properties> + <Property name="text" type="java.lang.String" value="4"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="text" type="java.lang.String" value="5"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton6"> + <Properties> + <Property name="text" type="java.lang.String" value="6"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton7"> + <Properties> + <Property name="text" type="java.lang.String" value="7"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton7ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton8"> + <Properties> + <Property name="text" type="java.lang.String" value="8"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton8ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton9"> + <Properties> + <Property name="text" type="java.lang.String" value="9"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton9ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton10"> + <Properties> + <Property name="text" type="java.lang.String" value="0"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton10ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton11"> + <Properties> + <Property name="text" type="java.lang.String" value="."/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton11ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton39"> + <Properties> + <Property name="text" type="java.lang.String" value="+"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton39ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton41"> + <Properties> + <Property name="text" type="java.lang.String" value="*"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton41ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton42"> + <Properties> + <Property name="text" type="java.lang.String" value="/"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton42ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton40"> + <Properties> + <Property name="text" type="java.lang.String" value="-"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton40ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton44"> + <Properties> + <Property name="text" type="java.lang.String" value="C"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton44ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.MatteColorBorderInfo"> + <MatteColorBorder/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton19" min="-2" max="-2" attributes="0"/> + <Component id="jButton16" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="jButton12" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jButton22" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jButton23" max="32767" attributes="0"/> + <Component id="jButton20" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jButton24" max="32767" attributes="0"/> + <Component id="jButton21" max="32767" attributes="0"/> + </Group> + </Group> + <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jButton13" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton14" min="-2" pref="71" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton17" pref="73" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="7" max="-2" attributes="0"/> + <Component id="jButton18" min="-2" pref="71" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace min="0" pref="2" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton12" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton13" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton14" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton16" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton17" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton18" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="7" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton19" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton20" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton21" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="3" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton22" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton23" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton24" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton12"> + <Properties> + <Property name="text" type="java.lang.String" value="sin"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton12ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton13"> + <Properties> + <Property name="text" type="java.lang.String" value="cos"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton13ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton14"> + <Properties> + <Property name="text" type="java.lang.String" value="tan"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[75, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton14ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton16"> + <Properties> + <Property name="text" type="java.lang.String" value="sinh"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton16ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton17"> + <Properties> + <Property name="text" type="java.lang.String" value="cosh"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton17ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton18"> + <Properties> + <Property name="text" type="java.lang.String" value="tanh"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[75, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton18ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton19"> + <Properties> + <Property name="text" type="java.lang.String" value="sin^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton19ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton20"> + <Properties> + <Property name="text" type="java.lang.String" value="cos^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton20ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton21"> + <Properties> + <Property name="text" type="java.lang.String" value="tan^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton21ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton22"> + <Properties> + <Property name="text" type="java.lang.String" value="sinh^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton22ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton23"> + <Properties> + <Property name="text" type="java.lang.String" value="cosh^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[73, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton23ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton24"> + <Properties> + <Property name="text" type="java.lang.String" value="tanh^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[75, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton24ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton15"> + <Properties> + <Property name="text" type="java.lang.String" value="="/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton15ActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JPanel" name="jPanel3"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.MatteColorBorderInfo"> + <MatteColorBorder/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton25" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton26" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton27" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton28" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton29" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton31" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton35" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton36" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton30" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton32" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton46" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton47" min="-2" pref="58" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton25" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton26" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton27" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton28" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="5" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton35" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton36" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton31" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton29" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton30" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton32" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton46" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton47" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton25"> + <Properties> + <Property name="text" type="java.lang.String" value="x^2"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton25ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton26"> + <Properties> + <Property name="text" type="java.lang.String" value="x^3"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton26ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton27"> + <Properties> + <Property name="text" type="java.lang.String" value="^"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton27ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton28"> + <Properties> + <Property name="text" type="java.lang.String" value="1/x"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton28ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton29"> + <Properties> + <Property name="text" type="java.lang.String" value="x!"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton29ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton31"> + <Properties> + <Property name="text" type="java.lang.String" value="10^x"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton31ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton35"> + <Properties> + <Property name="text" type="java.lang.String" value="√"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton35ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton36"> + <Properties> + <Property name="text" type="java.lang.String" value="3√"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton36ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton30"> + <Properties> + <Property name="text" type="java.lang.String" value="log"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton30ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton32"> + <Properties> + <Property name="text" type="java.lang.String" value="exp"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton32ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton46"> + <Properties> + <Property name="text" type="java.lang.String" value="rad"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton46ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton47"> + <Properties> + <Property name="text" type="java.lang.String" value="PI"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton47ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton33"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="0" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="close"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[80, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton33ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton34"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton34ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton37"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Converter"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[84, 23]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton37ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton38"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="mat/vect"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[82, 23]"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField1"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton43"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="i+nj"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[82, 30]"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="jButton45"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Equation"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[82, 30]"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="10" style="3"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="33" red="33" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Developed by sibin,9746097336"/> + </Properties> + </Component> + </SubComponents> +</Form> diff --git a/Scientific Calculator/build/classes/sibincalculator/inverse.class b/Scientific Calculator/build/classes/sibincalculator/inverse.class new file mode 100644 index 00000000..372dacee Binary files /dev/null and b/Scientific Calculator/build/classes/sibincalculator/inverse.class differ diff --git a/Scientific Calculator/dist/README.TXT b/Scientific Calculator/dist/README.TXT new file mode 100644 index 00000000..bb744700 --- /dev/null +++ b/Scientific Calculator/dist/README.TXT @@ -0,0 +1,32 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "calculator.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/Scientific Calculator/dist/calculator.jar b/Scientific Calculator/dist/calculator.jar new file mode 100644 index 00000000..14602014 Binary files /dev/null and b/Scientific Calculator/dist/calculator.jar differ diff --git a/Scientific Calculator/manifest.mf b/Scientific Calculator/manifest.mf new file mode 100644 index 00000000..328e8e5b --- /dev/null +++ b/Scientific Calculator/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Scientific Calculator/nbproject/build-impl.xml b/Scientific Calculator/nbproject/build-impl.xml new file mode 100644 index 00000000..698ad198 --- /dev/null +++ b/Scientific Calculator/nbproject/build-impl.xml @@ -0,0 +1,1413 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +*** GENERATED FROM project.xml - DO NOT EDIT *** +*** EDIT ../build.xml INSTEAD *** + +For the purpose of easier reading the script +is divided into following sections: + + - initialization + - compilation + - jar + - execution + - debugging + - javadoc + - test compilation + - test execution + - test debugging + - applet + - cleanup + + --> +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="calculator-impl"> + <fail message="Please build using Ant 1.8.0 or higher."> + <condition> + <not> + <antversion atleast="1.8.0"/> + </not> + </condition> + </fail> + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> + <!-- + ====================== + INITIALIZATION SECTION + ====================== + --> + <target name="-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init" name="-init-private"> + <property file="nbproject/private/config.properties"/> + <property file="nbproject/private/configs/${config}.properties"/> + <property file="nbproject/private/private.properties"/> + </target> + <target depends="-pre-init,-init-private" name="-init-user"> + <property file="${user.properties.file}"/> + <!-- The two properties below are usually overridden --> + <!-- by the active platform. Just a fallback. --> + <property name="default.javac.source" value="1.4"/> + <property name="default.javac.target" value="1.4"/> + </target> + <target depends="-pre-init,-init-private,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> + <property file="nbproject/project.properties"/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> + <property name="platform.java" value="${java.home}/bin/java"/> + <available file="${manifest.file}" property="manifest.available"/> + <condition property="splashscreen.available"> + <and> + <not> + <equals arg1="${application.splash}" arg2="" trim="true"/> + </not> + <available file="${application.splash}"/> + </and> + </condition> + <condition property="main.class.available"> + <and> + <isset property="main.class"/> + <not> + <equals arg1="${main.class}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition property="profile.available"> + <and> + <isset property="javac.profile"/> + <length length="0" string="${javac.profile}" when="greater"/> + <matches pattern="1\.[89](\..*)?" string="${javac.source}"/> + </and> + </condition> + <condition property="do.archive"> + <or> + <not> + <istrue value="${jar.archive.disabled}"/> + </not> + <istrue value="${not.archive.disabled}"/> + </or> + </condition> + <condition property="do.mkdist"> + <and> + <isset property="do.archive"/> + <isset property="libs.CopyLibs.classpath"/> + <not> + <istrue value="${mkdist.disabled}"/> + </not> + </and> + </condition> + <condition property="do.archive+manifest.available"> + <and> + <isset property="manifest.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+main.class.available"> + <and> + <isset property="main.class.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+splashscreen.available"> + <and> + <isset property="splashscreen.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+profile.available"> + <and> + <isset property="profile.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="have.tests"> + <or> + <available file="${test.src.dir}"/> + </or> + </condition> + <condition property="have.sources"> + <or> + <available file="${src.dir}"/> + </or> + </condition> + <condition property="netbeans.home+have.tests"> + <and> + <isset property="netbeans.home"/> + <isset property="have.tests"/> + </and> + </condition> + <condition property="no.javadoc.preview"> + <and> + <isset property="javadoc.preview"/> + <isfalse value="${javadoc.preview}"/> + </and> + </condition> + <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> + <property name="javac.compilerargs" value=""/> + <property name="work.dir" value="${basedir}"/> + <condition property="no.deps"> + <and> + <istrue value="${no.dependencies}"/> + </and> + </condition> + <property name="javac.debug" value="true"/> + <property name="javadoc.preview" value="true"/> + <property name="application.args" value=""/> + <property name="source.encoding" value="${file.encoding}"/> + <property name="runtime.encoding" value="${source.encoding}"/> + <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> + <and> + <isset property="javadoc.encoding"/> + <not> + <equals arg1="${javadoc.encoding}" arg2=""/> + </not> + </and> + </condition> + <property name="javadoc.encoding.used" value="${source.encoding}"/> + <property name="includes" value="**"/> + <property name="excludes" value=""/> + <property name="do.depend" value="false"/> + <condition property="do.depend.true"> + <istrue value="${do.depend}"/> + </condition> + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> + <and> + <isset property="endorsed.classpath"/> + <not> + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> + <isset property="profile.available"/> + </condition> + <condition else="false" property="jdkBug6558476"> + <and> + <matches pattern="1\.[56]" string="${java.specification.version}"/> + <not> + <os family="unix"/> + </not> + </and> + </condition> + <property name="javac.fork" value="${jdkBug6558476}"/> + <property name="jar.index" value="false"/> + <property name="jar.index.metainf" value="${jar.index}"/> + <property name="copylibs.rebase" value="true"/> + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + </target> + <target name="-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> + <fail unless="src.dir">Must set src.dir</fail> + <fail unless="test.src.dir">Must set test.src.dir</fail> + <fail unless="build.dir">Must set build.dir</fail> + <fail unless="dist.dir">Must set dist.dir</fail> + <fail unless="build.classes.dir">Must set build.classes.dir</fail> + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> + <fail unless="dist.jar">Must set dist.jar</fail> + </target> + <target name="-init-macrodef-property"> + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${@{value}}"/> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <mkdir dir="@{apgeneratedsrcdir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <compilerarg value="-processorpath"/> + <compilerarg path="@{processorpath}:${empty.dir}"/> + <compilerarg line="${ap.processors.internal}"/> + <compilerarg line="${annotation.processing.processor.options}"/> + <compilerarg value="-s"/> + <compilerarg path="@{apgeneratedsrcdir}"/> + <compilerarg line="${ap.proc.none.internal}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <sequential> + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </depend> + </sequential> + </macrodef> + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${build.classes.dir}" name="destdir"/> + <sequential> + <fail unless="javac.includes">Must set javac.includes</fail> + <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> + <path> + <filelist dir="@{destdir}" files="${javac.includes}"/> + </path> + <globmapper from="*.java" to="*.class"/> + </pathconvert> + <tempfile deleteonexit="true" property="javac.includesfile.binary"/> + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> + <delete> + <files includesfile="${javac.includesfile.binary}"/> + </delete> + <delete> + <fileset file="${javac.includesfile.binary}"/> + </delete> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target name="-init-test-properties"> + <property name="test.binaryincludes" value="<nothing>"/> + <property name="test.binarytestincludes" value=""/> + <property name="test.binaryexcludes" value=""/> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="calculator" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename calculator -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> + <macrodef name="resolve"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${env.@{value}}"/> + </sequential> + </macrodef> + <macrodef name="profile"> + <attribute default="${main.class}" name="classname"/> + <element name="customize" optional="true"/> + <sequential> + <property environment="env"/> + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> + <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <arg line="${application.args}"/> + <classpath> + <path path="${run.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> + </target> + <!-- + end of pre NB7.2 profiling section + --> + <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="name"/> + <attribute default="${debug.classpath}" name="classpath"/> + <attribute default="" name="stopclassname"/> + <sequential> + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </nbjpdastart> + </sequential> + </macrodef> + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${build.classes.dir}" name="dir"/> + <sequential> + <nbjpdareload> + <fileset dir="@{dir}" includes="${fix.classes}"> + <include name="${fix.includes}*.class"/> + </fileset> + </nbjpdareload> + </sequential> + </macrodef> + </target> + <target name="-init-debug-args"> + <property name="version-output" value="java version "${ant.java.version}"/> + <condition property="have-jdk-older-than-1.4"> + <or> + <contains string="${version-output}" substring="java version "1.0"/> + <contains string="${version-output}" substring="java version "1.1"/> + <contains string="${version-output}" substring="java version "1.2"/> + <contains string="${version-output}" substring="java version "1.3"/> + </or> + </condition> + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> + <istrue value="${have-jdk-older-than-1.4}"/> + </condition> + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> + <os family="windows"/> + </condition> + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> + <isset property="debug.transport"/> + </condition> + </target> + <target depends="-init-debug-args" name="-init-macrodef-debug"> + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${debug.classpath}" name="classpath"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-java"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-copylibs"> + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${manifest.file}" name="manifest"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert pathsep=" " property="jar.classpath"> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + <manifest> + <attribute name="Class-Path" value="${jar.classpath}"/> + <customize/> + </manifest> + </copylibs> + </sequential> + </macrodef> + </target> + <target name="-init-presetdef-jar"> + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + </jar> + </presetdef> + </target> + <target name="-init-ap-cmdline-properties"> + <property name="annotation.processing.enabled" value="true"/> + <property name="annotation.processing.processors.list" value=""/> + <property name="annotation.processing.processor.options" value=""/> + <property name="annotation.processing.run.all.processors" value="true"/> + <property name="javac.processorpath" value="${javac.classpath}"/> + <property name="javac.test.processorpath" value="${javac.test.classpath}"/> + <condition property="ap.supported.internal" value="true"> + <not> + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> + </not> + </condition> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> + <isfalse value="${annotation.processing.run.all.processors}"/> + </condition> + <condition else="" property="ap.proc.none.internal" value="-proc:none"> + <isfalse value="${annotation.processing.enabled}"/> + </condition> + </target> + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> + <property name="ap.cmd.line.internal" value=""/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> + <!-- + =================== + COMPILATION SECTION + =================== + --> + <target name="-deps-jar-init" unless="built-jar.properties"> + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> + <delete file="${built-jar.properties}" quiet="true"/> + </target> + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> + <echo level="warn" message="Cycle detected: calculator was already built"/> + </target> + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-jar.properties}" verbose="false"/> + <property file="${built-jar.properties}" prefix="already.built.jar."/> + <antcall target="-warn-already-built-jar"/> + <propertyfile file="${built-jar.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> + <target depends="init" name="-check-automatic-build"> + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> + </target> + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> + <antcall target="clean"/> + </target> + <target depends="init,deps-jar" name="-pre-pre-compile"> + <mkdir dir="${build.classes.dir}"/> + </target> + <target name="-pre-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-depend"> + <pathconvert property="build.generated.subdirs"> + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </pathconvert> + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> + <copy todir="${build.classes.dir}"> + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target if="has.persistence.xml" name="-copy-persistence-xml"> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy todir="${build.classes.dir}/META-INF"> + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> + </copy> + </target> + <target name="-post-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> + <target name="-pre-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile/> + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> + </target> + <target name="-post-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> + <!-- + ==================== + JAR BUILDING SECTION + ==================== + --> + <target depends="init" name="-pre-pre-jar"> + <dirname file="${dist.jar}" property="dist.jar.dir"/> + <mkdir dir="${dist.jar.dir}"/> + </target> + <target name="-pre-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <touch file="${tmp.manifest.file}" verbose="false"/> + </target> + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> + <manifest file="${tmp.manifest.file}" mode="update"> + <attribute name="Main-Class" value="${main.class}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> + <manifest file="${tmp.manifest.file}" mode="update"> + <attribute name="Profile" value="${javac.profile}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> + <basename file="${application.splash}" property="splashscreen.basename"/> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> + <manifest file="${tmp.manifest.file}" mode="update"> + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> + </manifest> + </target> + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs"> + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> + <echo level="info">To run this application from the command line without Ant, try:</echo> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <echo level="info">java -jar "${dist.jar.resolved}"</echo> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> + <j2seproject1:jar manifest="${tmp.manifest.file}"/> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <pathconvert property="run.classpath.with.dist.jar"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> + </pathconvert> + <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}"> + <isset property="main.class.available"/> + </condition> + <condition else="debug" property="jar.usage.level" value="info"> + <isset property="main.class.available"/> + </condition> + <echo level="${jar.usage.level}" message="${jar.usage.message}"/> + </target> + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> + <delete> + <fileset file="${tmp.manifest.file}"/> + </delete> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> + <target name="-post-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> + <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/> + <!-- + ================= + EXECUTION SECTION + ================= + --> + <target depends="init,compile" description="Run a main class." name="run"> + <j2seproject1:java> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject1:java> + </target> + <target name="-do-not-recompile"> + <property name="javac.includes.binary" value=""/> + </target> + <target depends="init,compile-single" name="run-single"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}"/> + </target> + <target depends="init,compile-test-single" name="run-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> + </target> + <!-- + ================= + DEBUGGING SECTION + ================= + --> + <target depends="init" if="netbeans.home" name="-debug-start-debugger"> + <j2seproject1:nbjpdastart name="${debug.class}"/> + </target> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> + </target> + <target depends="init,compile" name="-debug-start-debuggee"> + <j2seproject3:debug> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> + <j2seproject1:nbjpdastart stopclassname="${main.class}"/> + </target> + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}"/> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> + <target depends="init" name="-pre-debug-fix"> + <fail unless="fix.includes">Must set fix.includes</fail> + <property name="javac.includes" value="${fix.includes}.java"/> + </target> + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> + <j2seproject1:nbjpdareload/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> + <!-- + ================= + PROFILING SECTION + ================= + --> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile/> + </target> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="${profile.class}"/> + </target> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </profile> + </target> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + </nbprofiledirect> + <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <test name="${profile.class}"/> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + </junit> + </target> + <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- + =============== + JAVADOC SECTION + =============== + --> + <target depends="init" if="have.sources" name="-javadoc-build"> + <mkdir dir="${dist.javadoc.dir}"/> + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> + <and> + <isset property="endorsed.classpath.cmd.line.arg"/> + <not> + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> + </not> + </and> + </condition> + <condition else="" property="bug5101868workaround" value="*.java"> + <matches pattern="1\.[56](\..*)?" string="${java.version}"/> + </condition> + <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> + <classpath> + <path path="${javac.classpath}"/> + </classpath> + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/*.java"/> + <exclude name="*.java"/> + </fileset> + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> + </javadoc> + <copy todir="${dist.javadoc.dir}"> + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/doc-files/**"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/doc-files/**"/> + </fileset> + </copy> + </target> + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> + <nbbrowse file="${dist.javadoc.dir}/index.html"/> + </target> + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> + <!-- + ========================= + TEST COMPILATION SECTION + ========================= + --> + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> + <mkdir dir="${build.test.classes.dir}"/> + </target> + <target name="-pre-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-test-depend"> + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + </target> + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> + <target name="-pre-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> + <!-- + ======================= + TEST EXECUTION SECTION + ======================= + --> + <target depends="init" if="have.tests" name="-pre-test-run"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/> + </target> + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init" if="have.tests" name="test-report"/> + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> + <target depends="init" if="have.tests" name="-pre-test-run-single"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> + <!-- + ======================= + TEST DEBUGGING SECTION + ======================= + --> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> + <!-- + ========================= + APPLET EXECUTION SECTION + ========================= + --> + <target depends="init,compile-single" name="run-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject1:java classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject1:java> + </target> + <!-- + ========================= + APPLET DEBUGGING SECTION + ========================= + --> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject3:debug classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> + <!-- + =============== + CLEANUP SECTION + =============== + --> + <target name="-deps-clean-init" unless="built-clean.properties"> + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> + <delete file="${built-clean.properties}" quiet="true"/> + </target> + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> + <echo level="warn" message="Cycle detected: calculator was already built"/> + </target> + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-clean.properties}" verbose="false"/> + <property file="${built-clean.properties}" prefix="already.built.clean."/> + <antcall target="-warn-already-built-clean"/> + <propertyfile file="${built-clean.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init" name="-do-clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> + </target> + <target name="-post-clean"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> + <target name="-check-call-dep"> + <property file="${call.built.properties}" prefix="already.built."/> + <condition property="should.call.dep"> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> + </condition> + </target> + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> + <ant antfile="${call.script}" inheritall="false" target="${call.target}"> + <propertyset> + <propertyref prefix="transfer."/> + <mapper from="transfer.*" to="*" type="glob"/> + </propertyset> + </ant> + </target> +</project> diff --git a/Scientific Calculator/nbproject/genfiles.properties b/Scientific Calculator/nbproject/genfiles.properties new file mode 100644 index 00000000..48a587d3 --- /dev/null +++ b/Scientific Calculator/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=becb7077 +build.xml.script.CRC32=7618ae60 +build.xml.stylesheet.CRC32=8064a381@1.75.2.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=becb7077 +nbproject/build-impl.xml.script.CRC32=863bfab4 +nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff --git a/Scientific Calculator/nbproject/private/private.properties b/Scientific Calculator/nbproject/private/private.properties new file mode 100644 index 00000000..a4795586 --- /dev/null +++ b/Scientific Calculator/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\KHAN\\AppData\\Roaming\\NetBeans\\8.0.2\\build.properties diff --git a/Scientific Calculator/nbproject/private/private.xml b/Scientific Calculator/nbproject/private/private.xml new file mode 100644 index 00000000..6807a2ba --- /dev/null +++ b/Scientific Calculator/nbproject/private/private.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> + <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> + <group/> + </open-files> +</project-private> diff --git a/Scientific Calculator/nbproject/project.properties b/Scientific Calculator/nbproject/project.properties new file mode 100644 index 00000000..117fec99 --- /dev/null +++ b/Scientific Calculator/nbproject/project.properties @@ -0,0 +1,73 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/calculator.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=sibincalculator.calcu +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Scientific Calculator/nbproject/project.xml b/Scientific Calculator/nbproject/project.xml new file mode 100644 index 00000000..ad93c052 --- /dev/null +++ b/Scientific Calculator/nbproject/project.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.java.j2seproject</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> + <name>calculator</name> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> + </data> + </configuration> +</project> diff --git a/Scientific Calculator/src/sibincalculator/calcu.form b/Scientific Calculator/src/sibincalculator/calcu.form new file mode 100644 index 00000000..6481066e --- /dev/null +++ b/Scientific Calculator/src/sibincalculator/calcu.form @@ -0,0 +1,930 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jPanel1" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton43" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jButton37" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton38" min="-2" max="-2" attributes="0"/> + <Component id="jButton45" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="57" max="-2" attributes="0"/> + <Component id="jButton33" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="4" max="-2" attributes="0"/> + <Component id="jTextField1" min="-2" pref="396" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton34" min="-2" max="-2" attributes="0"/> + <Component id="jButton15" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="116" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="33" max="-2" attributes="0"/> + <Component id="jTextField1" min="-2" pref="33" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="jButton34" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jButton15" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="15" max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton37" alignment="3" min="-2" pref="33" max="-2" attributes="0"/> + <Component id="jButton38" alignment="3" min="-2" pref="33" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton43" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jButton45" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jButton33" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace pref="51" max="32767" attributes="0"/> + <Component id="jLabel1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel2"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.MatteColorBorderInfo"> + <MatteColorBorder/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace pref="29" max="32767" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="103" alignment="1" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jButton7" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton8" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton9" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton42" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton4" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton5" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton6" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton41" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton1" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton2" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton3" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton39" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jButton10" min="-2" pref="41" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton11" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton40" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton44" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton39" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton6" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton41" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton7" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton8" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton9" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton42" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton10" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton11" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton40" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton44" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="text" type="java.lang.String" value="2"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="text" type="java.lang.String" value="3"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton4"> + <Properties> + <Property name="text" type="java.lang.String" value="4"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton5"> + <Properties> + <Property name="text" type="java.lang.String" value="5"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton6"> + <Properties> + <Property name="text" type="java.lang.String" value="6"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton7"> + <Properties> + <Property name="text" type="java.lang.String" value="7"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton7ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton8"> + <Properties> + <Property name="text" type="java.lang.String" value="8"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton8ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton9"> + <Properties> + <Property name="text" type="java.lang.String" value="9"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton9ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton10"> + <Properties> + <Property name="text" type="java.lang.String" value="0"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton10ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton11"> + <Properties> + <Property name="text" type="java.lang.String" value="."/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton11ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton39"> + <Properties> + <Property name="text" type="java.lang.String" value="+"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton39ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton41"> + <Properties> + <Property name="text" type="java.lang.String" value="*"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton41ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton42"> + <Properties> + <Property name="text" type="java.lang.String" value="/"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton42ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton40"> + <Properties> + <Property name="text" type="java.lang.String" value="-"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton40ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton44"> + <Properties> + <Property name="text" type="java.lang.String" value="C"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[40, 40]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton44ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.MatteColorBorderInfo"> + <MatteColorBorder/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jButton19" min="-2" max="-2" attributes="0"/> + <Component id="jButton16" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="jButton12" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="jButton22" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jButton23" max="32767" attributes="0"/> + <Component id="jButton20" max="32767" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jButton24" max="32767" attributes="0"/> + <Component id="jButton21" max="32767" attributes="0"/> + </Group> + </Group> + <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jButton13" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton14" min="-2" pref="71" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton17" pref="73" max="32767" attributes="0"/> + <EmptySpace min="-2" pref="7" max="-2" attributes="0"/> + <Component id="jButton18" min="-2" pref="71" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace min="0" pref="2" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton12" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton13" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton14" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton16" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton17" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton18" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="7" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton19" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton20" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton21" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="3" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton22" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton23" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton24" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton12"> + <Properties> + <Property name="text" type="java.lang.String" value="sin"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton12ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton13"> + <Properties> + <Property name="text" type="java.lang.String" value="cos"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton13ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton14"> + <Properties> + <Property name="text" type="java.lang.String" value="tan"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[75, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton14ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton16"> + <Properties> + <Property name="text" type="java.lang.String" value="sinh"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton16ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton17"> + <Properties> + <Property name="text" type="java.lang.String" value="cosh"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton17ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton18"> + <Properties> + <Property name="text" type="java.lang.String" value="tanh"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[75, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton18ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton19"> + <Properties> + <Property name="text" type="java.lang.String" value="sin^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton19ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton20"> + <Properties> + <Property name="text" type="java.lang.String" value="cos^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton20ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton21"> + <Properties> + <Property name="text" type="java.lang.String" value="tan^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton21ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton22"> + <Properties> + <Property name="text" type="java.lang.String" value="sinh^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[70, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton22ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton23"> + <Properties> + <Property name="text" type="java.lang.String" value="cosh^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[73, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton23ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton24"> + <Properties> + <Property name="text" type="java.lang.String" value="tanh^-1"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[75, 35]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton24ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton15"> + <Properties> + <Property name="text" type="java.lang.String" value="="/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton15ActionPerformed"/> + </Events> + </Component> + <Container class="javax.swing.JPanel" name="jPanel3"> + <Properties> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.MatteColorBorderInfo"> + <MatteColorBorder/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton25" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton26" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton27" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton28" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton29" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton31" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton35" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton36" min="-2" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jButton30" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton32" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton46" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + <Component id="jButton47" min="-2" pref="58" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="8" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton25" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton26" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton27" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton28" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="5" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton35" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton36" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton31" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton29" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButton30" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton32" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton46" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jButton47" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton25"> + <Properties> + <Property name="text" type="java.lang.String" value="x^2"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton25ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton26"> + <Properties> + <Property name="text" type="java.lang.String" value="x^3"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton26ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton27"> + <Properties> + <Property name="text" type="java.lang.String" value="^"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton27ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton28"> + <Properties> + <Property name="text" type="java.lang.String" value="1/x"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton28ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton29"> + <Properties> + <Property name="text" type="java.lang.String" value="x!"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton29ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton31"> + <Properties> + <Property name="text" type="java.lang.String" value="10^x"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton31ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton35"> + <Properties> + <Property name="text" type="java.lang.String" value="√"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton35ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton36"> + <Properties> + <Property name="text" type="java.lang.String" value="3√"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton36ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton30"> + <Properties> + <Property name="text" type="java.lang.String" value="log"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton30ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton32"> + <Properties> + <Property name="text" type="java.lang.String" value="exp"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton32ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton46"> + <Properties> + <Property name="text" type="java.lang.String" value="rad"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton46ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton47"> + <Properties> + <Property name="text" type="java.lang.String" value="PI"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton47ActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton33"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="0" red="ff" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="close"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[80, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton33ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton34"> + <Properties> + <Property name="text" type="java.lang.String" value="Clear"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[60, 30]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton34ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton37"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Converter"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[84, 23]"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton37ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton38"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="mat/vect"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[82, 23]"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField1"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButton43"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="i+nj"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[82, 30]"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JButton" name="jButton45"> + <Properties> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="0" red="0" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Equation"/> + <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[82, 30]"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Tahoma" size="10" style="3"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="33" red="33" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value="Developed by sibin,9746097336"/> + </Properties> + </Component> + </SubComponents> +</Form> diff --git a/Scientific Calculator/src/sibincalculator/calcu.java b/Scientific Calculator/src/sibincalculator/calcu.java new file mode 100644 index 00000000..c39ebb15 --- /dev/null +++ b/Scientific Calculator/src/sibincalculator/calcu.java @@ -0,0 +1,1214 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package sibincalculator; + +/** + * + * @author SIBIN MUHAMMED + */ + +public class calcu extends javax.swing.JFrame { + float a,b,r; + String c; + /** + * Creates new form calcu + */ + public calcu() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jPanel2 = new javax.swing.JPanel(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jButton4 = new javax.swing.JButton(); + jButton5 = new javax.swing.JButton(); + jButton6 = new javax.swing.JButton(); + jButton7 = new javax.swing.JButton(); + jButton8 = new javax.swing.JButton(); + jButton9 = new javax.swing.JButton(); + jButton10 = new javax.swing.JButton(); + jButton11 = new javax.swing.JButton(); + jButton39 = new javax.swing.JButton(); + jButton41 = new javax.swing.JButton(); + jButton42 = new javax.swing.JButton(); + jButton40 = new javax.swing.JButton(); + jButton44 = new javax.swing.JButton(); + jPanel1 = new javax.swing.JPanel(); + jButton12 = new javax.swing.JButton(); + jButton13 = new javax.swing.JButton(); + jButton14 = new javax.swing.JButton(); + jButton16 = new javax.swing.JButton(); + jButton17 = new javax.swing.JButton(); + jButton18 = new javax.swing.JButton(); + jButton19 = new javax.swing.JButton(); + jButton20 = new javax.swing.JButton(); + jButton21 = new javax.swing.JButton(); + jButton22 = new javax.swing.JButton(); + jButton23 = new javax.swing.JButton(); + jButton24 = new javax.swing.JButton(); + jButton15 = new javax.swing.JButton(); + jPanel3 = new javax.swing.JPanel(); + jButton25 = new javax.swing.JButton(); + jButton26 = new javax.swing.JButton(); + jButton27 = new javax.swing.JButton(); + jButton28 = new javax.swing.JButton(); + jButton29 = new javax.swing.JButton(); + jButton31 = new javax.swing.JButton(); + jButton35 = new javax.swing.JButton(); + jButton36 = new javax.swing.JButton(); + jButton30 = new javax.swing.JButton(); + jButton32 = new javax.swing.JButton(); + jButton46 = new javax.swing.JButton(); + jButton47 = new javax.swing.JButton(); + jButton33 = new javax.swing.JButton(); + jButton34 = new javax.swing.JButton(); + jButton37 = new javax.swing.JButton(); + jButton38 = new javax.swing.JButton(); + jTextField1 = new javax.swing.JTextField(); + jButton43 = new javax.swing.JButton(); + jButton45 = new javax.swing.JButton(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jPanel2.setBorder(new javax.swing.border.MatteBorder(null)); + + jButton1.setText("1"); + jButton1.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jButton2.setText("2"); + jButton2.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + jButton3.setText("3"); + jButton3.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + + jButton4.setText("4"); + jButton4.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton4ActionPerformed(evt); + } + }); + + jButton5.setText("5"); + jButton5.setMinimumSize(new java.awt.Dimension(40, 40)); + jButton5.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton5ActionPerformed(evt); + } + }); + + jButton6.setText("6"); + jButton6.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton6ActionPerformed(evt); + } + }); + + jButton7.setText("7"); + jButton7.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton7.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton7ActionPerformed(evt); + } + }); + + jButton8.setText("8"); + jButton8.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton8.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton8ActionPerformed(evt); + } + }); + + jButton9.setText("9"); + jButton9.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton9.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton9ActionPerformed(evt); + } + }); + + jButton10.setText("0"); + jButton10.setPreferredSize(new java.awt.Dimension(60, 40)); + jButton10.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton10ActionPerformed(evt); + } + }); + + jButton11.setText("."); + jButton11.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton11.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton11ActionPerformed(evt); + } + }); + + jButton39.setText("+"); + jButton39.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton39.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton39ActionPerformed(evt); + } + }); + + jButton41.setText("*"); + jButton41.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton41.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton41ActionPerformed(evt); + } + }); + + jButton42.setText("/"); + jButton42.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton42.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton42ActionPerformed(evt); + } + }); + + jButton40.setText("-"); + jButton40.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton40.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton40ActionPerformed(evt); + } + }); + + jButton44.setText("C"); + jButton44.setPreferredSize(new java.awt.Dimension(40, 40)); + jButton44.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton44ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap(29, Short.MAX_VALUE) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton44, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton41, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton44, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + jPanel1.setBorder(new javax.swing.border.MatteBorder(null)); + + jButton12.setText("sin"); + jButton12.setPreferredSize(new java.awt.Dimension(70, 35)); + jButton12.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton12ActionPerformed(evt); + } + }); + + jButton13.setText("cos"); + jButton13.setPreferredSize(new java.awt.Dimension(70, 35)); + jButton13.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton13ActionPerformed(evt); + } + }); + + jButton14.setText("tan"); + jButton14.setPreferredSize(new java.awt.Dimension(75, 35)); + jButton14.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton14ActionPerformed(evt); + } + }); + + jButton16.setText("sinh"); + jButton16.setPreferredSize(new java.awt.Dimension(70, 35)); + jButton16.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton16ActionPerformed(evt); + } + }); + + jButton17.setText("cosh"); + jButton17.setPreferredSize(new java.awt.Dimension(70, 35)); + jButton17.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton17ActionPerformed(evt); + } + }); + + jButton18.setText("tanh"); + jButton18.setPreferredSize(new java.awt.Dimension(75, 35)); + jButton18.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton18ActionPerformed(evt); + } + }); + + jButton19.setText("sin^-1"); + jButton19.setPreferredSize(new java.awt.Dimension(70, 35)); + jButton19.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton19ActionPerformed(evt); + } + }); + + jButton20.setText("cos^-1"); + jButton20.setPreferredSize(new java.awt.Dimension(70, 35)); + jButton20.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton20ActionPerformed(evt); + } + }); + + jButton21.setText("tan^-1"); + jButton21.setPreferredSize(new java.awt.Dimension(70, 35)); + jButton21.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton21ActionPerformed(evt); + } + }); + + jButton22.setText("sinh^-1"); + jButton22.setPreferredSize(new java.awt.Dimension(70, 35)); + jButton22.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton22ActionPerformed(evt); + } + }); + + jButton23.setText("cosh^-1"); + jButton23.setPreferredSize(new java.awt.Dimension(73, 35)); + jButton23.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton23ActionPerformed(evt); + } + }); + + jButton24.setText("tanh^-1"); + jButton24.setPreferredSize(new java.awt.Dimension(75, 35)); + jButton24.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton24ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jButton19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton16, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton12, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jButton22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jButton23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton20, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jButton24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton21, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addGroup(jPanel1Layout.createSequentialGroup() + .addComponent(jButton13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup() + .addComponent(jButton17, javax.swing.GroupLayout.DEFAULT_SIZE, 73, Short.MAX_VALUE) + .addGap(7, 7, 7) + .addComponent(jButton18, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addGap(0, 2, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(26, 26, 26) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(7, 7, 7) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(3, 3, 3) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + jButton15.setText("="); + jButton15.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton15.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton15ActionPerformed(evt); + } + }); + + jPanel3.setBorder(new javax.swing.border.MatteBorder(null)); + + jButton25.setText("x^2"); + jButton25.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton25.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton25ActionPerformed(evt); + } + }); + + jButton26.setText("x^3"); + jButton26.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton26.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton26ActionPerformed(evt); + } + }); + + jButton27.setText("^"); + jButton27.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton27.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton27ActionPerformed(evt); + } + }); + + jButton28.setText("1/x"); + jButton28.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton28.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton28ActionPerformed(evt); + } + }); + + jButton29.setText("x!"); + jButton29.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton29.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton29ActionPerformed(evt); + } + }); + + jButton31.setText("10^x"); + jButton31.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton31.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton31ActionPerformed(evt); + } + }); + + jButton35.setText("√"); + jButton35.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton35.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton35ActionPerformed(evt); + } + }); + + jButton36.setText("3√"); + jButton36.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton36.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton36ActionPerformed(evt); + } + }); + + jButton30.setText("log"); + jButton30.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton30.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton30ActionPerformed(evt); + } + }); + + jButton32.setText("exp"); + jButton32.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton32.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton32ActionPerformed(evt); + } + }); + + jButton46.setText("rad"); + jButton46.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton46.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton46ActionPerformed(evt); + } + }); + + jButton47.setText("PI"); + jButton47.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton47.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton47ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(jButton25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(jButton29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(jButton30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton46, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jButton47, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(8, 8, 8)) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(5, 5, 5) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton29, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton46, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton47, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + jButton33.setForeground(new java.awt.Color(255, 0, 51)); + jButton33.setText("close"); + jButton33.setPreferredSize(new java.awt.Dimension(80, 30)); + jButton33.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton33ActionPerformed(evt); + } + }); + + jButton34.setText("Clear"); + jButton34.setPreferredSize(new java.awt.Dimension(60, 30)); + jButton34.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton34ActionPerformed(evt); + } + }); + + jButton37.setForeground(new java.awt.Color(0, 0, 255)); + jButton37.setText("Converter"); + jButton37.setPreferredSize(new java.awt.Dimension(84, 23)); + jButton37.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton37ActionPerformed(evt); + } + }); + + jButton38.setForeground(new java.awt.Color(0, 0, 255)); + jButton38.setText("mat/vect"); + jButton38.setPreferredSize(new java.awt.Dimension(82, 23)); + + jTextField1.setForeground(new java.awt.Color(0, 0, 255)); + jTextField1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextField1ActionPerformed(evt); + } + }); + + jButton43.setForeground(new java.awt.Color(0, 0, 255)); + jButton43.setText("i+nj"); + jButton43.setPreferredSize(new java.awt.Dimension(82, 30)); + + jButton45.setForeground(new java.awt.Color(0, 0, 255)); + jButton45.setText("Equation"); + jButton45.setPreferredSize(new java.awt.Dimension(82, 30)); + + jLabel1.setFont(new java.awt.Font("Tahoma", 3, 10)); // NOI18N + jLabel1.setForeground(new java.awt.Color(51, 51, 51)); + jLabel1.setText("Developed by sibin,9746097336"); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(10, 10, 10) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jButton43, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton37, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton45, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(layout.createSequentialGroup() + .addGap(57, 57, 57) + .addComponent(jButton33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))) + .addGap(0, 0, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGap(4, 4, 4) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 396, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jButton34, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addGroup(layout.createSequentialGroup() + .addGap(116, 116, 116) + .addComponent(jLabel1) + .addGap(0, 0, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(33, 33, 33) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createSequentialGroup() + .addComponent(jButton34, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jButton15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(15, 15, 15) + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton37, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton38, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jButton43, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jButton45, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jButton33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 51, Short.MAX_VALUE) + .addComponent(jLabel1) + .addContainerGap()) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed +try{jTextField1.setText(jTextField1.getText()+jButton1.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton1ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + try{jTextField1.setText(jTextField1.getText()+jButton2.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed +try{jTextField1.setText(jTextField1.getText()+jButton3.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton3ActionPerformed + + private void jButton39ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton39ActionPerformed +try{ + + a=Float.parseFloat(jTextField1.getText()); + c=jButton39.getText(); + jTextField1.setText(" "); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton39ActionPerformed + + private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed +b=Float.parseFloat(jTextField1.getText()); +try +{ + switch (c) + { + case "+": + r=a+b; + jTextField1.setText(String.valueOf(r)); + break; + case "-": + r=a-b; + jTextField1.setText(String.valueOf(r)); + break; + case "*": + r=a*b; + jTextField1.setText(String.valueOf(r)); + break; + case "/": + r=a/b; + jTextField1.setText(String.valueOf(r)); + break; + case"^": + + r=(float) Math.pow( a, b); + jTextField1.setText(String.valueOf(r)); + break; + default: + jTextField1.setText("Error in typing "); + break; + } + +}catch(Exception e){jTextField1.setText("Error in typing ");} + + +// TODO add your handling code here: + }//GEN-LAST:event_jButton15ActionPerformed + + private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed + try{jTextField1.setText(jTextField1.getText()+jButton4.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton4ActionPerformed + + private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed +try{jTextField1.setText(jTextField1.getText()+jButton5.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton5ActionPerformed + + private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed +try{jTextField1.setText(jTextField1.getText()+jButton6.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton6ActionPerformed + + private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed +try{jTextField1.setText(jTextField1.getText()+jButton7.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton7ActionPerformed + + private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed + try{jTextField1.setText(jTextField1.getText()+jButton8.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton8ActionPerformed + + private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed +try{jTextField1.setText(jTextField1.getText()+jButton9.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton9ActionPerformed + + private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed +try{jTextField1.setText(jTextField1.getText()+jButton10.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton10ActionPerformed + + private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed +try{jTextField1.setText(jTextField1.getText()+jButton11.getText()) ;}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton11ActionPerformed + + private void jButton40ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton40ActionPerformed + try{ + + a=Float.parseFloat(jTextField1.getText()); + c=jButton40.getText(); + jTextField1.setText(""); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton40ActionPerformed + + private void jButton33ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton33ActionPerformed +dispose(); // TODO add your handling code here: + }//GEN-LAST:event_jButton33ActionPerformed + + private void jButton41ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton41ActionPerformed + try{ + + a=Float.parseFloat(jTextField1.getText()); + c=jButton41.getText(); + jTextField1.setText(""); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton41ActionPerformed + + private void jButton42ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton42ActionPerformed + try{ + + a=Float.parseFloat(jTextField1.getText()); + c=jButton42.getText(); + jTextField1.setText(""); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton42ActionPerformed + + private void jButton34ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton34ActionPerformed + jTextField1.setText(null); // TODO add your handling code here: + }//GEN-LAST:event_jButton34ActionPerformed + + private void jButton44ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton44ActionPerformed + jTextField1.setText(null); // TODO add your handling code here: + }//GEN-LAST:event_jButton44ActionPerformed + + private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton19ActionPerformed + try{ + double p; + float sin=Float.parseFloat(jTextField1.getText()); + + p=(Math.asin(sin)*180/Math.PI); + if(sin>1){jTextField1.setText(String.valueOf("Invalid ,Try again"));} + else{jTextField1.setText(String.valueOf(p));} +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton19ActionPerformed + + private void jButton22ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton22ActionPerformed +try{ + double p; + float cos=Float.parseFloat(jTextField1.getText()); +inverse obj=new inverse(); + p=obj.asinhinv(cos); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton22ActionPerformed + + private void jButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton23ActionPerformed +try{ + double p; + float imp=Float.parseFloat(jTextField1.getText()); +inverse obj=new inverse(); + p=obj.acoshinv(imp); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton23ActionPerformed + + private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed +try{ + double p; + float test=Float.parseFloat(jTextField1.getText()); +inverse obj=new inverse(); + p=obj.atanhinv(test); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton24ActionPerformed + + private void jButton47ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton47ActionPerformed +try{jTextField1.setText(String.valueOf(Math.PI));}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton47ActionPerformed + + private void jButton46ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton46ActionPerformed + try{ + float check=Float.parseFloat(jTextField1.getText()); + jTextField1.setText(String.valueOf((Math.PI*check)/180));}catch(Exception e){jTextField1.setText("Error in typing ");} + }//GEN-LAST:event_jButton46ActionPerformed + + private void jButton20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton20ActionPerformed +try{ + double p; + float num7=Float.parseFloat(jTextField1.getText()); + + p=(Math.acos(num7)*Math.PI); + if(num7>1){jTextField1.setText(String.valueOf("Invalid ,Try again"));} + else{jTextField1.setText(String.valueOf(p));} +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton20ActionPerformed + + private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton21ActionPerformed + try{ + double p; + float num9=Float.parseFloat(jTextField1.getText()); + + p=(Math.atan(num9)*Math.PI); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton21ActionPerformed + + private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed + try{ + double p; + float num11=Float.parseFloat(jTextField1.getText()); + + p=Math.sinh(num11); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton16ActionPerformed + + private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton17ActionPerformed + try{ + double p; + float test9=Float.parseFloat(jTextField1.getText()); + + p=Math.cosh(test9); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton17ActionPerformed + + private void jButton18ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton18ActionPerformed + try{ + double p; + float test11=Float.parseFloat(jTextField1.getText()); + + p=Math.tanh(test11); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton18ActionPerformed + + private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed + try{ + double p; + float sinent=Float.parseFloat(jTextField1.getText()); +float sinen=(float) ((sinent*Math.PI)/180); + p=(Math.sin(sinen)); + if(sinent/90==1||sinent/90==2||sinent/90==3||sinent/90==4||sinent/90==5||sinent/90==6||sinent/90==7||sinent/90==10){ + jTextField1.setText(String.valueOf(0));}else{ + jTextField1.setText(String.valueOf(p));} +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton12ActionPerformed + + private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed +try{ + double p; + float co=Float.parseFloat(jTextField1.getText()); +float os=(float) ((co*Math.PI)/180); + p=(Math.cos(os)); + if(co==90||co==270){ + jTextField1.setText(String.valueOf(0));} + else if(co==180){ jTextField1.setText(String.valueOf(-1));} + else if(co==180||co==360){jTextField1.setText(String.valueOf(1));} + else{ + jTextField1.setText(String.valueOf(p));} +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton13ActionPerformed + + private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed + try{ + double p; + float tan=Float.parseFloat(jTextField1.getText()); +float num3=(float) ((tan*Math.PI)/180); + p=(Math.tan(num3)); + if(tan/90==1||tan/90==3||tan/90==5||tan/90==7||tan/90==9||tan/90==11){ + jTextField1.setText(String.valueOf("infinity"));} + //else if(a==180){ jTextField1.setText(String.valueOf(-1));} + //else if(a==180||a==360){jTextField1.setText(String.valueOf(1));} + else{ + jTextField1.setText(String.valueOf(p));} +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton14ActionPerformed + + private void jButton28ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton28ActionPerformed + try{double num3=Float.parseFloat(jTextField1.getText()); + double x=1/num3;jTextField1.setText(String.valueOf(x));}catch(Exception e){jTextField1.setText("Error in typing ");} +// TODO add your handling code here: + }//GEN-LAST:event_jButton28ActionPerformed + + private void jButton36ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton36ActionPerformed +try{ + double p; + float num4=Float.parseFloat(jTextField1.getText()); + + p=Math.cbrt(num4); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton36ActionPerformed + + private void jButton35ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton35ActionPerformed +try{ + double p; + float rr=Float.parseFloat(jTextField1.getText()); + + p=Math.sqrt(rr); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton35ActionPerformed + + private void jButton32ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton32ActionPerformed +try{ + double p; + float check1=Float.parseFloat(jTextField1.getText()); + + p=Math.exp(check1); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton32ActionPerformed + + private void jButton30ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton30ActionPerformed +try{ + double p; + float num15=Float.parseFloat(jTextField1.getText()); + + p=Math.log(num15); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton30ActionPerformed + + private void jButton31ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton31ActionPerformed +try{ + double p; + float floa1=Float.parseFloat(jTextField1.getText()); + + p=Math.pow(10,floa1); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton31ActionPerformed + + private void jButton29ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton29ActionPerformed +try{ + int num19=Integer.parseInt(jTextField1.getText()); + int fact=1;while(num19>0){fact=fact*num19;num19--;} + jTextField1.setText(String.valueOf(fact)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton29ActionPerformed + + private void jButton26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton26ActionPerformed + try{ + double p; + float num10=Float.parseFloat(jTextField1.getText()); + + p=Math.pow(num10,3); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton26ActionPerformed + + private void jButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton25ActionPerformed +try{ + double p; + float float10=Float.parseFloat(jTextField1.getText()); + + p=Math.pow(float10,2); + + jTextField1.setText(String.valueOf(p)); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton25ActionPerformed + + private void jButton27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton27ActionPerformed +try{ + + a=Float.parseFloat(jTextField1.getText()); + c=jButton39.getText(); + jTextField1.setText(" "); +}catch(Exception e){jTextField1.setText("Error in typing ");} // TODO add your handling code here: + }//GEN-LAST:event_jButton27ActionPerformed + + private void jButton37ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton37ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButton37ActionPerformed + + private void jTextField1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField1ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextField1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(calcu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(calcu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(calcu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(calcu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new calcu().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton10; + private javax.swing.JButton jButton11; + private javax.swing.JButton jButton12; + private javax.swing.JButton jButton13; + private javax.swing.JButton jButton14; + private javax.swing.JButton jButton15; + private javax.swing.JButton jButton16; + private javax.swing.JButton jButton17; + private javax.swing.JButton jButton18; + private javax.swing.JButton jButton19; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton20; + private javax.swing.JButton jButton21; + private javax.swing.JButton jButton22; + private javax.swing.JButton jButton23; + private javax.swing.JButton jButton24; + private javax.swing.JButton jButton25; + private javax.swing.JButton jButton26; + private javax.swing.JButton jButton27; + private javax.swing.JButton jButton28; + private javax.swing.JButton jButton29; + private javax.swing.JButton jButton3; + private javax.swing.JButton jButton30; + private javax.swing.JButton jButton31; + private javax.swing.JButton jButton32; + private javax.swing.JButton jButton33; + private javax.swing.JButton jButton34; + private javax.swing.JButton jButton35; + private javax.swing.JButton jButton36; + private javax.swing.JButton jButton37; + private javax.swing.JButton jButton38; + private javax.swing.JButton jButton39; + private javax.swing.JButton jButton4; + private javax.swing.JButton jButton40; + private javax.swing.JButton jButton41; + private javax.swing.JButton jButton42; + private javax.swing.JButton jButton43; + private javax.swing.JButton jButton44; + private javax.swing.JButton jButton45; + private javax.swing.JButton jButton46; + private javax.swing.JButton jButton47; + private javax.swing.JButton jButton5; + private javax.swing.JButton jButton6; + private javax.swing.JButton jButton7; + private javax.swing.JButton jButton8; + private javax.swing.JButton jButton9; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JTextField jTextField1; + // End of variables declaration//GEN-END:variables +} diff --git a/Scientific Calculator/src/sibincalculator/inverse.java b/Scientific Calculator/src/sibincalculator/inverse.java new file mode 100644 index 00000000..f9e85eb9 --- /dev/null +++ b/Scientific Calculator/src/sibincalculator/inverse.java @@ -0,0 +1,21 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package sibincalculator; + +/** + * + * @author KHAN + */ +public class inverse { + public void inverse(){} + public double asinhinv(double z) + {return Math.log(z+(Math.sqrt(z*z+1)));} + public double acoshinv(double z) + {return Math.log(z+Math.sqrt((z-1)*(z+1)));} + public double atanhinv(double z) + {return (Math.log(z+1)-Math.log(1-z))/2;} + +} diff --git a/Scientific_Calculator.java b/Scientific_Calculator.java new file mode 100644 index 00000000..e0e3183e --- /dev/null +++ b/Scientific_Calculator.java @@ -0,0 +1,100 @@ +import java.util.Scanner; +import java.lang.Math; + +public class ScientificCalculator { + + private double firstNumber; + private double secondNumber; + private String operation; + + public ScientificCalculator() { + this.firstNumber = 0.0; + this.secondNumber = 0.0; + this.operation = ""; + } + + public void setFirstNumber(double firstNumber) { + this.firstNumber = firstNumber; + } + + public void setSecondNumber(double secondNumber) { + this.secondNumber = secondNumber; + } + + public void setOperation(String operation) { + this.operation = operation; + } + + public double calculate() { + double result = 0.0; + + switch (this.operation) { + case "+": + result = this.firstNumber + this.secondNumber; + break; + case "-": + result = this.firstNumber - this.secondNumber; + break; + case "*": + result = this.firstNumber * this.secondNumber; + break; + case "/": + result = this.firstNumber / this.secondNumber; + break; + case "^": + result = Math.pow(this.firstNumber, this.secondNumber); + break; + case "sqrt": + result = Math.sqrt(this.firstNumber); + break; + case "sin": + result = Math.sin(this.firstNumber); + break; + case "cos": + result = Math.cos(this.firstNumber); + break; + case "tan": + result = Math.tan(this.firstNumber); + break; + default: + throw new IllegalArgumentException("Invalid operation"); + } + + return result; + } + + public static void main(String[] args) { + ScientificCalculator calculator = new ScientificCalculator(); + + // Get the user input + Scanner scanner = new Scanner(System.in); + + System.out.println("Welcome to the scientific calculator!"); + + while (true) { + System.out.println("Enter the first number: "); + calculator.setFirstNumber(scanner.nextDouble()); + + System.out.println("Enter the second number: "); + calculator.setSecondNumber(scanner.nextDouble()); + + System.out.println("Enter the operation (+, -, *, /, ^, sqrt, sin, cos, tan): "); + calculator.setOperation(scanner.next()); + + // Calculate the result + double result = calculator.calculate(); + + // Display the result + System.out.println("The result is: " + result); + + System.out.println("Do you want to continue? (y/n)"); + String answer = scanner.next(); + + if (answer.equalsIgnoreCase("n")) { + break; + } + } + + scanner.close(); + } +} diff --git a/Screenshot using Python/requirements.txt b/Screenshot using Python/requirements.txt new file mode 100644 index 00000000..9fca95d0 --- /dev/null +++ b/Screenshot using Python/requirements.txt @@ -0,0 +1 @@ +PyAutoGUI==0.9.50 diff --git a/Screenshot using Python/screenshot.py b/Screenshot using Python/screenshot.py new file mode 100644 index 00000000..9ed62cfd --- /dev/null +++ b/Screenshot using Python/screenshot.py @@ -0,0 +1,47 @@ +import os +import argparse +import pyautogui +import time + +parser = argparse.ArgumentParser() + +parser.add_argument("-p", "--path", help="absolute path to store screenshot.", default=r"./images") +parser.add_argument("-t", "--type", help="h (in hour) or m (in minutes) or s (in seconds)", default='h') +parser.add_argument("-f", "--frequency", help="frequency for taking screenshot per h/m/s.", default=1, type=int) + +args = parser.parse_args() + + +sec = 0. + +if args.type == 'h': + sec = 60 * 60 / args.frequency +elif args.type == 'm': + sec = 60 / args.frequency + +if sec < 1.: + sec = 1. + + +if os.path.isdir(args.path) != True: + os.mkdir(args.path) + + +try: + while True: + t = time.localtime() + current_time = time.strftime("%H_%M_%S", t) + file = current_time + ".jpg" + image = pyautogui.screenshot(os.path.join(args.path,file)) + print(f"{file} saved successfully.\n") + time.sleep(sec) + +except KeyboardInterrupt: + print("End of script by user interrupt") + + + + + + + diff --git a/Serialization.java b/Serialization.java new file mode 100644 index 00000000..ce490df7 --- /dev/null +++ b/Serialization.java @@ -0,0 +1,33 @@ +import java.io.*; + +class Student implements Serializable { + String name; + int age; + + Student(String name, int age) { + this.name = name; + this.age = age; + } +} + +public class SerializationDemo { + public static void main(String[] args) { + try { + Student student = new Student("Alice", 20); + + // Serialization + ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream("student.ser")); + out.writeObject(student); + out.close(); + + // Deserialization + ObjectInputStream in = new ObjectInputStream(new FileInputStream("student.ser")); + Student deserializedStudent = (Student) in.readObject(); + in.close(); + + System.out.println("Deserialized Student: Name - " + deserializedStudent.name + ", Age - " + deserializedStudent.age); + } catch (IOException | ClassNotFoundException e) { + e.printStackTrace(); + } + } +} diff --git a/ShipingCostCalculator.java b/ShipingCostCalculator.java new file mode 100644 index 00000000..77efd5d3 --- /dev/null +++ b/ShipingCostCalculator.java @@ -0,0 +1,45 @@ +import java.util.Scanner; + +public class ShipingCostCalculator { + public static void main(String[] args) + { + + Scanner scanner = new Scanner(System.in); + System.out.println("Enter the weight of your package (kg) : \t "); + double weight = scanner.nextDouble(); + + System.out.println("Select a shipping method:"); + System.out.println("1. Standard Shipping"); + System.out.println("2. Express Shipping"); + int shippingMethod = scanner.nextInt(); + + + double cost; + switch (shippingMethod) { + case 1: + cost = weight * 5.0; // Standard shipping rate + break; + case 2: + cost = weight * 10.0; // Express shipping rate + break; + default: + System.out.println("Invalid shipping method."); + return; + } + + System.out.println("Shipping cost: $" + cost); + + scanner.close(); + } + + + + + + + + + } + + + diff --git a/Shop Management System/Billing_software.jar b/Shop Management System/Billing_software.jar new file mode 100644 index 00000000..ab6bf4e4 Binary files /dev/null and b/Shop Management System/Billing_software.jar differ diff --git a/Shop Management System/Changepassword$2.class b/Shop Management System/Changepassword$2.class new file mode 100644 index 00000000..9b1a7a3b Binary files /dev/null and b/Shop Management System/Changepassword$2.class differ diff --git a/Shop Management System/launch.html b/Shop Management System/launch.html new file mode 100644 index 00000000..bcc4c94d --- /dev/null +++ b/Shop Management System/launch.html @@ -0,0 +1,17 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> + <head> + <title>Test page for launching the application via JNLP</title> + </head> + <body> + <h3>Test page for launching the application via JNLP</h3> + <script src="http://java.com/js/deployJava.js"></script> + <script> + deployJava.createWebStartLaunchButton("launch.jnlp") + </script> + <!-- Or use the following link element to launch with the application --> + <!-- + <a href="launch.jnlp">Launch the application</a> + --> + </body> +</html> diff --git a/Shop Management System/launch.jnlp b/Shop Management System/launch.jnlp new file mode 100644 index 00000000..4cb5b4a4 --- /dev/null +++ b/Shop Management System/launch.jnlp @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<jnlp codebase="$$codebase" href="launch.jnlp" spec="1.0+"> + <information> + <title>Billing software</title> + <vendor>Sushil Ranjan</vendor> + <homepage href=""/> + <description>This is a Shop related software</description> + <description kind="short">Billing software</description> + </information> + <update check="always"/> + <resources> + <j2se version="1.7+"/> + <jar href="Billing_software.jar" main="true"/> + <jar href="lib/mysql-connector-java-5.1.23-bin.jar"/> +<jar href="lib/AbsoluteLayout.jar"/> +<jar href="lib/beansbinding-1.2.1.jar"/> +</resources> + <application-desc main-class="billing.software.Login"> + </application-desc> +</jnlp> diff --git a/Shop Management System/lib/AbsoluteLayout.jar b/Shop Management System/lib/AbsoluteLayout.jar new file mode 100644 index 00000000..667ffd28 Binary files /dev/null and b/Shop Management System/lib/AbsoluteLayout.jar differ diff --git a/Shop Management System/lib/beansbinding-1.2.1.jar b/Shop Management System/lib/beansbinding-1.2.1.jar new file mode 100644 index 00000000..7f26dc3d Binary files /dev/null and b/Shop Management System/lib/beansbinding-1.2.1.jar differ diff --git a/Shop Management System/lib/mysql-connector-java-5.1.23-bin.jar b/Shop Management System/lib/mysql-connector-java-5.1.23-bin.jar new file mode 100644 index 00000000..dd2585e0 Binary files /dev/null and b/Shop Management System/lib/mysql-connector-java-5.1.23-bin.jar differ diff --git a/Simple Adventure Game/main.java b/Simple Adventure Game/main.java new file mode 100644 index 00000000..00117c8e --- /dev/null +++ b/Simple Adventure Game/main.java @@ -0,0 +1,102 @@ +import java.util.Scanner; + +public class TextAdventure { + + private static final Scanner scanner = new Scanner(System.in); + + private static Room currentRoom; + + public static void main(String[] args) { + currentRoom = new Room("Starting room"); + + gameLoop(); + } + + private static void gameLoop() { + while (true) { + System.out.println("You are in " + currentRoom.getName()); + System.out.println("What do you want to do?"); + + String command = scanner.nextLine(); + + switch (command) { + case "go north": + currentRoom = currentRoom.getNorthRoom(); + break; + case "go south": + currentRoom = currentRoom.getSouthRoom(); + break; + case "go east": + currentRoom = currentRoom.getEastRoom(); + break; + case "go west": + currentRoom = currentRoom.getWestRoom(); + break; + case "examine": + System.out.println(currentRoom.getDescription()); + break; + default: + System.out.println("I don't understand that command."); + } + } + } + + private static class Room { + + private final String name; + private final String description; + private final Room northRoom; + private final Room southRoom; + private final Room eastRoom; + private final Room westRoom; + + public Room(String name) { + this.name = name; + this.description = ""; + this.northRoom = null; + this.southRoom = null; + this.eastRoom = null; + this.westRoom = null; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public Room getNorthRoom() { + return northRoom; + } + + public Room getSouthRoom() { + return southRoom; + } + + public Room getEastRoom() { + return eastRoom; + } + + public Room getWestRoom() { + return westRoom; + } + + public void setNorthRoom(Room northRoom) { + this.northRoom = northRoom; + } + + public void setSouthRoom(Room southRoom) { + this.southRoom = southRoom; + } + + public void setEastRoom(Room eastRoom) { + this.eastRoom = eastRoom; + } + + public void setWestRoom(Room westRoom) { + this.westRoom = westRoom; + } + } +} diff --git a/Simple-Plagiarism-Checker-Project/README.md b/Simple-Plagiarism-Checker-Project/README.md new file mode 100644 index 00000000..2ab5a87e --- /dev/null +++ b/Simple-Plagiarism-Checker-Project/README.md @@ -0,0 +1,16 @@ +# Simple-Plagiarism-Checker + +Web application of Plagiarism Checker using Python-Flask. TF-IDF and cosine similarity is a very common technique. It allows the system to quickly retrieve documents similar to a search query. Similarly, based on the same concept instead of retrieving documents similar to a query, it checks for how similar the query is to the existing database file. + +## Steps: +1. User enters a query +2. Query gets processed (Uppercase to lowercase, Removal of punctuationmarks, etc.) +3. Calculations are done (Term Frequency, Cosine Similarity) +4. The Plagiarism Percentage is returned on the web page + +## Python-Flask +1. Flask is a light-weight web framework for Python +2. Easy to work with (Same syntax as of Python) +3. While Flask addresses itself as a "micro-framework", it is not lacking in features or power, especially with a clutch of extensions to support features such as authentication, databases and so on +4. Comprehensive documentation available + diff --git a/Simple-Plagiarism-Checker-Project/plag.py b/Simple-Plagiarism-Checker-Project/plag.py new file mode 100644 index 00000000..f426935c --- /dev/null +++ b/Simple-Plagiarism-Checker-Project/plag.py @@ -0,0 +1,96 @@ +from flask import Flask, request, render_template +import re +import math + +app = Flask("__name__") + +q = "" + +@app.route("/") +def loadPage(): + return render_template('index.html', query="") + +@app.route("/", methods=['POST']) +def cosineSimilarity(): + try: + universalSetOfUniqueWords = [] + matchPercentage = 0 + + #################################################################################################### + + inputQuery = request.form['query'] + lowercaseQuery = inputQuery.lower() + + queryWordList = re.sub("[^\w]", " ",lowercaseQuery).split() #Replace punctuation by space and split + # queryWordList = map(str, queryWordList) #This was causing divide by zero error + + for word in queryWordList: + if word not in universalSetOfUniqueWords: + universalSetOfUniqueWords.append(word) + + #################################################################################################### + + fd = open("database1.txt", "r") + database1 = fd.read().lower() + + databaseWordList = re.sub("[^\w]", " ",database1).split() #Replace punctuation by space and split + # databaseWordList = map(str, databaseWordList) #And this also leads to divide by zero error + + for word in databaseWordList: + if word not in universalSetOfUniqueWords: + universalSetOfUniqueWords.append(word) + + #################################################################################################### + + queryTF = [] + databaseTF = [] + + for word in universalSetOfUniqueWords: + queryTfCounter = 0 + databaseTfCounter = 0 + + for word2 in queryWordList: + if word == word2: + queryTfCounter += 1 + queryTF.append(queryTfCounter) + + for word2 in databaseWordList: + if word == word2: + databaseTfCounter += 1 + databaseTF.append(databaseTfCounter) + + dotProduct = 0 + for i in range (len(queryTF)): + dotProduct += queryTF[i]*databaseTF[i] + + queryVectorMagnitude = 0 + for i in range (len(queryTF)): + queryVectorMagnitude += queryTF[i]**2 + queryVectorMagnitude = math.sqrt(queryVectorMagnitude) + + databaseVectorMagnitude = 0 + for i in range (len(databaseTF)): + databaseVectorMagnitude += databaseTF[i]**2 + databaseVectorMagnitude = math.sqrt(databaseVectorMagnitude) + + matchPercentage = (float)(dotProduct / (queryVectorMagnitude * databaseVectorMagnitude))*100 + + ''' + print queryWordList + print + print databaseWordList + + + print queryTF + print + print databaseTF + ''' + + output = "Input query text matches %0.02f%% with database."%matchPercentage + + return render_template('index.html', query=inputQuery, output=output) + except Exception as e: + output = "Please Enter Valid Data" + return render_template('index.html', query=inputQuery, output=output) + +app.run() diff --git a/Simple-Plagiarism-Checker-Project/req.txt b/Simple-Plagiarism-Checker-Project/req.txt new file mode 100644 index 00000000..aaf36088 --- /dev/null +++ b/Simple-Plagiarism-Checker-Project/req.txt @@ -0,0 +1,6 @@ +click==8.1.3 +Flask==2.1.2 +itsdangerous==2.1.2 +Jinja2==3.1.2 +MarkupSafe==2.1.1 +Werkzeug==2.1.2 diff --git a/Simple-Plagiarism-Checker-Project/templates/index.html b/Simple-Plagiarism-Checker-Project/templates/index.html new file mode 100644 index 00000000..01de2fc4 --- /dev/null +++ b/Simple-Plagiarism-Checker-Project/templates/index.html @@ -0,0 +1,13 @@ +<home> + <body> + <title>Plagiarism Checker</title> + <form action="http://localhost:5000" method="POST"> + <p>Input Text : </p> + <p><textarea name="query" rows="8" cols="50" autofocus>{{query}}</textarea></p> + <br> + <p><input type="submit" name="submit" value="CHECK PLAGIARISM"></p> + <br> + <p><h3>{{output}}</h3></p> + </form> + </body> +</home> \ No newline at end of file diff --git a/Snake game/README.md b/Snake game/README.md new file mode 100644 index 00000000..1eaf2cb7 --- /dev/null +++ b/Snake game/README.md @@ -0,0 +1,3 @@ +# Java Snake Game + +I have created a Snake board Game using Java. diff --git a/Snake game/board.java b/Snake game/board.java new file mode 100644 index 00000000..e81c4e91 --- /dev/null +++ b/Snake game/board.java @@ -0,0 +1,245 @@ +package com.zetcode; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.Toolkit; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyAdapter; +import java.awt.event.KeyEvent; +import javax.swing.ImageIcon; +import javax.swing.JPanel; +import javax.swing.Timer; + +public class Board extends JPanel implements ActionListener { + + private final int B_WIDTH = 300; + private final int B_HEIGHT = 300; + private final int DOT_SIZE = 10; + private final int ALL_DOTS = 900; + private final int RAND_POS = 29; + private final int DELAY = 140; + + private final int x[] = new int[ALL_DOTS]; + private final int y[] = new int[ALL_DOTS]; + + private int dots; + private int apple_x; + private int apple_y; + + private boolean leftDirection = false; + private boolean rightDirection = true; + private boolean upDirection = false; + private boolean downDirection = false; + private boolean inGame = true; + + private Timer timer; + private Image ball; + private Image apple; + private Image head; + + public Board() { + + initBoard(); + } + + private void initBoard() { + + addKeyListener(new TAdapter()); + setBackground(Color.black); + setFocusable(true); + + setPreferredSize(new Dimension(B_WIDTH, B_HEIGHT)); + loadImages(); + initGame(); + } + + private void loadImages() { + + ImageIcon iid = new ImageIcon("src/resources/dot.png"); + ball = iid.getImage(); + + ImageIcon iia = new ImageIcon("src/resources/apple.png"); + apple = iia.getImage(); + + ImageIcon iih = new ImageIcon("src/resources/head.png"); + head = iih.getImage(); + } + + private void initGame() { + + dots = 3; + + for (int z = 0; z < dots; z++) { + x[z] = 50 - z * 10; + y[z] = 50; + } + + locateApple(); + + timer = new Timer(DELAY, this); + timer.start(); + } + + @Override + public void paintComponent(Graphics g) { + super.paintComponent(g); + + doDrawing(g); + } + + private void doDrawing(Graphics g) { + + if (inGame) { + + g.drawImage(apple, apple_x, apple_y, this); + + for (int z = 0; z < dots; z++) { + if (z == 0) { + g.drawImage(head, x[z], y[z], this); + } else { + g.drawImage(ball, x[z], y[z], this); + } + } + + Toolkit.getDefaultToolkit().sync(); + + } else { + + gameOver(g); + } + } + + private void gameOver(Graphics g) { + + String msg = "Game Over"; + Font small = new Font("Helvetica", Font.BOLD, 14); + FontMetrics metr = getFontMetrics(small); + + g.setColor(Color.white); + g.setFont(small); + g.drawString(msg, (B_WIDTH - metr.stringWidth(msg)) / 2, B_HEIGHT / 2); + } + + private void checkApple() { + + if ((x[0] == apple_x) && (y[0] == apple_y)) { + + dots++; + locateApple(); + } + } + + private void move() { + + for (int z = dots; z > 0; z--) { + x[z] = x[(z - 1)]; + y[z] = y[(z - 1)]; + } + + if (leftDirection) { + x[0] -= DOT_SIZE; + } + + if (rightDirection) { + x[0] += DOT_SIZE; + } + + if (upDirection) { + y[0] -= DOT_SIZE; + } + + if (downDirection) { + y[0] += DOT_SIZE; + } + } + + private void checkCollision() { + + for (int z = dots; z > 0; z--) { + + if ((z > 4) && (x[0] == x[z]) && (y[0] == y[z])) { + inGame = false; + } + } + + if (y[0] >= B_HEIGHT) { + inGame = false; + } + + if (y[0] < 0) { + inGame = false; + } + + if (x[0] >= B_WIDTH) { + inGame = false; + } + + if (x[0] < 0) { + inGame = false; + } + + if (!inGame) { + timer.stop(); + } + } + + private void locateApple() { + + int r = (int) (Math.random() * RAND_POS); + apple_x = ((r * DOT_SIZE)); + + r = (int) (Math.random() * RAND_POS); + apple_y = ((r * DOT_SIZE)); + } + + @Override + public void actionPerformed(ActionEvent e) { + + if (inGame) { + + checkApple(); + checkCollision(); + move(); + } + + repaint(); + } + + private class TAdapter extends KeyAdapter { + + @Override + public void keyPressed(KeyEvent e) { + + int key = e.getKeyCode(); + + if ((key == KeyEvent.VK_LEFT) && (!rightDirection)) { + leftDirection = true; + upDirection = false; + downDirection = false; + } + + if ((key == KeyEvent.VK_RIGHT) && (!leftDirection)) { + rightDirection = true; + upDirection = false; + downDirection = false; + } + + if ((key == KeyEvent.VK_UP) && (!downDirection)) { + upDirection = true; + rightDirection = false; + leftDirection = false; + } + + if ((key == KeyEvent.VK_DOWN) && (!upDirection)) { + downDirection = true; + rightDirection = false; + leftDirection = false; + } + } + } +} diff --git a/Snake game/snake.java b/Snake game/snake.java new file mode 100644 index 00000000..52040ff4 --- /dev/null +++ b/Snake game/snake.java @@ -0,0 +1,33 @@ +package com.zetcode; + +import java.awt.EventQueue; +import javax.swing.JFrame; + +public class Snake extends JFrame { + + public Snake() { + + initUI(); + } + + private void initUI() { + + add(new Board()); + + setResizable(false); + pack(); + + setTitle("Snake"); + setLocationRelativeTo(null); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } + + + public static void main(String[] args) { + + EventQueue.invokeLater(() -> { + JFrame ex = new Snake(); + ex.setVisible(true); + }); + } +} diff --git a/Software Piracy Control/.DS_Store b/Software Piracy Control/.DS_Store new file mode 100644 index 00000000..567bffdd Binary files /dev/null and b/Software Piracy Control/.DS_Store differ diff --git a/Software Piracy Control/build.xml b/Software Piracy Control/build.xml new file mode 100644 index 00000000..7bcdc1d3 --- /dev/null +++ b/Software Piracy Control/build.xml @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<project name="SPC" default="default" basedir="."> + <description>Builds, tests, and runs the project SPC.</description> + <import file="nbproject/build-impl.xml"/> + <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-jar: called before JAR building + -post-jar: called after JAR building + -post-clean: called after cleaning build products + + (Targets beginning with '-' are not intended to be called on their own.) + + Example of inserting an obfuscator after compilation could look like this: + + <target name="-post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Another way to customize the build is by overriding existing main targets. + The targets of interest are: + + -init-macrodef-javac: defines macro for javac compilation + -init-macrodef-junit: defines macro for junit execution + -init-macrodef-debug: defines macro for class debugging + -init-macrodef-java: defines macro for class execution + -do-jar-with-manifest: JAR building (if you are using a manifest) + -do-jar-without-manifest: JAR building (if you are not using a manifest) + run: execution of project + -javadoc-build: Javadoc generation + test-report: JUnit report generation + + An example of overriding the target for project execution could look like this: + + <target name="run" depends="SPC-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that the overridden target depends on the jar target and not only on + the compile target as the regular run target does. Again, for a list of available + properties which you can use, check the target you are overriding in the + nbproject/build-impl.xml file. + + --> +</project> diff --git a/Software Piracy Control/build/classes/3.JPG b/Software Piracy Control/build/classes/3.JPG new file mode 100644 index 00000000..0b18442b Binary files /dev/null and b/Software Piracy Control/build/classes/3.JPG differ diff --git a/Software Piracy Control/build/classes/cro4ky_Yin_Yang1.jpg b/Software Piracy Control/build/classes/cro4ky_Yin_Yang1.jpg new file mode 100644 index 00000000..c1773a40 Binary files /dev/null and b/Software Piracy Control/build/classes/cro4ky_Yin_Yang1.jpg differ diff --git a/Software Piracy Control/build/classes/frmCustomer$1.class b/Software Piracy Control/build/classes/frmCustomer$1.class new file mode 100644 index 00000000..cfd77782 Binary files /dev/null and b/Software Piracy Control/build/classes/frmCustomer$1.class differ diff --git a/Software Piracy Control/build/classes/frmCustomer$2.class b/Software Piracy Control/build/classes/frmCustomer$2.class new file mode 100644 index 00000000..e9db32b8 Binary files /dev/null and b/Software Piracy Control/build/classes/frmCustomer$2.class differ diff --git a/Software Piracy Control/build/classes/frmCustomer.class b/Software Piracy Control/build/classes/frmCustomer.class new file mode 100644 index 00000000..524e0a65 Binary files /dev/null and b/Software Piracy Control/build/classes/frmCustomer.class differ diff --git a/Software Piracy Control/build/classes/frmProduct$1.class b/Software Piracy Control/build/classes/frmProduct$1.class new file mode 100644 index 00000000..d07fa9d3 Binary files /dev/null and b/Software Piracy Control/build/classes/frmProduct$1.class differ diff --git a/Software Piracy Control/build/classes/frmProduct$2.class b/Software Piracy Control/build/classes/frmProduct$2.class new file mode 100644 index 00000000..ac2ad25d Binary files /dev/null and b/Software Piracy Control/build/classes/frmProduct$2.class differ diff --git a/Software Piracy Control/build/classes/frmProduct.class b/Software Piracy Control/build/classes/frmProduct.class new file mode 100644 index 00000000..7f612f53 Binary files /dev/null and b/Software Piracy Control/build/classes/frmProduct.class differ diff --git a/Software Piracy Control/build/classes/gg$1.class b/Software Piracy Control/build/classes/gg$1.class new file mode 100644 index 00000000..ff3804c6 Binary files /dev/null and b/Software Piracy Control/build/classes/gg$1.class differ diff --git a/Software Piracy Control/build/classes/gg$2.class b/Software Piracy Control/build/classes/gg$2.class new file mode 100644 index 00000000..37c4704d Binary files /dev/null and b/Software Piracy Control/build/classes/gg$2.class differ diff --git a/Software Piracy Control/build/classes/gg.class b/Software Piracy Control/build/classes/gg.class new file mode 100644 index 00000000..a315395b Binary files /dev/null and b/Software Piracy Control/build/classes/gg.class differ diff --git a/Software Piracy Control/dist/README.TXT b/Software Piracy Control/dist/README.TXT new file mode 100644 index 00000000..b59d52be --- /dev/null +++ b/Software Piracy Control/dist/README.TXT @@ -0,0 +1,33 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "SPC.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, none of the +classpath elements are copied to the lib folder. In such a case, +you need to copy the classpath elements to the lib folder manually after the build. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/Software Piracy Control/dist/SPC.jar b/Software Piracy Control/dist/SPC.jar new file mode 100644 index 00000000..d97951ed Binary files /dev/null and b/Software Piracy Control/dist/SPC.jar differ diff --git a/Software Piracy Control/dist/lib/AbsoluteLayout.jar b/Software Piracy Control/dist/lib/AbsoluteLayout.jar new file mode 100644 index 00000000..b51cba7f Binary files /dev/null and b/Software Piracy Control/dist/lib/AbsoluteLayout.jar differ diff --git a/Software Piracy Control/dist/lib/beansbinding-1.2.1.jar b/Software Piracy Control/dist/lib/beansbinding-1.2.1.jar new file mode 100644 index 00000000..7f26dc3d Binary files /dev/null and b/Software Piracy Control/dist/lib/beansbinding-1.2.1.jar differ diff --git a/Software Piracy Control/dist/lib/sqljdbc4.jar b/Software Piracy Control/dist/lib/sqljdbc4.jar new file mode 100644 index 00000000..d6b7f6da Binary files /dev/null and b/Software Piracy Control/dist/lib/sqljdbc4.jar differ diff --git a/Software Piracy Control/manifest.mf b/Software Piracy Control/manifest.mf new file mode 100644 index 00000000..328e8e5b --- /dev/null +++ b/Software Piracy Control/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Software Piracy Control/nbproject/build-impl.xml b/Software Piracy Control/nbproject/build-impl.xml new file mode 100644 index 00000000..5f01871b --- /dev/null +++ b/Software Piracy Control/nbproject/build-impl.xml @@ -0,0 +1,627 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +*** GENERATED FROM project.xml - DO NOT EDIT *** +*** EDIT ../build.xml INSTEAD *** + +For the purpose of easier reading the script +is divided into following sections: + + - initialization + - compilation + - jar + - execution + - debugging + - javadoc + - junit compilation + - junit execution + - junit debugging + - applet + - cleanup + + --> +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="SPC-impl"> + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> + <!-- + ====================== + INITIALIZATION SECTION + ====================== + --> + <target name="-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init" name="-init-private"> + <property file="nbproject/private/config.properties"/> + <property file="nbproject/private/configs/${config}.properties"/> + <property file="nbproject/private/private.properties"/> + </target> + <target depends="-pre-init,-init-private" name="-init-user"> + <property file="${user.properties.file}"/> + <!-- The two properties below are usually overridden --> + <!-- by the active platform. Just a fallback. --> + <property name="default.javac.source" value="1.4"/> + <property name="default.javac.target" value="1.4"/> + </target> + <target depends="-pre-init,-init-private,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> + <property file="nbproject/project.properties"/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> + <available file="${manifest.file}" property="manifest.available"/> + <condition property="manifest.available+main.class"> + <and> + <isset property="manifest.available"/> + <isset property="main.class"/> + <not> + <equals arg1="${main.class}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition property="manifest.available+main.class+mkdist.available"> + <and> + <istrue value="${manifest.available+main.class}"/> + <isset property="libs.CopyLibs.classpath"/> + </and> + </condition> + <condition property="have.tests"> + <or> + <available file="${test.src.dir}"/> + </or> + </condition> + <condition property="have.sources"> + <or> + <available file="${src.dir}"/> + </or> + </condition> + <condition property="netbeans.home+have.tests"> + <and> + <isset property="netbeans.home"/> + <isset property="have.tests"/> + </and> + </condition> + <condition property="no.javadoc.preview"> + <and> + <isset property="javadoc.preview"/> + <isfalse value="${javadoc.preview}"/> + </and> + </condition> + <property name="run.jvmargs" value=""/> + <property name="javac.compilerargs" value=""/> + <property name="work.dir" value="${basedir}"/> + <condition property="no.deps"> + <and> + <istrue value="${no.dependencies}"/> + </and> + </condition> + <property name="javac.debug" value="true"/> + <property name="javadoc.preview" value="true"/> + <property name="application.args" value=""/> + <property name="source.encoding" value="${file.encoding}"/> + <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> + <and> + <isset property="javadoc.encoding"/> + <not> + <equals arg1="${javadoc.encoding}" arg2=""/> + </not> + </and> + </condition> + <property name="javadoc.encoding.used" value="${source.encoding}"/> + <property name="includes" value="**"/> + <property name="excludes" value=""/> + <property name="do.depend" value="false"/> + <condition property="do.depend.true"> + <istrue value="${do.depend}"/> + </condition> + <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'"> + <and> + <isset property="jaxws.endorsed.dir"/> + <available file="nbproject/jaxws-build.xml"/> + </and> + </condition> + </target> + <target name="-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> + <fail unless="src.dir">Must set src.dir</fail> + <fail unless="test.src.dir">Must set test.src.dir</fail> + <fail unless="build.dir">Must set build.dir</fail> + <fail unless="dist.dir">Must set dist.dir</fail> + <fail unless="build.classes.dir">Must set build.classes.dir</fail> + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> + <fail unless="dist.jar">Must set dist.jar</fail> + </target> + <target name="-init-macrodef-property"> + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${@{value}}"/> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-javac"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="" name="sourcepath"/> + <element name="customize" optional="true"/> + <sequential> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/> + <customize/> + </javac> + </sequential> + </macrodef> + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <sequential> + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </depend> + </sequential> + </macrodef> + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${build.classes.dir}" name="destdir"/> + <sequential> + <fail unless="javac.includes">Must set javac.includes</fail> + <pathconvert pathsep="," property="javac.includes.binary"> + <path> + <filelist dir="@{destdir}" files="${javac.includes}"/> + </path> + <globmapper from="*.java" to="*.class"/> + </pathconvert> + <delete> + <files includes="${javac.includes.binary}"/> + </delete> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-junit"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <sequential> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </batchtest> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg line="${run.jvmargs}"/> + </junit> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-nbjpda"> + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="name"/> + <attribute default="${debug.classpath}" name="classpath"/> + <attribute default="" name="stopclassname"/> + <sequential> + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </nbjpdastart> + </sequential> + </macrodef> + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${build.classes.dir}" name="dir"/> + <sequential> + <nbjpdareload> + <fileset dir="@{dir}" includes="${fix.includes}*.class"/> + </nbjpdareload> + </sequential> + </macrodef> + </target> + <target name="-init-debug-args"> + <property name="version-output" value="java version "${ant.java.version}"/> + <condition property="have-jdk-older-than-1.4"> + <or> + <contains string="${version-output}" substring="java version "1.0"/> + <contains string="${version-output}" substring="java version "1.1"/> + <contains string="${version-output}" substring="java version "1.2"/> + <contains string="${version-output}" substring="java version "1.3"/> + </or> + </condition> + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> + <istrue value="${have-jdk-older-than-1.4}"/> + </condition> + </target> + <target depends="-init-debug-args" name="-init-macrodef-debug"> + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${debug.classpath}" name="classpath"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" fork="true"> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/> + <jvmarg line="${run.jvmargs}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-java"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="classname"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" fork="true"> + <jvmarg line="${run.jvmargs}"/> + <classpath> + <path path="${run.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-presetdef-jar"> + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> + <jar compress="${jar.compress}" jarfile="${dist.jar}"> + <j2seproject1:fileset dir="${build.classes.dir}"/> + </jar> + </presetdef> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/> + <!-- + =================== + COMPILATION SECTION + =================== + --> + <target depends="init" name="deps-jar" unless="no.deps"/> + <target depends="init,deps-jar" name="-pre-pre-compile"> + <mkdir dir="${build.classes.dir}"/> + </target> + <target name="-pre-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-depend"> + <j2seproject3:depend/> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile"> + <j2seproject3:javac/> + <copy todir="${build.classes.dir}"> + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> + <target name="-pre-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile/> + <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/> + </target> + <target name="-post-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> + <!-- + ==================== + JAR BUILDING SECTION + ==================== + --> + <target depends="init" name="-pre-pre-jar"> + <dirname file="${dist.jar}" property="dist.jar.dir"/> + <mkdir dir="${dist.jar.dir}"/> + </target> + <target name="-pre-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available"> + <j2seproject1:jar/> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class"> + <j2seproject1:jar manifest="${manifest.file}"/> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available"> + <j2seproject1:jar manifest="${manifest.file}"> + <j2seproject1:manifest> + <j2seproject1:attribute name="Main-Class" value="${main.class}"/> + </j2seproject1:manifest> + </j2seproject1:jar> + <echo>To run this application from the command line without Ant, try:</echo> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <pathconvert property="run.classpath.with.dist.jar"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> + </pathconvert> + <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries"> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert pathsep=" " property="jar.classpath"> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> + <fileset dir="${build.classes.dir}"/> + <manifest> + <attribute name="Main-Class" value="${main.class}"/> + <attribute name="Class-Path" value="${jar.classpath}"/> + </manifest> + </copylibs> + <echo>To run this application from the command line without Ant, try:</echo> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <echo>java -jar "${dist.jar.resolved}"</echo> + </target> + <target name="-post-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/> + <!-- + ================= + EXECUTION SECTION + ================= + --> + <target depends="init,compile" description="Run a main class." name="run"> + <j2seproject1:java> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject1:java> + </target> + <target name="-do-not-recompile"> + <property name="javac.includes.binary" value=""/> + </target> + <target depends="init,-do-not-recompile,compile-single" name="run-single"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}"/> + </target> + <!-- + ================= + DEBUGGING SECTION + ================= + --> + <target depends="init" if="netbeans.home" name="-debug-start-debugger"> + <j2seproject1:nbjpdastart name="${debug.class}"/> + </target> + <target depends="init,compile" name="-debug-start-debuggee"> + <j2seproject3:debug> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> + <j2seproject1:nbjpdastart stopclassname="${main.class}"/> + </target> + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}"/> + </target> + <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> + <target depends="init" name="-pre-debug-fix"> + <fail unless="fix.includes">Must set fix.includes</fail> + <property name="javac.includes" value="${fix.includes}.java"/> + </target> + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> + <j2seproject1:nbjpdareload/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> + <!-- + =============== + JAVADOC SECTION + =============== + --> + <target depends="init" name="-javadoc-build"> + <mkdir dir="${dist.javadoc.dir}"/> + <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> + <classpath> + <path path="${javac.classpath}"/> + </classpath> + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + </javadoc> + </target> + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> + <nbbrowse file="${dist.javadoc.dir}/index.html"/> + </target> + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> + <!-- + ========================= + JUNIT COMPILATION SECTION + ========================= + --> + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> + <mkdir dir="${build.test.classes.dir}"/> + </target> + <target name="-pre-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-test-depend"> + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> + <target name="-pre-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> + <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> + <!-- + ======================= + JUNIT EXECUTION SECTION + ======================= + --> + <target depends="init" if="have.tests" name="-pre-test-run"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> + <j2seproject3:junit testincludes="**/*Test.java"/> + </target> + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> + <fail if="tests.failed">Some tests failed; see details above.</fail> + </target> + <target depends="init" if="have.tests" name="test-report"/> + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> + <target depends="init" if="have.tests" name="-pre-test-run-single"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <j2seproject3:junit excludes="" includes="${test.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> + <fail if="tests.failed">Some tests failed; see details above.</fail> + </target> + <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> + <!-- + ======================= + JUNIT DEBUGGING SECTION + ======================= + --> + <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/> + <delete file="${test.report.file}"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}"> + <customize> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <arg value="${test.class}"/> + <arg value="showoutput=true"/> + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/> + <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> + </target> + <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> + <!-- + ========================= + APPLET EXECUTION SECTION + ========================= + --> + <target depends="init,compile-single" name="run-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject1:java classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject1:java> + </target> + <!-- + ========================= + APPLET DEBUGGING SECTION + ========================= + --> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject3:debug classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> + <!-- + =============== + CLEANUP SECTION + =============== + --> + <target depends="init" name="deps-clean" unless="no.deps"/> + <target depends="init" name="-do-clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}"/> + </target> + <target name="-post-clean"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> +</project> diff --git a/Software Piracy Control/nbproject/genfiles.properties b/Software Piracy Control/nbproject/genfiles.properties new file mode 100644 index 00000000..0f7fbaf0 --- /dev/null +++ b/Software Piracy Control/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=bc10d708 +build.xml.script.CRC32=11e8b7fb +build.xml.stylesheet.CRC32=be360661 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=bc10d708 +nbproject/build-impl.xml.script.CRC32=11bb2eed +nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 diff --git a/Software Piracy Control/nbproject/private/config.properties b/Software Piracy Control/nbproject/private/config.properties new file mode 100644 index 00000000..e69de29b diff --git a/Software Piracy Control/nbproject/private/private.properties b/Software Piracy Control/nbproject/private/private.properties new file mode 100644 index 00000000..ffda05e5 --- /dev/null +++ b/Software Piracy Control/nbproject/private/private.properties @@ -0,0 +1,9 @@ +compile.on.save=true +do.depend=false +do.jar=true +file.reference.-sqljdbc_4.0=C:\\sqljdbc_4.0 +file.reference.sqljdbc4.jar=C:\\sqljdbc_4.0\\enu\\sqljdbc4.jar +javac.debug=true +javadoc.preview=true +jaxws.endorsed.dir=C:\\Netbeans 6.0\\java1\\modules\\ext\\jaxws21\\api +user.properties.file=C:\\Users\\Sharp\\.netbeans\\6.0\\build.properties diff --git a/Software Piracy Control/nbproject/private/private.xml b/Software Piracy Control/nbproject/private/private.xml new file mode 100644 index 00000000..c1f155a7 --- /dev/null +++ b/Software Piracy Control/nbproject/private/private.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/> +</project-private> diff --git a/Software Piracy Control/nbproject/private/profiler/ResetResultsProfilingPoint.pp b/Software Piracy Control/nbproject/private/profiler/ResetResultsProfilingPoint.pp new file mode 100644 index 00000000..7a4771b7 --- /dev/null +++ b/Software Piracy Control/nbproject/private/profiler/ResetResultsProfilingPoint.pp @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<entry key="0_p_name">Reset Results 1 at gg:31</entry> +<entry key="2_p_location_line">31</entry> +<entry key="1_p_enabled">true</entry> +<entry key="1_p_location_file">{$projectDirectory}/src/gg.java</entry> +<entry key="0_p_location_file">{$projectDirectory}/src/gg.java</entry> +<entry key="1_p_location_offset">2147483647</entry> +<entry key="2_p_location_file">{$projectDirectory}/src/gg.java</entry> +<entry key="0_p_enabled">false</entry> +<entry key="2_p_location_offset">2147483647</entry> +<entry key="2_p_name">fg</entry> +<entry key="2_p_enabled">true</entry> +<entry key="1_p_location_line">31</entry> +<entry key="1_p_name">Reset Results at gg:31</entry> +<entry key="0_p_location_line">31</entry> +<entry key="0_p_location_offset">2147483647</entry> +</properties> diff --git a/Software Piracy Control/nbproject/project.properties b/Software Piracy Control/nbproject/project.properties new file mode 100644 index 00000000..858b00da --- /dev/null +++ b/Software Piracy Control/nbproject/project.properties @@ -0,0 +1,75 @@ +application.title=SPC +application.vendor=Sharp +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/SPC.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +file.reference.-sqljdbc_4.0=../../../../../sqljdbc_4.0 +file.reference.sqljdbc4.jar=../../../../../sqljdbc_4.0/enu/sqljdbc4.jar +includes=** +jar.compress=false +javac.classpath=\ + ${libs.absolutelayout.classpath}:\ + ${libs.beans-binding.classpath}:\ + ${file.reference.sqljdbc4.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.source=1.5 +javac.target=1.5 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir}:\ + ${libs.junit.classpath}:\ + ${libs.junit_4.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +# Property libs.absolutelayout.classpath is set here just to make sharing of project simpler. +# The library definition has always preference over this property. +libs.absolutelayout.classpath=../../../../../Netbeans 6.0/java1/modules/ext/AbsoluteLayout.jar +# Property libs.beans-binding.classpath is set here just to make sharing of project simpler. +# The library definition has always preference over this property. +libs.beans-binding.classpath=../../../../../Netbeans 6.0/java1/modules/ext/beansbinding-1.2.1.jar +main.class=frmProduct +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value +# or test-sys-prop.name=value to set system properties for unit tests): +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Software Piracy Control/nbproject/project.xml b/Software Piracy Control/nbproject/project.xml new file mode 100644 index 00000000..f8d15487 --- /dev/null +++ b/Software Piracy Control/nbproject/project.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.java.j2seproject</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> + <name>SPC</name> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> + </data> + </configuration> +</project> diff --git a/Software Piracy Control/src/3.JPG b/Software Piracy Control/src/3.JPG new file mode 100644 index 00000000..0b18442b Binary files /dev/null and b/Software Piracy Control/src/3.JPG differ diff --git a/Software Piracy Control/src/cro4ky_Yin_Yang1.jpg b/Software Piracy Control/src/cro4ky_Yin_Yang1.jpg new file mode 100644 index 00000000..c1773a40 Binary files /dev/null and b/Software Piracy Control/src/cro4ky_Yin_Yang1.jpg differ diff --git a/Software Piracy Control/src/frmCustomer.form b/Software Piracy Control/src/frmCustomer.form new file mode 100644 index 00000000..c6b33a98 --- /dev/null +++ b/Software Piracy Control/src/frmCustomer.form @@ -0,0 +1,192 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Customer Information"/> + <Property name="locationByPlatform" type="boolean" value="true"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-52,0,0,2,98"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="lblCustId"> + <Properties> + <Property name="text" type="java.lang.String" value="Customer Id :"/> + <Property name="name" type="java.lang.String" value="lblCustId" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="50" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="txtCustId"> + <Properties> + <Property name="name" type="java.lang.String" value="" noResource="true"/> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/> + </AccessibilityProperties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="130" y="20" width="140" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="btnSubmit"> + <Properties> + <Property name="text" type="java.lang.String" value="SUBMIT"/> + <Property name="name" type="java.lang.String" value="btnSubmit" noResource="true"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSubmitActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="160" y="310" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="lblCustName"> + <Properties> + <Property name="text" type="java.lang.String" value="Customer Name :"/> + <Property name="name" type="java.lang.String" value="" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="30" y="60" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="lblCustAdd"> + <Properties> + <Property name="text" type="java.lang.String" value="Address : "/> + <Property name="name" type="java.lang.String" value="" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="100" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="txtCustName"> + <Properties> + <Property name="name" type="java.lang.String" value="" noResource="true"/> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value=""/> + </AccessibilityProperties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="130" y="60" width="140" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="130" y="100" width="-1" height="-1"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="txtCustAdd"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JLabel" name="lblCustMob"> + <Properties> + <Property name="text" type="java.lang.String" value="Mobile : "/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="80" y="200" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="txtCustMob"> + <Properties> + <Property name="name" type="java.lang.String" value="txtCustMob" noResource="true"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="130" y="200" width="140" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="lblCustMail"> + <Properties> + <Property name="text" type="java.lang.String" value="Email Id : "/> + </Properties> + <AccessibilityProperties> + <Property name="AccessibleContext.accessibleName" type="java.lang.String" value="lblCustMail"/> + </AccessibilityProperties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="70" y="240" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="txtCustMail"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="130" y="240" width="140" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="lblProdId"> + <Properties> + <Property name="text" type="java.lang.String" value="Product Id : "/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="60" y="280" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JTextField" name="txtProdId"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="130" y="280" width="140" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/cro4ky_Yin_Yang1.jpg"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="610" height="460"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/Software Piracy Control/src/frmCustomer.java b/Software Piracy Control/src/frmCustomer.java new file mode 100644 index 00000000..d862b830 --- /dev/null +++ b/Software Piracy Control/src/frmCustomer.java @@ -0,0 +1,183 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/* + * frmCustomer.java + * + * Created on Dec 20, 2013, 1:42:40 PM + */ + +/** + * + * @author pooja + */ +import javax.swing.*; +import java.awt.event.*; +import java.sql.*; +public class frmCustomer extends javax.swing.JFrame { + + /** Creates new form frmCustomer */ + public frmCustomer() { + initComponents(); + } + + /** This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + lblCustId = new javax.swing.JLabel(); + txtCustId = new javax.swing.JTextField(); + btnSubmit = new javax.swing.JButton(); + lblCustName = new javax.swing.JLabel(); + lblCustAdd = new javax.swing.JLabel(); + txtCustName = new javax.swing.JTextField(); + jScrollPane1 = new javax.swing.JScrollPane(); + txtCustAdd = new javax.swing.JTextArea(); + lblCustMob = new javax.swing.JLabel(); + txtCustMob = new javax.swing.JTextField(); + lblCustMail = new javax.swing.JLabel(); + txtCustMail = new javax.swing.JTextField(); + lblProdId = new javax.swing.JLabel(); + txtProdId = new javax.swing.JTextField(); + jLabel1 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Customer Information"); + setLocationByPlatform(true); + getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + lblCustId.setText("Customer Id :"); + lblCustId.setName("lblCustId"); // NOI18N + getContentPane().add(lblCustId, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 30, -1, -1)); + + txtCustId.setName(""); // NOI18N + getContentPane().add(txtCustId, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 20, 140, -1)); + txtCustId.getAccessibleContext().setAccessibleName(""); + + btnSubmit.setText("SUBMIT"); + btnSubmit.setName("btnSubmit"); // NOI18N + btnSubmit.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnSubmitActionPerformed(evt); + } + }); + getContentPane().add(btnSubmit, new org.netbeans.lib.awtextra.AbsoluteConstraints(160, 310, -1, -1)); + + lblCustName.setText("Customer Name :"); + lblCustName.setName(""); // NOI18N + getContentPane().add(lblCustName, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 60, -1, -1)); + + lblCustAdd.setText("Address : "); + lblCustAdd.setName(""); // NOI18N + getContentPane().add(lblCustAdd, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 100, -1, -1)); + + txtCustName.setName(""); // NOI18N + getContentPane().add(txtCustName, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 60, 140, -1)); + txtCustName.getAccessibleContext().setAccessibleName(""); + + txtCustAdd.setColumns(20); + txtCustAdd.setRows(5); + jScrollPane1.setViewportView(txtCustAdd); + + getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 100, -1, -1)); + + lblCustMob.setText("Mobile : "); + getContentPane().add(lblCustMob, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 200, -1, -1)); + + txtCustMob.setName("txtCustMob"); // NOI18N + getContentPane().add(txtCustMob, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 200, 140, -1)); + + lblCustMail.setText("Email Id : "); + getContentPane().add(lblCustMail, new org.netbeans.lib.awtextra.AbsoluteConstraints(70, 240, -1, -1)); + lblCustMail.getAccessibleContext().setAccessibleName("lblCustMail"); + + getContentPane().add(txtCustMail, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 240, 140, -1)); + + lblProdId.setText("Product Id : "); + getContentPane().add(lblProdId, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 280, -1, -1)); + getContentPane().add(txtProdId, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 280, 140, -1)); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cro4ky_Yin_Yang1.jpg"))); // NOI18N + getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 610, 460)); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void btnSubmitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSubmitActionPerformed + + String url="jdbc:odbc:SPC"; + Connection con; + Statement stmt; + String sql; + sql="insert into db_accessadmin.tblCustomer(CustId,CustName,Address,mobno,EmailId,ProductId) " + + "values('"+txtCustId.getText()+"','"+txtCustName.getText()+"','"+txtCustAdd.getText()+"',"+ + "'"+txtCustMob.getText()+"','"+txtCustMail.getText()+"','"+txtProdId.getText()+"');"; + + try + { + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + } + catch(ClassNotFoundException e) + { + System.err.print("ClassNotFoundException :"); + System.err.print(e.getMessage()); + } + + try + { + con=DriverManager.getConnection(url); + stmt=con.createStatement(); + stmt.executeUpdate(sql); + JOptionPane.showMessageDialog(null,"Record inserted successfully"); + stmt.close(); + con.close(); + + } + catch(SQLException ex) + { + + JOptionPane.showMessageDialog(null,ex); + JOptionPane.showMessageDialog(null,"Record not inserted!"); + } + + // TODO add your handling code here: + + }//GEN-LAST:event_btnSubmitActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new frmCustomer().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton btnSubmit; + private javax.swing.JLabel jLabel1; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JLabel lblCustAdd; + private javax.swing.JLabel lblCustId; + private javax.swing.JLabel lblCustMail; + private javax.swing.JLabel lblCustMob; + private javax.swing.JLabel lblCustName; + private javax.swing.JLabel lblProdId; + private javax.swing.JTextArea txtCustAdd; + private javax.swing.JTextField txtCustId; + private javax.swing.JTextField txtCustMail; + private javax.swing.JTextField txtCustMob; + private javax.swing.JTextField txtCustName; + private javax.swing.JTextField txtProdId; + // End of variables declaration//GEN-END:variables + +} diff --git a/Software Piracy Control/src/frmProduct.form b/Software Piracy Control/src/frmProduct.form new file mode 100644 index 00000000..350b3d90 --- /dev/null +++ b/Software Piracy Control/src/frmProduct.form @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Product Information"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="lblImage" min="-2" pref="147" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="61" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="lblProdValid" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="lblProdPrice" min="-2" max="-2" attributes="0"/> + <Component id="lblProdId" min="-2" max="-2" attributes="0"/> + <Component id="lblProdName" min="-2" max="-2" attributes="0"/> + <Component id="lblProdVersion" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="txtProdName" min="-2" pref="168" max="-2" attributes="0"/> + <Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0"> + <Component id="txtProdValid" alignment="0" max="32767" attributes="1"/> + <Component id="txtProdPrice" alignment="0" max="32767" attributes="1"/> + <Component id="txtProdVers" alignment="0" min="-2" pref="99" max="-2" attributes="1"/> + </Group> + <Component id="btnSubmit" min="-2" max="-2" attributes="0"/> + <Component id="txtProdId" min="-2" pref="97" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="38" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="47" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="lblProdId" min="-2" max="-2" attributes="0"/> + <Component id="txtProdId" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblProdName" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtProdName" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txtProdVers" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblProdVersion" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="19" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txtProdPrice" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblProdPrice" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblProdValid" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtProdValid" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="38" max="-2" attributes="0"/> + <Component id="btnSubmit" min="-2" max="-2" attributes="0"/> + </Group> + <Component id="lblImage" alignment="0" min="-2" pref="322" max="-2" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="lblImage"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/3.JPG"/> + </Property> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="lblProdId"> + <Properties> + <Property name="text" type="java.lang.String" value=" Product Id :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtProdId"> + </Component> + <Component class="javax.swing.JLabel" name="lblProdName"> + <Properties> + <Property name="text" type="java.lang.String" value="Product Name :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtProdName"> + </Component> + <Component class="javax.swing.JLabel" name="lblProdVersion"> + <Properties> + <Property name="text" type="java.lang.String" value="Product Version :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtProdVers"> + </Component> + <Component class="javax.swing.JLabel" name="lblProdPrice"> + <Properties> + <Property name="text" type="java.lang.String" value="Product Price :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtProdPrice"> + </Component> + <Component class="javax.swing.JLabel" name="lblProdValid"> + <Properties> + <Property name="text" type="java.lang.String" value="Product Validity :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtProdValid"> + </Component> + <Component class="javax.swing.JButton" name="btnSubmit"> + <Properties> + <Property name="text" type="java.lang.String" value="Submit"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSubmitActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/Software Piracy Control/src/frmProduct.java b/Software Piracy Control/src/frmProduct.java new file mode 100644 index 00000000..5a153dd2 --- /dev/null +++ b/Software Piracy Control/src/frmProduct.java @@ -0,0 +1,190 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/* + * frmProduct.java + * + * Created on Dec 21, 2013, 10:22:03 PM + */ + +/** + * + * @author pooja + */ +import javax.swing.*; +import java.awt.event.*; +import java.sql.*; + +public class frmProduct extends javax.swing.JFrame { + + /** Creates new form frmProduct */ + public frmProduct() { + initComponents(); + } + + /** This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + lblImage = new javax.swing.JLabel(); + lblProdId = new javax.swing.JLabel(); + txtProdId = new javax.swing.JTextField(); + lblProdName = new javax.swing.JLabel(); + txtProdName = new javax.swing.JTextField(); + lblProdVersion = new javax.swing.JLabel(); + txtProdVers = new javax.swing.JTextField(); + lblProdPrice = new javax.swing.JLabel(); + txtProdPrice = new javax.swing.JTextField(); + lblProdValid = new javax.swing.JLabel(); + txtProdValid = new javax.swing.JTextField(); + btnSubmit = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Product Information"); + + lblImage.setIcon(new javax.swing.ImageIcon(getClass().getResource("/3.JPG"))); // NOI18N + + lblProdId.setText(" Product Id :"); + + lblProdName.setText("Product Name :"); + + lblProdVersion.setText("Product Version :"); + + lblProdPrice.setText("Product Price :"); + + lblProdValid.setText("Product Validity :"); + + btnSubmit.setText("Submit"); + btnSubmit.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnSubmitActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(lblImage, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(61, 61, 61) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(lblProdValid) + .addComponent(lblProdPrice) + .addComponent(lblProdId) + .addComponent(lblProdName) + .addComponent(lblProdVersion)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txtProdName, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(txtProdValid, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txtProdPrice, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txtProdVers, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(btnSubmit) + .addComponent(txtProdId, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(38, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(47, 47, 47) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(lblProdId) + .addComponent(txtProdId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblProdName) + .addComponent(txtProdName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtProdVers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblProdVersion)) + .addGap(19, 19, 19) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtProdPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblProdPrice)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblProdValid) + .addComponent(txtProdValid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(38, 38, 38) + .addComponent(btnSubmit)) + .addComponent(lblImage, javax.swing.GroupLayout.PREFERRED_SIZE, 322, javax.swing.GroupLayout.PREFERRED_SIZE) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void btnSubmitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSubmitActionPerformed + + String url="jdbc:odbc:SPC"; + Connection con; + Statement stmt; + String sql; + sql="insert into db_accessadmin.tblProduct(ProductId,ProdName,ProdVersion,ProdPrice,ProdValidity) " + + "values('"+txtProdId.getText()+"','"+txtProdName.getText()+"','"+txtProdVers.getText()+"',"+ + "'"+txtProdPrice.getText()+"','"+txtProdValid.getText()+"');"; + + try + { + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + } + catch(ClassNotFoundException e) + { + System.err.print("ClassNotFoundException :"); + System.err.print(e.getMessage()); + } + + try + { + con=DriverManager.getConnection(url); + stmt=con.createStatement(); + stmt.executeUpdate(sql); + JOptionPane.showMessageDialog(null,"Record inserted successfully"); + stmt.close(); + con.close(); + + } + catch(SQLException ex) + { + + JOptionPane.showMessageDialog(null,ex); + JOptionPane.showMessageDialog(null,"Record not inserted!"); + } + }//GEN-LAST:event_btnSubmitActionPerformed + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new frmProduct().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton btnSubmit; + private javax.swing.JLabel lblImage; + private javax.swing.JLabel lblProdId; + private javax.swing.JLabel lblProdName; + private javax.swing.JLabel lblProdPrice; + private javax.swing.JLabel lblProdValid; + private javax.swing.JLabel lblProdVersion; + private javax.swing.JTextField txtProdId; + private javax.swing.JTextField txtProdName; + private javax.swing.JTextField txtProdPrice; + private javax.swing.JTextField txtProdValid; + private javax.swing.JTextField txtProdVers; + // End of variables declaration//GEN-END:variables + + +} diff --git a/Software Piracy Control/src/gg.form b/Software Piracy Control/src/gg.form new file mode 100644 index 00000000..6a10e438 --- /dev/null +++ b/Software Piracy Control/src/gg.form @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.5" maxVersion="1.5" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="title" type="java.lang.String" value="Product Information"/> + <Property name="focusCycleRoot" type="boolean" value="false"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel3" min="-2" pref="268" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="lblProdName" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="lblProdId" alignment="1" min="-2" max="-2" attributes="0"/> + <Component id="lblProdVersion" min="-2" max="-2" attributes="0"/> + <Component id="lblProdValid" min="-2" max="-2" attributes="0"/> + <Component id="lblProdPrice" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="txtProdName" alignment="0" pref="134" max="32767" attributes="1"/> + <Component id="txtProdId" alignment="0" min="-2" pref="97" max="-2" attributes="0"/> + <Component id="txtProdVers" alignment="0" min="-2" pref="99" max="-2" attributes="1"/> + <Component id="txtProdValid" alignment="0" pref="134" max="32767" attributes="1"/> + <Component id="txtProdPrice" alignment="0" pref="134" max="32767" attributes="1"/> + </Group> + <EmptySpace min="-2" pref="88" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Component id="btnSubmit" min="-2" max="-2" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="52" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblProdId" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtProdId" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblProdName" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtProdName" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="9" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblProdVersion" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtProdVers" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="txtProdPrice" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="lblProdPrice" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="lblProdValid" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="txtProdValid" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="42" max="-2" attributes="0"/> + <Component id="btnSubmit" min="-2" max="-2" attributes="0"/> + <EmptySpace pref="198" max="32767" attributes="0"/> + </Group> + <Component id="jLabel3" alignment="0" pref="459" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="lblProdId"> + <Properties> + <Property name="text" type="java.lang.String" value=" Product Id :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtProdId"> + </Component> + <Component class="javax.swing.JLabel" name="lblProdName"> + <Properties> + <Property name="text" type="java.lang.String" value="Product Name :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtProdName"> + </Component> + <Component class="javax.swing.JLabel" name="lblProdVersion"> + <Properties> + <Property name="text" type="java.lang.String" value="Product Version :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtProdVers"> + </Component> + <Component class="javax.swing.JLabel" name="lblProdPrice"> + <Properties> + <Property name="text" type="java.lang.String" value="Product Price :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtProdPrice"> + </Component> + <Component class="javax.swing.JLabel" name="lblProdValid"> + <Properties> + <Property name="text" type="java.lang.String" value="Product Validity :"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="txtProdValid"> + </Component> + <Component class="javax.swing.JButton" name="btnSubmit"> + <Properties> + <Property name="text" type="java.lang.String" value="Submit"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnSubmitActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/3.JPG"/> + </Property> + </Properties> + </Component> + </SubComponents> +</Form> diff --git a/Software Piracy Control/src/gg.java b/Software Piracy Control/src/gg.java new file mode 100644 index 00000000..1c6b8118 --- /dev/null +++ b/Software Piracy Control/src/gg.java @@ -0,0 +1,191 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/* + * gg.java + * + * Created on Dec 21, 2013, 10:22:03 PM + */ + +/** + * + * @author pooja + */ +import javax.swing.*; +import java.awt.event.*; +import java.sql.*; + +public class gg extends javax.swing.JFrame { + + /** Creates new form gg */ + public gg() { + initComponents(); + } + + /** This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + lblProdId = new javax.swing.JLabel(); + txtProdId = new javax.swing.JTextField(); + lblProdName = new javax.swing.JLabel(); + txtProdName = new javax.swing.JTextField(); + lblProdVersion = new javax.swing.JLabel(); + txtProdVers = new javax.swing.JTextField(); + lblProdPrice = new javax.swing.JLabel(); + txtProdPrice = new javax.swing.JTextField(); + lblProdValid = new javax.swing.JLabel(); + txtProdValid = new javax.swing.JTextField(); + btnSubmit = new javax.swing.JButton(); + jLabel3 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Product Information"); + setFocusCycleRoot(false); + + lblProdId.setText(" Product Id :"); + + lblProdName.setText("Product Name :"); + + lblProdVersion.setText("Product Version :"); + + lblProdPrice.setText("Product Price :"); + + lblProdValid.setText("Product Validity :"); + + btnSubmit.setText("Submit"); + btnSubmit.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + btnSubmitActionPerformed(evt); + } + }); + + jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/3.JPG"))); // NOI18N + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 268, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(lblProdName) + .addComponent(lblProdId) + .addComponent(lblProdVersion) + .addComponent(lblProdValid) + .addComponent(lblProdPrice)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txtProdName, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE) + .addComponent(txtProdId, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtProdVers, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(txtProdValid, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE) + .addComponent(txtProdPrice, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)) + .addGap(88, 88, 88)) + .addGroup(layout.createSequentialGroup() + .addComponent(btnSubmit) + .addContainerGap()))) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(52, 52, 52) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblProdId) + .addComponent(txtProdId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblProdName) + .addComponent(txtProdName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(9, 9, 9) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblProdVersion) + .addComponent(txtProdVers, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtProdPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblProdPrice)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(lblProdValid) + .addComponent(txtProdValid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(42, 42, 42) + .addComponent(btnSubmit) + .addContainerGap(198, Short.MAX_VALUE)) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 459, Short.MAX_VALUE) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void btnSubmitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSubmitActionPerformed + +String Url = "jdbc:sqlserver://localhost;databaseName=SPC;userName=sa;password=sa"; +Connection con = null;//SqlConnection +Statement stmt = null;//SqlCommand +ResultSet rs = null;// IDataReader + +try { + Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); + } +catch(ClassNotFoundException e) + { + System.err.print("ClassNotFoundException :"); + System.err.print(e.getMessage()); + } +try +{ +con = DriverManager.getConnection(Url); +String SQL = "insert into db_accessadmin.tblProduct(ProductId,ProdName,ProdVersion,ProdPrice,ProdValidity) " + + "values('"+txtProdId.getText()+"','"+txtProdName.getText()+"','"+txtProdVers.getText()+"',"+ + "'"+txtProdPrice.getText()+"','"+txtProdValid.getText()+"');"; +stmt = con.createStatement(); +stmt.executeUpdate(SQL); +JOptionPane.showMessageDialog(null,"Record inserted successfully"); +stmt.close(); +con.close(); +} +catch(SQLException ex) +{ + JOptionPane.showMessageDialog(null,ex); + JOptionPane.showMessageDialog(null,"Record not inserted!"); +} + }//GEN-LAST:event_btnSubmitActionPerformed + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new gg().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton btnSubmit; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel lblProdId; + private javax.swing.JLabel lblProdName; + private javax.swing.JLabel lblProdPrice; + private javax.swing.JLabel lblProdValid; + private javax.swing.JLabel lblProdVersion; + private javax.swing.JTextField txtProdId; + private javax.swing.JTextField txtProdName; + private javax.swing.JTextField txtProdPrice; + private javax.swing.JTextField txtProdValid; + private javax.swing.JTextField txtProdVers; + // End of variables declaration//GEN-END:variables + + +} diff --git a/SortingAlgos.java b/SortingAlgos.java new file mode 100644 index 00000000..25af8c88 --- /dev/null +++ b/SortingAlgos.java @@ -0,0 +1,345 @@ +import java.util.Arrays; +import java.util.Scanner; + +public class SortingProgram { + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + + // Input array from the user + System.out.print("Enter the number of elements in the array: "); + int n = input.nextInt(); + int[] arr = new int[n]; + + System.out.println("Enter the elements of the array:"); + for (int i = 0; i < n; i++) { + arr[i] = input.nextInt(); + } + + // Choose a sorting algorithm + System.out.println("\nChoose a sorting algorithm (1-10):"); + System.out.println("1- Selection sort"); + System.out.println("2- Bubble sort"); + System.out.println("3- Insertion sort"); + System.out.println("4- Merge sort"); + System.out.println("5- Quick sort"); + System.out.println("6- Heap sort"); + System.out.println("7- Counting sort"); + System.out.println("8- Radix sort"); + System.out.println("9- Bucket Sort"); + System.out.println("10- Shell Sort"); + System.out.print("Enter your choice: "); + int choice = input.nextInt(); + + switch (choice) { + case 1: + selectionSort(arr); + break; + case 2: + bubbleSort(arr); + break; + case 3: + insertionSort(arr); + break; + case 4: + mergeSort(arr); + break; + case 5: + quickSort(arr, 0, n - 1); + break; + case 6: + heapSort(arr); + break; + case 7: + countingSort(arr); + break; + case 8: + radixSort(arr); + break; + case 9: + bucketSort(arr); + break; + case 10: + shellSort(arr); + break; + default: + System.out.println("Invalid choice. No sorting performed."); + } + + // Print the sorted array + System.out.println("Sorted array: " + Arrays.toString(arr)); + } + + // Selection Sort + public static void selectionSort(int[] arr) { + int n = arr.length; + for (int i = 0; i < n - 1; i++) { + int minIndex = i; + for (int j = i + 1; j < n; j++) { + if (arr[j] < arr[minIndex]) { + minIndex = j; + } + } + int temp = arr[minIndex]; + arr[minIndex] = arr[i]; + arr[i] = temp; + } + } + + // Bubble Sort + public static void bubbleSort(int[] arr) { + int n = arr.length; + boolean swapped; + for (int i = 0; i < n - 1; i++) { + swapped = false; + for (int j = 0; j < n - i - 1; j++) { + if (arr[j] > arr[j + 1]) { + int temp = arr[j]; + arr[j] = arr[j + 1]; + arr[j + 1] = temp; + swapped = true; + } + } + if (!swapped) { + break; + } + } + } + + // Insertion Sort + public static void insertionSort(int[] arr) { + int n = arr.length; + for (int i = 1; i < n; i++) { + int key = arr[i]; + int j = i - 1; + while (j >= 0 && arr[j] > key) { + arr[j + 1] = arr[j]; + j--; + } + arr[j + 1] = key; + } + } + + // Merge Sort + public static void mergeSort(int[] arr) { + mergeSort(arr, 0, arr.length - 1); + } + + private static void mergeSort(int[] arr, int left, int right) { + if (left < right) { + int mid = (left + right) / 2; + mergeSort(arr, left, mid); + mergeSort(arr, mid + 1, right); + merge(arr, left, mid, right); + } + } + + private static void merge(int[] arr, int left, int mid, int right) { + int n1 = mid - left + 1; + int n2 = right - mid; + int[] L = new int[n1]; + int[] R = new int[n2]; + + for (int i = 0; i < n1; i++) { + L[i] = arr[left + i]; + } + for (int i = 0; i < n2; i++) { + R[i] = arr[mid + 1 + i]; + } + + int i = 0, j = 0, k = left; + while (i < n1 && j < n2) { + if (L[i] <= R[j]) { + arr[k] = L[i]; + i++; + } else { + arr[k] = R[j]; + j++; + } + k++; + } + + while (i < n1) { + arr[k] = L[i]; + i++; + k++; + } + + while (j < n2) { + arr[k] = R[j]; + j++; + k++; + } + } + + // Quick Sort + public static void quickSort(int[] arr, int low, int high) { + if (low < high) { + int pivotIndex = partition(arr, low, high); + quickSort(arr, low, pivotIndex - 1); + quickSort(arr, pivotIndex + 1, high); + } + } + + private static int partition(int[] arr, int low, int high) { + int pivot = arr[high]; + int i = low - 1; + for (int j = low; j < high; j++) { + if (arr[j] < pivot) { + i++; + int temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + } + } + int temp = arr[i + 1]; + arr[i + 1] = arr[high]; + arr[high] = temp; + return i + 1; + } + + // Heap Sort + public static void heapSort(int[] arr) { + int n = arr.length; + for (int i = n / 2 - 1; i >= 0; i--) { + heapify(arr, n, i); + } + for (int i = n - 1; i >= 0; i--) { + int temp = arr[0]; + arr[0] = arr[i]; + arr[i] = temp; + heapify(arr, i, 0); + } + } + + private static void heapify(int[] arr, int n, int i) { + int largest = i; + int left = 2 * i + 1; + int right = 2 * i + 2; + + if (left < n && arr[left] > arr[largest]) { + largest = left; + } + if (right < n && arr[right] > arr[largest]) { + largest = right; + } + + if (largest != i) { + int swap = arr[i]; + arr[i] = arr[largest]; + arr[largest] = swap; + heapify(arr, n, largest); + } + } + + // Counting Sort + public static void countingSort(int[] arr) { + int n = arr.length; + int max = Arrays.stream(arr).max().getAsInt(); + int min = Arrays.stream(arr).min().getAsInt(); + int range = max - min + 1; + int[] count = new int[range]; + int[] output = new int[n]; + + for (int i = 0; i < n; i++) { + count[arr[i] - min]++; + } + + for (int i = 1; i < range; i++) { + count[i] += count[i - 1]; + } + + for (int i = n - 1; i >= 0; i--) { + output[count[arr[i] - min] - 1] = arr[i]; + count[arr[i] - min]--; + } + + for (int i = 0; i < n; i++) { + arr[i] = output[i]; + } + } + + // Radix Sort + public static void radixSort(int[] arr) { + int max = Arrays.stream(arr).max().getAsInt(); + for (int exp = 1; max / exp > 0; exp *= 10) { + countingSortByDigit(arr, exp); + } + } + + private static void countingSortByDigit(int[] arr, int exp) { + int n = arr.length; + int[] output = new int[n]; + int[] count = new int[10]; + Arrays.fill(count, 0); + + for (int i = 0; i < n; i++) { + count[(arr[i] / exp) % 10]++; + } + + for (int i = 1; i < 10; i++) { + count[i] += count[i - 1]; + } + + for (int i = n - 1; i >= 0; i--) { + output[count[(arr[i] / exp) % 10] - 1] = arr[i]; + count[(arr[i] / exp) % 10]--; + } + + for (int i = 0; i < n; i++) { + arr[i] = output[i]; + } + } + + // Bucket Sort + public static void bucketSort(int[] arr) { + int n = arr.length; + int max = Arrays.stream(arr).max().getAsInt(); + int min = Arrays.stream(arr).min().getAsInt(); + int range = max - min + 1; + + int bucketSize = Math.min(range / n, n); + int bucketCount = (range + bucketSize - 1) / bucketSize; + + // Create buckets + int[][] buckets = new int[bucketCount][]; + for (int i = 0; i < bucketCount; i++) { + buckets[i] = new int[0]; + } + + // Add elements to buckets + for (int i = 0; i < n; i++) { + int index = (arr[i] - min) / bucketSize; + buckets[index] = append(buckets[index], arr[i]); + } + + // Sort individual buckets and merge + int index = 0; + for (int i = 0; i < bucketCount; i++) { + insertionSort(buckets[i]); + for (int j = 0; j < buckets[i].length; j++) { + arr[index++] = buckets[i][j]; + } + } + } + + private static int[] append(int[] arr, int value) { + int[] result = Arrays.copyOf(arr, arr.length + 1); + result[arr.length] = value; + return result; + } + + // Shell Sort + public static void shellSort(int[] arr) { + int n = arr.length; + for (int gap = n / 2; gap > 0; gap /= 2) { + for (int i = gap; i < n; i++) { + int temp = arr[i]; + int j; + for (j = i; j >= gap && arr[j - gap] > temp; j -= gap) { + arr[j] = arr[j - gap]; + } + arr[j] = temp; + } + } + } +} diff --git a/Sparse_Array.java b/Sparse_Array.java new file mode 100644 index 00000000..ba30edbf --- /dev/null +++ b/Sparse_Array.java @@ -0,0 +1,74 @@ +import java.io.*; +import java.math.*; +import java.security.*; +import java.text.*; +import java.util.*; +import java.util.concurrent.*; +import java.util.function.*; +import java.util.regex.*; +import java.util.stream.*; +import static java.util.stream.Collectors.joining; +import static java.util.stream.Collectors.toList; + +class Result { + + +public static List<Integer> matchingStrings(List<String> strings, List<String> queries) { + + List<Integer> result = new ArrayList<Integer>(); + for (int i = 0; i < queries.size(); i++) { + int count = 0; + for (int j = 0; j < strings.size(); j++) { + if(queries.get(i).equals(strings.get(j))){ + count++; + } + } + result.add(count); + } + return result; + } + + + +} + +public class Solution { + public static void main(String[] args) throws IOException { + BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); + BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH"))); + + int stringsCount = Integer.parseInt(bufferedReader.readLine().trim()); + + List<String> strings = IntStream.range(0, stringsCount).mapToObj(i -> { + try { + return bufferedReader.readLine(); + } catch (IOException ex) { + throw new RuntimeException(ex); + } + }) + .collect(toList()); + + int queriesCount = Integer.parseInt(bufferedReader.readLine().trim()); + + List<String> queries = IntStream.range(0, queriesCount).mapToObj(i -> { + try { + return bufferedReader.readLine(); + } catch (IOException ex) { + throw new RuntimeException(ex); + } + }) + .collect(toList()); + + List<Integer> res = Result.matchingStrings(strings, queries); + + bufferedWriter.write( + res.stream() + .map(Object::toString) + .collect(joining("\n")) + + "\n" + ); + + bufferedReader.close(); + bufferedWriter.close(); + } +} diff --git a/Spider-Man game b/Spider-Man game new file mode 100644 index 00000000..ee88d824 --- /dev/null +++ b/Spider-Man game @@ -0,0 +1,119 @@ +import java.awt.Graphics; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; + +public class SpiderManGame extends javax.swing.JFrame implements KeyListener { + + private SpiderMan spiderman; + + public SpiderManGame() { + initComponents(); + + spiderman = new SpiderMan(200, 200); + + addKeyListener(this); + } + + private void initComponents() { + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setSize(400, 400); + setTitle("Spider-Man Game"); + } + + @Override + public void paint(Graphics g) { + super.paint(g); + + spiderman.draw(g); + } + + @Override + public void keyPressed(KeyEvent e) { + int keyCode = e.getKeyCode(); + + switch (keyCode) { + case KeyEvent.VK_LEFT: + spiderman.moveLeft(); + break; + case KeyEvent.VK_RIGHT: + spiderman.moveRight(); + break; + case KeyEvent.VK_UP: + spiderman.jump(); + break; + case KeyEvent.VK_SPACE: + spiderman.shootWeb(); + break; + } + } + + @Override + public void keyReleased(KeyEvent e) { + int keyCode = e.getKeyCode(); + + switch (keyCode) { + case KeyEvent.VK_LEFT: + spiderman.stopMovingLeft(); + break; + case KeyEvent.VK_RIGHT: + spiderman.stopMovingRight(); + break; + case KeyEvent.VK_SPACE: + spiderman.stopShootingWeb(); + break; + } + } + + @Override + public void keyTyped(KeyEvent e) { + } + + public static void main(String[] args) { + new SpiderManGame().setVisible(true); + } +} + +class SpiderMan { + + private int x; + private int y; + private int speed; + + public SpiderMan(int x, int y) { + this.x = x; + this.y = y; + speed = 5; + } + + public void draw(Graphics g) { + g.fillRect(x, y, 10, 10); + } + + public void moveLeft() { + x -= speed; + } + + public void moveRight() { + x += speed; + } + + public void jump() { + y -= speed; + } + + public void shootWeb() { + // TODO: Implement web shooting + } + + public void stopMovingLeft() { + // TODO: Implement stop moving left + } + + public void stopMovingRight() { + // TODO: Implement stop moving right + } + + public void stopShootingWeb() { + // TODO: Implement stop shooting web + } +} diff --git a/StringArray.java b/StringArray.java new file mode 100644 index 00000000..690c8b0d --- /dev/null +++ b/StringArray.java @@ -0,0 +1,19 @@ +public class StringComparison { + public static void main(String a[]){ + String str = "JavaTpoint is a great website to acquire knowledge"; + StringBuffer obj = + new StringBuffer("JavaTpoint is a great website to acquire knowledge"); + if(str.contentEquals(obj)){ + System.out.println("The content of the string is equal"); + } else { + System.out.println("The content of the string is not equal"); + } + StringBuffer obj1 = + new StringBuffer("It is another string"); + if(str.contentEquals(obj1)){ + System.out.println("The content of the string is equal"); + } else { + System.out.println("The content of the string is not equal"); + } + } +} diff --git a/Student Management System.java b/Student Management System.java new file mode 100644 index 00000000..8c9e1329 --- /dev/null +++ b/Student Management System.java @@ -0,0 +1,125 @@ +import java.util.ArrayList; +import java.util.Scanner; + +class Student { + private String name; + private int rollNumber; + private double grade; + + public Student(String name, int rollNumber, double grade) { + this.name = name; + this.rollNumber = rollNumber; + this.grade = grade; + } + + public String getName() { + return name; + } + + public int getRollNumber() { + return rollNumber; + } + + public double getGrade() { + return grade; + } + + public void setGrade(double grade) { + this.grade = grade; + } +} + +public class StudentManagementSystem { + private static ArrayList<Student> students = new ArrayList<>(); + private static Scanner scanner = new Scanner(System.in); + + public static void main(String[] args) { + while (true) { + displayMenu(); + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + switch (choice) { + case 1: + addStudent(); + break; + case 2: + viewStudentRecords(); + break; + case 3: + editStudentInformation(); + break; + case 4: + deleteStudent(); + break; + case 5: + System.out.println("Goodbye!"); + System.exit(0); + default: + System.out.println("Invalid choice. Please try again."); + } + } + } + + private static void displayMenu() { + System.out.println("\nStudent Management System"); + System.out.println("1. Add a new student"); + System.out.println("2. View student records"); + System.out.println("3. Edit student information"); + System.out.println("4. Delete student record"); + System.out.println("5. Exit"); + System.out.print("Enter your choice: "); + } + + private static void addStudent() { + System.out.print("Enter student name: "); + String name = scanner.nextLine(); + System.out.print("Enter roll number: "); + int rollNumber = scanner.nextInt(); + System.out.print("Enter grade: "); + double grade = scanner.nextDouble(); + + Student student = new Student(name, rollNumber, grade); + students.add(student); + System.out.println("Student added to the records!"); + } + + private static void viewStudentRecords() { + System.out.println("\nStudent Records:"); + for (Student student : students) { + System.out.println("Name: " + student.getName() + ", Roll Number: " + student.getRollNumber() + ", Grade: " + student.getGrade()); + } + } + + private static void editStudentInformation() { + System.out.print("Enter the roll number of the student you want to edit: "); + int rollNumber = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + for (Student student : students) { + if (student.getRollNumber() == rollNumber) { + System.out.print("Enter the new grade for " + student.getName() + ": "); + double newGrade = scanner.nextDouble(); + student.setGrade(newGrade); + System.out.println("Student information updated!"); + return; + } + } + System.out.println("Student with roll number " + rollNumber + " not found in the records."); + } + + private static void deleteStudent() { + System.out.print("Enter the roll number of the student you want to delete: "); + int rollNumber = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + for (Student student : students) { + if (student.getRollNumber() == rollNumber) { + students.remove(student); + System.out.println("Student record deleted: " + student.getName()); + return; + } + } + System.out.println("Student with roll number " + rollNumber + " not found in the records."); + } +} diff --git a/Subarray.java b/Subarray.java new file mode 100644 index 00000000..02735f73 --- /dev/null +++ b/Subarray.java @@ -0,0 +1,29 @@ +package Subarray; +public class Subarray_Product_Less_Than_k { + + public static void main(String[] args) { + // TODO Auto-generated method stub + int []arr= {1,2,3,4,2}; + int k=10; + System.out.println(Product(arr,k)); + } + public static int Product(int []arr,int k) { + int si=0; + int ei=0; + int p=1; + int ans=0; + while(ei<arr.length) { + //grow + p=p*arr[ei]; + //shrink + while(p>=k && si<=ei) { + p=p/arr[si]; + si++; + } + //cal + ans=ans+(ei-si+1); + ei++; + } + return ans; + } +} diff --git a/SudokuPuzzle.java b/SudokuPuzzle.java new file mode 100644 index 00000000..74492561 --- /dev/null +++ b/SudokuPuzzle.java @@ -0,0 +1,174 @@ +public class SudokuPuzzle +{ +public boolean isSafe(int[][] b, int r, int c, int n) +{ +// the loop takes care of the clash in the row of the grid +for (int d = 0; d < b.length; d++) +{ + +// if the number that we have inserted is already +// present in that row then return false +if (b[r][d] == n) +{ +return false; +} +} + +// the loop takes care of the clash in the column of the grid +for (int r1 = 0; r1 < b.length; r1++) +{ + +// if the number that we have inserted is already +// present in that column then return false +if (b[r1][c] == n) +{ +return false; +} +} + +// the loop takes care of the clash in the sub-grid that is present in the grid +int sqt = (int)Math.sqrt(b.length); +int boxRowSt = r - r % sqt; +int boxColSt = c - c % sqt; + +for (int r1 = boxRowSt; r1 < boxRowSt + sqt; r1++) +{ +for (int d = boxColSt; d < boxColSt + sqt; d++) +{ +// if the number that we have inserted is already +// present in that sub-grid then return false +if (b[r1][d] == n) +{ +return false; +} +} +} + +// if there is no clash in the grid, then it is safe and +// true is returned +return true; +} + +public boolean solveSudoku(int[][] b, int num) +{ +int r = -1; +int c = -1; +boolean isVacant = true; +for (int i = 0; i < num; i++) +{ +for (int j = 0; j < num; j++) +{ +if (b[i][j] == 0) +{ +r = i; +c = j; + +// false value means +// there is still some +// vacant cells in the grid +isVacant = false; +break; +} +} + +if (!isVacant) +{ +break; +} +} + +// there is no empty space left +// in the grid +if (isVacant) +{ +return true; +} + +// otherwise for each row do the backtracking +for (int no = 1; no <= num; no++) +{ +if (isSafe(b, r, c, no)) +{ +b[r][c] = no; +if (solveSudoku(b, num)) +{ +// display(board, num); +return true; +} +else +{ + +b[r][c] = 0; +} +} +} +return false; +} + +public void display(int[][] b, int n) +{ + +// We have got the solution, just display it +for (int i = 0; i < n; i++) +{ +for (int d = 0; d < n; d++) +{ +System.out.print(b[i][d]); +System.out.print(" "); +} + +System.out.print("\n"); + +if ((i + 1) % (int)Math.sqrt(n) == 0) +{ +System.out.print(""); +} +} +} + +// main method +public static void main(String argvs[]) +{ + +// the 9 x 9 grid +int[][] b = new int[][] { { 7, 0, 0, 0, 0, 0, 2, 0, 0 }, + { 4, 0, 2, 0, 0, 0, 0, 0, 3 }, + { 0, 0, 0, 2, 0, 1, 0, 0, 0 }, + { 3, 0, 0, 1, 8, 0, 0, 9, 7 }, + { 0, 0, 9, 0, 7, 0, 6, 0, 0 }, + { 6, 5, 0, 0, 3, 2, 0, 0, 1 }, + { 0, 0, 0, 4, 0, 9, 0, 0, 0 }, + { 5, 0, 0, 0, 0, 0, 1, 0, 6 }, + { 0, 0, 6, 0, 0, 0, 0, 0, 8 } + } ; + +// creating an object of the class SudokuPuzzle +SudokuPuzzle obj = new SudokuPuzzle(); + +// computing the size of the grid +int size = b.length; + +System.out.println("The grid is: "); +for(int i = 0; i < size; i++) +{ +for(int j = 0; j < size; j++) +{ +System.out.print(b[i][j] + " "); +} + +System.out.println(); +} +System.out.println(); +if (obj.solveSudoku(b, size)) +{ +// display solution + +System.out.println("The solution of the grid is: "); +obj.display(b, size); +} +else +{ +System.out.println("There is no solution available."); +} +} +} diff --git a/SudokuSolver.java b/SudokuSolver.java new file mode 100644 index 00000000..2de08bd4 --- /dev/null +++ b/SudokuSolver.java @@ -0,0 +1,118 @@ +public class SudokuPuzzle { + + // Check if it's safe to place 'n' in the cell at row 'r' and column 'c' + public boolean isSafe(int[][] board, int r, int c, int n) { + // Check for clashes in the row + for (int d = 0; d < board.length; d++) { + if (board[r][d] == n) { + return false; + } + } + + // Check for clashes in the column + for (int r1 = 0; r1 < board.length; r1++) { + if (board[r1][c] == n) { + return false; + } + } + + // Check for clashes in the sub-grid + int sqrt = (int) Math.sqrt(board.length); + int boxRowStart = r - r % sqrt; + int boxColStart = c - c % sqrt; + + for (int r1 = boxRowStart; r1 < boxRowStart + sqrt; r1++) { + for (int d = boxColStart; d < boxColStart + sqrt; d++) { + if (board[r1][d] == n) { + return false; + } + } + } + + return true; + } + + // Solve the Sudoku puzzle using backtracking + public boolean solveSudoku(int[][] board, int num) { + int r = -1; + int c = -1; + boolean isVacant = true; + + for (int i = 0; i < num; i++) { + for (int j = 0; j < num; j++) { + if (board[i][j] == 0) { + r = i; + c = j; + isVacant = false; + break; + } + } + if (!isVacant) { + break; + } + } + + if (isVacant) { + return true; // No empty cells left, the puzzle is solved + } + + // Try placing numbers from 1 to num in the cell + for (int no = 1; no <= num; no++) { + if (isSafe(board, r, c, no)) { + board[r][c] = no; + if (solveSudoku(board, num)) { + return true; + } else { + board[r][c] = 0; // Backtrack + } + } + } + return false; // No solution found for the current configuration + } + + // Display the Sudoku grid + public void display(int[][] board, int n) { + for (int i = 0; i < n; i++) { + for (int d = 0; d < n; d++) { + System.out.print(board[i][d] + " "); + } + System.out.println(); + if ((i + 1) % (int) Math.sqrt(n) == 0) { + System.out.println(); + } + } + } + + public static void main(String[] args) { + int[][] board = new int[][] { + {7, 0, 0, 0, 0, 0, 2, 0, 0}, + {4, 0, 2, 0, 0, 0, 0, 0, 3}, + {0, 0, 0, 2, 0, 1, 0, 0, 0}, + {3, 0, 0, 1, 8, 0, 0, 9, 7}, + {0, 0, 9, 0, 7, 0, 6, 0, 0}, + {6, 5, 0, 0, 3, 2, 0, 0, 1}, + {0, 0, 0, 4, 0, 9, 0, 0, 0}, + {5, 0, 0, 0, 0, 0, 1, 0, 6}, + {0, 0, 6, 0, 0, 0, 0, 0, 8} + }; + + SudokuPuzzle obj = new SudokuPuzzle(); + int size = board.length; + + System.out.println("The input grid is:"); + for (int i = 0; i < size; i++) { + for (int j = 0; j < size; j++) { + System.out.print(board[i][j] + " "); + } + System.out.println(); + } + + System.out.println(); + if (obj.solveSudoku(board, size)) { + System.out.println("The solution to the Sudoku puzzle is:"); + obj.display(board, size); + } else { + System.out.println("There is no solution available."); + } + } +} diff --git a/Svg File Generator/BinaryTreeSVGExporter.java b/Svg File Generator/BinaryTreeSVGExporter.java new file mode 100644 index 00000000..aac63c24 --- /dev/null +++ b/Svg File Generator/BinaryTreeSVGExporter.java @@ -0,0 +1,89 @@ +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import org.apache.batik.dom.GenericDOMImplementation; +import org.apache.batik.svggen.SVGGraphics2D; +import org.w3c.dom.DOMImplementation; +import org.w3c.dom.Document; + +class TreeNode { + int data; + TreeNode left; + TreeNode right; + + public TreeNode(int data) { + this.data = data; + this.left = null; + this.right = null; + } + + public void insert(int data) { + if (data < this.data) { + if (this.left == null) { + this.left = new TreeNode(data); + } else { + this.left.insert(data); + } + } else { + if (this.right == null) { + this.right = new TreeNode(data); + } else { + this.right.insert(data); + } + } + } +} + +public class BinaryTreeSVGExporter { + public static void export(TreeNode root, String filename) throws IOException { + DOMImplementation domImpl = GenericDOMImplementation.getDOMImplementation(); + Document doc = domImpl.createDocument(null, "svg", null); + SVGGraphics2D svg = new SVGGraphics2D(doc); + + // Traverse the tree and draw the nodes and edges + traverse(root, svg, 100, 50, 50); + + // Write the SVG file + File file = new File(filename); + FileWriter fw = new FileWriter(file); + svg.stream(fw, true); + } + + private static void traverse(TreeNode node, SVGGraphics2D svg, int x, int y, int dx) { + if (node == null) { + return; + } + + // Draw the node + svg.drawOval(x - 10, y - 10, 20, 20); + svg.drawString(String.valueOf(node.data), x - 4, y + 4); + + // Draw the left child and edge + if (node.left != null) { + svg.drawLine(x, y, x - dx, y + 50); + traverse(node.left, svg, x - dx, y + 50, dx / 2); + } + + // Draw the right child and edge + if (node.right != null) { + svg.drawLine(x, y, x + dx, y + 50); + traverse(node.right, svg, x + dx, y + 50, dx / 2); + } + } + + public static void main(String[] args) { + TreeNode root = new TreeNode(10); + root.insert(5); + root.insert(15); + root.insert(3); + root.insert(7); + root.insert(13); + root.insert(17); + + try { + BinaryTreeSVGExporter.export(root, "binary_tree.svg"); + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/Svg File Generator/SvgExample.java b/Svg File Generator/SvgExample.java new file mode 100644 index 00000000..4bec5120 --- /dev/null +++ b/Svg File Generator/SvgExample.java @@ -0,0 +1,43 @@ +import java.io.*; +import org.apache.batik.dom.*; +import org.apache.batik.dom.svg.*; +import org.apache.batik.svggen.*; + +public class SvgExample { + public static void main(String[] args) throws IOException { + // Create a new SVG document + DOMImplementation impl = SVGDOMImplementation.getDOMImplementation(); + String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI; + Document doc = impl.createDocument(svgNS, "svg", null); + + // Set the width and height of the document + SVGOMSVGElement svgRoot = (SVGOMSVGElement)doc.getDocumentElement(); + svgRoot.setAttributeNS(null, "width", "200"); + svgRoot.setAttributeNS(null, "height", "200"); + + // Create a circle element + SVGOMCircleElement circle = new SVGOMCircleElement() { + protected AttributeInitializer getAttributeInitializer() { + return new AttributeInitializer() { + public void initialize(Element elt) { + super.initialize(elt); + elt.setAttributeNS(null, "cx", "100"); + elt.setAttributeNS(null, "cy", "100"); + elt.setAttributeNS(null, "r", "50"); + } + }; + } + }; + + // Add the circle to the document + svgRoot.appendChild(circle); + + // Write the SVG document to a file + Writer out = new OutputStreamWriter(new FileOutputStream("example.svg"), "UTF-8"); + SVGGeneratorContext ctx = SVGGeneratorContext.createDefault(doc); + SVGGraphics2D g = new SVGGraphics2D(ctx, false); + g.setSVGCanvasSize(new Dimension(200, 200)); + g.getRoot(svgRoot); + g.stream(out, true); + } +} diff --git a/TASK-1 (Online Reservation System)/.DS_Store b/TASK-1 (Online Reservation System)/.DS_Store new file mode 100644 index 00000000..812ec89c Binary files /dev/null and b/TASK-1 (Online Reservation System)/.DS_Store differ diff --git a/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$1.class b/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$1.class new file mode 100644 index 00000000..9d4dfbfe Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$1.class differ diff --git a/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$2.class b/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$2.class new file mode 100644 index 00000000..63de4e8b Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$2.class differ diff --git a/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$3.class b/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$3.class new file mode 100644 index 00000000..38c79702 Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$3.class differ diff --git a/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$4.class b/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$4.class new file mode 100644 index 00000000..9f081484 Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System$4.class differ diff --git a/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System.class b/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System.class new file mode 100644 index 00000000..90b00ffd Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Login_Sys/Login_System.class differ diff --git a/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103305.png b/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103305.png new file mode 100644 index 00000000..226ee8dc Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103305.png differ diff --git a/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103338.png b/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103338.png new file mode 100644 index 00000000..72cabeaa Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103338.png differ diff --git a/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103355.png b/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103355.png new file mode 100644 index 00000000..9aed37a1 Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103355.png differ diff --git a/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103415.png b/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103415.png new file mode 100644 index 00000000..1d76d558 Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103415.png differ diff --git a/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103433.png b/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103433.png new file mode 100644 index 00000000..a7b24839 Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Output SS/Screenshot 2022-10-02 103433.png differ diff --git a/TASK-1 (Online Reservation System)/bin/Reservationform/Reservation$1.class b/TASK-1 (Online Reservation System)/bin/Reservationform/Reservation$1.class new file mode 100644 index 00000000..58679c2e Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Reservationform/Reservation$1.class differ diff --git a/TASK-1 (Online Reservation System)/bin/Reservationform/Reservation.class b/TASK-1 (Online Reservation System)/bin/Reservationform/Reservation.class new file mode 100644 index 00000000..050d1c7c Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Reservationform/Reservation.class differ diff --git a/TASK-1 (Online Reservation System)/bin/Reservationform/package-info.class b/TASK-1 (Online Reservation System)/bin/Reservationform/package-info.class new file mode 100644 index 00000000..c86731c5 Binary files /dev/null and b/TASK-1 (Online Reservation System)/bin/Reservationform/package-info.class differ diff --git a/TASK-1 (Online Reservation System)/desktop.ini b/TASK-1 (Online Reservation System)/desktop.ini new file mode 100644 index 00000000..e3918fcf --- /dev/null +++ b/TASK-1 (Online Reservation System)/desktop.ini @@ -0,0 +1,2 @@ +[.ShellClassInfo] +LocalizedResourceName=Online Reservation System diff --git a/TASK-1 (Online Reservation System)/src/Login_Sys/Login_System.java b/TASK-1 (Online Reservation System)/src/Login_Sys/Login_System.java new file mode 100644 index 00000000..6e3a784b --- /dev/null +++ b/TASK-1 (Online Reservation System)/src/Login_Sys/Login_System.java @@ -0,0 +1,167 @@ +package Login_Sys; + +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; + +import java.awt.BorderLayout; +import javax.swing.JTextField; + +import Reservationform.Reservation;//importing Reservation package + +import javax.swing.JPasswordField; +import javax.swing.JButton; +import javax.swing.JSeparator; +import java.awt.Font; +import java.awt.Color; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; + +public class Login_System { + + private JFrame frame; + private JTextField textField; //textField is variable for the username that is entered + private JPasswordField txtPassword; ////textPassword is variable for the password that is entered + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + Login_System window = new Login_System(); + window.frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the application. + */ + public Login_System() { + initialize(); + } + + /** + * Initialize the contents of the frame. + */ + private void initialize() {//Defining labels that would appear on the login form + frame = new JFrame(); + frame.setBounds(200, 200, 813, 581); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.getContentPane().setLayout(null); + + JLabel lblNewLabel = new JLabel("Login to Railway Reservation System");//Heading + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 24)); + lblNewLabel.setBounds(172, 62, 481, 44); + frame.getContentPane().add(lblNewLabel); + + JLabel IblUsername = new JLabel("Username");//Username + IblUsername.setFont(new Font("Tahoma", Font.PLAIN, 16)); + IblUsername.setBounds(167, 160, 129, 31); + frame.getContentPane().add(IblUsername); + + JLabel IblPassword = new JLabel("Password");//Password + IblPassword.setFont(new Font("Tahoma", Font.PLAIN, 16)); + IblPassword.setBounds(167, 214, 83, 20); + frame.getContentPane().add(IblPassword); + + textField = new JTextField();//Creating textField for entering username + textField.setBounds(306, 162, 187, 31); + frame.getContentPane().add(textField); + textField.setColumns(10); + + txtPassword = new JPasswordField();//Creating textPassword for entering password + txtPassword.setBounds(306, 211, 187, 31); + frame.getContentPane().add(txtPassword); + + JButton btnNewButton = new JButton("Log In");//Login as submit button + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) {//On clicking login following operations would be performed + + String password = txtPassword.get; + String username = textField.getText(); + + if(password.contains("king")&& username.contains("one")) {//If the username and password matches + txtPassword.setText(null); + textField.setText(null); + Reservation info=new Reservation();//Reservation form opens + Reservation.main(null); + + } + else {//If doesn't matches error + JOptionPane.showMessageDialog(null, "Invalid Login Details", "Login Error", JOptionPane.ERROR_MESSAGE); + txtPassword.setText(null); + textField.setText(null); + } + } + }); + btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 16)); + btnNewButton.setBounds(143, 353, 89, 33); + frame.getContentPane().add(btnNewButton); + + JButton btnNewButton_1 = new JButton("Reset");//Reset button for clearing all fields + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + textField.setText(null); + txtPassword.setText(null); + } + }); + btnNewButton_1.setFont(new Font("Tahoma", Font.BOLD, 16)); + btnNewButton_1.setBackground(new Color(240, 240, 240)); + btnNewButton_1.setBounds(306, 353, 89, 33); + frame.getContentPane().add(btnNewButton_1); + + JButton btnNewButton_2 = new JButton("Exit");//Exit button to exit form + btnNewButton_2.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + JFrame frmLoginSystem = new JFrame("Exit");//Dialog box to confirm exit + if(JOptionPane.showConfirmDialog(frmLoginSystem, "Confirm if you want to exit", "Login Systems", JOptionPane.YES_NO_OPTION)== JOptionPane.YES_NO_OPTION) { + System.exit(0); + } + + } + }); + btnNewButton_2.setFont(new Font("Tahoma", Font.BOLD, 16)); + btnNewButton_2.setBounds(473, 353, 89, 33); + frame.getContentPane().add(btnNewButton_2); + + JSeparator separator = new JSeparator();//Separators to create different sections in form + separator.setBounds(29, 303, 657, -19); + frame.getContentPane().add(separator); + + JSeparator separator_1 = new JSeparator();//Separators to create different sections in form + separator_1.setBounds(100, 117, 571, -5); + frame.getContentPane().add(separator_1); + + JSeparator separator_2 = new JSeparator();//Separators to create different sections in form + separator_2.setBounds(43, 419, 637, -33); + frame.getContentPane().add(separator_2); + + JSeparator separator_3 = new JSeparator();//Separators to create different sections in form + separator_3.setBounds(82, 290, 607, 2); + frame.getContentPane().add(separator_3); + + JSeparator separator_4 = new JSeparator();//Separators to create different sections in form + separator_4.setBounds(82, 119, 607, 14); + frame.getContentPane().add(separator_4); + + JSeparator separator_5 = new JSeparator();//Separators to create different sections in form + separator_5.setBounds(43, 117, 1, 166); + frame.getContentPane().add(separator_5); + + JSeparator separator_6 = new JSeparator();//Separators to create different sections in form + separator_6.setBounds(43, 110, 1, 174); + frame.getContentPane().add(separator_6); + + JSeparator separator_7 = new JSeparator();//Separators to create different sections in form + separator_7.setBounds(43, 282, 1, 2); + frame.getContentPane().add(separator_7); + } +} diff --git a/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103305.png b/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103305.png new file mode 100644 index 00000000..226ee8dc Binary files /dev/null and b/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103305.png differ diff --git a/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103338.png b/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103338.png new file mode 100644 index 00000000..72cabeaa Binary files /dev/null and b/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103338.png differ diff --git a/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103355.png b/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103355.png new file mode 100644 index 00000000..9aed37a1 Binary files /dev/null and b/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103355.png differ diff --git a/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103415.png b/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103415.png new file mode 100644 index 00000000..1d76d558 Binary files /dev/null and b/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103415.png differ diff --git a/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103433.png b/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103433.png new file mode 100644 index 00000000..a7b24839 Binary files /dev/null and b/TASK-1 (Online Reservation System)/src/Output SS/Screenshot 2022-10-02 103433.png differ diff --git a/TASK-1 (Online Reservation System)/src/Reservationform/Reservation.java b/TASK-1 (Online Reservation System)/src/Reservationform/Reservation.java new file mode 100644 index 00000000..30abaa9b --- /dev/null +++ b/TASK-1 (Online Reservation System)/src/Reservationform/Reservation.java @@ -0,0 +1,497 @@ +package Reservationform; + +import java.awt.EventQueue; + +import javax.swing.JFrame; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JComboBox; +import java.awt.Color; +import java.awt.Panel; +import java.awt.FlowLayout; +import java.awt.Font; +import javax.swing.JRadioButton; +import javax.swing.DefaultComboBoxModel; +import javax.swing.JSeparator; +import javax.swing.JTextField; +import javax.swing.JButton; +import java.awt.event.ActionListener; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.awt.event.ActionEvent; +import javax.swing.SwingConstants; +import java.awt.event.MouseAdapter; +import java.awt.event.MouseEvent; + +public class Reservation { + + private JFrame frame; + private JTextField textField;//To display tax + private JTextField textField_1;//To display subtotal + private JTextField textField_2;//To display total + private JTextField textClass;//To display class + private JTextField textTicket;//To display ticket + private JTextField textAdult;//To display no. of adults + private JTextField textChild;//To display no. of children + private JTextField textFrom;//To display the starting station + private JTextField textTo;//To display the destination station + private JTextField textTime;//To display time + private JTextField textTicketno;//To display ticket no. + private JTextField textPrice;//To display ticket price + private JTextField textDate;//To display date + + /** + * Launch the application. + */ + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() {//Reservation window opens + try { + Reservation window = new Reservation(); + window.frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + /** + * Create the application. + */ + public Reservation() { + initialize(); + } + + /** + * Initialize the contents of the frame. + */ + private void initialize() { + frame = new JFrame(); + frame.getContentPane().setFont(new Font("Tahoma", Font.PLAIN, 11)); + frame.setBounds(0, 0, 1370, 700); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.getContentPane().setLayout(null); + + Panel panel = new Panel(); + panel.setForeground(new Color(240, 240, 240)); + panel.setFont(null); + panel.setBackground(new Color(240, 240, 240)); + panel.setBounds(279, 47, 651, 77); + frame.getContentPane().add(panel); + panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); + + JLabel lblNewLabel = new JLabel("Railway Reservation System");//Heading + lblNewLabel.setFont(new Font("Tahoma", Font.BOLD, 40)); + panel.add(lblNewLabel);//added as label + + JLabel lblNewLabel_1 = new JLabel("Ticket Class");//Ticket class Station + lblNewLabel_1.setFont(new Font("Tahoma", Font.BOLD, 15)); + lblNewLabel_1.setBounds(218, 190, 118, 14); + frame.getContentPane().add(lblNewLabel_1); + + JRadioButton rdbtnSleeper = new JRadioButton("Sleeper");//Ticket class type + rdbtnSleeper.setBounds(137, 229, 111, 23); + frame.getContentPane().add(rdbtnSleeper); + + JRadioButton rdbtnGeneral = new JRadioButton("General");//Ticket class type + rdbtnGeneral.setBounds(137, 255, 111, 23); + frame.getContentPane().add(rdbtnGeneral); + + JRadioButton rdbtnFirstAC = new JRadioButton("First Class AC");//Ticket class type + rdbtnFirstAC.setBounds(137, 281, 111, 23); + frame.getContentPane().add(rdbtnFirstAC); + + JRadioButton rdbtnSecondAC = new JRadioButton("Second Class AC");//Ticket class type + rdbtnSecondAC.setBounds(137, 307, 111, 23); + frame.getContentPane().add(rdbtnSecondAC); + + JRadioButton rdbtnThirdAC = new JRadioButton("Third Class AC");//Ticket class type + rdbtnThirdAC.setBounds(137, 333, 111, 23); + frame.getContentPane().add(rdbtnThirdAC); + + JRadioButton rdbtnSingle = new JRadioButton("Single");//Select if only you want to go + rdbtnSingle.setBounds(244, 229, 111, 23); + frame.getContentPane().add(rdbtnSingle); + + JRadioButton rdbtnRound = new JRadioButton("Round Trip");//Select if only you want to go and come back + rdbtnRound.setBounds(244, 260, 111, 23); + frame.getContentPane().add(rdbtnRound); + + JRadioButton rdbtnAdult = new JRadioButton("Adult");//Adult + rdbtnAdult.setBounds(357, 229, 111, 23); + frame.getContentPane().add(rdbtnAdult); + + JRadioButton rdbtnChild = new JRadioButton("Child");//Child + rdbtnChild.setBounds(357, 260, 111, 23); + frame.getContentPane().add(rdbtnChild); + + JComboBox Destination = new JComboBox();//Drop down to select your destination station + Destination.setModel(new DefaultComboBoxModel(new String[] {"Destination", "Banaswadi(BAND)", "Kengeri(KGI)", "Yelahanka Jn(YNK)", "Whitefield(WFD)"})); + Destination.setFont(new Font("Tahoma", Font.PLAIN, 16)); + Destination.setBounds(254, 319, 161, 23); + frame.getContentPane().add(Destination); + + JSeparator separator = new JSeparator();//Separators to create different sections in form + separator.setBounds(256, 47, 692, 23); + frame.getContentPane().add(separator); + + JSeparator separator_1 = new JSeparator();//Separators to create different sections in form + separator_1.setBounds(254, 122, 692, 23); + frame.getContentPane().add(separator_1); + + JSeparator separator_2 = new JSeparator();//Separators to create different sections in form + separator_2.setBounds(132, 174, 116, -4); + frame.getContentPane().add(separator_2); + + JSeparator separator_3 = new JSeparator();//Separators to create different sections in form + separator_3.setBounds(137, 168, 1, 2); + frame.getContentPane().add(separator_3); + + JSeparator separator_4 = new JSeparator();//Separators to create different sections in form + separator_4.setBounds(137, 168, 73, -5); + frame.getContentPane().add(separator_4); + + JSeparator separator_5 = new JSeparator();//Separators to create different sections in form + separator_5.setBounds(314, 156, 1, 2); + frame.getContentPane().add(separator_5); + + JSeparator separator_6 = new JSeparator();//Separators to create different sections in form + separator_6.setBounds(464, 190, 1, 2); + frame.getContentPane().add(separator_6); + + JSeparator separator_7 = new JSeparator();//Separators to create different sections in form + separator_7.setBounds(103, 190, 1, 2); + frame.getContentPane().add(separator_7); + + JSeparator separator_8 = new JSeparator();//Separators to create different sections in form + separator_8.setBounds(127, 215, 298, 29); + frame.getContentPane().add(separator_8); + + JSeparator separator_8_1 = new JSeparator(); + separator_8_1.setBounds(127, 363, 298, 29);//Separators to create different sections in form + frame.getContentPane().add(separator_8_1); + + JLabel lblNewLabel_2 = new JLabel("Tax");//Tax as label + lblNewLabel_2.setFont(new Font("Tahoma", Font.PLAIN, 15)); + lblNewLabel_2.setBounds(914, 387, 49, 14); + frame.getContentPane().add(lblNewLabel_2); + + JLabel lblNewLabel_3 = new JLabel("Sub-total");//Sub-total as label + lblNewLabel_3.setFont(new Font("Tahoma", Font.PLAIN, 15)); + lblNewLabel_3.setBounds(914, 426, 61, 14); + frame.getContentPane().add(lblNewLabel_3); + + JLabel lblNewLabel_4 = new JLabel("Total");//TOtal as label + lblNewLabel_4.setFont(new Font("Tahoma", Font.BOLD, 15)); + lblNewLabel_4.setBounds(914, 475, 49, 14); + frame.getContentPane().add(lblNewLabel_4); + + textField = new JTextField();To display tax + textField.setBounds(1010, 386, 96, 20); + frame.getContentPane().add(textField); + textField.setColumns(10); + + textField_1 = new JTextField(); + textField_1.setBounds(1010, 425, 96, 20);To display subtotal + frame.getContentPane().add(textField_1); + textField_1.setColumns(10); + + textField_2 = new JTextField();To display total + textField_2.setBounds(1010, 474, 96, 20); + frame.getContentPane().add(textField_2); + textField_2.setColumns(10); + + JSeparator separator_9 = new JSeparator();//Separators to create different sections in form + separator_9.setBounds(860, 363, 313, 2); + frame.getContentPane().add(separator_9); + + JSeparator separator_9_1 = new JSeparator();//Separators to create different sections in form + separator_9_1.setBounds(860, 519, 313, 2); + frame.getContentPane().add(separator_9_1); + + JButton btnNewButton = new JButton("Total"); + btnNewButton.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) {//Calculating fares as per the options chosen + + double tax=25.50; + double band=50.78; + double keng=100.23; + double ynk=150.97; + double wfd=200.98; + double tc=0.0, gen=15, sl= 20, ac3=40, ac2=50, ac1=60; + String clss=""; + String tick=""; + String ad="ONE", ch="NIL"; + //Calculating cost of destination + + if(Destination.getSelectedItem().equals("Banaswadi(BAND)")) + { + tc=tc+band; + } + else if(Destination.getSelectedItem().equals("Kengeri(KGI)")){ + tc=tc+keng; + } + else if(Destination.getSelectedItem().equals("Yelahanka(YNK)")) { + tc=tc+ynk; + } + else { + tc=tc+wfd; + } + //Calculating cost of Class + + if(rdbtnSleeper.isSelected()) + { + tc=tc+sl; + clss=clss+"Sleeper"; + } + else if(rdbtnGeneral.isSelected()) + { + tc=tc+gen; + clss=clss+"General"; + } + else if(rdbtnThirdAC.isSelected()) + { + tc=tc+ac3; + clss=clss+"Third AC"; + } + else if(rdbtnSecondAC.isSelected()) + { + tc=tc+ac2; + clss=clss+"Second AC"; + } + else + { + tc=tc+ac1; + clss=clss+"Third AC"; + } + + //Calculating for round trip + if(rdbtnRound.isSelected()) + { + tc=2*tc; + tick=tick+"ROUND TRIP"; + } + else { + tick=tick+"ONE WAY"; + } + if(rdbtnChild.isSelected()) + { + tc=tc/2; + ad="NIL"; + ch="ONE"; + } + double sub=tc; + tc=tc+tax; + String sTax=String.format("%.2f", tax); + textField.setText(sTax); + String subt=String.format("%.2f", sub); + textField_1.setText(subt); + String stc=String.format("%.2f", tc); + textField_2.setText(stc); + textPrice.setText(stc); + textClass.setText(clss); + textTicket.setText(tick); + textAdult.setText(ad); + textChild.setText(ch); + + } + }); + btnNewButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + Calendar timer = Calendar.getInstance(); + timer.getTime(); + SimpleDateFormat tTime = new SimpleDateFormat("hh:mm:ss"); + textTime.setText(tTime.format(timer.getTime()));//Generating time + + SimpleDateFormat Tdate = new SimpleDateFormat("dd-MM-yyyy"); + textDate.setText(Tdate.format(timer.getTime()));//Generating date + + textFrom.setText("Bangalore City Jn Station(SBC"); + textTo.setText((String) Destination.getSelectedItem()+ " *"); + + int n; + String q=""; + n=1325+(int)(Math.random()*4238); + q+=n+1325; + textTicketno.setText(q);//Generating ticket number + + + + + } + }); + btnNewButton.setToolTipText("Total Cost of Ticket"); + btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 20)); + btnNewButton.setBounds(860, 546, 89, 23); + frame.getContentPane().add(btnNewButton); + + JButton btnNewButton_1 = new JButton("Reset"); + btnNewButton_1.setToolTipText("Reset System"); + btnNewButton_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) {//On clicking reset + textField.setText(null); + textField_1.setText(null); + textField_2.setText(null); + rdbtnGeneral.setSelected(false); + rdbtnSleeper.setSelected(false); + rdbtnFirstAC.setSelected(false); + rdbtnSecondAC.setSelected(false); + rdbtnThirdAC.setSelected(false); + rdbtnSingle.setSelected(false); + rdbtnRound.setSelected(false); + rdbtnAdult.setSelected(false); + rdbtnChild.setSelected(false); + Destination.setSelectedItem("Destination"); + textFrom.setText(null); + textTo.setText(null); + textTime.setText(null); + textTicketno.setText(null); + textPrice.setText(null); + textClass.setText(null); + textTicket.setText(null); + textAdult.setText(null); + textChild.setText(null); + textDate.setText(null); + + } + }); + btnNewButton_1.setFont(new Font("Tahoma", Font.BOLD, 20)); + btnNewButton_1.setBounds(970, 546, 101, 23); + frame.getContentPane().add(btnNewButton_1); + + JButton btnNewButton_2 = new JButton("Exit"); + btnNewButton_2.setToolTipText("Exit System");//On clicking exit + btnNewButton_2.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + frame = new JFrame("Exit"); + if (JOptionPane.showConfirmDialog(frame, "Confirm if you want to exit", "Reservationform", JOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION) { + System.exit(0); + } + } + }); + btnNewButton_2.setFont(new Font("Tahoma", Font.BOLD, 20)); + btnNewButton_2.setBounds(1084, 546, 89, 23); + frame.getContentPane().add(btnNewButton_2); + + JSeparator separator_10 = new JSeparator();//Separators to create different sections in form + separator_10.setOrientation(SwingConstants.VERTICAL); + separator_10.setBounds(474, 457, 31, -232); + frame.getContentPane().add(separator_10); + + JLabel lblNewLabel_5 = new JLabel("Class");//Labels + lblNewLabel_5.setFont(new Font("Tahoma", Font.BOLD, 16)); + lblNewLabel_5.setBounds(475, 190, 49, 14); + frame.getContentPane().add(lblNewLabel_5); + + JLabel lblNewLabel_6 = new JLabel("Ticket");//Labels + lblNewLabel_6.setFont(new Font("Tahoma", Font.BOLD, 16)); + lblNewLabel_6.setBounds(560, 190, 49, 14); + frame.getContentPane().add(lblNewLabel_6); + + JLabel lblNewLabel_7 = new JLabel("Adult");//Labels + lblNewLabel_7.setFont(new Font("Tahoma", Font.BOLD, 16)); + lblNewLabel_7.setBounds(667, 190, 49, 14); + frame.getContentPane().add(lblNewLabel_7); + + JLabel lblNewLabel_8 = new JLabel("Child");//Labels + lblNewLabel_8.setFont(new Font("Tahoma", Font.BOLD, 16)); + lblNewLabel_8.setBounds(752, 190, 49, 14); + frame.getContentPane().add(lblNewLabel_8); + + JSeparator separator_11 = new JSeparator(); + separator_11.setBounds(441, 215, 381, 2); + frame.getContentPane().add(separator_11); + + textClass = new JTextField(); + textClass.setBounds(464, 223, 73, 34); + frame.getContentPane().add(textClass); + textClass.setColumns(10); + + textTicket = new JTextField(); + textTicket.setColumns(10); + textTicket.setBounds(560, 223, 73, 34); + frame.getContentPane().add(textTicket); + + textAdult = new JTextField(); + textAdult.setColumns(10); + textAdult.setBounds(653, 223, 73, 34); + frame.getContentPane().add(textAdult); + + textChild = new JTextField(); + textChild.setColumns(10); + textChild.setBounds(736, 223, 73, 34); + frame.getContentPane().add(textChild); + + JSeparator separator_12 = new JSeparator();//Separators to create different sections in form + separator_12.setOrientation(SwingConstants.VERTICAL); + separator_12.setBounds(432, 215, 24, 437); + frame.getContentPane().add(separator_12); + + JSeparator separator_12_1 = new JSeparator();//Separators to create different sections in form + separator_12_1.setOrientation(SwingConstants.VERTICAL); + separator_12_1.setBounds(843, 215, 73, 437); + frame.getContentPane().add(separator_12_1); + + JLabel lblNewLabel_9 = new JLabel("From");//Labels + lblNewLabel_9.setFont(new Font("Tahoma", Font.BOLD, 16)); + lblNewLabel_9.setBounds(464, 351, 49, 14); + frame.getContentPane().add(lblNewLabel_9); + + JLabel lblNewLabel_10 = new JLabel("To");//Labels + lblNewLabel_10.setFont(new Font("Tahoma", Font.BOLD, 16)); + lblNewLabel_10.setBounds(464, 389, 49, 14); + frame.getContentPane().add(lblNewLabel_10); + + textFrom = new JTextField(); + textFrom.setBounds(620, 350, 220, 20); + frame.getContentPane().add(textFrom); + textFrom.setColumns(10); + + textTo = new JTextField(); + textTo.setBounds(620, 386, 220, 20); + frame.getContentPane().add(textTo); + textTo.setColumns(10); + + JLabel lblNewLabel_11 = new JLabel("Time");//Labels + lblNewLabel_11.setFont(new Font("Tahoma", Font.BOLD, 16)); + lblNewLabel_11.setBounds(464, 431, 49, 14); + frame.getContentPane().add(lblNewLabel_11); + + JLabel lblNewLabel_12 = new JLabel("Ticket No.");//Labels + lblNewLabel_12.setFont(new Font("Tahoma", Font.BOLD, 16)); + lblNewLabel_12.setBounds(464, 475, 81, 14); + frame.getContentPane().add(lblNewLabel_12); + + JLabel lblNewLabel_13 = new JLabel("Price");//Labels + lblNewLabel_13.setFont(new Font("Tahoma", Font.BOLD, 16)); + lblNewLabel_13.setBounds(464, 519, 49, 14); + frame.getContentPane().add(lblNewLabel_13); + + textTime = new JTextField(); + textTime.setColumns(10); + textTime.setBounds(620, 425, 220, 20); + frame.getContentPane().add(textTime); + + textTicketno = new JTextField(); + textTicketno.setColumns(10); + textTicketno.setBounds(620, 474, 220, 20); + frame.getContentPane().add(textTicketno); + + textPrice = new JTextField(); + textPrice.setColumns(10); + textPrice.setBounds(620, 519, 220, 20); + frame.getContentPane().add(textPrice); + + JLabel lblNewLabel_14 = new JLabel("Date of Journey");//Labels + lblNewLabel_14.setFont(new Font("Tahoma", Font.BOLD, 16)); + lblNewLabel_14.setBounds(464, 311, 145, 14); + frame.getContentPane().add(lblNewLabel_14); + + textDate = new JTextField(); + textDate.setColumns(10); + textDate.setBounds(620, 308, 220, 20); + frame.getContentPane().add(textDate); + } +} diff --git a/TASK-1 (Online Reservation System)/src/Reservationform/package-info.java b/TASK-1 (Online Reservation System)/src/Reservationform/package-info.java new file mode 100644 index 00000000..11ab2f05 --- /dev/null +++ b/TASK-1 (Online Reservation System)/src/Reservationform/package-info.java @@ -0,0 +1 @@ +package Reservationform; \ No newline at end of file diff --git a/Task List Application.java b/Task List Application.java new file mode 100644 index 00000000..fd5c9456 --- /dev/null +++ b/Task List Application.java @@ -0,0 +1,120 @@ +import java.util.ArrayList; +import java.util.Scanner; + +class Task { + private String title; + private String description; + private boolean isCompleted; + + public Task(String title, String description) { + this.title = title; + this.description = description; + this.isCompleted = false; + } + + public String getTitle() { + return title; + } + + public String getDescription() { + return description; + } + + public boolean isCompleted() { + return isCompleted; + } + + public void markAsCompleted() { + isCompleted = true; + } +} + +public class TaskListApp { + private static ArrayList<Task> tasks = new ArrayList<>(); + private static Scanner scanner = new Scanner(System.in); + + public static void main(String[] args) { + while (true) { + displayMenu(); + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + switch (choice) { + case 1: + addTask(); + break; + case 2: + viewTasks(); + break; + case 3: + markTaskCompleted(); + break; + case 4: + deleteTask(); + break; + case 5: + System.out.println("Goodbye!"); + System.exit(0); + default: + System.out.println("Invalid choice. Please try again."); + } + } + } + + private static void displayMenu() { + System.out.println("\nTask List Application"); + System.out.println("1. Add a new task"); + System.out.println("2. View tasks"); + System.out.println("3. Mark a task as completed"); + System.out.println("4. Delete a task"); + System.out.println("5. Exit"); + System.out.print("Enter your choice: "); + } + + private static void addTask() { + System.out.print("Enter task title: "); + String title = scanner.nextLine(); + System.out.print("Enter task description: "); + String description = scanner.nextLine(); + + Task task = new Task(title, description); + tasks.add(task); + System.out.println("Task added successfully!"); + } + + private static void viewTasks() { + System.out.println("\nTask List:"); + for (int i = 0; i < tasks.size(); i++) { + Task task = tasks.get(i); + System.out.println(i + 1 + ". " + task.getTitle() + " - " + task.getDescription() + + (task.isCompleted() ? " (Completed)" : "")); + } + } + + private static void markTaskCompleted() { + System.out.print("Enter the task number to mark as completed: "); + int taskNumber = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + if (taskNumber >= 1 && taskNumber <= tasks.size()) { + Task task = tasks.get(taskNumber - 1); + task.markAsCompleted(); + System.out.println("Task marked as completed!"); + } else { + System.out.println("Invalid task number. Please try again."); + } + } + + private static void deleteTask() { + System.out.print("Enter the task number to delete: "); + int taskNumber = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + if (taskNumber >= 1 && taskNumber <= tasks.size()) { + Task task = tasks.remove(taskNumber - 1); + System.out.println("Task deleted: " + task.getTitle()); + } else { + System.out.println("Invalid task number. Please try again."); + } + } +} diff --git a/Task list/task_list.java b/Task list/task_list.java new file mode 100644 index 00000000..f6212620 --- /dev/null +++ b/Task list/task_list.java @@ -0,0 +1,69 @@ +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +public class TodoList { + private List<String> tasks; + + public TodoList() { + tasks = new ArrayList<>(); + } + + public void addTask(String task) { + tasks.add(task); + } + + public void removeTask(int index) { + if (index >= 0 && index < tasks.size()) { + tasks.remove(index); + } else { + System.out.println("Invalid index"); + } + } + + public void listTasks() { + System.out.println("Task List:"); + for (int i = 0; i < tasks.size(); i++) { + System.out.println(i + 1 + ". " + tasks.get(i)); + } + } + + public static void main(String[] args) { + TodoList todoList = new TodoList(); + Scanner scanner = new Scanner(System.in); + + while (true) { + System.out.println("\nChoose an action:"); + System.out.println("1. Add task"); + System.out.println("2. Remove task"); + System.out.println("3. List tasks"); + System.out.println("4. Exit"); + + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume the newline character + + switch (choice) { + case 1: + System.out.print("Enter the task: "); + String task = scanner.nextLine(); + todoList.addTask(task); + break; + case 2: + System.out.print("Enter the index of the task to remove: "); + int index = scanner.nextInt(); + scanner.nextLine(); // Consume the newline character + todoList.removeTask(index - 1); + break; + case 3: + todoList.listTasks(); + break; + case 4: + System.out.println("Exiting..."); + System.exit(0); + break; + default: + System.out.println("Invalid option"); + } + } + } +} diff --git a/Task_Tracker/Task_Tracker.java b/Task_Tracker/Task_Tracker.java new file mode 100644 index 00000000..7db603bc --- /dev/null +++ b/Task_Tracker/Task_Tracker.java @@ -0,0 +1,97 @@ +import java.util.ArrayList; +import java.util.Scanner; + +class Task { + private String description; + private boolean completed; + + public Task(String description) { + this.description = description; + this.completed = false; + } + + public String getDescription() { + return description; + } + + public boolean isCompleted() { + return completed; + } + + public void markCompleted() { + completed = true; + } +} + +class TaskTracker { + private ArrayList<Task> tasks; + + public TaskTracker() { + tasks = new ArrayList<>(); + } + + public void addTask(String description) { + Task newTask = new Task(description); + tasks.add(newTask); + System.out.println("Task added: " + description); + } + + public void markTaskCompleted(int index) { + if (index >= 0 && index < tasks.size()) { + Task task = tasks.get(index); + task.markCompleted(); + System.out.println("Task marked as completed: " + task.getDescription()); + } else { + System.out.println("Invalid task index."); + } + } + + public void displayTasks() { + System.out.println("Task List:"); + for (int i = 0; i < tasks.size(); i++) { + Task task = tasks.get(i); + System.out.println((i + 1) + ". " + task.getDescription() + + (task.isCompleted() ? " - Completed" : "")); + } + } +} + +public class TaskTrackerApp { + public static void main(String[] args) { + TaskTracker taskTracker = new TaskTracker(); + Scanner scanner = new Scanner(System.in); + + while (true) { + System.out.println("\n1. Add Task\n2. Mark Task as Completed\n3. Display Tasks\n4. Exit"); + System.out.print("Choose an option: "); + + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume the newline character + + switch (choice) { + case 1: + System.out.print("Enter task description: "); + String description = scanner.nextLine(); + taskTracker.addTask(description); + break; + + case 2: + System.out.print("Enter the index of the task to mark as completed: "); + int index = scanner.nextInt(); + taskTracker.markTaskCompleted(index - 1); // Adjust index for user input + break; + + case 3: + taskTracker.displayTasks(); + break; + + case 4: + System.out.println("Exiting the Task Tracker. Goodbye!"); + System.exit(0); + + default: + System.out.println("Invalid choice. Please choose a valid option."); + } + } + } +} diff --git a/TellMeWhereApp b/TellMeWhereApp new file mode 160000 index 00000000..68b7b004 --- /dev/null +++ b/TellMeWhereApp @@ -0,0 +1 @@ +Subproject commit 68b7b004608a4f913eb4875ff20160018fb7d824 diff --git a/Temp3524.java b/Temp3524.java new file mode 100644 index 00000000..be98cc68 --- /dev/null +++ b/Temp3524.java @@ -0,0 +1,14 @@ +import java.util.Scanner; +import java.text.DecimalFormat; +public class Temp3524 { + public static void main(String[] args){ + Scanner in = new Scanner(System.in); + System.out.println("2021503524 - Mugundh J B - 09/09/23 - 2.40 pm"); + System.out.print("Enter temperature in Fahrenheit: "); + float fah = in.nextFloat(); + float c = (fah - 32) * 5 / 9; + DecimalFormat df = new DecimalFormat("0.00"); // Used to format the decimal value in form of pattern + System.out.printf("Fahrenheit temperature " + df.format(fah) + + " is the same \nas " + df.format(c) + " degrees Celsius."); + } +} diff --git a/Temperature Converter/TemperatureConverter.java b/Temperature Converter/TemperatureConverter.java new file mode 100644 index 00000000..3e56a0b6 --- /dev/null +++ b/Temperature Converter/TemperatureConverter.java @@ -0,0 +1,213 @@ +// Temperature convertor + + + +public class Temperature_converter extends javax.swing.JFrame { + + //Variable Declaration + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JCheckBox jCheckBox2; + private javax.swing.JComboBox<String> jComboBox1; + private javax.swing.JComboBox<String> jComboBox2; + private javax.swing.JLabel jLabel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JSpinner jSpinner1; + private javax.swing.JTextField jTextField1; + private javax.swing.JTextField jTextField2; + + public Temperature_converter() { + initComponents(); + } + private void initComponents() { + + jCheckBox2 = new javax.swing.JCheckBox(); + jSpinner1 = new javax.swing.JSpinner(); + jPanel2 = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + jComboBox1 = new javax.swing.JComboBox<>(); + jComboBox2 = new javax.swing.JComboBox<>(); + jTextField1 = new javax.swing.JTextField(); + jTextField2 = new javax.swing.JTextField(); + jButton1 = new javax.swing.JButton(); + jButton2 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + + jCheckBox2.setText("jCheckBox2"); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setTitle("Tempertaure Converter"); + + jPanel2.setBackground(new java.awt.Color(51, 51, 51)); + + jLabel1.setBackground(new java.awt.Color(255, 255, 255)); + jLabel1.setFont(new java.awt.Font("Segoe UI", 1, 24)); // NOI18N + jLabel1.setForeground(new java.awt.Color(255, 255, 255)); + jLabel1.setText("Temperature Converter "); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(142, 142, 142) + .addComponent(jLabel1) + .addContainerGap(161, Short.MAX_VALUE)) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(19, 19, 19) + .addComponent(jLabel1) + .addContainerGap(23, Short.MAX_VALUE)) + ); + + jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Celsius", "Fahrenheit" })); + + jComboBox2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Celsius", "Fahrenheit" })); + + jTextField2.setEditable(false); + + jButton1.setFont(new java.awt.Font("Segoe UI", 3, 14)); // NOI18N + jButton1.setText("Convert"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + + jButton2.setFont(new java.awt.Font("Segoe UI", 3, 14)); // NOI18N + jButton2.setText("Clear"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + + jButton3.setFont(new java.awt.Font("Segoe UI", 3, 14)); // NOI18N + jButton3.setText("Exit"); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(50, 50, 50) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jComboBox2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jComboBox1, 0, 116, Short.MAX_VALUE)) + .addGap(133, 133, 133) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton1) + .addGap(30, 30, 30) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jButton3) + .addComponent(jButton2)) + .addGap(29, 29, 29)) + .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(46, 46, 46) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(3, 3, 3) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButton1) + .addComponent(jButton2)) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButton3) + .addGap(37, 37, 37)) + ); + + pack(); + }// + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) { + System.exit(0); + } + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { + jTextField1.setText(""); + jTextField2.setText(""); + } + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { + String val1=(String)jComboBox1.getSelectedItem(); + String val2=(String)jComboBox2.getSelectedItem(); + + if(val1.equals("Celsius") && val2.equals("Fahrenheit")){ + double cel = Double.parseDouble(jTextField1.getText()); + double fah = (double)((9.0/5.0)*cel + 32); + + jTextField2.setText(String.valueOf(fah)); + } + else if(val1.equals("Celsius") && val2.equals("Celsius")) + { + double c = Double.parseDouble(jTextField1.getText()); + + jTextField2.setText(String.valueOf(c)); + } + if(val1.equals("Fahrenheit") && val2.equals("Celsius")) + { + double f = Double.parseDouble(jTextField1.getText()); + + double c = (double)((f - 32)*(5.0/9.0)); + + jTextField2.setText(String.valueOf(Math.round(c))); + } + else if(val1.equals("Fahrenheit") && val2.equals("Fahrenheit")) + { + double f = Double.parseDouble(jTextField1.getText()); + + jTextField2.setText(String.valueOf(Math.round(f))); + } + } + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(Temperature_converter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(Temperature_converter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(Temperature_converter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(Temperature_converter.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new Temperature_converter().setVisible(true); + } + }); + } + + +} \ No newline at end of file diff --git a/TemperatureConverter/app.js b/TemperatureConverter/app.js new file mode 100644 index 00000000..721d9339 --- /dev/null +++ b/TemperatureConverter/app.js @@ -0,0 +1,18 @@ +// let Fahrenheit = document.getElementById('Faht') +// let submit = document.getElementById('submit') +// submit.addEventListener('click', (e)=>{ +// let Celsius = document.getElementById('temp').value +// e.preventDefault() +// result(Celsius) +// }) +// const result = (cel) =>{ +// Fahrenheit.value = (9 * cel + 160 ) / 5 +// } + +let celcius = document.getElementById("celcius") +let farenheit = document.getElementById("farenheit") + +const convert = () => { + let answer = (celcius.value * 9 / 5) + 32 + farenheit.value = answer +} \ No newline at end of file diff --git a/TemperatureConverter/index.html b/TemperatureConverter/index.html new file mode 100644 index 00000000..1d65b718 --- /dev/null +++ b/TemperatureConverter/index.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Document</title> + <link rel="stylesheet" href="style.css"> +</head> + +<body> + <!-- <div class="container"> + <div class="row my-5 py-5"> + <div class="col-4 offset-4"> + <div class="form-group"> + <label for="">Enter Temperature in Celcius(°C)</label> + <input type="text" id="temp" class="form-control"> + </div> + <input type="submit" id="submit" class="btn btn-success"> + </div> + </div> + <div class="row my-3 py-3"> + <div class="col-4 offset-4"> + <div class="form-group"> + <label for="">Temperature in Fahrenheit(°F)</label> + <input type="text" id="Faht" class="form-control" readonly> + </div> + </div> + </div> --> + + <div class="container"> + <div class="parent_div"> + <div class="child_div"> + <label for="celcius">Enter Temperature in °C</label> + <br /> + <input type="text" id="celcius"> + <div class="btn-div"> + <button class="btn" onclick="convert()">Submit</button> + </div> + <label for="farenheit">Temperature in °F</label> + <br /> + <input type="text" id="farenheit" disabled> + </div> + </div> + </div> + </div> + + <script src="app.js"></script> +</body> + +</html> \ No newline at end of file diff --git a/TemperatureConverter/style.css b/TemperatureConverter/style.css new file mode 100644 index 00000000..663cce6b --- /dev/null +++ b/TemperatureConverter/style.css @@ -0,0 +1,64 @@ +* { + padding: 0; + margin: 0; + box-sizing: border-box; + font-family: Arial, Helvetica, sans-serif; +} + +.container { + width: 100vw; + height: 100vh; + background-color: azure; + display: flex; + justify-content: center; + align-items: center; + +} + +.parent_div { + width: 30vw; + height: 50vh; + background-color: white; + display: flex; + justify-content: center; + align-items: center; + border: 2px solid #A8E890; + border-radius: 10px; +} + +.btn-div { + display: flex; + justify-content: center; + align-items: center; + margin: 20px; +} + +.btn { + background-color: #A8E890; + border: none; + color: white; + border-radius: 5px; + padding: 5px 15px; + cursor: pointer; + font-size: 16px; +} + +.btn:hover { + background-color: transparent; + color: #A8E890; + border: 1px solid #A8E890; +} + +input { + margin: 5px; + padding: 5px; + border: 1px solid #A8E890; + border-radius: 10px; + width:100% +} + +input:focus, +select:focus, +textarea:focus { + outline: none; +} \ No newline at end of file diff --git a/Thermometer.java b/Thermometer.java new file mode 100644 index 00000000..ae1551cc --- /dev/null +++ b/Thermometer.java @@ -0,0 +1,39 @@ +import java.util.Random; + +// Thermometer class to represent a thermometer +class Thermometer { + private double temperature; + + public Thermometer() { + // Initialize the temperature to a random value between 0 and 100 + Random rand = new Random(); + temperature = rand.nextDouble() * 100; + } + + public double getTemperature() { + return temperature; + } + + public void setTemperature(double temperature) { + this.temperature = temperature; + } + + public void measure() { + // Simulate measuring the temperature by updating it randomly + Random rand = new Random(); + temperature += rand.nextDouble() * 2 - 1; // Random change between -1 and 1 + } +} + +public class ThermometerApp { + public static void main(String[] args) { + Thermometer thermometer = new Thermometer(); + + System.out.println("Initial temperature: " + thermometer.getTemperature() + "°C"); + + for (int i = 0; i < 5; i++) { + thermometer.measure(); + System.out.println("Updated temperature: " + thermometer.getTemperature() + "°C"); + } + } +} diff --git a/Tic Tac Toe Python/game.py b/Tic Tac Toe Python/game.py new file mode 100644 index 00000000..d072b65e --- /dev/null +++ b/Tic Tac Toe Python/game.py @@ -0,0 +1,90 @@ +import os +import time + +board = [' ',' ',' ',' ',' ',' ',' ',' ',' ',' '] +player = 1 + +########win Flags########## +Win = 1 +Draw = -1 +Running = 0 +Stop = 1 +########################### +Game = Running +Mark = 'X' + +#This Function Draws Game Board +def DrawBoard(): + print(" %c | %c | %c " % (board[1],board[2],board[3])) + print("___|___|___") + print(" %c | %c | %c " % (board[4],board[5],board[6])) + print("___|___|___") + print(" %c | %c | %c " % (board[7],board[8],board[9])) + print(" | | ") + +#This Function Checks position is empty or not +def CheckPosition(x): + if(board[x] == ' '): + return True + else: + return False + +#This Function Checks player has won or not +def CheckWin(): + global Game + #Horizontal winning condition + if(board[1] == board[2] and board[2] == board[3] and board[1] != ' '): + Game = Win + elif(board[4] == board[5] and board[5] == board[6] and board[4] != ' '): + Game = Win + elif(board[7] == board[8] and board[8] == board[9] and board[7] != ' '): + Game = Win + #Vertical Winning Condition + elif(board[1] == board[4] and board[4] == board[7] and board[1] != ' '): + Game = Win + elif(board[2] == board[5] and board[5] == board[8] and board[2] != ' '): + Game = Win + elif(board[3] == board[6] and board[6] == board[9] and board[3] != ' '): + Game=Win + #Diagonal Winning Condition + elif(board[1] == board[5] and board[5] == board[9] and board[5] != ' '): + Game = Win + elif(board[3] == board[5] and board[5] == board[7] and board[5] != ' '): + Game=Win + #Match Tie or Draw Condition + elif(board[1]!=' ' and board[2]!=' ' and board[3]!=' ' and board[4]!=' ' and board[5]!=' ' and board[6]!=' ' and board[7]!=' ' and board[8]!=' ' and board[9]!=' '): + Game=Draw + else: + Game=Running + +print("Tic-Tac-Toe Game Designed By Sourabh Somani") +print("Player 1 [X] --- Player 2 [O]\n") +print() +print() +print("Please Wait...") +time.sleep(3) +while(Game == Running): + os.system('cls') + DrawBoard() + if(player % 2 != 0): + print("Player 1's chance") + Mark = 'X' + else: + print("Player 2's chance") + Mark = 'O' + choice = int(input("Enter the position between [1-9] where you want to mark : ")) + if(CheckPosition(choice)): + board[choice] = Mark + player+=1 + CheckWin() + +os.system('cls') +DrawBoard() +if(Game==Draw): + print("Game Draw") +elif(Game==Win): + player-=1 + if(player%2!=0): + print("Player 1 Won") + else: + print("Player 2 Won") diff --git a/Tic- Tac- Toe Game/TicTacToe.java b/Tic- Tac- Toe Game/TicTacToe.java new file mode 100644 index 00000000..4fef47d3 --- /dev/null +++ b/Tic- Tac- Toe Game/TicTacToe.java @@ -0,0 +1,94 @@ +import java.util.Scanner; + +public class TicTacToe { + private static char[][] board = new char[3][3]; + private static char currentPlayer = 'X'; + private static boolean gameWon = false; + + public static void main(String[] args) { + initializeBoard(); + printBoard(); + + while (!gameWon) { + makeMove(); + printBoard(); + checkForWin(); + switchPlayer(); + } + + if (gameWon) { + System.out.println("Player " + currentPlayer + " wins!"); + } else { + System.out.println("It's a draw!"); + } + } + + private static void initializeBoard() { + for (int row = 0; row < 3; row++) { + for (int col = 0; col < 3; col++) { + board[row][col] = ' '; + } + } + } + + private static void printBoard() { + for (int row = 0; row < 3; row++) { + for (int col = 0; col < 3; col++) { + System.out.print(board[row][col]); + if (col < 2) { + System.out.print(" | "); + } + } + System.out.println(); + if (row < 2) { + System.out.println("---------"); + } + } + } + + private static void makeMove() { + Scanner scanner = new Scanner(System.in); + int row, col; + do { + System.out.print("Player " + currentPlayer + ", enter your row (0, 1, 2) and column (0, 1, 2): "); + row = scanner.nextInt(); + col = scanner.nextInt(); + } while (row < 0 || row > 2 || col < 0 || col > 2 || board[row][col] != ' '); + board[row][col] = currentPlayer; + } + + private static void checkForWin() { + // Check rows, columns, and diagonals for a win + for (int i = 0; i < 3; i++) { + if (board[i][0] == currentPlayer && board[i][1] == currentPlayer && board[i][2] == currentPlayer + || board[0][i] == currentPlayer && board[1][i] == currentPlayer && board[2][i] == currentPlayer + || board[0][0] == currentPlayer && board[1][1] == currentPlayer && board[2][2] == currentPlayer + || board[0][2] == currentPlayer && board[1][1] == currentPlayer && board[2][0] == currentPlayer) { + gameWon = true; + return; + } + } + + // Check for a draw + boolean isFull = true; + for (int row = 0; row < 3; row++) { + for (int col = 0; col < 3; col++) { + if (board[row][col] == ' ') { + isFull = false; + break; + } + } + } + if (isFull) { + gameWon = true; + } + } + + private static void switchPlayer() { + if (currentPlayer == 'X') { + currentPlayer = 'O'; + } else { + currentPlayer = 'X'; + } + } +} diff --git a/Tic-Tac-Toe/README.md b/Tic-Tac-Toe/README.md new file mode 100644 index 00000000..91432184 --- /dev/null +++ b/Tic-Tac-Toe/README.md @@ -0,0 +1,3 @@ +# Tic Tac Toe Game using Java + +I have created a Java program to implement a 3×3 Tic-Tac-Toe game for two players. diff --git a/Tic-Tac-Toe/game.class b/Tic-Tac-Toe/game.class new file mode 100644 index 00000000..6d402fd2 Binary files /dev/null and b/Tic-Tac-Toe/game.class differ diff --git a/Tic-Tac-Toe/game.java b/Tic-Tac-Toe/game.java new file mode 100644 index 00000000..9070faed --- /dev/null +++ b/Tic-Tac-Toe/game.java @@ -0,0 +1,173 @@ +// A simple program to demonstrate +// Tic-Tac-Toe Game. +import java.util.*; + +public class game{ + + static String[] board; + static String turn; + + + // CheckWinner method will + // decide the combination + // of three box given below. + static String checkWinner() + { + for (int a = 0; a < 8; a++) { + String line = null; + + switch (a) { + case 0: + line = board[0] + board[1] + board[2]; + break; + case 1: + line = board[3] + board[4] + board[5]; + break; + case 2: + line = board[6] + board[7] + board[8]; + break; + case 3: + line = board[0] + board[3] + board[6]; + break; + case 4: + line = board[1] + board[4] + board[7]; + break; + case 5: + line = board[2] + board[5] + board[8]; + break; + case 6: + line = board[0] + board[4] + board[8]; + break; + case 7: + line = board[2] + board[4] + board[6]; + break; + } + //For X winner + if (line.equals("XXX")) { + return "X"; + } + + // For O winner + else if (line.equals("OOO")) { + return "O"; + } + } + + for (int a = 0; a < 9; a++) { + if (Arrays.asList(board).contains( + String.valueOf(a + 1))) { + break; + } + else if (a == 8) { + return "draw"; + } + } + + // To enter the X Or O at the exact place on board. + System.out.println( + turn + "'s turn; enter a slot number to place " + + turn + " in:"); + return null; + } + + // To print out the board. + /* |---|---|---| + | 1 | 2 | 3 | + |-----------| + | 4 | 5 | 6 | + |-----------| + | 7 | 8 | 9 | + |---|---|---|*/ + + static void printBoard() + { + System.out.println("|---|---|---|"); + System.out.println("| " + board[0] + " | " + + board[1] + " | " + board[2] + + " |"); + System.out.println("|-----------|"); + System.out.println("| " + board[3] + " | " + + board[4] + " | " + board[5] + + " |"); + System.out.println("|-----------|"); + System.out.println("| " + board[6] + " | " + + board[7] + " | " + board[8] + + " |"); + System.out.println("|---|---|---|"); + } + + public static void main(String[] args) + { + Scanner in = new Scanner(System.in); + board = new String[9]; + turn = "X"; + String winner = null; + + for (int a = 0; a < 9; a++) { + board[a] = String.valueOf(a + 1); + } + + System.out.println("Welcome to 3x3 Tic Tac Toe."); + printBoard(); + + System.out.println( + "X will play first. Enter a slot number to place X in:"); + + while (winner == null) { + int numInput; + + // Exception handling. + // numInput will take input from user like from 1 to 9. + // If it is not in range from 1 to 9. + // then it will show you an error "Invalid input." + try { + numInput = in.nextInt(); + if (!(numInput > 0 && numInput <= 9)) { + System.out.println( + "Invalid input; re-enter slot number:"); + continue; + } + } + catch (InputMismatchException e) { + System.out.println( + "Invalid input; re-enter slot number:"); + continue; + } + + // This game has two player x and O. + // Here is the logic to decide the turn. + if (board[numInput - 1].equals( + String.valueOf(numInput))) { + board[numInput - 1] = turn; + + if (turn.equals("X")) { + turn = "O"; + } + else { + turn = "X"; + } + + printBoard(); + winner = checkWinner(); + } + else { + System.out.println( + "Slot already taken; re-enter slot number:"); + } + } + + // If no one win or lose from both player x and O. + // then here is the logic to print "draw". + if (winner.equalsIgnoreCase("draw")) { + System.out.println( + "It's a draw! Thanks for playing."); + } + + // For winner -to display Congratulations! message. + else { + System.out.println( + "Congratulations! " + winner + + "'s have won! Thanks for playing."); + } + } +} diff --git a/TicTacToe Android apk/.gitignore b/TicTacToe Android apk/.gitignore new file mode 100644 index 00000000..aa724b77 --- /dev/null +++ b/TicTacToe Android apk/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/TicTacToe Android apk/.idea/.gitignore b/TicTacToe Android apk/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/TicTacToe Android apk/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/TicTacToe Android apk/.idea/.name b/TicTacToe Android apk/.idea/.name new file mode 100644 index 00000000..a9863df9 --- /dev/null +++ b/TicTacToe Android apk/.idea/.name @@ -0,0 +1 @@ +Tic-Tac-Toe \ No newline at end of file diff --git a/TicTacToe Android apk/.idea/compiler.xml b/TicTacToe Android apk/.idea/compiler.xml new file mode 100644 index 00000000..fb7f4a8a --- /dev/null +++ b/TicTacToe Android apk/.idea/compiler.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <bytecodeTargetLevel target="11" /> + </component> +</project> \ No newline at end of file diff --git a/TicTacToe Android apk/.idea/gradle.xml b/TicTacToe Android apk/.idea/gradle.xml new file mode 100644 index 00000000..a2d7c213 --- /dev/null +++ b/TicTacToe Android apk/.idea/gradle.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleMigrationSettings" migrationVersion="1" /> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="testRunner" value="GRADLE" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/TicTacToe Android apk/.idea/misc.xml b/TicTacToe Android apk/.idea/misc.xml new file mode 100644 index 00000000..bdd92780 --- /dev/null +++ b/TicTacToe Android apk/.idea/misc.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ExternalStorageConfigurationManager" enabled="true" /> + <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="Android Studio default JDK" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/TicTacToe Android apk/.project b/TicTacToe Android apk/.project new file mode 100644 index 00000000..38f5d602 --- /dev/null +++ b/TicTacToe Android apk/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>TicTacToe Android apk</name> + <comment>Project TicTacToe Android apk created by Buildship.</comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.buildship.core.gradleprojectbuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.buildship.core.gradleprojectnature</nature> + </natures> +</projectDescription> diff --git a/TicTacToe Android apk/.settings/org.eclipse.buildship.core.prefs b/TicTacToe Android apk/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 00000000..4790d35d --- /dev/null +++ b/TicTacToe Android apk/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home=/nix/store/gpxl5qgg8kicmcvivwmybwjlpf7wh20l-graalvm17-ce-22.3.0 +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/TicTacToe Android apk/app/.gitignore b/TicTacToe Android apk/app/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/TicTacToe Android apk/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/TicTacToe Android apk/app/build.gradle b/TicTacToe Android apk/app/build.gradle new file mode 100644 index 00000000..ce709986 --- /dev/null +++ b/TicTacToe Android apk/app/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'com.android.application' +} + +android { + namespace 'com.example.tic_tac_toe' + compileSdk 33 + + defaultConfig { + applicationId "com.example.tic_tac_toe" + minSdk 21 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.8.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' +} \ No newline at end of file diff --git a/TicTacToe Android apk/app/proguard-rules.pro b/TicTacToe Android apk/app/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/TicTacToe Android apk/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/androidTest/java/com/example/tic_tac_toe/ExampleInstrumentedTest.java b/TicTacToe Android apk/app/src/androidTest/java/com/example/tic_tac_toe/ExampleInstrumentedTest.java new file mode 100644 index 00000000..f81fdefa --- /dev/null +++ b/TicTacToe Android apk/app/src/androidTest/java/com/example/tic_tac_toe/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.example.tic_tac_toe; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.example.tic_tac_toe", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/AndroidManifest.xml b/TicTacToe Android apk/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..972dbe58 --- /dev/null +++ b/TicTacToe Android apk/app/src/main/AndroidManifest.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools"> + + <application + android:allowBackup="true" + android:dataExtractionRules="@xml/data_extraction_rules" + android:fullBackupContent="@xml/backup_rules" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.TicTacToe" + tools:targetApi="31"> + <activity + android:name=".MainActivity" + android:exported="true"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + + <meta-data + android:name="android.app.lib_name" + android:value="" /> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/java/com/example/tic_tac_toe/MainActivity.java b/TicTacToe Android apk/app/src/main/java/com/example/tic_tac_toe/MainActivity.java new file mode 100644 index 00000000..f6792920 --- /dev/null +++ b/TicTacToe Android apk/app/src/main/java/com/example/tic_tac_toe/MainActivity.java @@ -0,0 +1,480 @@ +package com.example.tic_tac_toe; + +import androidx.appcompat.app.AppCompatActivity; + +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.TextView; + +import java.util.Locale; + +public class MainActivity extends AppCompatActivity { + + private Button bttn1, bttn2, bttn3, bttn4, bttn5, bttn6, bttn7, bttn8, bttn9, toggle_mode, play_again; + private TextView player1_score, player2_score, tie_score, p1_text, p2_text, turn; + + private char current_val = 'x', curr_play = '1'; + private int ply1 = 0, ply2 = 0, tie = 0, allfill = 0; + + private char mode = 'c'; + private boolean win = false; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + setUi(); + + bttn1.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(bttn1.getText().equals("") && !win) { + bttn1.setText(currentValue()); + checkWin(bttn1.getText().toString()); + if(!win) + changePlayer(); + if(mode == 'c' && !win){ + decideMove(); + } + } + } + }); + + bttn2.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(bttn2.getText().equals("") && !win) { + bttn2.setText(currentValue()); + checkWin(bttn2.getText().toString()); + if(!win) + changePlayer(); + if(mode == 'c' && !win){ + decideMove(); + } + } + + } + }); + + bttn3.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(bttn3.getText().equals("") && !win) { + bttn3.setText(currentValue()); + checkWin(bttn3.getText().toString()); + if(!win) + changePlayer(); + if(mode == 'c' && !win){ + decideMove(); + } + } + } + }); + + bttn4.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(bttn4.getText().equals("") && !win) { + bttn4.setText(currentValue()); + checkWin(bttn4.getText().toString()); + if(!win) + changePlayer(); + if(mode == 'c' && !win){ + decideMove(); + } + } + } + }); + + bttn5.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(bttn5.getText().equals("") && !win) { + bttn5.setText(currentValue()); + checkWin(bttn5.getText().toString()); + if(!win) + changePlayer(); + if(mode == 'c' && !win){ + decideMove(); + } + } + + } + }); + + bttn6.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(bttn6.getText().equals("") && !win) { + bttn6.setText(currentValue()); + checkWin(bttn6.getText().toString()); + if(!win) + changePlayer(); + if(mode == 'c' && !win){ + decideMove(); + } + } + + } + }); + + bttn7.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(bttn7.getText().equals("") && !win) { + bttn7.setText(currentValue()); + checkWin(bttn7.getText().toString()); + if(!win) + changePlayer(); + if(mode == 'c' && !win){ + decideMove(); + } + } + + } + }); + + bttn8.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(bttn8.getText().equals("") && !win) { + bttn8.setText(currentValue()); + checkWin(bttn8.getText().toString()); + if(!win) + changePlayer(); + if(mode == 'c' && !win){ + decideMove(); + } + } + + } + }); + + bttn9.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(bttn9.getText().equals("") && !win) { + bttn9.setText(currentValue()); + checkWin(bttn9.getText().toString()); + if(!win) + changePlayer(); + if(mode == 'c' && !win){ + decideMove(); + } + } + + } + }); + + play_again.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + playAgain(); + } + }); + + toggle_mode.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if(mode == 'c') { + playAgain(); + toggle_mode.setText("Play with Computer"); + mode = 'm'; + if(current_val == 'x') { + p1_text.setText("Player1 (X)"); + p2_text.setText("Player2 (O)"); + } + else { + p1_text.setText("Player1 (O)"); + p2_text.setText("Player2 (X)"); + } + } + else{ + playAgain(); + toggle_mode.setText("Two Player"); + mode = 'c'; + } + } + }); + + } + + public void setUi(){ + bttn1 = (Button)findViewById(R.id.bttn_1); + bttn2 = (Button)findViewById(R.id.bttn_2); + bttn3 = (Button)findViewById(R.id.bttn_3); + bttn4 = (Button)findViewById(R.id.bttn_4); + bttn5 = (Button)findViewById(R.id.bttn_5); + bttn6 = (Button)findViewById(R.id.bttn_6); + bttn7 = (Button)findViewById(R.id.bttn_7); + bttn8 = (Button)findViewById(R.id.bttn_8); + bttn9 = (Button)findViewById(R.id.bttn_9); + play_again = (Button)findViewById(R.id.play_again); + toggle_mode = (Button)findViewById(R.id.toggle_mode); + player1_score = (TextView)findViewById(R.id.player1_score); + player2_score = (TextView)findViewById(R.id.player2_score); + tie_score = (TextView)findViewById(R.id.tie_score); + p1_text = (TextView) findViewById(R.id.player_1); + p2_text = (TextView) findViewById(R.id.player_2); + turn = (TextView) findViewById(R.id.turn); + + p1_text.setText("Player (X)"); + p2_text.setText("Computer (O)"); + turn.setText("Player Turn"); + } + + public String currentValue(){ + String val = "Na"; + switch(current_val){ + case 'x': + val = "X"; + current_val = 'o'; + break; + case 'o': + val = "O"; + current_val = 'x'; + break; + default: + val = "Na"; + } + allfill ++; + return val; + } + + public void changePlayer(){ + if(curr_play == '1'){ + curr_play = '2'; + if(mode == 'c') + turn.setText("Computer Turn"); + else + turn.setText("Player(2) Turn"); + } + else{ + curr_play = '1'; + if(mode == 'c') + turn.setText("Player Turn"); + else + turn.setText("Player(1) Turn"); + } + } + + public boolean checkWin(String curr){ + // ---------> + if(bttn1.getText().equals(bttn2.getText()) && bttn3.getText().equals(bttn2.getText()) && !bttn1.getText().equals("") && !bttn2.getText().equals("") && !bttn3.getText().equals("")) { + displayScore(); + win = true; + return true; + } + if(bttn4.getText().equals(bttn5.getText()) && bttn6.getText().equals(bttn5.getText()) && !bttn4.getText().equals("") && !bttn5.getText().equals("") && !bttn6.getText().equals("")) { + displayScore(); + win = true; + return true; + } + if(bttn7.getText().equals(bttn8.getText()) && bttn9.getText().equals(bttn8.getText()) && !bttn8.getText().equals("") && !bttn7.getText().equals("") && !bttn9.getText().equals("")) { + displayScore(); + win = true; + return true; + } + + /* + * | + * | + * | + * V + * */ + if(bttn1.getText().equals(bttn4.getText()) && bttn7.getText().equals(bttn4.getText()) && !bttn1.getText().equals("") && !bttn4.getText().equals("") && !bttn7.getText().equals("")) { + displayScore(); + win = true; + return true; + } + if(bttn2.getText().equals(bttn5.getText()) && bttn8.getText().equals(bttn5.getText()) && !bttn2.getText().equals("") && !bttn5.getText().equals("") && !bttn8.getText().equals("")) { + displayScore(); + win = true; + return true; + } + if(bttn3.getText().equals(bttn6.getText()) && bttn9.getText().equals(bttn6.getText()) && !bttn3.getText().equals("") && !bttn6.getText().equals("") && !bttn9.getText().equals("")) { + displayScore(); + win = true; + return true; + } + + //Diagonal + if(bttn1.getText().equals(bttn5.getText()) && bttn9.getText().equals(bttn5.getText()) && !bttn1.getText().equals("") && !bttn5.getText().equals("") && !bttn9.getText().equals("")) { + displayScore(); + win = true; + return true; + } + if(bttn3.getText().equals(bttn5.getText()) && bttn7.getText().equals(bttn5.getText()) && !bttn3.getText().equals("") && !bttn5.getText().equals("") && !bttn7.getText().equals("")) { + displayScore(); + win = true; + return true; + } + + else if(allfill == 9){ + tie += 1; + win = true; + tie_score.setText(String.valueOf(tie)); + turn.setText("Draw"); + return false; + } + return false; + } + + public void displayScore(){ + if(curr_play == '1'){ + ply1 += 1; + player1_score.setText(String.valueOf(ply1)); + if(mode == 'c') + turn.setText("Player Wins"); + else + turn.setText("Palyer1 wins"); + } + else{ + ply2 += 1; + player2_score.setText(String.valueOf(ply2)); + if(mode == 'c') + turn.setText("Computer Wins"); + else + turn.setText("Player 2 wins"); + } + } + + public void playAgain(){ + bttn1.setText(""); + bttn2.setText(""); + bttn3.setText(""); + bttn4.setText(""); + bttn5.setText(""); + bttn6.setText(""); + bttn7.setText(""); + bttn8.setText(""); + bttn9.setText(""); + allfill = 0; + curr_play = '1'; + + if(current_val == 'x'){ + current_val = 'o'; + if(mode == 'c'){ + p1_text.setText("Player (O)"); + p2_text.setText("Computer (X)"); + } + else{ + p1_text.setText("Player1 (O)"); + p2_text.setText("Player2 (X)"); + } + + } + else{ + current_val = 'x'; + if(mode == 'c'){ + p1_text.setText("Player (X)"); + p2_text.setText("Computer (O)"); + } + else{ + p1_text.setText("Player1 (X)"); + p2_text.setText("Player2 (O)"); + } + } + if(mode == 'c') + turn.setText("Player Turn"); + else + turn.setText("Player(1)"); + win = false; + } + + + public void decideMove(){ + + int num = (int) (Math.random()*(9-1+1)+1); + + if(allfill == 9){ + checkWin(String.valueOf(curr_play)); + turn.setText("Player Turn"); + if(!win) + changePlayer(); + return; + } + if(num == 1 && bttn1.getText().equals("")){ + String val = currentValue(); + bttn1.setText(val); + turn.setText("Player Turn"); + checkWin(String.valueOf(curr_play)); + if(!win) + changePlayer(); + return; + } + if(num == 2 && bttn2.getText().equals("")){ + String val = currentValue(); + bttn2.setText(val); + turn.setText("Player Turn"); + checkWin(String.valueOf(curr_play)); + if(!win) + changePlayer(); + return; + } + if(num == 3 && bttn3.getText().equals("")){ + String val = currentValue(); + bttn3.setText(val); + turn.setText("Player Turn"); + if(!win) + changePlayer(); + return; + } + if(num == 4 && bttn4.getText().equals("")){ + String val = currentValue(); + bttn4.setText(val); + turn.setText("Player Turn"); + checkWin(String.valueOf(curr_play)); + if(!win) + changePlayer(); + return; + } + if(num == 5 && bttn5.getText().equals("")){ + String val = currentValue(); + bttn5.setText(val); + turn.setText("Player Turn"); + checkWin(String.valueOf(curr_play)); + if(!win) + changePlayer(); + return; + } + if(num == 6 && bttn6.getText().equals("")){ + String val = currentValue(); + bttn6.setText(val); + turn.setText("Player Turn"); + checkWin(String.valueOf(curr_play)); + if(!win) + changePlayer(); + return; + } + if(num == 7 && bttn7.getText().equals("")){ + String val = currentValue(); + bttn7.setText(val); + turn.setText("Player Turn"); + checkWin(String.valueOf(curr_play)); + if(!win) + changePlayer(); + return; + } + if(num == 8 && bttn8.getText().equals("")){ + String val = currentValue(); + bttn8.setText(val); + turn.setText("Player Turn"); + checkWin(String.valueOf(curr_play)); + if(!win) + changePlayer(); + return; + } + if(num == 9 && bttn9.getText().equals("")) { + String val = currentValue(); + bttn9.setText(val); + turn.setText("Player Turn"); + checkWin(String.valueOf(curr_play)); + if(!win) + changePlayer(); + return; + } + decideMove(); + } +} \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/TicTacToe Android apk/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 00000000..2b068d11 --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/res/drawable/ic_launcher_background.xml b/TicTacToe Android apk/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000..07d5da9c --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/TicTacToe Android apk/app/src/main/res/layout/activity_main.xml b/TicTacToe Android apk/app/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000..1d78fc31 --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,238 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + tools:context=".MainActivity"> + + <TextView + android:id="@+id/player1_score" + android:layout_width="35dp" + android:layout_height="29dp" + android:text="0" + android:textAlignment="center" + android:textSize="20dp" + app:layout_constraintBottom_toTopOf="@+id/play_again" + app:layout_constraintEnd_toStartOf="@+id/tie_score" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textView" + app:layout_constraintVertical_bias="0.145" /> + + <Button + android:id="@+id/bttn_6" + android:layout_width="114dp" + android:layout_height="110dp" + android:text="" + android:textSize="40dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/bttn_5" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.39" /> + + <Button + android:id="@+id/bttn_9" + android:layout_width="114dp" + android:layout_height="110dp" + android:text="" + android:textSize="40dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/bttn_8" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.566" /> + + <Button + android:id="@+id/bttn_3" + android:layout_width="114dp" + android:layout_height="110dp" + android:text="" + android:textSize="40dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.514" + app:layout_constraintStart_toEndOf="@+id/bttn_2" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.212" /> + + <Button + android:id="@+id/bttn_4" + android:layout_width="114dp" + android:layout_height="110dp" + android:text="" + android:textSize="40dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/bttn_5" + app:layout_constraintHorizontal_bias="0.514" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.389" /> + + <Button + android:id="@+id/bttn_7" + android:layout_width="114dp" + android:layout_height="110dp" + android:text="" + android:textSize="40dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/bttn_8" + app:layout_constraintHorizontal_bias="0.514" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.566" /> + + <Button + android:id="@+id/bttn_1" + android:layout_width="114dp" + android:layout_height="110dp" + android:text="" + android:textSize="40dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/bttn_2" + app:layout_constraintHorizontal_bias="0.529" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.212" /> + + <Button + android:id="@+id/bttn_5" + android:layout_width="114dp" + android:layout_height="110dp" + android:text="" + android:textSize="40dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.39" /> + + <Button + android:id="@+id/bttn_8" + android:layout_width="114dp" + android:layout_height="110dp" + android:text="" + android:textSize="40dp" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.501" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/bttn_5" + app:layout_constraintVertical_bias="0.0" /> + + <Button + android:id="@+id/bttn_2" + android:layout_width="114dp" + android:layout_height="110dp" + android:text="" + android:textSize="40dp" + app:layout_constraintBottom_toTopOf="@+id/bttn_5" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.498" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="1.0" /> + + <Button + android:id="@+id/play_again" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="50dp" + android:layout_marginBottom="30dp" + android:text="PlayAgain" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="1.0" /> + + <Button + android:id="@+id/toggle_mode" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginEnd="50dp" + android:layout_marginBottom="30dp" + android:text="Two Player" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="1.0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="1.0" /> + + <TextView + android:id="@+id/textView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Tie" + android:textSize="20dp" + app:layout_constraintBottom_toTopOf="@+id/play_again" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0.498" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/bttn_8" + app:layout_constraintVertical_bias="0.237" /> + + <TextView + android:id="@+id/player_1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Player" + android:textSize="20dp" + app:layout_constraintBottom_toTopOf="@+id/play_again" + app:layout_constraintEnd_toStartOf="@+id/textView" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/bttn_8" + app:layout_constraintVertical_bias="0.237" /> + + <TextView + android:id="@+id/player_2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Computer" + android:textSize="20dp" + app:layout_constraintBottom_toTopOf="@+id/play_again" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/textView" + app:layout_constraintTop_toBottomOf="@+id/bttn_8" + app:layout_constraintVertical_bias="0.237" /> + + <TextView + android:id="@+id/tie_score" + android:layout_width="35dp" + android:layout_height="29dp" + android:text="0" + android:textSize="20dp" + android:textAlignment="center" + app:layout_constraintBottom_toTopOf="@+id/play_again" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/textView" + app:layout_constraintVertical_bias="0.13999999" /> + + <TextView + android:id="@+id/player2_score" + android:layout_width="35dp" + android:layout_height="29dp" + android:text="0" + android:textAlignment="center" + android:textSize="20dp" + app:layout_constraintBottom_toTopOf="@+id/play_again" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/tie_score" + app:layout_constraintTop_toBottomOf="@+id/textView" + app:layout_constraintVertical_bias="0.145" /> + + <TextView + android:id="@+id/turn" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Player Turn" + android:textSize="30dp" + app:layout_constraintBottom_toTopOf="@+id/bttn_2" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/TicTacToe Android apk/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..eca70cfe --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/TicTacToe Android apk/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..eca70cfe --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@drawable/ic_launcher_background" /> + <foreground android:drawable="@drawable/ic_launcher_foreground" /> +</adaptive-icon> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/TicTacToe Android apk/app/src/main/res/mipmap-hdpi/ic_launcher.webp new file mode 100644 index 00000000..c209e78e Binary files /dev/null and b/TicTacToe Android apk/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/TicTacToe Android apk/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp new file mode 100644 index 00000000..b2dfe3d1 Binary files /dev/null and b/TicTacToe Android apk/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/TicTacToe Android apk/app/src/main/res/mipmap-mdpi/ic_launcher.webp new file mode 100644 index 00000000..4f0f1d64 Binary files /dev/null and b/TicTacToe Android apk/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/TicTacToe Android apk/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp new file mode 100644 index 00000000..62b611da Binary files /dev/null and b/TicTacToe Android apk/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/TicTacToe Android apk/app/src/main/res/mipmap-xhdpi/ic_launcher.webp new file mode 100644 index 00000000..948a3070 Binary files /dev/null and b/TicTacToe Android apk/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/TicTacToe Android apk/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp new file mode 100644 index 00000000..1b9a6956 Binary files /dev/null and b/TicTacToe Android apk/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/TicTacToe Android apk/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp new file mode 100644 index 00000000..28d4b77f Binary files /dev/null and b/TicTacToe Android apk/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/TicTacToe Android apk/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp new file mode 100644 index 00000000..9287f508 Binary files /dev/null and b/TicTacToe Android apk/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/TicTacToe Android apk/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp new file mode 100644 index 00000000..aa7d6427 Binary files /dev/null and b/TicTacToe Android apk/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ diff --git a/TicTacToe Android apk/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/TicTacToe Android apk/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp new file mode 100644 index 00000000..9126ae37 Binary files /dev/null and b/TicTacToe Android apk/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ diff --git a/TicTacToe Android apk/app/src/main/res/values-night/themes.xml b/TicTacToe Android apk/app/src/main/res/values-night/themes.xml new file mode 100644 index 00000000..7d1f364e --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/values-night/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.TicTacToe" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_200</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/black</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_200</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/res/values/colors.xml b/TicTacToe Android apk/app/src/main/res/values/colors.xml new file mode 100644 index 00000000..f8c6127d --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="purple_200">#FFBB86FC</color> + <color name="purple_500">#FF6200EE</color> + <color name="purple_700">#FF3700B3</color> + <color name="teal_200">#FF03DAC5</color> + <color name="teal_700">#FF018786</color> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> +</resources> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/res/values/strings.xml b/TicTacToe Android apk/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..0e0a8639 --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ +<resources> + <string name="app_name">Tic-Tac-Toe</string> +</resources> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/res/values/themes.xml b/TicTacToe Android apk/app/src/main/res/values/themes.xml new file mode 100644 index 00000000..d64d2b0f --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/values/themes.xml @@ -0,0 +1,16 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Theme.TicTacToe" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <!-- Primary brand color. --> + <item name="colorPrimary">@color/purple_500</item> + <item name="colorPrimaryVariant">@color/purple_700</item> + <item name="colorOnPrimary">@color/white</item> + <!-- Secondary brand color. --> + <item name="colorSecondary">@color/teal_200</item> + <item name="colorSecondaryVariant">@color/teal_700</item> + <item name="colorOnSecondary">@color/black</item> + <!-- Status bar color. --> + <item name="android:statusBarColor">?attr/colorPrimaryVariant</item> + <!-- Customize your theme here. --> + </style> +</resources> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/res/xml/backup_rules.xml b/TicTacToe Android apk/app/src/main/res/xml/backup_rules.xml new file mode 100644 index 00000000..fa0f996d --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/xml/backup_rules.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Sample backup rules file; uncomment and customize as necessary. + See https://developer.android.com/guide/topics/data/autobackup + for details. + Note: This file is ignored for devices older that API 31 + See https://developer.android.com/about/versions/12/backup-restore +--> +<full-backup-content> + <!-- + <include domain="sharedpref" path="."/> + <exclude domain="sharedpref" path="device.xml"/> +--> +</full-backup-content> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/main/res/xml/data_extraction_rules.xml b/TicTacToe Android apk/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 00000000..9ee9997b --- /dev/null +++ b/TicTacToe Android apk/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Sample data extraction rules file; uncomment and customize as necessary. + See https://developer.android.com/about/versions/12/backup-restore#xml-changes + for details. +--> +<data-extraction-rules> + <cloud-backup> + <!-- TODO: Use <include> and <exclude> to control what is backed up. + <include .../> + <exclude .../> + --> + </cloud-backup> + <!-- + <device-transfer> + <include .../> + <exclude .../> + </device-transfer> + --> +</data-extraction-rules> \ No newline at end of file diff --git a/TicTacToe Android apk/app/src/test/java/com/example/tic_tac_toe/ExampleUnitTest.java b/TicTacToe Android apk/app/src/test/java/com/example/tic_tac_toe/ExampleUnitTest.java new file mode 100644 index 00000000..63fdd5f1 --- /dev/null +++ b/TicTacToe Android apk/app/src/test/java/com/example/tic_tac_toe/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.example.tic_tac_toe; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/TicTacToe Android apk/build.gradle b/TicTacToe Android apk/build.gradle new file mode 100644 index 00000000..71b99f4c --- /dev/null +++ b/TicTacToe Android apk/build.gradle @@ -0,0 +1,5 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + id 'com.android.application' version '7.3.1' apply false + id 'com.android.library' version '7.3.1' apply false +} \ No newline at end of file diff --git a/TicTacToe Android apk/gradle.properties b/TicTacToe Android apk/gradle.properties new file mode 100644 index 00000000..3e927b11 --- /dev/null +++ b/TicTacToe Android apk/gradle.properties @@ -0,0 +1,21 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/TicTacToe Android apk/gradle/wrapper/gradle-wrapper.jar b/TicTacToe Android apk/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..e708b1c0 Binary files /dev/null and b/TicTacToe Android apk/gradle/wrapper/gradle-wrapper.jar differ diff --git a/TicTacToe Android apk/gradle/wrapper/gradle-wrapper.properties b/TicTacToe Android apk/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..966c3745 --- /dev/null +++ b/TicTacToe Android apk/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Mon Mar 27 19:44:11 IST 2023 +distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionPath=wrapper/dists +zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/TicTacToe Android apk/gradlew b/TicTacToe Android apk/gradlew new file mode 100644 index 00000000..4f906e0c --- /dev/null +++ b/TicTacToe Android apk/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/TicTacToe Android apk/gradlew.bat b/TicTacToe Android apk/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/TicTacToe Android apk/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/TicTacToe Android apk/settings.gradle b/TicTacToe Android apk/settings.gradle new file mode 100644 index 00000000..e23cef7f --- /dev/null +++ b/TicTacToe Android apk/settings.gradle @@ -0,0 +1,16 @@ +pluginManagement { + repositories { + gradlePluginPortal() + google() + mavenCentral() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +rootProject.name = "Tic-Tac-Toe" +include ':app' diff --git a/TicTacToe/TicTacToe.java b/TicTacToe/TicTacToe.java new file mode 100644 index 00000000..ddbf6da1 --- /dev/null +++ b/TicTacToe/TicTacToe.java @@ -0,0 +1,94 @@ +import java.util.Scanner; + +public class TicTacToe{ + public static void main(String[] args){ + char[][] board = new char[3][3]; + initialize(board); + startGame(board, 'X'); + } + + public static void initialize(char[][] board){ + for(int row=0;row<board.length;row++){ + for(int col=0;col<board[0].length;col++){ + board[row][col] = ' '; + } + } + } + + public static void printBoard(char[][] board){ + for(int row=0;row<board.length;row++){ + System.out.println("-----------"); + for(int col=0;col<board[0].length;col++){ + System.out.print(board[row][col] + " | "); + } + System.out.println(); + } + System.out.println("-----------"); + } + + public static void startGame(char[][] board, char player){ + int c = 0; + boolean gameOver = false; + Scanner input = new Scanner(System.in); + + while(!gameOver){ + + if(c == board.length * board.length){ + System.err.println("Match Draw"); + break; + } + printBoard(board); + + System.out.print("Player " + player + " Enter position: "); + int row = input.nextInt(); + int col = input.nextInt(); + System.out.println(); + + if(board[row][col] == ' '){ + board[row][col] = player; + c++; + gameOver = haveWon(board, player); + + if(gameOver){ + System.out.println("Player " + player + " has won!"); + } + else{ + player = (player == 'X') ? 'O' : 'X'; + } + } + else{ + System.err.println("Invalid Position. Try Again!"); + } + } + printBoard(board); + + } + + public static boolean haveWon(char[][] board, char player){ + // row + for(int row=0;row<board.length;row++){ + if(board[row][0] == player && board[row][1] == player && board[row][2] == player){ + return true; + } + } + + // column + for(int col=0;col<board[0].length;col++){ + if(board[0][col] == player && board[1][col] == player && board[2][col] == player){ + return true; + } + } + + // diagonal + if (board[0][0] == player && board[1][1] == player && board[2][2] == player) { + return true; + } + + if (board[0][2] == player && board[1][1] == player && board[2][0] == player) { + return true; + } + + return false; + } + +} \ No newline at end of file diff --git a/ToDoApp_JS/app.js b/ToDoApp_JS/app.js new file mode 100644 index 00000000..2afd115f --- /dev/null +++ b/ToDoApp_JS/app.js @@ -0,0 +1,108 @@ +function add() { + var data = document.getElementById('text').value; + + if (data === "") { + alert("Nothing To Add!", "", "warning"); + + } + else { + + var div = document.createElement("div") + div.setAttribute('class', 'input-group p-3') + + var inp = document.createElement("input"); + inp.value = data + inp.setAttribute('class', 'form-control bg-darl') + inp.setAttribute('disabled', 'disabled') + // inp.setAttribute('autofocus', 'autofocus') + + + var editBtn = document.createElement('button') + var edittext = document.createTextNode('Edit') + editBtn.appendChild(edittext) + editBtn.setAttribute('class', 'btn btn-success') + editBtn.setAttribute('onclick', 'edit(this.previousSibling)') + + + var delBtn = document.createElement('button') + var deltext = document.createTextNode('Delete') + delBtn.appendChild(deltext) + delBtn.setAttribute('class', 'btn btn-outline-dark') + delBtn.setAttribute('onclick', 'del(this)') + + + div.appendChild(inp) + div.appendChild(editBtn) + div.appendChild(delBtn) + main.appendChild(div) + + document.getElementById('text').value = ""; + alert("Successfully Added!", "", "success"); + + } +} + +function del(a) { + +swal({ + title: "Are you sure?", + text: "", + icon: "warning", + buttons: true, + buttons: ["No", "Yes"], + dangerMode: true, +}) +.then((willDelete) => { + if (willDelete) { + a.parentNode.remove(); + } +}); + +} + + +function edit(inputdata) { + var check = inputdata.nextSibling.innerText + if (check === "Edit") { + console.log(inputdata) + + inputdata.disabled = false; + inputdata.focus(); + + inputdata.nextSibling.innerText = "Update" + console.log(inputdata.nextSibling.innerText = "Update") + } + else if (check === "Update") { + inputdata.disabled = true; + inputdata.nextSibling.innerText = "Edit" + swal("Successfully Updated!", "", "success"); + + } + else { + alert("Some Error Occur") + } + +} + +// alertify.confirm("This is a confirm dialog.", +// function () { +// alertify.success('Ok'); +// }, +// function () { +// alertify.error('Cancel'); +// }); + +function enter(code) { + if (code.keyCode === 13) { + add() + } +} + + + + + + + + + diff --git a/ToDoApp_JS/bg.jpg b/ToDoApp_JS/bg.jpg new file mode 100644 index 00000000..c1042c3b Binary files /dev/null and b/ToDoApp_JS/bg.jpg differ diff --git a/ToDoApp_JS/index.html b/ToDoApp_JS/index.html new file mode 100644 index 00000000..2706615f --- /dev/null +++ b/ToDoApp_JS/index.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Web To do things</title> + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" + integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> + +<link rel="preconnect" href="https://fonts.googleapis.com"> +<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> +<link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap" rel="stylesheet"> + <link rel="stylesheet" href="style.css"> + +</head> +<body> + <h1>TO DO WEB </h1> + <div class="main"> + <div class="box"> + <div class="input"> + <input type="text" id="text" onkeydown="enter(event)" class="form-control " placeholder="What You To Do ?"> + <button class="btn btn-success " onclick="add()" id="button-addon2">Add</button> + </div> + <div id='main'> + </div> + </div> + </div> + + + <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script> + <script src="app.js"></script> +</body> +</html> + + diff --git a/ToDoApp_JS/style.css b/ToDoApp_JS/style.css new file mode 100644 index 00000000..50959144 --- /dev/null +++ b/ToDoApp_JS/style.css @@ -0,0 +1,41 @@ +body { + background-image: url(bg.jpg); + background-attachment: fixed; + background-size: cover; + background-repeat: no-repeat; +} + +.main { + display: flex; + justify-content: center; + z-index: 1; +} + +h1 { + text-align: center; + font-size: 50px; + margin-top: 1%; + font-family: 'Lucida Grande', 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Sans', Arial, sans-serif; + letter-spacing: 3px; +} + +.box { + border: 1px solid rgb(95, 91, 91); + box-shadow: 2px 2px 2px rgb(105, 104, 104); + width: 450px; + padding: 2%; + height: 550px; + margin-top: 1%; + background-color: rgba(255, 248, 220, 0.376); +} + +.input { + display: flex; + margin-right: 5px; +} + +button { + margin-left: 10px; + width: 100px; +} + diff --git a/TopologicalSortGraph.java b/TopologicalSortGraph.java new file mode 100644 index 00000000..de4e0a57 --- /dev/null +++ b/TopologicalSortGraph.java @@ -0,0 +1,60 @@ +import java.util.*; + +class DirectedGraph { + private int numberOfVertices; + private List<List<Integer>> adjacencyList; + + public DirectedGraph(int vertices) { + numberOfVertices = vertices; + adjacencyList = new ArrayList<>(numberOfVertices); + for (int i = 0; i < numberOfVertices; i++) { + adjacencyList.add(new ArrayList<>()); + } + } + + public void addEdge(int source, int destination) { + adjacencyList.get(source).add(destination); + } + + private void performTopologicalSortUtil(int vertex, boolean[] visited, Stack<Integer> stack) { + visited[vertex] = true; + for (Integer neighbor : adjacencyList.get(vertex)) { + if (!visited[neighbor]) { + performTopologicalSortUtil(neighbor, visited, stack); + } + } + stack.push(vertex); + } + + public void performTopologicalSort() { + Stack<Integer> topologicalOrderStack = new Stack<>(); + boolean[] visited = new boolean[numberOfVertices]; + + Arrays.fill(visited, false); + + for (int vertex = 0; vertex < numberOfVertices; vertex++) { + if (!visited[vertex]) { + performTopologicalSortUtil(vertex, visited, topologicalOrderStack); + } + } + + // Print the topological order + System.out.println("Topological Sort Order:"); + while (!topologicalOrderStack.isEmpty()) { + System.out.print(topologicalOrderStack.pop() + " "); + } + } + + public static void main(String[] args) { + DirectedGraph graph = new DirectedGraph(6); + graph.addEdge(5, 2); + graph.addEdge(5, 0); + graph.addEdge(4, 0); + graph.addEdge(4, 1); + graph.addEdge(2, 3); + graph.addEdge(3, 1); + + System.out.println("Performing Topological Sort:"); + graph.performTopologicalSort(); + } +} \ No newline at end of file diff --git a/Train Reservation/reservation.java b/Train Reservation/reservation.java new file mode 100644 index 00000000..ec5eddee --- /dev/null +++ b/Train Reservation/reservation.java @@ -0,0 +1,227 @@ +import java.io.*; +public class reservation +{ +InputStreamReader isr=new InputStreamReader (System.in); +BufferedReader br=new BufferedReader (isr); +//System.out.print("Please enter a word"); +int pno[]=new int[275]; +String name[]=new String[275]; +String phno[]=new String[275]; +int age[]=new int[275]; +int cl[]=new int[275]; +int pcount=0; +int pnum=1; +int max1=75; +int max2=125; +int max3=175; + public void doMenu() throws Exception +{ +int cho=0; +do +{ +System.out.println("\f"); +doHeading(); +System.out.println("1.Book ticket"); +System.out.println("2.Cancel ticket"); +System.out.println("3.Search passenger"); +System.out.println("4.Reservation chart"); +System.out.println("5.Display unbooked tickets"); +System.out.println("6.Exit"); +System.out.println("Please enter your choice"); +cho=Integer.parseInt(br.readLine()); +switch(cho) +{ +case 1:doBook(); +break; +case 2:doCancel(); +break; +case 3:doSearch(); +break; +case 4:doDispList(); +break; +case 5:doDispUnbooked(); +break; +case 6:doExit(); +break; +default :System.out.println("Invalid choice"); +} +char e=(char)br.read(); +}while(cho!=6); +} +private void doHeading()throws Exception +{ +System.out.println("#########################################################"); +System.out.println("*********Railway Reservation For Kabul Express***********"); +System.out.println("#########################################################"); +} +private void doBook()throws Exception +{ +System.out.println("Please enter the class of ticket"); +System.out.println("1. AC\t 2. First\t 3. Sleeper\t"); +int c=Integer.parseInt(br.readLine()); +System.out.println("Please enter no. of tickets"); +int t=Integer.parseInt(br.readLine()); +int ticketAvailable=0; +if(c==1 && max1>=t) +{ +ticketAvailable=1; +} +if(c==2 && max2>=t) +{ +ticketAvailable=1; +} +if(c==3 && max3>=t) +{ +ticketAvailable=1; +} +if(ticketAvailable==1) +{ +for(int i=0;i<t;i++) +{ +pno[pcount]=pnum; +System.out.println("Please enter your name"); +name[pcount]=br.readLine(); +System.out.println("Please enter your age"); +age[pcount]=Integer.parseInt(br.readLine()); +cl[pcount]=c; +System.out.println("Please enter your phno"); +phno[pcount]=br.readLine(); +pcount++; +pnum++; +System.out.println("Ticket successfully booked"); +}//for +if(c==1) +{ +max1-=t; +System.out.println("Please pay Rs."+t*1500); +} +if(c==2) +{ +max2-=t; +System.out.println("Please pay Rs."+t*1200); +} +if(c==3) +{ +max3-=t; +System.out.println("Please pay Rs."+t*1000); +} +} +} +private void doCancel()throws Exception +{ +int t_pno[]=new int[275]; +String t_name[]=new String[275]; +String t_phno[]=new String[275]; +int t_age[]=new int[275]; +int t_cl[]=new int[275]; +int t_pcount=0; +int passengerFound=0; +System.out.println("Please enter your passenger no."); +int p=Integer.parseInt(br.readLine()); +for(int i=0;i<pcount;i++) +{ +if(pno[i]!=p) +{//transfer +t_pno[t_pcount]=pno[i]; +t_name[t_pcount]=name[i]; +t_phno[t_pcount]=phno[i]; +t_age[t_pcount]=age[i]; +t_cl[t_pcount]=cl[i]; +t_pcount++; +} +else +{ +passengerFound=1; +if(cl[i]==1) +{ +max1++; +System.out.println("Please collect refund of Rs."+1800); +} +if(cl[i]==2) +{ + max2++; +System.out.println("Please collect refund of Rs."+1500); +} + if(cl[i]==3) + { + max3++; +System.out.println("Please collect refund of Rs."+1000); +}//else +}//if +} +if(passengerFound==1) +{ +pno=t_pno; +name=t_name; +age=t_age; +cl=t_cl; +phno=t_phno; +pcount=t_pcount; +System.out.println("ticket successfully cancelled"); + } +}//method +private void doDispList()throws Exception +{ +System.out.println("Passenger list in AC class"); +System.out.println("pno \t name \t\t age \t phno"); +for(int i=0;i<pcount;i++) +{ +if(cl[i]==1) +{ +System.out.println(pno[i]+"\t"+name[i]+"\t\t"+age[i]+"\t"+phno[i]); +} +} +System.out.println("Passenger list in First class"); +System.out.println("pno \t name \t\t age \t phno"); + for(int i=0;i<pcount;i++) + { +if(cl[i]==2) +{ +System.out.println(pno[i]+"\t"+name[i]+"\t\t"+age[i]+"\t"+phno[i]); +} +} +System.out.println("Passenger list in Sleeper class"); +System.out.println("pno \t name \t\t age \t phno"); + for(int i=0;i<pcount;i++) + { +if(cl[i]==3) +{ +System.out.println(pno[i]+"\t"+name[i]+"\t\t"+age[i]+"\t"+phno[i]); +} +} +} +private void doSearch()throws Exception +{ +int passengerFound=0; +System.out.println("Please enter passenger no. to search"); +int p=Integer.parseInt(br.readLine()); +for(int i=0;i<pcount;i++) +{ +if(pno[i]==p) +{ +System.out.println("Detail found"); +passengerFound=1; + System.out.println("passenger no.="+pno[i]); + System.out.println("name="+name[i]); + System.out.println("class="+cl[i]); + System.out.println("phno="+phno[i]); +System.out.println("age="+age[i]); +} +}//for +if(passengerFound==0) +System.out.println("No such passenger"); +}//method +private void doDispUnbooked()throws Exception +{ +System.out.println("No. of booked tickets status"); +System.out.println("AC class"+max1); +System.out.println("First class"+max2); +System.out.println("Sleeper class"+max3); +} +private void doExit() +{ +System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"); +System.out.println("Project done by: Nikhil Falke"); +System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"); +} +} \ No newline at end of file diff --git a/Travelling Salesman Problem.java b/Travelling Salesman Problem.java new file mode 100644 index 00000000..c513f8c0 --- /dev/null +++ b/Travelling Salesman Problem.java @@ -0,0 +1,72 @@ +// Java implementation of the approach +class GFG +{ + + // Function to find the minimum weight + // Hamiltonian Cycle + static int tsp(int[][] graph, boolean[] v, + int currPos, int n, + int count, int cost, int ans) + { + + // If last node is reached and it has a link + // to the starting node i.e the source then + // keep the minimum value out of the total cost + // of traversal and "ans" + // Finally return to check for more possible values + if (count == n && graph[currPos][0] > 0) + { + ans = Math.min(ans, cost + graph[currPos][0]); + return ans; + } + + // BACKTRACKING STEP + // Loop to traverse the adjacency list + // of currPos node and increasing the count + // by 1 and cost by graph[currPos,i] value + for (int i = 0; i < n; i++) + { + if (v[i] == false && graph[currPos][i] > 0) + { + + // Mark as visited + v[i] = true; + ans = tsp(graph, v, i, n, count + 1, + cost + graph[currPos][i], ans); + + // Mark ith node as unvisited + v[i] = false; + } + } + return ans; + } + + // Driver code + public static void main(String[] args) + { + + // n is the number of nodes i.e. V + int n = 4; + + int[][] graph = {{0, 10, 15, 20}, + {10, 0, 35, 25}, + {15, 35, 0, 30}, + {20, 25, 30, 0}}; + + // Boolean array to check if a node + // has been visited or not + boolean[] v = new boolean[n]; + + // Mark 0th node as visited + v[0] = true; + int ans = Integer.MAX_VALUE; + + // Find the minimum weight Hamiltonian Cycle + ans = tsp(graph, v, 0, n, 1, 0, ans); + + // ans is the minimum weight Hamiltonian Cycle + System.out.println(ans); + } +} + +// This code is contributed by Raj Chakraborty diff --git a/Tribonacci series/tribonacci.java b/Tribonacci series/tribonacci.java new file mode 100644 index 00000000..6fd8e8f0 --- /dev/null +++ b/Tribonacci series/tribonacci.java @@ -0,0 +1,31 @@ +public class TribonacciSeries { + public static void main(String[] args) { + int n = 10; // Change this value to the number of Tribonacci numbers you want to generate + generateTribonacciSeries(n); + } + + public static void generateTribonacciSeries(int n) { + if (n <= 0) { + System.out.println("Invalid input. Please enter a positive integer."); + return; + } + + long[] tribonacci = new long[n]; + tribonacci[0] = 0; + if (n > 1) { + tribonacci[1] = 1; + } + if (n > 2) { + tribonacci[2] = 1; + } + + for (int i = 3; i < n; i++) { + tribonacci[i] = tribonacci[i - 1] + tribonacci[i - 2] + tribonacci[i - 3]; + } + + System.out.println("Tribonacci Series (First " + n + " numbers):"); + for (int i = 0; i < n; i++) { + System.out.print(tribonacci[i] + " "); + } + } +} diff --git a/TusharHacktoberfest1 b/TusharHacktoberfest1 new file mode 100644 index 00000000..80414856 --- /dev/null +++ b/TusharHacktoberfest1 @@ -0,0 +1,147 @@ +******************************************************* School management Project in java **************************************************************** +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Scanner; + +class Student { + private String studentId; + private String name; + + public Student(String studentId, String name) { + this.studentId = studentId; + this.name = name; + } + + public String getStudentId() { + return studentId; + } + + public String getName() { + return name; + } + + @Override + public String toString() { + return "Student ID: " + studentId + ", Name: " + name; + } +} + +class Course { + private String courseId; + private String courseName; + + public Course(String courseId, String courseName) { + this.courseId = courseId; + this.courseName = courseName; + } + + public String getCourseId() { + return courseId; + } + + public String getCourseName() { + return courseName; + } + + @Override + public String toString() { + return "Course ID: " + courseId + ", Name: " + courseName; + } +} + +public class SchoolManagementSystem { + private static Map<String, Student> students = new HashMap<>(); + private static Map<String, Course> courses = new HashMap<>(); + private static Map<String, List<String>> enrollments = new HashMap<>(); + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + while (true) { + System.out.println("School Management System"); + System.out.println("1. Add Student"); + System.out.println("2. Add Course"); + System.out.println("3. Enroll Student in Course"); + System.out.println("4. List Enrolled Students in Course"); + System.out.println("5. Exit"); + System.out.print("Enter your choice: "); + + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume the newline + + switch (choice) { + case 1: + addStudent(scanner); + break; + case 2: + addCourse(scanner); + break; + case 3: + enrollStudentInCourse(scanner); + break; + case 4: + listEnrolledStudentsInCourse(scanner); + break; + case 5: + System.out.println("Exiting the program."); + System.exit(0); + default: + System.out.println("Invalid choice. Please try again."); + break; + } + } + } + + private static void addStudent(Scanner scanner) { + System.out.print("Enter student ID: "); + String studentId = scanner.nextLine(); + System.out.print("Enter student name: "); + String name = scanner.nextLine(); + + Student student = new Student(studentId, name); + students.put(studentId, student); + System.out.println("Student added successfully."); + } + + private static void addCourse(Scanner scanner) { + System.out.print("Enter course ID: "); + String courseId = scanner.nextLine(); + System.out.print("Enter course name: "); + String courseName = scanner.nextLine(); + + Course course = new Course(courseId, courseName); + courses.put(courseId, course); + System.out.println("Course added successfully."); + } + + private static void enrollStudentInCourse(Scanner scanner) { + System.out.print("Enter student ID: "); + String studentId = scanner.nextLine(); + System.out.print("Enter course ID: "); + String courseId = scanner.nextLine(); + + if (students.containsKey(studentId) && courses.containsKey(courseId)) { + enrollments.computeIfAbsent(courseId, k -> new ArrayList<>()).add(studentId); + System.out.println("Student enrolled in the course."); + } else { + System.out.println("Student or course not found. Please check the IDs."); + } + } + + private static void listEnrolledStudentsInCourse(Scanner scanner) { + System.out.print("Enter course ID: "); + String courseId = scanner.nextLine(); + + if (courses.containsKey(courseId)) { + List<String> enrolledStudents = enrollments.getOrDefault(courseId, new ArrayList<>()); + System.out.println("Enrolled students in the course:"); + for (String studentId : enrolledStudents) { + System.out.println(students.get(studentId)); + } + } else { + System.out.println("Course not found. Please check the course ID."); + } + } +} diff --git a/TwoChessBoard.py b/TwoChessBoard.py new file mode 100644 index 00000000..fb9fdef2 --- /dev/null +++ b/TwoChessBoard.py @@ -0,0 +1,45 @@ +import turtle + +def main(): + drawChessboard(-260, -20, -120, 120) # Draw first chess board + drawChessboard(20, 260, -120, 120) # Draw second chess board + + turtle.hideturtle() + turtle.done() + +# Draw one chess board +def drawChessboard(startx, endx, starty, endy): + # Draw chess board borders + turtle.pensize(3) # Set pen thickness to 3 pixels + turtle.penup() # Pull the pen up + turtle.goto(startx, starty) + turtle.pendown() # Pull the pen down + turtle.color("red") + + for i in range(4): + turtle.forward(240) # Draw a line + turtle.left(90) # Turn left 90 degrees + + # Draw chess board inside + drawMultipleRectangle(startx, endx, starty, endy) + drawMultipleRectangle(startx + 30, endx, starty + 30, endy) + +# Draw multiple rectangles +def drawMultipleRectangle(startx, endx, starty, endy): + turtle.color("black") + for j in range(starty, endy, 60): + for i in range(startx, endx, 60): + fillRectangle(i, j) + +# Draw a small rectangle +def fillRectangle(i, j): + turtle.penup() + turtle.goto(i, j) + turtle.pendown() + turtle.begin_fill() + for k in range(4): + turtle.forward(30) # Draw a line + turtle.left(90) # Turn left 90 degrees + turtle.end_fill() + +main() diff --git a/TwoGameFinal b/TwoGameFinal new file mode 160000 index 00000000..b28616a9 --- /dev/null +++ b/TwoGameFinal @@ -0,0 +1 @@ +Subproject commit b28616a92f51ea06befaf180d86e2a9e740f8495 diff --git a/UDP_VIDEO_CALLER b/UDP_VIDEO_CALLER new file mode 160000 index 00000000..3a15ea09 --- /dev/null +++ b/UDP_VIDEO_CALLER @@ -0,0 +1 @@ +Subproject commit 3a15ea09d233c138ffb0cde3a32770dd7a728fe7 diff --git a/UniqueElementsFinder.java b/UniqueElementsFinder.java new file mode 100644 index 00000000..a1f81965 --- /dev/null +++ b/UniqueElementsFinder.java @@ -0,0 +1,32 @@ +import java.util.HashSet; +import java.util.Arrays; + +public class UniqueElementsFinder { + + public static int[] findUniqueElements(int[] arr) { + HashSet<Integer> uniqueElements = new HashSet<>(); + + for (int element : arr) { + uniqueElements.add(element); + } + + int[] uniqueArray = new int[uniqueElements.size()]; + int index = 0; + + for (int element : uniqueElements) { + uniqueArray[index] = element; + index++; + } + + return uniqueArray; + } + + public static void main(String[] args) { + int[] arr = {1, 2, 2, 3, 4, 4, 5, 6, 6}; + + int[] uniqueArr = findUniqueElements(arr); + + System.out.println("Original array: " + Arrays.toString(arr)); + System.out.println("Unique elements: " + Arrays.toString(uniqueArr)); + } +} diff --git a/UrlShortener.java b/UrlShortener.java new file mode 100644 index 00000000..aaf52a53 --- /dev/null +++ b/UrlShortener.java @@ -0,0 +1,52 @@ +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.HashMap; +import java.util.Map; +import java.util.Random; + +public class UrlShortener { + private Map<String, String> urlMap = new HashMap<>(); + private static final String BASE_URL = "http://short.url/"; + + public String shortenUrl(String originalUrl) { + String shortUrl = generateShortUrl(originalUrl); + urlMap.put(shortUrl, originalUrl); + return BASE_URL + shortUrl; + } + + public String expandUrl(String shortUrl) { + String shortKey = shortUrl.substring(BASE_URL.length()); + return urlMap.get(shortKey); + } + + private String generateShortUrl(String originalUrl) { + try { + MessageDigest md = MessageDigest.getInstance("MD5"); + byte[] digest = md.digest(originalUrl.getBytes()); + + StringBuilder shortUrl = new StringBuilder(); + Random random = new Random(); + + for (int i = 0; i < 6; i++) { + int index = random.nextInt(digest.length); + shortUrl.append(String.format("%02x", digest[index])); + } + + return shortUrl.toString(); + } catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + return null; + } + } + + public static void main(String[] args) { + UrlShortener urlShortener = new UrlShortener(); + + String longUrl = "https://www.example.com/some/long/url"; + String shortUrl = urlShortener.shortenUrl(longUrl); + System.out.println("Short URL: " + shortUrl); + + String expandedUrl = urlShortener.expandUrl(shortUrl); + System.out.println("Expanded URL: " + expandedUrl); + } +} diff --git a/UseCustomTurtleFunctions.py b/UseCustomTurtleFunctions.py new file mode 100644 index 00000000..1b5a9462 --- /dev/null +++ b/UseCustomTurtleFunctions.py @@ -0,0 +1,20 @@ +import turtle +from UsefulTurtleFunctions import * + +# Draw a line from (-50, -50) to (50, 50) +drawLine(-50, -50, 50, 50) + +# Write a text at (-50, -60) +writeText("Testing useful Turtle functions", -50, -60) + +# Draw a point at (0, 0) +drawPoint(0, 0) + +# Draw a circle at (0, 0) with radius 80 +drawCircle(0, 0, 80) + +# Draw a rectangle at (0, 0) with width 60 and height 40 +drawRectangle(0, 0, 60, 40) + +turtle.hideturtle() +turtle.done() \ No newline at end of file diff --git a/Vehicle Management System/Main.java b/Vehicle Management System/Main.java new file mode 100644 index 00000000..b92ab7c3 --- /dev/null +++ b/Vehicle Management System/Main.java @@ -0,0 +1,46 @@ +import java.util.Scanner; + +public class Main { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + VehicleManager vehicleManager = new VehicleManager(); + + while (true) { + System.out.println("Vehicle Management System"); + System.out.println("1. Add Vehicle"); + System.out.println("2. View Vehicles"); + System.out.println("3. Exit"); + System.out.print("Enter your choice: "); + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume newline + + switch (choice) { + case 1: + System.out.print("Enter make: "); + String make = scanner.nextLine(); + System.out.print("Enter model: "); + String model = scanner.nextLine(); + System.out.print("Enter year: "); + int year = scanner.nextInt(); + System.out.print("Enter price: "); + double price = scanner.nextDouble(); + + Vehicle newVehicle = new Vehicle(make, model, year, price); + vehicleManager.addVehicle(newVehicle); + System.out.println("Vehicle added successfully!"); + break; + case 2: + System.out.println("All Vehicles:"); + for (Vehicle vehicle : vehicleManager.getAllVehicles()) { + System.out.println(vehicle); + } + break; + case 3: + System.out.println("Exiting..."); + System.exit(0); + default: + System.out.println("Invalid choice. Please try again."); + } + } + } +} diff --git a/Vehicle Management System/Vehicle.java b/Vehicle Management System/Vehicle.java new file mode 100644 index 00000000..17120f04 --- /dev/null +++ b/Vehicle Management System/Vehicle.java @@ -0,0 +1,34 @@ +public class Vehicle { + private String make; + private String model; + private int year; + private double price; + + public Vehicle(String make, String model, int year, double price) { + this.make = make; + this.model = model; + this.year = year; + this.price = price; + } + + public String getMake() { + return make; + } + + public String getModel() { + return model; + } + + public int getYear() { + return year; + } + + public double getPrice() { + return price; + } + + @Override + public String toString() { + return "Make: " + make + ", Model: " + model + ", Year: " + year + ", Price: $" + price; + } +} diff --git a/Vehicle Management System/VehicleManager.java b/Vehicle Management System/VehicleManager.java new file mode 100644 index 00000000..be45a40f --- /dev/null +++ b/Vehicle Management System/VehicleManager.java @@ -0,0 +1,22 @@ +import java.util.ArrayList; +import java.util.List; + +public class VehicleManager { + private List<Vehicle> vehicles; + + public VehicleManager() { + vehicles = new ArrayList<>(); + } + + public void addVehicle(Vehicle vehicle) { + vehicles.add(vehicle); + } + + public List<Vehicle> getAllVehicles() { + return vehicles; + } + + public void removeVehicle(Vehicle vehicle) { + vehicles.remove(vehicle); + } +} diff --git a/Verbalize3524.java b/Verbalize3524.java new file mode 100644 index 00000000..4d8353b0 --- /dev/null +++ b/Verbalize3524.java @@ -0,0 +1,40 @@ +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.Scanner; +public class Verbalize3524{ + // Arrays to store the verbal representations of units and tens + private static final String[] units = { + "", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", + "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen" + }; + private static final String[] tens = { + "", "", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety" + }; + public static void main(String[] args) { + System.out.println("2021503524 - Mugundh J B"); + System.out.println("Date: " + LocalDate.now() + " Time: " + LocalTime.now()); + Scanner scanner = new Scanner(System.in); + System.out.print("Enter a number between 1 and 9999: "); + int number = scanner.nextInt(); + // Check for invalid input + while (number < 1 || number > 9999) { + System.out.print("Invalid input. Please enter a number between 1 and 9999: "); + number = scanner.nextInt(); + } + // Convert the number to its verbal representation + String verbalized = convertToWords(number); + System.out.printf("Verbalized form:\n" + verbalized); + } + // Convert a number to its verbal representation + public static String convertToWords(int number) { + if (number < 20) { + return units[number]; // Directly use the units array + } else if (number < 100) { + return tens[number / 10] + " " + units[number % 10]; // Combine tens and units + } else if (number < 1000) { + return units[number / 100] + " Hundred and " + convertToWords(number % 100); // Handling hundreds by recursion + } else { + return units[number / 1000] + " Thousand and " + convertToWords(number % 1000); // Handling thousands by recursion + } + } +} diff --git a/Wack-a-mole-game/README.md b/Wack-a-mole-game/README.md new file mode 100644 index 00000000..3f9275a1 --- /dev/null +++ b/Wack-a-mole-game/README.md @@ -0,0 +1,3 @@ +# wack-a-mole by Siya Pandey + +Wack-a-mole is a game where the player has to hit the maximum number of mole appearing from the holes diff --git a/Wack-a-mole-game/dirt.png b/Wack-a-mole-game/dirt.png new file mode 100644 index 00000000..c7251bc4 Binary files /dev/null and b/Wack-a-mole-game/dirt.png differ diff --git a/Wack-a-mole-game/index.html b/Wack-a-mole-game/index.html new file mode 100644 index 00000000..20812640 --- /dev/null +++ b/Wack-a-mole-game/index.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta http-equiv="X-UA-Compatible" content="ie=edge"> + <link rel="stylesheet" href="styles.css"> + <title>Whack a Mole!</title> +</head> + +<body> + <h1>Siya's Whack-a-mole!</h1><span class="score">0</span> + <button onClick="startGame()">Start</button> + + <div class="game"> + <div class="hole hole1"> + <div class="mole"></div> + </div> + + <div class="hole hole2"> + <div class="mole"></div> + </div> + + <div class="hole hole3"> + <div class="mole"></div> + </div> + + <div class="hole hole4"> + <div class="mole"></div> + </div> + + <div class="hole hole5"> + <div class="mole"></div> + </div> + + <div class="hole hole6"> + <div class="mole"></div> + </div> + + </div> + <script src="script.js"></script> +</body> + +</html> \ No newline at end of file diff --git a/Wack-a-mole-game/mole.jpg b/Wack-a-mole-game/mole.jpg new file mode 100644 index 00000000..c662e9cb Binary files /dev/null and b/Wack-a-mole-game/mole.jpg differ diff --git a/Wack-a-mole-game/mole.png b/Wack-a-mole-game/mole.png new file mode 100644 index 00000000..4a21ef37 Binary files /dev/null and b/Wack-a-mole-game/mole.png differ diff --git a/Wack-a-mole-game/script.js b/Wack-a-mole-game/script.js new file mode 100644 index 00000000..2e2391db --- /dev/null +++ b/Wack-a-mole-game/script.js @@ -0,0 +1,53 @@ +const holes = document.querySelectorAll('.hole'); +const scoreBoard = document.querySelector('.score'); +const moles = document.querySelectorAll('.mole'); +let lastHole; +let timeUp = false; +let score = 0; + +//create a function to make a random time for mole to pop from the hole +function randomTime(min, max) { + return Math.round(Math.random() * (max - min) + min); +} + +function randomHole(holes){ + const index = Math.floor(Math.random() * holes.length); + const hole = holes[index]; + + //prevent same hole from getting the same number + if (hole === lastHole){ + return randomHole(holes); + } + lastHole = hole; + return hole; +} + +function peep() { + const time = randomTime(500, 1000); //get a random time to determine how long mole should peep + const hole = randomHole(holes); //get the random hole from the randomHole function + hole.classList.add('up'); //add the CSS class so selected mole can "pop up" + setTimeout(() => { + hole.classList.remove('up'); //make the selected mole "pop down" after a random time + if(!timeUp) { + peep(); + } + }, time); +} + +function startGame() { + scoreBoard.textContent = 0; + timeUp = false; + score = 0; + peep(); + setTimeout(() => timeUp = true, 15000) //show random moles for 15 seconds +} + +function wack(e){ + if(!e.isTrusted) return; //** new thing I learned */ + score++; + this.parentNode.classList.remove('up'); //this refers to item clicked + scoreBoard.textContent = score; +} + +moles.forEach(mole => mole.addEventListener('click', wack)) + diff --git a/Wack-a-mole-game/styles.css b/Wack-a-mole-game/styles.css new file mode 100644 index 00000000..2c58b865 --- /dev/null +++ b/Wack-a-mole-game/styles.css @@ -0,0 +1,157 @@ +html { + font-size: 35px; + background: pink; +} + +body { + padding: 0; + margin: 0; + text-align: center; +} + +h1 { + font-family:Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; + color: brown; + text-align: center; + font-size: 70px; + line-height: 1; + margin-bottom: 0; +} + +.score { + background:magenta; + padding: 0 48px; + line-height: 1; + border-radius: 16px; + color: #fff; + margin-left: 15px; +} + +.game { + width: 600px; + height: 300px; + display:flex; + flex-wrap:wrap; + margin: 0 auto; + +} + +.hole{ + flex: 1 0 33.33%; + overflow: hidden; + position: relative; +} + +.hole:after{ + display:block; + background: url(dirt.png) bottom center no-repeat; + background-size:contain; + content: ''; + width: 100%; + height: 90px; + position: absolute; + z-index: 2; + bottom: -30px; +} + +.mole { + background: url('mole.png') bottom center no-repeat; + background-size: 80%; + position: absolute; + top: 100%; + width: 100%; + height: 100%; + transition: all 0.4s; +} + +.hole.up .mole{ + top:0; +} + +button{ + width:175px; + font-size: 35px; + height: 70px; + color: #fff; + background-color: magenta; + border-radius: 10px; + border-color: red; + margin-left: 20px; + margin-top: 90px; +} + +@media (min-width: 667px) and (max-width: 1024px){ + + h1 { + display: none; + } + .score { + background:magenta; + padding: 0 12px; + line-height: 1; + border-radius: 16px; + color: #fff; + font-size: 40px; + margin-left: 20px; +} + + .hole.up .mole{ + top:17px; + } +} + +@media (max-width: 667px){ + + .game { + width: 667px; + height: 300px; + display:flex; + flex-wrap:wrap; + margin: 0 auto; + } + + .score{ + width:35px; + font-size: 15px; + height: 40px; + color: #fff; + background-color: magenta; + border-radius: 10px; + margin-left: 10px; + margin-top: 10px; + padding: 5px; + } + + button{ + margin: 10px 10px 10px 10px; + height: 40px; + width: 75px; + font-size: 15px; + } + + .hole:after{ + display:block; + background: url(dirt.png) bottom center no-repeat; + background-size:contain; + content: ''; + max-width: 70%; + height: 60px; + position: absolute; + z-index: 2; + bottom: -30px; + } + + .mole { + background: url('mole.png') bottom center no-repeat; + background-size: 60%; + position: absolute; + top: 100%; + max-width: 70%; + height: 70%; + transition: all 0.4s; + } + + .hole.up .mole{ + top:50px; + } +} \ No newline at end of file diff --git a/Weather.py b/Weather.py new file mode 100644 index 00000000..e16d557c --- /dev/null +++ b/Weather.py @@ -0,0 +1,40 @@ +def main(): + NUMBER_OF_DAYS = 10 + NUMBER_OF_HOURS = 24 + + # Initialize data + data = initialize_data(NUMBER_OF_DAYS, NUMBER_OF_HOURS) + + # Read input using input redirection from a file + read_input(data, NUMBER_OF_DAYS, NUMBER_OF_HOURS) + + # Find and display the average daily temperature and humidity + calculate_and_display_averages(data, NUMBER_OF_DAYS, NUMBER_OF_HOURS) + + +def initialize_data(num_days, num_hours): + """Initialize a 3D list for storing temperature and humidity data.""" + return [[[0, 0] for _ in range(num_hours)] for _ in range(num_days)] + + +def read_input(data, num_days, num_hours): + """Read input data and populate the data list.""" + for _ in range(num_days * num_hours): + line = input().strip().split() + day, hour, temperature, humidity = map(eval, line) + data[day - 1][hour - 1] = [temperature, humidity] + + +def calculate_and_display_averages(data, num_days, num_hours): + """Calculate and display the average daily temperature and humidity.""" + for i in range(num_days): + daily_temperature_total = sum(data[i][j][0] for j in range(num_hours)) + daily_humidity_total = sum(data[i][j][1] for j in range(num_hours)) + + # Display result + print(f"Day {i + 1}'s average temperature is {daily_temperature_total / num_hours:.2f}") + print(f"Day {i + 1}'s average humidity is {daily_humidity_total / num_hours:.2f}") + + +if __name__ == "__main__": + main() # Call the main function diff --git a/Web Browser/.DS_Store b/Web Browser/.DS_Store new file mode 100644 index 00000000..368aa908 Binary files /dev/null and b/Web Browser/.DS_Store differ diff --git a/Web Browser/build.xml b/Web Browser/build.xml new file mode 100644 index 00000000..e7e58ee7 --- /dev/null +++ b/Web Browser/build.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<!-- By default, only the Clean and Build commands use this build script. --> +<!-- Commands such as Run, Debug, and Test only use this build script if --> +<!-- the Compile on Save feature is turned off for the project. --> +<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> +<!-- in the project's Project Properties dialog box.--> +<project name="Browser" default="default" basedir="."> + <description>Builds, tests, and runs the project Browser.</description> + <import file="nbproject/build-impl.xml"/> + <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-jar: called before JAR building + -post-jar: called after JAR building + -post-clean: called after cleaning build products + + (Targets beginning with '-' are not intended to be called on their own.) + + Example of inserting an obfuscator after compilation could look like this: + + <target name="-post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Another way to customize the build is by overriding existing main targets. + The targets of interest are: + + -init-macrodef-javac: defines macro for javac compilation + -init-macrodef-junit: defines macro for junit execution + -init-macrodef-debug: defines macro for class debugging + -init-macrodef-java: defines macro for class execution + -do-jar: JAR building + run: execution of project + -javadoc-build: Javadoc generation + test-report: JUnit report generation + + An example of overriding the target for project execution could look like this: + + <target name="run" depends="Browser-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that the overridden target depends on the jar target and not only on + the compile target as the regular run target does. Again, for a list of available + properties which you can use, check the target you are overriding in the + nbproject/build-impl.xml file. + + --> +</project> diff --git a/Web Browser/build/built-jar.properties b/Web Browser/build/built-jar.properties new file mode 100644 index 00000000..dd83b7a6 --- /dev/null +++ b/Web Browser/build/built-jar.properties @@ -0,0 +1,4 @@ +#Tue, 26 Jul 2016 13:57:08 +0530 + + +C\:\\Users\\Ram\ Sundar\\Documents\\NetBeansProjects\\Browser= diff --git a/Web Browser/build/classes/OxygenBrowser$1.class b/Web Browser/build/classes/OxygenBrowser$1.class new file mode 100644 index 00000000..0e11f3e4 Binary files /dev/null and b/Web Browser/build/classes/OxygenBrowser$1.class differ diff --git a/Web Browser/build/classes/OxygenBrowser$2.class b/Web Browser/build/classes/OxygenBrowser$2.class new file mode 100644 index 00000000..125d24cb Binary files /dev/null and b/Web Browser/build/classes/OxygenBrowser$2.class differ diff --git a/Web Browser/build/classes/OxygenBrowser$3.class b/Web Browser/build/classes/OxygenBrowser$3.class new file mode 100644 index 00000000..939109b6 Binary files /dev/null and b/Web Browser/build/classes/OxygenBrowser$3.class differ diff --git a/Web Browser/build/classes/OxygenBrowser.class b/Web Browser/build/classes/OxygenBrowser.class new file mode 100644 index 00000000..c78ce01a Binary files /dev/null and b/Web Browser/build/classes/OxygenBrowser.class differ diff --git a/Web Browser/build/classes/OxygenBrowserMain.class b/Web Browser/build/classes/OxygenBrowserMain.class new file mode 100644 index 00000000..e6ae6c3d Binary files /dev/null and b/Web Browser/build/classes/OxygenBrowserMain.class differ diff --git a/Web Browser/dist/Browser.jar b/Web Browser/dist/Browser.jar new file mode 100644 index 00000000..91fb2242 Binary files /dev/null and b/Web Browser/dist/Browser.jar differ diff --git a/Web Browser/dist/README.TXT b/Web Browser/dist/README.TXT new file mode 100644 index 00000000..60c0ff78 --- /dev/null +++ b/Web Browser/dist/README.TXT @@ -0,0 +1,32 @@ +======================== +BUILD OUTPUT DESCRIPTION +======================== + +When you build an Java application project that has a main class, the IDE +automatically copies all of the JAR +files on the projects classpath to your projects dist/lib folder. The IDE +also adds each of the JAR files to the Class-Path element in the application +JAR files manifest file (MANIFEST.MF). + +To run the project from the command line, go to the dist folder and +type the following: + +java -jar "Browser.jar" + +To distribute this project, zip up the dist folder (including the lib folder) +and distribute the ZIP file. + +Notes: + +* If two JAR files on the project classpath have the same name, only the first +JAR file is copied to the lib folder. +* Only JAR files are copied to the lib folder. +If the classpath contains other types of files or folders, these files (folders) +are not copied. +* If a library on the projects classpath also has a Class-Path element +specified in the manifest,the content of the Class-Path element has to be on +the projects runtime path. +* To set a main class in a standard Java project, right-click the project node +in the Projects window and choose Properties. Then click Run and enter the +class name in the Main Class field. Alternatively, you can manually type the +class name in the manifest Main-Class element. diff --git a/Web Browser/manifest.mf b/Web Browser/manifest.mf new file mode 100644 index 00000000..328e8e5b --- /dev/null +++ b/Web Browser/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/Web Browser/nbproject/build-impl.xml b/Web Browser/nbproject/build-impl.xml new file mode 100644 index 00000000..f148aa7b --- /dev/null +++ b/Web Browser/nbproject/build-impl.xml @@ -0,0 +1,1419 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +*** GENERATED FROM project.xml - DO NOT EDIT *** +*** EDIT ../build.xml INSTEAD *** + +For the purpose of easier reading the script +is divided into following sections: + + - initialization + - compilation + - jar + - execution + - debugging + - javadoc + - test compilation + - test execution + - test debugging + - applet + - cleanup + + --> +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="Browser-impl"> + <fail message="Please build using Ant 1.8.0 or higher."> + <condition> + <not> + <antversion atleast="1.8.0"/> + </not> + </condition> + </fail> + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> + <!-- + ====================== + INITIALIZATION SECTION + ====================== + --> + <target name="-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init" name="-init-private"> + <property file="nbproject/private/config.properties"/> + <property file="nbproject/private/configs/${config}.properties"/> + <property file="nbproject/private/private.properties"/> + </target> + <target depends="-pre-init,-init-private" name="-init-user"> + <property file="${user.properties.file}"/> + <!-- The two properties below are usually overridden --> + <!-- by the active platform. Just a fallback. --> + <property name="default.javac.source" value="1.4"/> + <property name="default.javac.target" value="1.4"/> + </target> + <target depends="-pre-init,-init-private,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> + <property file="nbproject/project.properties"/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> + <property name="platform.java" value="${java.home}/bin/java"/> + <available file="${manifest.file}" property="manifest.available"/> + <condition property="splashscreen.available"> + <and> + <not> + <equals arg1="${application.splash}" arg2="" trim="true"/> + </not> + <available file="${application.splash}"/> + </and> + </condition> + <condition property="main.class.available"> + <and> + <isset property="main.class"/> + <not> + <equals arg1="${main.class}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition property="profile.available"> + <and> + <isset property="javac.profile"/> + <length length="0" string="${javac.profile}" when="greater"/> + <matches pattern="1\.[89](\..*)?" string="${javac.source}"/> + </and> + </condition> + <condition property="do.archive"> + <or> + <not> + <istrue value="${jar.archive.disabled}"/> + </not> + <istrue value="${not.archive.disabled}"/> + </or> + </condition> + <condition property="do.mkdist"> + <and> + <isset property="do.archive"/> + <isset property="libs.CopyLibs.classpath"/> + <not> + <istrue value="${mkdist.disabled}"/> + </not> + </and> + </condition> + <condition property="do.archive+manifest.available"> + <and> + <isset property="manifest.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+main.class.available"> + <and> + <isset property="main.class.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+splashscreen.available"> + <and> + <isset property="splashscreen.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+profile.available"> + <and> + <isset property="profile.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="have.tests"> + <or> + <available file="${test.src.dir}"/> + </or> + </condition> + <condition property="have.sources"> + <or> + <available file="${src.dir}"/> + </or> + </condition> + <condition property="netbeans.home+have.tests"> + <and> + <isset property="netbeans.home"/> + <isset property="have.tests"/> + </and> + </condition> + <condition property="no.javadoc.preview"> + <and> + <isset property="javadoc.preview"/> + <isfalse value="${javadoc.preview}"/> + </and> + </condition> + <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> + <property name="javac.compilerargs" value=""/> + <property name="work.dir" value="${basedir}"/> + <condition property="no.deps"> + <and> + <istrue value="${no.dependencies}"/> + </and> + </condition> + <property name="javac.debug" value="true"/> + <property name="javadoc.preview" value="true"/> + <property name="application.args" value=""/> + <property name="source.encoding" value="${file.encoding}"/> + <property name="runtime.encoding" value="${source.encoding}"/> + <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> + <and> + <isset property="javadoc.encoding"/> + <not> + <equals arg1="${javadoc.encoding}" arg2=""/> + </not> + </and> + </condition> + <property name="javadoc.encoding.used" value="${source.encoding}"/> + <property name="includes" value="**"/> + <property name="excludes" value=""/> + <property name="do.depend" value="false"/> + <condition property="do.depend.true"> + <istrue value="${do.depend}"/> + </condition> + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> + <and> + <isset property="endorsed.classpath"/> + <not> + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> + <isset property="profile.available"/> + </condition> + <condition else="false" property="jdkBug6558476"> + <and> + <matches pattern="1\.[56]" string="${java.specification.version}"/> + <not> + <os family="unix"/> + </not> + </and> + </condition> + <condition else="false" property="javac.fork"> + <or> + <istrue value="${jdkBug6558476}"/> + <istrue value="${javac.external.vm}"/> + </or> + </condition> + <property name="jar.index" value="false"/> + <property name="jar.index.metainf" value="${jar.index}"/> + <property name="copylibs.rebase" value="true"/> + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <property name="java.failonerror" value="true"/> + </target> + <target name="-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> + <fail unless="src.dir">Must set src.dir</fail> + <fail unless="test.src.dir">Must set test.src.dir</fail> + <fail unless="build.dir">Must set build.dir</fail> + <fail unless="dist.dir">Must set dist.dir</fail> + <fail unless="build.classes.dir">Must set build.classes.dir</fail> + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> + <fail unless="dist.jar">Must set dist.jar</fail> + </target> + <target name="-init-macrodef-property"> + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${@{value}}"/> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <mkdir dir="@{apgeneratedsrcdir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <compilerarg value="-processorpath"/> + <compilerarg path="@{processorpath}:${empty.dir}"/> + <compilerarg line="${ap.processors.internal}"/> + <compilerarg line="${annotation.processing.processor.options}"/> + <compilerarg value="-s"/> + <compilerarg path="@{apgeneratedsrcdir}"/> + <compilerarg line="${ap.proc.none.internal}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <sequential> + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </depend> + </sequential> + </macrodef> + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${build.classes.dir}" name="destdir"/> + <sequential> + <fail unless="javac.includes">Must set javac.includes</fail> + <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> + <path> + <filelist dir="@{destdir}" files="${javac.includes}"/> + </path> + <globmapper from="*.java" to="*.class"/> + </pathconvert> + <tempfile deleteonexit="true" property="javac.includesfile.binary"/> + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> + <delete> + <files includesfile="${javac.includesfile.binary}"/> + </delete> + <delete> + <fileset file="${javac.includesfile.binary}"/> + </delete> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target name="-init-test-properties"> + <property name="test.binaryincludes" value="<nothing>"/> + <property name="test.binarytestincludes" value=""/> + <property name="test.binaryexcludes" value=""/> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="Browser" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename Browser -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> + <macrodef name="resolve"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${env.@{value}}"/> + </sequential> + </macrodef> + <macrodef name="profile"> + <attribute default="${main.class}" name="classname"/> + <element name="customize" optional="true"/> + <sequential> + <property environment="env"/> + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <arg line="${application.args}"/> + <classpath> + <path path="${run.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> + </target> + <!-- + end of pre NB7.2 profiling section + --> + <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="name"/> + <attribute default="${debug.classpath}" name="classpath"/> + <attribute default="" name="stopclassname"/> + <sequential> + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </nbjpdastart> + </sequential> + </macrodef> + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${build.classes.dir}" name="dir"/> + <sequential> + <nbjpdareload> + <fileset dir="@{dir}" includes="${fix.classes}"> + <include name="${fix.includes}*.class"/> + </fileset> + </nbjpdareload> + </sequential> + </macrodef> + </target> + <target name="-init-debug-args"> + <property name="version-output" value="java version "${ant.java.version}"/> + <condition property="have-jdk-older-than-1.4"> + <or> + <contains string="${version-output}" substring="java version "1.0"/> + <contains string="${version-output}" substring="java version "1.1"/> + <contains string="${version-output}" substring="java version "1.2"/> + <contains string="${version-output}" substring="java version "1.3"/> + </or> + </condition> + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> + <istrue value="${have-jdk-older-than-1.4}"/> + </condition> + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> + <os family="windows"/> + </condition> + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> + <isset property="debug.transport"/> + </condition> + </target> + <target depends="-init-debug-args" name="-init-macrodef-debug"> + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${debug.classpath}" name="classpath"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-java"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-copylibs"> + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${manifest.file}" name="manifest"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert pathsep=" " property="jar.classpath"> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + <manifest> + <attribute name="Class-Path" value="${jar.classpath}"/> + <customize/> + </manifest> + </copylibs> + </sequential> + </macrodef> + </target> + <target name="-init-presetdef-jar"> + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}"> + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + </jar> + </presetdef> + </target> + <target name="-init-ap-cmdline-properties"> + <property name="annotation.processing.enabled" value="true"/> + <property name="annotation.processing.processors.list" value=""/> + <property name="annotation.processing.processor.options" value=""/> + <property name="annotation.processing.run.all.processors" value="true"/> + <property name="javac.processorpath" value="${javac.classpath}"/> + <property name="javac.test.processorpath" value="${javac.test.classpath}"/> + <condition property="ap.supported.internal" value="true"> + <not> + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> + </not> + </condition> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> + <isfalse value="${annotation.processing.run.all.processors}"/> + </condition> + <condition else="" property="ap.proc.none.internal" value="-proc:none"> + <isfalse value="${annotation.processing.enabled}"/> + </condition> + </target> + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> + <property name="ap.cmd.line.internal" value=""/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> + <!-- + =================== + COMPILATION SECTION + =================== + --> + <target name="-deps-jar-init" unless="built-jar.properties"> + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> + <delete file="${built-jar.properties}" quiet="true"/> + </target> + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> + <echo level="warn" message="Cycle detected: Browser was already built"/> + </target> + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-jar.properties}" verbose="false"/> + <property file="${built-jar.properties}" prefix="already.built.jar."/> + <antcall target="-warn-already-built-jar"/> + <propertyfile file="${built-jar.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> + <target depends="init" name="-check-automatic-build"> + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> + </target> + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> + <antcall target="clean"/> + </target> + <target depends="init,deps-jar" name="-pre-pre-compile"> + <mkdir dir="${build.classes.dir}"/> + </target> + <target name="-pre-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-depend"> + <pathconvert property="build.generated.subdirs"> + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </pathconvert> + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> + <copy todir="${build.classes.dir}"> + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target if="has.persistence.xml" name="-copy-persistence-xml"> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy todir="${build.classes.dir}/META-INF"> + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> + </copy> + </target> + <target name="-post-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> + <target name="-pre-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile/> + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> + </target> + <target name="-post-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> + <!-- + ==================== + JAR BUILDING SECTION + ==================== + --> + <target depends="init" name="-pre-pre-jar"> + <dirname file="${dist.jar}" property="dist.jar.dir"/> + <mkdir dir="${dist.jar.dir}"/> + </target> + <target name="-pre-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <touch file="${tmp.manifest.file}" verbose="false"/> + </target> + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> + <manifest file="${tmp.manifest.file}" mode="update"> + <attribute name="Main-Class" value="${main.class}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> + <manifest file="${tmp.manifest.file}" mode="update"> + <attribute name="Profile" value="${javac.profile}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> + <basename file="${application.splash}" property="splashscreen.basename"/> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> + <manifest file="${tmp.manifest.file}" mode="update"> + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> + </manifest> + </target> + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs"> + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> + <echo level="info">To run this application from the command line without Ant, try:</echo> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <echo level="info">java -jar "${dist.jar.resolved}"</echo> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> + <j2seproject1:jar manifest="${tmp.manifest.file}"/> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <pathconvert property="run.classpath.with.dist.jar"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> + </pathconvert> + <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}"> + <isset property="main.class.available"/> + </condition> + <condition else="debug" property="jar.usage.level" value="info"> + <isset property="main.class.available"/> + </condition> + <echo level="${jar.usage.level}" message="${jar.usage.message}"/> + </target> + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> + <delete> + <fileset file="${tmp.manifest.file}"/> + </delete> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> + <target name="-post-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> + <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/> + <!-- + ================= + EXECUTION SECTION + ================= + --> + <target depends="init,compile" description="Run a main class." name="run"> + <j2seproject1:java> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject1:java> + </target> + <target name="-do-not-recompile"> + <property name="javac.includes.binary" value=""/> + </target> + <target depends="init,compile-single" name="run-single"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}"/> + </target> + <target depends="init,compile-test-single" name="run-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> + </target> + <!-- + ================= + DEBUGGING SECTION + ================= + --> + <target depends="init" if="netbeans.home" name="-debug-start-debugger"> + <j2seproject1:nbjpdastart name="${debug.class}"/> + </target> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> + </target> + <target depends="init,compile" name="-debug-start-debuggee"> + <j2seproject3:debug> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> + <j2seproject1:nbjpdastart stopclassname="${main.class}"/> + </target> + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}"/> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> + <target depends="init" name="-pre-debug-fix"> + <fail unless="fix.includes">Must set fix.includes</fail> + <property name="javac.includes" value="${fix.includes}.java"/> + </target> + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> + <j2seproject1:nbjpdareload/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> + <!-- + ================= + PROFILING SECTION + ================= + --> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile/> + </target> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="${profile.class}"/> + </target> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </profile> + </target> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + </nbprofiledirect> + <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <test name="${profile.class}"/> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + </junit> + </target> + <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcal target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- + =============== + JAVADOC SECTION + =============== + --> + <target depends="init" if="have.sources" name="-javadoc-build"> + <mkdir dir="${dist.javadoc.dir}"/> + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> + <and> + <isset property="endorsed.classpath.cmd.line.arg"/> + <not> + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> + </not> + </and> + </condition> + <condition else="" property="bug5101868workaround" value="*.java"> + <matches pattern="1\.[56](\..*)?" string="${java.version}"/> + </condition> + <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> + <classpath> + <path path="${javac.classpath}"/> + </classpath> + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/*.java"/> + <exclude name="*.java"/> + </fileset> + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> + </javadoc> + <copy todir="${dist.javadoc.dir}"> + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/doc-files/**"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/doc-files/**"/> + </fileset> + </copy> + </target> + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> + <nbbrowse file="${dist.javadoc.dir}/index.html"/> + </target> + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> + <!-- + ========================= + TEST COMPILATION SECTION + ========================= + --> + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> + <mkdir dir="${build.test.classes.dir}"/> + </target> + <target name="-pre-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-test-depend"> + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + </target> + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> + <target name="-pre-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> + <!-- + ======================= + TEST EXECUTION SECTION + ======================= + --> + <target depends="init" if="have.tests" name="-pre-test-run"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/> + </target> + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init" if="have.tests" name="test-report"/> + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> + <target depends="init" if="have.tests" name="-pre-test-run-single"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> + <!-- + ======================= + TEST DEBUGGING SECTION + ======================= + --> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> + <!-- + ========================= + APPLET EXECUTION SECTION + ========================= + --> + <target depends="init,compile-single" name="run-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject1:java classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject1:java> + </target> + <!-- + ========================= + APPLET DEBUGGING SECTION + ========================= + --> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject3:debug classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> + <!-- + =============== + CLEANUP SECTION + =============== + --> + <target name="-deps-clean-init" unless="built-clean.properties"> + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> + <delete file="${built-clean.properties}" quiet="true"/> + </target> + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> + <echo level="warn" message="Cycle detected: Browser was already built"/> + </target> + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-clean.properties}" verbose="false"/> + <property file="${built-clean.properties}" prefix="already.built.clean."/> + <antcall target="-warn-already-built-clean"/> + <propertyfile file="${built-clean.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init" name="-do-clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> + </target> + <target name="-post-clean"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> + <target name="-check-call-dep"> + <property file="${call.built.properties}" prefix="already.built."/> + <condition property="should.call.dep"> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> + </condition> + </target> + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> + <ant antfile="${call.script}" inheritall="false" target="${call.target}"> + <propertyset> + <propertyref prefix="transfer."/> + <mapper from="transfer.*" to="*" type="glob"/> + </propertyset> + </ant> + </target> +</project> diff --git a/Web Browser/nbproject/genfiles.properties b/Web Browser/nbproject/genfiles.properties new file mode 100644 index 00000000..5c9c3092 --- /dev/null +++ b/Web Browser/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=8b019450 +build.xml.script.CRC32=d0557f33 +build.xml.stylesheet.CRC32=8064a381@1.79.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=8b019450 +nbproject/build-impl.xml.script.CRC32=8680736b +nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48 diff --git a/Web Browser/nbproject/private/private.properties b/Web Browser/nbproject/private/private.properties new file mode 100644 index 00000000..258b138f --- /dev/null +++ b/Web Browser/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Ram Sundar\\AppData\\Roaming\\NetBeans\\8.1\\build.properties diff --git a/Web Browser/nbproject/private/private.xml b/Web Browser/nbproject/private/private.xml new file mode 100644 index 00000000..6807a2ba --- /dev/null +++ b/Web Browser/nbproject/private/private.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> + <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> + <group/> + </open-files> +</project-private> diff --git a/Web Browser/nbproject/project.properties b/Web Browser/nbproject/project.properties new file mode 100644 index 00000000..45fbb992 --- /dev/null +++ b/Web Browser/nbproject/project.properties @@ -0,0 +1,74 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/Browser.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=OxygenBrowserMain +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/Web Browser/nbproject/project.xml b/Web Browser/nbproject/project.xml new file mode 100644 index 00000000..d0cd0d26 --- /dev/null +++ b/Web Browser/nbproject/project.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.java.j2seproject</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> + <name>Browser</name> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> + </data> + </configuration> +</project> diff --git a/Web Browser/src/OxygenBrowser.java b/Web Browser/src/OxygenBrowser.java new file mode 100644 index 00000000..cd71527b --- /dev/null +++ b/Web Browser/src/OxygenBrowser.java @@ -0,0 +1,63 @@ +import javax.swing.*; +import javax.swing.event.*; +import java.awt.*; +import java.awt.event.*; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; + +public class OxygenBrowser extends JFrame{ + JTextField t1; + JEditorPane display; + + public OxygenBrowser(){ + super("Ram Ji Ka Browser"); + t1=new JTextField(); + t1.setText("Enter Host..!"); + t1.setFont(new Font("Berlin Sans FB",Font.PLAIN,15)); + t1.setForeground(Color.BLUE); + t1.addMouseListener(new MouseAdapter(){ + @Override + public void mouseClicked(MouseEvent e){ + t1.setText(""); + } + }); + + t1.addActionListener(new ActionListener(){ + @Override + public void actionPerformed(ActionEvent e){ + loadCrap(e.getActionCommand()); + } + }); + + add(t1,BorderLayout.NORTH); + display=new JEditorPane(); + display.setEditable(false); + display.addHyperlinkListener(new HyperlinkListener(){ + public void hyperlinkUpdate(HyperlinkEvent event){ + if(event.getEventType()==HyperlinkEvent.EventType.ACTIVATED) + { + loadCrap(event.getURL().toString()); + } + } + }); + + add(new JScrollPane(display), BorderLayout.CENTER); + setSize(700,600); + setLocation(300,100); + setVisible(true); + } +public void loadCrap(String userText) +{ +try{ +display.setPage(userText); +t1.setText(userText); +} +catch(Exception e){ +System.out.println("Crap..!"); +String dialogmessage="Error"; +String dialogtittle="Type valid Host( \n Ex. - (http://www.google.com) \n Or Cheak Internet Connection"; +int dialogtype=JOptionPane.WARNING_MESSAGE; +JOptionPane.showMessageDialog((Component)null, dialogtittle,dialogmessage,dialogtype); +} +} +} \ No newline at end of file diff --git a/Web Browser/src/OxygenBrowserMain.java b/Web Browser/src/OxygenBrowserMain.java new file mode 100644 index 00000000..f6e7e438 --- /dev/null +++ b/Web Browser/src/OxygenBrowserMain.java @@ -0,0 +1,21 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author Ram Sundar + */ +public class OxygenBrowserMain { + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + // TODO code application logic here + OxygenBrowser ob=new OxygenBrowser(); + } + +} diff --git a/Web_Page_Source_Viewer.java b/Web_Page_Source_Viewer.java new file mode 100644 index 00000000..36a97a8b --- /dev/null +++ b/Web_Page_Source_Viewer.java @@ -0,0 +1,51 @@ +import java.awt.*; +import java.awt.event.*; +import java.io.InputStream; +import java.net.*; +public class SourceGetter extends Frame implements ActionListener{ + TextField tf; + TextArea ta; + Button b; + Label l; + SourceGetter(){ + super("Source Getter Tool - Javatpoint"); + l=new Label("Enter URL:"); + l.setBounds(50,50,50,20); + + tf=new TextField(); + tf.setBounds(120,50,250,20); + + b=new Button("Get Source Code"); + b.setBounds(120, 100,120,30); + b.addActionListener(this); + + ta=new TextArea(); + ta.setBounds(120,150,250,150); + + add(l);add(tf);add(b);add(ta); + setSize(400,400); + setLayout(null); + setVisible(true); + } + public void actionPerformed(ActionEvent e){ + String s=tf.getText(); + if(s==null){} + else{ + try{ + URL u=new URL(s); + URLConnection uc=u.openConnection(); + + InputStream is=uc.getInputStream(); + int i; + StringBuilder sb=new StringBuilder(); + while((i=is.read())!=-1){ + sb.append((char)i); + } + String source=sb.toString(); + ta.setText(source); + }catch(Exception ex){System.out.println(e);} + } + } + public static void main(String[] args) { + new SourceGetter(); + } diff --git a/Websiteping/websiteping.java b/Websiteping/websiteping.java new file mode 100644 index 00000000..b2adf844 --- /dev/null +++ b/Websiteping/websiteping.java @@ -0,0 +1,22 @@ +import java.net.InetAddress; + +public class PingExample { + public static void main(String[] args) { + String host = "www.google.com"; + + try { + InetAddress inetAddress = InetAddress.getByName(host); + long startTime = System.currentTimeMillis(); + + if (inetAddress.isReachable(5000)) { + long endTime = System.currentTimeMillis(); + long pingTime = endTime - startTime; + System.out.println("Ping for " + host + " Successful. Time: " + pingTime + "ms"); + } else { + System.out.println("Unable to ping host " + host); + } + } catch (Exception e) { + System.out.println("Error pinging host " + host + ": " + e.getMessage()); + } + } +} diff --git a/WidgetsDemo.py b/WidgetsDemo.py new file mode 100644 index 00000000..bc7481eb --- /dev/null +++ b/WidgetsDemo.py @@ -0,0 +1,61 @@ +from tkinter import * # Import tkinter + +class WidgetsDemo: + def __init__(self): + window = Tk() # Create a window + window.title("Widgets Demo") # Set a title + + # Add a button, a check button, and a radio button to frame1 + frame1 = Frame(window) # Create and add a frame to window + frame1.pack() + self.v1 = IntVar() + cbtBold = Checkbutton(frame1, text = "Bold", + variable = self.v1, command = self.processCheckbutton) + self.v2 = IntVar() + rbRed = Radiobutton(frame1, text = "Red", bg = "red", + variable = self.v2, value = 1, + command = self.processRadiobutton) + rbYellow = Radiobutton(frame1, text = "Yellow", + bg = "yellow", variable = self.v2, value = 2, + command = self.processRadiobutton) + cbtBold.grid(row = 1, column = 1) + rbRed.grid(row = 1, column = 2) + rbYellow.grid(row = 1, column = 3) + + # Add a button, a check button, and a radio button to frame1 + frame2 = Frame(window) # Create and add a frame to window + frame2.pack() + label = Label(frame2, text = "Enter your name: ") + self.name = StringVar() + entryName = Entry(frame2, textvariable = self.name) + btGetName = Button(frame2, text = "Get Name", + command = self.processButton) + message = Message(frame2, text = "It is a widgets demo") + label.grid(row = 1, column = 1) + entryName.grid(row = 1, column = 2) + btGetName.grid(row = 1, column = 3) + message.grid(row = 1, column = 4) + + # Add a text + text = Text(window) # Create a text add to the window + text.pack() + text.insert(END, + "Tip\nThe best way to learn Tkinter is to read ") + text.insert(END, + "these carefully designed examples and use them ") + text.insert(END, "to create your applications.") + + window.mainloop() # Create an event loop + + def processCheckbutton(self): + print("check button is " + + ("checked " if self.v1.get() == 1 else "unchecked")) + + def processRadiobutton(self): + print(("Red" if self.v2.get() == 1 else "Yellow") + + " is selected " ) + + def processButton(self): + print("Your name is " + self.name.get()) + +WidgetsDemo() # Create GUI \ No newline at end of file diff --git a/WiggleSort.java b/WiggleSort.java new file mode 100644 index 00000000..ad6fde35 --- /dev/null +++ b/WiggleSort.java @@ -0,0 +1,11 @@ +class Solution { + public void wiggleSort(int[] nums) { + Arrays.sort(nums); + int n = nums.length-1; + int []temp = new int[nums.length]; + + for(int i=1;i<nums.length;i+=2) temp[i]=nums[n--]; + for(int i=0;i<nums.length;i+=2) temp[i]=nums[n--]; + for(int i=0;i<nums.length;i++) nums[i]=temp[i]; + } +} diff --git a/WindowUtilities.class b/WindowUtilities.class new file mode 100644 index 00000000..6c0a3655 Binary files /dev/null and b/WindowUtilities.class differ diff --git a/WindowUtilities.java b/WindowUtilities.java new file mode 100644 index 00000000..aaf4d418 --- /dev/null +++ b/WindowUtilities.java @@ -0,0 +1,18 @@ +import javax.swing.*; +import java.awt.*; + +public class WindowUtilities +{ + public static void setNativeLookAndFeel() + { + try + { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + }catch(Exception e) + { + System.out.println("Error setting native LAF: " + e); + } + } +//UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); +//UIManager.setLookAndFeel( "com.sun.java.swing.plaf.motif.MotifLookAndFeel"); +} \ No newline at end of file diff --git a/Women-Safety-App-master/.DS_Store b/Women-Safety-App-master/.DS_Store new file mode 100644 index 00000000..1c983197 Binary files /dev/null and b/Women-Safety-App-master/.DS_Store differ diff --git a/Women-Safety-App-master/.gradle/.DS_Store b/Women-Safety-App-master/.gradle/.DS_Store new file mode 100644 index 00000000..c100949d Binary files /dev/null and b/Women-Safety-App-master/.gradle/.DS_Store differ diff --git a/Women-Safety-App-master/.gradle/7.0.2/dependencies-accessors/dependencies-accessors.lock b/Women-Safety-App-master/.gradle/7.0.2/dependencies-accessors/dependencies-accessors.lock new file mode 100644 index 00000000..066e2fc5 Binary files /dev/null and b/Women-Safety-App-master/.gradle/7.0.2/dependencies-accessors/dependencies-accessors.lock differ diff --git a/Women-Safety-App-master/.gradle/7.0.2/dependencies-accessors/gc.properties b/Women-Safety-App-master/.gradle/7.0.2/dependencies-accessors/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/Women-Safety-App-master/.gradle/7.0.2/fileChanges/last-build.bin b/Women-Safety-App-master/.gradle/7.0.2/fileChanges/last-build.bin new file mode 100644 index 00000000..f76dd238 Binary files /dev/null and b/Women-Safety-App-master/.gradle/7.0.2/fileChanges/last-build.bin differ diff --git a/Women-Safety-App-master/.gradle/7.0.2/fileHashes/fileHashes.lock b/Women-Safety-App-master/.gradle/7.0.2/fileHashes/fileHashes.lock new file mode 100644 index 00000000..2c1f5825 Binary files /dev/null and b/Women-Safety-App-master/.gradle/7.0.2/fileHashes/fileHashes.lock differ diff --git a/Women-Safety-App-master/.gradle/7.0.2/gc.properties b/Women-Safety-App-master/.gradle/7.0.2/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/Women-Safety-App-master/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/Women-Safety-App-master/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 00000000..ef48ec93 Binary files /dev/null and b/Women-Safety-App-master/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/Women-Safety-App-master/.gradle/buildOutputCleanup/cache.properties b/Women-Safety-App-master/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 00000000..03a3d189 --- /dev/null +++ b/Women-Safety-App-master/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Wed May 18 20:29:38 IST 2022 +gradle.version=7.0.2 diff --git a/Women-Safety-App-master/.gradle/checksums/checksums.lock b/Women-Safety-App-master/.gradle/checksums/checksums.lock new file mode 100644 index 00000000..95406345 Binary files /dev/null and b/Women-Safety-App-master/.gradle/checksums/checksums.lock differ diff --git a/Women-Safety-App-master/.gradle/vcs-1/gc.properties b/Women-Safety-App-master/.gradle/vcs-1/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/Women-Safety-App-master/.idea/.gitignore b/Women-Safety-App-master/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/Women-Safety-App-master/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Women-Safety-App-master/.idea/gradle.xml b/Women-Safety-App-master/.idea/gradle.xml new file mode 100644 index 00000000..9ce13301 --- /dev/null +++ b/Women-Safety-App-master/.idea/gradle.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleMigrationSettings" migrationVersion="1" /> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="testRunner" value="GRADLE" /> + <option name="distributionType" value="DEFAULT_WRAPPED" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="gradleJvm" value="11" /> + <option name="resolveModulePerSourceSet" value="false" /> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/Women-Safety-App-master/.idea/misc.xml b/Women-Safety-App-master/.idea/misc.xml new file mode 100644 index 00000000..dd3401d7 --- /dev/null +++ b/Women-Safety-App-master/.idea/misc.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ExternalStorageConfigurationManager" enabled="true" /> + <component name="ProjectRootManager" version="2" project-jdk-name="Android API 29 Platform" project-jdk-type="Android SDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/Women-Safety-App-master/.idea/modules/Women-Safety-App-master.iml b/Women-Safety-App-master/.idea/modules/Women-Safety-App-master.iml new file mode 100644 index 00000000..9e7eb8b6 --- /dev/null +++ b/Women-Safety-App-master/.idea/modules/Women-Safety-App-master.iml @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module external.linked.project.id=":" external.linked.project.path="$MODULE_DIR$/../.." external.root.project.path="$MODULE_DIR$/../.." external.system.id="GRADLE" type="JAVA_MODULE" version="4" /> \ No newline at end of file diff --git a/Women-Safety-App-master/app/build.gradle b/Women-Safety-App-master/app/build.gradle new file mode 100644 index 00000000..937e7ad6 --- /dev/null +++ b/Women-Safety-App-master/app/build.gradle @@ -0,0 +1,23 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 19 + buildToolsVersion "31.0.0" + + defaultConfig { + applicationId "com.prabhu.womensafetyapp" + minSdkVersion 8 + targetSdkVersion 18 + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' + } + } +} + +dependencies { + compile 'com.android.support:support-v4:19.1.0' +} diff --git a/Women-Safety-App-master/app/src/main/AndroidManifest.xml b/Women-Safety-App-master/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..835f4544 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/AndroidManifest.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.prabhu.womensafetyapp" + android:versionCode="1" + android:versionName="1.0" > + <uses-sdk + android:minSdkVersion="8" + android:targetSdkVersion="18" /> + <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.SEND_SMS" /> + <uses-permission android:name="android.permission.READ_PHONE_STATE" > + </uses-permission> + <application + android:allowBackup="true" + android:icon="@drawable/ic_launcher" + android:label="@string/app_name" + android:theme="@style/AppTheme" > + <activity + android:name="com.prabhu.womensafetyapp.MainActivity" + android:label="@string/app_name" > + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + <activity + android:name="com.prabhu.womensafetyapp.Register" + android:label="@string/title_activity_register" + android:parentActivityName="com.prabhu.womensafetyapp.MainActivity" > + <meta-data + android:name="android.support.PARENT_ACTIVITY" + android:value="com.prabhu.womensafetyapp.MainActivity" /> + </activity> + <activity + android:name="com.prabhu.womensafetyapp.Display" + android:label="@string/title_activity_display" + android:parentActivityName="com.prabhu.womensafetyapp.MainActivity" > + <meta-data + android:name="android.support.PARENT_ACTIVITY" + android:value="com.prabhu.womensafetyapp.MainActivity" /> + </activity> + <service android:name="com.prabhu.womensafetyapp.BgService" /> + <activity + android:name="com.prabhu.womensafetyapp.Instructions" + android:label="@string/title_activity_instructions" + android:parentActivityName="com.prabhu.womensafetyapp.MainActivity" > + <meta-data + android:name="android.support.PARENT_ACTIVITY" + android:value="com.prabhu.womensafetyapp.MainActivity" /> + </activity> + <activity + android:name="com.prabhu.womensafetyapp.Verify" + android:label="@string/title_activity_verify" + android:parentActivityName="com.prabhu.womensafetyapp.MainActivity" > + <meta-data + android:name="android.support.PARENT_ACTIVITY" + android:value="com.prabhu.womensafetyapp.MainActivity" /> + </activity> + </application> +</manifest> diff --git a/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/AccelerometerListener.java b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/AccelerometerListener.java new file mode 100644 index 00000000..028235a0 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/AccelerometerListener.java @@ -0,0 +1,10 @@ +package com.prabhu.womensafetyapp; + + +public interface AccelerometerListener { + + public void onAccelerationChanged(float x, float y, float z); + + public void onShake(float force); + +} \ No newline at end of file diff --git a/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/AccelerometerManager.java b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/AccelerometerManager.java new file mode 100644 index 00000000..60a09951 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/AccelerometerManager.java @@ -0,0 +1,223 @@ +package com.prabhu.womensafetyapp; + +import java.util.List; +import android.content.Context; +import android.hardware.Sensor; +import android.hardware.SensorEvent; +import android.hardware.SensorEventListener; +import android.hardware.SensorManager; +import android.widget.Toast; + +public class AccelerometerManager { + + private static Context aContext=null; + + + /** Accuracy configuration */ + private static float threshold = 15.0f; + private static int interval = 200; + + private static Sensor sensor; + private static SensorManager sensorManager; + // you could use an OrientationListener array instead + // if you plans to use more than one listener + private static AccelerometerListener listener; + + /** indicates whether or not Accelerometer Sensor is supported */ + private static Boolean supported; + /** indicates whether or not Accelerometer Sensor is running */ + private static boolean running = false; + + /** + * Returns true if the manager is listening to orientation changes + */ + public static boolean isListening() { + return running; + } + + /** + * Unregisters listeners + */ + public static void stopListening() { + running = false; + try { + if (sensorManager != null && sensorEventListener != null) { + sensorManager.unregisterListener(sensorEventListener); + } + } catch (Exception e) {} + } + + /** + * Returns true if at least one Accelerometer sensor is available + */ + public static boolean isSupported(Context context) { + aContext = context; + if (supported == null) { + if (aContext != null) { + + + sensorManager = (SensorManager) aContext. + getSystemService(Context.SENSOR_SERVICE); + + // Get all sensors in device + List<Sensor> sensors = sensorManager.getSensorList( + Sensor.TYPE_ACCELEROMETER); + + supported = new Boolean(sensors.size() > 0); + + + + } else { + supported = Boolean.FALSE; + } + } + return supported; + } + + /** + * Configure the listener for shaking + * @param threshold + * minimum acceleration variation for considering shaking + * @param interval + * minimum interval between to shake events + */ + public static void configure(int threshold, int interval) { + AccelerometerManager.threshold = threshold; + AccelerometerManager.interval = interval; + } + + /** + * Registers a listener and start listening + * @param accelerometerListener + * callback for accelerometer events + */ + public static void startListening( AccelerometerListener accelerometerListener ) + { + + sensorManager = (SensorManager) aContext. + getSystemService(Context.SENSOR_SERVICE); + + // Take all sensors in device + List<Sensor> sensors = sensorManager.getSensorList( + Sensor.TYPE_ACCELEROMETER); + + if (sensors.size() > 0) { + + sensor = sensors.get(0); + + // Register Accelerometer Listener + running = sensorManager.registerListener( + sensorEventListener, sensor, + SensorManager.SENSOR_DELAY_GAME); + + listener = accelerometerListener; + } + + + } + + /** + * Configures threshold and interval + * And registers a listener and start listening + * @param accelerometerListener + * callback for accelerometer events + * @param threshold + * minimum acceleration variation for considering shaking + * @param interval + * minimum interval between to shake events + */ + public static void startListening( + AccelerometerListener accelerometerListener, + int threshold, int interval) { + configure(threshold, interval); + startListening(accelerometerListener); + } + + /** + * The listener that listen to events from the accelerometer listener + */ + private static SensorEventListener sensorEventListener = + new SensorEventListener() { + + private long now = 0; + private long timeDiff = 0; + private long lastUpdate = 0; + private long lastShake = 0; + + private float x = 0; + private float y = 0; + private float z = 0; + private float lastX = 0; + private float lastY = 0; + private float lastZ = 0; + private float force = 0; + + public void onAccuracyChanged(Sensor sensor, int accuracy) {} + + public void onSensorChanged(SensorEvent event) { + // use the event timestamp as reference + // so the manager precision won't depends + // on the AccelerometerListener implementation + // processing time + now = event.timestamp; + + x = event.values[0]; + y = event.values[1]; + z = event.values[2]; + + // if not interesting in shake events + // just remove the whole if then else block + if (lastUpdate == 0) { + lastUpdate = now; + lastShake = now; + lastX = x; + lastY = y; + lastZ = z; + Toast.makeText(aContext,"No Motion detected", + Toast.LENGTH_SHORT).show(); + + } else { + timeDiff = now - lastUpdate; + + if (timeDiff > 0) { + + /*force = Math.abs(x + y + z - lastX - lastY - lastZ) + / timeDiff;*/ + force = Math.abs(x + y + z - lastX - lastY - lastZ); + + if (Float.compare(force, threshold) >0 ) { + //Toast.makeText(Accelerometer.getContext(), + //(now-lastShake)+" >= "+interval, 1000).show(); + + if (now - lastShake >= interval) { + + // trigger shake event + listener.onShake(force); + } + else + { + Toast.makeText(aContext,"No Motion detected.", + Toast.LENGTH_SHORT).show(); + + } + lastShake = now; + } + lastX = x; + lastY = y; + lastZ = z; + lastUpdate = now; + } + else + { + Toast.makeText(aContext,"No Motion detected", Toast.LENGTH_SHORT).show(); + + } + } + + // trigger change event + listener.onAccelerationChanged(x, y, z); + } + + }; + +} \ No newline at end of file diff --git a/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/BgService.java b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/BgService.java new file mode 100644 index 00000000..5cc1734a --- /dev/null +++ b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/BgService.java @@ -0,0 +1,216 @@ +package com.prabhu.womensafetyapp; + + + + +import android.annotation.SuppressLint; +import android.app.Service; +import android.content.Context; +import android.content.Intent; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.os.Bundle; +import android.os.Handler; +import android.os.HandlerThread; +import android.os.IBinder; +import android.os.Looper; +import android.os.Message; +import android.telephony.SmsManager; +import android.util.Log; +import android.widget.Toast; + +@SuppressLint("HandlerLeak") + + +public class BgService extends Service implements AccelerometerListener{ + + String str_address; + + + private Looper mServiceLooper; + private ServiceHandler mServiceHandler; + + // Handler that receives messages from the thread. + private final class ServiceHandler extends Handler { + + public ServiceHandler(Looper looper) { + + super(looper); + } + @Override + public void handleMessage(Message msg) { + + // REPLACE THIS CODE WITH YOUR APP CODE + // Wait before Toasting Service Message + // to give the Service Started message time to display. + + // Toast Service Message. + /* Context context = getApplicationContext(); + CharSequence text = "Service Message"; + int duration = Toast.LENGTH_LONG; + Toast toast = Toast.makeText(context, text, duration); + toast.show(); + */ + + // Service can stop itself using the stopSelf() method. + // Not using in this app. Example statement shown below. + //stopSelf(msg.arg1); + } + } + + + @Override + public IBinder onBind(Intent arg0) { + + return null; + } + + + + @Override + public void onCreate() { + super.onCreate(); + + + if (AccelerometerManager.isSupported(this)) { + + AccelerometerManager.startListening(this); + } + HandlerThread thread = new HandlerThread("ServiceStartArguments",android.os.Process.THREAD_PRIORITY_BACKGROUND); + thread.start(); + + mServiceLooper = thread.getLooper(); + + mServiceHandler = new ServiceHandler(mServiceLooper); + } + + + @Override + public int onStartCommand(Intent intent, int flags, int startId) { + + // Get message from message pool using handler. + Message msg = mServiceHandler.obtainMessage(); + + // Set start ID (unique to the specific start) in message. + msg.arg1 = startId; + + // Send message to start job. + mServiceHandler.sendMessage(msg); + + // Toast Service Started message. + // Context context = getApplicationContext(); + + + + + /* CharSequence text = "Service Started"; + int duration = Toast.LENGTH_SHORT; + Toast toast = Toast.makeText(context, text, duration); + toast.show(); + */ + + // Start a sticky. + return START_STICKY; + } + + + + public class GeocoderHandler extends Handler { + @Override + public void handleMessage(Message message) { + + Toast.makeText(getApplicationContext(), "geocoderhandler started", Toast.LENGTH_SHORT).show(); + + + switch (message.what) { + case 1: + Bundle bundle = message.getData(); + str_address = bundle.getString("address"); + // TelephonyManager tmgr=(TelephonyManager)BgService.this.getSystemService(Context.TELEPHONY_SERVICE); + // String ph_number=tmgr.getLine1Number(); + SQLiteDatabase db; + db=openOrCreateDatabase("NumDB", Context.MODE_PRIVATE, null); + Cursor c=db.rawQuery("SELECT * FROM details", null); + Cursor c1=db.rawQuery("SELECT * FROM SOURCE", null); + + String source_ph_number=c1.getString(0); + while(c.moveToNext()) + { + String target_ph_number=c.getString(1); + + // SmsManager smsManager=SmsManager.getDefault(); + // smsManager.sendTextMessage("+918121668944", "+918121668944", "Please help me. I need help immediately. This is where i am now:"+str_address, null, null); + + Toast.makeText(getApplicationContext(), "Source:"+source_ph_number+"Target:"+target_ph_number, Toast.LENGTH_SHORT).show(); + + } + db.close(); + + break; + default: + str_address = null; + } + Toast.makeText(getApplicationContext(), str_address, Toast.LENGTH_SHORT).show(); + + } + } + + + + @Override + public void onAccelerationChanged(float x, float y, float z) { + // TODO Auto-generated method stub + + } + @Override + public void onShake(float force) { + + GPSTracker gps; + gps = new GPSTracker(BgService.this); + if(gps.canGetLocation()){ + + double latitude = gps.getLatitude(); + double longitude = gps.getLongitude(); + + RGeocoder RGeocoder = new RGeocoder(); + RGeocoder.getAddressFromLocation(latitude, longitude,getApplicationContext(), new GeocoderHandler()); + Toast.makeText(getApplicationContext(), "onShake", Toast.LENGTH_SHORT).show(); + + } + else{ + gps.showSettingsAlert(); + } + + } + + + + + + // onDestroy method. Display toast that service has stopped. + @Override + public void onDestroy() { + super.onDestroy(); + + // Toast Service Stopped. + Context context = getApplicationContext(); + + Log.i("Sensor", "Service distroy"); + + if (AccelerometerManager.isListening()) { + + AccelerometerManager.stopListening(); + + } + + CharSequence text = "Women Safety App Service Stopped"; + int duration = Toast.LENGTH_SHORT; + Toast toast = Toast.makeText(context, text, duration); + toast.show(); + + + } + + + +} \ No newline at end of file diff --git a/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Display.java b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Display.java new file mode 100644 index 00000000..774918f3 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Display.java @@ -0,0 +1,73 @@ +package com.prabhu.womensafetyapp; + + +import android.app.Activity; +import android.app.AlertDialog.Builder; +import android.content.Context; +import android.content.Intent; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.os.Bundle; +import android.view.View; + +public class Display extends Activity{ + + + Cursor c; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_display); + + + SQLiteDatabase db; + db=openOrCreateDatabase("NumDB", Context.MODE_PRIVATE, null); + + c=db.rawQuery("SELECT * FROM details", null); + if(c.getCount()==0) + { + showMessage("Error", "No records found."); + return; + } + StringBuffer buffer=new StringBuffer(); + while(c.moveToNext()) + { + buffer.append("Name: "+c.getString(0)+"\n"); + buffer.append("Number: "+c.getString(1)+"\n"); + } + showMessage("Details", buffer.toString()); + Intent i_startservice=new Intent(Display.this,BgService.class); + startService(i_startservice); + + + } + + public void showMessage(String title,String message) + { + Builder builder=new Builder(this); + builder.setCancelable(true); + builder.setTitle(title); + builder.setMessage(message); + builder.show(); + } + + + + + public void back(View v) { + Intent i_back=new Intent(Display.this,MainActivity.class); + startActivity(i_back); + + } + + + +} + + + + + + + + diff --git a/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/GPSTracker.java b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/GPSTracker.java new file mode 100644 index 00000000..5c373ec1 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/GPSTracker.java @@ -0,0 +1,201 @@ +package com.prabhu.womensafetyapp; + +import android.app.AlertDialog; +import android.app.Service; +import android.content.Context; +import android.content.DialogInterface; +import android.content.Intent; +import android.location.Location; +import android.location.LocationListener; +import android.location.LocationManager; +import android.os.Bundle; +import android.os.IBinder; +import android.provider.Settings; +import android.util.Log; + +public class GPSTracker extends Service implements LocationListener { + + private final Context mContext; + + // flag for GPS status + boolean isGPSEnabled = false; + + // flag for network status + boolean isNetworkEnabled = false; + + // flag for GPS status + boolean canGetLocation = false; + + Location location; // location + double latitude; // latitude + double longitude; // longitude + + // The minimum distance to change Updates in meters + private static final long MIN_DISTANCE_CHANGE_FOR_UPDATES = 10; // 10 meters + + // The minimum time between updates in milliseconds + private static final long MIN_TIME_BW_UPDATES = 1000 * 60 * 1; // 1 minute + + // Declaring a Location Manager + protected LocationManager locationManager; + + public GPSTracker(Context context) { + this.mContext = context; + getLocation(); + } + + public Location getLocation() { + try { + locationManager = (LocationManager) mContext + .getSystemService(LOCATION_SERVICE); + + // getting GPS status + isGPSEnabled = locationManager + .isProviderEnabled(LocationManager.GPS_PROVIDER); + + // getting network status + isNetworkEnabled = locationManager + .isProviderEnabled(LocationManager.NETWORK_PROVIDER); + + if (!isGPSEnabled && !isNetworkEnabled) { + // no network provider is enabled + } else { + this.canGetLocation = true; + if (isNetworkEnabled) { + locationManager.requestLocationUpdates( + LocationManager.NETWORK_PROVIDER, + MIN_TIME_BW_UPDATES, + MIN_DISTANCE_CHANGE_FOR_UPDATES, this); + Log.d("Network", "Network"); + if (locationManager != null) { + location = locationManager + .getLastKnownLocation(LocationManager.NETWORK_PROVIDER); + if (location != null) { + latitude = location.getLatitude(); + longitude = location.getLongitude(); + } + } + } + // if GPS Enabled get lat/long using GPS Services + if (isGPSEnabled) { + if (location == null) { + locationManager.requestLocationUpdates( + LocationManager.GPS_PROVIDER, + MIN_TIME_BW_UPDATES, + MIN_DISTANCE_CHANGE_FOR_UPDATES, this); + Log.d("GPS Enabled", "GPS Enabled"); + if (locationManager != null) { + location = locationManager + .getLastKnownLocation(LocationManager.GPS_PROVIDER); + if (location != null) { + latitude = location.getLatitude(); + longitude = location.getLongitude(); + } + } + } + } + } + + } catch (Exception e) { + e.printStackTrace(); + } + + return location; + } + + /** + * Stop using GPS listener + * Calling this function will stop using GPS in your app + * */ + public void stopUsingGPS(){ + if(locationManager != null){ + locationManager.removeUpdates(GPSTracker.this); + } + } + + /** + * Function to get latitude + * */ + public double getLatitude(){ + if(location != null){ + latitude = location.getLatitude(); + } + + // return latitude + return latitude; + } + + /** + * Function to get longitude + * */ + public double getLongitude(){ + if(location != null){ + longitude = location.getLongitude(); + } + + // return longitude + return longitude; + } + + /** + * Function to check GPS/wifi enabled + * @return boolean + * */ + public boolean canGetLocation() { + return this.canGetLocation; + } + + /** + * Function to show settings alert dialog + * On pressing Settings button will lauch Settings Options + * */ + public void showSettingsAlert(){ + AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext); + + // Setting Dialog Title + alertDialog.setTitle("GPS is settings"); + + // Setting Dialog Message + alertDialog.setMessage("GPS is not enabled. Do you want to go to settings menu?"); + + // On pressing Settings button + alertDialog.setPositiveButton("Settings", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog,int which) { + Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); + mContext.startActivity(intent); + } + }); + + // on pressing cancel button + alertDialog.setNegativeButton("Cancel", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int which) { + dialog.cancel(); + } + }); + + // Showing Alert Message + alertDialog.show(); + } + + @Override + public void onLocationChanged(Location location) { + } + + @Override + public void onProviderDisabled(String provider) { + } + + @Override + public void onProviderEnabled(String provider) { + } + + @Override + public void onStatusChanged(String provider, int status, Bundle extras) { + } + + @Override + public IBinder onBind(Intent arg0) { + return null; + } + +} diff --git a/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Instructions.java b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Instructions.java new file mode 100644 index 00000000..e94d9457 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Instructions.java @@ -0,0 +1,25 @@ +package com.prabhu.womensafetyapp; + +import android.os.Bundle; +import android.view.View; +import android.app.Activity; +import android.content.Intent; + +public class Instructions extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_instructions); + } + + public void back(View v) { + Intent i_back=new Intent(Instructions.this,MainActivity.class); + startActivity(i_back); + + } + + + + +} diff --git a/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/MainActivity.java b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/MainActivity.java new file mode 100644 index 00000000..175ef0ea --- /dev/null +++ b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/MainActivity.java @@ -0,0 +1,39 @@ +package com.prabhu.womensafetyapp; + + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; + +public class MainActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + } + + + public void register(View v) { + Intent i_register=new Intent(MainActivity.this,Register.class); + startActivity(i_register); + + } + +public void display_no(View v) { + Intent i_view=new Intent(MainActivity.this,Display.class); + startActivity(i_view); + + } + +public void instruct(View v) { + Intent i_help=new Intent(MainActivity.this,Instructions.class); + startActivity(i_help); +} + +public void verify(View v) { + Intent i_verify=new Intent(MainActivity.this,Verify.class); + startActivity(i_verify); +} +} diff --git a/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/RGeocoder.java b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/RGeocoder.java new file mode 100644 index 00000000..967428e7 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/RGeocoder.java @@ -0,0 +1,80 @@ +package com.prabhu.womensafetyapp; + +import java.io.IOException; +import java.util.List; +import java.util.Locale; + +import android.content.Context; +import android.location.Address; +import android.location.Geocoder; +import android.os.Bundle; +import android.os.Handler; +import android.os.Message; +import android.util.Log; + +public class RGeocoder { + + private static final String TAG = "LocationAddress"; + + + public void getAddressFromLocation(final double latitude, final double longitude, + final Context context, final Handler handler) { + + Thread thread = new Thread() { + @Override + public void run() { + Geocoder geocoder = new Geocoder(context, Locale.getDefault()); + String result = null; + try { + + List<Address> addressList = geocoder.getFromLocation(latitude, longitude, 1); + if (addressList != null && addressList.size() > 0) { + Address address = addressList.get(0); + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < address.getMaxAddressLineIndex(); i++) { + sb.append(address.getAddressLine(i)).append("\n"); + } + sb.append(address.getLocality()).append("\n"); + sb.append(address.getPostalCode()).append("\n"); + sb.append(address.getCountryName()); + result = sb.toString(); + + + } + } + + + catch (IOException e) { + Log.e(TAG, "Unable connect to Geocoder", e); + } + + + finally { + Message message = Message.obtain(); + message.setTarget(handler); + if (result != null) { + message.what = 1; + Bundle bundle = new Bundle(); + result = "Latitude: " + latitude + " Longitude: " + longitude + + "\n\nAddress:\n" + result; + bundle.putString("address", result); + message.setData(bundle); + } else { + message.what = 1; + Bundle bundle = new Bundle(); + result = "Latitude: " + latitude + " Longitude: " + longitude + + "\n Unable to get address for this lat-long."; + bundle.putString("address", result); + message.setData(bundle); + } + message.sendToTarget(); + } + } + }; + thread.start(); + + + + + } +} diff --git a/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Register.java b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Register.java new file mode 100644 index 00000000..4d2d42f4 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Register.java @@ -0,0 +1,83 @@ +package com.prabhu.womensafetyapp; + +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.database.Cursor; +import android.database.sqlite.SQLiteDatabase; +import android.os.Bundle; +import android.view.View; +import android.widget.EditText; +import android.widget.Toast; + +public class Register extends Activity { + + EditText name,number; + + + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_register); + //Toast.makeText(getApplicationContext(), "Activity created",Toast.LENGTH_LONG).show(); + + } + + + + public void display(View v) { + Intent i_view=new Intent(Register.this,Display.class); + startActivity(i_view); + + } + + public void instructions(View v) { + Intent i_help=new Intent(Register.this,Instructions.class); + startActivity(i_help); + + } + + public void storeInDB(View v) { + Toast.makeText(getApplicationContext(), "save started",Toast.LENGTH_LONG).show(); + name = (EditText) this.findViewById(R.id.editText1); + number = (EditText) this.findViewById(R.id.editText2); + String str_name=name.getText().toString(); + String str_number=number.getText().toString(); + SQLiteDatabase db; + db=openOrCreateDatabase("NumDB", Context.MODE_PRIVATE, null); + //Toast.makeText(getApplicationContext(), "db created",Toast.LENGTH_LONG).show(); + + db.execSQL("CREATE TABLE IF NOT EXISTS details(name VARCHAR,number VARCHAR);"); + //Toast.makeText(getApplicationContext(), "table created",Toast.LENGTH_LONG).show(); + + Cursor c=db.rawQuery("SELECT * FROM details", null); + if(c.getCount()<2) + { + db.execSQL("INSERT INTO details VALUES('"+str_name+"','"+str_number+"');"); + Toast.makeText(getApplicationContext(), "Successfully Saved",Toast.LENGTH_SHORT).show(); + } + else { + + db.execSQL("INSERT INTO details VALUES('"+str_name+"','"+str_number+"');"); + Toast.makeText(getApplicationContext(), "Maximun Numbers limited reached. Previous numbers are replaced.",Toast.LENGTH_SHORT).show(); + } + + + db.close(); + + } + + + + + + + + + + + + + +} diff --git a/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Verify.java b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Verify.java new file mode 100644 index 00000000..95291727 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/java/com/prabhu/womensafetyapp/Verify.java @@ -0,0 +1,96 @@ +package com.prabhu.womensafetyapp; + +import android.os.Bundle; +import android.app.Activity; +import android.view.Menu; +import android.view.MenuItem; +import android.view.View; +import android.widget.EditText; +import android.widget.Toast; +import android.support.v4.app.NavUtils; +import android.annotation.TargetApi; +import android.content.Context; +import android.content.Intent; +import android.database.sqlite.SQLiteDatabase; +import android.os.Build; + +public class Verify extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_verify); + // Show the Up button in the action bar. + setupActionBar(); + + + + } + + + public void verify_no(View v) { + EditText source_no = (EditText) this.findViewById(R.id.editText1); + String str_source_no=source_no.getText().toString(); + SQLiteDatabase db; + db=openOrCreateDatabase("NumDB", Context.MODE_PRIVATE, null); + // if(source_no.getText()!=null){ + + db.execSQL("CREATE TABLE IF NOT EXISTS source(number VARCHAR);"); + db.execSQL("INSERT INTO source VALUES('"+str_source_no+"');"); + Toast.makeText(getApplicationContext(), str_source_no+" Successfully Saved",Toast.LENGTH_SHORT).show(); + db.close(); + back(v); +// } +// else{ +// Toast.makeText(getApplicationContext(), "Enter Your Number.",Toast.LENGTH_SHORT).show(); + // } + } + + + + + + + + /** + * Set up the {@link android.app.ActionBar}, if the API is available. + */ + @TargetApi(Build.VERSION_CODES.HONEYCOMB) + private void setupActionBar() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { + getActionBar().setDisplayHomeAsUpEnabled(true); + } + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.verify, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + switch (item.getItemId()) { + case android.R.id.home: + // This ID represents the Home or Up button. In the case of this + // activity, the Up button is shown. Use NavUtils to allow users + // to navigate up one level in the application structure. For + // more details, see the Navigation pattern on Android Design: + // + // http://developer.android.com/design/patterns/navigation.html#up-vs-back + // + NavUtils.navigateUpFromSameTask(this); + return true; + } + return super.onOptionsItemSelected(item); + } + + + public void back(View v) { + Intent i_back=new Intent(Verify.this,MainActivity.class); + startActivity(i_back); + + } + +} diff --git a/Women-Safety-App-master/app/src/main/res/drawable-hdpi/ic_launcher.png b/Women-Safety-App-master/app/src/main/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 00000000..3107f179 Binary files /dev/null and b/Women-Safety-App-master/app/src/main/res/drawable-hdpi/ic_launcher.png differ diff --git a/Women-Safety-App-master/app/src/main/res/drawable-mdpi/ic_launcher.png b/Women-Safety-App-master/app/src/main/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 00000000..69b762b7 Binary files /dev/null and b/Women-Safety-App-master/app/src/main/res/drawable-mdpi/ic_launcher.png differ diff --git a/Women-Safety-App-master/app/src/main/res/drawable-xhdpi/ic_launcher.png b/Women-Safety-App-master/app/src/main/res/drawable-xhdpi/ic_launcher.png new file mode 100644 index 00000000..931b2e32 Binary files /dev/null and b/Women-Safety-App-master/app/src/main/res/drawable-xhdpi/ic_launcher.png differ diff --git a/Women-Safety-App-master/app/src/main/res/drawable-xxhdpi/ic_launcher.png b/Women-Safety-App-master/app/src/main/res/drawable-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..efb1a9e8 Binary files /dev/null and b/Women-Safety-App-master/app/src/main/res/drawable-xxhdpi/ic_launcher.png differ diff --git a/Women-Safety-App-master/app/src/main/res/layout/activity_display.xml b/Women-Safety-App-master/app/src/main/res/layout/activity_display.xml new file mode 100644 index 00000000..644d0d16 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/layout/activity_display.xml @@ -0,0 +1,32 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + tools:context=".Display" > + + + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + + android:text="Shake your phone to TEST." /> + + + + <Button + android:id="@+id/button1" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true" + android:onClick="back" + android:text="Main Menu" /> + + +</RelativeLayout> diff --git a/Women-Safety-App-master/app/src/main/res/layout/activity_instructions.xml b/Women-Safety-App-master/app/src/main/res/layout/activity_instructions.xml new file mode 100644 index 00000000..b4d05744 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/layout/activity_instructions.xml @@ -0,0 +1,40 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + tools:context=".Instructions" > + + <TextView + android:id="@+id/textView1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_centerHorizontal="true" + android:layout_marginTop="16dp" + android:text="INSTRUCTIONS" + android:textAppearance="?android:attr/textAppearanceLarge" /> + + <Button + android:id="@+id/button1" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/help" + android:layout_centerHorizontal="true" + android:layout_marginTop="34dp" + android:onClick="back" + android:text="Main Menu" /> + + <TextView + android:id="@+id/help" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignLeft="@+id/button1" + android:layout_below="@+id/textView1" + android:layout_marginTop="15dp" + android:text="@string/help" /> + +</RelativeLayout> diff --git a/Women-Safety-App-master/app/src/main/res/layout/activity_main.xml b/Women-Safety-App-master/app/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000..195dbc4b --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,50 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + tools:context=".MainActivity" > + + + <Button + android:id="@+id/button1" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_above="@+id/button2" + android:layout_alignLeft="@+id/button2" + android:onClick="register" + android:layout_marginBottom="71dp" + android:text="Register" /> + + <Button + android:id="@+id/button3" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_alignLeft="@+id/button2" + android:layout_below="@+id/button2" + android:onClick="display_no" + android:layout_marginTop="74dp" + android:text="View Registered" /> + + <Button + android:id="@+id/button2" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:onClick="instruct" + android:layout_centerVertical="true" + android:text="Instructions" /> + + <Button + android:id="@+id/button4" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true" + android:onClick="verify" + android:text="Register Your Mobile Number" /> + +</RelativeLayout> diff --git a/Women-Safety-App-master/app/src/main/res/layout/activity_register.xml b/Women-Safety-App-master/app/src/main/res/layout/activity_register.xml new file mode 100644 index 00000000..0040de00 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/layout/activity_register.xml @@ -0,0 +1,85 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + tools:context=".Register" > + + <TextView + android:id="@+id/textView1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentLeft="true" + android:layout_alignParentTop="true" + android:layout_marginTop="64dp" + android:text="Name:" /> + + <TextView + android:id="@+id/textView2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignLeft="@+id/textView1" + android:layout_below="@+id/textView1" + android:layout_marginTop="71dp" + android:text="Number:" /> + + <Button + android:id="@+id/button1" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_below="@+id/textView2" + android:layout_centerHorizontal="true" + android:layout_marginTop="68dp" + android:onClick="storeInDB" + android:text="Save" /> + + <EditText + android:id="@+id/editText2" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBaseline="@+id/textView2" + android:layout_alignBottom="@+id/textView2" + android:layout_alignRight="@+id/button1" + android:ems="10" + android:hint="Mobile Number" + android:inputType="phone" /> + + <EditText + android:id="@+id/editText1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBaseline="@+id/textView1" + android:layout_alignBottom="@+id/textView1" + android:layout_alignLeft="@+id/editText2" + android:ems="10" + android:hint="Person Name" + android:inputType="textPersonName" > + + <requestFocus /> + </EditText> + + <Button + android:id="@+id/button2" + style="?android:attr/buttonStyleSmall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignLeft="@+id/button1" + android:layout_alignParentBottom="true" + android:layout_marginBottom="21dp" + android:onClick="instructions" + android:text="Instructions" /> + + <Button + android:id="@+id/button3" + style="?android:attr/buttonStyleSmall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignRight="@+id/button1" + android:layout_alignTop="@+id/button2" + android:onClick="display" + android:text="View Registered" /> + +</RelativeLayout> diff --git a/Women-Safety-App-master/app/src/main/res/layout/activity_verify.xml b/Women-Safety-App-master/app/src/main/res/layout/activity_verify.xml new file mode 100644 index 00000000..3b31109b --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/layout/activity_verify.xml @@ -0,0 +1,46 @@ +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:paddingBottom="@dimen/activity_vertical_margin" + android:paddingLeft="@dimen/activity_horizontal_margin" + android:paddingRight="@dimen/activity_horizontal_margin" + android:paddingTop="@dimen/activity_vertical_margin" + tools:context=".Verify" > + + <Button + android:id="@+id/button1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true" + android:layout_marginBottom="176dp" + android:onClick="verify_no" + android:text="Submit" /> + + <EditText + android:id="@+id/editText1" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_above="@+id/button1" + android:layout_centerHorizontal="true" + android:layout_marginBottom="76dp" + android:ems="10" + android:hint="Your Phone Number" + android:inputType="phone" > + + <requestFocus /> + </EditText> + + <Button + android:id="@+id/button2" + style="?android:attr/buttonStyleSmall" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true" + android:layout_marginBottom="94dp" + android:onClick="back" + android:text="Back" /> + +</RelativeLayout> diff --git a/Women-Safety-App-master/app/src/main/res/menu/display.xml b/Women-Safety-App-master/app/src/main/res/menu/display.xml new file mode 100644 index 00000000..c0020282 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/menu/display.xml @@ -0,0 +1,9 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" > + + <item + android:id="@+id/action_settings" + android:orderInCategory="100" + android:showAsAction="never" + android:title="@string/action_settings"/> + +</menu> diff --git a/Women-Safety-App-master/app/src/main/res/menu/instructions.xml b/Women-Safety-App-master/app/src/main/res/menu/instructions.xml new file mode 100644 index 00000000..c0020282 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/menu/instructions.xml @@ -0,0 +1,9 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" > + + <item + android:id="@+id/action_settings" + android:orderInCategory="100" + android:showAsAction="never" + android:title="@string/action_settings"/> + +</menu> diff --git a/Women-Safety-App-master/app/src/main/res/menu/main.xml b/Women-Safety-App-master/app/src/main/res/menu/main.xml new file mode 100644 index 00000000..c0020282 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/menu/main.xml @@ -0,0 +1,9 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" > + + <item + android:id="@+id/action_settings" + android:orderInCategory="100" + android:showAsAction="never" + android:title="@string/action_settings"/> + +</menu> diff --git a/Women-Safety-App-master/app/src/main/res/menu/register.xml b/Women-Safety-App-master/app/src/main/res/menu/register.xml new file mode 100644 index 00000000..c0020282 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/menu/register.xml @@ -0,0 +1,9 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" > + + <item + android:id="@+id/action_settings" + android:orderInCategory="100" + android:showAsAction="never" + android:title="@string/action_settings"/> + +</menu> diff --git a/Women-Safety-App-master/app/src/main/res/menu/verify.xml b/Women-Safety-App-master/app/src/main/res/menu/verify.xml new file mode 100644 index 00000000..c0020282 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/menu/verify.xml @@ -0,0 +1,9 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" > + + <item + android:id="@+id/action_settings" + android:orderInCategory="100" + android:showAsAction="never" + android:title="@string/action_settings"/> + +</menu> diff --git a/Women-Safety-App-master/app/src/main/res/values-sw600dp/dimens.xml b/Women-Safety-App-master/app/src/main/res/values-sw600dp/dimens.xml new file mode 100644 index 00000000..44f01db7 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/values-sw600dp/dimens.xml @@ -0,0 +1,8 @@ +<resources> + + <!-- + Customize dimensions originally defined in res/values/dimens.xml (such as + screen margins) for sw600dp devices (e.g. 7" tablets) here. + --> + +</resources> diff --git a/Women-Safety-App-master/app/src/main/res/values-sw720dp-land/dimens.xml b/Women-Safety-App-master/app/src/main/res/values-sw720dp-land/dimens.xml new file mode 100644 index 00000000..61e3fa8f --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/values-sw720dp-land/dimens.xml @@ -0,0 +1,9 @@ +<resources> + + <!-- + Customize dimensions originally defined in res/values/dimens.xml (such as + screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. + --> + <dimen name="activity_horizontal_margin">128dp</dimen> + +</resources> diff --git a/Women-Safety-App-master/app/src/main/res/values-v11/styles.xml b/Women-Safety-App-master/app/src/main/res/values-v11/styles.xml new file mode 100644 index 00000000..3c02242a --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/values-v11/styles.xml @@ -0,0 +1,11 @@ +<resources> + + <!-- + Base application theme for API 11+. This theme completely replaces + AppBaseTheme from res/values/styles.xml on API 11+ devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> + <!-- API 11 theme customizations can go here. --> + </style> + +</resources> diff --git a/Women-Safety-App-master/app/src/main/res/values-v14/styles.xml b/Women-Safety-App-master/app/src/main/res/values-v14/styles.xml new file mode 100644 index 00000000..a91fd037 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/values-v14/styles.xml @@ -0,0 +1,12 @@ +<resources> + + <!-- + Base application theme for API 14+. This theme completely replaces + AppBaseTheme from BOTH res/values/styles.xml and + res/values-v11/styles.xml on API 14+ devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"> + <!-- API 14 theme customizations can go here. --> + </style> + +</resources> diff --git a/Women-Safety-App-master/app/src/main/res/values/dimens.xml b/Women-Safety-App-master/app/src/main/res/values/dimens.xml new file mode 100644 index 00000000..55c1e590 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/values/dimens.xml @@ -0,0 +1,7 @@ +<resources> + + <!-- Default screen margins, per the Android Design guidelines. --> + <dimen name="activity_horizontal_margin">16dp</dimen> + <dimen name="activity_vertical_margin">16dp</dimen> + +</resources> diff --git a/Women-Safety-App-master/app/src/main/res/values/strings.xml b/Women-Safety-App-master/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..c4b826c0 --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/values/strings.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <string name="app_name">Women Safety App</string> + <string name="action_settings">Settings</string> + <string name="hello_world">Hello world!</string> + <string name="title_activity_register">Register</string> + <string name="title_activity_display">Display</string> + <string name="title_activity_instructions">Instructions</string> + <string name="title_activity_verify">Verify</string> + <string name="help">Please follow the below steps to setup your account:\n\n\n\t1:Register Your Phone Number.\n\t2:Register Your Guardian Numbers.\n\t3:Always maintain working internet connection.\n\t4:SHAKE your phone in case of emergency to alert your guardians.\n\t\n\n\n\n\tLETS START NOW!</string> + + +</resources> diff --git a/Women-Safety-App-master/app/src/main/res/values/styles.xml b/Women-Safety-App-master/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..6ce89c7b --- /dev/null +++ b/Women-Safety-App-master/app/src/main/res/values/styles.xml @@ -0,0 +1,20 @@ +<resources> + + <!-- + Base application theme, dependent on API level. This theme is replaced + by AppBaseTheme from res/values-vXX/styles.xml on newer devices. + --> + <style name="AppBaseTheme" parent="android:Theme.Light"> + <!-- + Theme customizations available in newer API levels can go in + res/values-vXX/styles.xml, while customizations related to + backward-compatibility can go here. + --> + </style> + + <!-- Application theme. --> + <style name="AppTheme" parent="AppBaseTheme"> + <!-- All customizations that are NOT specific to a particular API-level can go here. --> + </style> + +</resources> diff --git a/Women-Safety-App-master/build.gradle b/Women-Safety-App-master/build.gradle new file mode 100644 index 00000000..72ca4796 --- /dev/null +++ b/Women-Safety-App-master/build.gradle @@ -0,0 +1,15 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:v7.4.2' + } +} + +allprojects { + repositories { + jcenter() + } +} diff --git a/Women-Safety-App-master/gradle/wrapper/gradle-wrapper.jar b/Women-Safety-App-master/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..e708b1c0 Binary files /dev/null and b/Women-Safety-App-master/gradle/wrapper/gradle-wrapper.jar differ diff --git a/Women-Safety-App-master/gradle/wrapper/gradle-wrapper.properties b/Women-Safety-App-master/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..9880436d --- /dev/null +++ b/Women-Safety-App-master/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Wed May 18 20:29:30 IST 2022 +distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionPath=wrapper/dists +zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/Women-Safety-App-master/gradlew b/Women-Safety-App-master/gradlew new file mode 100644 index 00000000..4f906e0c --- /dev/null +++ b/Women-Safety-App-master/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/Women-Safety-App-master/gradlew.bat b/Women-Safety-App-master/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/Women-Safety-App-master/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/Women-Safety-App-master/import-summary.txt b/Women-Safety-App-master/import-summary.txt new file mode 100644 index 00000000..c7ea452c --- /dev/null +++ b/Women-Safety-App-master/import-summary.txt @@ -0,0 +1,51 @@ +ECLIPSE ANDROID PROJECT IMPORT SUMMARY +====================================== + +Ignored Files: +-------------- +The following files were *not* copied into the new Gradle project; you +should evaluate whether these are still needed in your project and if +so manually move them: + +* .DS_Store +* .gitignore +* LICENSE +* README.md +* ic_launcher-web.png +* proguard-project.txt + +Replaced Jars with Dependencies: +-------------------------------- +The importer recognized the following .jar files as third party +libraries and replaced them with Gradle dependencies instead. This has +the advantage that more explicit version information is known, and the +libraries can be updated automatically. However, it is possible that +the .jar file in your project was of an older version than the +dependency we picked, which could render the project not compileable. +You can disable the jar replacement in the import wizard and try again: + +android-support-v4.jar => com.android.support:support-v4:19.1.0 + +Moved Files: +------------ +Android Gradle projects use a different directory structure than ADT +Eclipse projects. Here's how the projects were restructured: + +* AndroidManifest.xml => app/src/main/AndroidManifest.xml +* res/ => app/src/main/res/ +* src/ => app/src/main/java/ + +Next Steps: +----------- +You can now build the project. The Gradle project needs network +connectivity to download dependencies. + +Bugs: +----- +If for some reason your project does not build, and you determine that +it is due to a bug or limitation of the Eclipse to Gradle importer, +please file a bug at http://b.android.com with category +Component-Tools. + +(This import summary is for your information only, and can be deleted +after import once you are satisfied with the results.) diff --git a/Women-Safety-App-master/local.properties b/Women-Safety-App-master/local.properties new file mode 100644 index 00000000..83b0d72f --- /dev/null +++ b/Women-Safety-App-master/local.properties @@ -0,0 +1,7 @@ +## This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# +#Wed May 18 20:29:30 IST 2022 +sdk.dir=/Users/vashuagarwal/Library/Android/sdk diff --git a/Women-Safety-App-master/settings.gradle b/Women-Safety-App-master/settings.gradle new file mode 100644 index 00000000..e7b4def4 --- /dev/null +++ b/Women-Safety-App-master/settings.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/Word Guess Game/word_guess_game.java b/Word Guess Game/word_guess_game.java new file mode 100644 index 00000000..fce3ecb9 --- /dev/null +++ b/Word Guess Game/word_guess_game.java @@ -0,0 +1,59 @@ +import java.util.Random; +import java.util.Scanner; + +public class RandomWordGuessingGame { + public static void main(String[] args) { + String[] words = {"apple", "banana", "chocolate", "elephant", "giraffe"}; + Random random = new Random(); + String targetWord = words[random.nextInt(words.length)]; + String currentGuess = maskWord(targetWord); + int numberOfTries = 0; + + Scanner scanner = new Scanner(System.in); + + System.out.println("Welcome to the Random Word Guessing Game!"); + System.out.println("Can you guess the word? Let's get started!"); + + while (!currentGuess.equals(targetWord)) { + System.out.println("Current Guess: " + currentGuess); + System.out.print("Enter a letter: "); + String letter = scanner.next().toLowerCase(); + + if (letter.length() != 1 || !Character.isLetter(letter.charAt(0))) { + System.out.println("Please enter a single letter."); + continue; + } + + if (targetWord.contains(letter)) { + currentGuess = updateCurrentGuess(targetWord, currentGuess, letter); + System.out.println("Good guess!"); + } else { + System.out.println("Sorry, that letter is not in the word."); + } + + numberOfTries++; + } + + System.out.println("Congratulations! You guessed the word '" + targetWord + "' in " + numberOfTries + " tries."); + } + + // Mask the target word with underscores. + private static String maskWord(String word) { + StringBuilder maskedWord = new StringBuilder(); + for (int i = 0; i < word.length(); i++) { + maskedWord.append('_'); + } + return maskedWord.toString(); + } + + // Update the current guess with correctly guessed letters. + private static String updateCurrentGuess(String target, String currentGuess, String letter) { + StringBuilder updatedGuess = new StringBuilder(currentGuess); + for (int i = 0; i < target.length(); i++) { + if (target.charAt(i) == letter.charAt(0)) { + updatedGuess.setCharAt(i, letter.charAt(0)); + } + } + return updatedGuess.toString(); + } +} diff --git a/Word Riddle Game/word_riddle_game.java b/Word Riddle Game/word_riddle_game.java new file mode 100644 index 00000000..6b35d4c2 --- /dev/null +++ b/Word Riddle Game/word_riddle_game.java @@ -0,0 +1,43 @@ +import java.util.Scanner; + +public class WordRiddleGame { + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + // Define a list of riddles and their answers + String[] riddles = { + "I am taken from a mine, and shut up in a wooden case, from which I am never released, and yet I am used by almost every person. What am I?", + "I speak without a mouth and hear without ears. I have no body, but I come alive with the wind. What am I?", + // Add more riddles here + }; + String[] answers = { + "Pencil", + "Echo", + // Add more answers here + }; + + // Game loop + for (int i = 0; i < riddles.length; i++) { + System.out.println("Riddle " + (i + 1) + ": " + riddles[i]); + System.out.print("Your answer: "); + String userAnswer = scanner.nextLine(); + + if (userAnswer.equalsIgnoreCase(answers[i])) { + System.out.println("Correct! You solved the riddle."); + } else { + System.out.println("Incorrect. The answer is: " + answers[i]); + } + + // Ask if the player wants to play another riddle + System.out.print("Do you want to play another riddle? (yes/no): "); + String playAgain = scanner.nextLine().toLowerCase(); + if (!playAgain.equals("yes")) { + break; // Exit the game if the user doesn't want to play again + } + } + + System.out.println("Thanks for playing!"); + scanner.close(); + } +} diff --git a/Zeros and One's Pattern/ZerosAndOnesPattern.java b/Zeros and One's Pattern/ZerosAndOnesPattern.java new file mode 100644 index 00000000..c2d391cc --- /dev/null +++ b/Zeros and One's Pattern/ZerosAndOnesPattern.java @@ -0,0 +1,21 @@ +import java.util.Scanner; + +public class ZerosAndOnesPattern { + public static void main(String[] args) { + Scanner scan = new Scanner(System.in); + + System.out.print("Enter the size of Row: "); + int row = scan.nextInt(); + + for (int i = 1; i <= row; i++) { + for (int j = 1; j <= i; j++) { + if (j % 2 == 0) { + System.out.print(0); + } else { + System.out.print(1); + } + } + System.out.println(); + } + } +} diff --git a/Zigzag_Conversion.java b/Zigzag_Conversion.java new file mode 100644 index 00000000..7d708e94 --- /dev/null +++ b/Zigzag_Conversion.java @@ -0,0 +1,19 @@ +class Solution { +public String convert(String s, int nRows) { + char[] c = s.toCharArray(); + int len = c.length; + StringBuffer[] sb = new StringBuffer[nRows]; + for (int i = 0; i < sb.length; i++) sb[i] = new StringBuffer(); + + int i = 0; + while (i < len) { + for (int idx = 0; idx < nRows && i < len; idx++) // vertically down + sb[idx].append(c[i++]); + for (int idx = nRows-2; idx >= 1 && i < len; idx--) // obliquely up + sb[idx].append(c[i++]); + } + for (int idx = 1; idx < sb.length; idx++) + sb[0].append(sb[idx]); + return sb[0].toString(); +} +} diff --git a/addElementinlinkedList b/addElementinlinkedList new file mode 100644 index 00000000..68895c6d --- /dev/null +++ b/addElementinlinkedList @@ -0,0 +1,53 @@ + +import java.util.Scanner; + +public class insertioninSortedLL { + public static class Node { + int data; + Node next; + Node(int data) { + this.data = data; + } + } + public static class Linkedlist2 { + Node head = null; + Node tail = null; + + void display() { + Node temp = head; + while (temp != null) { + System.out.print(temp.data + " "); + temp = temp.next; + } + System.out.println(); + } + void toAddElement(int val) { // + Node n = new Node(val); + Node temp = head; + Node prev = null; + while(temp!=null){ + if(temp.data>val)break; + prev=temp; + temp=temp.next; + } + if(prev!=null){ + Node cur=prev.next; + prev.next=n; + n.next=cur; + } else { + n.next=head; + head=n; + } + } + } + public static void main(String[] args) { + Scanner sc =new Scanner(System.in); + Linkedlist2 obj = new Linkedlist2(); + for(int i =1;i<=5;i++){ + System.out.println("enter the number "); + int n =sc.nextInt(); + obj. toAddElement(n); + } + obj. display(); + } +} diff --git a/address.dat b/address.dat new file mode 100644 index 00000000..5aa382a2 Binary files /dev/null and b/address.dat differ diff --git a/addressbook.java b/addressbook.java new file mode 100644 index 00000000..6c26643f --- /dev/null +++ b/addressbook.java @@ -0,0 +1,93 @@ +import java.util.ArrayList; +import java.util.Scanner; + +class Contact { + private String name; + private String phoneNumber; + private String email; + + public Contact(String name, String phoneNumber, String email) { + this.name = name; + this.phoneNumber = phoneNumber; + this.email = email; + } + + public String getName() { + return name; + } + + public String getPhoneNumber() { + return phoneNumber; + } + + public String getEmail() { + return email; + } + + @Override + public String toString() { + return "Name: " + name + "\nPhone: " + phoneNumber + "\nEmail: " + email; + } +} + +public class AddressBook { + public static void main(String[] args) { + ArrayList<Contact> contacts = new ArrayList<>(); + Scanner scanner = new Scanner(System.in); + + while (true) { + System.out.println("\nAddress Book Menu:"); + System.out.println("1. Add Contact"); + System.out.println("2. View All Contacts"); + System.out.println("3. Search Contact by Name"); + System.out.println("4. Edit Contact"); + System.out.println("5. Delete Contact"); + System.out.println("6. Exit"); + System.out.print("Select an option: "); + + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume newline + + switch (choice) { + case 1: + System.out.print("Enter Name: "); + String name = scanner.nextLine(); + System.out.print("Enter Phone Number: "); + String phoneNumber = scanner.nextLine(); + System.out.print("Enter Email: "); + String email = scanner.nextLine(); + contacts.add(new Contact(name, phoneNumber, email)); + System.out.println("Contact added successfully!"); + break; + case 2: + System.out.println("All Contacts:"); + for (Contact contact : contacts) { + System.out.println(contact); + } + break; + case 3: + System.out.print("Enter Name to Search: "); + String searchName = scanner.nextLine(); + for (Contact contact : contacts) { + if (contact.getName().equalsIgnoreCase(searchName)) { + System.out.println(contact); + break; + } + } + break; + case 4: + // Implement editing a contact + break; + case 5: + // Implement deleting a contact + break; + case 6: + System.out.println("Goodbye!"); + System.exit(0); + break; + default: + System.out.println("Invalid option. Please select a valid option."); + } + } + } +} diff --git a/admin.db b/admin.db new file mode 100644 index 00000000..0454b94e Binary files /dev/null and b/admin.db differ diff --git a/alaram-clock.java b/alaram-clock.java new file mode 100644 index 00000000..8cb04c5c --- /dev/null +++ b/alaram-clock.java @@ -0,0 +1,25 @@ +import java.util.Timer; +import java.util.TimerTask; +import java.text.SimpleDateFormat; +import java.util.Date; + +public class AlarmClock { + + public static void main(String[] args) { + // Set the alarm time (24-hour format) + String alarmTime = "15:30"; // Change this to your desired alarm time + + // Create a timer + Timer timer = new Timer(); + + // Define a task to be executed when the alarm time is reached + TimerTask task = new TimerTask() { + public void run() { + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); + String currentTime = sdf.format(new Date()); + if (currentTime.equals(alarmTime)) { + System.out.println("Alarm! It's time to wake up!"); + // You can replace the message with any action you want + } + } + }; \ No newline at end of file diff --git a/app/.gradle/7.4.2/checksums/checksums.lock b/app/.gradle/7.4.2/checksums/checksums.lock new file mode 100644 index 00000000..dd9cd579 Binary files /dev/null and b/app/.gradle/7.4.2/checksums/checksums.lock differ diff --git a/app/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock b/app/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock new file mode 100644 index 00000000..8e36a26f Binary files /dev/null and b/app/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock differ diff --git a/app/.gradle/7.4.2/dependencies-accessors/gc.properties b/app/.gradle/7.4.2/dependencies-accessors/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/app/.gradle/7.4.2/fileChanges/last-build.bin b/app/.gradle/7.4.2/fileChanges/last-build.bin new file mode 100644 index 00000000..f76dd238 Binary files /dev/null and b/app/.gradle/7.4.2/fileChanges/last-build.bin differ diff --git a/app/.gradle/7.4.2/fileHashes/fileHashes.lock b/app/.gradle/7.4.2/fileHashes/fileHashes.lock new file mode 100644 index 00000000..773c38d5 Binary files /dev/null and b/app/.gradle/7.4.2/fileHashes/fileHashes.lock differ diff --git a/app/.gradle/7.4.2/gc.properties b/app/.gradle/7.4.2/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/app/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/app/.gradle/buildOutputCleanup/buildOutputCleanup.lock new file mode 100644 index 00000000..b6a33e25 Binary files /dev/null and b/app/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/app/.gradle/buildOutputCleanup/cache.properties b/app/.gradle/buildOutputCleanup/cache.properties new file mode 100644 index 00000000..01438d28 --- /dev/null +++ b/app/.gradle/buildOutputCleanup/cache.properties @@ -0,0 +1,2 @@ +#Tue Oct 17 20:55:57 IST 2023 +gradle.version=7.4.2 diff --git a/app/.gradle/vcs-1/gc.properties b/app/.gradle/vcs-1/gc.properties new file mode 100644 index 00000000..e69de29b diff --git a/app/build.gradle b/app/build.gradle new file mode 100644 index 00000000..4c11ebc7 --- /dev/null +++ b/app/build.gradle @@ -0,0 +1,39 @@ +plugins { + id 'com.android.application' +} + +android { + namespace 'com.bibo.bmicalculator' + compileSdk 33 + + defaultConfig { + applicationId "com.bibo.bmicalculator" + minSdk 24 + targetSdk 33 + versionCode 1 + versionName "1.0" + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.5.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/src/androidTest/java/com/bibo/bmicalculator/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/bibo/bmicalculator/ExampleInstrumentedTest.java new file mode 100644 index 00000000..a91b40b8 --- /dev/null +++ b/app/src/androidTest/java/com/bibo/bmicalculator/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package com.bibo.bmicalculator; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("com.bibo.bmicalculator", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a1721d81 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools"> + + <application + android:allowBackup="true" + android:dataExtractionRules="@xml/data_extraction_rules" + android:fullBackupContent="@xml/backup_rules" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + android:theme="@style/Theme.BmiCalculator" + tools:targetApi="31"> + <activity + android:name=".MainActivity" + android:exported="true"> + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> \ No newline at end of file diff --git a/app/src/main/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png new file mode 100644 index 00000000..dfcc53cd Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ diff --git a/app/src/main/java/com/bibo/bmicalculator/MainActivity.java b/app/src/main/java/com/bibo/bmicalculator/MainActivity.java new file mode 100644 index 00000000..9f24d281 --- /dev/null +++ b/app/src/main/java/com/bibo/bmicalculator/MainActivity.java @@ -0,0 +1,76 @@ +package com.bibo.bmicalculator; + +import androidx.appcompat.app.AppCompatActivity; + +import android.annotation.SuppressLint; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; +import android.widget.LinearLayout; +import android.widget.TextView; + +public class MainActivity extends AppCompatActivity { + + @SuppressLint({"MissingInflatedId", "SetTextI18n"}) + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + EditText edtweight, edtage,edtheightft,edtheightIn,edtname; + Button button1; + TextView result; + LinearLayout llmaincolor; + + edtweight=findViewById(R.id.edtweight); +// edtage=findViewById(R.id.edtage); +// edtname=findViewById(R.id.edtname); + edtheightft=findViewById(R.id.edtheightft); + edtheightIn=findViewById(R.id.edtheightin); + button1=findViewById(R.id.but1); + llmaincolor=findViewById(R.id.llmain); + result=findViewById(R.id.result); + + button1.setOnClickListener(view -> { + int wt=Integer.parseInt(edtweight.getText().toString()); + int In=Integer.parseInt(edtheightIn.getText().toString()); + int ft=Integer.parseInt(edtheightft.getText().toString()); +// String name=edtname.getText().toString(); +// int age=Integer.parseInt(edtage.getText().toString()); +// double hegFt=ft*12*2.54*0.01; +// double hegIn=In*2.54*0.01; + int totalIn=ft*12+In; + double total_height_meter=totalIn*2.54*0.01; + double res= wt/(total_height_meter*total_height_meter); + if (wt>0 && ft>0 ) { + + + if (res>25){ + result.setText("You are overweight!."); + llmaincolor.setBackgroundColor(getResources().getColor(R.color.llmain)); + }else if(res<18){ + result.setText("your are underweight!."); + llmaincolor.setBackgroundColor(getResources().getColor(R.color.llmainlessweight)); + + }else{ + result.setText("You are healthy!"); + llmaincolor.setBackgroundColor(getResources().getColor(R.color.llmainhealthy)); + } + + + }else{ + if (wt<=0 && ft>0){ + result.setText("Body Weight should not be 0. "); + + } else if (ft<=0 && wt>=0) { + result.setText("Height should not be 0 "); + + } else { + result.setText("Body Weight and Height should not be 0 "); + } + }}); + + + + } +} \ No newline at end of file diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml new file mode 100644 index 00000000..2b068d11 --- /dev/null +++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml @@ -0,0 +1,30 @@ +<vector xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:aapt="http://schemas.android.com/aapt" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z"> + <aapt:attr name="android:fillColor"> + <gradient + android:endX="85.84757" + android:endY="92.4963" + android:startX="42.9492" + android:startY="49.59793" + android:type="linear"> + <item + android:color="#44000000" + android:offset="0.0" /> + <item + android:color="#00000000" + android:offset="1.0" /> + </gradient> + </aapt:attr> + </path> + <path + android:fillColor="#FFFFFF" + android:fillType="nonZero" + android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" + android:strokeWidth="1" + android:strokeColor="#00000000" /> +</vector> \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml new file mode 100644 index 00000000..07d5da9c --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_background.xml @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="108dp" + android:height="108dp" + android:viewportWidth="108" + android:viewportHeight="108"> + <path + android:fillColor="#3DDC84" + android:pathData="M0,0h108v108h-108z" /> + <path + android:fillColor="#00000000" + android:pathData="M9,0L9,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,0L19,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,0L29,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,0L39,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,0L49,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,0L59,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,0L69,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,0L79,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M89,0L89,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M99,0L99,108" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,9L108,9" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,19L108,19" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,29L108,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,39L108,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,49L108,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,59L108,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,69L108,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,79L108,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,89L108,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M0,99L108,99" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,29L89,29" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,39L89,39" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,49L89,49" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,59L89,59" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,69L89,69" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M19,79L89,79" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M29,19L29,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M39,19L39,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M49,19L49,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M59,19L59,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M69,19L69,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> + <path + android:fillColor="#00000000" + android:pathData="M79,19L79,89" + android:strokeWidth="0.8" + android:strokeColor="#33FFFFFF" /> +</vector> diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml new file mode 100644 index 00000000..db55fb88 --- /dev/null +++ b/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical" + android:id="@+id/llmain" + android:gravity="center" + tools:context=".MainActivity"> + + +<!-- <EditText--> +<!-- android:layout_width="wrap_content"--> +<!-- android:layout_height="wrap_content"--> +<!-- android:inputType="text"--> +<!-- android:hint="@string/edtname"--> +<!-- android:id="@+id/edtname"--> +<!-- android:ems="10" />--> + + +<!-- <EditText--> +<!-- android:layout_width="wrap_content"--> +<!-- android:layout_height="wrap_content"--> +<!-- android:hint="@string/edtext3"--> +<!-- android:id="@+id/edtage"--> +<!-- android:inputType="number"--> +<!-- android:ems="10"/>--> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + + android:layout_marginBottom="55dp" + android:text="@string/weltext" + android:textSize="30dp" + android:textColor="@color/black" + android:textStyle="bold"/> + + <EditText + android:id="@+id/edtweight" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:ems="10" + android:hint="@string/edtext2" + android:inputType="number" /> + + <EditText + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:inputType="number" + android:id="@+id/edtheightft" + android:hint="@string/edtextft" + android:ems="10" /> + + <EditText + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:inputType="number" + android:id="@+id/edtheightin" + android:hint="@string/edtextin" + android:ems="10" /> + <Button + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="Calculate BMI" + android:layout_marginTop="11dp" + android:id="@+id/but1" + android:ems="13" + /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:id="@+id/result" + android:text="_____Results_____" + android:ems="8" + android:layout_marginTop="16dp" + android:textSize="25dp" + android:textStyle="bold" + android:layout_marginLeft="12dp" + /> + +</LinearLayout> diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@color/ic_launcher_background"/> + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> +</adaptive-icon> \ No newline at end of file diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..036d09bc --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> + <background android:drawable="@color/ic_launcher_background"/> + <foreground android:drawable="@mipmap/ic_launcher_foreground"/> +</adaptive-icon> \ No newline at end of file diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..a7cabff2 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..959f180a Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..4e5cc1aa Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..97518527 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..447a31d5 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..61db097a Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..5ce80205 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..5e24d25f Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..727e8354 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..039c6f9d Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..3da5ceb3 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..6cba5dc1 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..089366fe Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png new file mode 100644 index 00000000..4f47038e Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..2947e6a8 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml new file mode 100644 index 00000000..17abd4ec --- /dev/null +++ b/app/src/main/res/values-night/themes.xml @@ -0,0 +1,7 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Base.Theme.BmiCalculator" parent="Theme.Material3.DayNight.NoActionBar"> + <!-- Customize your dark theme here. --> + <!-- <item name="colorPrimary">@color/my_dark_primary</item> --> + </style> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml new file mode 100644 index 00000000..588dac93 --- /dev/null +++ b/app/src/main/res/values/colors.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="black">#FF000000</color> + <color name="white">#FFFFFFFF</color> + <color name="llmain">#E3352F</color> + <color name="llmainhealthy">#17B542</color> + <color name="llmainlessweight">#ECEC57</color> + <color name="pinky">#B5BDB5</color> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 00000000..55b08d6c --- /dev/null +++ b/app/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <color name="ic_launcher_background">#DC3D3D</color> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..6155f8c0 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,10 @@ +<resources> + <string name="app_name">Bmi calculator</string> + <string name="edtextft">Enter your height(Ft)</string> + <string name="edtextin">Enter your height(In)</string> + <string name="edtext2">Enter your weight</string> + <string name="edtext3">Enter your age</string> +<string name="edtname">Enter your Name</string> + <string name="weltext">BMI Calculator </string> + <string name="weltextdwn">___Calculator___ </string> +</resources> \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 00000000..880e6db2 --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,9 @@ +<resources xmlns:tools="http://schemas.android.com/tools"> + <!-- Base application theme. --> + <style name="Base.Theme.BmiCalculator" parent="Theme.Material3.DayNight.NoActionBar"> + <!-- Customize your light theme here. --> + <!-- <item name="colorPrimary">@color/my_light_primary</item> --> + </style> + + <style name="Theme.BmiCalculator" parent="Base.Theme.BmiCalculator" /> +</resources> \ No newline at end of file diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml new file mode 100644 index 00000000..fa0f996d --- /dev/null +++ b/app/src/main/res/xml/backup_rules.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Sample backup rules file; uncomment and customize as necessary. + See https://developer.android.com/guide/topics/data/autobackup + for details. + Note: This file is ignored for devices older that API 31 + See https://developer.android.com/about/versions/12/backup-restore +--> +<full-backup-content> + <!-- + <include domain="sharedpref" path="."/> + <exclude domain="sharedpref" path="device.xml"/> +--> +</full-backup-content> \ No newline at end of file diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 00000000..9ee9997b --- /dev/null +++ b/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?><!-- + Sample data extraction rules file; uncomment and customize as necessary. + See https://developer.android.com/about/versions/12/backup-restore#xml-changes + for details. +--> +<data-extraction-rules> + <cloud-backup> + <!-- TODO: Use <include> and <exclude> to control what is backed up. + <include .../> + <exclude .../> + --> + </cloud-backup> + <!-- + <device-transfer> + <include .../> + <exclude .../> + </device-transfer> + --> +</data-extraction-rules> \ No newline at end of file diff --git a/app/src/test/java/com/bibo/bmicalculator/ExampleUnitTest.java b/app/src/test/java/com/bibo/bmicalculator/ExampleUnitTest.java new file mode 100644 index 00000000..72a05737 --- /dev/null +++ b/app/src/test/java/com/bibo/bmicalculator/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package com.bibo.bmicalculator; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file diff --git a/appletComs.java b/appletComs.java new file mode 100644 index 00000000..371f046f --- /dev/null +++ b/appletComs.java @@ -0,0 +1,21 @@ +import java.applet.*; +import java.awt.*; +import java.awt.event.*; +public class ContextApplet extends Applet implements ActionListener{ +Button b; + +public void init(){ +b=new Button("Click"); +b.setBounds(50,50,60,50); + +add(b); +b.addActionListener(this); +} + +public void actionPerformed(ActionEvent e){ + +AppletContext ctx=getAppletContext(); +Applet a=ctx.getApplet("app2"); +a.setBackground(Color.yellow); +} +} diff --git a/appletQuiz.java b/appletQuiz.java new file mode 100644 index 00000000..534f1cbf --- /dev/null +++ b/appletQuiz.java @@ -0,0 +1,187 @@ +*Online Java Paper Test*/ + +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; + +class OnlineTest extends JFrame implements ActionListener +{ + JLabel l; + JRadioButton jb[]=new JRadioButton[5]; + JButton b1,b2; + ButtonGroup bg; + int count=0,current=0,x=1,y=1,now=0; + int m[]=new int[10]; + OnlineTest(String s) + { + super(s); + l=new JLabel(); + add(l); + bg=new ButtonGroup(); + for(int i=0;i<5;i++) + { + jb[i]=new JRadioButton(); + add(jb[i]); + bg.add(jb[i]); + } + b1=new JButton("Next"); + b2=new JButton("Bookmark"); + b1.addActionListener(this); + b2.addActionListener(this); + add(b1);add(b2); + set(); + l.setBounds(30,40,450,20); + jb[0].setBounds(50,80,100,20); + jb[1].setBounds(50,110,100,20); + jb[2].setBounds(50,140,100,20); + jb[3].setBounds(50,170,100,20); + b1.setBounds(100,240,100,30); + b2.setBounds(270,240,100,30); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setLayout(null); + setLocation(250,100); + setVisible(true); + setSize(600,350); + } + public void actionPerformed(ActionEvent e) + { + if(e.getSource()==b1) + { + if(check()) + count=count+1; + current++; + set(); + if(current==9) + { + b1.setEnabled(false); + b2.setText("Result"); + } + } + if(e.getActionCommand().equals("Bookmark")) + { + JButton bk=new JButton("Bookmark"+x); + bk.setBounds(480,20+30*x,100,30); + add(bk); + bk.addActionListener(this); + m[x]=current; + x++; + current++; + set(); + if(current==9) + b2.setText("Result"); + setVisible(false); + setVisible(true); + } + for(int i=0,y=1;i<x;i++,y++) + { + if(e.getActionCommand().equals("Bookmark"+y)) + { + if(check()) + count=count+1; + now=current; + current=m[y]; + set(); + ((JButton)e.getSource()).setEnabled(false); + current=now; + } + } + + if(e.getActionCommand().equals("Result")) + { + if(check()) + count=count+1; + current++; + //System.out.println("correct ans="+count); + JOptionPane.showMessageDialog(this,"correct ans="+count); + System.exit(0); + } + } + void set() + { + jb[4].setSelected(true); + if(current==0) + { + l.setText("Que1: Which one among these is not a primitive datatype?"); + jb[0].setText("int");jb[1].setText("Float");jb[2].setText("boolean");jb[3].setText("char"); + } + if(current==1) + { + l.setText("Que2: Which class is available to all the class automatically?"); + jb[0].setText("Swing");jb[1].setText("Applet");jb[2].setText("Object");jb[3].setText("ActionEvent"); + } + if(current==2) + { + l.setText("Que3: Which package is directly available to our class without importing it?"); + jb[0].setText("swing");jb[1].setText("applet");jb[2].setText("net");jb[3].setText("lang"); + } + if(current==3) + { + l.setText("Que4: String class is defined in which package?"); + jb[0].setText("lang");jb[1].setText("Swing");jb[2].setText("Applet");jb[3].setText("awt"); + } + if(current==4) + { + l.setText("Que5: Which institute is best for java coaching?"); + jb[0].setText("Utek");jb[1].setText("Aptech");jb[2].setText("SSS IT");jb[3].setText("jtek"); + } + if(current==5) + { + l.setText("Que6: Which one among these is not a keyword?"); + jb[0].setText("class");jb[1].setText("int");jb[2].setText("get");jb[3].setText("if"); + } + if(current==6) + { + l.setText("Que7: Which one among these is not a class? "); + jb[0].setText("Swing");jb[1].setText("Actionperformed");jb[2].setText("ActionEvent"); + jb[3].setText("Button"); + } + if(current==7) + { + l.setText("Que8: which one among these is not a function of Object class?"); + jb[0].setText("toString");jb[1].setText("finalize");jb[2].setText("equals"); + jb[3].setText("getDocumentBase"); + } + if(current==8) + { + l.setText("Que9: which function is not present in Applet class?"); + jb[0].setText("init");jb[1].setText("main");jb[2].setText("start");jb[3].setText("destroy"); + } + if(current==9) + { + l.setText("Que10: Which one among these is not a valid component?"); + jb[0].setText("JButton");jb[1].setText("JList");jb[2].setText("JButtonGroup"); + jb[3].setText("JTextArea"); + } + l.setBounds(30,40,450,20); + for(int i=0,j=0;i<=90;i+=30,j++) + jb[j].setBounds(50,80+i,200,20); + } + boolean check() + { + if(current==0) + return(jb[1].isSelected()); + if(current==1) + return(jb[2].isSelected()); + if(current==2) + return(jb[3].isSelected()); + if(current==3) + return(jb[0].isSelected()); + if(current==4) + return(jb[2].isSelected()); + if(current==5) + return(jb[2].isSelected()); + if(current==6) + return(jb[1].isSelected()); + if(current==7) + return(jb[3].isSelected()); + if(current==8) + return(jb[1].isSelected()); + if(current==9) + return(jb[2].isSelected()); + return false; + } + public static void main(String s[]) + { + new OnlineTest("Online Test Of Java"); + } +} diff --git a/attendance_percent.java b/attendance_percent.java new file mode 100644 index 00000000..a466d5a2 --- /dev/null +++ b/attendance_percent.java @@ -0,0 +1,24 @@ +import java.util.*; + +public class AttendancePercentage { + + public static void main(String[] args) { + + // Create an array to store the attendance data + int[] attendanceData = {1,1,1,0,1,1,1,1,1,1,0,0,1,1,1,0,1,1,1,0,1}; + + // Calculate the total number of classes attended + int totalClassesAttended = 0; + for (int attendance : attendanceData) { + if (attendance == 1) { + totalClassesAttended++; + } + } + + // Calculate the attendance percentage + double attendancePercentage = (double) totalClassesAttended / attendanceData.length * 100; + + // Display the attendance percentage + System.out.println("The attendance percentage is " + attendancePercentage + "%"); + } +} diff --git a/bank account.java b/bank account.java new file mode 100644 index 00000000..f33aa77e --- /dev/null +++ b/bank account.java @@ -0,0 +1,43 @@ +class bank_account{ + int account_no; + String name,type; + float amount; + +void account_details(int bank_account,String nameOfCustomer,String typeName,float amout_details){ + account_no=bank_account; + name=nameOfCustomer; + type=typeName; + amount=amout_details; +} +void show(){ + System.out.println(account_no+" "+name+" "+type+" "+amount+" "); +} +void deposit(float d){ + amount+=d; + System.out.println("Deposit amount: "+d); +} +void withdraw(float d){ + if(amount>d){ + amount-=d; + System.out.println("withdraw amount: "+d); + } + else{ + System.out.println("Insufficient balance"); + } + } +void get_account_balance(){ + System.out.println("Your balance is: "+amount); + +} +} +class bank{ + public static void main(String[] args) { + bank_account n = new bank_account(); + n.account_details(123456, "kritika", "saving", 1000); + n.show(); + n.deposit(40000); + n.get_account_balance(); + n.withdraw(10000); + n.get_account_balance(); + } +} diff --git a/banking application/Prerequisites.md b/banking application/Prerequisites.md new file mode 100644 index 00000000..f0d106c5 --- /dev/null +++ b/banking application/Prerequisites.md @@ -0,0 +1,60 @@ +# Software Prerequisite: + +1. MySQL +2. Eclipse + +## Databases Setup: + +Step 1: Create Database name bank + +Step 2: Create Table name customer + +// Create a database +CREATE DATABASE BANK; + + +// Create table +CREATE TABLE `customer` ( + + `ac_no` int NOT NULL AUTO_INCREMENT, + + `cname` varchar(45) DEFAULT NULL, + + `balance` varchar(45) DEFAULT NULL, + + `pass_code` int DEFAULT NULL, + + PRIMARY KEY (`ac_no`), + + UNIQUE KEY `cname_UNIQUE` (`cname`) + +) ; +## Eclipse Project Setup: + +Create New Project +Create A package name banking + + +## File configuration + +Create a Connection class in the banking package + +## Step 1: Include JDBC Driver for MySQL + +// register jdbc Driver + +String mysqlJDBCDriver = "com.mysql.cj.jdbc.Driver"; + +Class.forName(mysqlJDBCDriver); + +## Step 2: Create Connection Class using MySQL username and password + +// Create Connection + +String url = "jdbc:mysql://localhost:3306/mydata"; + +String user = "root"; + +String pass = "123"; + +con = DriverManager.getConnection(url, user, pass); diff --git a/banking application/bank.java b/banking application/bank.java new file mode 100644 index 00000000..782c9766 --- /dev/null +++ b/banking application/bank.java @@ -0,0 +1,99 @@ +package banking; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; + +public class bank { + public static void main(String args[]) //main class of bank + throws IOException + { + + BufferedReader sc = new BufferedReader( + new InputStreamReader(System.in)); + String name = ""; + int pass_code; + int ac_no; + int ch; + + while (true) { + System.out.println( + "\n ->|| Welcome to InBank ||<- \n"); + System.out.println("1)Create Account"); + System.out.println("2)Login Account"); + + try { + System.out.print("\n Enter Input:"); //user input + ch = Integer.parseInt(sc.readLine()); + + switch (ch) { + case 1: + try { + System.out.print( + "Enter Unique UserName:"); + name = sc.readLine(); + System.out.print( + "Enter New Password:"); + pass_code = Integer.parseInt( + sc.readLine()); + + if (bankManagement.createAccount( + name, pass_code)) { + System.out.println( + "MSG : Account Created Successfully!\n"); + } + else { + System.out.println( + "ERR : Account Creation Failed!\n"); + } + } + catch (Exception e) { + System.out.println( + " ERR : Enter Valid Data::Insertion Failed!\n"); + } + break; + + case 2: + try { + System.out.print( + "Enter UserName:"); + name = sc.readLine(); + System.out.print( + "Enter Password:"); + pass_code = Integer.parseInt( + sc.readLine()); + + if (bankManagement.loginAccount( + name, pass_code)) { + System.out.println( + "MSG : Logout Successfully!\n"); + } + else { + System.out.println( + "ERR : login Failed!\n"); + } + } + catch (Exception e) { + System.out.println( + " ERR : Enter Valid Data::Login Failed!\n"); + } + + break; + + default: + System.out.println("Invalid Entry!\n"); + } + + if (ch == 5) { + System.out.println( + "Exited Successfully!\n\n Thank You :)"); + break; + } + } + catch (Exception e) { + System.out.println("Enter Valid Entry!"); + } + } + sc.close(); + } +} diff --git a/banking application/bankmanagemment.java b/banking application/bankmanagemment.java new file mode 100644 index 00000000..f3cb9a65 --- /dev/null +++ b/banking application/bankmanagemment.java @@ -0,0 +1,229 @@ +package banking; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.SQLIntegrityConstraintViolationException; +import java.sql.Statement; + +public class bankManagement { // these class provides all + // bank method + + private static final int NULL = 0; + + static Connection con = connection.getConnection(); + static String sql = ""; + public static boolean + createAccount(String name, + int passCode) // create account function + { + try { + // validation + if (name == "" || passCode == NULL) { + System.out.println("All Field Required!"); + return false; + } + // query + Statement st = con.createStatement(); + sql = "INSERT INTO customer(cname,balance,pass_code) values('" + + name + "',1000," + passCode + ")"; + + // Execution + if (st.executeUpdate(sql) == 1) { + System.out.println(name + + ", Now You Login!"); + return true; + } + // return + } + catch (SQLIntegrityConstraintViolationException e) { + System.out.println("Username Not Available!"); + } + catch (Exception e) { + e.printStackTrace(); + } + return false; + } + public static boolean + loginAccount(String name, int passCode) // login method + { + try { + // validation + if (name == "" || passCode == NULL) { + System.out.println("All Field Required!"); + return false; + } + // query + sql = "select * from customer where cname='" + + name + "' and pass_code=" + passCode; + PreparedStatement st + = con.prepareStatement(sql); + ResultSet rs = st.executeQuery(); + // Execution + BufferedReader sc = new BufferedReader( + new InputStreamReader(System.in)); + + if (rs.next()) { + // after login menu driven interface method + + int ch = 5; + int amt = 0; + int senderAc = rs.getInt("ac_no"); + ; + int receiveAc; + while (true) { + try { + System.out.println( + "Hallo, " + + rs.getString("cname")); + System.out.println( + "1)Transfer Money"); + System.out.println("2)View Balance"); + System.out.println("5)LogOut"); + + System.out.print("Enter Choice:"); + ch = Integer.parseInt( + sc.readLine()); + if (ch == 1) { + System.out.print( + "Enter Receiver A/c No:"); + receiveAc = Integer.parseInt( + sc.readLine()); + System.out.print( + "Enter Amount:"); + amt = Integer.parseInt( + sc.readLine()); + + if (bankManagement + .transferMoney( + senderAc, receiveAc, + amt)) { + System.out.println( + "MSG : Money Sent Successfully!\n"); + } + else { + System.out.println( + "ERR : Failed!\n"); + } + } + else if (ch == 2) { + + bankManagement.getBalance( + senderAc); + } + else if (ch == 5) { + break; + } + else { + System.out.println( + "Err : Enter Valid input!\n"); + } + } + catch (Exception e) { + e.printStackTrace(); + } + } + } + else { + return false; + } + // return + return true; + } + catch (SQLIntegrityConstraintViolationException e) { + System.out.println("Username Not Available!"); + } + catch (Exception e) { + e.printStackTrace(); + } + return false; + } + public static void + getBalance(int acNo) // fetch balance method + { + try { + + // query + sql = "select * from customer where ac_no=" + + acNo; + PreparedStatement st + = con.prepareStatement(sql); + + ResultSet rs = st.executeQuery(sql); + System.out.println( + "-----------------------------------------------------------"); + System.out.printf("%12s %10s %10s\n", + "Account No", "Name", + "Balance"); + + // Execution + + while (rs.next()) { + System.out.printf("%12d %10s %10d.00\n", + rs.getInt("ac_no"), + rs.getString("cname"), + rs.getInt("balance")); + } + System.out.println( + "-----------------------------------------------------------\n"); + } + catch (Exception e) { + e.printStackTrace(); + } + } + public static boolean transferMoney(int sender_ac, + int reveiver_ac, + int amount) + throws SQLException // transfer money method + { + // validation + if (reveiver_ac == NULL || amount == NULL) { + System.out.println("All Field Required!"); + return false; + } + try { + con.setAutoCommit(false); + sql = "select * from customer where ac_no=" + + sender_ac; + PreparedStatement ps + = con.prepareStatement(sql); + ResultSet rs = ps.executeQuery(); + + if (rs.next()) { + if (rs.getInt("balance") < amount) { + System.out.println( + "Insufficient Balance!"); + return false; + } + } + + Statement st = con.createStatement(); + + // debit + con.setSavepoint(); + + sql = "update customer set balance=balance-" + + amount + " where ac_no=" + sender_ac; + if (st.executeUpdate(sql) == 1) { + System.out.println("Amount Debited!"); + } + + // credit + sql = "update customer set balance=balance+" + + amount + " where ac_no=" + reveiver_ac; + st.executeUpdate(sql); + + con.commit(); + return true; + } + catch (Exception e) { + e.printStackTrace(); + con.rollback(); + } + // return + return false; + } +} diff --git a/banking application/connection.java b/banking application/connection.java new file mode 100644 index 00000000..12deec39 --- /dev/null +++ b/banking application/connection.java @@ -0,0 +1,29 @@ +package banking; + +import java.sql.Connection; +import java.sql.DriverManager; +// Global connection Class +public class connection { + static Connection con; // Global Connection Object + public static Connection getConnection() + { + try { + + + String mysqlJDBCDriver + = "com.mysql.cj.jdbc.Driver"; //jdbc driver + String url + = "jdbc:mysql://localhost:3306/mydata"; //mysql url + String user = "root"; //mysql username + String pass = "Pritesh4@"; //mysql passcode + Class.forName(mysqlJDBCDriver); + con = DriverManager.getConnection(url, user, + pass); + } + catch (Exception e) { + System.out.println("Connection Failed!"); + } + + return con; + } +} diff --git a/bill_739.txt b/bill_739.txt new file mode 100644 index 00000000..123d9b66 --- /dev/null +++ b/bill_739.txt @@ -0,0 +1,27 @@ + + + +=============================================== + No :739 + + EVANZ MEDICAL STORE COMPANY + BINALBAGAN BRANCH, NEGROS OCCIDENTAL + +----------------------------------------------- +Name: July King +Address: brgy.sonedco +----------------------------------------------- +Product Qty. Price +----------------------------------------------- +Solmux 5 0.0 +Solmux 10 85.0 + +----------------------------------------------- +Total 85.0 +Valued customer Discount -17.0 +----------------------------------------------- +Total PHP 68.0 +----------------------------------------------- + +Dealer 's signature:___________________________ +=============================================== diff --git a/bill_919.txt b/bill_919.txt new file mode 100644 index 00000000..b144e315 --- /dev/null +++ b/bill_919.txt @@ -0,0 +1,26 @@ + + + +=============================================== + No :919 + + EVANZ MEDICAL STORE COMPANY + BINALBAGAN BRANCH, NEGROS OCCIDENTAL + +----------------------------------------------- +Name: July King +Address: brgy.sonedco +----------------------------------------------- +Product Qty. Price +----------------------------------------------- +Solmux 5 0.0 + +----------------------------------------------- +Total 0.0 +Valued customer Discount -0.0 +----------------------------------------------- +Total PHP 0.0 +----------------------------------------------- + +Dealer 's signature:___________________________ +=============================================== diff --git a/binToDec.java b/binToDec.java new file mode 100644 index 00000000..fd618d61 --- /dev/null +++ b/binToDec.java @@ -0,0 +1,27 @@ +import java.util.Scanner; + +public class binToDec { + + + public static void binToDecConversion(int binNum){ + int myNum = binNum; + int pow = 0; + int decNum = 0; + + while(binNum > 0){ + int lastDigit = binNum % 10; + decNum = decNum + (lastDigit * (int)Math.pow(2, pow)); + pow++; + + binNum = binNum / 10; + } + System.out.println("decimal of " + myNum + " = " + decNum); + + } + public static void main(String args[]){ + Scanner sc = new Scanner(System.in); + + binToDecConversion(100); + sc.close(); + } +} diff --git a/binary_search.java b/binary_search.java new file mode 100644 index 00000000..e7069670 --- /dev/null +++ b/binary_search.java @@ -0,0 +1,40 @@ +public class BinarySearch { + public static int binarySearch(int[] arr, int target) { + int left = 0; + int right = arr.length - 1; + + while (left <= right) { + int mid = left + (right - left) / 2; + + // If the target is found at the middle index, return it. + if (arr[mid] == target) { + return mid; + } + + // If the target is smaller, search the left half. + if (arr[mid] > target) { + right = mid - 1; + } + // If the target is larger, search the right half. + else { + left = mid + 1; + } + } + + // If the target element is not found, return -1. + return -1; + } + + public static void main(String[] args) { + int[] sortedArray = {1, 3, 5, 7, 9, 11, 13, 15}; + int targetElement = 7; + + int result = binarySearch(sortedArray, targetElement); + + if (result != -1) { + System.out.println("Element " + targetElement + " found at index " + result + "."); + } else { + System.out.println("Element " + targetElement + " not found in the array."); + } + } +} diff --git a/bootstrap b/bootstrap new file mode 160000 index 00000000..b04c9518 --- /dev/null +++ b/bootstrap @@ -0,0 +1 @@ +Subproject commit b04c9518f0fb794a6d0f40686ed4ad00ff79969d diff --git a/breakOutBall.java b/breakOutBall.java new file mode 100644 index 00000000..fd26c314 --- /dev/null +++ b/breakOutBall.java @@ -0,0 +1,296 @@ + + +import javax.swing.JFrame; +import javax.swing.JPanel; + +import java.awt.BasicStroke; +import java.awt.Color; +import java.awt.Font; +import java.awt.Graphics; //The java.awt package in Java provides classes for creating graphical user interfaces (GUIs) and for rendering graphics. The Graphics class is part of this package and provides methods for drawing graphics +import java.awt.Graphics2D; +import java.awt.Rectangle; +import java.awt.event.ActionEvent; +//on components, such as JPanel, JFrame, JLabel, and other Swing components. +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; + +public class breakOutBall { + + public static void main(String[] args) { + JFrame f = new javax.swing.JFrame(); // creating instance of the JFrame + f.setTitle("BreakOut Ball"); // setTitle function used to display the title + f.setSize(700, 600);// sets the window's width and height + f.setLocationRelativeTo(null); // This sets the location of the JFrame to the center of the screen. The null + // argument means that the JFrame should be centered relative to the screen. + f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // This sets the operation that should occur when the user + // closes the JFrame. In this case, the program will exit when + // the JFrame is closed. + f.setVisible(true); // This makes the JFrame visible on the screen. + f.setResizable(false); // This sets whether the user can resize the JFrame. In this case, the false + // argument means that the JFrame cannot be resized by the user. + + GamePlay gamePlay = new GamePlay(); + f.add(gamePlay); + + } +} + +class GamePlay extends JPanel implements ActionListener, KeyListener{ + // in this we have extended means inherited the JPanel Class + // In Java Swing, JPanel is a class that represents a container that can hold + // other Swing components, such as buttons, labels, and text fields. It is a + // lightweight container that is commonly used to organize \ + // and group components within a larger user interface. + + //private static final Graphics2D Graphics2D = null; + + //private static final Graphics2D Graphics2D = null; + + private boolean play = false; // this will not allow user to directlt start the game + + private int totalBricks = 21; // this will set the total no of Bricks at start + + private javax.swing.Timer timer; //The Timer object is used to control the timing of the game, + private int delay = 0; // the delay variable is used to set the time interval between each game frame. + private int ballpoaX = 120; // the delay variable is used to set the time interval between each game frame. + private int ballpoaY = 350; + private int ballXdir = -1;// ballXdir and ballYdir represent the direction that the ball is moving in. + private int ballYdir = -2; + private int playerX = 350; // This variable is used to keep track of the position of the player's paddle in the game. + private MapGenerator map; + private int score = 0; + + public GamePlay() { + //constructor + addKeyListener(this); + setFocusable(true); + setFocusTraversalKeysEnabled(true); + + timer = new javax.swing.Timer(delay, this); + timer.start(); + + map = new MapGenerator(3, 7); + + } + + public void paint(Graphics g) { + //The Graphics class represents a graphics context that can be used to draw lines, shapes, text, and images. The Graphics context is associated with a specific component, and any graphics drawn using the context will be displayed on that component. + + //black canvas + g.setColor(Color.BLACK); + g.fillRect(1, 1, 692, 592); + + + //border + g.setColor(Color.YELLOW); + g.fillRect(0, 0, 692, 3); + g.fillRect(0, 3, 3, 592); + g.fillRect(689, 5, 3, 592); + + //Paddle + g.setColor(Color.GREEN); + g.fillRect(playerX, 550, 100, 8); + + //ball + g.setColor(Color.RED); + g.fillOval(ballpoaX, ballpoaY, 20, 20); + + + //bricks + map.draw((Graphics2D) g); + + //score + g.setColor(Color.GREEN); + g.setFont(new Font("serif", Font.BOLD, 20)); + g.drawString("Score : " + score, 550, 30); + + //gameover + if(ballpoaY >= 570) { + play = false; + ballXdir = 0; + ballYdir = 0; + + g.setColor(Color.GREEN); + g.setFont(new Font("serif", Font.BOLD, 30)); + g.drawString("Game Over !!, Score : "+ score, 200, 300); + + + g.setFont(new Font("serif", Font.BOLD, 25)); + g.drawString("Press Enter to Restart !!", 230, 350); + + + } + //winner + if(totalBricks <= 0) { + play = false; + ballXdir = 0; + ballYdir = 0; + + g.setColor(Color.GREEN); + g.setFont(new Font("serif", Font.BOLD, 30)); + g.drawString("You Won !!, Score : "+ score, 200, 300); + + + g.setFont(new Font("serif", Font.BOLD, 25)); + g.drawString("Press Enter to Restart !!", 230, 350); + + } + + } + + private void moveLeft() { + play = true; + playerX -= 20; + } + private void moveRight() { + play = true; + playerX += 20; + } + + @Override + public void keyPressed(KeyEvent e) { + // + if(e.getKeyCode() == KeyEvent.VK_LEFT) { + if(playerX <=0) { + playerX = 0; + } else { + moveLeft(); + } + + } + + if(e.getKeyCode() == KeyEvent.VK_RIGHT) { + if(playerX>=600) { + playerX=600; + } else { + moveRight(); + } + + } + + if(e.getKeyCode() == KeyEvent.VK_ENTER) { + if(!play) { + score = 0; + totalBricks = 21; + ballpoaX = 120; + ballpoaY = 350; + ballXdir = -1; + ballYdir = -2; + playerX = 320; + + map = new MapGenerator(3, 7); + } + } + repaint(); + } + + + @Override + public void actionPerformed(ActionEvent e) { + if(play) { + if(ballpoaX<=0) { + ballXdir = -ballXdir; + } + if(ballpoaX>=670) { + ballXdir = -ballXdir; + } + if(ballpoaY<=0) { + ballYdir = -ballYdir; + } + + Rectangle ballRect = new Rectangle(ballpoaX, ballpoaY, 20, 20); + Rectangle paddleRect = new Rectangle(playerX, 550, 100, 8); + + if(ballRect.intersects(paddleRect)){ + ballYdir =- ballYdir; + } + + A: for(int i = 0; i<map.map.length; i++) { + for(int j = 0; j<map.map[0].length; j++) { + if(map.map[i][j] > 0) { + int width = map.brickWidth; + int height = map.brickHeight; + int brickXPos = 80+j*width; + int brickYPos = 50+i*height; + + Rectangle brickRect = new Rectangle(brickXPos, brickYPos, width, height); + + if(ballRect.intersects(brickRect)) { + map.setBrick(0, i, j); + totalBricks--; + score += 5; + + if(ballpoaX+19 <= brickXPos || ballpoaX+1 >= brickXPos+width) { + ballXdir =- ballXdir; + } else { + ballYdir =- ballYdir; + } + break A; + } + } + } + } + ballpoaX += ballXdir; + ballpoaY += ballYdir; + } + repaint(); + } + + + // not needed below functions + + @Override + public void keyTyped(KeyEvent e) { + + throw new UnsupportedOperationException("Unimplemented method 'keyTyped'"); + } + + @Override + public void keyReleased(KeyEvent e) { + + throw new UnsupportedOperationException("Unimplemented method 'keyReleased'"); + } + + + +} + +class MapGenerator { + public int map[][]; + public int brickWidth; + public int brickHeight; + + public MapGenerator(int row, int coloumn) { + map = new int[row][coloumn]; + + for(int i = 0; i<row; i++) { + for(int j = 0; j<coloumn; j++) { + map[i][j] = 1; + } + } + + brickWidth = 540/coloumn; + brickHeight = 150/row; + } + + public void setBrick(int value, int r, int c) { + map[r][c] = value; + } + + public void draw(Graphics2D g) { + for(int i = 0; i<map.length; i++) { + for(int j = 0; j<map[0].length; j++) { + if(map[i][j] > 0) { + g.setColor(Color.WHITE); + g.fillRect(j*brickWidth +80, i*brickHeight+80, brickWidth, brickHeight); + + //black border + g.setColor(Color.BLACK); + g.setStroke(new BasicStroke(3)); + g.drawRect(j*brickWidth +80, i*brickHeight+80, brickWidth, brickHeight); + } + } + } + } +} \ No newline at end of file diff --git a/build.xml b/build.xml new file mode 100644 index 00000000..443c0478 --- /dev/null +++ b/build.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<!-- By default, only the Clean and Build commands use this build script. --> +<!-- Commands such as Run, Debug, and Test only use this build script if --> +<!-- the Compile on Save feature is turned off for the project. --> +<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> +<!-- in the project's Project Properties dialog box.--> +<project name="BusTicketBooking" default="default" basedir="."> + <description>Builds, tests, and runs the project BusTicketBooking.</description> + <import file="nbproject/build-impl.xml"/> + <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-jar: called before JAR building + -post-jar: called after JAR building + -post-clean: called after cleaning build products + + (Targets beginning with '-' are not intended to be called on their own.) + + Example of inserting an obfuscator after compilation could look like this: + + <target name="-post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Another way to customize the build is by overriding existing main targets. + The targets of interest are: + + -init-macrodef-javac: defines macro for javac compilation + -init-macrodef-junit: defines macro for junit execution + -init-macrodef-debug: defines macro for class debugging + -init-macrodef-java: defines macro for class execution + -do-jar: JAR building + run: execution of project + -javadoc-build: Javadoc generation + test-report: JUnit report generation + + An example of overriding the target for project execution could look like this: + + <target name="run" depends="BusTicketBooking-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that the overridden target depends on the jar target and not only on + the compile target as the regular run target does. Again, for a list of available + properties which you can use, check the target you are overriding in the + nbproject/build-impl.xml file. + + --> +</project> diff --git a/build/classes/ticketbooking/BusTicketing$1.class b/build/classes/ticketbooking/BusTicketing$1.class new file mode 100644 index 00000000..07e5f4f7 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$1.class differ diff --git a/build/classes/ticketbooking/BusTicketing$10.class b/build/classes/ticketbooking/BusTicketing$10.class new file mode 100644 index 00000000..62f77d45 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$10.class differ diff --git a/build/classes/ticketbooking/BusTicketing$11.class b/build/classes/ticketbooking/BusTicketing$11.class new file mode 100644 index 00000000..dbd1c40d Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$11.class differ diff --git a/build/classes/ticketbooking/BusTicketing$12.class b/build/classes/ticketbooking/BusTicketing$12.class new file mode 100644 index 00000000..e58183aa Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$12.class differ diff --git a/build/classes/ticketbooking/BusTicketing$13.class b/build/classes/ticketbooking/BusTicketing$13.class new file mode 100644 index 00000000..8137a452 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$13.class differ diff --git a/build/classes/ticketbooking/BusTicketing$14.class b/build/classes/ticketbooking/BusTicketing$14.class new file mode 100644 index 00000000..afef8ffa Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$14.class differ diff --git a/build/classes/ticketbooking/BusTicketing$15.class b/build/classes/ticketbooking/BusTicketing$15.class new file mode 100644 index 00000000..879c5007 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$15.class differ diff --git a/build/classes/ticketbooking/BusTicketing$16.class b/build/classes/ticketbooking/BusTicketing$16.class new file mode 100644 index 00000000..07841a3d Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$16.class differ diff --git a/build/classes/ticketbooking/BusTicketing$17.class b/build/classes/ticketbooking/BusTicketing$17.class new file mode 100644 index 00000000..1afbc58f Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$17.class differ diff --git a/build/classes/ticketbooking/BusTicketing$18.class b/build/classes/ticketbooking/BusTicketing$18.class new file mode 100644 index 00000000..1ec833fc Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$18.class differ diff --git a/build/classes/ticketbooking/BusTicketing$19.class b/build/classes/ticketbooking/BusTicketing$19.class new file mode 100644 index 00000000..617356fe Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$19.class differ diff --git a/build/classes/ticketbooking/BusTicketing$2.class b/build/classes/ticketbooking/BusTicketing$2.class new file mode 100644 index 00000000..03818492 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$2.class differ diff --git a/build/classes/ticketbooking/BusTicketing$20.class b/build/classes/ticketbooking/BusTicketing$20.class new file mode 100644 index 00000000..11438a29 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$20.class differ diff --git a/build/classes/ticketbooking/BusTicketing$21.class b/build/classes/ticketbooking/BusTicketing$21.class new file mode 100644 index 00000000..24de6af3 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$21.class differ diff --git a/build/classes/ticketbooking/BusTicketing$3.class b/build/classes/ticketbooking/BusTicketing$3.class new file mode 100644 index 00000000..923e2dea Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$3.class differ diff --git a/build/classes/ticketbooking/BusTicketing$4.class b/build/classes/ticketbooking/BusTicketing$4.class new file mode 100644 index 00000000..bcc1bbe4 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$4.class differ diff --git a/build/classes/ticketbooking/BusTicketing$5.class b/build/classes/ticketbooking/BusTicketing$5.class new file mode 100644 index 00000000..0147a737 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$5.class differ diff --git a/build/classes/ticketbooking/BusTicketing$6.class b/build/classes/ticketbooking/BusTicketing$6.class new file mode 100644 index 00000000..753e9e5a Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$6.class differ diff --git a/build/classes/ticketbooking/BusTicketing$7.class b/build/classes/ticketbooking/BusTicketing$7.class new file mode 100644 index 00000000..d100db1a Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$7.class differ diff --git a/build/classes/ticketbooking/BusTicketing$8.class b/build/classes/ticketbooking/BusTicketing$8.class new file mode 100644 index 00000000..afa317da Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$8.class differ diff --git a/build/classes/ticketbooking/BusTicketing$9.class b/build/classes/ticketbooking/BusTicketing$9.class new file mode 100644 index 00000000..91799882 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing$9.class differ diff --git a/build/classes/ticketbooking/BusTicketing.class b/build/classes/ticketbooking/BusTicketing.class new file mode 100644 index 00000000..7427f4f2 Binary files /dev/null and b/build/classes/ticketbooking/BusTicketing.class differ diff --git a/build/classes/ticketbooking/BusTicketing.form b/build/classes/ticketbooking/BusTicketing.form new file mode 100644 index 00000000..a0eed955 --- /dev/null +++ b/build/classes/ticketbooking/BusTicketing.form @@ -0,0 +1,819 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <NonVisualComponents> + <Component class="javax.swing.ButtonGroup" name="buttonGroup1"> + </Component> + </NonVisualComponents> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1200, 700]"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="223" max="-2" attributes="0"/> + <Component id="jButtonTotal" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel4" max="32767" attributes="0"/> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + </Group> + </Group> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Component id="jButtonTotal" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + <Component id="jPanel4" min="-2" pref="143" max="-2" attributes="0"/> + </Group> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="80" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="33" red="33" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="3"/> + </Border> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="33" type="rgb"/> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="129" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" pref="790" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="80" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="33" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value=" Bus Ticketing System"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="99" red="99" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="3"/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel9" min="-2" pref="119" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="103" max="-2" attributes="0"/> + <Component id="jTextFieldTo" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel8" min="-2" pref="119" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jTextFieldForm" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jButtonReset" min="-2" pref="99" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel14" min="-2" pref="185" max="-2" attributes="0"/> + <Component id="jLabel13" min="-2" pref="144" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jTextFieldPassengers2" min="-2" pref="185" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="42" max="-2" attributes="0"/> + <Component id="jButtonExit" min="-2" pref="88" max="-2" attributes="0"/> + </Group> + <Component id="jTextFieldPrice" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel10" min="-2" pref="119" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="103" max="-2" attributes="0"/> + <Component id="jTextFieldClass" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel15" min="-2" pref="185" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Component id="jTextFieldTicketType" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel11" min="-2" pref="119" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="103" max="-2" attributes="0"/> + <Component id="jTextFieldTime2" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel12" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="72" max="-2" attributes="0"/> + <Component id="jTextFieldDate2" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace pref="370" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel8" alignment="3" min="-2" pref="45" max="-2" attributes="0"/> + <Component id="jTextFieldForm" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel9" alignment="3" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldTo" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel12" alignment="3" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldDate2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel11" alignment="3" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldTime2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel15" alignment="3" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldTicketType" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="30" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel10" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldClass" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel14" alignment="0" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldPassengers2" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel13" min="-2" pref="39" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButtonReset" alignment="3" max="32767" attributes="0"/> + <Component id="jButtonExit" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" attributes="0"> + <Component id="jTextFieldPrice" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="15" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="From"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="To"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Class"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Departure"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Date of Journey"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Amount Paid"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="No. of Passangers "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Ticket Type"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldForm"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldFormActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldTo"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldToActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldDate2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldDate2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldTime2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldTime2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldClass"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldClassActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldTicketType"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldTicketTypeActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldPassengers2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldPassengers2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldPrice"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldPriceActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButtonReset"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Reset"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonResetActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButtonExit"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="99" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Exit"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButtonExitMouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButtonExitMouseExited"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonExitActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="99" red="99" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="3"/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel2" min="-2" pref="121" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel4" alignment="0" min="-2" pref="121" max="-2" attributes="0"/> + <Component id="jLabel7" alignment="0" min="-2" pref="121" max="-2" attributes="0"/> + <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="0" min="-2" pref="121" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jTextFieldPassenger1" alignment="1" max="32767" attributes="0"/> + <Component id="jComboBoxDestination" alignment="1" max="32767" attributes="0"/> + <Component id="jComboBoxTime" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jRadioButtonFirstClass1" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jRadioButtonSingle1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="50" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jRadioButtonReturn1" min="-2" max="-2" attributes="0"/> + <Component id="jRadioButtonEconomy1" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jDateChooser" min="-2" pref="222" max="-2" attributes="0"/> + <EmptySpace min="0" pref="57" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <EmptySpace pref="47" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jComboBoxDestination" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel3" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jDateChooser" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel5" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jComboBoxTime" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel4" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jRadioButtonReturn1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jLabel7" min="-2" pref="31" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jRadioButtonSingle1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> + </Group> + <Group type="103" alignment="1" groupAlignment="3" attributes="0"> + <Component id="jRadioButtonFirstClass1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jRadioButtonEconomy1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel6" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jTextFieldPassenger1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Destinantion "/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBoxDestination"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="7"> + <StringItem index="0" value="Select Destination "/> + <StringItem index="1" value="Himamaylan"/> + <StringItem index="2" value="Binalbagan"/> + <StringItem index="3" value="Kabankalan"/> + <StringItem index="4" value="Bacolod"/> + <StringItem index="5" value="Hinigaran"/> + <StringItem index="6" value="Isabela"/> + </StringArray> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jComboBoxDestinationActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Date of Journey"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Ticket Type "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Departure"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="No. of Passengers "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Class"/> + </Properties> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButtonSingle1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Single"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRadioButtonSingle1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButtonEconomy1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Economy"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRadioButtonEconomy1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButtonReturn1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Return"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRadioButtonReturn1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButtonFirstClass1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="First Class"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRadioButtonFirstClass1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldPassenger1"> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBoxTime"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="5"> + <StringItem index="0" value="Select Time"/> + <StringItem index="1" value="11:30"/> + <StringItem index="2" value="12:30"/> + <StringItem index="3" value="1:30"/> + <StringItem index="4" value="2:30"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="com.toedter.calendar.JDateChooser" name="jDateChooser"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel4"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="99" red="99" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="3"/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="49" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel16" min="-2" pref="121" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jTextFieldTotal" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel18" min="-2" pref="121" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jTextFieldTax" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel17" min="-2" pref="121" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jTextFieldSubTotal" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="68" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel16" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jTextFieldTotal" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel18" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jTextFieldTax" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextFieldSubTotal" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel17" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="64" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel16"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Total"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel17"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Sub Total "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel18"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Tax "/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldTax"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldTaxActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldTotal"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldTotalActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldSubTotal"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldSubTotalActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButtonTotal"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="ff" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Submit"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonTotalActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/button1.class b/button1.class new file mode 100644 index 00000000..6045ee9f Binary files /dev/null and b/button1.class differ diff --git a/button2.class b/button2.class new file mode 100644 index 00000000..e55c8420 Binary files /dev/null and b/button2.class differ diff --git a/button3.class b/button3.class new file mode 100644 index 00000000..76d8371d Binary files /dev/null and b/button3.class differ diff --git a/calander.java b/calander.java new file mode 100644 index 00000000..8006bdca --- /dev/null +++ b/calander.java @@ -0,0 +1,13 @@ +import java.util.Calendar; +public class CalendarExample1 { + public static void main(String[] args) { + Calendar calendar = Calendar.getInstance(); + System.out.println("The current date is : " + calendar.getTime()); + calendar.add(Calendar.DATE, -15); + System.out.println("15 days ago: " + calendar.getTime()); + calendar.add(Calendar.MONTH, 4); + System.out.println("4 months later: " + calendar.getTime()); + calendar.add(Calendar.YEAR, 2); + System.out.println("2 years later: " + calendar.getTime()); + } +} diff --git a/calc.java b/calc.java new file mode 100644 index 00000000..7c6e8c7b --- /dev/null +++ b/calc.java @@ -0,0 +1,75 @@ +// Java program for simple calculator + +import java.io.*; +import java.lang.*; +import java.lang.Math; +import java.util.Scanner; +public class BasicCalculator { + + public static void main(String[] args) + { + // stores two numbers + double num1, num2; + + // Take input from the user + Scanner sc = new Scanner(System.in); + + System.out.println("Enter the numbers"); + + // take the inputs + num1 = sc.nextDouble(); + + num2 = sc.nextDouble(); + + System.out.println("Enter the operator (+,-,*,/)"); + + char op = sc.next().charAt(0); + + double o = 0; + + switch (op) { + + // case to add two numbers + case '+': + + o = num1 + num2; + + break; + + // case to subtract two numbers + case '-': + + o = num1 - num2; + + break; + + // case to multiply two numbers + case '*': + + o = num1 * num2; + + break; + + // case to divide two numbers + case '/': + + o = num1 / num2; + + break; + + default: + + System.out.println("You enter wrong input"); + + break; + } + + System.out.println("The final result:"); + + System.out.println(); + + // print the final result + System.out.println(num1 + " " + op + " " + num2 + + " = " + o); + } +} diff --git a/calculator.java b/calculator.java new file mode 100644 index 00000000..a1ad6216 --- /dev/null +++ b/calculator.java @@ -0,0 +1,56 @@ +import java.util.Scanner; + +class Main { + public static void main(String[] args) { + + char operator; + Double number1, number2, result; + + // create an object of Scanner class + Scanner input = new Scanner(System.in); + + // ask users to enter operator + System.out.println("Choose an operator: +, -, *, or /"); + operator = input.next().charAt(0); + + // ask users to enter numbers + System.out.println("Enter first number"); + number1 = input.nextDouble(); + + System.out.println("Enter second number"); + number2 = input.nextDouble(); + + switch (operator) { + + // performs addition between numbers + case '+': + result = number1 + number2; + System.out.println(number1 + " + " + number2 + " = " + result); + break; + + // performs subtraction between numbers + case '-': + result = number1 - number2; + System.out.println(number1 + " - " + number2 + " = " + result); + break; + + // performs multiplication between numbers + case '*': + result = number1 * number2; + System.out.println(number1 + " * " + number2 + " = " + result); + break; + + // performs division between numbers + case '/': + result = number1 / number2; + System.out.println(number1 + " / " + number2 + " = " + result); + break; + + default: + System.out.println("Invalid operator!"); + break; + } + + input.close(); + } +} \ No newline at end of file diff --git a/chess.java b/chess.java new file mode 100644 index 00000000..0d955d45 --- /dev/null +++ b/chess.java @@ -0,0 +1,123 @@ +import java.awt.*; +import java.awt.event.*; +import java.util.*; +import javax.swing.*; + +public class ChessGameDemo extends JFrame implements MouseListener, MouseMotionListener { + JLayeredPane layeredPane; + JPanel chessBoard; + JLabel chessPiece; + int xAdjustment; + int yAdjustment; + + public ChessGameDemo(){ + Dimension boardSize = new Dimension(600, 600); + + // Use a Layered Pane for this this application + layeredPane = new JLayeredPane(); + getContentPane().add(layeredPane); + layeredPane.setPreferredSize(boardSize); + layeredPane.addMouseListener(this); + layeredPane.addMouseMotionListener(this); + + //Add a chess board to the Layered Pane + + chessBoard = new JPanel(); + layeredPane.add(chessBoard, JLayeredPane.DEFAULT_LAYER); + chessBoard.setLayout( new GridLayout(8, 8) ); + chessBoard.setPreferredSize( boardSize ); + chessBoard.setBounds(0, 0, boardSize.width, boardSize.height); + + for (int i = 0; i < 64; i++) { + JPanel square = new JPanel( new BorderLayout() ); + chessBoard.add( square ); + + int row = (i / 8) % 2; + if (row == 0) + square.setBackground( i % 2 == 0 ? Color.blue : Color.white ); + else + square.setBackground( i % 2 == 0 ? Color.white : Color.blue ); + } + + //Add a few pieces to the board + + JLabel piece = new JLabel( new ImageIcon("/home/vinod/amarexamples/chess.jpg") ); + JPanel panel = (JPanel)chessBoard.getComponent(0); + panel.add(piece); + piece = new JLabel(new ImageIcon("/home/vinod/amarexamples/chess1.jpg")); + panel = (JPanel)chessBoard.getComponent(15); + panel.add(piece); + piece = new JLabel(new ImageIcon("/home/vinod/amarexamples/king.jpg")); + panel = (JPanel)chessBoard.getComponent(16); + panel.add(piece); + piece = new JLabel(new ImageIcon("/home/vinod/amarexamples/camel.jpg")); + panel = (JPanel)chessBoard.getComponent(20); + panel.add(piece); + + } + + public void mousePressed(MouseEvent e){ + chessPiece = null; + Component c = chessBoard.findComponentAt(e.getX(), e.getY()); + + if (c instanceof JPanel) + return; + + Point parentLocation = c.getParent().getLocation(); + xAdjustment = parentLocation.x - e.getX(); + yAdjustment = parentLocation.y - e.getY(); + chessPiece = (JLabel)c; + chessPiece.setLocation(e.getX() + xAdjustment, e.getY() + yAdjustment); + chessPiece.setSize(chessPiece.getWidth(), chessPiece.getHeight()); + layeredPane.add(chessPiece, JLayeredPane.DRAG_LAYER); + } + + //Move the chess piece around + + public void mouseDragged(MouseEvent me) { + if (chessPiece == null) return; + chessPiece.setLocation(me.getX() + xAdjustment, me.getY() + yAdjustment); + } + + //Drop the chess piece back onto the chess board + + public void mouseReleased(MouseEvent e) { + if(chessPiece == null) return; + + chessPiece.setVisible(false); + Component c = chessBoard.findComponentAt(e.getX(), e.getY()); + + if (c instanceof JLabel){ + Container parent = c.getParent(); + parent.remove(0); + parent.add( chessPiece ); + } + else { + Container parent = (Container)c; + parent.add( chessPiece ); + } + + chessPiece.setVisible(true); + } + + public void mouseClicked(MouseEvent e) { + + } + public void mouseMoved(MouseEvent e) { + } + public void mouseEntered(MouseEvent e){ + + } + public void mouseExited(MouseEvent e) { + + } + + public static void main(String[] args) { + JFrame frame = new ChessGameDemo(); + frame.setDefaultCloseOperation(DISPOSE_ON_CLOSE ); + frame.pack(); + frame.setResizable(true); + frame.setLocationRelativeTo( null ); + frame.setVisible(true); + } +} diff --git a/clock.java b/clock.java new file mode 100644 index 00000000..cd5d206f --- /dev/null +++ b/clock.java @@ -0,0 +1,116 @@ +import java.awt.Color; +import java.awt.Font; +import java.awt.Graphics; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; +import javax.swing.JFrame; +import javax.swing.JPanel; +public class Clock extends JPanel implements Runnable +{ + Thread thread = null; + SimpleDateFormat formatter = new SimpleDateFormat("s", Locale.getDefault()); + Date currentDate; + int xcenter = 175, ycenter = 175, lastxs = 0, lastys = 0, lastxm = 0, lastym = 0, lastxh = 0, lastyh = 0; + private void drawStructure(Graphics g) { + g.setFont(new Font("TimesRoman", Font.BOLD, 20)); + g.setColor(Color.black); + g.fillOval(xcenter - 150, ycenter - 150, 300, 300); + g.setColor(Color.blue); + g.drawString("abhishek dubey", 113, 300); + g.setColor(Color.green); + g.drawString("9", xcenter - 145, ycenter + 0); + g.drawString("3", xcenter + 135, ycenter + 0); + g.drawString("12", xcenter - 10, ycenter - 130); + g.drawString("6", xcenter - 10, ycenter + 145); + } + public void paint(Graphics g) + { + int xhour, yhour, xminute, yminute, xsecond, ysecond, second, minute, hour; + drawStructure(g); + currentDate = new Date(); + formatter.applyPattern("s"); + second = Integer.parseInt(formatter.format(currentDate)); + formatter.applyPattern("m"); + minute = Integer.parseInt(formatter.format(currentDate)); + formatter.applyPattern("h"); + hour = Integer.parseInt(formatter.format(currentDate)); + xsecond = (int)(Math.cos(second * 3.14 f / 30 - 3.14 f / 2) * 120 + xcenter); + ysecond = (int)(Math.sin(second * 3.14 f / 30 - 3.14 f / 2) * 120 + ycenter); + xminute = (int)(Math.cos(minute * 3.14 f / 30 - 3.14 f / 2) * 100 + xcenter); + yminute = (int)(Math.sin(minute * 3.14 f / 30 - 3.14 f / 2) * 100 + ycenter); + xhour = (int)(Math.cos((hour * 30 + minute / 2) * 3.14 f / 180 - 3.14 f / 2) * 80 + xcenter); + yhour = (int)(Math.sin((hour * 30 + minute / 2) * 3.14 f / 180 - 3.14 f / 2) * 80 + ycenter); + // Erase if necessary, and redraw + g.setColor(Color.magenta); + if (xsecond != lastxs || ysecond != lastys) + { + g.drawLine(xcenter, ycenter, lastxs, lastys); + } + if (xminute != lastxm || yminute != lastym) + { + g.drawLine(xcenter, ycenter - 1, lastxm, lastym); + g.drawLine(xcenter - 1, ycenter, lastxm, lastym); + } + if (xhour != lastxh || yhour != lastyh) + { + g.drawLine(xcenter, ycenter - 1, lastxh, lastyh); + g.drawLine(xcenter - 1, ycenter, lastxh, lastyh); + } + g.setColor(Color.magenta); + g.drawLine(xcenter, ycenter, xsecond, ysecond); + g.setColor(Color.red); + g.drawLine(xcenter, ycenter - 1, xminute, yminute); + g.drawLine(xcenter - 1, ycenter, xminute, yminute); + g.setColor(Color.green); + g.drawLine(xcenter, ycenter - 1, xhour, yhour); + g.drawLine(xcenter - 1, ycenter, xhour, yhour); + lastxs = xsecond; + lastys = ysecond; + lastxm = xminute; + lastym = yminute; + lastxh = xhour; + lastyh = yhour; + } + public void start() + { + if (thread == null) + { + thread = new Thread(this); + thread.start(); + } + } + public void stop() + { + thread = null; + } + public void run() + { + while (thread != null) + { + try + { + Thread.sleep(100); + } + catch (InterruptedException e) {} + repaint(); + } + thread = null; + } + public void update(Graphics g) + { + paint(g); + } + public static void main(String args[]) + { + JFrame window = new JFrame(); + Color c = new Color(118, 73, 190); + window.setBackground(c); + window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + window.setBounds(0, 0, 400, 400); + Clock clock = new Clock(); + window.getContentPane().add(clock); + window.setVisible(true); + clock.start(); + } +} diff --git a/clockapplet.java b/clockapplet.java new file mode 100644 index 00000000..5464e050 --- /dev/null +++ b/clockapplet.java @@ -0,0 +1,101 @@ +import java.applet.*; +import java.awt.*; +import java.util.*; +import java.text.*; + +public class MyClock extends Applet implements Runnable { + + int width, height; + Thread t = null; + boolean threadSuspended; + int hours=0, minutes=0, seconds=0; + String timeString = ""; + + public void init() { + width = getSize().width; + height = getSize().height; + setBackground( Color.black ); + } + + public void start() { + if ( t == null ) { + t = new Thread( this ); + t.setPriority( Thread.MIN_PRIORITY ); + threadSuspended = false; + t.start(); + } + else { + if ( threadSuspended ) { + threadSuspended = false; + synchronized( this ) { + notify(); + } + } + } + } + + public void stop() { + threadSuspended = true; + } + + public void run() { + try { + while (true) { + + Calendar cal = Calendar.getInstance(); + hours = cal.get( Calendar.HOUR_OF_DAY ); + if ( hours > 12 ) hours -= 12; + minutes = cal.get( Calendar.MINUTE ); + seconds = cal.get( Calendar.SECOND ); + + SimpleDateFormat formatter + = new SimpleDateFormat( "hh:mm:ss", Locale.getDefault() ); + Date date = cal.getTime(); + timeString = formatter.format( date ); + + // Now the thread checks to see if it should suspend itself + if ( threadSuspended ) { + synchronized( this ) { + while ( threadSuspended ) { + wait(); + } + } + } + repaint(); + t.sleep( 1000 ); // interval specified in milliseconds + } + } + catch (Exception e) { } + } + + void drawHand( double angle, int radius, Graphics g ) { + angle -= 0.5 * Math.PI; + int x = (int)( radius*Math.cos(angle) ); + int y = (int)( radius*Math.sin(angle) ); + g.drawLine( width/2, height/2, width/2 + x, height/2 + y ); + } + + void drawWedge( double angle, int radius, Graphics g ) { + angle -= 0.5 * Math.PI; + int x = (int)( radius*Math.cos(angle) ); + int y = (int)( radius*Math.sin(angle) ); + angle += 2*Math.PI/3; + int x2 = (int)( 5*Math.cos(angle) ); + int y2 = (int)( 5*Math.sin(angle) ); + angle += 2*Math.PI/3; + int x3 = (int)( 5*Math.cos(angle) ); + int y3 = (int)( 5*Math.sin(angle) ); + g.drawLine( width/2+x2, height/2+y2, width/2 + x, height/2 + y ); + g.drawLine( width/2+x3, height/2+y3, width/2 + x, height/2 + y ); + g.drawLine( width/2+x2, height/2+y2, width/2 + x3, height/2 + y3 ); + } + + public void paint( Graphics g ) { + g.setColor( Color.gray ); + drawWedge( 2*Math.PI * hours / 12, width/5, g ); + drawWedge( 2*Math.PI * minutes / 60, width/3, g ); + drawHand( 2*Math.PI * seconds / 60, width/2, g ); + g.setColor( Color.white ); + g.drawString( timeString, 10, height-10 ); + } +} diff --git a/cloudscripts/eventarc.txt b/cloudscripts/eventarc.txt new file mode 100644 index 00000000..e85c1742 --- /dev/null +++ b/cloudscripts/eventarc.txt @@ -0,0 +1,59 @@ +REGION=us-east1 + + +gcloud config set project "$DEVSHELL_PROJECT_ID" +gcloud config set run/region "$REGION" +gcloud config set run/platform managed +gcloud config set eventarc/location "$REGION" + +export PROJECT_NUMBER="$(gcloud projects list \ + --filter=$(gcloud config get-value project) \ + --format='value(PROJECT_NUMBER)')" + +gcloud projects add-iam-policy-binding $(gcloud config get-value project) \ + --member=serviceAccount:${PROJECT_NUMBER}-compute@developer.gserviceaccount.com \ + --role='roles/eventarc.admin' + +gcloud beta eventarc attributes types list +gcloud beta eventarc attributes types describe \ + google.cloud.pubsub.topic.v1.messagePublished + +export SERVICE_NAME=event-display +export IMAGE_NAME="gcr.io/cloudrun/hello" +gcloud run deploy ${SERVICE_NAME} \ + --image ${IMAGE_NAME} \ + --allow-unauthenticated \ + --max-instances=3 + + +gcloud beta eventarc attributes types describe \ + google.cloud.pubsub.topic.v1.messagePublished +gcloud beta eventarc triggers create trigger-pubsub \ + --destination-run-service=${SERVICE_NAME} \ + --matching-criteria="type=google.cloud.pubsub.topic.v1.messagePublished" +export TOPIC_ID=$(gcloud eventarc triggers describe trigger-pubsub \ + --format='value(transport.pubsub.topic)') +gcloud pubsub topics publish ${TOPIC_ID} --message="Hello there" + +export BUCKET_NAME=$(gcloud config get-value project)-cr-bucket +gsutil mb -p $(gcloud config get-value project) \ + -l $(gcloud config get-value run/region) \ + gs://${BUCKET_NAME}/ + +#---------AUDIT LOGS : Google Cloud Storage ----------------- +echo "Hello World" > random.txt +gsutil cp random.txt gs://${BUCKET_NAME}/random.txt + + +gcloud beta eventarc attributes types describe google.cloud.audit.log.v1.written +gcloud beta eventarc triggers create trigger-auditlog \ +--destination-run-service=${SERVICE_NAME} \ +--matching-criteria="type=google.cloud.audit.log.v1.written" \ +--matching-criteria="serviceName=storage.googleapis.com" \ +--matching-criteria="methodName=storage.objects.create" \ +--service-account=${PROJECT_NUMBER}-compute@developer.gserviceaccount.com + +gsutil cp random.txt gs://${BUCKET_NAME}/random.txt + +#----------WAIT FOR 10 MINUTES and RUN BELOW COMMAND AGAIN 2-3 TIMES-------- +gsutil cp random.txt gs://${BUCKET_NAME}/random.txt diff --git a/code.java b/code.java new file mode 100644 index 00000000..07b4c1ea --- /dev/null +++ b/code.java @@ -0,0 +1,39 @@ +// Java Program to print pattern +// Palindrome triangle +import java.util.*; + +public class GeeksForGeeks { + // Function to demonstrate pattern + public static void printPattern(int n) + { + int i, j; + + // outer loop to handle number of rows + for (i = 1; i <= n; i++) { + // inner loop to print the spaces + for (j = 1; j <= 2 * (n - i); j++) { + System.out.print(" "); + } + + // inner loop to print the first part + for (j = i; j >= 1; j--) { + System.out.print(j + " "); + } + + // inner loop to print the second part + for (j = 2; j <= i; j++) { + System.out.print(j + " "); + } + + // printing new line for each row + System.out.println(); + } + } + + // Driver Function + public static void main(String args[]) + { + int n = 6; + printPattern(n); + } +} diff --git a/currency Convertor/currency.java b/currency Convertor/currency.java new file mode 100644 index 00000000..a585a9d5 --- /dev/null +++ b/currency Convertor/currency.java @@ -0,0 +1,127 @@ +/* +* To change this template, choose Tools | Templates +* and open the template in the editor. +*/ +package com.exchange; + +import java.io.*; +import java.net.*; +import java.util.*; +import javax.servlet.*; +import javax.servlet.http.*; +import java.io.InputStream; +import java.net.*; +import com.google.gson.*; + +/** +* +* @author pakallis +*/ +class Recv +{ +private String lhs; +private String rhs; +private String error; +private String icc; +public Recv( +{ +} +public String getLhs() +{ +return lhs; +} +public String getRhs() +{ +return rhs; +} +} +public class Convert extends HttpServlet { + /** + * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest req, HttpServletResponse resp) + throws ServletException, IOException { + String query = ""; + String amount = ""; + String curTo = ""; + String curFrom = ""; + String submit = ""; + String res = ""; + HttpSession session; + resp.setContentType("text/html;charset=UTF-8"); + PrintWriter out = resp.getWriter(); + /*Read request parameters*/ + amount = req.getParameter("amount"); + curTo = req.getParameter("to"); + curFrom = req.getParameter("from"); + /*Open a connection to google and read the result*/ + + try { + query = "http://www.google.com/ig/calculator?hl=en&q=" + amount + curFrom + "=?" + curTo; + URL url = new URL(query); + InputStreamReader stream = new InputStreamReader(url.openStream()); + BufferedReader in = new BufferedReader(stream); + String str = ""; + String temp = ""; + while ((temp = in.readLine()) != null) { + str = str + temp; + } + + /*Parse the result which is in json format*/ + Gson gson = new Gson(); + Recv st = gson.fromJson(str, Recv.class); + String rhs = st.getRhs(); + rhs = rhs.replaceAll("�", ""); + /*we do the check in order to print the additional word(millions,billions etc)*/ + StringTokenizer strto = new StringTokenizer(rhs); + String nextToken; + + out.write(strto.nextToken()); + nextToken = strto.nextToken(); + + if( nextToken.equals("million") || nextToken.equals("billion") || nextToken.equals("trillion")) + { + out.println(" "+nextToken); + } + } catch (NumberFormatException e) { + out.println("The given amount is not a valid number"); + } + } + // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> + /** + * Handles the HTTP <code>GET</code> method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + /** + * Handles the HTTP <code>POST</code> method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// </editor-fold> +} \ No newline at end of file diff --git a/currencyconvert.java b/currencyconvert.java new file mode 100644 index 00000000..cdd849a2 --- /dev/null +++ b/currencyconvert.java @@ -0,0 +1,73 @@ +import java.io.*; +import java.net.*; +import java.util.StringTokenizer; + +import javax.servlet.*; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.*; + +import com.google.gson.Gson; + +@WebServlet("/CurrencyConverter") +public class CurrencyConverter extends HttpServlet { + + private static final long serialVersionUID = 1L; + + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + String query = ""; + String amount = ""; + String curTo = ""; + String curFrom = ""; + String res = ""; + + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + + /* Read request parameters */ + amount = request.getParameter("amount"); + curTo = request.getParameter("to"); + curFrom = request.getParameter("from"); + + /* Open a connection to Google and read the result */ + try { + query = "http://www.google.com/ig/calculator?hl=en&q=" + amount + curFrom + "=?" + curTo; + URL url = new URL(query); + + try (InputStreamReader stream = new InputStreamReader(url.openStream()); + BufferedReader in = new BufferedReader(stream)) { + + String str = ""; + String temp = ""; + + while ((temp = in.readLine()) != null) { + str = str + temp; + } + + /* Parse the result which is in JSON format */ + Gson gson = new Gson(); + Recv st = gson.fromJson(str, Recv.class); + String rhs = st.getRhs(); + rhs = rhs.replace("�", ""); + + /* Check if there are additional words (millions, billions, etc.) and print them */ + StringTokenizer strto = new StringTokenizer(rhs); + String nextToken = strto.nextToken(); + out.write(nextToken); + + nextToken = strto.nextToken(); + if (nextToken.equals("million") || nextToken.equals("billion") || nextToken.equals("trillion")) { + out.println(" " + nextToken); + } + } + } catch (NumberFormatException e) { + out.println("The given amount is not a valid number"); + } + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } +} diff --git a/dataType3524.java b/dataType3524.java new file mode 100644 index 00000000..c368a324 --- /dev/null +++ b/dataType3524.java @@ -0,0 +1,19 @@ +public class dataType3524 { +// // Integer data types +// byte byteValue = 127; // Correct +// // byte byteValue = 128; // Incorrect: Value exceeds the valid range (-128 to 127) +// long longValue = 9223372036854775807; // Incorrect, require L at the end +// long longValue = 9223372036854775807L; // Correct +// long longValue = 9223372036854775807; // Incorrect, require L at the end +// long longValue = 9223372036854775808L; // Incorrect: Value exceeds the valid range +// // Floating-point data types +// float floatValue = 3.14f; // Correct +// float floatValue = 3.14; // Incorrect: Floating-point literals need 'f' or 'F' suffix +// // Boolean data type +// double doubleValue = 3.14159; // Correct +// // Character data type +// char charValue = 'A'; // Correct +// char charValue = "A"; // Incorrect: Use single quotes for characters +// boolean booleanValue = true; // Correct +// boolean booleanValue = 0; // Incorrect: Use 'true' or 'false' for boolean values +} diff --git a/dateTime3524.java b/dateTime3524.java new file mode 100644 index 00000000..98b0c675 --- /dev/null +++ b/dateTime3524.java @@ -0,0 +1,17 @@ +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +public class dateTime3524 { + public static void main(String[] args) { + System.out.println("2021503524 - Mugundh J B \n"); + LocalDateTime current = LocalDateTime.now(); //"LocalDateTime" is the class + //"now()" is a method, represent the current date and time + DateTimeFormatter dateformat = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + DateTimeFormatter timeformat = DateTimeFormatter.ofPattern("HH:mm:ss"); + // ofPattern() is used to format the date in a particular pattern + String formattedDate = current.format(dateformat); + System.out.print("Date: " + formattedDate); + String formattedTime = current.format(timeformat); + System.out.println(" Time: " + formattedTime); + } +} \ No newline at end of file diff --git a/decToBin.java b/decToBin.java new file mode 100644 index 00000000..5782b6dc --- /dev/null +++ b/decToBin.java @@ -0,0 +1,27 @@ +import java.util.Scanner; + +public class decToBin { + + public static void decToBinConversion(int n){ + int myNum = n; + int pow = 0; + int binNum = 0; + + while(n > 0){ + int rem = n % 2; + binNum = binNum + (rem * (int)Math.pow(10, pow)); + pow++; + n = n / 2; + } + System.out.println("binary form of " + myNum + " = " + binNum); + + } + public static void main(String args[]){ + Scanner sc = new Scanner(System.in); + + decToBinConversion(7); + + + sc.close(); + } +} diff --git a/digitalWatch3524.java b/digitalWatch3524.java new file mode 100644 index 00000000..c60d9f48 --- /dev/null +++ b/digitalWatch3524.java @@ -0,0 +1,58 @@ +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.Scanner; +public class digitalWatch3524 { + public static void main(String[] args) { + System.out.println("2021503524 - Mugundh J B"); + System.out.println("Date: " + LocalDate.now() + " Time: " + LocalTime.now()); + Scanner scanner = new Scanner(System.in); + // Prompt the user for input + System.out.print("Input day (Mon, Tue, Wed, Thu, Fri, Sat, Sun): "); + String day = scanner.nextLine(); + System.out.print("Input hour (24-hour): "); + int hour = scanner.nextInt(); + System.out.print("Input minute: "); + int minute = scanner.nextInt(); + System.out.print("Input second: "); + int second = scanner.nextInt(); + // Validating day input + if (!isValidDay(day)) { + System.out.println("Invalid day input!"); + } else if (hour < 0 || hour > 23 || minute < 0 || minute > 59 || second < 0 || second > 59) { + System.out.println("Invalid time input!"); + } else { + // Advancing time by one second + second++; + if (second == 60) { + second = 0; + minute++; + if (minute == 60) { + minute = 0; + hour++; + if (hour == 24) { + hour = 0; + day = getNextDay(day); + } + } + } + // Displaying the new time + System.out.println("New time: " + day + " " + hour + " " + minute + " " + second); + } + } + // Checking if the given day is valid + public static boolean isValidDay(String day) { + return day.equals("Mon") || day.equals("Tue") || day.equals("Wed") || + day.equals("Thu") || day.equals("Fri") || day.equals("Sat") || day.equals("Sun"); + } + // Getting the next day + public static String getNextDay(String day) { + if (day.equals("Sun")) return "Mon"; + if (day.equals("Mon")) return "Tue"; + if (day.equals("Tue")) return "Wed"; + if (day.equals("Wed")) return "Thu"; + if (day.equals("Thu")) return "Fri"; + if (day.equals("Fri")) return "Sat"; + if (day.equals("Sat")) return "Sun"; + return ""; + } +} diff --git a/displayImage.java b/displayImage.java new file mode 100644 index 00000000..7d8ff1b3 --- /dev/null +++ b/displayImage.java @@ -0,0 +1,17 @@ +import java.awt.*; +import java.applet.*; + + +public class DisplayImage extends Applet { + + Image picture; + + public void init() { + picture = getImage(getDocumentBase(),"sonoo.jpg"); + } + + public void paint(Graphics g) { + g.drawImage(picture, 30,30, this); + } + + } diff --git a/duck number b/duck number new file mode 100644 index 00000000..b5a510f7 --- /dev/null +++ b/duck number @@ -0,0 +1,33 @@ + import java.util.Scanner; +public class DuckNUMBER { + public static void main(String[] args) { + Scanner sc = new Scanner(System.in); + int num = sc.nextInt(); + int rev = 0; + int count = 0; + int count2 = 0; + for (int i = 1; i <= num; i++) { + int num2 = num % i; + if (num2 == 0) { + count++; + } + } + if (count == 2) { + while (num != 0) { + int num3 = num % 10; + rev = rev * 10 + num3; + num = num / 10; + } + System.out.println(+rev); + for (int i = 1; i <= rev; i++) { + int num4 = rev % i; + if (rev % i == 0) { + count2++; + } + } + if (count2 == 2) { + System.out.println(+rev + " : " + "is a twisted prime"); + } + } + } +} diff --git a/enumerations.java b/enumerations.java new file mode 100644 index 00000000..2d596746 --- /dev/null +++ b/enumerations.java @@ -0,0 +1,10 @@ +enum Day { + SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY +} + +public class EnumDemo { + public static void main(String[] args) { + Day today = Day.SUNDAY; + System.out.println("Today is " + today); + } +} diff --git a/exam.class b/exam.class new file mode 100644 index 00000000..6724f4ea Binary files /dev/null and b/exam.class differ diff --git a/exam.java b/exam.java new file mode 100644 index 00000000..a69e3325 --- /dev/null +++ b/exam.java @@ -0,0 +1,185 @@ +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; + +class exam extends JFrame implements ActionListener +{ + JLabel l; + JRadioButton jb[]=new JRadioButton[5]; + JButton b1,b2; + ButtonGroup bg; + int count=0,current=0,x=1,y=1,now=0; + int m[]=new int[10]; + exam(String s) + { + super(s); + l=new JLabel(); + add(l); + bg=new ButtonGroup(); + for(int i=0;i<5;i++) + { + jb[i]=new JRadioButton(); + add(jb[i]); + bg.add(jb[i]); + } + b1=new JButton("Next"); + b2=new JButton("Bookmark"); + b1.addActionListener(this); + b2.addActionListener(this); + add(b1);add(b2); + set(); + l.setBounds(30,40,450,20); + jb[0].setBounds(50,80,100,20); + jb[1].setBounds(50,110,100,20); + jb[2].setBounds(50,140,100,20); + jb[3].setBounds(50,170,100,20); + b1.setBounds(100,240,100,30); + b2.setBounds(270,240,100,30); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setLayout(null); + setLocation(250,100); + setVisible(true); + setSize(600,350); + } + public void actionPerformed(ActionEvent e) + { + if(e.getSource()==b1) + { + if(check()) + count=count+1; + current++; + set(); + if(current==9) + { + b1.setEnabled(false); + b2.setText("Result"); + } + } + if(e.getActionCommand().equals("Bookmark")) + { + JButton bk=new JButton("Bookmark"+x); + bk.setBounds(480,20+30*x,100,30); + add(bk); + bk.addActionListener(this); + m[x]=current; + x++; + current++; + set(); + if(current==9) + b2.setText("Result"); + setVisible(false); + setVisible(true); + } + for(int i=0,y=1;i<x;i++,y++) + { + if(e.getActionCommand().equals("Bookmark"+y)) + { + if(check()) + count=count+1; + now=current; + current=m[y]; + set(); + ((JButton)e.getSource()).setEnabled(false); + current=now; + } + } + + if(e.getActionCommand().equals("Result")) + { + if(check()) + count=count+1; + current++; + //System.out.println("correct ans="+count); + JOptionPane.showMessageDialog(this,"correct ans="+count); + System.exit(0); + } + } + void set() + { + jb[4].setSelected(true); + if(current==0) + { + l.setText("Que1: Which one among these is not a primitive datatype?"); + jb[0].setText("int");jb[1].setText("Float");jb[2].setText("boolean");jb[3].setText("char"); + } + if(current==1) + { + l.setText("Que2: Which class is available to all the class automatically?"); + jb[0].setText("Swing");jb[1].setText("Applet");jb[2].setText("Object");jb[3].setText("ActionEvent"); + } + if(current==2) + { + l.setText("Que3: Which package is directly available to our class without importing it?"); + jb[0].setText("swing");jb[1].setText("applet");jb[2].setText("net");jb[3].setText("lang"); + } + if(current==3) + { + l.setText("Que4: String class is defined in which package?"); + jb[0].setText("lang");jb[1].setText("Swing");jb[2].setText("Applet");jb[3].setText("awt"); + } + if(current==4) + { + l.setText("Que5: Which institute is best for java coaching?"); + jb[0].setText("Utek");jb[1].setText("Aptech");jb[2].setText("SSS IT");jb[3].setText("jtek"); + } + if(current==5) + { + l.setText("Que6: Which one among these is not a keyword?"); + jb[0].setText("class");jb[1].setText("int");jb[2].setText("get");jb[3].setText("if"); + } + if(current==6) + { + l.setText("Que7: Which one among these is not a class? "); + jb[0].setText("Swing");jb[1].setText("Actionperformed");jb[2].setText("ActionEvent"); + jb[3].setText("Button"); + } + if(current==7) + { + l.setText("Que8: which one among these is not a function of Object class?"); + jb[0].setText("toString");jb[1].setText("finalize");jb[2].setText("equals"); + jb[3].setText("getDocumentBase"); + } + if(current==8) + { + l.setText("Que9: which function is not present in Applet class?"); + jb[0].setText("init");jb[1].setText("main");jb[2].setText("start");jb[3].setText("destroy"); + } + if(current==9) + { + l.setText("Que10: Which one among these is not a valid component?"); + jb[0].setText("JButton");jb[1].setText("JList");jb[2].setText("JButtonGroup"); + jb[3].setText("JTextArea"); + } + l.setBounds(30,40,450,20); + for(int i=0,j=0;i<=90;i+=30,j++) + jb[j].setBounds(50,80+i,200,20); + } + boolean check() + { + if(current==0) + return(jb[1].isSelected()); + if(current==1) + return(jb[2].isSelected()); + if(current==2) + return(jb[3].isSelected()); + if(current==3) + return(jb[0].isSelected()); + if(current==4) + return(jb[2].isSelected()); + if(current==5) + return(jb[2].isSelected()); + if(current==6) + return(jb[1].isSelected()); + if(current==7) + return(jb[3].isSelected()); + if(current==8) + return(jb[1].isSelected()); + if(current==9) + return(jb[2].isSelected()); + return false; + } + public static void main(String s[]) + { + new exam("Online Test Of Java"); + } +} \ No newline at end of file diff --git a/facemask.py b/facemask.py new file mode 100644 index 00000000..a84a7fe4 --- /dev/null +++ b/facemask.py @@ -0,0 +1,103 @@ +import numpy as np +import keras +import keras.backend as k +from keras.layers import Conv2D,MaxPooling2D,SpatialDropout2D,Flatten,Dropout,Dense +from keras.models import Sequential,load_model +from keras.optimizers import Adam +from keras.preprocessing import image +import cv2 +import datetime + + +# UNCOMMENT THE FOLLOWING CODE TO TRAIN THE CNN FROM SCRATCH + +# BUILDING MODEL TO CLASSIFY BETWEEN MASK AND NO MASK + +model=Sequential() +model.add(Conv2D(32,(3,3),activation='relu',input_shape=(150,150,3))) +model.add(MaxPooling2D() ) +model.add(Conv2D(32,(3,3),activation='relu')) +model.add(MaxPooling2D() ) +model.add(Conv2D(32,(3,3),activation='relu')) +model.add(MaxPooling2D() ) +model.add(Flatten()) +model.add(Dense(100,activation='relu')) +model.add(Dense(1,activation='sigmoid')) + +model.compile(optimizer='adam',loss='binary_crossentropy',metrics=['accuracy']) + +from keras.preprocessing.image import ImageDataGenerator +train_datagen = ImageDataGenerator( + rescale=1./255, + shear_range=0.2, + zoom_range=0.2, + horizontal_flip=True) + +test_datagen = ImageDataGenerator(rescale=1./255) + +training_set = train_datagen.flow_from_directory( + 'train', + target_size=(150,150), + batch_size=16 , + class_mode='binary') + +test_set = test_datagen.flow_from_directory( + 'test', + target_size=(150,150), + batch_size=16, + class_mode='binary') + +model_saved=model.fit_generator( + training_set, + epochs=10, + validation_data=test_set, + + ) + +model.save('mymodel.h5',model_saved) + +#To test for individual images + +mymodel=load_model('mymodel.h5') +#test_image=image.load_img('C:/Users/Karan/Desktop/ML Datasets/Face Mask Detection/Dataset/test/without_mask/30.jpg',target_size=(150,150,3)) +test_image=image.load_img(r'C:/Users/karan/Desktop/FaceMaskDetector/test/with_mask/1-with-mask.jpg', + target_size=(150,150,3)) +test_image +test_image=image.img_to_array(test_image) +test_image=np.expand_dims(test_image,axis=0) +mymodel.predict(test_image)[0][0] + + +# IMPLEMENTING LIVE DETECTION OF FACE MASK + +mymodel=load_model('mymodel.h5') + +cap=cv2.VideoCapture(0) +face_cascade=cv2.CascadeClassifier('haarcascade_frontalface_default.xml') + +while cap.isOpened(): + _,img=cap.read() + face=face_cascade.detectMultiScale(img,scaleFactor=1.1,minNeighbors=4) + for(x,y,w,h) in face: + face_img = img[y:y+h, x:x+w] + cv2.imwrite('temp.jpg',face_img) + test_image=image.load_img('temp.jpg',target_size=(150,150,3)) + test_image=image.img_to_array(test_image) + test_image=np.expand_dims(test_image,axis=0) + pred=mymodel.predict(test_image)[0][0] + if pred==1: + cv2.rectangle(img,(x,y),(x+w,y+h),(0,0,255),3) + cv2.putText(img,'NO MASK',((x+w)//2,y+h+20),cv2.FONT_HERSHEY_SIMPLEX,1,(0,0,255),3) + else: + cv2.rectangle(img,(x,y),(x+w,y+h),(0,255,0),3) + cv2.putText(img,'MASK',((x+w)//2,y+h+20),cv2.FONT_HERSHEY_SIMPLEX,1,(0,255,0),3) + datet=str(datetime.datetime.now()) + cv2.putText(img,datet,(400,450),cv2.FONT_HERSHEY_SIMPLEX,0.5,(255,255,255),1) + + cv2.imshow('img',img) + + if cv2.waitKey(1)==ord('q'): + break + +cap.release() +cv2.destroyAllWindows() diff --git a/factorial.java b/factorial.java new file mode 100644 index 00000000..168ae190 --- /dev/null +++ b/factorial.java @@ -0,0 +1,19 @@ +import java.util.Scanner; + +public class factorial { + public static void main(String[] args) { + Scanner in = new Scanner(System.in); + System.out.print("Input a number: "); + int n = in.nextInt(); + in.close(); + int fact = 1; + + while(n>0){ + fact= fact*n; + n--; + } + System.err.println("factorial of your number is = " + fact ); + } + + +} diff --git a/fileexplorer.java b/fileexplorer.java new file mode 100644 index 00000000..9f520db3 --- /dev/null +++ b/fileexplorer.java @@ -0,0 +1,206 @@ +import java.io.*; +import java.awt.*; +import java.awt.event.*; +import javax.swing.*; +import javax.swing.tree.*; +/***********************************/ +class Explorer extends JPanel implements ActionListener +{ +JTextField jtf; +JTextArea jta; +JTree tree; +JButton refresh; +JTable jtb; +JScrollPane jsp; +JScrollPane jspTable; + +String currDirectory=null; + +final String[] colHeads={"File Name","SIZE(in Bytes)","Read Only","Hidden"}; +String[][]data={{"","","","",""}}; + +///////////////////////////////// +Explorer(String path) +{ + +jtf=new JTextField(); +jta=new JTextArea(5,30); +refresh=new JButton("Refresh"); + +File temp=new File(path); +DefaultMutableTreeNode top=createTree(temp); + +//if(top!=null) + +tree=new JTree(top); + +jsp=new JScrollPane(tree); + +final String[] colHeads={"File Name","SIZE(in Bytes)","Read Only","Hidden"}; +String[][]data={{"","","","",""}}; +jtb=new JTable(data, colHeads); +jspTable=new JScrollPane(jtb); + +setLayout(new BorderLayout()); +add(jtf,BorderLayout.NORTH); +add(jsp,BorderLayout.WEST); +add(jspTable,BorderLayout.CENTER); +add(refresh,BorderLayout.SOUTH); + +tree.addMouseListener( +new MouseAdapter() +{ +public void mouseClicked(MouseEvent me) +{ +doMouseClicked(me); +} +}); +jtf.addActionListener(this); +refresh.addActionListener(this); +} +/////////////////////////////// +public void actionPerformed(ActionEvent ev) +{ +File temp=new File(jtf.getText()); +DefaultMutableTreeNode newtop=createTree(temp); +if(newtop!=null) + tree=new JTree(newtop); +remove(jsp); +jsp=new JScrollPane(tree); +setVisible(false); +add(jsp,BorderLayout.WEST); +tree.addMouseListener( +new MouseAdapter() +{ +public void mouseClicked(MouseEvent me) +{ +doMouseClicked(me); +} +}); + +setVisible(true); +} +////////////////////////////// + +DefaultMutableTreeNode createTree(File temp) +{ +DefaultMutableTreeNode top=new DefaultMutableTreeNode(temp.getPath()); +if(!(temp.exists() && temp.isDirectory())) + return top; + +fillTree(top,temp.getPath()); + +return top; +} +////////////////////////////// +void fillTree(DefaultMutableTreeNode root, String filename) +{ +File temp=new File(filename); + +if(!(temp.exists() && temp.isDirectory())) + return; +//System.out.println(filename); +File[] filelist=temp.listFiles(); + +for(int i=0; i<filelist.length; i++) +{ +if(!filelist[i].isDirectory()) + continue; +final DefaultMutableTreeNode tempDmtn=new DefaultMutableTreeNode(filelist[i].getName()); +root.add(tempDmtn); +final String newfilename=new String(filename+"\\"+filelist[i].getName()); +Thread t=new Thread() +{ +public void run() +{ +fillTree(tempDmtn,newfilename); +}//run +};//thread +if(t==null) + {System.out.println("no more thread allowed "+newfilename);return;} +t.start(); +}//for +}//function +////////////////////////////// +void doMouseClicked(MouseEvent me) +{ +TreePath tp=tree.getPathForLocation(me.getX(),me.getY()); +if(tp==null) return; +//jtf.setText(tp.toString()); +String s=tp.toString(); +s=s.replace("[",""); +s=s.replace("]",""); +s=s.replace(", ","\\"); +//s=s.replace(" ",""); +//int z=s.lastIndexOf("\"\\\""); +//s="\'"+s; s=s+"\'"; +jtf.setText(s); +showFiles(s); +//java.util.StringTokenizer st=new java.util.StringTokenizer(s,","); +//jtf.setText(jtf.getText()+"="+s); + +} +//////////////////////////////// +void showFiles(String filename) +{ +File temp=new File(filename); +data=new String[][]{{"","","",""}}; +remove(jspTable); +jtb=new JTable(data, colHeads); +jspTable=new JScrollPane(jtb); +setVisible(false); +add(jspTable,BorderLayout.CENTER); +setVisible(true); + +if(!temp.exists()) return; +if(!temp.isDirectory()) return; + +//System.out.println(filename); +File[] filelist=temp.listFiles(); +int fileCounter=0; +data=new String[filelist.length][4]; +for(int i=0; i<filelist.length; i++) +{ +if(filelist[i].isDirectory()) + continue; +data[fileCounter][0]=new String(filelist[i].getName()); +data[fileCounter][1]=new String(filelist[i].length()+""); +data[fileCounter][2]=new String(!filelist[i].canWrite()+""); +data[fileCounter][3]=new String(filelist[i].isHidden()+""); +fileCounter++; +}//for + +String dataTemp[][]=new String[fileCounter][4]; +for(int k=0; k<fileCounter; k++) + dataTemp[k]=data[k]; +data=dataTemp; + +//System.out.println(data); +remove(jspTable); +jtb=new JTable(data, colHeads); +jspTable=new JScrollPane(jtb); +setVisible(false); +add(jspTable,BorderLayout.CENTER); +setVisible(true); +} +//////////////////////////////// +/////////////////////////////// +} +/***********************************/ +class ExplorerTest extends JFrame +{ + +ExplorerTest(String path) +{ +super("Windows Exploder - Javatpoint"); +add(new Explorer(path),"Center"); +setDefaultCloseOperation(EXIT_ON_CLOSE); +setSize(400,400); +setVisible(true); +} + +public static void main(String[] args) +{ +new ExplorerTest("."); +} +} diff --git a/finalVelocity3524.java b/finalVelocity3524.java new file mode 100644 index 00000000..7afecda9 --- /dev/null +++ b/finalVelocity3524.java @@ -0,0 +1,21 @@ +import java.util.Scanner; +public class finalVelocity3524 { + public static void main(String[] args){ + Scanner in = new Scanner(System.in); + System.out.println("2021503524 - Mugundh J B - 09/09/23 - 3 pm"); + + System.out.print("Enter the starting speed: "); + float u = in.nextFloat(); + System.out.print("Enter the acceleration: "); + float a = in.nextFloat(); + System.out.print("Enter the time: "); + float t = in.nextFloat(); + + float d = (float) (u * t + (0.5 * a * t * t)); // Formula to calc displacement + System.out.printf("The displacement is %.2f", d); + + float v = u + a * t; // Formula to calc final velocity + System.out.printf("\nThe final velocity is %.2f", v); + + } +} diff --git a/flight_ticket.java b/flight_ticket.java new file mode 100644 index 00000000..9ab37e66 --- /dev/null +++ b/flight_ticket.java @@ -0,0 +1,45 @@ +import java.util.Scanner; + +public class Flight { + private String flightNumber; + private String sourceLocation; + private String destination; + private int numberOfTickets; + private double ticketFare; + + public void inputFlightData() { + Scanner scanner = new Scanner(System.in); + System.out.print("Enter Flight Number: "); + flightNumber = scanner.nextLine(); + System.out.print("Enter Source Location: "); + sourceLocation = scanner.nextLine(); + System.out.print("Enter Destination: "); + destination = scanner.nextLine(); + System.out.print("Enter Number of Tickets: "); + numberOfTickets = scanner.nextInt(); + System.out.print("Enter Ticket Fare: "); + ticketFare = scanner.nextDouble(); + } + + public double calculateTicketAmount() { + double ticketAmount = numberOfTickets * ticketFare; + double tax = 0.18 * ticketAmount; + double discount = 0.05 * ticketAmount; + return ticketAmount + tax - discount; + } + + public void printTicketDetails() { + System.out.println("Flight Number: " + flightNumber); + System.out.println("Source Location: " + sourceLocation); + System.out.println("Destination: " + destination); + System.out.println("Number of Tickets: " + numberOfTickets); + System.out.println("Ticket Fare: " + ticketFare); + System.out.println("Total Amount Payable: " + calculateTicketAmount()); + } + + public static void main(String[] args) { + Flight flight = new Flight(); + flight.inputFlightData(); + flight.printTicketDetails(); + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..3e927b11 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,21 @@ +# Project-wide Gradle settings. +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true +# AndroidX package structure to make it clearer which packages are bundled with the +# Android operating system, and which are packaged with your app's APK +# https://developer.android.com/topic/libraries/support-library/androidx-rn +android.useAndroidX=true +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true \ No newline at end of file diff --git a/gradlew b/gradlew new file mode 100644 index 00000000..4f906e0c --- /dev/null +++ b/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/greet.java b/greet.java new file mode 100644 index 00000000..23ef60e4 --- /dev/null +++ b/greet.java @@ -0,0 +1,35 @@ +import javax.swing.JFrame; +import javax.swing.JLabel; +import java.awt.FlowLayout; +import javax.swing.JTextField; +import javax.swing.ImageIcon; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +public class OwlGreeting extends JFrame implements ActionListener{ + JLabel labelQuestion, labelGreeting; + JTextField textAnswer; + ImageIcon owl; + public OwlGreeting(){ + setLayout(new FlowLayout()); + labelQuestion = new JLabel("Whooooo's there?"); + textAnswer = new JTextField(10); + labelGreeting = new JLabel(); + owl = new ImageIcon("animal39-2.png"); + textAnswer.addActionListener(this); + add(labelQuestion); + add(textAnswer); + add(labelGreeting); + } + public static void main(String args[]){ + OwlGreeting window = new OwlGreeting(); + window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + window.setSize(275, 100); + window.setTitle("Owl Greeting"); + window.setVisible(true); + } + public void actionPerformed(ActionEvent e){ + String name = textAnswer.getText(); + labelGreeting.setText("Hoot for " + name + "!"); + labelGreeting.setIcon(owl); + } +} \ No newline at end of file diff --git a/guessnumber.java b/guessnumber.java new file mode 100644 index 00000000..838b4e70 --- /dev/null +++ b/guessnumber.java @@ -0,0 +1,37 @@ +import java.util.Random; +import java.util.Scanner; + +public class GuessTheNumberGame { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + Random random = new Random(); + + int lowerBound = 1; + int upperBound = 100; + int numberToGuess = random.nextInt(upperBound - lowerBound + 1) + lowerBound; + int numberOfTries = 0; + boolean hasGuessedCorrectly = false; + + System.out.println("Welcome to the Guess the Number Game!"); + System.out.println("I have selected a random number between " + lowerBound + " and " + upperBound + "."); + + while (!hasGuessedCorrectly) { + System.out.print("Enter your guess: "); + int userGuess = scanner.nextInt(); + numberOfTries++; + + if (userGuess < lowerBound || userGuess > upperBound) { + System.out.println("Please guess a number within the specified range."); + } else if (userGuess < numberToGuess) { + System.out.println("The number is higher. Try again."); + } else if (userGuess > numberToGuess) { + System.out.println("The number is lower. Try again."); + } else { + hasGuessedCorrectly = true; + System.out.println("Congratulations! You've guessed the number in " + numberOfTries + " tries."); + } + } + + scanner.close(); + } +} diff --git a/haarcascade_frontalface_default.xml b/haarcascade_frontalface_default.xml new file mode 100644 index 00000000..cbd1aa89 --- /dev/null +++ b/haarcascade_frontalface_default.xml @@ -0,0 +1,33314 @@ +<?xml version="1.0"?> +<!-- + Stump-based 24x24 discrete(?) adaboost frontal face detector. + Created by Rainer Lienhart. + +//////////////////////////////////////////////////////////////////////////////////////// + + IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. + + By downloading, copying, installing or using the software you agree to this license. + If you do not agree to this license, do not download, install, + copy or use the software. + + + Intel License Agreement + For Open Source Computer Vision Library + + Copyright (C) 2000, Intel Corporation, all rights reserved. + Third party copyrights are property of their respective owners. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + * Redistribution's of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistribution's in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * The name of Intel Corporation may not be used to endorse or promote products + derived from this software without specific prior written permission. + + This software is provided by the copyright holders and contributors "as is" and + any express or implied warranties, including, but not limited to, the implied + warranties of merchantability and fitness for a particular purpose are disclaimed. + In no event shall the Intel Corporation or contributors be liable for any direct, + indirect, incidental, special, exemplary, or consequential damages + (including, but not limited to, procurement of substitute goods or services; + loss of use, data, or profits; or business interruption) however caused + and on any theory of liability, whether in contract, strict liability, + or tort (including negligence or otherwise) arising in any way out of + the use of this software, even if advised of the possibility of such damage. +--> +<opencv_storage> +<cascade type_id="opencv-cascade-classifier"><stageType>BOOST</stageType> + <featureType>HAAR</featureType> + <height>24</height> + <width>24</width> + <stageParams> + <maxWeakCount>211</maxWeakCount></stageParams> + <featureParams> + <maxCatCount>0</maxCatCount></featureParams> + <stageNum>25</stageNum> + <stages> + <_> + <maxWeakCount>9</maxWeakCount> + <stageThreshold>-5.0425500869750977e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 0 -3.1511999666690826e-02</internalNodes> + <leafValues> + 2.0875380039215088e+00 -2.2172100543975830e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1 1.2396000325679779e-02</internalNodes> + <leafValues> + -1.8633940219879150e+00 1.3272049427032471e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2 2.1927999332547188e-02</internalNodes> + <leafValues> + -1.5105249881744385e+00 1.0625729560852051e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 3 5.7529998011887074e-03</internalNodes> + <leafValues> + -8.7463897466659546e-01 1.1760339736938477e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 4 1.5014000236988068e-02</internalNodes> + <leafValues> + -7.7945697307586670e-01 1.2608419656753540e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 5 9.9371001124382019e-02</internalNodes> + <leafValues> + 5.5751299858093262e-01 -1.8743000030517578e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 6 2.7340000960975885e-03</internalNodes> + <leafValues> + -1.6911929845809937e+00 4.4009700417518616e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 7 -1.8859000876545906e-02</internalNodes> + <leafValues> + -1.4769539833068848e+00 4.4350099563598633e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 8 5.9739998541772366e-03</internalNodes> + <leafValues> + -8.5909199714660645e-01 8.5255599021911621e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>16</maxWeakCount> + <stageThreshold>-4.9842400550842285e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 9 -2.1110000088810921e-02</internalNodes> + <leafValues> + 1.2435649633407593e+00 -1.5713009834289551e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 10 2.0355999469757080e-02</internalNodes> + <leafValues> + -1.6204780340194702e+00 1.1817760467529297e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 11 2.1308999508619308e-02</internalNodes> + <leafValues> + -1.9415930509567261e+00 7.0069098472595215e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 12 9.1660000383853912e-02</internalNodes> + <leafValues> + -5.5670100450515747e-01 1.7284419536590576e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 13 3.6288000643253326e-02</internalNodes> + <leafValues> + 2.6763799786567688e-01 -2.1831810474395752e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 14 -1.9109999760985374e-02</internalNodes> + <leafValues> + -2.6730210781097412e+00 4.5670801401138306e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 15 8.2539999857544899e-03</internalNodes> + <leafValues> + -1.0852910280227661e+00 5.3564202785491943e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 16 1.8355000764131546e-02</internalNodes> + <leafValues> + -3.5200199484825134e-01 9.3339198827743530e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 17 -7.0569999516010284e-03</internalNodes> + <leafValues> + 9.2782098054885864e-01 -6.6349899768829346e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 18 -9.8770000040531158e-03</internalNodes> + <leafValues> + 1.1577470302581787e+00 -2.9774799942970276e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 19 1.5814000740647316e-02</internalNodes> + <leafValues> + -4.1960600018501282e-01 1.3576040267944336e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 20 -2.0700000226497650e-02</internalNodes> + <leafValues> + 1.4590020179748535e+00 -1.9739399850368500e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 21 -1.3760800659656525e-01</internalNodes> + <leafValues> + 1.1186759471893311e+00 -5.2915501594543457e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 22 1.4318999834358692e-02</internalNodes> + <leafValues> + -3.5127198696136475e-01 1.1440860033035278e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 23 1.0253000073134899e-02</internalNodes> + <leafValues> + -6.0850602388381958e-01 7.7098500728607178e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 24 9.1508001089096069e-02</internalNodes> + <leafValues> + 3.8817799091339111e-01 -1.5122940540313721e+00</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>27</maxWeakCount> + <stageThreshold>-4.6551899909973145e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 25 6.9747000932693481e-02</internalNodes> + <leafValues> + -1.0130879878997803e+00 1.4687349796295166e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 26 3.1502999365329742e-02</internalNodes> + <leafValues> + -1.6463639736175537e+00 1.0000629425048828e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 27 1.4260999858379364e-02</internalNodes> + <leafValues> + 4.6480301022529602e-01 -1.5959889888763428e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 28 1.4453000389039516e-02</internalNodes> + <leafValues> + -6.5511900186538696e-01 8.3021801710128784e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 29 -3.0509999487549067e-03</internalNodes> + <leafValues> + -1.3982310295104980e+00 4.2550599575042725e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 30 3.2722998410463333e-02</internalNodes> + <leafValues> + -5.0702601671218872e-01 1.0526109933853149e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 31 -7.2960001416504383e-03</internalNodes> + <leafValues> + 3.6356899142265320e-01 -1.3464889526367188e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 32 5.0425000488758087e-02</internalNodes> + <leafValues> + -3.0461400747299194e-01 1.4504129886627197e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 33 4.6879000961780548e-02</internalNodes> + <leafValues> + -4.0286201238632202e-01 1.2145609855651855e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 34 -6.9358997046947479e-02</internalNodes> + <leafValues> + 1.0539360046386719e+00 -4.5719701051712036e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 35 -4.9033999443054199e-02</internalNodes> + <leafValues> + -1.6253089904785156e+00 1.5378999710083008e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 36 8.4827996790409088e-02</internalNodes> + <leafValues> + 2.8402999043464661e-01 -1.5662059783935547e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 37 -1.7229999648407102e-03</internalNodes> + <leafValues> + -1.0147459506988525e+00 2.3294800519943237e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 38 1.1562199890613556e-01</internalNodes> + <leafValues> + -1.6732899844646454e-01 1.2804069519042969e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 39 -5.1279999315738678e-02</internalNodes> + <leafValues> + 1.5162390470504761e+00 -3.0271100997924805e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 40 -4.2706999927759171e-02</internalNodes> + <leafValues> + 1.7631920576095581e+00 -5.1832001656293869e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 41 3.7178099155426025e-01</internalNodes> + <leafValues> + -3.1389200687408447e-01 1.5357979536056519e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 42 1.9412999972701073e-02</internalNodes> + <leafValues> + -1.0017599910497665e-01 9.3655401468276978e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 43 1.7439000308513641e-02</internalNodes> + <leafValues> + -4.0379899740219116e-01 9.6293002367019653e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 44 3.9638999849557877e-02</internalNodes> + <leafValues> + 1.7039099335670471e-01 -2.9602990150451660e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 45 -9.1469995677471161e-03</internalNodes> + <leafValues> + 8.8786798715591431e-01 -4.3818700313568115e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 46 1.7219999572262168e-03</internalNodes> + <leafValues> + -3.7218600511550903e-01 4.0018901228904724e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 47 3.0231000855565071e-02</internalNodes> + <leafValues> + 6.5924003720283508e-02 -2.6469180583953857e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 48 -7.8795999288558960e-02</internalNodes> + <leafValues> + -1.7491459846496582e+00 2.8475299477577209e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 49 2.1110000088810921e-03</internalNodes> + <leafValues> + -9.3908101320266724e-01 2.3205199837684631e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 50 2.7091000229120255e-02</internalNodes> + <leafValues> + -5.2664000540971756e-02 1.0756820440292358e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 51 -4.4964998960494995e-02</internalNodes> + <leafValues> + -1.8294479846954346e+00 9.9561996757984161e-02</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>32</maxWeakCount> + <stageThreshold>-4.4531588554382324e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 52 -6.5701000392436981e-02</internalNodes> + <leafValues> + 1.1558510065078735e+00 -1.0716359615325928e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 53 1.5839999541640282e-02</internalNodes> + <leafValues> + -1.5634720325469971e+00 7.6877099275588989e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 54 1.4570899307727814e-01</internalNodes> + <leafValues> + -5.7450097799301147e-01 1.3808720111846924e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 55 6.1389999464154243e-03</internalNodes> + <leafValues> + -1.4570560455322266e+00 5.1610302925109863e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 56 6.7179999314248562e-03</internalNodes> + <leafValues> + -8.3533602952957153e-01 5.8522200584411621e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 57 1.8518000841140747e-02</internalNodes> + <leafValues> + -3.1312099099159241e-01 1.1696679592132568e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 58 1.9958000630140305e-02</internalNodes> + <leafValues> + -4.3442600965499878e-01 9.5446902513504028e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 59 -2.7755001187324524e-01</internalNodes> + <leafValues> + 1.4906179904937744e+00 -1.3815900683403015e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 60 9.1859996318817139e-03</internalNodes> + <leafValues> + -9.6361500024795532e-01 2.7665498852729797e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 61 -3.7737999111413956e-02</internalNodes> + <leafValues> + -2.4464108943939209e+00 2.3619599640369415e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 62 1.8463000655174255e-02</internalNodes> + <leafValues> + 1.7539200186729431e-01 -1.3423130512237549e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 63 -1.1114999651908875e-02</internalNodes> + <leafValues> + 4.8710799217224121e-01 -8.9851897954940796e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 64 3.3927999436855316e-02</internalNodes> + <leafValues> + 1.7874200642108917e-01 -1.6342279911041260e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 65 -3.5649001598358154e-02</internalNodes> + <leafValues> + -1.9607399702072144e+00 1.8102499842643738e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 66 -1.1438000015914440e-02</internalNodes> + <leafValues> + 9.9010699987411499e-01 -3.8103199005126953e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 67 -6.5236002206802368e-02</internalNodes> + <leafValues> + -2.5794160366058350e+00 2.4753600358963013e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 68 -4.2272001504898071e-02</internalNodes> + <leafValues> + 1.4411840438842773e+00 -2.9508298635482788e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 69 1.9219999667257071e-03</internalNodes> + <leafValues> + -4.9608600139617920e-01 6.3173598051071167e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 70 -1.2921799719333649e-01</internalNodes> + <leafValues> + -2.3314270973205566e+00 5.4496999830007553e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 71 2.2931000217795372e-02</internalNodes> + <leafValues> + -8.4447097778320312e-01 3.8738098740577698e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 72 -3.4120000898838043e-02</internalNodes> + <leafValues> + -1.4431500434875488e+00 9.8422996699810028e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 73 2.6223000138998032e-02</internalNodes> + <leafValues> + 1.8223099410533905e-01 -1.2586519718170166e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 74 2.2236999124288559e-02</internalNodes> + <leafValues> + 6.9807998836040497e-02 -2.3820950984954834e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 75 -5.8240001089870930e-03</internalNodes> + <leafValues> + 3.9332500100135803e-01 -2.7542799711227417e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 76 4.3653000146150589e-02</internalNodes> + <leafValues> + 1.4832699298858643e-01 -1.1368780136108398e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 77 5.7266999036073685e-02</internalNodes> + <leafValues> + 2.4628099799156189e-01 -1.2687400579452515e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 78 2.3409998975694180e-03</internalNodes> + <leafValues> + -7.5448900461196899e-01 2.7163800597190857e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 79 1.2996000237762928e-02</internalNodes> + <leafValues> + -3.6394900083541870e-01 7.0959198474884033e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 80 -2.6517000049352646e-02</internalNodes> + <leafValues> + -2.3221859931945801e+00 3.5744000226259232e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 81 -5.8400002308189869e-03</internalNodes> + <leafValues> + 4.2194300889968872e-01 -4.8184998333454132e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 82 -1.6568999737501144e-02</internalNodes> + <leafValues> + 1.1099940538406372e+00 -3.4849700331687927e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 83 -6.8157002329826355e-02</internalNodes> + <leafValues> + -3.3269989490509033e+00 2.1299000084400177e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>52</maxWeakCount> + <stageThreshold>-4.3864588737487793e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 84 3.9974000304937363e-02</internalNodes> + <leafValues> + -1.2173449993133545e+00 1.0826710462570190e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 85 1.8819500505924225e-01</internalNodes> + <leafValues> + -4.8289400339126587e-01 1.4045250415802002e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 86 7.8027002513408661e-02</internalNodes> + <leafValues> + -1.0782150030136108e+00 7.4040299654006958e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 87 1.1899999663000926e-04</internalNodes> + <leafValues> + -1.2019979953765869e+00 3.7749201059341431e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 88 8.5056997835636139e-02</internalNodes> + <leafValues> + -4.3939098715782166e-01 1.2647340297698975e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 89 8.9720003306865692e-03</internalNodes> + <leafValues> + -1.8440499901771545e-01 4.5726400613784790e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 90 8.8120000436902046e-03</internalNodes> + <leafValues> + 3.0396699905395508e-01 -9.5991098880767822e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 91 -2.3507999256253242e-02</internalNodes> + <leafValues> + 1.2487529516220093e+00 4.6227999031543732e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 92 7.0039997808635235e-03</internalNodes> + <leafValues> + -5.9442102909088135e-01 5.3963297605514526e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 93 3.3851999789476395e-02</internalNodes> + <leafValues> + 2.8496098518371582e-01 -1.4895249605178833e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 94 -3.2530000898987055e-03</internalNodes> + <leafValues> + 4.8120799660682678e-01 -5.2712398767471313e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 95 2.9097000136971474e-02</internalNodes> + <leafValues> + 2.6743900775909424e-01 -1.6007850170135498e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 96 -8.4790000692009926e-03</internalNodes> + <leafValues> + -1.3107639551162720e+00 1.5243099629878998e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 97 -1.0795000009238720e-02</internalNodes> + <leafValues> + 4.5613598823547363e-01 -7.2050899267196655e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 98 -2.4620000272989273e-02</internalNodes> + <leafValues> + -1.7320619821548462e+00 6.8363003432750702e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 99 3.7380000576376915e-03</internalNodes> + <leafValues> + -1.9303299486637115e-01 6.8243497610092163e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 100 -1.2264000251889229e-02</internalNodes> + <leafValues> + -1.6095290184020996e+00 7.5268000364303589e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 101 -4.8670000396668911e-03</internalNodes> + <leafValues> + 7.4286502599716187e-01 -2.1510200202465057e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 102 7.6725997030735016e-02</internalNodes> + <leafValues> + -2.6835098862648010e-01 1.3094140291213989e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 103 2.8578000143170357e-02</internalNodes> + <leafValues> + -5.8793000876903534e-02 1.2196329832077026e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 104 1.9694000482559204e-02</internalNodes> + <leafValues> + -3.5142898559570312e-01 8.4926998615264893e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 105 -2.9093999415636063e-02</internalNodes> + <leafValues> + -1.0507299900054932e+00 2.9806300997734070e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 106 -2.9144000262022018e-02</internalNodes> + <leafValues> + 8.2547801733016968e-01 -3.2687199115753174e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 107 1.9741000607609749e-02</internalNodes> + <leafValues> + 2.0452600717544556e-01 -8.3760201930999756e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 108 4.3299999088048935e-03</internalNodes> + <leafValues> + 2.0577900111675262e-01 -6.6829800605773926e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 109 -3.5500999540090561e-02</internalNodes> + <leafValues> + -1.2969900369644165e+00 1.3897499442100525e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 110 -1.6172999516129494e-02</internalNodes> + <leafValues> + -1.3110569715499878e+00 7.5751997530460358e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 111 -2.2151000797748566e-02</internalNodes> + <leafValues> + -1.0524389743804932e+00 1.9241100549697876e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 112 -2.2707000374794006e-02</internalNodes> + <leafValues> + -1.3735309839248657e+00 6.6780999302864075e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 113 1.6607999801635742e-02</internalNodes> + <leafValues> + -3.7135999649763107e-02 7.7846401929855347e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 114 -1.3309000059962273e-02</internalNodes> + <leafValues> + -9.9850702285766602e-01 1.2248100340366364e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 115 -3.3732000738382339e-02</internalNodes> + <leafValues> + 1.4461359977722168e+00 1.3151999562978745e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 116 1.6935000196099281e-02</internalNodes> + <leafValues> + -3.7121298909187317e-01 5.2842199802398682e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 117 3.3259999472647905e-03</internalNodes> + <leafValues> + -5.7568502426147461e-01 3.9261901378631592e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 118 8.3644002676010132e-02</internalNodes> + <leafValues> + 1.6116000711917877e-02 -2.1173279285430908e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 119 2.5785198807716370e-01</internalNodes> + <leafValues> + -8.1609003245830536e-02 9.8782497644424438e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 120 -3.6566998809576035e-02</internalNodes> + <leafValues> + -1.1512110233306885e+00 9.6459001302719116e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 121 -1.6445999965071678e-02</internalNodes> + <leafValues> + 3.7315499782562256e-01 -1.4585399627685547e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 122 -3.7519999314099550e-03</internalNodes> + <leafValues> + 2.6179298758506775e-01 -5.8156698942184448e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 123 -6.3660000450909138e-03</internalNodes> + <leafValues> + 7.5477397441864014e-01 -1.7055200040340424e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 124 -3.8499999791383743e-03</internalNodes> + <leafValues> + 2.2653999924659729e-01 -6.3876402378082275e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 125 -4.5494001358747482e-02</internalNodes> + <leafValues> + -1.2640299797058105e+00 2.5260698795318604e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 126 -2.3941000923514366e-02</internalNodes> + <leafValues> + 8.7068402767181396e-01 -2.7104699611663818e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 127 -7.7558003365993500e-02</internalNodes> + <leafValues> + -1.3901610374450684e+00 2.3612299561500549e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 128 2.3614000529050827e-02</internalNodes> + <leafValues> + 6.6140003502368927e-02 -1.2645419836044312e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 129 -2.5750000495463610e-03</internalNodes> + <leafValues> + -5.3841698169708252e-01 3.0379098653793335e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 130 1.2010800093412399e-01</internalNodes> + <leafValues> + -3.5343000292778015e-01 5.2866202592849731e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 131 2.2899999748915434e-03</internalNodes> + <leafValues> + -5.8701997995376587e-01 2.4061000347137451e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 132 6.9716997444629669e-02</internalNodes> + <leafValues> + -3.3348900079727173e-01 5.1916301250457764e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 133 -4.6670001000165939e-02</internalNodes> + <leafValues> + 6.9795399904251099e-01 -1.4895999804139137e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 134 -5.0129000097513199e-02</internalNodes> + <leafValues> + 8.6146199703216553e-01 -2.5986000895500183e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 135 3.0147999525070190e-02</internalNodes> + <leafValues> + 1.9332799315452576e-01 -5.9131097793579102e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>53</maxWeakCount> + <stageThreshold>-4.1299300193786621e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 136 9.1085001826286316e-02</internalNodes> + <leafValues> + -8.9233100414276123e-01 1.0434230566024780e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 137 1.2818999588489532e-02</internalNodes> + <leafValues> + -1.2597670555114746e+00 5.5317097902297974e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 138 1.5931999310851097e-02</internalNodes> + <leafValues> + -8.6254400014877319e-01 6.3731801509857178e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 139 2.2780001163482666e-03</internalNodes> + <leafValues> + -7.4639201164245605e-01 5.3155601024627686e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 140 3.1840998679399490e-02</internalNodes> + <leafValues> + -1.2650489807128906e+00 3.6153900623321533e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 141 2.6960000395774841e-03</internalNodes> + <leafValues> + -9.8290401697158813e-01 3.6013001203536987e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 142 -1.2055000290274620e-02</internalNodes> + <leafValues> + 6.4068400859832764e-01 -5.0125002861022949e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 143 2.1324999630451202e-02</internalNodes> + <leafValues> + -2.4034999310970306e-01 8.5448002815246582e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 144 3.0486000701785088e-02</internalNodes> + <leafValues> + -3.4273600578308105e-01 1.1428849697113037e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 145 -4.5079998672008514e-02</internalNodes> + <leafValues> + 1.0976949930191040e+00 -1.7974600195884705e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 146 -7.1700997650623322e-02</internalNodes> + <leafValues> + 1.5735000371932983e+00 -3.1433498859405518e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 147 5.9218000620603561e-02</internalNodes> + <leafValues> + -2.7582401037216187e-01 1.0448570251464844e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 148 6.7010000348091125e-03</internalNodes> + <leafValues> + -1.0974019765853882e+00 1.9801199436187744e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 149 4.1046999394893646e-02</internalNodes> + <leafValues> + 3.0547699332237244e-01 -1.3287999629974365e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 150 -8.5499999113380909e-04</internalNodes> + <leafValues> + 2.5807100534439087e-01 -7.0052897930145264e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 151 -3.0360000208020210e-02</internalNodes> + <leafValues> + -1.2306419610977173e+00 2.2609399259090424e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 152 -1.2930000200867653e-02</internalNodes> + <leafValues> + 4.0758600831031799e-01 -5.1234501600265503e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 153 3.7367999553680420e-02</internalNodes> + <leafValues> + -9.4755001366138458e-02 6.1765098571777344e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 154 2.4434000253677368e-02</internalNodes> + <leafValues> + -4.1100600361824036e-01 4.7630500793457031e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 155 5.7007998228073120e-02</internalNodes> + <leafValues> + 2.5249299407005310e-01 -6.8669801950454712e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 156 -1.6313999891281128e-02</internalNodes> + <leafValues> + -9.3928402662277222e-01 1.1448100209236145e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 157 -1.7648899555206299e-01</internalNodes> + <leafValues> + 1.2451089620590210e+00 -5.6519001722335815e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 158 1.7614600062370300e-01</internalNodes> + <leafValues> + -3.2528200745582581e-01 8.2791501283645630e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 159 -7.3910001665353775e-03</internalNodes> + <leafValues> + 3.4783700108528137e-01 -1.7929099500179291e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 160 6.0890998691320419e-02</internalNodes> + <leafValues> + 5.5098000913858414e-02 -1.5480779409408569e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 161 -2.9123000800609589e-02</internalNodes> + <leafValues> + -1.0255639553070068e+00 2.4106900393962860e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 162 -4.5648999512195587e-02</internalNodes> + <leafValues> + 1.0301599502563477e+00 -3.1672099232673645e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 163 3.7333000451326370e-02</internalNodes> + <leafValues> + 2.1620599925518036e-01 -8.2589900493621826e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 164 -2.4411000311374664e-02</internalNodes> + <leafValues> + -1.5957959890365601e+00 5.1139000803232193e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 165 -5.9806998819112778e-02</internalNodes> + <leafValues> + -1.0312290191650391e+00 1.3092300295829773e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 166 -3.0106000602245331e-02</internalNodes> + <leafValues> + -1.4781630039215088e+00 3.7211999297142029e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 167 7.4209999293088913e-03</internalNodes> + <leafValues> + -2.4024100601673126e-01 4.9333998560905457e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 168 -2.1909999195486307e-03</internalNodes> + <leafValues> + 2.8941500186920166e-01 -5.7259601354598999e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 169 2.0860999822616577e-02</internalNodes> + <leafValues> + -2.3148399591445923e-01 6.3765901327133179e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 170 -6.6990000195801258e-03</internalNodes> + <leafValues> + -1.2107750177383423e+00 6.4018003642559052e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 171 1.8758000805974007e-02</internalNodes> + <leafValues> + 2.4461300671100616e-01 -9.9786698818206787e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 172 -4.4323001056909561e-02</internalNodes> + <leafValues> + -1.3699189424514771e+00 3.6051999777555466e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 173 2.2859999909996986e-02</internalNodes> + <leafValues> + 2.1288399398326874e-01 -1.0397620201110840e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 174 -9.8600005730986595e-04</internalNodes> + <leafValues> + 3.2443600893020630e-01 -5.4291802644729614e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 175 1.7239000648260117e-02</internalNodes> + <leafValues> + -2.8323900699615479e-01 4.4468200206756592e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 176 -3.4531001001596451e-02</internalNodes> + <leafValues> + -2.3107020854949951e+00 -3.1399999279528856e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 177 6.7006997764110565e-02</internalNodes> + <leafValues> + 2.8715699911117554e-01 -6.4481002092361450e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 178 2.3776899278163910e-01</internalNodes> + <leafValues> + -2.7174800634384155e-01 8.0219101905822754e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 179 -1.2903000228106976e-02</internalNodes> + <leafValues> + -1.5317620038986206e+00 2.1423600614070892e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 180 1.0514999739825726e-02</internalNodes> + <leafValues> + 7.7037997543811798e-02 -1.0581140518188477e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 181 1.6969000920653343e-02</internalNodes> + <leafValues> + 1.4306700229644775e-01 -8.5828399658203125e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 182 -7.2460002265870571e-03</internalNodes> + <leafValues> + -1.1020129919052124e+00 6.4906999468803406e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 183 1.0556999593973160e-02</internalNodes> + <leafValues> + 1.3964000158011913e-02 6.3601499795913696e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 184 6.1380001716315746e-03</internalNodes> + <leafValues> + -3.4545901417732239e-01 5.6296801567077637e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 185 1.3158000074326992e-02</internalNodes> + <leafValues> + 1.9927300512790680e-01 -1.5040320158004761e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 186 3.1310000922530890e-03</internalNodes> + <leafValues> + -4.0903699398040771e-01 3.7796398997306824e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 187 -1.0920699685811996e-01</internalNodes> + <leafValues> + -2.2227079868316650e+00 1.2178199738264084e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 188 8.1820003688335419e-03</internalNodes> + <leafValues> + -2.8652000427246094e-01 6.7890799045562744e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>62</maxWeakCount> + <stageThreshold>-4.0218091011047363e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 189 3.1346999108791351e-02</internalNodes> + <leafValues> + -8.8884598016738892e-01 9.4936800003051758e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 190 3.1918000429868698e-02</internalNodes> + <leafValues> + -1.1146880388259888e+00 4.8888999223709106e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 191 6.5939999185502529e-03</internalNodes> + <leafValues> + -1.0097689628601074e+00 4.9723801016807556e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 192 2.6148000732064247e-02</internalNodes> + <leafValues> + 2.5991299748420715e-01 -1.2537480592727661e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 193 1.2845000252127647e-02</internalNodes> + <leafValues> + -5.7138597965240479e-01 5.9659498929977417e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 194 2.6344999670982361e-02</internalNodes> + <leafValues> + -5.5203199386596680e-01 3.0217400193214417e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 195 -1.5083000063896179e-02</internalNodes> + <leafValues> + -1.2871240377426147e+00 2.2354200482368469e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 196 -3.8887001574039459e-02</internalNodes> + <leafValues> + 1.7425049543380737e+00 -9.9747002124786377e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 197 -5.7029998861253262e-03</internalNodes> + <leafValues> + -1.0523240566253662e+00 1.8362599611282349e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 198 -1.4860000228509307e-03</internalNodes> + <leafValues> + 5.6784200668334961e-01 -4.6742001175880432e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 199 -2.8486000373959541e-02</internalNodes> + <leafValues> + 1.3082909584045410e+00 -2.6460900902748108e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 200 6.6224999725818634e-02</internalNodes> + <leafValues> + -4.6210700273513794e-01 4.1749599575996399e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 201 8.8569996878504753e-03</internalNodes> + <leafValues> + -4.1474899649620056e-01 5.9204798936843872e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 202 1.1355999857187271e-02</internalNodes> + <leafValues> + 3.6103099584579468e-01 -4.5781201124191284e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 203 -2.7679998893290758e-03</internalNodes> + <leafValues> + -8.9238899946212769e-01 1.4199000597000122e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 204 1.1246999725699425e-02</internalNodes> + <leafValues> + 2.9353401064872742e-01 -9.7330600023269653e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 205 7.1970000863075256e-03</internalNodes> + <leafValues> + -7.9334902763366699e-01 1.8313400447368622e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 206 3.1768999993801117e-02</internalNodes> + <leafValues> + 1.5523099899291992e-01 -1.3245639801025391e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 207 2.5173999369144440e-02</internalNodes> + <leafValues> + 3.4214999526739120e-02 -2.0948131084442139e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 208 7.5360001064836979e-03</internalNodes> + <leafValues> + -3.9450600743293762e-01 5.1333999633789062e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 209 3.2873000949621201e-02</internalNodes> + <leafValues> + 8.8372997939586639e-02 -1.2814120054244995e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 210 -2.7379998937249184e-03</internalNodes> + <leafValues> + 5.5286502838134766e-01 -4.6384999155998230e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 211 -3.8075000047683716e-02</internalNodes> + <leafValues> + -1.8497270345687866e+00 4.5944001525640488e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 212 -3.8984000682830811e-02</internalNodes> + <leafValues> + -4.8223701119422913e-01 3.4760600328445435e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 213 2.8029999230057001e-03</internalNodes> + <leafValues> + -4.5154699683189392e-01 4.2806300520896912e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 214 -5.4145999252796173e-02</internalNodes> + <leafValues> + -8.4520798921585083e-01 1.6674900054931641e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 215 -8.3280000835657120e-03</internalNodes> + <leafValues> + 3.5348299145698547e-01 -4.7163200378417969e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 216 3.3778000622987747e-02</internalNodes> + <leafValues> + 1.8463100492954254e-01 -1.6686669588088989e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 217 -1.1238099634647369e-01</internalNodes> + <leafValues> + -1.2521569728851318e+00 3.5992000252008438e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 218 -1.0408000089228153e-02</internalNodes> + <leafValues> + -8.1620401144027710e-01 2.3428599536418915e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 219 -4.9439999274909496e-03</internalNodes> + <leafValues> + -9.2584699392318726e-01 1.0034800320863724e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 220 -9.3029998242855072e-03</internalNodes> + <leafValues> + 5.6499302387237549e-01 -1.8881900608539581e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 221 -1.1749999597668648e-02</internalNodes> + <leafValues> + 8.0302399396896362e-01 -3.8277000188827515e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 222 -2.3217000067234039e-02</internalNodes> + <leafValues> + -8.4926998615264893e-01 1.9671200215816498e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 223 1.6866000369191170e-02</internalNodes> + <leafValues> + -4.0591898560523987e-01 5.0695300102233887e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 224 -2.4031000211834908e-02</internalNodes> + <leafValues> + -1.5297520160675049e+00 2.3344999551773071e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 225 -3.6945998668670654e-02</internalNodes> + <leafValues> + 6.3007700443267822e-01 -3.1780400872230530e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 226 -6.1563998460769653e-02</internalNodes> + <leafValues> + 5.8627897500991821e-01 -1.2107999995350838e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 227 2.1661000326275826e-02</internalNodes> + <leafValues> + -2.5623700022697449e-01 1.0409849882125854e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 228 -3.6710000131279230e-03</internalNodes> + <leafValues> + 2.9171100258827209e-01 -8.3287298679351807e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 229 4.4849000871181488e-02</internalNodes> + <leafValues> + -3.9633199572563171e-01 4.5662000775337219e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 230 5.7195000350475311e-02</internalNodes> + <leafValues> + 2.1023899316787720e-01 -1.5004800558090210e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 231 -1.1342000216245651e-02</internalNodes> + <leafValues> + 4.4071298837661743e-01 -3.8653799891471863e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 232 -1.2004000134766102e-02</internalNodes> + <leafValues> + 9.3954598903656006e-01 -1.0589499771595001e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 233 2.2515999153256416e-02</internalNodes> + <leafValues> + 9.4480002298951149e-03 -1.6799509525299072e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 234 -1.9809000194072723e-02</internalNodes> + <leafValues> + -1.0133639574050903e+00 2.4146600067615509e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 235 1.5891000628471375e-02</internalNodes> + <leafValues> + -3.7507599592208862e-01 4.6614098548889160e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 236 -9.1420002281665802e-03</internalNodes> + <leafValues> + -8.0484098196029663e-01 1.7816999554634094e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 237 -4.4740000739693642e-03</internalNodes> + <leafValues> + -1.0562069416046143e+00 7.3305003345012665e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 238 1.2742500007152557e-01</internalNodes> + <leafValues> + 2.0165599882602692e-01 -1.5467929840087891e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 239 4.7703001648187637e-02</internalNodes> + <leafValues> + -3.7937799096107483e-01 3.7885999679565430e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 240 5.3608000278472900e-02</internalNodes> + <leafValues> + 2.1220499277114868e-01 -1.2399710416793823e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 241 -3.9680998772382736e-02</internalNodes> + <leafValues> + -1.0257550477981567e+00 5.1282998174428940e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 242 -6.7327000200748444e-02</internalNodes> + <leafValues> + -1.0304750204086304e+00 2.3005299270153046e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 243 1.3337600231170654e-01</internalNodes> + <leafValues> + -2.0869000256061554e-01 1.2272510528564453e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 244 -2.0919300615787506e-01</internalNodes> + <leafValues> + 8.7929898500442505e-01 -4.4254999607801437e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 245 -6.5589003264904022e-02</internalNodes> + <leafValues> + 1.0443429946899414e+00 -2.1682099997997284e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 246 6.1882998794317245e-02</internalNodes> + <leafValues> + 1.3798199594020844e-01 -1.9009059667587280e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 247 -2.5578999891877174e-02</internalNodes> + <leafValues> + -1.6607600450515747e+00 5.8439997956156731e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 248 -3.4827001392841339e-02</internalNodes> + <leafValues> + 7.9940402507781982e-01 -8.2406997680664062e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 249 -1.8209999427199364e-02</internalNodes> + <leafValues> + -9.6073997020721436e-01 6.6320002079010010e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 250 1.5070999972522259e-02</internalNodes> + <leafValues> + 1.9899399578571320e-01 -7.6433002948760986e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>72</maxWeakCount> + <stageThreshold>-3.8832089900970459e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 251 4.6324998140335083e-02</internalNodes> + <leafValues> + -1.0362670421600342e+00 8.2201498746871948e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 252 1.5406999737024307e-02</internalNodes> + <leafValues> + -1.2327589988708496e+00 2.9647698998451233e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 253 1.2808999978005886e-02</internalNodes> + <leafValues> + -7.5852298736572266e-01 5.7985502481460571e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 254 4.9150999635457993e-02</internalNodes> + <leafValues> + -3.8983899354934692e-01 8.9680302143096924e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 255 1.2621000409126282e-02</internalNodes> + <leafValues> + -7.1799302101135254e-01 5.0440901517868042e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 256 -1.8768999725580215e-02</internalNodes> + <leafValues> + 5.5147600173950195e-01 -7.0555400848388672e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 257 4.1965000331401825e-02</internalNodes> + <leafValues> + -4.4782099127769470e-01 7.0985502004623413e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 258 -5.1401998847723007e-02</internalNodes> + <leafValues> + -1.0932120084762573e+00 2.6701900362968445e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 259 -7.0960998535156250e-02</internalNodes> + <leafValues> + 8.3618402481079102e-01 -3.8318100571632385e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 260 1.6745999455451965e-02</internalNodes> + <leafValues> + -2.5733101367950439e-01 2.5966501235961914e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 261 -6.2400000169873238e-03</internalNodes> + <leafValues> + 3.1631499528884888e-01 -5.8796900510787964e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 262 -3.9397999644279480e-02</internalNodes> + <leafValues> + -1.0491210222244263e+00 1.6822400689125061e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 263 0.</internalNodes> + <leafValues> + 1.6144199669361115e-01 -8.7876898050308228e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 264 -2.2307999432086945e-02</internalNodes> + <leafValues> + -6.9053500890731812e-01 2.3607000708580017e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 265 1.8919999711215496e-03</internalNodes> + <leafValues> + 2.4989199638366699e-01 -5.6583297252655029e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 266 1.0730000212788582e-03</internalNodes> + <leafValues> + -5.0415802001953125e-01 3.8374501466751099e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 267 3.9230998605489731e-02</internalNodes> + <leafValues> + 4.2619001120328903e-02 -1.3875889778137207e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 268 6.2238000333309174e-02</internalNodes> + <leafValues> + 1.4119400084018707e-01 -1.0688860416412354e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 269 2.1399999968707561e-03</internalNodes> + <leafValues> + -8.9622402191162109e-01 1.9796399772167206e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 270 9.1800000518560410e-04</internalNodes> + <leafValues> + -4.5337298512458801e-01 4.3532699346542358e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 271 -6.9169998168945312e-03</internalNodes> + <leafValues> + 3.3822798728942871e-01 -4.4793000817298889e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 272 -2.3866999894380569e-02</internalNodes> + <leafValues> + -7.8908598423004150e-01 2.2511799633502960e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 273 -1.0262800008058548e-01</internalNodes> + <leafValues> + -2.2831439971923828e+00 -5.3960001096129417e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 274 -9.5239998772740364e-03</internalNodes> + <leafValues> + 3.9346700906753540e-01 -5.2242201566696167e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 275 3.9877001196146011e-02</internalNodes> + <leafValues> + 3.2799001783132553e-02 -1.5079489946365356e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 276 -1.3144999742507935e-02</internalNodes> + <leafValues> + -1.0839990377426147e+00 1.8482400476932526e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 277 -5.0590999424457550e-02</internalNodes> + <leafValues> + -1.8822289705276489e+00 -2.2199999075382948e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 278 2.4917000904679298e-02</internalNodes> + <leafValues> + 1.4593400061130524e-01 -2.2196519374847412e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 279 -7.6370001770555973e-03</internalNodes> + <leafValues> + -1.0164569616317749e+00 5.8797001838684082e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 280 4.2911998927593231e-02</internalNodes> + <leafValues> + 1.5443000197410583e-01 -1.1843889951705933e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 281 2.3000000510364771e-04</internalNodes> + <leafValues> + -7.7305799722671509e-01 1.2189900130033493e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 282 9.0929996222257614e-03</internalNodes> + <leafValues> + -1.1450099945068359e-01 7.1091300249099731e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 283 1.1145000346004963e-02</internalNodes> + <leafValues> + 7.0000998675823212e-02 -1.0534820556640625e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 284 -5.2453000098466873e-02</internalNodes> + <leafValues> + -1.7594360113143921e+00 1.9523799419403076e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 285 -2.3020699620246887e-01</internalNodes> + <leafValues> + 9.5840299129486084e-01 -2.5045698881149292e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 286 -1.6365999355912209e-02</internalNodes> + <leafValues> + 4.6731901168823242e-01 -2.1108399331569672e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 287 -1.7208000645041466e-02</internalNodes> + <leafValues> + 7.0835697650909424e-01 -2.8018298745155334e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 288 -3.6648001521825790e-02</internalNodes> + <leafValues> + -1.1013339757919312e+00 2.4341100454330444e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 289 -1.0304999537765980e-02</internalNodes> + <leafValues> + -1.0933129787445068e+00 5.6258998811244965e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 290 -1.3713000342249870e-02</internalNodes> + <leafValues> + -2.6438099145889282e-01 1.9821000099182129e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 291 2.9308000579476357e-02</internalNodes> + <leafValues> + -2.2142399847507477e-01 1.0525950193405151e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 292 2.4077000096440315e-02</internalNodes> + <leafValues> + 1.8485699594020844e-01 -1.7203969955444336e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 293 6.1280000954866409e-03</internalNodes> + <leafValues> + -9.2721498012542725e-01 5.8752998709678650e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 294 -2.2377999499440193e-02</internalNodes> + <leafValues> + 1.9646559953689575e+00 2.7785999700427055e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 295 -7.0440000854432583e-03</internalNodes> + <leafValues> + 2.1427600085735321e-01 -4.8407599329948425e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 296 -4.0603000670671463e-02</internalNodes> + <leafValues> + -1.1754349470138550e+00 1.6061200201511383e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 297 -2.4466000497341156e-02</internalNodes> + <leafValues> + -1.1239900588989258e+00 4.1110001504421234e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 298 2.5309999473392963e-03</internalNodes> + <leafValues> + -1.7169700562953949e-01 3.2178801298141479e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 299 -1.9588999450206757e-02</internalNodes> + <leafValues> + 8.2720202207565308e-01 -2.6376700401306152e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 300 -2.9635999351739883e-02</internalNodes> + <leafValues> + -1.1524770259857178e+00 1.4999300241470337e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 301 -1.5030000358819962e-02</internalNodes> + <leafValues> + -1.0491830110549927e+00 4.0160998702049255e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 302 -6.0715001076459885e-02</internalNodes> + <leafValues> + -1.0903840065002441e+00 1.5330800414085388e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 303 -1.2790000066161156e-02</internalNodes> + <leafValues> + 4.2248600721359253e-01 -4.2399200797080994e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 304 -2.0247999578714371e-02</internalNodes> + <leafValues> + -9.1866999864578247e-01 1.8485699594020844e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 305 -3.0683999881148338e-02</internalNodes> + <leafValues> + -1.5958670377731323e+00 2.5760000571608543e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 306 -2.0718000829219818e-02</internalNodes> + <leafValues> + -6.6299998760223389e-01 3.1037199497222900e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 307 -1.7290000105276704e-03</internalNodes> + <leafValues> + 1.9183400273323059e-01 -6.5084999799728394e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 308 -3.1394001096487045e-02</internalNodes> + <leafValues> + -6.3643002510070801e-01 1.5408399701118469e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 309 1.9003000110387802e-02</internalNodes> + <leafValues> + -1.8919399380683899e-01 1.5294510126113892e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 310 6.1769997701048851e-03</internalNodes> + <leafValues> + -1.0597900301218033e-01 6.4859598875045776e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 311 -1.0165999643504620e-02</internalNodes> + <leafValues> + -1.0802700519561768e+00 3.7176001816987991e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 312 -1.4169999631121755e-03</internalNodes> + <leafValues> + 3.4157499670982361e-01 -9.7737997770309448e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 313 -4.0799998678267002e-03</internalNodes> + <leafValues> + 4.7624599933624268e-01 -3.4366300702095032e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 314 -4.4096998870372772e-02</internalNodes> + <leafValues> + 9.7634297609329224e-01 -1.9173000007867813e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 315 -6.0669999569654465e-02</internalNodes> + <leafValues> + -2.1752851009368896e+00 -2.8925999999046326e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 316 -3.2931998372077942e-02</internalNodes> + <leafValues> + -6.4383101463317871e-01 1.6494099795818329e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 317 -1.4722800254821777e-01</internalNodes> + <leafValues> + -1.4745830297470093e+00 2.5839998852461576e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 318 -1.1930000036954880e-02</internalNodes> + <leafValues> + 4.2441400885581970e-01 -1.7712600529193878e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 319 1.4517900347709656e-01</internalNodes> + <leafValues> + 2.5444999337196350e-02 -1.2779400348663330e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 320 5.1447998732328415e-02</internalNodes> + <leafValues> + 1.5678399801254272e-01 -1.5188430547714233e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 321 3.1479999888688326e-03</internalNodes> + <leafValues> + -4.0424400568008423e-01 3.2429701089859009e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 322 -4.3600000441074371e-02</internalNodes> + <leafValues> + -1.9932260513305664e+00 1.5018600225448608e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>83</maxWeakCount> + <stageThreshold>-3.8424909114837646e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 323 1.2899599969387054e-01</internalNodes> + <leafValues> + -6.2161999940872192e-01 1.1116520166397095e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 324 -9.1261997818946838e-02</internalNodes> + <leafValues> + 1.0143059492111206e+00 -6.1335200071334839e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 325 1.4271999709308147e-02</internalNodes> + <leafValues> + -1.0261659622192383e+00 3.9779999852180481e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 326 3.2889999449253082e-02</internalNodes> + <leafValues> + -1.1386079788208008e+00 2.8690800070762634e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 327 1.2590000405907631e-02</internalNodes> + <leafValues> + -5.6645601987838745e-01 4.5172399282455444e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 328 1.4661000110208988e-02</internalNodes> + <leafValues> + 3.0505999922752380e-01 -6.8129599094390869e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 329 -3.3555999398231506e-02</internalNodes> + <leafValues> + -1.7208939790725708e+00 6.1439000070095062e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 330 1.4252699911594391e-01</internalNodes> + <leafValues> + 2.3192200064659119e-01 -1.7297149896621704e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 331 -6.2079997733235359e-03</internalNodes> + <leafValues> + -1.2163300514221191e+00 1.2160199880599976e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 332 1.8178999423980713e-02</internalNodes> + <leafValues> + 3.2553699612617493e-01 -8.1003999710083008e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 333 2.5036999955773354e-02</internalNodes> + <leafValues> + -3.1698799133300781e-01 6.7361402511596680e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 334 4.6560999006032944e-02</internalNodes> + <leafValues> + -1.1089800298213959e-01 8.4082502126693726e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 335 -8.9999996125698090e-03</internalNodes> + <leafValues> + 3.9574500918388367e-01 -4.7624599933624268e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 336 4.0805999189615250e-02</internalNodes> + <leafValues> + -1.8000000272877514e-04 9.4570702314376831e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 337 -3.4221999347209930e-02</internalNodes> + <leafValues> + 7.5206297636032104e-01 -3.1531500816345215e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 338 -3.9716001600027084e-02</internalNodes> + <leafValues> + -8.3139598369598389e-01 1.7744399607181549e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 339 2.5170000735670328e-03</internalNodes> + <leafValues> + -5.9377998113632202e-01 2.4657000601291656e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 340 2.7428999543190002e-02</internalNodes> + <leafValues> + 1.5998399257659912e-01 -4.2781999707221985e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 341 3.4986000508069992e-02</internalNodes> + <leafValues> + 3.5055998712778091e-02 -1.5988600254058838e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 342 4.4970000162720680e-03</internalNodes> + <leafValues> + -5.2034300565719604e-01 3.7828299403190613e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 343 2.7699999045580626e-03</internalNodes> + <leafValues> + -5.3182601928710938e-01 2.4951000511646271e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 344 3.5174001008272171e-02</internalNodes> + <leafValues> + 1.9983400404453278e-01 -1.4446129798889160e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 345 2.5970999151468277e-02</internalNodes> + <leafValues> + 4.4426999986171722e-02 -1.3622980117797852e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 346 -1.5783999115228653e-02</internalNodes> + <leafValues> + -9.1020399332046509e-01 2.7190300822257996e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 347 -7.5880000367760658e-03</internalNodes> + <leafValues> + 9.2064999043941498e-02 -8.1628900766372681e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 348 2.0754000172019005e-02</internalNodes> + <leafValues> + 2.1185700595378876e-01 -7.4729001522064209e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 349 5.9829000383615494e-02</internalNodes> + <leafValues> + -2.7301099896430969e-01 8.0923300981521606e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 350 3.9039000868797302e-02</internalNodes> + <leafValues> + -1.0432299971580505e-01 8.6226201057434082e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 351 2.1665999665856361e-02</internalNodes> + <leafValues> + 6.2709003686904907e-02 -9.8894298076629639e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 352 -2.7496999129652977e-02</internalNodes> + <leafValues> + -9.2690998315811157e-01 1.5586300194263458e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 353 1.0462000034749508e-02</internalNodes> + <leafValues> + 1.3418099284172058e-01 -7.0386397838592529e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 354 2.4870999157428741e-02</internalNodes> + <leafValues> + 1.9706700742244720e-01 -4.0263301134109497e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 355 -1.6036000102758408e-02</internalNodes> + <leafValues> + -1.1409829854965210e+00 7.3997996747493744e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 356 4.8627000302076340e-02</internalNodes> + <leafValues> + 1.6990399360656738e-01 -7.2152197360992432e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 357 1.2619999470189214e-03</internalNodes> + <leafValues> + -4.7389799356460571e-01 2.6254999637603760e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 358 -8.8035002350807190e-02</internalNodes> + <leafValues> + -2.1606519222259521e+00 1.4554800093173981e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 359 1.8356999382376671e-02</internalNodes> + <leafValues> + 4.4750999659299850e-02 -1.0766370296478271e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 360 3.5275001078844070e-02</internalNodes> + <leafValues> + -3.2919000834226608e-02 1.2153890132904053e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 361 -2.0392900705337524e-01</internalNodes> + <leafValues> + -1.3187999725341797e+00 1.5503999777138233e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 362 -1.6619000583887100e-02</internalNodes> + <leafValues> + 3.6850199103355408e-01 -1.5283699333667755e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 363 3.7739001214504242e-02</internalNodes> + <leafValues> + -2.5727799534797668e-01 7.0655298233032227e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 364 2.2720000706613064e-03</internalNodes> + <leafValues> + -7.7602997422218323e-02 3.3367800712585449e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 365 -1.4802999794483185e-02</internalNodes> + <leafValues> + -7.8524798154830933e-01 7.6934002339839935e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 366 -4.8319000750780106e-02</internalNodes> + <leafValues> + 1.7022320032119751e+00 4.9722000956535339e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 367 -2.9539000242948532e-02</internalNodes> + <leafValues> + 7.7670699357986450e-01 -2.4534299969673157e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 368 -4.6169001609086990e-02</internalNodes> + <leafValues> + -1.4922779798507690e+00 1.2340000271797180e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 369 -2.8064999729394913e-02</internalNodes> + <leafValues> + -2.1345369815826416e+00 -2.5797000154852867e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 370 -5.7339998893439770e-03</internalNodes> + <leafValues> + 5.6982600688934326e-01 -1.2056600302457809e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 371 -1.0111000388860703e-02</internalNodes> + <leafValues> + 6.7911398410797119e-01 -2.6638001203536987e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 372 1.1359999887645245e-02</internalNodes> + <leafValues> + 2.4789799749851227e-01 -6.4493000507354736e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 373 5.1809001713991165e-02</internalNodes> + <leafValues> + 1.4716000296175480e-02 -1.2395579814910889e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 374 3.3291999250650406e-02</internalNodes> + <leafValues> + -8.2559995353221893e-03 1.0168470144271851e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 375 -1.4494000002741814e-02</internalNodes> + <leafValues> + 4.5066800713539124e-01 -3.6250999569892883e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 376 -3.4221999347209930e-02</internalNodes> + <leafValues> + -9.5292502641677856e-01 2.0684599876403809e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 377 -8.0654002726078033e-02</internalNodes> + <leafValues> + -2.0139501094818115e+00 -2.3084999993443489e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 378 -8.9399999706074595e-04</internalNodes> + <leafValues> + 3.9572000503540039e-01 -2.9351300001144409e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 379 9.7162000834941864e-02</internalNodes> + <leafValues> + -2.4980300664901733e-01 1.0859220027923584e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 380 3.6614000797271729e-02</internalNodes> + <leafValues> + -5.7844001799821854e-02 1.2162159681320190e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 381 5.1693998277187347e-02</internalNodes> + <leafValues> + 4.3062999844551086e-02 -1.0636160373687744e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 382 -2.4557000026106834e-02</internalNodes> + <leafValues> + -4.8946800827980042e-01 1.7182900011539459e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 383 3.2736799120903015e-01</internalNodes> + <leafValues> + -2.9688599705696106e-01 5.1798301935195923e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 384 7.6959999278187752e-03</internalNodes> + <leafValues> + -5.9805899858474731e-01 2.4803200364112854e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 385 1.6172200441360474e-01</internalNodes> + <leafValues> + -2.9613999649882317e-02 -2.3162529468536377e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 386 -4.7889999113976955e-03</internalNodes> + <leafValues> + 3.7457901239395142e-01 -3.2779198884963989e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 387 -1.8402999266982079e-02</internalNodes> + <leafValues> + -9.9692702293395996e-01 7.2948001325130463e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 388 7.7665001153945923e-02</internalNodes> + <leafValues> + 1.4175699651241302e-01 -1.7238730192184448e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 389 1.8921000882983208e-02</internalNodes> + <leafValues> + -2.1273100376129150e-01 1.0165189504623413e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 390 -7.9397998750209808e-02</internalNodes> + <leafValues> + -1.3164349794387817e+00 1.4981999993324280e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 391 -6.8037003278732300e-02</internalNodes> + <leafValues> + 4.9421998858451843e-01 -2.9091000556945801e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 392 -6.1010001227259636e-03</internalNodes> + <leafValues> + 4.2430499196052551e-01 -3.3899301290512085e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 393 3.1927000731229782e-02</internalNodes> + <leafValues> + -3.1046999618411064e-02 -2.3459999561309814e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 394 -2.9843999072909355e-02</internalNodes> + <leafValues> + -7.8989601135253906e-01 1.5417699515819550e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 395 -8.0541998147964478e-02</internalNodes> + <leafValues> + -2.2509229183197021e+00 -3.0906999483704567e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 396 3.8109999150037766e-03</internalNodes> + <leafValues> + -2.5577300786972046e-01 2.3785500228404999e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 397 3.3647000789642334e-02</internalNodes> + <leafValues> + -2.2541399300098419e-01 9.2307400703430176e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 398 8.2809999585151672e-03</internalNodes> + <leafValues> + -2.8896200656890869e-01 3.1046199798583984e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 399 1.0104399919509888e-01</internalNodes> + <leafValues> + -3.4864000976085663e-02 -2.7102620601654053e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 400 -1.0009000077843666e-02</internalNodes> + <leafValues> + 5.9715402126312256e-01 -3.3831000328063965e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 401 7.1919998154044151e-03</internalNodes> + <leafValues> + -4.7738000750541687e-01 2.2686000168323517e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 402 2.4969000369310379e-02</internalNodes> + <leafValues> + 2.2877700626850128e-01 -1.0435529947280884e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 403 2.7908000349998474e-01</internalNodes> + <leafValues> + -2.5818100571632385e-01 7.6780498027801514e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 404 -4.4213000684976578e-02</internalNodes> + <leafValues> + -5.9798002243041992e-01 2.8039899468421936e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 405 -1.4136999845504761e-02</internalNodes> + <leafValues> + 7.0987302064895630e-01 -2.5645199418067932e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>91</maxWeakCount> + <stageThreshold>-3.6478610038757324e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 406 1.3771200180053711e-01</internalNodes> + <leafValues> + -5.5870598554611206e-01 1.0953769683837891e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 407 3.4460999071598053e-02</internalNodes> + <leafValues> + -7.1171897649765015e-01 5.2899599075317383e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 408 1.8580000847578049e-02</internalNodes> + <leafValues> + -1.1157519817352295e+00 4.0593999624252319e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 409 2.5041999295353889e-02</internalNodes> + <leafValues> + -4.0892499685287476e-01 7.4129998683929443e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 410 5.7179000228643417e-02</internalNodes> + <leafValues> + -3.8054299354553223e-01 7.3647701740264893e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 411 1.4932000078260899e-02</internalNodes> + <leafValues> + -6.9945502281188965e-01 3.7950998544692993e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 412 8.8900001719594002e-03</internalNodes> + <leafValues> + -5.4558598995208740e-01 3.6332499980926514e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 413 3.0435999855399132e-02</internalNodes> + <leafValues> + -1.0124599933624268e-01 7.9585897922515869e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 414 -4.4160000979900360e-02</internalNodes> + <leafValues> + 8.4410899877548218e-01 -3.2976400852203369e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 415 1.8461000174283981e-02</internalNodes> + <leafValues> + 2.6326599717140198e-01 -9.6736502647399902e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 416 1.0614999569952488e-02</internalNodes> + <leafValues> + 1.5251900255680084e-01 -1.0589870214462280e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 417 -4.5974001288414001e-02</internalNodes> + <leafValues> + -1.9918340444564819e+00 1.3629099726676941e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 418 8.2900002598762512e-02</internalNodes> + <leafValues> + -3.2037198543548584e-01 6.0304200649261475e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 419 -8.9130001142621040e-03</internalNodes> + <leafValues> + 5.9586602449417114e-01 -2.1139599382877350e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 420 4.2814001441001892e-02</internalNodes> + <leafValues> + 2.2925000637769699e-02 -1.4679330587387085e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 421 -8.7139997631311417e-03</internalNodes> + <leafValues> + -4.3989500403404236e-01 2.0439699292182922e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 422 -4.3390002101659775e-03</internalNodes> + <leafValues> + -8.9066797494888306e-01 1.0469999909400940e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 423 8.0749997869133949e-03</internalNodes> + <leafValues> + 2.1164199709892273e-01 -4.0231600403785706e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 424 9.6739001572132111e-02</internalNodes> + <leafValues> + 1.3319999910891056e-02 -1.6085360050201416e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 425 -3.0536999925971031e-02</internalNodes> + <leafValues> + 1.0063740015029907e+00 -1.3413299620151520e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 426 -6.0855999588966370e-02</internalNodes> + <leafValues> + -1.4689979553222656e+00 9.4240000471472740e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 427 -3.8162000477313995e-02</internalNodes> + <leafValues> + -8.1636399030685425e-01 2.6171201467514038e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 428 -9.6960002556443214e-03</internalNodes> + <leafValues> + 1.1561699956655502e-01 -7.1693199872970581e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 429 4.8902999609708786e-02</internalNodes> + <leafValues> + 1.3050499558448792e-01 -1.6448370218276978e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 430 -4.1611999273300171e-02</internalNodes> + <leafValues> + -1.1795840263366699e+00 2.5017000734806061e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 431 -2.0188000053167343e-02</internalNodes> + <leafValues> + 6.3188201189041138e-01 -1.0490400344133377e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 432 -9.7900000400841236e-04</internalNodes> + <leafValues> + 1.8507799506187439e-01 -5.3565901517868042e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 433 -3.3622000366449356e-02</internalNodes> + <leafValues> + -9.3127602338790894e-01 2.0071500539779663e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 434 1.9455999135971069e-02</internalNodes> + <leafValues> + 3.8029000163078308e-02 -1.0112210512161255e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 435 -3.1800000579096377e-04</internalNodes> + <leafValues> + 3.6457699537277222e-01 -2.7610900998115540e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 436 -3.8899999344721437e-04</internalNodes> + <leafValues> + 1.9665899872779846e-01 -5.3410500288009644e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 437 -9.3496002256870270e-02</internalNodes> + <leafValues> + -1.6772350072860718e+00 2.0727099478244781e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 438 -7.7877998352050781e-02</internalNodes> + <leafValues> + -3.0760629177093506e+00 -3.5803999751806259e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 439 1.6947999596595764e-02</internalNodes> + <leafValues> + 2.1447399258613586e-01 -7.1376299858093262e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 440 -2.1459000185132027e-02</internalNodes> + <leafValues> + -1.1468060016632080e+00 1.5855999663472176e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 441 -1.2865999713540077e-02</internalNodes> + <leafValues> + 8.3812397718429565e-01 -6.5944001078605652e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 442 7.8220004215836525e-03</internalNodes> + <leafValues> + -2.8026801347732544e-01 7.9376900196075439e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 443 1.0294400155544281e-01</internalNodes> + <leafValues> + 1.7832300066947937e-01 -6.8412202596664429e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 444 -3.7487998604774475e-02</internalNodes> + <leafValues> + 9.6189999580383301e-01 -2.1735599637031555e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 445 2.5505999103188515e-02</internalNodes> + <leafValues> + 1.0103999637067318e-02 1.2461110353469849e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 446 6.6700001480057836e-04</internalNodes> + <leafValues> + -5.3488200902938843e-01 1.4746299386024475e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 447 -2.8867900371551514e-01</internalNodes> + <leafValues> + 8.2172799110412598e-01 -1.4948000200092793e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 448 9.1294996440410614e-02</internalNodes> + <leafValues> + -1.9605399668216705e-01 1.0803170204162598e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 449 1.2056600302457809e-01</internalNodes> + <leafValues> + -2.3848999291658401e-02 1.1392610073089600e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 450 -7.3775000870227814e-02</internalNodes> + <leafValues> + -1.3583840131759644e+00 -4.2039998807013035e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 451 -3.3128000795841217e-02</internalNodes> + <leafValues> + -6.4483201503753662e-01 2.4142199754714966e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 452 -4.3937001377344131e-02</internalNodes> + <leafValues> + 8.4285402297973633e-01 -2.0624800026416779e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 453 1.8110199272632599e-01</internalNodes> + <leafValues> + 1.9212099909782410e-01 -1.2222139835357666e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 454 -1.1850999668240547e-02</internalNodes> + <leafValues> + -7.2677397727966309e-01 5.2687998861074448e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 455 4.5920000411570072e-03</internalNodes> + <leafValues> + -3.6305201053619385e-01 2.9223799705505371e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 456 7.0620002225041389e-03</internalNodes> + <leafValues> + 5.8116000145673752e-02 -6.7161601781845093e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 457 -2.3715000599622726e-02</internalNodes> + <leafValues> + 4.7142100334167480e-01 1.8580000847578049e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 458 -6.7171998322010040e-02</internalNodes> + <leafValues> + -1.1331889629364014e+00 2.3780999705195427e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 459 -6.5310001373291016e-02</internalNodes> + <leafValues> + 9.8253500461578369e-01 2.8362000361084938e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 460 2.2791000083088875e-02</internalNodes> + <leafValues> + -2.8213700652122498e-01 5.8993399143218994e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 461 -1.9037999212741852e-02</internalNodes> + <leafValues> + -6.3711500167846680e-01 2.6514598727226257e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 462 -6.8689999170601368e-03</internalNodes> + <leafValues> + 3.7487301230430603e-01 -3.3232098817825317e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 463 -4.0146000683307648e-02</internalNodes> + <leafValues> + -1.3048729896545410e+00 1.5724299848079681e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 464 -4.0530998259782791e-02</internalNodes> + <leafValues> + -2.0458049774169922e+00 -2.6925999671220779e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 465 -1.2253999710083008e-02</internalNodes> + <leafValues> + 7.7649402618408203e-01 -4.2971000075340271e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 466 -2.7219999581575394e-02</internalNodes> + <leafValues> + 1.7424400150775909e-01 -4.4600901007652283e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 467 -8.8366001844406128e-02</internalNodes> + <leafValues> + -1.5036419630050659e+00 1.4289900660514832e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 468 -7.9159997403621674e-03</internalNodes> + <leafValues> + 2.8666698932647705e-01 -3.7923699617385864e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 469 -4.1960000991821289e-02</internalNodes> + <leafValues> + 1.3846950531005859e+00 6.5026998519897461e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 470 4.5662999153137207e-02</internalNodes> + <leafValues> + -2.2452299296855927e-01 7.9521000385284424e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 471 -1.4090600609779358e-01</internalNodes> + <leafValues> + -1.5879319906234741e+00 1.1359000205993652e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 472 -5.9216000139713287e-02</internalNodes> + <leafValues> + -1.1945960521697998e+00 -7.1640000678598881e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 473 4.3390002101659775e-03</internalNodes> + <leafValues> + -1.5528699755668640e-01 4.0664499998092651e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 474 -2.0369999110698700e-03</internalNodes> + <leafValues> + 2.5927901268005371e-01 -3.8368299603462219e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 475 2.7516499161720276e-01</internalNodes> + <leafValues> + -8.8497996330261230e-02 7.6787501573562622e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 476 -2.6601999998092651e-02</internalNodes> + <leafValues> + 7.5024497509002686e-01 -2.2621999680995941e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 477 4.0906000882387161e-02</internalNodes> + <leafValues> + 1.2158600240945816e-01 -1.4566910266876221e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 478 5.5320002138614655e-03</internalNodes> + <leafValues> + -3.6611500382423401e-01 2.5968599319458008e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 479 3.1879000365734100e-02</internalNodes> + <leafValues> + -7.5019001960754395e-02 4.8484799265861511e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 480 -4.1482001543045044e-02</internalNodes> + <leafValues> + 7.8220397233963013e-01 -2.1992200613021851e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 481 -9.6130996942520142e-02</internalNodes> + <leafValues> + -8.9456301927566528e-01 1.4680700004100800e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 482 -1.1568999849259853e-02</internalNodes> + <leafValues> + 8.2714098691940308e-01 -2.0275600254535675e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 483 1.8312999978661537e-02</internalNodes> + <leafValues> + 1.6367999836802483e-02 2.7306801080703735e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 484 -3.4166000783443451e-02</internalNodes> + <leafValues> + 1.1307320594787598e+00 -1.8810899555683136e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 485 -2.4476999416947365e-02</internalNodes> + <leafValues> + -5.7791298627853394e-01 1.5812499821186066e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 486 4.8957001417875290e-02</internalNodes> + <leafValues> + -2.2564999759197235e-02 -1.6373280286788940e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 487 -2.0702999085187912e-02</internalNodes> + <leafValues> + -5.4512101411819458e-01 2.4086999893188477e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 488 -2.3002000525593758e-02</internalNodes> + <leafValues> + -1.2236540317535400e+00 -7.3440000414848328e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 489 6.4585000276565552e-02</internalNodes> + <leafValues> + 1.4695599675178528e-01 -4.4967499375343323e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 490 1.2666000053286552e-02</internalNodes> + <leafValues> + -2.7873900532722473e-01 4.3876600265502930e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 491 -1.2002999894320965e-02</internalNodes> + <leafValues> + -2.4289099872112274e-01 2.5350099802017212e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 492 -2.6443999260663986e-02</internalNodes> + <leafValues> + -8.5864800214767456e-01 2.6025999337434769e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 493 -2.5547999888658524e-02</internalNodes> + <leafValues> + 6.9287902116775513e-01 -2.1160000469535589e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 494 3.9115000516176224e-02</internalNodes> + <leafValues> + -1.6589100658893585e-01 1.5209139585494995e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 495 -6.0330000706017017e-03</internalNodes> + <leafValues> + 4.3856900930404663e-01 -2.1613700687885284e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 496 -3.3936999738216400e-02</internalNodes> + <leafValues> + -9.7998398542404175e-01 2.2133000195026398e-02</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>99</maxWeakCount> + <stageThreshold>-3.8700489997863770e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 497 4.0672998875379562e-02</internalNodes> + <leafValues> + -9.0474700927734375e-01 6.4410597085952759e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 498 2.5609999895095825e-02</internalNodes> + <leafValues> + -7.9216998815536499e-01 5.7489997148513794e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 499 1.9959500432014465e-01</internalNodes> + <leafValues> + -3.0099600553512573e-01 1.3143850564956665e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 500 1.2404999695718288e-02</internalNodes> + <leafValues> + -8.9882999658584595e-01 2.9205799102783203e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 501 3.9207998663187027e-02</internalNodes> + <leafValues> + -4.1955199837684631e-01 5.3463298082351685e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 502 -3.0843999236822128e-02</internalNodes> + <leafValues> + 4.5793399214744568e-01 -4.4629099965095520e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 503 -3.5523001104593277e-02</internalNodes> + <leafValues> + 9.1310501098632812e-01 -2.7373200654983521e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 504 -6.1650000512599945e-02</internalNodes> + <leafValues> + -1.4697799682617188e+00 2.0364099740982056e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 505 -1.1739999987185001e-02</internalNodes> + <leafValues> + -1.0482879877090454e+00 6.7801997065544128e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 506 6.6933996975421906e-02</internalNodes> + <leafValues> + 2.9274499416351318e-01 -5.2282899618148804e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 507 -2.0631000399589539e-02</internalNodes> + <leafValues> + -1.2855139970779419e+00 4.4550999999046326e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 508 -2.2357000038027763e-02</internalNodes> + <leafValues> + -8.5753798484802246e-01 1.8434000015258789e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 509 1.1500000255182385e-03</internalNodes> + <leafValues> + 1.6405500471591949e-01 -6.9125002622604370e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 510 3.5872999578714371e-02</internalNodes> + <leafValues> + 1.5756499767303467e-01 -8.4262597560882568e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 511 3.0659999698400497e-02</internalNodes> + <leafValues> + 2.1637000143527985e-02 -1.3634690046310425e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 512 5.5559999309480190e-03</internalNodes> + <leafValues> + -1.6737000644207001e-01 2.5888401269912720e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 513 -6.1160000041127205e-03</internalNodes> + <leafValues> + -9.7271800041198730e-01 6.6100001335144043e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 514 -3.0316999182105064e-02</internalNodes> + <leafValues> + 9.8474198579788208e-01 -1.6448000445961952e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 515 -9.7200004383921623e-03</internalNodes> + <leafValues> + 4.7604700922966003e-01 -3.2516700029373169e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 516 -5.7126998901367188e-02</internalNodes> + <leafValues> + -9.5920699834823608e-01 1.9938200712203979e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 517 4.0059997700154781e-03</internalNodes> + <leafValues> + -5.2612501382827759e-01 2.2428700327873230e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 518 3.3734001219272614e-02</internalNodes> + <leafValues> + 1.7070099711418152e-01 -1.0737580060958862e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 519 -3.4641999751329422e-02</internalNodes> + <leafValues> + -1.1343129873275757e+00 3.6540001630783081e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 520 4.6923000365495682e-02</internalNodes> + <leafValues> + 2.5832301378250122e-01 -7.1535801887512207e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 521 -8.7660001590847969e-03</internalNodes> + <leafValues> + 1.9640900194644928e-01 -5.3355097770690918e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 522 6.5627999603748322e-02</internalNodes> + <leafValues> + -5.1194999366998672e-02 9.7610700130462646e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 523 -4.4165000319480896e-02</internalNodes> + <leafValues> + 1.0631920099258423e+00 -2.3462599515914917e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 524 1.7304999753832817e-02</internalNodes> + <leafValues> + -1.8582899868488312e-01 4.5889899134635925e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 525 3.3135998994112015e-02</internalNodes> + <leafValues> + -2.9381999745965004e-02 -2.6651329994201660e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 526 -2.1029999479651451e-02</internalNodes> + <leafValues> + 9.9979901313781738e-01 2.4937000125646591e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 527 2.9783999547362328e-02</internalNodes> + <leafValues> + -2.9605999588966370e-02 -2.1695868968963623e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 528 5.5291999131441116e-02</internalNodes> + <leafValues> + -7.5599999399855733e-04 7.4651998281478882e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 529 -3.3597998321056366e-02</internalNodes> + <leafValues> + -1.5274159908294678e+00 1.1060000397264957e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 530 1.9602999091148376e-02</internalNodes> + <leafValues> + 3.3574998378753662e-02 9.9526202678680420e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 531 -2.0787000656127930e-02</internalNodes> + <leafValues> + 7.6612901687622070e-01 -2.4670800566673279e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 532 3.2536000013351440e-02</internalNodes> + <leafValues> + 1.6263400018215179e-01 -6.1134302616119385e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 533 -1.0788000188767910e-02</internalNodes> + <leafValues> + -9.7839701175689697e-01 2.8969999402761459e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 534 -9.9560003727674484e-03</internalNodes> + <leafValues> + 4.6145799756050110e-01 -1.3510499894618988e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 535 -3.7489999085664749e-03</internalNodes> + <leafValues> + 2.5458198785781860e-01 -5.1955598592758179e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 536 -4.1779998689889908e-02</internalNodes> + <leafValues> + -8.0565100908279419e-01 1.5208500623703003e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 537 -3.4221000969409943e-02</internalNodes> + <leafValues> + -1.3137799501419067e+00 -3.5800000187009573e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 538 1.0130000300705433e-02</internalNodes> + <leafValues> + 2.0175799727439880e-01 -6.1339598894119263e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 539 -8.9849002659320831e-02</internalNodes> + <leafValues> + 9.7632801532745361e-01 -2.0884799957275391e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 540 2.6097999885678291e-02</internalNodes> + <leafValues> + -1.8807999789714813e-01 4.7705799341201782e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 541 -3.7539999466389418e-03</internalNodes> + <leafValues> + -6.7980402708053589e-01 1.1288800090551376e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 542 3.1973000615835190e-02</internalNodes> + <leafValues> + 1.8951700627803802e-01 -1.4967479705810547e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 543 1.9332999363541603e-02</internalNodes> + <leafValues> + -2.3609900474548340e-01 8.1320500373840332e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 544 1.9490000559017062e-03</internalNodes> + <leafValues> + 2.4830399453639984e-01 -6.9211997091770172e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 545 -4.4146999716758728e-02</internalNodes> + <leafValues> + -1.0418920516967773e+00 4.8053000122308731e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 546 -4.4681999832391739e-02</internalNodes> + <leafValues> + 5.1346302032470703e-01 -7.3799998499453068e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 547 -1.0757499933242798e-01</internalNodes> + <leafValues> + 1.6202019453048706e+00 -1.8667599558830261e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 548 -1.2846800684928894e-01</internalNodes> + <leafValues> + 2.9869480133056641e+00 9.5427997410297394e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 549 -4.4757999479770660e-02</internalNodes> + <leafValues> + 6.0405302047729492e-01 -2.7058699727058411e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 550 -4.3990999460220337e-02</internalNodes> + <leafValues> + -6.1790502071380615e-01 1.5997199714183807e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 551 -1.2268999963998795e-01</internalNodes> + <leafValues> + 6.6327202320098877e-01 -2.3636999726295471e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 552 -1.9982999190688133e-02</internalNodes> + <leafValues> + -1.1228660345077515e+00 1.9616700708866119e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 553 -1.5527999959886074e-02</internalNodes> + <leafValues> + -1.0770269632339478e+00 2.0693000406026840e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 554 -4.8971001058816910e-02</internalNodes> + <leafValues> + 8.1168299913406372e-01 -1.7252000048756599e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 555 5.5975999683141708e-02</internalNodes> + <leafValues> + -2.2529000416398048e-02 -1.7356760501861572e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 556 -9.8580000922083855e-03</internalNodes> + <leafValues> + 6.7881399393081665e-01 -5.8180000633001328e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 557 1.3481000438332558e-02</internalNodes> + <leafValues> + 5.7847999036312103e-02 -7.7255302667617798e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 558 6.5609999001026154e-03</internalNodes> + <leafValues> + -1.3146899640560150e-01 6.7055797576904297e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 559 7.1149999275803566e-03</internalNodes> + <leafValues> + -3.7880599498748779e-01 3.0978998541831970e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 560 4.8159998841583729e-03</internalNodes> + <leafValues> + -5.8470398187637329e-01 2.5602099299430847e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 561 9.5319999381899834e-03</internalNodes> + <leafValues> + -3.0217000842094421e-01 4.1253298521041870e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 562 -2.7474999427795410e-02</internalNodes> + <leafValues> + 5.9154701232910156e-01 1.7963999882340431e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 563 -3.9519999176263809e-02</internalNodes> + <leafValues> + 9.6913498640060425e-01 -2.1020300686359406e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 564 -3.0658999457955360e-02</internalNodes> + <leafValues> + 9.1155898571014404e-01 4.0550000965595245e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 565 -1.4680000022053719e-03</internalNodes> + <leafValues> + -6.0489797592163086e-01 1.6960899531841278e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 566 1.9077600538730621e-01</internalNodes> + <leafValues> + 4.3515000492334366e-02 8.1892901659011841e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 567 5.1790000870823860e-03</internalNodes> + <leafValues> + -9.3617302179336548e-01 2.4937000125646591e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 568 2.4126000702381134e-02</internalNodes> + <leafValues> + 1.8175500631332397e-01 -3.4185901284217834e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 569 -2.6383999735116959e-02</internalNodes> + <leafValues> + -1.2912579774856567e+00 -3.4280000254511833e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 570 5.4139997810125351e-03</internalNodes> + <leafValues> + -4.6291999518871307e-02 2.5269600749015808e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 571 5.4216001182794571e-02</internalNodes> + <leafValues> + -1.2848000042140484e-02 -1.4304540157318115e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 572 2.3799999326001853e-04</internalNodes> + <leafValues> + -2.6676699519157410e-01 3.3588299155235291e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 573 1.5216999687254429e-02</internalNodes> + <leafValues> + -5.1367300748825073e-01 1.3005100190639496e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 574 1.7007999122142792e-02</internalNodes> + <leafValues> + 4.1575899720191956e-01 -3.1241199374198914e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 575 3.0496999621391296e-02</internalNodes> + <leafValues> + -2.4820999801158905e-01 7.0828497409820557e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 576 6.5430002287030220e-03</internalNodes> + <leafValues> + -2.2637000679969788e-01 1.9184599816799164e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 577 1.4163999259471893e-01</internalNodes> + <leafValues> + 6.5227001905441284e-02 -8.8809502124786377e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 578 1.9338000565767288e-02</internalNodes> + <leafValues> + 1.8891200423240662e-01 -2.7397701144218445e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 579 -1.7324000597000122e-02</internalNodes> + <leafValues> + -9.4866698980331421e-01 2.4196999147534370e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 580 -6.2069999985396862e-03</internalNodes> + <leafValues> + 3.6938399076461792e-01 -1.7494900524616241e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 581 -1.6109000891447067e-02</internalNodes> + <leafValues> + 9.6159499883651733e-01 -2.0005300641059875e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 582 -1.0122500360012054e-01</internalNodes> + <leafValues> + -3.0699110031127930e+00 1.1363799870014191e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 583 -7.5509999878704548e-03</internalNodes> + <leafValues> + 2.2921000421047211e-01 -4.5645099878311157e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 584 4.4247999787330627e-02</internalNodes> + <leafValues> + -3.1599999056197703e-04 3.9225301146507263e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 585 -1.1636000126600266e-01</internalNodes> + <leafValues> + 9.5233702659606934e-01 -2.0201599597930908e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 586 4.7360002063214779e-03</internalNodes> + <leafValues> + -9.9177002906799316e-02 2.0370499789714813e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 587 2.2459000349044800e-02</internalNodes> + <leafValues> + 8.7280003353953362e-03 -1.0217070579528809e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 588 -1.2109000235795975e-02</internalNodes> + <leafValues> + 6.4812600612640381e-01 -9.0149000287055969e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 589 5.6120000779628754e-02</internalNodes> + <leafValues> + -3.6759998649358749e-02 -1.9275590181350708e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 590 -8.7379999458789825e-03</internalNodes> + <leafValues> + 6.9261300563812256e-01 -6.8374998867511749e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 591 6.6399998031556606e-03</internalNodes> + <leafValues> + -4.0569800138473511e-01 1.8625700473785400e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 592 -1.8131999298930168e-02</internalNodes> + <leafValues> + -6.4518201351165771e-01 2.1976399421691895e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 593 -2.2718999534845352e-02</internalNodes> + <leafValues> + 9.7776198387145996e-01 -1.8654300272464752e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 594 1.2705000117421150e-02</internalNodes> + <leafValues> + -1.0546600073575974e-01 3.7404099106788635e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 595 -1.3682999648153782e-02</internalNodes> + <leafValues> + 6.1064100265502930e-01 -2.6881098747253418e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>115</maxWeakCount> + <stageThreshold>-3.7160909175872803e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 596 3.1357999891042709e-02</internalNodes> + <leafValues> + -1.0183910131454468e+00 5.7528597116470337e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 597 9.3050003051757812e-02</internalNodes> + <leafValues> + -4.1297501325607300e-01 1.0091199874877930e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 598 2.5949999690055847e-02</internalNodes> + <leafValues> + -5.8587902784347534e-01 5.6606197357177734e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 599 1.6472000628709793e-02</internalNodes> + <leafValues> + -9.2857497930526733e-01 3.0924499034881592e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 600 -1.8779999809339643e-03</internalNodes> + <leafValues> + 1.1951000243425369e-01 -1.1180130243301392e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 601 -9.0129999443888664e-03</internalNodes> + <leafValues> + -5.7849502563476562e-01 3.3154401183128357e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 602 2.2547999396920204e-02</internalNodes> + <leafValues> + -3.8325101137161255e-01 5.2462202310562134e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 603 -3.7780001759529114e-02</internalNodes> + <leafValues> + 1.1790670156478882e+00 -3.4166999161243439e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 604 -5.3799999877810478e-03</internalNodes> + <leafValues> + -8.6265897750854492e-01 1.1867900192737579e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 605 -2.3893000558018684e-02</internalNodes> + <leafValues> + -7.4950599670410156e-01 2.1011400222778320e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 606 -2.6521999388933182e-02</internalNodes> + <leafValues> + 9.2128598690032959e-01 -2.8252801299095154e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 607 1.2280000373721123e-02</internalNodes> + <leafValues> + 2.6662799715995789e-01 -7.0013600587844849e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 608 9.6594996750354767e-02</internalNodes> + <leafValues> + -2.8453999757766724e-01 7.3168998956680298e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 609 -2.7414999902248383e-02</internalNodes> + <leafValues> + -6.1492699384689331e-01 1.5576200187206268e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 610 -1.5767000615596771e-02</internalNodes> + <leafValues> + 5.7551199197769165e-01 -3.4362199902534485e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 611 -2.1100000012665987e-03</internalNodes> + <leafValues> + 3.2599699497222900e-01 -1.3008299469947815e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 612 1.2006999924778938e-02</internalNodes> + <leafValues> + 8.9322999119758606e-02 -9.6025598049163818e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 613 -1.5421999618411064e-02</internalNodes> + <leafValues> + 3.4449499845504761e-01 -4.6711999177932739e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 614 -4.1579999960958958e-03</internalNodes> + <leafValues> + 2.3696300387382507e-01 -5.2563297748565674e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 615 -2.1185999736189842e-02</internalNodes> + <leafValues> + -7.4267697334289551e-01 2.1702000498771667e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 616 -1.7077000811696053e-02</internalNodes> + <leafValues> + -9.0471798181533813e-01 6.6012002527713776e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 617 -4.0849998593330383e-02</internalNodes> + <leafValues> + -3.4446600079536438e-01 2.1503700315952301e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 618 -8.1930002197623253e-03</internalNodes> + <leafValues> + -9.3388599157333374e-01 5.0471000373363495e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 619 -1.9238000735640526e-02</internalNodes> + <leafValues> + -5.3203701972961426e-01 1.7240600287914276e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 620 -4.4192001223564148e-02</internalNodes> + <leafValues> + 9.2075002193450928e-01 -2.2148500382900238e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 621 -6.2392000108957291e-02</internalNodes> + <leafValues> + -7.1053802967071533e-01 1.8323899805545807e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 622 -1.0079999919980764e-03</internalNodes> + <leafValues> + -8.7063097953796387e-01 5.5330000817775726e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 623 2.3870000615715981e-02</internalNodes> + <leafValues> + -2.2854200005531311e-01 5.2415597438812256e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 624 2.1391000598669052e-02</internalNodes> + <leafValues> + -3.0325898528099060e-01 5.5860602855682373e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 625 2.0254999399185181e-02</internalNodes> + <leafValues> + 2.6901501417160034e-01 -7.0261800289154053e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 626 -2.8772000223398209e-02</internalNodes> + <leafValues> + -1.1835030317306519e+00 4.6512000262737274e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 627 3.4199999645352364e-03</internalNodes> + <leafValues> + -5.4652100801467896e-01 2.5962498784065247e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 628 5.6983001530170441e-02</internalNodes> + <leafValues> + -2.6982900500297546e-01 5.8170700073242188e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 629 -9.3892000615596771e-02</internalNodes> + <leafValues> + -9.1046398878097534e-01 1.9677700102329254e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 630 1.7699999734759331e-02</internalNodes> + <leafValues> + -4.4003298878669739e-01 2.1349500119686127e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 631 2.2844199836254120e-01</internalNodes> + <leafValues> + 2.3605000227689743e-02 7.7171599864959717e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 632 -1.8287500739097595e-01</internalNodes> + <leafValues> + 7.9228597879409790e-01 -2.4644799530506134e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 633 -6.9891996681690216e-02</internalNodes> + <leafValues> + 8.0267798900604248e-01 -3.6072000861167908e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 634 1.5297000296413898e-02</internalNodes> + <leafValues> + -2.0072300732135773e-01 1.1030600070953369e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 635 6.7500001750886440e-03</internalNodes> + <leafValues> + -4.5967999845743179e-02 7.2094500064849854e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 636 -1.5983000397682190e-02</internalNodes> + <leafValues> + -9.0357202291488647e-01 4.4987998902797699e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 637 1.3088000006973743e-02</internalNodes> + <leafValues> + 3.5297098755836487e-01 -3.7710601091384888e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 638 1.3061000034213066e-02</internalNodes> + <leafValues> + -1.9583599269390106e-01 1.1198940277099609e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 639 -3.9907000958919525e-02</internalNodes> + <leafValues> + -1.3998429775238037e+00 1.9145099818706512e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 640 1.5026999637484550e-02</internalNodes> + <leafValues> + 2.3600000422447920e-03 -1.1611249446868896e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 641 -2.0517999306321144e-02</internalNodes> + <leafValues> + -4.8908099532127380e-01 1.6743400692939758e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 642 -2.2359000518918037e-02</internalNodes> + <leafValues> + -1.2202980518341064e+00 -1.1975999921560287e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 643 -7.9150004312396049e-03</internalNodes> + <leafValues> + 3.7228098511695862e-01 -8.5063003003597260e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 644 1.5258000232279301e-02</internalNodes> + <leafValues> + -2.9412600398063660e-01 5.9406399726867676e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 645 -3.1665999442338943e-02</internalNodes> + <leafValues> + -1.4395569562911987e+00 1.3578799366950989e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 646 -3.0773999169468880e-02</internalNodes> + <leafValues> + -2.2545371055603027e+00 -3.3971000462770462e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 647 -1.5483000315725803e-02</internalNodes> + <leafValues> + 3.7700700759887695e-01 1.5847999602556229e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 648 3.5167001187801361e-02</internalNodes> + <leafValues> + -2.9446101188659668e-01 5.3159099817276001e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 649 -1.7906000837683678e-02</internalNodes> + <leafValues> + -9.9788200855255127e-01 1.6235999763011932e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 650 -3.1799999997019768e-03</internalNodes> + <leafValues> + 4.7657001763582230e-02 -7.5249898433685303e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 651 1.5720000490546227e-02</internalNodes> + <leafValues> + 1.4873799681663513e-01 -6.5375399589538574e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 652 2.9864000156521797e-02</internalNodes> + <leafValues> + -1.4952000230550766e-02 -1.2275190353393555e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 653 2.9899999499320984e-03</internalNodes> + <leafValues> + -1.4263699948787689e-01 4.3272799253463745e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 654 8.4749996662139893e-02</internalNodes> + <leafValues> + -1.9280999898910522e-02 -1.1946409940719604e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 655 -5.8724999427795410e-02</internalNodes> + <leafValues> + -1.7328219413757324e+00 1.4374700188636780e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 656 4.4755998998880386e-02</internalNodes> + <leafValues> + -2.4140599370002747e-01 5.4019999504089355e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 657 4.0369000285863876e-02</internalNodes> + <leafValues> + 5.7680001482367516e-03 5.6578099727630615e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 658 3.7735998630523682e-02</internalNodes> + <leafValues> + 3.8180999457836151e-02 -7.9370397329330444e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 659 6.0752999037504196e-02</internalNodes> + <leafValues> + 7.6453000307083130e-02 1.4813209772109985e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 660 -1.9832000136375427e-02</internalNodes> + <leafValues> + -1.6971720457077026e+00 -2.7370000258088112e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 661 -1.6592699289321899e-01</internalNodes> + <leafValues> + 6.2976002693176270e-01 3.1762998551130295e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 662 6.9014996290206909e-02</internalNodes> + <leafValues> + -3.3463200926780701e-01 3.0076700448989868e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 663 1.1358000338077545e-02</internalNodes> + <leafValues> + 2.2741499543190002e-01 -3.8224700093269348e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 664 1.7000000225380063e-03</internalNodes> + <leafValues> + 1.9223800301551819e-01 -5.2735102176666260e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 665 7.9769000411033630e-02</internalNodes> + <leafValues> + 9.1491997241973877e-02 2.1049048900604248e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 666 -5.7144001126289368e-02</internalNodes> + <leafValues> + -1.7452130317687988e+00 -4.0910001844167709e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 667 7.3830001056194305e-03</internalNodes> + <leafValues> + -2.4214799702167511e-01 3.5577800869941711e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 668 -1.8040999770164490e-02</internalNodes> + <leafValues> + 1.1779999732971191e+00 -1.7676700651645660e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 669 9.4503000378608704e-02</internalNodes> + <leafValues> + 1.3936099410057068e-01 -1.2993700504302979e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 670 5.4210000671446323e-03</internalNodes> + <leafValues> + -5.4608601331710815e-01 1.3916400074958801e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 671 7.0290002040565014e-03</internalNodes> + <leafValues> + -2.1597200632095337e-01 3.9258098602294922e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 672 3.4515999257564545e-02</internalNodes> + <leafValues> + 6.3188999891281128e-02 -7.2108101844787598e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 673 -5.1924999803304672e-02</internalNodes> + <leafValues> + 6.8667602539062500e-01 6.3272997736930847e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 674 -6.9162003695964813e-02</internalNodes> + <leafValues> + 1.7411810159683228e+00 -1.6619299352169037e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 675 -5.5229999125003815e-03</internalNodes> + <leafValues> + 3.0694699287414551e-01 -1.6662900149822235e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 676 6.8599998950958252e-02</internalNodes> + <leafValues> + -2.1405400335788727e-01 7.3185002803802490e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 677 -6.7038998007774353e-02</internalNodes> + <leafValues> + -7.9360598325729370e-01 2.0525799691677094e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 678 -2.1005000919103622e-02</internalNodes> + <leafValues> + 3.7344399094581604e-01 -2.9618600010871887e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 679 2.0278999581933022e-02</internalNodes> + <leafValues> + -1.5200000256299973e-02 4.0555301308631897e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 680 -4.7107998281717300e-02</internalNodes> + <leafValues> + 1.2116849422454834e+00 -1.7464299499988556e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 681 1.8768499791622162e-01</internalNodes> + <leafValues> + -2.2909000515937805e-02 6.9645798206329346e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 682 -4.3228998780250549e-02</internalNodes> + <leafValues> + -1.0602480173110962e+00 -5.5599998449906707e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 683 2.0004000514745712e-02</internalNodes> + <leafValues> + -3.2751001417636871e-02 5.3805100917816162e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 684 8.0880001187324524e-03</internalNodes> + <leafValues> + 3.7548001855611801e-02 -7.4768900871276855e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 685 2.7101000770926476e-02</internalNodes> + <leafValues> + -8.1790000200271606e-02 3.3387100696563721e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 686 -9.1746002435684204e-02</internalNodes> + <leafValues> + -1.9213509559631348e+00 -3.8952998816967010e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 687 -1.2454999610781670e-02</internalNodes> + <leafValues> + 4.8360601067543030e-01 1.8168000504374504e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 688 1.4649000018835068e-02</internalNodes> + <leafValues> + -1.9906699657440186e-01 7.2815400362014771e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 689 2.9101999476552010e-02</internalNodes> + <leafValues> + 1.9871099293231964e-01 -4.9216800928115845e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 690 8.7799998000264168e-03</internalNodes> + <leafValues> + -1.9499599933624268e-01 7.7317398786544800e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 691 -5.4740000516176224e-02</internalNodes> + <leafValues> + 1.8087190389633179e+00 6.8323001265525818e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 692 -1.4798000454902649e-02</internalNodes> + <leafValues> + 7.8064900636672974e-01 -1.8709599971771240e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 693 2.5012999773025513e-02</internalNodes> + <leafValues> + 1.5285299718379974e-01 -1.6021020412445068e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 694 4.6548001468181610e-02</internalNodes> + <leafValues> + -1.6738200187683105e-01 1.1902060508728027e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 695 1.7624000087380409e-02</internalNodes> + <leafValues> + -1.0285499691963196e-01 3.9175900816917419e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 696 1.6319599747657776e-01</internalNodes> + <leafValues> + -3.5624001175165176e-02 -1.6098170280456543e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 697 1.3137999922037125e-02</internalNodes> + <leafValues> + -5.6359000504016876e-02 5.4158902168273926e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 698 -1.5665000304579735e-02</internalNodes> + <leafValues> + 2.8063100576400757e-01 -3.1708601117134094e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 699 8.0554001033306122e-02</internalNodes> + <leafValues> + 1.2640400230884552e-01 -1.0297529697418213e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 700 3.5363998264074326e-02</internalNodes> + <leafValues> + 2.0752999931573868e-02 -7.9105597734451294e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 701 3.2986998558044434e-02</internalNodes> + <leafValues> + 1.9057099521160126e-01 -8.3839899301528931e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 702 1.2195000424981117e-02</internalNodes> + <leafValues> + 7.3729000985622406e-02 -6.2780702114105225e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 703 4.3065998703241348e-02</internalNodes> + <leafValues> + 4.7384999692440033e-02 1.5712939500808716e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 704 3.0326999723911285e-02</internalNodes> + <leafValues> + -2.7314600348472595e-01 3.8572001457214355e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 705 3.5493001341819763e-02</internalNodes> + <leafValues> + 5.4593998938798904e-02 5.2583402395248413e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 706 -1.4596999622881413e-02</internalNodes> + <leafValues> + 3.8152599334716797e-01 -2.8332400321960449e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 707 1.2606999836862087e-02</internalNodes> + <leafValues> + 1.5455099940299988e-01 -3.0501499772071838e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 708 1.0172000154852867e-02</internalNodes> + <leafValues> + 2.3637000471353531e-02 -8.7217897176742554e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 709 2.8843000531196594e-02</internalNodes> + <leafValues> + 1.6090999543666840e-01 -2.0277599990367889e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 710 5.5100000463426113e-04</internalNodes> + <leafValues> + -6.1545401811599731e-01 8.0935999751091003e-02</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>127</maxWeakCount> + <stageThreshold>-3.5645289421081543e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 711 4.8344001173973083e-02</internalNodes> + <leafValues> + -8.4904599189758301e-01 5.6974399089813232e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 712 3.2460000365972519e-02</internalNodes> + <leafValues> + -8.1417298316955566e-01 4.4781699776649475e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 713 3.3339999616146088e-02</internalNodes> + <leafValues> + -3.6423799395561218e-01 6.7937397956848145e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 714 6.4019998535513878e-03</internalNodes> + <leafValues> + -1.1885459423065186e+00 1.9238699972629547e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 715 -5.6889997795224190e-03</internalNodes> + <leafValues> + 3.3085298538208008e-01 -7.1334099769592285e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 716 1.2698000296950340e-02</internalNodes> + <leafValues> + -5.0990802049636841e-01 1.1376299709081650e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 717 6.0549997724592686e-03</internalNodes> + <leafValues> + -1.0470550060272217e+00 2.0222599804401398e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 718 2.6420000940561295e-03</internalNodes> + <leafValues> + -5.0559401512145996e-01 3.6441200971603394e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 719 -1.6925999894738197e-02</internalNodes> + <leafValues> + -9.9541902542114258e-01 1.2602199614048004e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 720 2.8235999867320061e-02</internalNodes> + <leafValues> + -9.4137996435165405e-02 5.7780402898788452e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 721 1.0428999550640583e-02</internalNodes> + <leafValues> + 2.3272900283336639e-01 -5.2569699287414551e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 722 9.8860003054141998e-03</internalNodes> + <leafValues> + -1.0316299647092819e-01 4.7657600045204163e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 723 2.6015000417828560e-02</internalNodes> + <leafValues> + -1.0920000495389104e-03 -1.5581729412078857e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 724 -2.5537999346852303e-02</internalNodes> + <leafValues> + -6.5451401472091675e-01 1.8843199312686920e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 725 -3.5310001112520695e-03</internalNodes> + <leafValues> + 2.8140598535537720e-01 -4.4575300812721252e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 726 9.2449998483061790e-03</internalNodes> + <leafValues> + 1.5612000226974487e-01 -2.1370999515056610e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 727 2.1030999720096588e-02</internalNodes> + <leafValues> + -2.9170298576354980e-01 5.2234101295471191e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 728 -5.1063001155853271e-02</internalNodes> + <leafValues> + 1.3661290407180786e+00 3.0465999618172646e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 729 -6.2330000102519989e-02</internalNodes> + <leafValues> + 1.2207020521163940e+00 -2.2434400022029877e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 730 -3.2963000237941742e-02</internalNodes> + <leafValues> + -8.2016801834106445e-01 1.4531899988651276e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 731 -3.7418000400066376e-02</internalNodes> + <leafValues> + -1.2218099832534790e+00 1.9448999315500259e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 732 1.2402799725532532e-01</internalNodes> + <leafValues> + 1.2082300335168839e-01 -9.8729300498962402e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 733 -8.9229997247457504e-03</internalNodes> + <leafValues> + -1.1688489913940430e+00 2.1105000749230385e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 734 -5.9879999607801437e-02</internalNodes> + <leafValues> + -1.0689330101013184e+00 1.9860200583934784e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 735 6.2620001845061779e-03</internalNodes> + <leafValues> + -3.6229598522186279e-01 3.8000801205635071e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 736 -1.7673000693321228e-02</internalNodes> + <leafValues> + 4.9094098806381226e-01 -1.4606699347496033e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 737 1.7579000443220139e-02</internalNodes> + <leafValues> + 5.8728098869323730e-01 -2.7774399518966675e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 738 5.1560001447796822e-03</internalNodes> + <leafValues> + -7.5194999575614929e-02 6.0193097591400146e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 739 -1.0599999688565731e-02</internalNodes> + <leafValues> + 2.7637401223182678e-01 -3.7794300913810730e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 740 2.0884099602699280e-01</internalNodes> + <leafValues> + -5.3599998354911804e-03 1.0317809581756592e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 741 -2.6412999257445335e-02</internalNodes> + <leafValues> + 8.2336401939392090e-01 -2.2480599582195282e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 742 5.8892000466585159e-02</internalNodes> + <leafValues> + 1.3098299503326416e-01 -1.1853699684143066e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 743 -1.1579000391066074e-02</internalNodes> + <leafValues> + -9.0667802095413208e-01 4.4126998633146286e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 744 4.5988000929355621e-02</internalNodes> + <leafValues> + 1.0143999941647053e-02 1.0740900039672852e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 745 -2.2838000208139420e-02</internalNodes> + <leafValues> + 1.7791990041732788e+00 -1.7315499484539032e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 746 -8.1709995865821838e-03</internalNodes> + <leafValues> + 5.7386302947998047e-01 -7.4106000363826752e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 747 3.5359999164938927e-03</internalNodes> + <leafValues> + -3.2072898745536804e-01 4.0182501077651978e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 748 4.9444999545812607e-02</internalNodes> + <leafValues> + 1.9288000464439392e-01 -1.2166700363159180e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 749 3.5139999818056822e-03</internalNodes> + <leafValues> + 6.9568000733852386e-02 -7.1323698759078979e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 750 -3.0996000394225121e-02</internalNodes> + <leafValues> + -3.8862198591232300e-01 1.8098799884319305e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 751 8.6452998220920563e-02</internalNodes> + <leafValues> + -2.5792999193072319e-02 -1.5453219413757324e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 752 -1.3652600347995758e-01</internalNodes> + <leafValues> + -1.9199420213699341e+00 1.6613300144672394e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 753 -5.7689999230206013e-03</internalNodes> + <leafValues> + -1.2822589874267578e+00 -1.5907999128103256e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 754 -1.7899999395012856e-02</internalNodes> + <leafValues> + -4.0409898757934570e-01 2.3591600358486176e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 755 -1.9969999790191650e-02</internalNodes> + <leafValues> + -7.2891902923583984e-01 5.6235000491142273e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 756 -5.7493001222610474e-02</internalNodes> + <leafValues> + 5.7830798625946045e-01 -1.5796000137925148e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 757 -8.3056002855300903e-02</internalNodes> + <leafValues> + 9.1511601209640503e-01 -2.1121400594711304e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 758 -5.3771000355482101e-02</internalNodes> + <leafValues> + -5.1931297779083252e-01 1.8576000630855560e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 759 -8.3670001477003098e-03</internalNodes> + <leafValues> + 2.4109700322151184e-01 -3.9648601412773132e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 760 5.5406998842954636e-02</internalNodes> + <leafValues> + 1.6771200299263000e-01 -2.5664970874786377e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 761 -6.7180998623371124e-02</internalNodes> + <leafValues> + -1.3658570051193237e+00 -1.4232000336050987e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 762 -2.3900000378489494e-02</internalNodes> + <leafValues> + -1.7084569931030273e+00 1.6507799923419952e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 763 5.5949999950826168e-03</internalNodes> + <leafValues> + -3.1373998522758484e-01 3.2837900519371033e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 764 2.1294999867677689e-02</internalNodes> + <leafValues> + 1.4953400194644928e-01 -4.8579800128936768e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 765 -2.4613000452518463e-02</internalNodes> + <leafValues> + 7.4346399307250977e-01 -2.2305199503898621e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 766 -1.9626000896096230e-02</internalNodes> + <leafValues> + -4.0918299555778503e-01 1.8893200159072876e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 767 -5.3266000002622604e-02</internalNodes> + <leafValues> + 8.1381601095199585e-01 -2.0853699743747711e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 768 7.1290000341832638e-03</internalNodes> + <leafValues> + 3.2996100187301636e-01 -5.9937399625778198e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 769 -2.2486999630928040e-02</internalNodes> + <leafValues> + -1.2551610469818115e+00 -2.0413000136613846e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 770 -8.2310996949672699e-02</internalNodes> + <leafValues> + 1.3821430206298828e+00 5.9308998286724091e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 771 1.3097000122070312e-01</internalNodes> + <leafValues> + -3.5843998193740845e-02 -1.5396369695663452e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 772 1.4293000102043152e-02</internalNodes> + <leafValues> + -1.8475200235843658e-01 3.7455001473426819e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 773 6.3479999080300331e-03</internalNodes> + <leafValues> + -4.4901099801063538e-01 1.3876999914646149e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 774 -4.6055000275373459e-02</internalNodes> + <leafValues> + 6.7832601070404053e-01 -1.7071999609470367e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 775 5.7693999260663986e-02</internalNodes> + <leafValues> + -1.1955999769270420e-02 -1.2261159420013428e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 776 -6.0609998181462288e-03</internalNodes> + <leafValues> + 3.3958598971366882e-01 6.2800000887364149e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 777 -5.2163001149892807e-02</internalNodes> + <leafValues> + -1.0621069669723511e+00 -1.3779999688267708e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 778 4.6572998166084290e-02</internalNodes> + <leafValues> + 1.4538800716400146e-01 -1.2384550571441650e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 779 7.5309998355805874e-03</internalNodes> + <leafValues> + -2.4467700719833374e-01 5.1377099752426147e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 780 2.1615000441670418e-02</internalNodes> + <leafValues> + 1.3072599470615387e-01 -7.0996797084808350e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 781 -1.7864000052213669e-02</internalNodes> + <leafValues> + -1.0474660396575928e+00 4.9599999329075217e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 782 -3.7195000797510147e-02</internalNodes> + <leafValues> + -1.5126730203628540e+00 1.4801399409770966e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 783 -3.1100001069717109e-04</internalNodes> + <leafValues> + 1.3971500098705292e-01 -4.6867498755455017e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 784 2.5042999535799026e-02</internalNodes> + <leafValues> + 2.8632000088691711e-01 -4.1794699430465698e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 785 9.3449996784329414e-03</internalNodes> + <leafValues> + -2.7336201071739197e-01 4.3444699048995972e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 786 3.2363999634981155e-02</internalNodes> + <leafValues> + 1.8438899517059326e-01 -9.5019298791885376e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 787 -6.2299999408423901e-03</internalNodes> + <leafValues> + 3.2581999897956848e-01 -3.0815601348876953e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 788 5.1488999277353287e-02</internalNodes> + <leafValues> + 1.1416000127792358e-01 -1.9795479774475098e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 789 -2.6449000462889671e-02</internalNodes> + <leafValues> + -1.1067299842834473e+00 -8.5519999265670776e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 790 -1.5420000068843365e-02</internalNodes> + <leafValues> + 8.0138701200485229e-01 -3.2035000622272491e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 791 1.9456999376416206e-02</internalNodes> + <leafValues> + -2.6449498534202576e-01 3.8753899931907654e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 792 3.3620998263359070e-02</internalNodes> + <leafValues> + 1.6052000224590302e-02 5.8840900659561157e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 793 2.8906000778079033e-02</internalNodes> + <leafValues> + 1.5216000378131866e-02 -9.4723600149154663e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 794 2.0300000323913991e-04</internalNodes> + <leafValues> + -3.0766001343727112e-01 2.1235899627208710e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 795 -4.9141999334096909e-02</internalNodes> + <leafValues> + -1.6058609485626221e+00 -3.1094999983906746e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 796 7.6425999402999878e-02</internalNodes> + <leafValues> + 7.4758999049663544e-02 1.1639410257339478e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 797 2.3897999897599220e-02</internalNodes> + <leafValues> + -6.4320000819861889e-03 -1.1150749921798706e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 798 3.8970001041889191e-03</internalNodes> + <leafValues> + -2.4105699360370636e-01 2.0858900249004364e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 799 -8.9445002377033234e-02</internalNodes> + <leafValues> + 1.9157789945602417e+00 -1.5721100568771362e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 800 -1.5008999966084957e-02</internalNodes> + <leafValues> + -2.5174099206924438e-01 1.8179899454116821e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 801 -1.1145999655127525e-02</internalNodes> + <leafValues> + -6.9349497556686401e-01 4.4927999377250671e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 802 9.4578996300697327e-02</internalNodes> + <leafValues> + 1.8102100491523743e-01 -7.4978601932525635e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 803 5.5038899183273315e-01</internalNodes> + <leafValues> + -3.0974000692367554e-02 -1.6746139526367188e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 804 4.1381001472473145e-02</internalNodes> + <leafValues> + 6.3910000026226044e-02 7.6561200618743896e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 805 2.4771999567747116e-02</internalNodes> + <leafValues> + 1.1380000039935112e-02 -8.8559401035308838e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 806 5.0999000668525696e-02</internalNodes> + <leafValues> + 1.4890299737453461e-01 -2.4634211063385010e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 807 -1.6893999651074409e-02</internalNodes> + <leafValues> + 3.8870999217033386e-01 -2.9880300164222717e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 808 -1.2162300199270248e-01</internalNodes> + <leafValues> + -1.5542800426483154e+00 1.6300800442695618e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 809 -3.6049999762326479e-03</internalNodes> + <leafValues> + 2.1842800080776215e-01 -3.7312099337577820e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 810 1.1575400084257126e-01</internalNodes> + <leafValues> + -4.7061000019311905e-02 5.9403699636459351e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 811 3.6903999745845795e-02</internalNodes> + <leafValues> + -2.5508600473403931e-01 5.5397301912307739e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 812 1.1483999900519848e-02</internalNodes> + <leafValues> + -1.8129499256610870e-01 4.0682798624038696e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 813 -2.0233999937772751e-02</internalNodes> + <leafValues> + 5.4311197996139526e-01 -2.3822399973869324e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 814 -2.8765000402927399e-02</internalNodes> + <leafValues> + -6.9172298908233643e-01 1.5943300724029541e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 815 -5.8320001699030399e-03</internalNodes> + <leafValues> + 2.9447799921035767e-01 -3.4005999565124512e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 816 -5.5468998849391937e-02</internalNodes> + <leafValues> + 9.2200797796249390e-01 9.4093002378940582e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 817 -1.4801000244915485e-02</internalNodes> + <leafValues> + -7.9539698362350464e-01 3.1521998345851898e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 818 -7.0940000005066395e-03</internalNodes> + <leafValues> + 3.3096000552177429e-01 -5.0886999815702438e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 819 -4.5124001801013947e-02</internalNodes> + <leafValues> + -1.3719749450683594e+00 -2.1408999338746071e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 820 6.4377002418041229e-02</internalNodes> + <leafValues> + 6.3901998102664948e-02 9.1478300094604492e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 821 -1.4727000147104263e-02</internalNodes> + <leafValues> + 3.6050599813461304e-01 -2.8614500164985657e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 822 4.5007001608610153e-02</internalNodes> + <leafValues> + -1.5619699656963348e-01 5.3160297870635986e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 823 -1.1330000124871731e-03</internalNodes> + <leafValues> + 1.3422900438308716e-01 -4.4358900189399719e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 824 4.9451000988483429e-02</internalNodes> + <leafValues> + 1.0571800172328949e-01 -2.5589139461517334e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 825 2.9102999716997147e-02</internalNodes> + <leafValues> + -1.0088000446557999e-02 -1.1073939800262451e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 826 3.4786000847816467e-02</internalNodes> + <leafValues> + -2.7719999197870493e-03 5.6700998544692993e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 827 -6.1309998854994774e-03</internalNodes> + <leafValues> + -4.6889400482177734e-01 1.2636399269104004e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 828 1.5525000169873238e-02</internalNodes> + <leafValues> + -8.4279999136924744e-03 8.7469202280044556e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 829 2.9249999206513166e-03</internalNodes> + <leafValues> + -3.4434300661087036e-01 2.0851600170135498e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 830 -5.3571000695228577e-02</internalNodes> + <leafValues> + 1.4982949495315552e+00 5.7328000664710999e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 831 -1.9217999652028084e-02</internalNodes> + <leafValues> + -9.9234098196029663e-01 -9.3919998034834862e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 832 -5.5282998830080032e-02</internalNodes> + <leafValues> + -5.7682299613952637e-01 1.6860599815845490e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 833 5.6336000561714172e-02</internalNodes> + <leafValues> + -3.3775001764297485e-02 -1.3889650106430054e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 834 -2.3824000731110573e-02</internalNodes> + <leafValues> + 4.0182098746299744e-01 1.8360000103712082e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 835 1.7810000572353601e-03</internalNodes> + <leafValues> + 1.8145999312400818e-01 -4.1743400692939758e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 836 -3.7689000368118286e-02</internalNodes> + <leafValues> + 5.4683101177215576e-01 1.8219999969005585e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 837 -2.4144999682903290e-02</internalNodes> + <leafValues> + 6.8352097272872925e-01 -1.9650200009346008e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>135</maxWeakCount> + <stageThreshold>-3.7025990486145020e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 838 2.7444999665021896e-02</internalNodes> + <leafValues> + -8.9984202384948730e-01 5.1876497268676758e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 839 1.1554100364446640e-01</internalNodes> + <leafValues> + -5.6524401903152466e-01 7.0551300048828125e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 840 -2.2297000512480736e-02</internalNodes> + <leafValues> + 3.6079999804496765e-01 -6.6864597797393799e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 841 1.3325000181794167e-02</internalNodes> + <leafValues> + -5.5573397874832153e-01 3.5789999365806580e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 842 -3.8060001097619534e-03</internalNodes> + <leafValues> + -1.0713000297546387e+00 1.8850000202655792e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 843 -2.6819999329745770e-03</internalNodes> + <leafValues> + -7.1584302186965942e-01 2.6344498991966248e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 844 3.3819999080151320e-03</internalNodes> + <leafValues> + -4.6930798888206482e-01 2.6658400893211365e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 845 3.7643000483512878e-02</internalNodes> + <leafValues> + 2.1098700165748596e-01 -1.0804339647293091e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 846 -1.3861999846994877e-02</internalNodes> + <leafValues> + 6.6912001371383667e-01 -2.7942800521850586e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 847 -2.7350001037120819e-03</internalNodes> + <leafValues> + -9.5332300662994385e-01 2.4051299691200256e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 848 -3.8336999714374542e-02</internalNodes> + <leafValues> + 8.1432801485061646e-01 -2.4919399619102478e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 849 -3.4697998315095901e-02</internalNodes> + <leafValues> + 1.2330100536346436e+00 6.8600000813603401e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 850 2.3360999301075935e-02</internalNodes> + <leafValues> + -3.0794700980186462e-01 7.0714497566223145e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 851 3.5057999193668365e-02</internalNodes> + <leafValues> + 2.1205900609493256e-01 -1.4399830102920532e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 852 -1.3256999664008617e-02</internalNodes> + <leafValues> + -9.0260702371597290e-01 4.8610001802444458e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 853 1.2740000151097775e-02</internalNodes> + <leafValues> + 2.2655199468135834e-01 -4.4643801450729370e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 854 3.6400000099092722e-03</internalNodes> + <leafValues> + -3.9817899465560913e-01 3.4665399789810181e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 855 1.0064700245857239e-01</internalNodes> + <leafValues> + 1.8383599817752838e-01 -1.3410769701004028e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 856 0.</internalNodes> + <leafValues> + 1.5536400675773621e-01 -5.1582497358322144e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 857 1.1708999983966351e-02</internalNodes> + <leafValues> + 2.1651400625705719e-01 -7.2705197334289551e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 858 -3.5964999347925186e-02</internalNodes> + <leafValues> + -1.4789500236511230e+00 -2.4317000061273575e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 859 -2.1236000582575798e-02</internalNodes> + <leafValues> + -1.6844099760055542e-01 1.9526599347591400e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 860 1.4874000102281570e-02</internalNodes> + <leafValues> + 3.7335999310016632e-02 -8.7557297945022583e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 861 -5.1409997977316380e-03</internalNodes> + <leafValues> + 3.3466500043869019e-01 -2.4109700322151184e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 862 2.3450000211596489e-02</internalNodes> + <leafValues> + 5.5320002138614655e-03 -1.2509720325469971e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 863 -2.5062000378966331e-02</internalNodes> + <leafValues> + 4.5212399959564209e-01 -8.4469996392726898e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 864 -7.7400001464411616e-04</internalNodes> + <leafValues> + 1.5249900519847870e-01 -4.8486500978469849e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 865 -4.0483999997377396e-02</internalNodes> + <leafValues> + -1.3024920225143433e+00 1.7983500659465790e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 866 2.8170999139547348e-02</internalNodes> + <leafValues> + -2.4410900473594666e-01 6.2271100282669067e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 867 4.5692998915910721e-02</internalNodes> + <leafValues> + 2.8122000396251678e-02 9.2394399642944336e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 868 3.9707001298666000e-02</internalNodes> + <leafValues> + -2.2332799434661865e-01 7.7674001455307007e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 869 5.0517000257968903e-02</internalNodes> + <leafValues> + 2.0319999754428864e-01 -1.0895930528640747e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 870 -1.7266999930143356e-02</internalNodes> + <leafValues> + 6.8598401546478271e-01 -2.3304499685764313e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 871 8.0186001956462860e-02</internalNodes> + <leafValues> + -1.0292000137269497e-02 6.1881101131439209e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 872 9.7676001489162445e-02</internalNodes> + <leafValues> + -2.0070299506187439e-01 1.0088349580764771e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 873 -1.5572000294923782e-02</internalNodes> + <leafValues> + 4.7615298628807068e-01 4.5623999089002609e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 874 -1.5305000357329845e-02</internalNodes> + <leafValues> + -1.1077369451522827e+00 4.5239999890327454e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 875 -1.6485000029206276e-02</internalNodes> + <leafValues> + 1.0152939558029175e+00 1.6327999532222748e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 876 -2.6141999289393425e-02</internalNodes> + <leafValues> + 4.1723299026489258e-01 -2.8645500540733337e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 877 8.8679995387792587e-03</internalNodes> + <leafValues> + 2.1404999494552612e-01 -1.6772800683975220e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 878 -2.6886999607086182e-02</internalNodes> + <leafValues> + -1.1564220190048218e+00 -1.0324000380933285e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 879 7.7789998613297939e-03</internalNodes> + <leafValues> + 3.5359498858451843e-01 -2.9611301422119141e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 880 -1.5974000096321106e-02</internalNodes> + <leafValues> + -1.5374109745025635e+00 -2.9958000406622887e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 881 2.0866999402642250e-02</internalNodes> + <leafValues> + 2.0244100689888000e-01 -7.1270197629928589e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 882 8.5482001304626465e-02</internalNodes> + <leafValues> + -2.5932999327778816e-02 -1.5156569480895996e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 883 2.3872999474406242e-02</internalNodes> + <leafValues> + 1.6803400218486786e-01 -3.8806200027465820e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 884 -3.9105001837015152e-02</internalNodes> + <leafValues> + -1.1958349943161011e+00 -2.0361000671982765e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 885 -7.7946998178958893e-02</internalNodes> + <leafValues> + -1.0898950099945068e+00 1.4530299603939056e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 886 -1.6876000910997391e-02</internalNodes> + <leafValues> + 2.8049701452255249e-01 -4.1336300969123840e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 887 1.1875600367784500e-01</internalNodes> + <leafValues> + -4.3490998446941376e-02 4.1263699531555176e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 888 1.5624199807643890e-01</internalNodes> + <leafValues> + -2.6429599523544312e-01 5.5127799510955811e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 889 -4.5908000320196152e-02</internalNodes> + <leafValues> + 6.0189199447631836e-01 1.8921000882983208e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 890 -1.0309999808669090e-02</internalNodes> + <leafValues> + 3.8152998685836792e-01 -2.9507899284362793e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 891 9.5769003033638000e-02</internalNodes> + <leafValues> + 1.3246500492095947e-01 -4.6266800165176392e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 892 1.3686999678611755e-02</internalNodes> + <leafValues> + 1.1738699674606323e-01 -5.1664102077484131e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 893 2.3990001063793898e-03</internalNodes> + <leafValues> + -3.4007599949836731e-01 2.0953500270843506e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 894 3.3264998346567154e-02</internalNodes> + <leafValues> + -1.7052799463272095e-01 1.4366799592971802e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 895 -3.3206000924110413e-02</internalNodes> + <leafValues> + 6.1295700073242188e-01 -4.1549999266862869e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 896 2.7979998849332333e-03</internalNodes> + <leafValues> + -4.8554301261901855e-01 1.3372699916362762e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 897 -6.5792001783847809e-02</internalNodes> + <leafValues> + -4.0257668495178223e+00 1.0876700282096863e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 898 2.1430000197142363e-03</internalNodes> + <leafValues> + -3.9179998636245728e-01 2.2427099943161011e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 899 2.2363999858498573e-02</internalNodes> + <leafValues> + -8.6429998278617859e-02 3.7785199284553528e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 900 -5.7410001754760742e-02</internalNodes> + <leafValues> + 1.1454069614410400e+00 -1.9736599922180176e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 901 6.6550001502037048e-03</internalNodes> + <leafValues> + -2.1105000749230385e-02 5.8453398942947388e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 902 1.2326999567449093e-02</internalNodes> + <leafValues> + 3.7817001342773438e-02 -6.6987001895904541e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 903 -8.1869997084140778e-03</internalNodes> + <leafValues> + 5.6366002559661865e-01 -7.6877996325492859e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 904 3.6681000143289566e-02</internalNodes> + <leafValues> + -1.7343300580978394e-01 1.1670149564743042e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 905 -4.0220400691032410e-01</internalNodes> + <leafValues> + 1.2640819549560547e+00 4.3398998677730560e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 906 -2.2126000374555588e-02</internalNodes> + <leafValues> + 6.6978102922439575e-01 -2.1605299413204193e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 907 -1.3156999833881855e-02</internalNodes> + <leafValues> + -4.1198599338531494e-01 2.0215000212192535e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 908 -1.2860000133514404e-02</internalNodes> + <leafValues> + -9.1582697629928589e-01 3.9232999086380005e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 909 2.1627999842166901e-02</internalNodes> + <leafValues> + 3.8719999138265848e-03 3.5668200254440308e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 910 1.1896000243723392e-02</internalNodes> + <leafValues> + -3.7303900718688965e-01 1.9235099852085114e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 911 -1.9548999145627022e-02</internalNodes> + <leafValues> + -4.2374899983406067e-01 2.4429599940776825e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 912 6.4444996416568756e-02</internalNodes> + <leafValues> + -1.6558900475502014e-01 1.2697030305862427e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 913 1.0898499935865402e-01</internalNodes> + <leafValues> + 1.4894300699234009e-01 -2.1534640789031982e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 914 -3.4077998250722885e-02</internalNodes> + <leafValues> + 1.3779460191726685e+00 -1.6198499500751495e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 915 -3.7489999085664749e-03</internalNodes> + <leafValues> + -3.3828601241111755e-01 2.1152900159358978e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 916 -1.0971999727189541e-02</internalNodes> + <leafValues> + 7.6517897844314575e-01 -1.9692599773406982e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 917 -1.1485000140964985e-02</internalNodes> + <leafValues> + -6.9271200895309448e-01 2.1657100319862366e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 918 2.5984000414609909e-02</internalNodes> + <leafValues> + -1.1983999982476234e-02 -9.9697297811508179e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 919 4.2159999720752239e-03</internalNodes> + <leafValues> + -1.0205700248479843e-01 4.8884400725364685e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 920 -4.7697000205516815e-02</internalNodes> + <leafValues> + 1.0666010379791260e+00 -1.7576299607753754e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 921 4.0300001273863018e-04</internalNodes> + <leafValues> + 1.8524800240993500e-01 -7.4790000915527344e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 922 1.1539600044488907e-01</internalNodes> + <leafValues> + -2.2019700706005096e-01 5.4509997367858887e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 923 1.6021000221371651e-02</internalNodes> + <leafValues> + 2.5487500429153442e-01 -5.0740098953247070e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 924 5.6632000952959061e-02</internalNodes> + <leafValues> + -1.1256000027060509e-02 -9.5968097448348999e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 925 -1.0726000182330608e-02</internalNodes> + <leafValues> + -2.8544700145721436e-01 1.6994799673557281e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 926 1.2420000135898590e-01</internalNodes> + <leafValues> + -3.6139998584985733e-02 -1.3132710456848145e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 927 -5.3799999877810478e-03</internalNodes> + <leafValues> + 3.3092701435089111e-01 1.3307999819517136e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 928 1.1908000335097313e-02</internalNodes> + <leafValues> + -3.4830299019813538e-01 2.4041900038719177e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 929 -4.3007999658584595e-02</internalNodes> + <leafValues> + -1.4390469789505005e+00 1.5599599480628967e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 930 -3.3149998635053635e-02</internalNodes> + <leafValues> + -1.1805850267410278e+00 -1.2347999960184097e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 931 -2.1341999992728233e-02</internalNodes> + <leafValues> + 2.2119441032409668e+00 6.2737002968788147e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 932 -1.2218999676406384e-02</internalNodes> + <leafValues> + -1.8709750175476074e+00 -4.5499999076128006e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 933 -1.6860999166965485e-02</internalNodes> + <leafValues> + -7.6912701129913330e-01 1.5330000221729279e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 934 -2.4999999441206455e-03</internalNodes> + <leafValues> + -6.2987399101257324e-01 5.1600001752376556e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 935 -4.5037999749183655e-02</internalNodes> + <leafValues> + 8.5428899526596069e-01 6.2600001692771912e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 936 3.9057999849319458e-02</internalNodes> + <leafValues> + -3.2458998262882233e-02 -1.3325669765472412e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 937 6.6720000468194485e-03</internalNodes> + <leafValues> + -1.9423599541187286e-01 3.7328699231147766e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 938 -1.6361000016331673e-02</internalNodes> + <leafValues> + 2.0605869293212891e+00 -1.5042699873447418e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 939 6.1719999648630619e-03</internalNodes> + <leafValues> + -1.1610999703407288e-01 2.5455400347709656e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 940 4.5722000300884247e-02</internalNodes> + <leafValues> + -1.6340000554919243e-02 -1.0449140071868896e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 941 4.1209999471902847e-03</internalNodes> + <leafValues> + -4.1997998952865601e-02 3.9680999517440796e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 942 -1.7800000205170363e-04</internalNodes> + <leafValues> + -6.6422599554061890e-01 3.3443000167608261e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 943 7.1109998971223831e-03</internalNodes> + <leafValues> + -5.8231998234987259e-02 3.7857300043106079e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 944 -4.9864001572132111e-02</internalNodes> + <leafValues> + 6.1019402742385864e-01 -2.1005700528621674e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 945 -2.5011999532580376e-02</internalNodes> + <leafValues> + -5.7100099325180054e-01 1.7848399281501770e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 946 3.0939999967813492e-02</internalNodes> + <leafValues> + 5.6363001465797424e-02 -6.4731001853942871e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 947 4.6271000057458878e-02</internalNodes> + <leafValues> + 1.7482399940490723e-01 -9.8909401893615723e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 948 -3.1870000530034304e-03</internalNodes> + <leafValues> + -6.6804802417755127e-01 3.2267000526189804e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 949 -2.4351999163627625e-02</internalNodes> + <leafValues> + 2.9444900155067444e-01 -1.3599999947473407e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 950 1.1974000371992588e-02</internalNodes> + <leafValues> + -2.8345099091529846e-01 4.7171199321746826e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 951 1.3070000335574150e-02</internalNodes> + <leafValues> + -1.0834600031375885e-01 5.7193297147750854e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 952 5.9163000434637070e-02</internalNodes> + <leafValues> + -5.0939001142978668e-02 -1.9059720039367676e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 953 -4.1094999760389328e-02</internalNodes> + <leafValues> + 4.5104598999023438e-01 -9.7599998116493225e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 954 -8.3989001810550690e-02</internalNodes> + <leafValues> + -2.0349199771881104e+00 -5.1019001752138138e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 955 4.4619001448154449e-02</internalNodes> + <leafValues> + 1.7041100561618805e-01 -1.2278720140457153e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 956 2.4419000372290611e-02</internalNodes> + <leafValues> + -2.1796999499201775e-02 -1.0822949409484863e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 957 -4.3870001100003719e-03</internalNodes> + <leafValues> + 3.0466699600219727e-01 -3.7066599726676941e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 958 2.4607999250292778e-02</internalNodes> + <leafValues> + -3.1169500946998596e-01 2.3657299578189850e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 959 -8.5182003676891327e-02</internalNodes> + <leafValues> + -1.7982350587844849e+00 1.5254299342632294e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 960 2.1844999864697456e-02</internalNodes> + <leafValues> + -5.1888000220060349e-02 -1.9017189741134644e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 961 -1.6829000785946846e-02</internalNodes> + <leafValues> + 2.1025900542736053e-01 2.1656999364495277e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 962 3.2547999173402786e-02</internalNodes> + <leafValues> + -2.0292599499225616e-01 6.0944002866744995e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 963 2.4709999561309814e-03</internalNodes> + <leafValues> + -9.5371198654174805e-01 1.8568399548530579e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 964 5.5415999144315720e-02</internalNodes> + <leafValues> + -1.4405299723148346e-01 2.1506340503692627e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 965 -1.0635499656200409e-01</internalNodes> + <leafValues> + -1.0911970138549805e+00 1.3228000700473785e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 966 -7.9889995977282524e-03</internalNodes> + <leafValues> + 1.0253400355577469e-01 -5.1744902133941650e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 967 7.5567997992038727e-02</internalNodes> + <leafValues> + 5.8965001255273819e-02 1.2354209423065186e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 968 -9.2805996537208557e-02</internalNodes> + <leafValues> + -1.3431650400161743e+00 -3.4462999552488327e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 969 4.9431998282670975e-02</internalNodes> + <leafValues> + 4.9601998180150986e-02 1.6054730415344238e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 970 -1.1772999539971352e-02</internalNodes> + <leafValues> + -1.0261050462722778e+00 -4.1559999808669090e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 971 8.5886001586914062e-02</internalNodes> + <leafValues> + 8.4642998874187469e-02 9.5220798254013062e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 972 8.1031002104282379e-02</internalNodes> + <leafValues> + -1.4687100052833557e-01 1.9359990358352661e+00</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>136</maxWeakCount> + <stageThreshold>-3.4265899658203125e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 973 -3.3840999007225037e-02</internalNodes> + <leafValues> + 6.5889501571655273e-01 -6.9755297899246216e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 974 1.5410000458359718e-02</internalNodes> + <leafValues> + -9.0728402137756348e-01 3.0478599667549133e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 975 5.4905999451875687e-02</internalNodes> + <leafValues> + -4.9774798750877380e-01 5.7132601737976074e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 976 2.1390000358223915e-02</internalNodes> + <leafValues> + -4.2565199732780457e-01 5.8096802234649658e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 977 7.8849997371435165e-03</internalNodes> + <leafValues> + -4.7905999422073364e-01 4.3016499280929565e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 978 -3.7544999271631241e-02</internalNodes> + <leafValues> + 5.0861597061157227e-01 -1.9985899329185486e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 979 1.5925799310207367e-01</internalNodes> + <leafValues> + -2.3263600468635559e-01 1.0993319749832153e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 980 -6.8939998745918274e-02</internalNodes> + <leafValues> + 4.0569001436233521e-01 5.6855000555515289e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 981 -3.3695001155138016e-02</internalNodes> + <leafValues> + 4.5132800936698914e-01 -3.3332800865173340e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 982 -6.3314996659755707e-02</internalNodes> + <leafValues> + -8.5015702247619629e-01 2.2341699898242950e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 983 7.3699997738003731e-03</internalNodes> + <leafValues> + -9.3082201480865479e-01 5.9216998517513275e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 984 -9.5969997346401215e-03</internalNodes> + <leafValues> + -1.2794899940490723e+00 1.8447299301624298e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 985 -1.3067999482154846e-01</internalNodes> + <leafValues> + 5.8426898717880249e-01 -2.6007199287414551e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 986 5.7402998208999634e-02</internalNodes> + <leafValues> + -5.3789000958204269e-02 7.1175599098205566e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 987 -7.2340001352131367e-03</internalNodes> + <leafValues> + -8.6962199211120605e-01 7.5214996933937073e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 988 3.1098999083042145e-02</internalNodes> + <leafValues> + -7.5006999075412750e-02 9.0781599283218384e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 989 3.5854000598192215e-02</internalNodes> + <leafValues> + -2.4795499444007874e-01 7.2272098064422607e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 990 -3.1534999608993530e-02</internalNodes> + <leafValues> + -1.1238329410552979e+00 2.0988300442695618e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 991 -1.9437000155448914e-02</internalNodes> + <leafValues> + -1.4499390125274658e+00 -1.5100000426173210e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 992 -7.2420001961290836e-03</internalNodes> + <leafValues> + 5.3864902257919312e-01 -1.1375399678945541e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 993 8.1639997661113739e-03</internalNodes> + <leafValues> + 6.6889002919197083e-02 -7.6872897148132324e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 994 -4.3653000146150589e-02</internalNodes> + <leafValues> + 1.1413530111312866e+00 4.0217000991106033e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 995 2.6569999754428864e-02</internalNodes> + <leafValues> + -2.4719099700450897e-01 5.9295099973678589e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 996 3.2216999679803848e-02</internalNodes> + <leafValues> + -4.0024999529123306e-02 3.2688000798225403e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 997 -7.2236001491546631e-02</internalNodes> + <leafValues> + 5.8729398250579834e-01 -2.5396001338958740e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 998 3.1424999237060547e-02</internalNodes> + <leafValues> + 1.5315100550651550e-01 -5.6042098999023438e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 999 -4.7699999413453043e-04</internalNodes> + <leafValues> + 1.6958899796009064e-01 -5.2626699209213257e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1000 2.7189999818801880e-03</internalNodes> + <leafValues> + -1.4944599568843842e-01 2.9658699035644531e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1001 3.2875001430511475e-02</internalNodes> + <leafValues> + -3.9943501353263855e-01 2.5156599283218384e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1002 -1.4553000219166279e-02</internalNodes> + <leafValues> + 2.7972599864006042e-01 -4.7203800082206726e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1003 3.8017999380826950e-02</internalNodes> + <leafValues> + -2.9200001154094934e-03 -1.1300059556961060e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1004 2.8659999370574951e-03</internalNodes> + <leafValues> + 4.1111800074577332e-01 -2.6220801472663879e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1005 -4.1606999933719635e-02</internalNodes> + <leafValues> + -1.4293819665908813e+00 -1.9132999703288078e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1006 -2.4802999570965767e-02</internalNodes> + <leafValues> + -2.5013598799705505e-01 1.5978699922561646e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1007 1.0098000057041645e-02</internalNodes> + <leafValues> + 4.3738998472690582e-02 -6.9986099004745483e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1008 -2.0947000011801720e-02</internalNodes> + <leafValues> + -9.4137799739837646e-01 2.3204000294208527e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1009 2.2458000108599663e-02</internalNodes> + <leafValues> + -2.7185800671577454e-01 4.5319199562072754e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1010 -3.7110999226570129e-02</internalNodes> + <leafValues> + -1.0314660072326660e+00 1.4421799778938293e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1011 -1.0648000054061413e-02</internalNodes> + <leafValues> + 6.3107001781463623e-01 -2.5520798563957214e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1012 5.5422998964786530e-02</internalNodes> + <leafValues> + 1.6206599771976471e-01 -1.7722640037536621e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1013 2.1601999178528786e-02</internalNodes> + <leafValues> + -2.5016099214553833e-01 5.4119801521301270e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1014 8.7000000348780304e-05</internalNodes> + <leafValues> + -2.9008901119232178e-01 3.3507999777793884e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1015 1.4406000263988972e-02</internalNodes> + <leafValues> + -7.8840004280209541e-03 -1.1677219867706299e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1016 1.0777399688959122e-01</internalNodes> + <leafValues> + 1.1292000114917755e-01 -2.4940319061279297e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1017 3.5943999886512756e-02</internalNodes> + <leafValues> + -1.9480599462985992e-01 9.5757502317428589e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1018 -3.9510000497102737e-03</internalNodes> + <leafValues> + 3.0927801132202148e-01 -2.5530201196670532e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1019 2.0942000672221184e-02</internalNodes> + <leafValues> + -7.6319999061524868e-03 -1.0086350440979004e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1020 -2.9877999797463417e-02</internalNodes> + <leafValues> + -4.6027699112892151e-01 1.9507199525833130e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1021 2.5971999391913414e-02</internalNodes> + <leafValues> + -1.2187999673187733e-02 -1.0035500526428223e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1022 1.0603000409901142e-02</internalNodes> + <leafValues> + -7.5969003140926361e-02 4.1669899225234985e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1023 8.5819996893405914e-03</internalNodes> + <leafValues> + -2.6648598909378052e-01 3.9111500978469849e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1024 2.1270999684929848e-02</internalNodes> + <leafValues> + 1.8273900449275970e-01 -3.6052298545837402e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1025 7.4518002569675446e-02</internalNodes> + <leafValues> + -1.8938399851322174e-01 9.2658001184463501e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1026 4.6569998376071453e-03</internalNodes> + <leafValues> + -1.4506199955940247e-01 3.3294600248336792e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1027 1.7119999974966049e-03</internalNodes> + <leafValues> + -5.2464002370834351e-01 8.9879997074604034e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1028 9.8500004969537258e-04</internalNodes> + <leafValues> + -3.8381999731063843e-01 2.4392999708652496e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1029 2.8233999386429787e-02</internalNodes> + <leafValues> + -5.7879998348653316e-03 -1.2617139816284180e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1030 -3.2678000628948212e-02</internalNodes> + <leafValues> + -5.7953298091888428e-01 1.6955299675464630e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1031 2.2536000236868858e-02</internalNodes> + <leafValues> + 2.2281000390648842e-02 -8.7869602441787720e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1032 -2.1657999604940414e-02</internalNodes> + <leafValues> + -6.5108501911163330e-01 1.2966899573802948e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1033 7.6799998059868813e-03</internalNodes> + <leafValues> + -3.3965200185775757e-01 2.2013300657272339e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1034 1.4592000283300877e-02</internalNodes> + <leafValues> + 1.5077300369739532e-01 -5.0452399253845215e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1035 2.7868000790476799e-02</internalNodes> + <leafValues> + -2.5045299530029297e-01 4.5741999149322510e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1036 5.6940000504255295e-03</internalNodes> + <leafValues> + -1.0948500037193298e-01 5.5757802724838257e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1037 -1.0002999566495419e-02</internalNodes> + <leafValues> + -9.7366297245025635e-01 1.8467999994754791e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1038 -4.0719998069107533e-03</internalNodes> + <leafValues> + 3.8222199678421021e-01 -1.6921100020408630e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1039 -2.2593999281525612e-02</internalNodes> + <leafValues> + -1.0391089916229248e+00 5.1839998923242092e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1040 -3.9579998701810837e-02</internalNodes> + <leafValues> + -5.5109229087829590e+00 1.1163999885320663e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1041 -1.7537999898195267e-02</internalNodes> + <leafValues> + 9.5485800504684448e-01 -1.8584500253200531e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1042 9.0300003066658974e-03</internalNodes> + <leafValues> + 1.0436000302433968e-02 8.2114797830581665e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1043 -7.9539995640516281e-03</internalNodes> + <leafValues> + 2.2632899880409241e-01 -3.4568199515342712e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1044 2.7091000229120255e-02</internalNodes> + <leafValues> + 1.6430099308490753e-01 -1.3926379680633545e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1045 -2.0625999197363853e-02</internalNodes> + <leafValues> + -8.6366099119186401e-01 2.3880000226199627e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1046 -7.1989998221397400e-02</internalNodes> + <leafValues> + -2.8192629814147949e+00 1.1570499837398529e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1047 -2.6964999735355377e-02</internalNodes> + <leafValues> + -1.2946130037307739e+00 -2.4661000818014145e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1048 -4.7377999871969223e-02</internalNodes> + <leafValues> + -8.1306397914886475e-01 1.1831399798393250e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1049 -1.0895600169897079e-01</internalNodes> + <leafValues> + 6.5937900543212891e-01 -2.0843900740146637e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1050 1.3574000447988510e-02</internalNodes> + <leafValues> + 7.4240001849830151e-03 5.3152197599411011e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1051 -6.6920001991093159e-03</internalNodes> + <leafValues> + 3.0655801296234131e-01 -3.1084299087524414e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1052 -3.9070001803338528e-03</internalNodes> + <leafValues> + 2.5576499104499817e-01 -5.2932001650333405e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1053 -3.7613000720739365e-02</internalNodes> + <leafValues> + -1.4350049495697021e+00 -1.5448000282049179e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1054 8.6329998448491096e-03</internalNodes> + <leafValues> + -1.6884399950504303e-01 4.2124900221824646e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1055 -3.2097000628709793e-02</internalNodes> + <leafValues> + -6.4979398250579834e-01 4.1110001504421234e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1056 5.8495998382568359e-02</internalNodes> + <leafValues> + -5.2963998168706894e-02 6.3368302583694458e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1057 -4.0901999920606613e-02</internalNodes> + <leafValues> + -9.2101097106933594e-01 9.0640000998973846e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1058 -1.9925000146031380e-02</internalNodes> + <leafValues> + 5.3759998083114624e-01 -6.2996998429298401e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1059 -4.6020001173019409e-03</internalNodes> + <leafValues> + -5.4333502054214478e-01 8.4104999899864197e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1060 1.6824999824166298e-02</internalNodes> + <leafValues> + 1.5563699603080750e-01 -4.0171200037002563e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1061 9.4790002331137657e-03</internalNodes> + <leafValues> + -2.4245299398899078e-01 5.1509499549865723e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1062 -1.9534999504685402e-02</internalNodes> + <leafValues> + -5.1118397712707520e-01 1.3831999897956848e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1063 1.0746000334620476e-02</internalNodes> + <leafValues> + -2.1854999661445618e-01 6.2828701734542847e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1064 3.7927001714706421e-02</internalNodes> + <leafValues> + 1.1640299856662750e-01 -2.7301959991455078e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1065 1.6390999779105186e-02</internalNodes> + <leafValues> + -1.4635999687016010e-02 -1.0797250270843506e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1066 -1.9785000011324883e-02</internalNodes> + <leafValues> + 1.2166420221328735e+00 3.3275000751018524e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1067 1.1067000217735767e-02</internalNodes> + <leafValues> + -2.5388300418853760e-01 4.4038599729537964e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1068 5.2479999139904976e-03</internalNodes> + <leafValues> + 2.2496800124645233e-01 -2.4216499924659729e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1069 -1.1141999624669552e-02</internalNodes> + <leafValues> + 2.5018098950386047e-01 -3.0811500549316406e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1070 -1.0666999965906143e-02</internalNodes> + <leafValues> + -3.2729101181030273e-01 2.6168298721313477e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1071 1.0545299947261810e-01</internalNodes> + <leafValues> + -5.5750001221895218e-02 -1.9605729579925537e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1072 5.4827999323606491e-02</internalNodes> + <leafValues> + -1.9519999623298645e-03 7.3866099119186401e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1073 1.7760999500751495e-02</internalNodes> + <leafValues> + -3.0647200345993042e-01 2.6346999406814575e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1074 -3.1185999512672424e-02</internalNodes> + <leafValues> + -2.4600900709629059e-01 1.7082199454307556e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1075 -5.7296000421047211e-02</internalNodes> + <leafValues> + 4.7033500671386719e-01 -2.6048299670219421e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1076 -1.1312000453472137e-02</internalNodes> + <leafValues> + 3.8628900051116943e-01 -2.8817000985145569e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1077 3.0592000111937523e-02</internalNodes> + <leafValues> + -4.8826001584529877e-02 -1.7638969421386719e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1078 1.8489999929443002e-03</internalNodes> + <leafValues> + 2.1099899709224701e-01 -2.5940999388694763e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1079 1.1419000104069710e-02</internalNodes> + <leafValues> + -1.6829599440097809e-01 1.0278660058975220e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1080 8.1403002142906189e-02</internalNodes> + <leafValues> + 1.1531999707221985e-01 -1.2482399940490723e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1081 5.3495999425649643e-02</internalNodes> + <leafValues> + -4.6303998678922653e-02 -1.7165969610214233e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1082 -2.3948000743985176e-02</internalNodes> + <leafValues> + -4.0246599912643433e-01 2.0562100410461426e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1083 6.7690000869333744e-03</internalNodes> + <leafValues> + -3.3152300119400024e-01 2.0683400332927704e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1084 -3.2343998551368713e-02</internalNodes> + <leafValues> + -7.2632801532745361e-01 2.0073500275611877e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1085 3.7863001227378845e-02</internalNodes> + <leafValues> + -1.5631000697612762e-01 1.6697460412979126e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1086 1.5440000221133232e-02</internalNodes> + <leafValues> + 1.9487400352954865e-01 -3.5384199023246765e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1087 -4.4376000761985779e-02</internalNodes> + <leafValues> + 8.2093602418899536e-01 -1.8193599581718445e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1088 -2.3102000355720520e-02</internalNodes> + <leafValues> + -4.3044099211692810e-01 1.2375400215387344e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1089 1.9400000572204590e-02</internalNodes> + <leafValues> + -2.9726000502705574e-02 -1.1597590446472168e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1090 1.0385700315237045e-01</internalNodes> + <leafValues> + 1.1149899661540985e-01 -4.6835222244262695e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1091 -1.8964000046253204e-02</internalNodes> + <leafValues> + 2.1773819923400879e+00 -1.4544400572776794e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1092 3.8750998675823212e-02</internalNodes> + <leafValues> + -4.9446001648902893e-02 3.4018298983573914e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1093 2.2766999900341034e-02</internalNodes> + <leafValues> + -3.2802999019622803e-01 3.0531400442123413e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1094 -3.1357001513242722e-02</internalNodes> + <leafValues> + 1.1520819664001465e+00 2.7305999770760536e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1095 9.6909999847412109e-03</internalNodes> + <leafValues> + -3.8799500465393066e-01 2.1512599289417267e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1096 -4.9284998327493668e-02</internalNodes> + <leafValues> + -1.6774909496307373e+00 1.5774199366569519e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1097 -3.9510998874902725e-02</internalNodes> + <leafValues> + -9.7647899389266968e-01 -1.0552000254392624e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1098 4.7997999936342239e-02</internalNodes> + <leafValues> + 2.0843900740146637e-01 -6.8992799520492554e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1099 5.1422998309135437e-02</internalNodes> + <leafValues> + -1.6665300726890564e-01 1.2149239778518677e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1100 1.4279999770224094e-02</internalNodes> + <leafValues> + 2.3627699911594391e-01 -4.1396799683570862e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1101 -9.1611996293067932e-02</internalNodes> + <leafValues> + -9.2830902338027954e-01 -1.8345000222325325e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1102 6.5080001950263977e-03</internalNodes> + <leafValues> + -7.3647201061248779e-01 1.9497099518775940e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1103 3.5723000764846802e-02</internalNodes> + <leafValues> + 1.4197799563407898e-01 -4.2089301347732544e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1104 5.0638001412153244e-02</internalNodes> + <leafValues> + 1.1644000187516212e-02 7.8486597537994385e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1105 -1.4613999985158443e-02</internalNodes> + <leafValues> + -1.1909500360488892e+00 -3.5128001123666763e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1106 -3.8662999868392944e-02</internalNodes> + <leafValues> + 2.4314730167388916e+00 6.5647996962070465e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1107 -4.0346998721361160e-02</internalNodes> + <leafValues> + 7.1755301952362061e-01 -1.9108299911022186e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1108 2.3902000859379768e-02</internalNodes> + <leafValues> + 1.5646199882030487e-01 -7.9294800758361816e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>137</maxWeakCount> + <stageThreshold>-3.5125269889831543e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 1109 8.5640000179409981e-03</internalNodes> + <leafValues> + -8.1450700759887695e-01 5.8875298500061035e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1110 -1.3292600214481354e-01</internalNodes> + <leafValues> + 9.3213397264480591e-01 -2.9367300868034363e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1111 9.8400004208087921e-03</internalNodes> + <leafValues> + -5.6462901830673218e-01 4.1647699475288391e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1112 5.0889998674392700e-03</internalNodes> + <leafValues> + -7.9232800006866455e-01 1.6975000500679016e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1113 -6.1039000749588013e-02</internalNodes> + <leafValues> + -1.4169000387191772e+00 2.5020999833941460e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1114 -4.6599999768659472e-04</internalNodes> + <leafValues> + 3.7982499599456787e-01 -4.1567099094390869e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1115 3.3889999613165855e-03</internalNodes> + <leafValues> + -4.0768599510192871e-01 3.5548499226570129e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1116 2.1006999537348747e-02</internalNodes> + <leafValues> + -2.4080100655555725e-01 8.6112701892852783e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1117 7.5559997931122780e-03</internalNodes> + <leafValues> + -8.7467199563980103e-01 9.8572000861167908e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1118 2.4779999628663063e-02</internalNodes> + <leafValues> + 1.5566200017929077e-01 -6.9229799509048462e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1119 -3.5620000213384628e-02</internalNodes> + <leafValues> + -1.1472270488739014e+00 3.6359999328851700e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1120 1.9810000434517860e-02</internalNodes> + <leafValues> + 1.5516200661659241e-01 -6.9520097970962524e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1121 1.5019999817013741e-02</internalNodes> + <leafValues> + 4.1990000754594803e-02 -9.6622800827026367e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1122 -2.3137999698519707e-02</internalNodes> + <leafValues> + 4.3396899104118347e-01 2.4160000029951334e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1123 -1.8743000924587250e-02</internalNodes> + <leafValues> + 4.3481099605560303e-01 -3.2522499561309814e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1124 4.5080000162124634e-01</internalNodes> + <leafValues> + -9.4573996961116791e-02 7.2421300411224365e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1125 1.1854999698698521e-02</internalNodes> + <leafValues> + -3.8133099675178528e-01 3.0098399519920349e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1126 -2.4830000475049019e-02</internalNodes> + <leafValues> + 8.9300602674484253e-01 -1.0295899957418442e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1127 -4.4743001461029053e-02</internalNodes> + <leafValues> + 8.6280298233032227e-01 -2.1716499328613281e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1128 -1.4600000344216824e-02</internalNodes> + <leafValues> + 6.0069400072097778e-01 -1.5906299650669098e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1129 -2.4527000263333321e-02</internalNodes> + <leafValues> + -1.5872869491577148e+00 -2.1817000582814217e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1130 2.3024000227451324e-02</internalNodes> + <leafValues> + 1.6853399574756622e-01 -3.8106900453567505e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1131 -2.4917000904679298e-02</internalNodes> + <leafValues> + 5.0810897350311279e-01 -2.7279898524284363e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1132 1.0130000300705433e-03</internalNodes> + <leafValues> + -4.3138799071311951e-01 2.6438099145889282e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1133 1.5603000298142433e-02</internalNodes> + <leafValues> + -3.1624200940132141e-01 5.5715900659561157e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1134 -2.6685999706387520e-02</internalNodes> + <leafValues> + 1.0553920269012451e+00 2.9074000194668770e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1135 1.3940000208094716e-03</internalNodes> + <leafValues> + -7.1873801946640015e-01 6.5390996634960175e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1136 -6.4799998654052615e-04</internalNodes> + <leafValues> + 2.4884399771690369e-01 -2.0978200435638428e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1137 -3.1888000667095184e-02</internalNodes> + <leafValues> + -6.8844497203826904e-01 6.3589997589588165e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1138 -4.9290000461041927e-03</internalNodes> + <leafValues> + -5.9152501821517944e-01 2.7943599224090576e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1139 3.1168000772595406e-02</internalNodes> + <leafValues> + 4.5223999768495560e-02 -8.8639199733734131e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1140 -3.3663000911474228e-02</internalNodes> + <leafValues> + -6.1590200662612915e-01 1.5749299526214600e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1141 1.1966999620199203e-02</internalNodes> + <leafValues> + -3.0606698989868164e-01 4.2293301224708557e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1142 -3.4680001437664032e-02</internalNodes> + <leafValues> + -1.3734940290451050e+00 1.5908700227737427e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1143 9.9290004000067711e-03</internalNodes> + <leafValues> + -5.5860197544097900e-01 1.2119200080633163e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1144 5.9574998915195465e-02</internalNodes> + <leafValues> + 4.9720001406967640e-03 8.2055401802062988e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1145 -6.5428003668785095e-02</internalNodes> + <leafValues> + 1.5651429891586304e+00 -1.6817499697208405e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1146 -9.2895999550819397e-02</internalNodes> + <leafValues> + -1.5794529914855957e+00 1.4661799371242523e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1147 -4.1184000670909882e-02</internalNodes> + <leafValues> + -1.5518720149993896e+00 -2.9969999566674232e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1148 2.1447999402880669e-02</internalNodes> + <leafValues> + 1.7196300625801086e-01 -6.9343197345733643e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1149 -2.5569999590516090e-02</internalNodes> + <leafValues> + -1.3061310052871704e+00 -2.4336999282240868e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1150 -4.1200999170541763e-02</internalNodes> + <leafValues> + -1.3821059465408325e+00 1.4801800251007080e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1151 -1.7668999731540680e-02</internalNodes> + <leafValues> + -7.0889997482299805e-01 3.6524001508951187e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1152 9.0060001239180565e-03</internalNodes> + <leafValues> + -4.0913999080657959e-02 8.0373102426528931e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1153 -1.1652999557554722e-02</internalNodes> + <leafValues> + 5.7546800374984741e-01 -2.4991700053215027e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1154 -7.4780001305043697e-03</internalNodes> + <leafValues> + -4.9280899763107300e-01 1.9810900092124939e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1155 8.5499999113380909e-04</internalNodes> + <leafValues> + -4.8858100175857544e-01 1.3563099503517151e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1156 -3.0538000166416168e-02</internalNodes> + <leafValues> + -6.0278397798538208e-01 1.8522000312805176e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1157 -1.8846999853849411e-02</internalNodes> + <leafValues> + 2.3565599322319031e-01 -3.5136300325393677e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1158 -8.1129996106028557e-03</internalNodes> + <leafValues> + -8.1304997205734253e-02 2.1069599688053131e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1159 -3.4830000251531601e-02</internalNodes> + <leafValues> + -1.2065670490264893e+00 -1.4251999557018280e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1160 1.9021000713109970e-02</internalNodes> + <leafValues> + 2.3349900543689728e-01 -4.5664900541305542e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1161 -1.9004000350832939e-02</internalNodes> + <leafValues> + -8.1075799465179443e-01 1.3140000402927399e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1162 -8.9057996869087219e-02</internalNodes> + <leafValues> + 6.1542397737503052e-01 3.2983001321554184e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1163 6.8620000965893269e-03</internalNodes> + <leafValues> + -2.9583099484443665e-01 2.7003699541091919e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1164 -2.8240999206900597e-02</internalNodes> + <leafValues> + -6.1102700233459473e-01 1.7357499897480011e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1165 -3.2099999953061342e-04</internalNodes> + <leafValues> + -5.3322899341583252e-01 6.8539001047611237e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1166 -1.0829100012779236e-01</internalNodes> + <leafValues> + -1.2879559993743896e+00 1.1801700294017792e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1167 1.5878999605774879e-02</internalNodes> + <leafValues> + -1.7072600126266479e-01 1.1103910207748413e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1168 8.6859995499253273e-03</internalNodes> + <leafValues> + -1.0995099693536758e-01 4.6010500192642212e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1169 -2.5234999135136604e-02</internalNodes> + <leafValues> + 1.0220669507980347e+00 -1.8694299459457397e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1170 -1.3508999720215797e-02</internalNodes> + <leafValues> + -7.8316599130630493e-01 1.4202600717544556e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1171 -7.7149998396635056e-03</internalNodes> + <leafValues> + -8.8060700893402100e-01 1.1060000397264957e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1172 7.1580000221729279e-02</internalNodes> + <leafValues> + 1.1369399726390839e-01 -1.1032789945602417e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1173 -1.3554000295698643e-02</internalNodes> + <leafValues> + -8.1096500158309937e-01 3.4080001059919596e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1174 2.9450000729411840e-03</internalNodes> + <leafValues> + -7.2879999876022339e-02 3.4998100996017456e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1175 -5.0833001732826233e-02</internalNodes> + <leafValues> + -1.2868590354919434e+00 -2.8842000290751457e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1176 -8.7989997118711472e-03</internalNodes> + <leafValues> + 4.7613599896430969e-01 -1.4690400660037994e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1177 2.1424399316310883e-01</internalNodes> + <leafValues> + -5.9702001512050629e-02 -2.4802260398864746e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1178 1.3962999917566776e-02</internalNodes> + <leafValues> + 1.7420299351215363e-01 -4.3911001086235046e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1179 4.2502000927925110e-02</internalNodes> + <leafValues> + -1.9965299963951111e-01 7.0654797554016113e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1180 1.9827999174594879e-02</internalNodes> + <leafValues> + -6.9136001169681549e-02 6.1643397808074951e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1181 -3.3560000360012054e-02</internalNodes> + <leafValues> + -1.2740780115127563e+00 -2.5673000141978264e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1182 6.3542999327182770e-02</internalNodes> + <leafValues> + 1.2403500080108643e-01 -1.0776289701461792e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1183 2.1933000534772873e-02</internalNodes> + <leafValues> + 1.4952000230550766e-02 -7.1023499965667725e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1184 -7.8424997627735138e-02</internalNodes> + <leafValues> + 6.2033998966217041e-01 3.3610999584197998e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1185 1.4390000142157078e-02</internalNodes> + <leafValues> + -3.6324599385261536e-01 1.7308300733566284e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1186 -6.7309997975826263e-02</internalNodes> + <leafValues> + 5.2374100685119629e-01 1.2799999676644802e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1187 1.3047499954700470e-01</internalNodes> + <leafValues> + -1.7122499644756317e-01 1.1235200166702271e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1188 -4.6245999634265900e-02</internalNodes> + <leafValues> + -1.1908329725265503e+00 1.7425599694252014e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1189 -2.9842000454664230e-02</internalNodes> + <leafValues> + 8.3930599689483643e-01 -1.8064199388027191e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1190 -3.8099999073892832e-04</internalNodes> + <leafValues> + 3.5532799363136292e-01 -2.3842300474643707e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1191 -2.2378999739885330e-02</internalNodes> + <leafValues> + -8.7943899631500244e-01 -7.8399997437372804e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 1192 -1.5569999814033508e-03</internalNodes> + <leafValues> + -1.4253300428390503e-01 2.5876200199127197e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1193 1.2013000436127186e-02</internalNodes> + <leafValues> + -2.9015499353408813e-01 2.6051101088523865e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1194 2.4384999647736549e-02</internalNodes> + <leafValues> + -3.1438998878002167e-02 5.8695900440216064e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1195 -4.7180999070405960e-02</internalNodes> + <leafValues> + 6.9430100917816162e-01 -2.1816100180149078e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1196 -2.4893999099731445e-02</internalNodes> + <leafValues> + -6.4599299430847168e-01 1.5611599385738373e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1197 2.1944999694824219e-02</internalNodes> + <leafValues> + -2.7742000296711922e-02 -1.1346880197525024e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1198 1.8809899687767029e-01</internalNodes> + <leafValues> + -1.0076000355184078e-02 1.2429029941558838e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1199 -7.7872000634670258e-02</internalNodes> + <leafValues> + 8.5008001327514648e-01 -1.9015499949455261e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1200 -4.8769000917673111e-02</internalNodes> + <leafValues> + -2.0763080120086670e+00 1.2179400026798248e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1201 -1.7115000635385513e-02</internalNodes> + <leafValues> + -8.5687297582626343e-01 7.8760003671050072e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1202 -2.7499999850988388e-03</internalNodes> + <leafValues> + 3.8645499944686890e-01 -1.1391499638557434e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1203 -9.8793998360633850e-02</internalNodes> + <leafValues> + -1.7233899831771851e+00 -5.6063000112771988e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1204 -2.1936999633908272e-02</internalNodes> + <leafValues> + 5.4749399423599243e-01 -4.2481999844312668e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1205 6.1096999794244766e-02</internalNodes> + <leafValues> + -3.8945000618696213e-02 -1.0807880163192749e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1206 -2.4563999846577644e-02</internalNodes> + <leafValues> + 5.8311098814010620e-01 -9.7599998116493225e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 1207 3.3752001821994781e-02</internalNodes> + <leafValues> + -1.3795999810099602e-02 -8.4730297327041626e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1208 3.8199000060558319e-02</internalNodes> + <leafValues> + 1.5114299952983856e-01 -7.9473400115966797e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1209 -2.0117999985814095e-02</internalNodes> + <leafValues> + 5.1579099893569946e-01 -2.1445399522781372e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1210 2.4734999984502792e-02</internalNodes> + <leafValues> + -2.2105000913143158e-02 4.2917698621749878e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1211 -2.4357000365853310e-02</internalNodes> + <leafValues> + -8.6201298236846924e-01 -3.6760000512003899e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1212 -2.6442000642418861e-02</internalNodes> + <leafValues> + -4.5397499203681946e-01 2.2462800145149231e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1213 -3.4429999068379402e-03</internalNodes> + <leafValues> + 1.3073000311851501e-01 -3.8622701168060303e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1214 1.0701700299978256e-01</internalNodes> + <leafValues> + 1.3158600032329559e-01 -7.9306900501251221e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1215 4.5152999460697174e-02</internalNodes> + <leafValues> + -2.5296801328659058e-01 4.0672400593757629e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1216 4.4349998235702515e-02</internalNodes> + <leafValues> + 2.2613000124692917e-02 7.9618102312088013e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1217 1.0839999886229634e-03</internalNodes> + <leafValues> + -3.9158400893211365e-01 1.1639100313186646e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1218 7.1433000266551971e-02</internalNodes> + <leafValues> + 8.2466997206211090e-02 1.2530590295791626e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1219 3.5838000476360321e-02</internalNodes> + <leafValues> + -1.8203300237655640e-01 7.7078700065612793e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1220 -2.0839000120759010e-02</internalNodes> + <leafValues> + -6.1744397878646851e-01 1.5891399979591370e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1221 4.2525801062583923e-01</internalNodes> + <leafValues> + -4.8978000879287720e-02 -1.8422030210494995e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1222 1.1408000253140926e-02</internalNodes> + <leafValues> + 1.7918199300765991e-01 -1.5383499860763550e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1223 -1.5364999882876873e-02</internalNodes> + <leafValues> + -8.4016501903533936e-01 -1.0280000278726220e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1224 -1.5212000347673893e-02</internalNodes> + <leafValues> + -1.8995699286460876e-01 1.7130999267101288e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1225 -1.8972000107169151e-02</internalNodes> + <leafValues> + -7.9541999101638794e-01 6.6800001077353954e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1226 -3.3330000005662441e-03</internalNodes> + <leafValues> + -2.3530800640583038e-01 2.4730099737644196e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1227 9.3248002231121063e-02</internalNodes> + <leafValues> + -5.4758001118898392e-02 -1.8324300050735474e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1228 -1.2555000372231007e-02</internalNodes> + <leafValues> + 2.6385200023651123e-01 -3.8526400923728943e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1229 -2.7070000767707825e-02</internalNodes> + <leafValues> + -6.6929799318313599e-01 2.0340999588370323e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1230 -2.3677000775933266e-02</internalNodes> + <leafValues> + 6.7265301942825317e-01 -1.4344000257551670e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1231 -1.4275000430643559e-02</internalNodes> + <leafValues> + 3.0186399817466736e-01 -2.8514400124549866e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1232 2.8096999973058701e-02</internalNodes> + <leafValues> + 1.4766000211238861e-01 -1.4078520536422729e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1233 5.0840001553297043e-02</internalNodes> + <leafValues> + -1.8613600730895996e-01 7.9953002929687500e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1234 1.1505999602377415e-02</internalNodes> + <leafValues> + 1.9118399918079376e-01 -8.5035003721714020e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1235 -1.4661000110208988e-02</internalNodes> + <leafValues> + 4.5239299535751343e-01 -2.2205199301242828e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1236 2.2842499613761902e-01</internalNodes> + <leafValues> + 1.3488399982452393e-01 -1.2894610166549683e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1237 1.1106900125741959e-01</internalNodes> + <leafValues> + -2.0753799378871918e-01 5.4561597108840942e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1238 3.2450000289827585e-03</internalNodes> + <leafValues> + 3.2053700089454651e-01 -1.6403500735759735e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1239 8.5309997200965881e-02</internalNodes> + <leafValues> + -2.0210500061511993e-01 5.3296798467636108e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1240 2.2048000246286392e-02</internalNodes> + <leafValues> + 1.5698599815368652e-01 -1.7014099657535553e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1241 -1.5676999464631081e-02</internalNodes> + <leafValues> + -6.2863498926162720e-01 4.0761999785900116e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1242 3.3112901449203491e-01</internalNodes> + <leafValues> + 1.6609300673007965e-01 -1.0326379537582397e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1243 8.8470000773668289e-03</internalNodes> + <leafValues> + -2.5076198577880859e-01 3.1660598516464233e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1244 4.6080000698566437e-02</internalNodes> + <leafValues> + 1.5352100133895874e-01 -1.6333500146865845e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1245 -3.7703000009059906e-02</internalNodes> + <leafValues> + 5.6873798370361328e-01 -2.0102599263191223e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>159</maxWeakCount> + <stageThreshold>-3.5939640998840332e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 1246 -8.1808999180793762e-02</internalNodes> + <leafValues> + 5.7124799489974976e-01 -6.7438799142837524e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1247 2.1761199831962585e-01</internalNodes> + <leafValues> + -3.8610199093818665e-01 9.0343999862670898e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1248 1.4878000132739544e-02</internalNodes> + <leafValues> + 2.2241599857807159e-01 -1.2779350280761719e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1249 5.2434999495744705e-02</internalNodes> + <leafValues> + -2.8690400719642639e-01 7.5742298364639282e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1250 9.1429995372891426e-03</internalNodes> + <leafValues> + -6.4880400896072388e-01 2.2268800437450409e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1251 7.9169999808073044e-03</internalNodes> + <leafValues> + -2.9253599047660828e-01 3.1030198931694031e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1252 -2.6084000244736671e-02</internalNodes> + <leafValues> + 4.5532700419425964e-01 -3.8500601053237915e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1253 -2.9400000348687172e-03</internalNodes> + <leafValues> + -5.1264399290084839e-01 2.7432298660278320e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1254 5.7130001485347748e-02</internalNodes> + <leafValues> + 1.5788000077009201e-02 -1.2133100032806396e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1255 -6.1309998854994774e-03</internalNodes> + <leafValues> + 3.9174601435661316e-01 -3.0866798758506775e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1256 -4.0405001491308212e-02</internalNodes> + <leafValues> + 1.1901949644088745e+00 -2.0347100496292114e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1257 -2.0297000184655190e-02</internalNodes> + <leafValues> + -6.8239498138427734e-01 2.0458699762821198e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1258 -1.7188999801874161e-02</internalNodes> + <leafValues> + -8.4939897060394287e-01 3.8433000445365906e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1259 -2.4215999990701675e-02</internalNodes> + <leafValues> + -1.1039420366287231e+00 1.5975099802017212e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1260 5.6869000196456909e-02</internalNodes> + <leafValues> + -1.9595299661159515e-01 1.1806850433349609e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1261 3.6199999158270657e-04</internalNodes> + <leafValues> + -4.0847799181938171e-01 3.2938599586486816e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1262 9.9790003150701523e-03</internalNodes> + <leafValues> + -2.9673001170158386e-01 4.1547900438308716e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1263 -5.2625000476837158e-02</internalNodes> + <leafValues> + -1.3069299459457397e+00 1.7862600088119507e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1264 -1.3748999685049057e-02</internalNodes> + <leafValues> + 2.3665800690650940e-01 -4.4536599516868591e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1265 -3.0517000705003738e-02</internalNodes> + <leafValues> + 2.9018300771713257e-01 -1.1210100352764130e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1266 -3.0037501454353333e-01</internalNodes> + <leafValues> + -2.4237680435180664e+00 -4.2830999940633774e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1267 -3.5990998148918152e-02</internalNodes> + <leafValues> + 8.8206499814987183e-01 -4.7012999653816223e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1268 -5.5112000554800034e-02</internalNodes> + <leafValues> + 8.0119001865386963e-01 -2.0490999519824982e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1269 3.3762000501155853e-02</internalNodes> + <leafValues> + 1.4617599546909332e-01 -1.1349489688873291e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1270 -8.2710003480315208e-03</internalNodes> + <leafValues> + -8.1604897975921631e-01 1.8988000229001045e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1271 -5.4399999789893627e-03</internalNodes> + <leafValues> + -7.0980900526046753e-01 2.2343699634075165e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1272 3.1059999018907547e-03</internalNodes> + <leafValues> + -7.2808599472045898e-01 4.0224999189376831e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1273 5.3651999682188034e-02</internalNodes> + <leafValues> + 1.7170900106430054e-01 -1.1163710355758667e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1274 -1.2541399896144867e-01</internalNodes> + <leafValues> + 2.7680370807647705e+00 -1.4611500501632690e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1275 9.2542000114917755e-02</internalNodes> + <leafValues> + 1.1609800159931183e-01 -3.9635529518127441e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1276 3.8513999432325363e-02</internalNodes> + <leafValues> + -7.6399999670684338e-03 -9.8780900239944458e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1277 -2.0200000144541264e-03</internalNodes> + <leafValues> + 2.3059999942779541e-01 -7.4970299005508423e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1278 9.7599998116493225e-03</internalNodes> + <leafValues> + -3.1137999892234802e-01 3.0287799239158630e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1279 2.4095000699162483e-02</internalNodes> + <leafValues> + -4.9529999494552612e-02 5.2690100669860840e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1280 -1.7982000485062599e-02</internalNodes> + <leafValues> + -1.1610640287399292e+00 -5.7000000961124897e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1281 -1.0555000044405460e-02</internalNodes> + <leafValues> + -2.7189099788665771e-01 2.3597699403762817e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1282 -7.2889998555183411e-03</internalNodes> + <leafValues> + -5.4219102859497070e-01 8.1914000213146210e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1283 2.3939000442624092e-02</internalNodes> + <leafValues> + 1.7975799739360809e-01 -6.7049497365951538e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1284 -1.8365999683737755e-02</internalNodes> + <leafValues> + 6.2664300203323364e-01 -2.0970100164413452e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1285 1.5715999528765678e-02</internalNodes> + <leafValues> + 2.4193699657917023e-01 -1.0444309711456299e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1286 -4.8804000020027161e-02</internalNodes> + <leafValues> + -9.4060599803924561e-01 -3.7519999314099550e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1287 6.7130001261830330e-03</internalNodes> + <leafValues> + -7.5432002544403076e-02 6.1575299501419067e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1288 9.7770001739263535e-03</internalNodes> + <leafValues> + 3.9285000413656235e-02 -8.4810298681259155e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1289 1.4744999818503857e-02</internalNodes> + <leafValues> + 1.6968999803066254e-01 -5.0906401872634888e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1290 9.7079001367092133e-02</internalNodes> + <leafValues> + -3.3103000372648239e-02 -1.2706379890441895e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1291 4.8285998404026031e-02</internalNodes> + <leafValues> + 9.4329997897148132e-02 2.7203190326690674e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1292 9.7810002043843269e-03</internalNodes> + <leafValues> + -3.9533400535583496e-01 1.5363800525665283e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1293 -3.9893999695777893e-02</internalNodes> + <leafValues> + -2.2767400741577148e-01 1.3913999497890472e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1294 2.2848000749945641e-02</internalNodes> + <leafValues> + -2.7391999959945679e-01 3.4199500083923340e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1295 6.7179999314248562e-03</internalNodes> + <leafValues> + -1.0874299705028534e-01 4.8125401139259338e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1296 5.9599999338388443e-02</internalNodes> + <leafValues> + -4.9522001296281815e-02 -2.0117089748382568e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1297 6.9340001791715622e-03</internalNodes> + <leafValues> + 1.5037499368190765e-01 -1.1271899938583374e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1298 1.5757000073790550e-02</internalNodes> + <leafValues> + -2.0885000005364418e-02 -1.1651979684829712e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1299 -4.9690000712871552e-02</internalNodes> + <leafValues> + -8.0213499069213867e-01 1.4372299611568451e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1300 5.2347000688314438e-02</internalNodes> + <leafValues> + -2.0836700499057770e-01 6.1677598953247070e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1301 2.2430999204516411e-02</internalNodes> + <leafValues> + 2.0305900275707245e-01 -7.5326198339462280e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1302 4.1142001748085022e-02</internalNodes> + <leafValues> + -1.8118199706077576e-01 1.0033359527587891e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1303 -2.1632000803947449e-02</internalNodes> + <leafValues> + 4.9998998641967773e-01 -3.4662999212741852e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1304 -8.2808002829551697e-02</internalNodes> + <leafValues> + 1.1711900234222412e+00 -1.8433600664138794e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1305 8.5060000419616699e-03</internalNodes> + <leafValues> + -6.3225001096725464e-02 2.9024899005889893e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1306 7.8905001282691956e-02</internalNodes> + <leafValues> + -2.3274500668048859e-01 5.9695798158645630e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1307 -9.0207003057003021e-02</internalNodes> + <leafValues> + -8.2211899757385254e-01 1.7772200703620911e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1308 -2.9269000515341759e-02</internalNodes> + <leafValues> + 6.0860699415206909e-01 -2.1468900144100189e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1309 6.9499998353421688e-03</internalNodes> + <leafValues> + -4.2665999382734299e-02 6.0512101650238037e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1310 -8.0629996955394745e-03</internalNodes> + <leafValues> + -1.1508270502090454e+00 -2.7286000549793243e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1311 1.9595999270677567e-02</internalNodes> + <leafValues> + -9.1880001127719879e-03 5.6857800483703613e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1312 -1.4884999953210354e-02</internalNodes> + <leafValues> + 3.7658798694610596e-01 -2.7149501442909241e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1313 2.5217000395059586e-02</internalNodes> + <leafValues> + -9.9991001188755035e-02 2.4664700031280518e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1314 -1.5855999663472176e-02</internalNodes> + <leafValues> + 6.6826701164245605e-01 -2.0614700019359589e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1315 2.9441000893712044e-02</internalNodes> + <leafValues> + 1.5832200646400452e-01 -7.6060897111892700e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1316 -8.5279997438192368e-03</internalNodes> + <leafValues> + 3.8212299346923828e-01 -2.5407800078392029e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1317 2.4421999230980873e-02</internalNodes> + <leafValues> + 1.5105099976062775e-01 -2.8752899169921875e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1318 -3.3886998891830444e-02</internalNodes> + <leafValues> + -6.8002802133560181e-01 3.4327000379562378e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1319 -2.0810000132769346e-03</internalNodes> + <leafValues> + 2.5413900613784790e-01 -2.6859098672866821e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1320 3.0358999967575073e-02</internalNodes> + <leafValues> + -3.0842000618577003e-02 -1.1476809978485107e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1321 4.0210001170635223e-03</internalNodes> + <leafValues> + -3.5253798961639404e-01 2.9868099093437195e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1322 2.7681000530719757e-02</internalNodes> + <leafValues> + -3.8148999214172363e-02 -1.3262039422988892e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1323 7.9039996489882469e-03</internalNodes> + <leafValues> + -2.3737000301480293e-02 7.0503002405166626e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1324 4.4031001627445221e-02</internalNodes> + <leafValues> + 1.0674899816513062e-01 -4.5261201262474060e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1325 -3.2370999455451965e-02</internalNodes> + <leafValues> + 4.6674901247024536e-01 -6.1546999961137772e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1326 2.0933000370860100e-02</internalNodes> + <leafValues> + -2.8447899222373962e-01 4.3845599889755249e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1327 2.5227999314665794e-02</internalNodes> + <leafValues> + -2.2537000477313995e-02 7.0389097929000854e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1328 6.5520000644028187e-03</internalNodes> + <leafValues> + -3.2554900646209717e-01 2.4023699760437012e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1329 -5.8557998389005661e-02</internalNodes> + <leafValues> + -1.2227720022201538e+00 1.1668799817562103e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1330 3.1899999827146530e-02</internalNodes> + <leafValues> + -1.9305000081658363e-02 -1.0973169803619385e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1331 -3.0445000156760216e-02</internalNodes> + <leafValues> + 6.5582501888275146e-01 7.5090996921062469e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1332 1.4933000318706036e-02</internalNodes> + <leafValues> + -5.2155798673629761e-01 1.1523099988698959e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1333 -4.9008000642061234e-02</internalNodes> + <leafValues> + -7.8303998708724976e-01 1.6657200455665588e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1334 8.3158999681472778e-02</internalNodes> + <leafValues> + -2.6879999786615372e-03 -8.5282301902770996e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1335 2.3902999237179756e-02</internalNodes> + <leafValues> + -5.1010999828577042e-02 4.1999098658561707e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1336 1.6428999602794647e-02</internalNodes> + <leafValues> + 1.9232999533414841e-02 -6.5049099922180176e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1337 -1.1838000267744064e-02</internalNodes> + <leafValues> + -6.2409800291061401e-01 1.5411199629306793e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1338 -1.6799999866634607e-04</internalNodes> + <leafValues> + 1.7589199542999268e-01 -3.4338700771331787e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1339 1.9193999469280243e-02</internalNodes> + <leafValues> + 4.3418999761343002e-02 7.9069197177886963e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1340 -1.0032000020146370e-02</internalNodes> + <leafValues> + 4.5648899674415588e-01 -2.2494800388813019e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1341 -1.4004000462591648e-02</internalNodes> + <leafValues> + 3.3570998907089233e-01 -4.8799999058246613e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1342 -1.0319899767637253e-01</internalNodes> + <leafValues> + -2.3378000259399414e+00 -5.8933001011610031e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1343 -9.5697000622749329e-02</internalNodes> + <leafValues> + -6.6153901815414429e-01 2.0098599791526794e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1344 -4.1480999439954758e-02</internalNodes> + <leafValues> + 4.5939201116561890e-01 -2.2314099967479706e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1345 2.4099999573081732e-03</internalNodes> + <leafValues> + -2.6898598670959473e-01 2.4922999739646912e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1346 1.0724999755620956e-01</internalNodes> + <leafValues> + -1.8640199303627014e-01 7.2769802808761597e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1347 3.1870000530034304e-03</internalNodes> + <leafValues> + -2.4608999490737915e-02 2.8643900156021118e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1348 2.9167000204324722e-02</internalNodes> + <leafValues> + -3.4683000296354294e-02 -1.1162580251693726e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1349 1.1287000030279160e-02</internalNodes> + <leafValues> + 6.3760001212358475e-03 6.6632097959518433e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1350 -1.2001000344753265e-02</internalNodes> + <leafValues> + 4.2420101165771484e-01 -2.6279801130294800e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1351 -1.2695999816060066e-02</internalNodes> + <leafValues> + -2.1957000717520714e-02 1.8936799466609955e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1352 2.4597000330686569e-02</internalNodes> + <leafValues> + -3.4963998943567276e-02 -1.0989320278167725e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1353 4.5953001827001572e-02</internalNodes> + <leafValues> + 1.1109799891710281e-01 -2.9306049346923828e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1354 -2.7241000905632973e-02</internalNodes> + <leafValues> + 2.9101699590682983e-01 -2.7407899498939514e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1355 4.0063999593257904e-02</internalNodes> + <leafValues> + 1.1877900362014771e-01 -6.2801802158355713e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1356 2.3055000230669975e-02</internalNodes> + <leafValues> + 1.4813800156116486e-01 -3.7007498741149902e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1357 -2.3737000301480293e-02</internalNodes> + <leafValues> + -5.3724801540374756e-01 1.9358199834823608e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1358 7.7522002160549164e-02</internalNodes> + <leafValues> + -6.0194000601768494e-02 -1.9489669799804688e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1359 -1.3345000334084034e-02</internalNodes> + <leafValues> + -4.5229598879814148e-01 1.8741500377655029e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1360 -2.1719999611377716e-02</internalNodes> + <leafValues> + 1.2144249677658081e+00 -1.5365800261497498e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1361 -7.1474999189376831e-02</internalNodes> + <leafValues> + -2.3047130107879639e+00 1.0999900102615356e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1362 -5.4999999701976776e-03</internalNodes> + <leafValues> + -7.1855199337005615e-01 2.0100999623537064e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1363 2.6740999892354012e-02</internalNodes> + <leafValues> + 7.3545001447200775e-02 9.8786002397537231e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1364 -3.9407998323440552e-02</internalNodes> + <leafValues> + -1.2227380275726318e+00 -4.3506998568773270e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1365 2.5888999924063683e-02</internalNodes> + <leafValues> + 1.3409300148487091e-01 -1.1770780086517334e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1366 4.8925001174211502e-02</internalNodes> + <leafValues> + -3.0810000374913216e-02 -9.3479502201080322e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1367 3.6892998963594437e-02</internalNodes> + <leafValues> + 1.3333700597286224e-01 -1.4998290538787842e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1368 7.8929997980594635e-02</internalNodes> + <leafValues> + -1.4538800716400146e-01 1.5631790161132812e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1369 2.9006000608205795e-02</internalNodes> + <leafValues> + 1.9383700191974640e-01 -6.7642802000045776e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1370 6.3089998438954353e-03</internalNodes> + <leafValues> + -3.7465399503707886e-01 1.0857500135898590e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1371 -6.5830998122692108e-02</internalNodes> + <leafValues> + 8.1059402227401733e-01 3.0201999470591545e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1372 -6.8965002894401550e-02</internalNodes> + <leafValues> + 8.3772599697113037e-01 -1.7140999436378479e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1373 -1.1669100075960159e-01</internalNodes> + <leafValues> + -9.4647198915481567e-01 1.3123199343681335e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1374 -1.3060000492259860e-03</internalNodes> + <leafValues> + 4.6007998287677765e-02 -5.2011597156524658e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1375 -4.4558998197317123e-02</internalNodes> + <leafValues> + -1.9423669576644897e+00 1.3200700283050537e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1376 5.1033001393079758e-02</internalNodes> + <leafValues> + -2.1480999886989594e-01 4.8673900961875916e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1377 -3.1578000634908676e-02</internalNodes> + <leafValues> + 5.9989798069000244e-01 7.9159997403621674e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1378 2.1020000800490379e-02</internalNodes> + <leafValues> + -2.2069500386714935e-01 5.4046201705932617e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1379 -1.3824200630187988e-01</internalNodes> + <leafValues> + 6.2957501411437988e-01 -2.1712999790906906e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1380 5.2228998392820358e-02</internalNodes> + <leafValues> + -2.3360900580883026e-01 4.9760800600051880e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1381 2.5884000584483147e-02</internalNodes> + <leafValues> + 1.8041999638080597e-01 -2.2039200365543365e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1382 -1.2138999998569489e-02</internalNodes> + <leafValues> + -6.9731897115707397e-01 1.5712000429630280e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1383 -2.4237999692559242e-02</internalNodes> + <leafValues> + 3.4593299031257629e-01 7.1469999849796295e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1384 -2.5272000581026077e-02</internalNodes> + <leafValues> + -8.7583297491073608e-01 -9.8240002989768982e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1385 1.2597000226378441e-02</internalNodes> + <leafValues> + 2.3649999499320984e-01 -2.8731200098991394e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1386 5.7330999523401260e-02</internalNodes> + <leafValues> + -6.1530999839305878e-02 -2.2326040267944336e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1387 1.6671000048518181e-02</internalNodes> + <leafValues> + -1.9850100576877594e-01 4.0810701251029968e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1388 -2.2818999364972115e-02</internalNodes> + <leafValues> + 9.6487599611282349e-01 -2.0245699584484100e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1389 3.7000001611886546e-05</internalNodes> + <leafValues> + -5.8908998966217041e-02 2.7055400609970093e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1390 -7.6700001955032349e-03</internalNodes> + <leafValues> + -4.5317101478576660e-01 8.9628003537654877e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1391 9.4085998833179474e-02</internalNodes> + <leafValues> + 1.1604599654674530e-01 -1.0951169729232788e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1392 -6.2267001718282700e-02</internalNodes> + <leafValues> + 1.8096530437469482e+00 -1.4773200452327728e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1393 1.7416000366210938e-02</internalNodes> + <leafValues> + 2.3068200051784515e-01 -4.2417600750923157e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1394 -2.2066000849008560e-02</internalNodes> + <leafValues> + 4.9270299077033997e-01 -2.0630900561809540e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1395 -1.0404000058770180e-02</internalNodes> + <leafValues> + 6.0924297571182251e-01 2.8130000457167625e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1396 -9.3670003116130829e-03</internalNodes> + <leafValues> + 4.0171200037002563e-01 -2.1681700646877289e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1397 -2.9039999470114708e-02</internalNodes> + <leafValues> + -8.4876501560211182e-01 1.4246800541877747e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1398 -2.1061999723315239e-02</internalNodes> + <leafValues> + -7.9198300838470459e-01 -1.2595999985933304e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1399 -3.7000998854637146e-02</internalNodes> + <leafValues> + -6.7488902807235718e-01 1.2830400466918945e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1400 1.0735999792814255e-02</internalNodes> + <leafValues> + 3.6779999732971191e-02 -6.3393002748489380e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1401 1.6367599368095398e-01</internalNodes> + <leafValues> + 1.3803899288177490e-01 -4.7189000248908997e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1402 9.4917997717857361e-02</internalNodes> + <leafValues> + -1.3855700194835663e-01 1.9492419958114624e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1403 3.5261999815702438e-02</internalNodes> + <leafValues> + 1.3721899688243866e-01 -2.1186530590057373e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1404 1.2811000458896160e-02</internalNodes> + <leafValues> + -2.0008100569248199e-01 4.9507799744606018e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>155</maxWeakCount> + <stageThreshold>-3.3933560848236084e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 1405 1.3904400169849396e-01</internalNodes> + <leafValues> + -4.6581199765205383e-01 7.6431602239608765e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1406 1.1916999705135822e-02</internalNodes> + <leafValues> + -9.4398999214172363e-01 3.9726299047470093e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1407 -1.0006999596953392e-02</internalNodes> + <leafValues> + 3.2718798518180847e-01 -6.3367402553558350e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1408 -6.0479999519884586e-03</internalNodes> + <leafValues> + 2.7427899837493896e-01 -5.7446998357772827e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1409 -1.2489999644458294e-03</internalNodes> + <leafValues> + 2.3629300296306610e-01 -6.8593502044677734e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1410 3.2382000237703323e-02</internalNodes> + <leafValues> + -5.7630199193954468e-01 2.7492699027061462e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1411 -1.3957999646663666e-02</internalNodes> + <leafValues> + -6.1061501502990723e-01 2.4541600048542023e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1412 1.1159999994561076e-03</internalNodes> + <leafValues> + -5.6539100408554077e-01 2.7179300785064697e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1413 2.7000000045518391e-05</internalNodes> + <leafValues> + -8.0235999822616577e-01 1.1509100347757339e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1414 -2.5700000696815550e-04</internalNodes> + <leafValues> + -8.1205898523330688e-01 2.3844699561595917e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1415 4.0460000745952129e-03</internalNodes> + <leafValues> + 1.3909600675106049e-01 -6.6163200139999390e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1416 1.4356000348925591e-02</internalNodes> + <leafValues> + -1.6485199332237244e-01 4.1901698708534241e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1417 -5.5374998599290848e-02</internalNodes> + <leafValues> + 1.4425870180130005e+00 -1.8820199370384216e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1418 9.3594998121261597e-02</internalNodes> + <leafValues> + 1.3548299670219421e-01 -9.1636097431182861e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1419 2.6624999940395355e-02</internalNodes> + <leafValues> + -3.3748298883438110e-01 3.9233601093292236e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1420 3.7469998933374882e-03</internalNodes> + <leafValues> + -1.1615400016307831e-01 4.4399300217628479e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1421 -3.1886000186204910e-02</internalNodes> + <leafValues> + -9.9498301744461060e-01 1.6120000509545207e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1422 -2.2600000724196434e-02</internalNodes> + <leafValues> + -4.8067399859428406e-01 1.7007300257682800e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1423 2.5202000513672829e-02</internalNodes> + <leafValues> + 3.5580001771450043e-02 -8.0215400457382202e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1424 -3.1036999076604843e-02</internalNodes> + <leafValues> + -1.0895340442657471e+00 1.8081900477409363e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1425 -2.6475999504327774e-02</internalNodes> + <leafValues> + 9.5671200752258301e-01 -2.1049399673938751e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1426 -1.3853999786078930e-02</internalNodes> + <leafValues> + -1.0370320081710815e+00 2.2166700661182404e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1427 -6.2925003468990326e-02</internalNodes> + <leafValues> + 9.0199398994445801e-01 -1.9085299968719482e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1428 -4.4750999659299850e-02</internalNodes> + <leafValues> + -1.0119110345840454e+00 1.4691199362277985e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1429 -2.0428000018000603e-02</internalNodes> + <leafValues> + 6.1624497175216675e-01 -2.3552699387073517e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1430 -8.0329999327659607e-03</internalNodes> + <leafValues> + -8.3279997110366821e-02 2.1728700399398804e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1431 8.7280003353953362e-03</internalNodes> + <leafValues> + 6.5458998084068298e-02 -6.0318702459335327e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1432 -2.7202000841498375e-02</internalNodes> + <leafValues> + -9.3447399139404297e-01 1.5270000696182251e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1433 -1.6471000388264656e-02</internalNodes> + <leafValues> + -8.4177100658416748e-01 1.3332000002264977e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1434 -1.3744000345468521e-02</internalNodes> + <leafValues> + 6.0567200183868408e-01 -9.2021003365516663e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1435 2.9164999723434448e-02</internalNodes> + <leafValues> + -2.8114000335335732e-02 -1.4014569520950317e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1436 3.7457000464200974e-02</internalNodes> + <leafValues> + 1.3080599904060364e-01 -4.9382498860359192e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1437 -2.5070000439882278e-02</internalNodes> + <leafValues> + -1.1289390325546265e+00 -1.4600000344216824e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1438 -6.3812002539634705e-02</internalNodes> + <leafValues> + 7.5871598720550537e-01 -1.8200000049546361e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1439 -9.3900002539157867e-03</internalNodes> + <leafValues> + 2.9936400055885315e-01 -2.9487800598144531e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1440 -7.6000002445653081e-04</internalNodes> + <leafValues> + 1.9725000485777855e-02 1.9993899762630463e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1441 -2.1740999072790146e-02</internalNodes> + <leafValues> + -8.5247898101806641e-01 4.9169998615980148e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1442 -1.7869999632239342e-02</internalNodes> + <leafValues> + -5.9985999017953873e-02 1.5222500264644623e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1443 -2.4831000715494156e-02</internalNodes> + <leafValues> + 3.5603401064872742e-01 -2.6259899139404297e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1444 1.5715500712394714e-01</internalNodes> + <leafValues> + 1.5599999460391700e-04 1.0428730249404907e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1445 6.9026999175548553e-02</internalNodes> + <leafValues> + -3.3006999641656876e-02 -1.1796669960021973e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1446 -1.1021999642252922e-02</internalNodes> + <leafValues> + 5.8987700939178467e-01 -5.7647999376058578e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1447 -1.3834999874234200e-02</internalNodes> + <leafValues> + 5.9502798318862915e-01 -2.4418599903583527e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1448 -3.0941000208258629e-02</internalNodes> + <leafValues> + -1.1723799705505371e+00 1.6907000541687012e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1449 2.1258000284433365e-02</internalNodes> + <leafValues> + -1.8900999799370766e-02 -1.0684759616851807e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1450 9.3079999089241028e-02</internalNodes> + <leafValues> + 1.6305600106716156e-01 -1.3375270366668701e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1451 2.9635999351739883e-02</internalNodes> + <leafValues> + -2.2524799406528473e-01 4.5400100946426392e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1452 -1.2199999764561653e-04</internalNodes> + <leafValues> + 2.7409100532531738e-01 -3.7371399998664856e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1453 -4.2098000645637512e-02</internalNodes> + <leafValues> + -7.5828802585601807e-01 1.7137000337243080e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1454 -2.2505000233650208e-02</internalNodes> + <leafValues> + -2.2759300470352173e-01 2.3698699474334717e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1455 -1.2862999923527241e-02</internalNodes> + <leafValues> + 1.9252400100231171e-01 -3.2127100229263306e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1456 2.7860000729560852e-02</internalNodes> + <leafValues> + 1.6723699867725372e-01 -1.0209059715270996e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1457 -2.7807999402284622e-02</internalNodes> + <leafValues> + 1.2824759483337402e+00 -1.7225299775600433e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1458 -6.1630001291632652e-03</internalNodes> + <leafValues> + -5.4072898626327515e-01 2.3885700106620789e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1459 -2.0436000078916550e-02</internalNodes> + <leafValues> + 6.3355398178100586e-01 -2.1090599894523621e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1460 -1.2307999655604362e-02</internalNodes> + <leafValues> + -4.9778199195861816e-01 1.7402599751949310e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1461 -4.0493998676538467e-02</internalNodes> + <leafValues> + -1.1848740577697754e+00 -3.3890999853610992e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1462 2.9657000675797462e-02</internalNodes> + <leafValues> + 2.1740999072790146e-02 1.0069919824600220e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1463 6.8379999138414860e-03</internalNodes> + <leafValues> + 2.9217999428510666e-02 -5.9906297922134399e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1464 1.6164999455213547e-02</internalNodes> + <leafValues> + -2.1000799536705017e-01 3.7637299299240112e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1465 5.0193000584840775e-02</internalNodes> + <leafValues> + 2.5319999549537897e-03 -7.1668201684951782e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1466 1.9680000841617584e-03</internalNodes> + <leafValues> + -2.1921400725841522e-01 3.2298699021339417e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1467 2.4979999288916588e-02</internalNodes> + <leafValues> + -9.6840001642704010e-03 -7.7572900056838989e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1468 -1.5809999778866768e-02</internalNodes> + <leafValues> + 4.4637501239776611e-01 -6.1760000884532928e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1469 3.7206999957561493e-02</internalNodes> + <leafValues> + -2.0495399832725525e-01 5.7722198963165283e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1470 -7.9264998435974121e-02</internalNodes> + <leafValues> + -7.6745402812957764e-01 1.2550400197505951e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1471 -1.7152000218629837e-02</internalNodes> + <leafValues> + -1.4121830463409424e+00 -5.1704000681638718e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1472 3.2740000635385513e-02</internalNodes> + <leafValues> + 1.9334000349044800e-01 -6.3633698225021362e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1473 -1.1756999790668488e-01</internalNodes> + <leafValues> + 8.4325402975082397e-01 -1.8018600344657898e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1474 1.2057200074195862e-01</internalNodes> + <leafValues> + 1.2530000507831573e-01 -2.1213600635528564e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1475 4.2779999785125256e-03</internalNodes> + <leafValues> + -4.6604400873184204e-01 8.9643999934196472e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1476 -7.2544999420642853e-02</internalNodes> + <leafValues> + 5.1826500892639160e-01 1.6823999583721161e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1477 1.7710599303245544e-01</internalNodes> + <leafValues> + -3.0910000205039978e-02 -1.1046639680862427e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1478 8.4229996427893639e-03</internalNodes> + <leafValues> + 2.4445800483226776e-01 -3.8613098859786987e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1479 -1.3035000301897526e-02</internalNodes> + <leafValues> + 9.8004400730133057e-01 -1.7016500234603882e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1480 1.8912000581622124e-02</internalNodes> + <leafValues> + 2.0248499512672424e-01 -3.8545900583267212e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1481 2.1447999402880669e-02</internalNodes> + <leafValues> + -2.5717198848724365e-01 3.5181200504302979e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1482 6.3357003033161163e-02</internalNodes> + <leafValues> + 1.6994799673557281e-01 -9.1383802890777588e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1483 -3.2435998320579529e-02</internalNodes> + <leafValues> + -8.5681599378585815e-01 -2.1680999547243118e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1484 -2.3564999923110008e-02</internalNodes> + <leafValues> + 5.6115597486495972e-01 -2.2400000307243317e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 1485 1.8789000809192657e-02</internalNodes> + <leafValues> + -2.5459799170494080e-01 3.4512901306152344e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1486 3.1042000278830528e-02</internalNodes> + <leafValues> + 7.5719999149441719e-03 3.4800198674201965e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1487 -1.1226999573409557e-02</internalNodes> + <leafValues> + -6.0219800472259521e-01 4.2814999818801880e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1488 -1.2845999561250210e-02</internalNodes> + <leafValues> + 4.2020401358604431e-01 -5.3801000118255615e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1489 -1.2791999615728855e-02</internalNodes> + <leafValues> + 2.2724500298500061e-01 -3.2398000359535217e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1490 6.8651996552944183e-02</internalNodes> + <leafValues> + 9.3532003462314606e-02 10.</leafValues></_> + <_> + <internalNodes> + 0 -1 1491 5.2789999172091484e-03</internalNodes> + <leafValues> + -2.6926299929618835e-01 3.3303201198577881e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1492 -3.8779001682996750e-02</internalNodes> + <leafValues> + -7.2365301847457886e-01 1.7806500196456909e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1493 6.1820000410079956e-03</internalNodes> + <leafValues> + -3.5119399428367615e-01 1.6586300730705261e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1494 1.7515200376510620e-01</internalNodes> + <leafValues> + 1.1623100191354752e-01 -1.5419290065765381e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1495 1.1627999693155289e-01</internalNodes> + <leafValues> + -9.1479998081922531e-03 -9.9842602014541626e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1496 -2.2964000701904297e-02</internalNodes> + <leafValues> + 2.0565399527549744e-01 1.5432000160217285e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1497 -5.1410000771284103e-02</internalNodes> + <leafValues> + 5.8072400093078613e-01 -2.0118400454521179e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1498 2.2474199533462524e-01</internalNodes> + <leafValues> + 1.8728999421000481e-02 1.0829299688339233e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1499 9.4860000535845757e-03</internalNodes> + <leafValues> + -3.3171299099922180e-01 1.9902999699115753e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1500 -1.1846300214529037e-01</internalNodes> + <leafValues> + 1.3711010217666626e+00 6.8926997482776642e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1501 3.7810999900102615e-02</internalNodes> + <leafValues> + -9.3600002583116293e-04 -8.3996999263763428e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1502 2.2202000021934509e-02</internalNodes> + <leafValues> + -1.1963999830186367e-02 3.6673998832702637e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1503 -3.6366000771522522e-02</internalNodes> + <leafValues> + 3.7866500020027161e-01 -2.7714800834655762e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1504 -1.3184699416160583e-01</internalNodes> + <leafValues> + -2.7481179237365723e+00 1.0666900128126144e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1505 -4.1655998677015305e-02</internalNodes> + <leafValues> + 4.7524300217628479e-01 -2.3249800503253937e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1506 -3.3151999115943909e-02</internalNodes> + <leafValues> + -5.7929402589797974e-01 1.7434400320053101e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1507 1.5769999474287033e-02</internalNodes> + <leafValues> + -1.1284000240266323e-02 -8.3701401948928833e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1508 -3.9363000541925430e-02</internalNodes> + <leafValues> + 3.4821599721908569e-01 -1.7455400526523590e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1509 -6.7849002778530121e-02</internalNodes> + <leafValues> + 1.4225699901580811e+00 -1.4765599370002747e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1510 -2.6775000616908073e-02</internalNodes> + <leafValues> + 2.3947000503540039e-01 1.3271999545395374e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1511 3.9919000118970871e-02</internalNodes> + <leafValues> + -8.9999996125698090e-03 -7.5938898324966431e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1512 1.0065600275993347e-01</internalNodes> + <leafValues> + -1.8685000017285347e-02 7.6245301961898804e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1513 -8.1022001802921295e-02</internalNodes> + <leafValues> + -9.0439099073410034e-01 -8.5880002006888390e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1514 -2.1258000284433365e-02</internalNodes> + <leafValues> + -2.1319599449634552e-01 2.1919700503349304e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1515 -1.0630999691784382e-02</internalNodes> + <leafValues> + 1.9598099589347839e-01 -3.5768100619316101e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1516 8.1300002057105303e-04</internalNodes> + <leafValues> + -9.2794999480247498e-02 2.6145899295806885e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1517 3.4650000743567944e-03</internalNodes> + <leafValues> + -5.5336099863052368e-01 2.7386000379920006e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1518 1.8835999071598053e-02</internalNodes> + <leafValues> + 1.8446099758148193e-01 -6.6934299468994141e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1519 -2.5631999596953392e-02</internalNodes> + <leafValues> + 1.9382879734039307e+00 -1.4708900451660156e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1520 -4.0939999744296074e-03</internalNodes> + <leafValues> + -2.6451599597930908e-01 2.0733200013637543e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1521 -8.9199998183175921e-04</internalNodes> + <leafValues> + -5.5031597614288330e-01 5.0374999642372131e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1522 -4.9518000334501266e-02</internalNodes> + <leafValues> + -2.5615389347076416e+00 1.3141700625419617e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1523 1.1680999770760536e-02</internalNodes> + <leafValues> + -2.4819800257682800e-01 3.9982700347900391e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1524 3.4563999623060226e-02</internalNodes> + <leafValues> + 1.6178800165653229e-01 -7.1418899297714233e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1525 -8.2909995689988136e-03</internalNodes> + <leafValues> + 2.2180099785327911e-01 -2.9181700944900513e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1526 -2.2358000278472900e-02</internalNodes> + <leafValues> + 3.1044098734855652e-01 -2.7280000504106283e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1527 -3.0801000073552132e-02</internalNodes> + <leafValues> + -9.5672702789306641e-01 -8.3400001749396324e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1528 4.3779000639915466e-02</internalNodes> + <leafValues> + 1.2556900084018707e-01 -1.1759619712829590e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1529 4.3046001344919205e-02</internalNodes> + <leafValues> + -5.8876998722553253e-02 -1.8568470478057861e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1530 2.7188999578356743e-02</internalNodes> + <leafValues> + 4.2858000844717026e-02 3.9036700129508972e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1531 9.4149997457861900e-03</internalNodes> + <leafValues> + -4.3567001819610596e-02 -1.1094470024108887e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1532 9.4311997294425964e-02</internalNodes> + <leafValues> + 4.0256999433040619e-02 9.8442298173904419e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1533 1.7025099694728851e-01</internalNodes> + <leafValues> + 2.9510000720620155e-02 -6.9509297609329224e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1534 -4.7148000448942184e-02</internalNodes> + <leafValues> + 1.0338569879531860e+00 6.7602001130580902e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1535 1.1186300218105316e-01</internalNodes> + <leafValues> + -6.8682998418807983e-02 -2.4985830783843994e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1536 -1.4353999868035316e-02</internalNodes> + <leafValues> + -5.9481900930404663e-01 1.5001699328422546e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1537 3.4024000167846680e-02</internalNodes> + <leafValues> + -6.4823001623153687e-02 -2.1382639408111572e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1538 2.1601999178528786e-02</internalNodes> + <leafValues> + 5.5309999734163284e-02 7.8292900323867798e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1539 2.1771999076008797e-02</internalNodes> + <leafValues> + -7.1279997937381268e-03 -7.2148102521896362e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1540 8.2416996359825134e-02</internalNodes> + <leafValues> + 1.4609499275684357e-01 -1.3636670112609863e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1541 8.4671996533870697e-02</internalNodes> + <leafValues> + -1.7784699797630310e-01 7.2857701778411865e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1542 -5.5128000676631927e-02</internalNodes> + <leafValues> + -5.9402400255203247e-01 1.9357800483703613e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1543 -6.4823001623153687e-02</internalNodes> + <leafValues> + -1.0783840417861938e+00 -4.0734000504016876e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1544 -2.2769000381231308e-02</internalNodes> + <leafValues> + 7.7900201082229614e-01 3.4960000775754452e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1545 5.4756000638008118e-02</internalNodes> + <leafValues> + -6.5683998167514801e-02 -1.8188409805297852e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1546 -8.9000001025851816e-05</internalNodes> + <leafValues> + -1.7891999334096909e-02 2.0768299698829651e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1547 9.8361998796463013e-02</internalNodes> + <leafValues> + -5.5946998298168182e-02 -1.4153920412063599e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1548 -7.0930002257227898e-03</internalNodes> + <leafValues> + 3.4135299921035767e-01 -1.2089899927377701e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1549 5.0278000533580780e-02</internalNodes> + <leafValues> + -2.6286700367927551e-01 2.5797298550605774e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1550 -5.7870000600814819e-03</internalNodes> + <leafValues> + -1.3178600370883942e-01 1.7350199818611145e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1551 1.3973999768495560e-02</internalNodes> + <leafValues> + 2.8518000617623329e-02 -6.1152201890945435e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1552 2.1449999883770943e-02</internalNodes> + <leafValues> + 2.6181999593973160e-02 3.0306598544120789e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1553 -2.9214000329375267e-02</internalNodes> + <leafValues> + 4.4940599799156189e-01 -2.2803099453449249e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1554 4.8099999548867345e-04</internalNodes> + <leafValues> + -1.9879999756813049e-01 2.0744499564170837e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1555 1.7109999898821115e-03</internalNodes> + <leafValues> + -5.4037201404571533e-01 6.7865997552871704e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1556 8.6660003289580345e-03</internalNodes> + <leafValues> + -1.3128000311553478e-02 5.2297902107238770e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1557 6.3657999038696289e-02</internalNodes> + <leafValues> + 6.8299002945423126e-02 -4.9235099554061890e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1558 -2.7968000620603561e-02</internalNodes> + <leafValues> + 6.8183898925781250e-01 7.8781001269817352e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1559 4.8953998833894730e-02</internalNodes> + <leafValues> + -2.0622399449348450e-01 5.0388097763061523e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>169</maxWeakCount> + <stageThreshold>-3.2396929264068604e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 1560 -2.9312999919056892e-02</internalNodes> + <leafValues> + 7.1284699440002441e-01 -5.8230698108673096e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1561 1.2415099889039993e-01</internalNodes> + <leafValues> + -3.6863499879837036e-01 6.0067200660705566e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1562 7.9349996522068977e-03</internalNodes> + <leafValues> + -8.6008298397064209e-01 2.1724699437618256e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1563 3.0365999788045883e-02</internalNodes> + <leafValues> + -2.7186998724937439e-01 6.1247897148132324e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1564 2.5218000635504723e-02</internalNodes> + <leafValues> + -3.4748300909996033e-01 5.0427699089050293e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1565 1.0014000348746777e-02</internalNodes> + <leafValues> + -3.1898999214172363e-01 4.1376799345016479e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1566 -1.6775000840425491e-02</internalNodes> + <leafValues> + -6.9048100709915161e-01 9.4830997288227081e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1567 -2.6950000319629908e-03</internalNodes> + <leafValues> + -2.0829799771308899e-01 2.3737199604511261e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1568 4.2257998138666153e-02</internalNodes> + <leafValues> + -4.9366700649261475e-01 1.8170599639415741e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1569 -4.8505000770092010e-02</internalNodes> + <leafValues> + 1.3429640531539917e+00 3.9769001305103302e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1570 2.8992999345064163e-02</internalNodes> + <leafValues> + 4.6496000140905380e-02 -8.1643497943878174e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1571 -4.0089000016450882e-02</internalNodes> + <leafValues> + -7.1197801828384399e-01 2.2553899884223938e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1572 -4.1021998971700668e-02</internalNodes> + <leafValues> + 1.0057929754257202e+00 -1.9690200686454773e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1573 1.1838000267744064e-02</internalNodes> + <leafValues> + -1.2600000016391277e-02 8.0767101049423218e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1574 -2.1328000351786613e-02</internalNodes> + <leafValues> + -8.2023900747299194e-01 2.0524999126791954e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1575 -2.3904999718070030e-02</internalNodes> + <leafValues> + 5.4210501909255981e-01 -7.4767000973224640e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1576 1.8008999526500702e-02</internalNodes> + <leafValues> + -3.3827701210975647e-01 4.2358601093292236e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1577 -4.3614000082015991e-02</internalNodes> + <leafValues> + -1.1983489990234375e+00 1.5566200017929077e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1578 -9.2449998483061790e-03</internalNodes> + <leafValues> + -8.9029997587203979e-01 1.1003999970853329e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1579 4.7485001385211945e-02</internalNodes> + <leafValues> + 1.6664099693298340e-01 -9.0764498710632324e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1580 -1.4233999885618687e-02</internalNodes> + <leafValues> + 6.2695199251174927e-01 -2.5791200995445251e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1581 3.8010000716894865e-03</internalNodes> + <leafValues> + -2.8229999542236328e-01 2.6624599099159241e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1582 3.4330000635236502e-03</internalNodes> + <leafValues> + -6.3771998882293701e-01 9.8422996699810028e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1583 -2.9221000149846077e-02</internalNodes> + <leafValues> + -7.6769900321960449e-01 2.2634500265121460e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1584 -6.4949998632073402e-03</internalNodes> + <leafValues> + 4.5600101351737976e-01 -2.6528900861740112e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1585 -3.0034000054001808e-02</internalNodes> + <leafValues> + -7.6551097631454468e-01 1.4009299874305725e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1586 7.8360000625252724e-03</internalNodes> + <leafValues> + 4.6755999326705933e-02 -7.2356200218200684e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1587 8.8550001382827759e-03</internalNodes> + <leafValues> + -4.9141999334096909e-02 5.1472699642181396e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1588 9.5973998308181763e-02</internalNodes> + <leafValues> + -2.0068999379873276e-02 -1.0850950479507446e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1589 -3.2876998186111450e-02</internalNodes> + <leafValues> + -9.5875298976898193e-01 1.4543600380420685e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1590 -1.3384000398218632e-02</internalNodes> + <leafValues> + -7.0013600587844849e-01 2.9157999902963638e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1591 1.5235999599099159e-02</internalNodes> + <leafValues> + -2.8235700726509094e-01 2.5367999076843262e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1592 1.2054000049829483e-02</internalNodes> + <leafValues> + -2.5303399562835693e-01 4.6526700258255005e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1593 -7.6295003294944763e-02</internalNodes> + <leafValues> + -6.9915801286697388e-01 1.3217200338840485e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1594 -1.2040000408887863e-02</internalNodes> + <leafValues> + 4.5894598960876465e-01 -2.3856499791145325e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1595 2.1916000172495842e-02</internalNodes> + <leafValues> + 1.8268600106239319e-01 -6.1629700660705566e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1596 -2.7330000884830952e-03</internalNodes> + <leafValues> + -6.3257902860641479e-01 3.4219000488519669e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1597 -4.8652000725269318e-02</internalNodes> + <leafValues> + -1.0297729969024658e+00 1.7386500537395477e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1598 -1.0463999584317207e-02</internalNodes> + <leafValues> + 3.4757301211357117e-01 -2.7464100718498230e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1599 -6.6550001502037048e-03</internalNodes> + <leafValues> + -2.8980299830436707e-01 2.4037900567054749e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1600 8.5469996556639671e-03</internalNodes> + <leafValues> + -4.4340500235557556e-01 1.4267399907112122e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1601 1.9913999363780022e-02</internalNodes> + <leafValues> + 1.7740400135517120e-01 -2.4096299707889557e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1602 2.2012999281287193e-02</internalNodes> + <leafValues> + -1.0812000371515751e-02 -9.4690799713134766e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1603 -5.2179001271724701e-02</internalNodes> + <leafValues> + 1.6547499895095825e+00 9.6487000584602356e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1604 1.9698999822139740e-02</internalNodes> + <leafValues> + -6.7560002207756042e-03 -8.6311501264572144e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1605 2.3040000349283218e-02</internalNodes> + <leafValues> + -2.3519999813288450e-03 3.8531300425529480e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1606 -1.5038000419735909e-02</internalNodes> + <leafValues> + -6.1905699968338013e-01 3.1077999621629715e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1607 -4.9956001341342926e-02</internalNodes> + <leafValues> + 7.0657497644424438e-01 4.7880999743938446e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1608 -6.9269999861717224e-02</internalNodes> + <leafValues> + 3.9212900400161743e-01 -2.3848000168800354e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1609 4.7399997711181641e-03</internalNodes> + <leafValues> + -2.4309000000357628e-02 2.5386300683021545e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1610 -3.3923998475074768e-02</internalNodes> + <leafValues> + 4.6930399537086487e-01 -2.3321899771690369e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1611 -1.6231000423431396e-02</internalNodes> + <leafValues> + 3.2319200038909912e-01 -2.0545600354671478e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1612 -5.0193000584840775e-02</internalNodes> + <leafValues> + -1.2277870178222656e+00 -4.0798000991344452e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1613 5.6944001466035843e-02</internalNodes> + <leafValues> + 4.5184001326560974e-02 6.0197502374649048e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1614 4.0936999022960663e-02</internalNodes> + <leafValues> + -1.6772800683975220e-01 8.9819300174713135e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1615 -3.0839999672025442e-03</internalNodes> + <leafValues> + 3.3716198801994324e-01 -2.7240800857543945e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1616 -3.2600000500679016e-02</internalNodes> + <leafValues> + -8.5446500778198242e-01 1.9664999097585678e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1617 9.8480999469757080e-02</internalNodes> + <leafValues> + 5.4742000997066498e-02 6.3827300071716309e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1618 -3.8185000419616699e-02</internalNodes> + <leafValues> + 5.2274698019027710e-01 -2.3384800553321838e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1619 -4.5917000621557236e-02</internalNodes> + <leafValues> + 6.2829202413558960e-01 3.2859001308679581e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1620 -1.1955499649047852e-01</internalNodes> + <leafValues> + -6.1572700738906860e-01 3.4680001437664032e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1621 -1.2044399976730347e-01</internalNodes> + <leafValues> + -8.4380000829696655e-01 1.6530700027942657e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1622 7.0619001984596252e-02</internalNodes> + <leafValues> + -6.3261002302169800e-02 -1.9863929748535156e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1623 8.4889996796846390e-03</internalNodes> + <leafValues> + -1.7663399875164032e-01 3.8011199235916138e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1624 2.2710999473929405e-02</internalNodes> + <leafValues> + -2.7605999261140823e-02 -9.1921401023864746e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1625 4.9700000090524554e-04</internalNodes> + <leafValues> + -2.4293200671672821e-01 2.2878900170326233e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1626 3.4651998430490494e-02</internalNodes> + <leafValues> + -2.3705999553203583e-01 5.4010999202728271e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1627 -4.4700000435113907e-03</internalNodes> + <leafValues> + 3.9078998565673828e-01 -1.2693800032138824e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1628 2.3643000051379204e-02</internalNodes> + <leafValues> + -2.6663699746131897e-01 3.2312598824501038e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1629 1.2813000008463860e-02</internalNodes> + <leafValues> + 1.7540800571441650e-01 -6.0787999629974365e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1630 -1.1250999756157398e-02</internalNodes> + <leafValues> + -1.0852589607238770e+00 -2.8046000748872757e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1631 -4.1535001248121262e-02</internalNodes> + <leafValues> + 7.1887397766113281e-01 2.7982000261545181e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1632 -9.3470998108386993e-02</internalNodes> + <leafValues> + -1.1906319856643677e+00 -4.4810999184846878e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1633 -2.7249999344348907e-02</internalNodes> + <leafValues> + 6.2942498922348022e-01 9.5039997249841690e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1634 -2.1759999915957451e-02</internalNodes> + <leafValues> + 1.3233649730682373e+00 -1.5027000010013580e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1635 -9.6890004351735115e-03</internalNodes> + <leafValues> + -3.3947101235389709e-01 1.7085799574851990e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1636 6.9395996630191803e-02</internalNodes> + <leafValues> + -2.5657799839973450e-01 4.7652098536491394e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1637 3.1208999454975128e-02</internalNodes> + <leafValues> + 1.4154000580310822e-01 -3.4942001104354858e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1638 -4.9727000296115875e-02</internalNodes> + <leafValues> + -1.1675560474395752e+00 -4.0757998824119568e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1639 -2.0301999524235725e-02</internalNodes> + <leafValues> + -3.9486399292945862e-01 1.5814900398254395e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1640 -1.5367000363767147e-02</internalNodes> + <leafValues> + 4.9300000071525574e-01 -2.0092099905014038e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1641 -5.0735000520944595e-02</internalNodes> + <leafValues> + 1.8736059665679932e+00 8.6730003356933594e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1642 -2.0726000890135765e-02</internalNodes> + <leafValues> + -8.8938397169113159e-01 -7.3199998587369919e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1643 -3.0993999913334846e-02</internalNodes> + <leafValues> + -1.1664899587631226e+00 1.4274600148200989e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1644 -4.4269999489188194e-03</internalNodes> + <leafValues> + -6.6815102100372314e-01 4.4120000675320625e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1645 -4.5743998140096664e-02</internalNodes> + <leafValues> + -4.7955200076103210e-01 1.5121999382972717e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1646 1.6698999330401421e-02</internalNodes> + <leafValues> + 1.2048599869012833e-01 -4.5235899090766907e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1647 3.2210000790655613e-03</internalNodes> + <leafValues> + -7.7615000307559967e-02 2.7846598625183105e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1648 2.4434000253677368e-02</internalNodes> + <leafValues> + -1.9987100362777710e-01 6.7253702878952026e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1649 -7.9677999019622803e-02</internalNodes> + <leafValues> + 9.2222398519515991e-01 9.2557996511459351e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1650 4.4530000537633896e-02</internalNodes> + <leafValues> + -2.6690500974655151e-01 3.3320501446723938e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1651 -1.2528300285339355e-01</internalNodes> + <leafValues> + -5.4253101348876953e-01 1.3976299762725830e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1652 1.7971999943256378e-02</internalNodes> + <leafValues> + 1.8219999969005585e-02 -6.8048501014709473e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1653 1.9184000790119171e-02</internalNodes> + <leafValues> + -1.2583999894559383e-02 5.4126697778701782e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1654 4.0024001151323318e-02</internalNodes> + <leafValues> + -1.7638799548149109e-01 7.8810399770736694e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1655 1.3558999635279179e-02</internalNodes> + <leafValues> + 2.0737600326538086e-01 -4.7744300961494446e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1656 1.6220999881625175e-02</internalNodes> + <leafValues> + 2.3076999932527542e-02 -6.1182099580764771e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1657 1.1229000054299831e-02</internalNodes> + <leafValues> + -1.7728000879287720e-02 4.1764199733734131e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1658 3.9193000644445419e-02</internalNodes> + <leafValues> + -1.8948499858379364e-01 7.4019300937652588e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1659 -9.5539996400475502e-03</internalNodes> + <leafValues> + 4.0947100520133972e-01 -1.3508899509906769e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1660 2.7878999710083008e-02</internalNodes> + <leafValues> + -2.0350700616836548e-01 6.1625397205352783e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1661 -2.3600999265909195e-02</internalNodes> + <leafValues> + -1.6967060565948486e+00 1.4633199572563171e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1662 2.6930000633001328e-02</internalNodes> + <leafValues> + -3.0401999130845070e-02 -1.0909470319747925e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1663 2.8999999631196260e-04</internalNodes> + <leafValues> + -2.0076000690460205e-01 2.2314099967479706e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1664 -4.1124999523162842e-02</internalNodes> + <leafValues> + -4.5242199301719666e-01 5.7392001152038574e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1665 6.6789998672902584e-03</internalNodes> + <leafValues> + 2.3824900388717651e-01 -2.1262100338935852e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1666 4.7864999622106552e-02</internalNodes> + <leafValues> + -1.8194800615310669e-01 6.1918401718139648e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1667 -3.1679999083280563e-03</internalNodes> + <leafValues> + -2.7393200993537903e-01 2.5017300248146057e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1668 -8.6230002343654633e-03</internalNodes> + <leafValues> + -4.6280300617218018e-01 4.2397998273372650e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1669 -7.4350000359117985e-03</internalNodes> + <leafValues> + 4.1796800494194031e-01 -1.7079999670386314e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1670 -1.8769999733194709e-03</internalNodes> + <leafValues> + 1.4602300524711609e-01 -3.3721101284027100e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1671 -8.6226001381874084e-02</internalNodes> + <leafValues> + 7.5143402814865112e-01 1.0711999610066414e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1672 4.6833999454975128e-02</internalNodes> + <leafValues> + -1.9119599461555481e-01 4.8414900898933411e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1673 -9.2000002041459084e-05</internalNodes> + <leafValues> + 3.5220399498939514e-01 -1.7333300411701202e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1674 -1.6343999654054642e-02</internalNodes> + <leafValues> + -6.4397698640823364e-01 9.0680001303553581e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1675 4.5703999698162079e-02</internalNodes> + <leafValues> + 1.8216000869870186e-02 3.1970798969268799e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1676 -2.7382999658584595e-02</internalNodes> + <leafValues> + 1.0564049482345581e+00 -1.7276400327682495e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1677 -2.7602000162005424e-02</internalNodes> + <leafValues> + 2.9715499281883240e-01 -9.4600003212690353e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1678 7.6939999125897884e-03</internalNodes> + <leafValues> + -2.1660299599170685e-01 4.7385200858116150e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1679 -7.0500001311302185e-04</internalNodes> + <leafValues> + 2.4048799276351929e-01 -2.6776000857353210e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1680 1.1054199934005737e-01</internalNodes> + <leafValues> + -3.3539000898599625e-02 -1.0233880281448364e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1681 6.8765997886657715e-02</internalNodes> + <leafValues> + -4.3239998631179333e-03 5.7153397798538208e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1682 1.7999999690800905e-03</internalNodes> + <leafValues> + 7.7574998140335083e-02 -4.2092698812484741e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1683 1.9232000410556793e-01</internalNodes> + <leafValues> + 8.2021996378898621e-02 2.8810169696807861e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1684 1.5742099285125732e-01</internalNodes> + <leafValues> + -1.3708199560642242e-01 2.0890059471130371e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1685 -4.9387000501155853e-02</internalNodes> + <leafValues> + -1.8610910177230835e+00 1.4332099258899689e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1686 5.1929000765085220e-02</internalNodes> + <leafValues> + -1.8737000226974487e-01 5.4231601953506470e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1687 4.9965001642704010e-02</internalNodes> + <leafValues> + 1.4175300300121307e-01 -1.5625779628753662e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1688 -4.2633000761270523e-02</internalNodes> + <leafValues> + 1.6059479713439941e+00 -1.4712899923324585e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1689 -3.7553999572992325e-02</internalNodes> + <leafValues> + -8.0974900722503662e-01 1.3256999850273132e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1690 -3.7174999713897705e-02</internalNodes> + <leafValues> + -1.3945020437240601e+00 -5.7055000215768814e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1691 1.3945999555289745e-02</internalNodes> + <leafValues> + 3.3427000045776367e-02 5.7474797964096069e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1692 -4.4800000614486635e-04</internalNodes> + <leafValues> + -5.5327498912811279e-01 2.1952999755740166e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1693 3.1993001699447632e-02</internalNodes> + <leafValues> + 2.0340999588370323e-02 3.7459200620651245e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1694 -4.2799999937415123e-03</internalNodes> + <leafValues> + 4.4428700208663940e-01 -2.2999699413776398e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1695 9.8550003021955490e-03</internalNodes> + <leafValues> + 1.8315799534320831e-01 -4.0964999794960022e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1696 9.3356996774673462e-02</internalNodes> + <leafValues> + -6.3661001622676849e-02 -1.6929290294647217e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1697 1.7209999263286591e-02</internalNodes> + <leafValues> + 2.0153899490833282e-01 -4.6061098575592041e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1698 8.4319999441504478e-03</internalNodes> + <leafValues> + -3.2003998756408691e-01 1.5312199294567108e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1699 -1.4054999686777592e-02</internalNodes> + <leafValues> + 8.6882400512695312e-01 3.2575000077486038e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1700 -7.7180000953376293e-03</internalNodes> + <leafValues> + 6.3686698675155640e-01 -1.8425500392913818e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1701 2.8005000203847885e-02</internalNodes> + <leafValues> + 1.7357499897480011e-01 -4.7883599996566772e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1702 -1.8884999677538872e-02</internalNodes> + <leafValues> + 2.4101600050926208e-01 -2.6547598838806152e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1703 -1.8585000187158585e-02</internalNodes> + <leafValues> + 5.4232501983642578e-01 5.3633000701665878e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1704 -3.6437001079320908e-02</internalNodes> + <leafValues> + 2.3908898830413818e+00 -1.3634699583053589e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1705 3.2455001026391983e-02</internalNodes> + <leafValues> + 1.5910699963569641e-01 -6.7581498622894287e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1706 5.9781998395919800e-02</internalNodes> + <leafValues> + -2.3479999508708715e-03 -7.3053699731826782e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1707 9.8209995776414871e-03</internalNodes> + <leafValues> + -1.1444099992513657e-01 3.0570301413536072e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1708 -3.5163998603820801e-02</internalNodes> + <leafValues> + -1.0511469841003418e+00 -3.3103000372648239e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1709 2.7429999317973852e-03</internalNodes> + <leafValues> + -2.0135399699211121e-01 3.2754099369049072e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1710 8.1059997901320457e-03</internalNodes> + <leafValues> + -2.1383500099182129e-01 4.3362098932266235e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1711 8.8942997157573700e-02</internalNodes> + <leafValues> + 1.0940899699926376e-01 -4.7609338760375977e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1712 -3.0054999515414238e-02</internalNodes> + <leafValues> + -1.7169300317764282e+00 -6.0919001698493958e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1713 -2.1734999492764473e-02</internalNodes> + <leafValues> + 6.4778900146484375e-01 -3.2830998301506042e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1714 3.7648998200893402e-02</internalNodes> + <leafValues> + -1.0060000233352184e-02 -7.6569098234176636e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1715 2.7189999818801880e-03</internalNodes> + <leafValues> + 1.9888900220394135e-01 -8.2479000091552734e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1716 -1.0548000223934650e-02</internalNodes> + <leafValues> + -8.6613601446151733e-01 -2.5986000895500183e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1717 1.2966300547122955e-01</internalNodes> + <leafValues> + 1.3911999762058258e-01 -2.2271950244903564e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1718 -1.7676999792456627e-02</internalNodes> + <leafValues> + 3.3967700600624084e-01 -2.3989599943161011e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1719 -7.7051997184753418e-02</internalNodes> + <leafValues> + -2.5017969608306885e+00 1.2841999530792236e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1720 -1.9230000674724579e-02</internalNodes> + <leafValues> + 5.0641202926635742e-01 -1.9751599431037903e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1721 -5.1222998648881912e-02</internalNodes> + <leafValues> + -2.9333369731903076e+00 1.3858500123023987e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1722 2.0830000285059214e-03</internalNodes> + <leafValues> + -6.0043597221374512e-01 2.9718000441789627e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1723 2.5418000295758247e-02</internalNodes> + <leafValues> + 3.3915799856185913e-01 -1.4392000436782837e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1724 -2.3905999958515167e-02</internalNodes> + <leafValues> + -1.1082680225372314e+00 -4.7377001494169235e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1725 -6.3740001060068607e-03</internalNodes> + <leafValues> + 4.4533699750900269e-01 -6.7052997648715973e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1726 -3.7698999047279358e-02</internalNodes> + <leafValues> + -1.0406579971313477e+00 -4.1790001094341278e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1727 2.1655100584030151e-01</internalNodes> + <leafValues> + 3.3863000571727753e-02 8.2017302513122559e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1728 -1.3400999829173088e-02</internalNodes> + <leafValues> + 5.2903497219085693e-01 -1.9133000075817108e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>196</maxWeakCount> + <stageThreshold>-3.2103500366210938e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 1729 7.1268998086452484e-02</internalNodes> + <leafValues> + -5.3631198406219482e-01 6.0715299844741821e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1730 5.6111000478267670e-02</internalNodes> + <leafValues> + -5.0141602754592896e-01 4.3976101279258728e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1731 4.0463998913764954e-02</internalNodes> + <leafValues> + -3.2922199368476868e-01 5.4834699630737305e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1732 6.3155002892017365e-02</internalNodes> + <leafValues> + -3.1701698899269104e-01 4.6152999997138977e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1733 1.0320999659597874e-02</internalNodes> + <leafValues> + 1.0694999992847443e-01 -9.8243898153305054e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1734 6.2606997787952423e-02</internalNodes> + <leafValues> + -1.4329700171947479e-01 7.1095001697540283e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1735 -3.9416000247001648e-02</internalNodes> + <leafValues> + 9.4380199909210205e-01 -2.1572099626064301e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1736 -5.3960001096129417e-03</internalNodes> + <leafValues> + -5.4611998796463013e-01 2.5303798913955688e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1737 1.0773199796676636e-01</internalNodes> + <leafValues> + 1.2496000155806541e-02 -1.0809199810028076e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1738 1.6982000321149826e-02</internalNodes> + <leafValues> + -3.1536400318145752e-01 5.1239997148513794e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1739 3.1216999515891075e-02</internalNodes> + <leafValues> + -4.5199999585747719e-03 -1.2443480491638184e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1740 -2.3106999695301056e-02</internalNodes> + <leafValues> + -7.6492899656295776e-01 2.0640599727630615e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1741 -1.1203999631106853e-02</internalNodes> + <leafValues> + 2.4092699587345123e-01 -3.5142099857330322e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1742 -4.7479998320341110e-03</internalNodes> + <leafValues> + -9.7007997334003448e-02 2.0638099312782288e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1743 -1.7358999699354172e-02</internalNodes> + <leafValues> + -7.9020297527313232e-01 2.1852999925613403e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1744 1.8851999193429947e-02</internalNodes> + <leafValues> + -1.0394600033760071e-01 5.4844200611114502e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1745 7.2249998338520527e-03</internalNodes> + <leafValues> + -4.0409401059150696e-01 2.6763799786567688e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1746 1.8915999680757523e-02</internalNodes> + <leafValues> + 2.0508000254631042e-01 -1.0206340551376343e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1747 3.1156999990344048e-02</internalNodes> + <leafValues> + 1.2400000123307109e-03 -8.7293499708175659e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1748 2.0951999351382256e-02</internalNodes> + <leafValues> + -5.5559999309480190e-03 8.0356198549270630e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1749 1.1291000060737133e-02</internalNodes> + <leafValues> + -3.6478400230407715e-01 2.2767899930477142e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1750 -5.7011000812053680e-02</internalNodes> + <leafValues> + -1.4295619726181030e+00 1.4322000741958618e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1751 7.2194002568721771e-02</internalNodes> + <leafValues> + -4.1850000619888306e-02 -1.9111829996109009e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1752 -1.9874000921845436e-02</internalNodes> + <leafValues> + 2.6425498723983765e-01 -3.2617700099945068e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1753 -1.6692999750375748e-02</internalNodes> + <leafValues> + -8.3907800912857056e-01 4.0799999260343611e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 1754 -3.9834998548030853e-02</internalNodes> + <leafValues> + -4.8858499526977539e-01 1.6436100006103516e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1755 2.7009999379515648e-02</internalNodes> + <leafValues> + -1.8862499296665192e-01 8.3419400453567505e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1756 -3.9420002140104771e-03</internalNodes> + <leafValues> + 2.3231500387191772e-01 -7.2360001504421234e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1757 2.2833000868558884e-02</internalNodes> + <leafValues> + -3.5884000360965729e-02 -1.1549400091171265e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1758 -6.8888001143932343e-02</internalNodes> + <leafValues> + -1.7837309837341309e+00 1.5159000456333160e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1759 4.3097000569105148e-02</internalNodes> + <leafValues> + -2.1608099341392517e-01 5.0624102354049683e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1760 8.6239995434880257e-03</internalNodes> + <leafValues> + -1.7795599997043610e-01 2.8957900404930115e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1761 1.4561000280082226e-02</internalNodes> + <leafValues> + -1.1408000253140926e-02 -8.9402002096176147e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1762 -1.1501000262796879e-02</internalNodes> + <leafValues> + 3.0171999335289001e-01 -4.3659001588821411e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1763 -1.0971499979496002e-01</internalNodes> + <leafValues> + -9.5147097110748291e-01 -1.9973000511527061e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1764 4.5228000730276108e-02</internalNodes> + <leafValues> + 3.3110998570919037e-02 9.6619802713394165e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1765 -2.7047999203205109e-02</internalNodes> + <leafValues> + 9.7963601350784302e-01 -1.7261900007724762e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1766 1.8030999228358269e-02</internalNodes> + <leafValues> + -2.0801000297069550e-02 2.7385899424552917e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1767 5.0524998456239700e-02</internalNodes> + <leafValues> + -5.6802999228239059e-02 -1.7775089740753174e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1768 -2.9923999682068825e-02</internalNodes> + <leafValues> + 6.5329200029373169e-01 -2.3537000641226768e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1769 3.8058001548051834e-02</internalNodes> + <leafValues> + 2.6317000389099121e-02 -7.0665699243545532e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1770 1.8563899397850037e-01</internalNodes> + <leafValues> + -5.6039998307824135e-03 3.2873699069023132e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1771 -4.0670000016689301e-03</internalNodes> + <leafValues> + 3.4204798936843872e-01 -3.0171599984169006e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1772 1.0108999907970428e-02</internalNodes> + <leafValues> + -7.3600001633167267e-03 5.7981598377227783e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1773 -1.1567000299692154e-02</internalNodes> + <leafValues> + -5.2722197771072388e-01 4.6447999775409698e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1774 -6.5649999305605888e-03</internalNodes> + <leafValues> + -5.8529102802276611e-01 1.9101899862289429e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1775 1.0582000017166138e-02</internalNodes> + <leafValues> + 2.1073000505566597e-02 -6.8892598152160645e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1776 -2.0304000005125999e-02</internalNodes> + <leafValues> + -3.6400699615478516e-01 1.5338799357414246e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1777 2.3529999889433384e-03</internalNodes> + <leafValues> + 3.6164000630378723e-02 -5.9825098514556885e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1778 -1.4690000098198652e-03</internalNodes> + <leafValues> + -1.4707699418067932e-01 3.7507998943328857e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1779 8.6449999362230301e-03</internalNodes> + <leafValues> + -2.1708500385284424e-01 5.1936799287796021e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1780 -2.4326000362634659e-02</internalNodes> + <leafValues> + -1.0846769809722900e+00 1.4084799587726593e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1781 7.4418999254703522e-02</internalNodes> + <leafValues> + -1.5513800084590912e-01 1.1822769641876221e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1782 1.7077999189496040e-02</internalNodes> + <leafValues> + 4.4231001287698746e-02 9.1561102867126465e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1783 -2.4577999487519264e-02</internalNodes> + <leafValues> + -1.5504100322723389e+00 -5.4745998233556747e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1784 3.0205000191926956e-02</internalNodes> + <leafValues> + 1.6662800312042236e-01 -1.0001239776611328e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1785 1.2136000208556652e-02</internalNodes> + <leafValues> + -7.7079099416732788e-01 -4.8639997839927673e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1786 8.6717002093791962e-02</internalNodes> + <leafValues> + 1.1061699688434601e-01 -1.6857999563217163e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1787 -4.2309001088142395e-02</internalNodes> + <leafValues> + 1.1075930595397949e+00 -1.5438599884510040e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1788 -2.6420000940561295e-03</internalNodes> + <leafValues> + 2.7451899647712708e-01 -1.8456199765205383e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1789 -5.6662000715732574e-02</internalNodes> + <leafValues> + -8.0625599622726440e-01 -1.6928000375628471e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1790 2.3475000634789467e-02</internalNodes> + <leafValues> + 1.4187699556350708e-01 -2.5500899553298950e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1791 -2.0803000777959824e-02</internalNodes> + <leafValues> + 1.9826300442218781e-01 -3.1171199679374695e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1792 7.2599998675286770e-03</internalNodes> + <leafValues> + -5.0590999424457550e-02 4.1923800110816956e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1793 3.4160000085830688e-01</internalNodes> + <leafValues> + -1.6674900054931641e-01 9.2748600244522095e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1794 6.2029999680817127e-03</internalNodes> + <leafValues> + -1.2625899910926819e-01 4.0445300936698914e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1795 3.2692000269889832e-02</internalNodes> + <leafValues> + -3.2634999603033066e-02 -9.8939800262451172e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1796 2.1100000594742596e-04</internalNodes> + <leafValues> + -6.4534001052379608e-02 2.5473698973655701e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1797 7.2100001852959394e-04</internalNodes> + <leafValues> + -3.6618599295616150e-01 1.1973100155591965e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1798 5.4490998387336731e-02</internalNodes> + <leafValues> + 1.2073499709367752e-01 -1.0291390419006348e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1799 -1.0141000151634216e-02</internalNodes> + <leafValues> + -5.2177202701568604e-01 3.3734999597072601e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1800 -1.8815999850630760e-02</internalNodes> + <leafValues> + 6.5181797742843628e-01 1.3399999588727951e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1801 -5.3480002097785473e-03</internalNodes> + <leafValues> + 1.7370699346065521e-01 -3.4132000803947449e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1802 -1.0847000405192375e-02</internalNodes> + <leafValues> + -1.9699899852275848e-01 1.5045499801635742e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1803 -4.9926001578569412e-02</internalNodes> + <leafValues> + -5.0888502597808838e-01 3.0762000009417534e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1804 1.2160000391304493e-02</internalNodes> + <leafValues> + -6.9251999258995056e-02 1.8745499849319458e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1805 -2.2189998999238014e-03</internalNodes> + <leafValues> + -4.0849098563194275e-01 7.9954996705055237e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1806 3.1580000650137663e-03</internalNodes> + <leafValues> + -2.1124599874019623e-01 2.2366400063037872e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1807 4.1439998894929886e-03</internalNodes> + <leafValues> + -4.9900299310684204e-01 6.2917001545429230e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1808 -7.3730000294744968e-03</internalNodes> + <leafValues> + -2.0553299784660339e-01 2.2096699476242065e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1809 5.1812000572681427e-02</internalNodes> + <leafValues> + 1.8096800148487091e-01 -4.3495801091194153e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1810 1.8340000882744789e-02</internalNodes> + <leafValues> + 1.5200000256299973e-02 3.7991699576377869e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1811 1.7490799725055695e-01</internalNodes> + <leafValues> + -2.0920799672603607e-01 4.0013000369071960e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1812 5.3993999958038330e-02</internalNodes> + <leafValues> + 2.4751600623130798e-01 -2.6712900400161743e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1813 -3.2033199071884155e-01</internalNodes> + <leafValues> + -1.9094380140304565e+00 -6.6960997879505157e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1814 -2.7060000225901604e-02</internalNodes> + <leafValues> + -7.1371299028396606e-01 1.5904599428176880e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1815 7.7463999390602112e-02</internalNodes> + <leafValues> + -1.6970199346542358e-01 7.7552998065948486e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1816 2.3771999403834343e-02</internalNodes> + <leafValues> + 1.9021899998188019e-01 -6.0162097215652466e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1817 1.1501000262796879e-02</internalNodes> + <leafValues> + 7.7039999887347221e-03 -6.1730301380157471e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1818 3.2616000622510910e-02</internalNodes> + <leafValues> + 1.7159199714660645e-01 -7.0978200435638428e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1819 -4.4383000582456589e-02</internalNodes> + <leafValues> + -2.2606229782104492e+00 -7.3276996612548828e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1820 -5.8476001024246216e-02</internalNodes> + <leafValues> + 2.4087750911712646e+00 8.3091996610164642e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1821 1.9303999841213226e-02</internalNodes> + <leafValues> + -2.7082300186157227e-01 2.7369999885559082e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1822 -4.4705998152494431e-02</internalNodes> + <leafValues> + 3.1355598568916321e-01 -6.2492001801729202e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1823 -6.0334999114274979e-02</internalNodes> + <leafValues> + -1.4515119791030884e+00 -5.8761000633239746e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1824 1.1667000129818916e-02</internalNodes> + <leafValues> + -1.8084999173879623e-02 5.0479698181152344e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1825 2.8009999543428421e-02</internalNodes> + <leafValues> + -2.3302899301052094e-01 3.0708700418472290e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1826 6.5397001802921295e-02</internalNodes> + <leafValues> + 1.4135900139808655e-01 -5.0010901689529419e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1827 9.6239997074007988e-03</internalNodes> + <leafValues> + -2.2054600715637207e-01 3.9191201329231262e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1828 2.5510000996291637e-03</internalNodes> + <leafValues> + -1.1381500214338303e-01 2.0032300055027008e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1829 3.1847000122070312e-02</internalNodes> + <leafValues> + 2.5476999580860138e-02 -5.3326398134231567e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1830 3.3055000007152557e-02</internalNodes> + <leafValues> + 1.7807699739933014e-01 -6.2793898582458496e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1831 4.7600999474525452e-02</internalNodes> + <leafValues> + -1.4747899770736694e-01 1.4204180240631104e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1832 -1.9571999087929726e-02</internalNodes> + <leafValues> + -5.2693498134613037e-01 1.5838600695133209e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1833 -5.4730001837015152e-02</internalNodes> + <leafValues> + 8.8231599330902100e-01 -1.6627800464630127e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1834 -2.2686000913381577e-02</internalNodes> + <leafValues> + -4.8386898636817932e-01 1.5000100433826447e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1835 1.0713200271129608e-01</internalNodes> + <leafValues> + -2.1336199343204498e-01 4.2333900928497314e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1836 -3.6380000412464142e-02</internalNodes> + <leafValues> + -7.4198000133037567e-02 1.4589400589466095e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1837 1.3935999944806099e-02</internalNodes> + <leafValues> + -2.4911600351333618e-01 2.6771199703216553e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1838 2.0991999655961990e-02</internalNodes> + <leafValues> + 8.7959999218583107e-03 4.3064999580383301e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1839 4.9118999391794205e-02</internalNodes> + <leafValues> + -1.7591999471187592e-01 6.9282901287078857e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1840 3.6315999925136566e-02</internalNodes> + <leafValues> + 1.3145299255847931e-01 -3.3597299456596375e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1841 4.1228000074625015e-02</internalNodes> + <leafValues> + -4.5692000538110733e-02 -1.3515930175781250e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1842 1.5672000125050545e-02</internalNodes> + <leafValues> + 1.7544099688529968e-01 -6.0550000518560410e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1843 -1.6286000609397888e-02</internalNodes> + <leafValues> + -1.1308189630508423e+00 -3.9533000439405441e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1844 -3.0229999683797359e-03</internalNodes> + <leafValues> + -2.2454300522804260e-01 2.3628099262714386e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1845 -1.3786299526691437e-01</internalNodes> + <leafValues> + 4.5376899838447571e-01 -2.1098700165748596e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1846 -9.6760001033544540e-03</internalNodes> + <leafValues> + -1.5105099976062775e-01 2.0781700313091278e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1847 -2.4839999154210091e-02</internalNodes> + <leafValues> + -6.8350297212600708e-01 -8.0040004104375839e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1848 -1.3964399695396423e-01</internalNodes> + <leafValues> + 6.5011298656463623e-01 4.6544000506401062e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1849 -8.2153998315334320e-02</internalNodes> + <leafValues> + 4.4887199997901917e-01 -2.3591999709606171e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1850 3.8449999410659075e-03</internalNodes> + <leafValues> + -8.8173002004623413e-02 2.7346798777580261e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1851 -6.6579999402165413e-03</internalNodes> + <leafValues> + -4.6866598725318909e-01 7.7001996338367462e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1852 -1.5898000448942184e-02</internalNodes> + <leafValues> + 2.9268398880958557e-01 -2.1941000595688820e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1853 -5.0946000963449478e-02</internalNodes> + <leafValues> + -1.2093789577484131e+00 -4.2109999805688858e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1854 1.6837999224662781e-02</internalNodes> + <leafValues> + -4.5595999807119370e-02 5.0180697441101074e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1855 1.5918999910354614e-02</internalNodes> + <leafValues> + -2.6904299855232239e-01 2.6516300439834595e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1856 3.6309999413788319e-03</internalNodes> + <leafValues> + -1.3046100735664368e-01 3.1807100772857666e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1857 -8.6144998669624329e-02</internalNodes> + <leafValues> + 1.9443659782409668e+00 -1.3978299498558044e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1858 3.3140998333692551e-02</internalNodes> + <leafValues> + 1.5266799926757812e-01 -3.0866000801324844e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1859 -3.9679999463260174e-03</internalNodes> + <leafValues> + -7.1202301979064941e-01 -1.3844000175595284e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1860 -2.4008000269532204e-02</internalNodes> + <leafValues> + 9.2007797956466675e-01 4.6723999083042145e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1861 8.7320003658533096e-03</internalNodes> + <leafValues> + -2.2567300498485565e-01 3.1931799650192261e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1862 -2.7786999940872192e-02</internalNodes> + <leafValues> + -7.2337102890014648e-01 1.7018599808216095e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1863 -1.9455300271511078e-01</internalNodes> + <leafValues> + 1.2461860179901123e+00 -1.4736199378967285e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1864 -1.0869699716567993e-01</internalNodes> + <leafValues> + -1.4465179443359375e+00 1.2145300209522247e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1865 -1.9494999200105667e-02</internalNodes> + <leafValues> + -7.8153097629547119e-01 -2.3732999339699745e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1866 3.0650000553578138e-03</internalNodes> + <leafValues> + -8.5471397638320923e-01 1.6686999797821045e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1867 5.9193998575210571e-02</internalNodes> + <leafValues> + -1.4853699505329132e-01 1.1273469924926758e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1868 -5.4207999259233475e-02</internalNodes> + <leafValues> + 5.4726999998092651e-01 3.5523999482393265e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1869 -3.9324998855590820e-02</internalNodes> + <leafValues> + 3.6642599105834961e-01 -2.0543999969959259e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1870 8.2278996706008911e-02</internalNodes> + <leafValues> + -3.5007998347282410e-02 5.3994202613830566e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1871 -7.4479999020695686e-03</internalNodes> + <leafValues> + -6.1537498235702515e-01 -3.5319998860359192e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1872 7.3770000599324703e-03</internalNodes> + <leafValues> + -6.5591000020503998e-02 4.1961398720741272e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1873 7.0779998786747456e-03</internalNodes> + <leafValues> + -3.4129500389099121e-01 1.2536799907684326e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1874 -1.5581999905407429e-02</internalNodes> + <leafValues> + -3.0240398645401001e-01 2.1511000394821167e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1875 -2.7399999089539051e-03</internalNodes> + <leafValues> + 7.6553001999855042e-02 -4.1060501337051392e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1876 -7.0600003004074097e-02</internalNodes> + <leafValues> + -9.7356200218200684e-01 1.1241800338029861e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1877 -1.1706000193953514e-02</internalNodes> + <leafValues> + 1.8560700118541718e-01 -2.9755198955535889e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1878 7.1499997284263372e-04</internalNodes> + <leafValues> + -5.9650000184774399e-02 2.4824699759483337e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1879 -3.6866001784801483e-02</internalNodes> + <leafValues> + 3.2751700282096863e-01 -2.3059600591659546e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1880 -3.2526999711990356e-02</internalNodes> + <leafValues> + -2.9320299625396729e-01 1.5427699685096741e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1881 -7.4813999235630035e-02</internalNodes> + <leafValues> + -1.2143570184707642e+00 -5.2244000136852264e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1882 4.1469998657703400e-02</internalNodes> + <leafValues> + 1.3062499463558197e-01 -2.3274369239807129e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1883 -2.8880000114440918e-02</internalNodes> + <leafValues> + -6.6074597835540771e-01 -9.0960003435611725e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1884 4.6381998807191849e-02</internalNodes> + <leafValues> + 1.6630199551582336e-01 -6.6949498653411865e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1885 2.5424998998641968e-01</internalNodes> + <leafValues> + -5.4641999304294586e-02 -1.2676080465316772e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1886 2.4000001139938831e-03</internalNodes> + <leafValues> + 2.0276799798011780e-01 1.4667999930679798e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1887 -8.2805998623371124e-02</internalNodes> + <leafValues> + -7.8713601827621460e-01 -2.4468999356031418e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1888 -1.1438000015914440e-02</internalNodes> + <leafValues> + 2.8623399138450623e-01 -3.0894000083208084e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1889 -1.2913399934768677e-01</internalNodes> + <leafValues> + 1.7292929887771606e+00 -1.4293900132179260e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1890 3.8552999496459961e-02</internalNodes> + <leafValues> + 1.9232999533414841e-02 3.7732601165771484e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1891 1.0191400349140167e-01</internalNodes> + <leafValues> + -7.4533998966217041e-02 -3.3868899345397949e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1892 -1.9068000838160515e-02</internalNodes> + <leafValues> + 3.1814101338386536e-01 1.9261000677943230e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1893 -6.0775000602006912e-02</internalNodes> + <leafValues> + 7.6936298608779907e-01 -1.7644000053405762e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1894 2.4679999798536301e-02</internalNodes> + <leafValues> + 1.8396499752998352e-01 -3.0868801474571228e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1895 2.6759000495076180e-02</internalNodes> + <leafValues> + -2.3454900085926056e-01 3.3056598901748657e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1896 1.4969999901950359e-02</internalNodes> + <leafValues> + 1.7213599383831024e-01 -1.8248899281024933e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1897 2.6142999529838562e-02</internalNodes> + <leafValues> + -4.6463999897241592e-02 -1.1318379640579224e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1898 -3.7512000650167465e-02</internalNodes> + <leafValues> + 8.0404001474380493e-01 6.9660000503063202e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1899 -5.3229997865855694e-03</internalNodes> + <leafValues> + -8.1884402036666870e-01 -1.8224999308586121e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1900 1.7813000828027725e-02</internalNodes> + <leafValues> + 1.4957800507545471e-01 -1.8667200207710266e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1901 -3.4010000526905060e-02</internalNodes> + <leafValues> + -7.2852301597595215e-01 -1.6615999862551689e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1902 -1.5953000634908676e-02</internalNodes> + <leafValues> + 5.6944000720977783e-01 1.3832000084221363e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1903 1.9743999466300011e-02</internalNodes> + <leafValues> + 4.0525000542402267e-02 -4.1773399710655212e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1904 -1.0374800115823746e-01</internalNodes> + <leafValues> + -1.9825149774551392e+00 1.1960200220346451e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1905 -1.9285000860691071e-02</internalNodes> + <leafValues> + 5.0230598449707031e-01 -1.9745899736881256e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1906 -1.2780000455677509e-02</internalNodes> + <leafValues> + 4.0195000171661377e-01 -2.6957999914884567e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1907 -1.6352999955415726e-02</internalNodes> + <leafValues> + -7.6608800888061523e-01 -2.4209000170230865e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1908 -1.2763699889183044e-01</internalNodes> + <leafValues> + 8.6578500270843506e-01 6.4205996692180634e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1909 1.9068999215960503e-02</internalNodes> + <leafValues> + -5.5929797887802124e-01 -1.6880000475794077e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1910 3.2480999827384949e-02</internalNodes> + <leafValues> + 4.0722001343965530e-02 4.8925098776817322e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1911 9.4849998131394386e-03</internalNodes> + <leafValues> + -1.9231900572776794e-01 5.1139700412750244e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1912 5.0470000132918358e-03</internalNodes> + <leafValues> + 1.8706800043582916e-01 -1.6113600134849548e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1913 4.1267998516559601e-02</internalNodes> + <leafValues> + -4.8817999660968781e-02 -1.1326299905776978e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1914 -7.6358996331691742e-02</internalNodes> + <leafValues> + 1.4169390201568604e+00 8.7319999933242798e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1915 -7.2834998369216919e-02</internalNodes> + <leafValues> + 1.3189860582351685e+00 -1.4819100499153137e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1916 5.9576999396085739e-02</internalNodes> + <leafValues> + 4.8376999795436859e-02 8.5611802339553833e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1917 2.0263999700546265e-02</internalNodes> + <leafValues> + -2.1044099330902100e-01 3.3858999609947205e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1918 -8.0301001667976379e-02</internalNodes> + <leafValues> + -1.2464400529861450e+00 1.1857099831104279e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1919 -1.7835000529885292e-02</internalNodes> + <leafValues> + 2.5782299041748047e-01 -2.4564799666404724e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1920 1.1431000195443630e-02</internalNodes> + <leafValues> + 2.2949799895286560e-01 -2.9497599601745605e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1921 -2.5541000068187714e-02</internalNodes> + <leafValues> + -8.6252999305725098e-01 -7.0400000549852848e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 1922 -7.6899997657164931e-04</internalNodes> + <leafValues> + 3.1511399149894714e-01 -1.4349000155925751e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1923 -1.4453999698162079e-02</internalNodes> + <leafValues> + 2.5148499011993408e-01 -2.8232899308204651e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1924 8.6730001494288445e-03</internalNodes> + <leafValues> + 2.6601400971412659e-01 -2.8190800547599792e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>197</maxWeakCount> + <stageThreshold>-3.2772979736328125e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 1925 5.4708998650312424e-02</internalNodes> + <leafValues> + -5.4144299030303955e-01 6.1043000221252441e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1926 -1.0838799923658371e-01</internalNodes> + <leafValues> + 7.1739900112152100e-01 -4.1196098923683167e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1927 2.2996999323368073e-02</internalNodes> + <leafValues> + -5.8269798755645752e-01 2.9645600914955139e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1928 2.7540000155568123e-03</internalNodes> + <leafValues> + -7.4243897199630737e-01 1.4183300733566284e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1929 -2.1520000882446766e-03</internalNodes> + <leafValues> + 1.7879900336265564e-01 -6.8548601865768433e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1930 -2.2559000179171562e-02</internalNodes> + <leafValues> + -1.0775549411773682e+00 1.2388999760150909e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1931 8.3025000989437103e-02</internalNodes> + <leafValues> + 2.4500999599695206e-02 -1.0251879692077637e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1932 -6.6740000620484352e-03</internalNodes> + <leafValues> + -4.5283100008964539e-01 2.1230199933052063e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1933 7.6485000550746918e-02</internalNodes> + <leafValues> + -2.6972699165344238e-01 4.8580199480056763e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1934 5.4910001344978809e-03</internalNodes> + <leafValues> + -4.8871201276779175e-01 3.1616398692131042e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1935 -1.0414999909698963e-02</internalNodes> + <leafValues> + 4.1512900590896606e-01 -3.0044800043106079e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1936 2.7607999742031097e-02</internalNodes> + <leafValues> + 1.6203799843788147e-01 -9.9868500232696533e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1937 -2.3272000253200531e-02</internalNodes> + <leafValues> + -1.1024399995803833e+00 2.1124999970197678e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1938 -5.5619999766349792e-02</internalNodes> + <leafValues> + 6.5033102035522461e-01 -2.7938000857830048e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1939 -4.0631998330354691e-02</internalNodes> + <leafValues> + 4.2117300629615784e-01 -2.6763799786567688e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1940 -7.3560001328587532e-03</internalNodes> + <leafValues> + 3.5277798771858215e-01 -3.7854000926017761e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1941 1.7007000744342804e-02</internalNodes> + <leafValues> + -2.9189500212669373e-01 4.1053798794746399e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1942 -3.7034001201391220e-02</internalNodes> + <leafValues> + -1.3216309547424316e+00 1.2966500222682953e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1943 -1.9633000716567039e-02</internalNodes> + <leafValues> + -8.7702298164367676e-01 1.0799999581649899e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1944 -2.3546999320387840e-02</internalNodes> + <leafValues> + 2.6106101274490356e-01 -2.1481400728225708e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1945 -4.3352998793125153e-02</internalNodes> + <leafValues> + -9.9089699983596802e-01 -9.9560003727674484e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 1946 -2.2183999419212341e-02</internalNodes> + <leafValues> + 6.3454401493072510e-01 -5.6547001004219055e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1947 1.6530999913811684e-02</internalNodes> + <leafValues> + 2.4664999917149544e-02 -7.3326802253723145e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1948 -3.2744001597166061e-02</internalNodes> + <leafValues> + -5.6297200918197632e-01 1.6640299558639526e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1949 7.1415998041629791e-02</internalNodes> + <leafValues> + -3.0000001424923539e-04 -9.3286401033401489e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1950 8.0999999772757292e-04</internalNodes> + <leafValues> + -9.5380000770092010e-02 2.5184699892997742e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1951 -8.4090000018477440e-03</internalNodes> + <leafValues> + -6.5496802330017090e-01 6.7300997674465179e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1952 -1.7254000529646873e-02</internalNodes> + <leafValues> + -4.6492999792098999e-01 1.6070899367332458e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1953 -1.8641000613570213e-02</internalNodes> + <leafValues> + -1.0594010353088379e+00 -1.9617000594735146e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1954 -9.1979997232556343e-03</internalNodes> + <leafValues> + 5.0716197490692139e-01 -1.5339200198650360e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1955 1.8538000062108040e-02</internalNodes> + <leafValues> + -3.0498200654983521e-01 7.3506200313568115e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1956 -5.0335001200437546e-02</internalNodes> + <leafValues> + -1.1140480041503906e+00 1.8000100553035736e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1957 -2.3529000580310822e-02</internalNodes> + <leafValues> + -8.6907899379730225e-01 -1.2459999881684780e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1958 -2.7100000530481339e-02</internalNodes> + <leafValues> + 6.5942901372909546e-01 -3.5323999822139740e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1959 6.5879998728632927e-03</internalNodes> + <leafValues> + -2.2953400015830994e-01 4.2425099015235901e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1960 2.3360000923275948e-02</internalNodes> + <leafValues> + 1.8356199562549591e-01 -9.8587298393249512e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1961 1.2946999631822109e-02</internalNodes> + <leafValues> + -3.3147400617599487e-01 2.1323199570178986e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1962 -6.6559999249875546e-03</internalNodes> + <leafValues> + -1.1951400339603424e-01 2.9752799868583679e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1963 -2.2570999339222908e-02</internalNodes> + <leafValues> + 3.8499400019645691e-01 -2.4434499442577362e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1964 -6.3813999295234680e-02</internalNodes> + <leafValues> + -8.9383500814437866e-01 1.4217500388622284e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1965 -4.9945000559091568e-02</internalNodes> + <leafValues> + 5.3864401578903198e-01 -2.0485299825668335e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1966 6.8319998681545258e-03</internalNodes> + <leafValues> + -5.6678999215364456e-02 3.9970999956130981e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1967 -5.5835999548435211e-02</internalNodes> + <leafValues> + -1.5239470005035400e+00 -5.1183000206947327e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1968 3.1957000494003296e-01</internalNodes> + <leafValues> + 7.4574001133441925e-02 1.2447799444198608e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1969 8.0955997109413147e-02</internalNodes> + <leafValues> + -1.9665500521659851e-01 5.9889698028564453e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1970 -1.4911999925971031e-02</internalNodes> + <leafValues> + -6.4020597934722900e-01 1.5807600319385529e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1971 4.6709001064300537e-02</internalNodes> + <leafValues> + 8.5239000618457794e-02 -4.5487201213836670e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1972 6.0539999976754189e-03</internalNodes> + <leafValues> + -4.3184000253677368e-01 2.2452600300312042e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1973 -3.4375999122858047e-02</internalNodes> + <leafValues> + 4.0202501416206360e-01 -2.3903599381446838e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1974 -3.4924000501632690e-02</internalNodes> + <leafValues> + 5.2870100736618042e-01 3.9709001779556274e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1975 3.0030000489205122e-03</internalNodes> + <leafValues> + -3.8754299283027649e-01 1.4192600548267365e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1976 -1.4132999815046787e-02</internalNodes> + <leafValues> + 8.7528401613235474e-01 8.5507996380329132e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1977 -6.7940000444650650e-03</internalNodes> + <leafValues> + -1.1649219989776611e+00 -3.3943001180887222e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1978 -5.2886001765727997e-02</internalNodes> + <leafValues> + 1.0930680036544800e+00 5.1187001168727875e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1979 -2.1079999860376120e-03</internalNodes> + <leafValues> + 1.3696199655532837e-01 -3.3849999308586121e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1980 1.8353000283241272e-02</internalNodes> + <leafValues> + 1.3661600649356842e-01 -4.0777799487113953e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1981 1.2671999633312225e-02</internalNodes> + <leafValues> + -1.4936000108718872e-02 -8.1707501411437988e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1982 1.2924999929964542e-02</internalNodes> + <leafValues> + 1.7625099420547485e-01 -3.2491698861122131e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1983 -1.7921000719070435e-02</internalNodes> + <leafValues> + -5.2745401859283447e-01 4.4443000108003616e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1984 1.9160000374540687e-03</internalNodes> + <leafValues> + -1.0978599637746811e-01 2.2067500650882721e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1985 -1.4697999693453312e-02</internalNodes> + <leafValues> + 3.9067798852920532e-01 -2.2224999964237213e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1986 -1.4972999691963196e-02</internalNodes> + <leafValues> + -2.5450900197029114e-01 1.7790000140666962e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1987 1.4636999927461147e-02</internalNodes> + <leafValues> + -2.5125000625848770e-02 -8.7121301889419556e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1988 -1.0974000208079815e-02</internalNodes> + <leafValues> + 7.9082798957824707e-01 2.0121000707149506e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1989 -9.1599998995661736e-03</internalNodes> + <leafValues> + -4.7906899452209473e-01 5.2232000976800919e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1990 4.6179997734725475e-03</internalNodes> + <leafValues> + -1.7244599759578705e-01 3.4527799487113953e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1991 2.3476999253034592e-02</internalNodes> + <leafValues> + 3.7760001141577959e-03 -6.5333700180053711e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1992 3.1766999512910843e-02</internalNodes> + <leafValues> + 1.6364000737667084e-02 5.8723700046539307e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1993 -1.8419999629259109e-02</internalNodes> + <leafValues> + 1.9993899762630463e-01 -3.2056498527526855e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1994 1.9543999806046486e-02</internalNodes> + <leafValues> + 1.8450200557708740e-01 -2.3793600499629974e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1995 4.1159498691558838e-01</internalNodes> + <leafValues> + -6.0382001101970673e-02 -1.6072119474411011e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 1996 -4.1595999151468277e-02</internalNodes> + <leafValues> + -3.2756200432777405e-01 1.5058000385761261e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1997 -1.0335999540984631e-02</internalNodes> + <leafValues> + -6.2394398450851440e-01 1.3112000189721584e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 1998 1.2392999604344368e-02</internalNodes> + <leafValues> + -3.3114999532699585e-02 5.5579900741577148e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 1999 -8.7270000949501991e-03</internalNodes> + <leafValues> + 1.9883200526237488e-01 -3.7635600566864014e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2000 1.6295000910758972e-02</internalNodes> + <leafValues> + 2.0373000204563141e-01 -4.2800799012184143e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2001 -1.0483999736607075e-02</internalNodes> + <leafValues> + -5.6847000122070312e-01 4.4199001044034958e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2002 -1.2431999668478966e-02</internalNodes> + <leafValues> + 7.4641901254653931e-01 4.3678998947143555e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2003 -5.0374999642372131e-02</internalNodes> + <leafValues> + 8.5090100765228271e-01 -1.7773799598217010e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2004 4.9548000097274780e-02</internalNodes> + <leafValues> + 1.6784900426864624e-01 -2.9877498745918274e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2005 -4.1085001081228256e-02</internalNodes> + <leafValues> + -1.3302919864654541e+00 -4.9182001501321793e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2006 1.0069999843835831e-03</internalNodes> + <leafValues> + -6.0538999736309052e-02 1.8483200669288635e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2007 -5.0142999738454819e-02</internalNodes> + <leafValues> + 7.6447701454162598e-01 -1.8356999754905701e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2008 -8.7879998609423637e-03</internalNodes> + <leafValues> + 2.2655999660491943e-01 -6.3156999647617340e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2009 -5.0170999020338058e-02</internalNodes> + <leafValues> + -1.5899070501327515e+00 -6.1255000531673431e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2010 1.0216099768877029e-01</internalNodes> + <leafValues> + 1.2071800231933594e-01 -1.4120110273361206e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2011 -1.4372999779880047e-02</internalNodes> + <leafValues> + -1.3116970062255859e+00 -5.1936000585556030e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2012 1.0281999595463276e-02</internalNodes> + <leafValues> + -2.1639999467879534e-03 4.4247201085090637e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2013 -1.1814000084996223e-02</internalNodes> + <leafValues> + 6.5378099679946899e-01 -1.8723699450492859e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2014 7.2114996612071991e-02</internalNodes> + <leafValues> + 7.1846999228000641e-02 8.1496298313140869e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2015 -1.9001999869942665e-02</internalNodes> + <leafValues> + -6.7427200078964233e-01 -4.3200000072829425e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 2016 -4.6990001574158669e-03</internalNodes> + <leafValues> + 3.3311501145362854e-01 5.5794000625610352e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2017 -5.8157000690698624e-02</internalNodes> + <leafValues> + 4.5572298765182495e-01 -2.0305100083351135e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2018 1.1360000353306532e-03</internalNodes> + <leafValues> + -4.4686999171972275e-02 2.2681899368762970e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2019 -4.9414999783039093e-02</internalNodes> + <leafValues> + 2.6694598793983459e-01 -2.6116999983787537e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2020 -1.1913800239562988e-01</internalNodes> + <leafValues> + -8.3017998933792114e-01 1.3248500227928162e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2021 -1.8303999677300453e-02</internalNodes> + <leafValues> + -6.7499202489852905e-01 1.7092000693082809e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2022 -7.9199997708201408e-03</internalNodes> + <leafValues> + -7.2287000715732574e-02 1.4425800740718842e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2023 5.1925998181104660e-02</internalNodes> + <leafValues> + 3.0921999365091324e-02 -5.5860602855682373e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2024 6.6724002361297607e-02</internalNodes> + <leafValues> + 1.3666400313377380e-01 -2.9411000013351440e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2025 -1.3778000138700008e-02</internalNodes> + <leafValues> + -5.9443902969360352e-01 1.5300000086426735e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2026 -1.7760999500751495e-02</internalNodes> + <leafValues> + 4.0496501326560974e-01 -3.3559999428689480e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2027 -4.2234998196363449e-02</internalNodes> + <leafValues> + -1.0897940397262573e+00 -4.0224999189376831e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2028 -1.3524999842047691e-02</internalNodes> + <leafValues> + 2.8921899199485779e-01 -2.5194799900054932e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2029 -1.1106000281870365e-02</internalNodes> + <leafValues> + 6.5312802791595459e-01 -1.8053700029850006e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2030 -1.2284599989652634e-01</internalNodes> + <leafValues> + -1.9570649862289429e+00 1.4815400540828705e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2031 4.7715999186038971e-02</internalNodes> + <leafValues> + -2.2875599563121796e-01 3.4233701229095459e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2032 3.1817000359296799e-02</internalNodes> + <leafValues> + 1.5976299345493317e-01 -1.0091969966888428e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2033 4.2570000514388084e-03</internalNodes> + <leafValues> + -3.8881298899650574e-01 8.4210000932216644e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2034 -6.1372999101877213e-02</internalNodes> + <leafValues> + 1.7152810096740723e+00 5.9324998408555984e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2035 -2.7030000928789377e-03</internalNodes> + <leafValues> + -3.8161700963973999e-01 8.5127003490924835e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2036 -6.8544000387191772e-02</internalNodes> + <leafValues> + -3.0925889015197754e+00 1.1788000166416168e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2037 1.0372500121593475e-01</internalNodes> + <leafValues> + -1.3769300282001495e-01 1.9009410142898560e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2038 1.5799000859260559e-02</internalNodes> + <leafValues> + -6.2660001218318939e-02 2.5917699933052063e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2039 -9.8040001466870308e-03</internalNodes> + <leafValues> + -5.6291598081588745e-01 4.3923001736402512e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2040 -9.0229995548725128e-03</internalNodes> + <leafValues> + 2.5287100672721863e-01 -4.1225999593734741e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2041 -6.3754998147487640e-02</internalNodes> + <leafValues> + -2.6178569793701172e+00 -7.4005998671054840e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2042 3.8954999297857285e-02</internalNodes> + <leafValues> + 5.9032998979091644e-02 8.5945600271224976e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2043 -3.9802998304367065e-02</internalNodes> + <leafValues> + 9.3600499629974365e-01 -1.5639400482177734e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2044 5.0301998853683472e-02</internalNodes> + <leafValues> + 1.3725900650024414e-01 -2.5549728870391846e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2045 4.6250000596046448e-02</internalNodes> + <leafValues> + -1.3964000158011913e-02 -7.1026200056076050e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2046 6.2196001410484314e-02</internalNodes> + <leafValues> + 5.9526000171899796e-02 1.6509100198745728e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2047 -6.4776003360748291e-02</internalNodes> + <leafValues> + 7.1368998289108276e-01 -1.7270000278949738e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2048 2.7522999793291092e-02</internalNodes> + <leafValues> + 1.4631600677967072e-01 -8.1428997218608856e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2049 3.9900001138448715e-04</internalNodes> + <leafValues> + -3.7144500017166138e-01 1.0152699798345566e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2050 -4.3299999088048935e-03</internalNodes> + <leafValues> + -2.3756299912929535e-01 2.6798400282859802e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2051 4.7297000885009766e-02</internalNodes> + <leafValues> + -2.7682000771164894e-02 -8.4910297393798828e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2052 1.2508999556303024e-02</internalNodes> + <leafValues> + 1.8730199337005615e-01 -5.6001102924346924e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2053 4.5899000018835068e-02</internalNodes> + <leafValues> + -1.5601199865341187e-01 9.7073000669479370e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2054 1.9853399693965912e-01</internalNodes> + <leafValues> + 1.4895500242710114e-01 -1.1015529632568359e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2055 1.6674999147653580e-02</internalNodes> + <leafValues> + -1.6615299880504608e-01 8.2210999727249146e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2056 1.9829999655485153e-03</internalNodes> + <leafValues> + -7.1249999105930328e-02 2.8810900449752808e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2057 2.2447999566793442e-02</internalNodes> + <leafValues> + -2.0981000736355782e-02 -7.8416502475738525e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2058 -1.3913000002503395e-02</internalNodes> + <leafValues> + -1.8165799975395203e-01 2.0491799712181091e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2059 -7.7659999951720238e-03</internalNodes> + <leafValues> + -4.5595899224281311e-01 6.3576996326446533e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2060 -1.3209000229835510e-02</internalNodes> + <leafValues> + 2.6632300019264221e-01 -1.7795999348163605e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2061 4.9052998423576355e-02</internalNodes> + <leafValues> + -1.5476800501346588e-01 1.1069979667663574e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2062 2.0263999700546265e-02</internalNodes> + <leafValues> + 6.8915002048015594e-02 6.9867497682571411e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2063 -1.6828000545501709e-02</internalNodes> + <leafValues> + 2.7607199549674988e-01 -2.5139200687408447e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2064 -1.6939499974250793e-01</internalNodes> + <leafValues> + -3.0767529010772705e+00 1.1617500334978104e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2065 -1.1336100101470947e-01</internalNodes> + <leafValues> + -1.4639229774475098e+00 -5.1447000354528427e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2066 -7.7685996890068054e-02</internalNodes> + <leafValues> + 8.8430202007293701e-01 4.3306998908519745e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2067 -1.5568000264465809e-02</internalNodes> + <leafValues> + 1.3672499358654022e-01 -3.4505501389503479e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2068 -6.6018998622894287e-02</internalNodes> + <leafValues> + -1.0300110578536987e+00 1.1601399630308151e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2069 8.3699999377131462e-03</internalNodes> + <leafValues> + 7.6429001986980438e-02 -4.4002500176429749e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2070 3.5402998328208923e-02</internalNodes> + <leafValues> + 1.1979500204324722e-01 -7.2668302059173584e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2071 -3.9051000028848648e-02</internalNodes> + <leafValues> + 6.7375302314758301e-01 -1.8196000158786774e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2072 -9.7899995744228363e-03</internalNodes> + <leafValues> + 2.1264599263668060e-01 3.6756001412868500e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2073 -2.3047000169754028e-02</internalNodes> + <leafValues> + 4.4742199778556824e-01 -2.0986700057983398e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2074 3.1169999856501818e-03</internalNodes> + <leafValues> + 3.7544000893831253e-02 2.7808201313018799e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2075 1.3136000372469425e-02</internalNodes> + <leafValues> + -1.9842399656772614e-01 5.4335701465606689e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2076 1.4782000333070755e-02</internalNodes> + <leafValues> + 1.3530600070953369e-01 -1.1153600364923477e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2077 -6.0139000415802002e-02</internalNodes> + <leafValues> + 8.4039300680160522e-01 -1.6711600124835968e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2078 5.1998998969793320e-02</internalNodes> + <leafValues> + 1.7372000217437744e-01 -7.8547602891921997e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2079 2.4792000651359558e-02</internalNodes> + <leafValues> + -1.7739200592041016e-01 6.6752600669860840e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2080 -1.2014999985694885e-02</internalNodes> + <leafValues> + -1.4263699948787689e-01 1.6070500016212463e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2081 -9.8655998706817627e-02</internalNodes> + <leafValues> + 1.0429769754409790e+00 -1.5770199894905090e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2082 1.1758299916982651e-01</internalNodes> + <leafValues> + 1.0955700278282166e-01 -4.4920377731323242e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2083 -1.8922999501228333e-02</internalNodes> + <leafValues> + -7.8543400764465332e-01 1.2984000146389008e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2084 -2.8390999883413315e-02</internalNodes> + <leafValues> + -6.0569900274276733e-01 1.2903499603271484e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2085 1.3182999566197395e-02</internalNodes> + <leafValues> + -1.4415999874472618e-02 -7.3210501670837402e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2086 -1.1653000116348267e-01</internalNodes> + <leafValues> + -2.0442469120025635e+00 1.4053100347518921e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2087 -3.8880000356584787e-03</internalNodes> + <leafValues> + -4.1861599683761597e-01 7.8704997897148132e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2088 3.1229000538587570e-02</internalNodes> + <leafValues> + 2.4632999673485756e-02 4.1870400309562683e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2089 2.5198999792337418e-02</internalNodes> + <leafValues> + -1.7557799816131592e-01 6.4710599184036255e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2090 -2.8124000877141953e-02</internalNodes> + <leafValues> + -2.2005599737167358e-01 1.4121000468730927e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2091 3.6499001085758209e-02</internalNodes> + <leafValues> + -6.8426996469497681e-02 -2.3410849571228027e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2092 -7.2292998433113098e-02</internalNodes> + <leafValues> + 1.2898750305175781e+00 8.4875002503395081e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2093 -4.1671000421047211e-02</internalNodes> + <leafValues> + -1.1630970239639282e+00 -5.3752999752759933e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2094 4.7703001648187637e-02</internalNodes> + <leafValues> + 7.0101000368595123e-02 7.3676502704620361e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2095 6.5793000161647797e-02</internalNodes> + <leafValues> + -1.7755299806594849e-01 6.9780498743057251e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2096 1.3904999941587448e-02</internalNodes> + <leafValues> + 2.1936799585819244e-01 -2.0390799641609192e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2097 -2.7730999514460564e-02</internalNodes> + <leafValues> + 6.1867898702621460e-01 -1.7804099619388580e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2098 -1.5879999846220016e-02</internalNodes> + <leafValues> + -4.6484100818634033e-01 1.8828600645065308e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2099 7.4128001928329468e-02</internalNodes> + <leafValues> + -1.2858100235462189e-01 3.2792479991912842e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2100 -8.9000002481043339e-04</internalNodes> + <leafValues> + -3.0117601156234741e-01 2.3818799853324890e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2101 1.7965000122785568e-02</internalNodes> + <leafValues> + -2.2284999489784241e-01 2.9954001307487488e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2102 -2.5380000006407499e-03</internalNodes> + <leafValues> + 2.5064399838447571e-01 -1.3665600121021271e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2103 -9.0680001303553581e-03</internalNodes> + <leafValues> + 2.9017499089241028e-01 -2.8929701447486877e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2104 4.9169998615980148e-02</internalNodes> + <leafValues> + 1.9156399369239807e-01 -6.8328702449798584e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2105 -3.0680999159812927e-02</internalNodes> + <leafValues> + -7.5677001476287842e-01 -1.3279999606311321e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2106 1.0017400234937668e-01</internalNodes> + <leafValues> + 8.4453999996185303e-02 1.0888710021972656e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2107 3.1950001139193773e-03</internalNodes> + <leafValues> + -2.6919400691986084e-01 1.9537900388240814e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2108 3.5503000020980835e-02</internalNodes> + <leafValues> + 1.3632300496101379e-01 -5.6917202472686768e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2109 4.5900000259280205e-04</internalNodes> + <leafValues> + -4.0443998575210571e-01 1.4074799418449402e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2110 2.5258999317884445e-02</internalNodes> + <leafValues> + 1.6243200004100800e-01 -5.5741798877716064e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2111 -5.1549999043345451e-03</internalNodes> + <leafValues> + 3.1132599711418152e-01 -2.2756099700927734e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2112 1.5869999770075083e-03</internalNodes> + <leafValues> + -2.6867699623107910e-01 1.9565400481224060e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2113 -1.6204999759793282e-02</internalNodes> + <leafValues> + 1.5486499667167664e-01 -3.4057798981666565e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2114 -2.9624000191688538e-02</internalNodes> + <leafValues> + 1.1466799974441528e+00 9.0557999908924103e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2115 -1.5930000226944685e-03</internalNodes> + <leafValues> + -7.1257501840591431e-01 -7.0400000549852848e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 2116 -5.4019000381231308e-02</internalNodes> + <leafValues> + 4.1537499427795410e-01 2.7246000245213509e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2117 -6.6211000084877014e-02</internalNodes> + <leafValues> + -1.3340090513229370e+00 -4.7352999448776245e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2118 2.7940999716520309e-02</internalNodes> + <leafValues> + 1.4446300268173218e-01 -5.1518398523330688e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2119 2.8957000002264977e-02</internalNodes> + <leafValues> + -4.9966000020503998e-02 -1.1929039955139160e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2120 -2.0424999296665192e-02</internalNodes> + <leafValues> + 6.3881301879882812e-01 3.8141001015901566e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2121 1.2416999787092209e-02</internalNodes> + <leafValues> + -2.1547000110149384e-01 4.9477699398994446e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>181</maxWeakCount> + <stageThreshold>-3.3196411132812500e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 2122 4.3274000287055969e-02</internalNodes> + <leafValues> + -8.0494397878646851e-01 3.9897298812866211e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2123 1.8615500628948212e-01</internalNodes> + <leafValues> + -3.1655299663543701e-01 6.8877297639846802e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2124 3.1860999763011932e-02</internalNodes> + <leafValues> + -6.4266198873519897e-01 2.5550898909568787e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2125 1.4022000133991241e-02</internalNodes> + <leafValues> + -4.5926600694656372e-01 3.1171199679374695e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2126 -6.3029997982084751e-03</internalNodes> + <leafValues> + 4.6026900410652161e-01 -2.7438500523567200e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2127 -5.4310001432895660e-03</internalNodes> + <leafValues> + 3.6608600616455078e-01 -2.7205801010131836e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2128 1.6822999343276024e-02</internalNodes> + <leafValues> + 2.3476999253034592e-02 -8.8443797826766968e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2129 2.6039000600576401e-02</internalNodes> + <leafValues> + 1.7488799989223480e-01 -5.4564702510833740e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2130 -2.6720000430941582e-02</internalNodes> + <leafValues> + -9.6396499872207642e-01 2.3524999618530273e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2131 -1.7041999846696854e-02</internalNodes> + <leafValues> + -7.0848798751831055e-01 2.1468099951744080e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2132 5.9569999575614929e-03</internalNodes> + <leafValues> + 7.3601000010967255e-02 -6.8225598335266113e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2133 -2.8679999522864819e-03</internalNodes> + <leafValues> + -7.4935001134872437e-01 2.3803399503231049e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2134 -4.3774999678134918e-02</internalNodes> + <leafValues> + 6.8323302268981934e-01 -2.1380299329757690e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2135 5.1633000373840332e-02</internalNodes> + <leafValues> + -1.2566499412059784e-01 6.7523801326751709e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2136 8.1780003383755684e-03</internalNodes> + <leafValues> + 7.0689998567104340e-02 -8.0665898323059082e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2137 -5.2841998636722565e-02</internalNodes> + <leafValues> + 9.5433902740478516e-01 1.6548000276088715e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2138 5.2583999931812286e-02</internalNodes> + <leafValues> + -2.8414401412010193e-01 4.7129800915718079e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2139 -1.2659000232815742e-02</internalNodes> + <leafValues> + 3.8445401191711426e-01 -6.2288001179695129e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2140 1.1694000102579594e-02</internalNodes> + <leafValues> + 5.6000000768108293e-05 -1.0173139572143555e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2141 -2.3918999359011650e-02</internalNodes> + <leafValues> + 8.4921300411224365e-01 5.7399999350309372e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2142 -6.1673998832702637e-02</internalNodes> + <leafValues> + -9.2571401596069336e-01 -1.7679999582469463e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2143 -1.8279999494552612e-03</internalNodes> + <leafValues> + -5.4372298717498779e-01 2.4932399392127991e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2144 3.5257998853921890e-02</internalNodes> + <leafValues> + -7.3719997890293598e-03 -9.3963998556137085e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2145 -1.8438000231981277e-02</internalNodes> + <leafValues> + 7.2136700153350830e-01 1.0491999797523022e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2146 -3.8389001041650772e-02</internalNodes> + <leafValues> + 1.9272600114345551e-01 -3.5832101106643677e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2147 9.9720999598503113e-02</internalNodes> + <leafValues> + 1.1354199796915054e-01 -1.6304190158843994e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2148 8.4462001919746399e-02</internalNodes> + <leafValues> + -5.3420998156070709e-02 -1.6981120109558105e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2149 4.0270000696182251e-02</internalNodes> + <leafValues> + -1.0783199965953827e-01 5.1926600933074951e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2150 5.8935999870300293e-02</internalNodes> + <leafValues> + -1.8053700029850006e-01 9.5119798183441162e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2151 1.4957000315189362e-01</internalNodes> + <leafValues> + 1.6785299777984619e-01 -1.1591869592666626e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2152 6.9399998756125569e-04</internalNodes> + <leafValues> + 2.0491400361061096e-01 -3.3118200302124023e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2153 -3.3369001001119614e-02</internalNodes> + <leafValues> + 9.3468099832534790e-01 -2.9639999847859144e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2154 9.3759996816515923e-03</internalNodes> + <leafValues> + 3.7000000011175871e-03 -7.7549797296524048e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2155 4.3193999677896500e-02</internalNodes> + <leafValues> + -2.2040000185370445e-03 7.4589699506759644e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2156 -6.7555002868175507e-02</internalNodes> + <leafValues> + 7.2292101383209229e-01 -1.8404200673103333e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2157 -3.1168600916862488e-01</internalNodes> + <leafValues> + 1.0014270544052124e+00 3.4003000706434250e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2158 2.9743999242782593e-02</internalNodes> + <leafValues> + -4.6356000006198883e-02 -1.2781809568405151e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2159 1.0737000033259392e-02</internalNodes> + <leafValues> + 1.4812000095844269e-02 6.6649997234344482e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2160 -2.8841000050306320e-02</internalNodes> + <leafValues> + -9.4222599267959595e-01 -2.0796999335289001e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2161 -5.7649998925626278e-03</internalNodes> + <leafValues> + -4.3541899323463440e-01 2.3386000096797943e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2162 2.8410999104380608e-02</internalNodes> + <leafValues> + -1.7615799605846405e-01 8.5765302181243896e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2163 -2.9007999226450920e-02</internalNodes> + <leafValues> + 5.7978099584579468e-01 2.8565999120473862e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2164 2.4965999647974968e-02</internalNodes> + <leafValues> + -2.2729000076651573e-02 -9.6773099899291992e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2165 1.2036000378429890e-02</internalNodes> + <leafValues> + -1.4214700460433960e-01 5.1687997579574585e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2166 -4.2514000087976456e-02</internalNodes> + <leafValues> + 9.7273802757263184e-01 -1.8119800090789795e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2167 1.0276000015437603e-02</internalNodes> + <leafValues> + -8.3099998533725739e-02 3.1762799620628357e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2168 -6.9191999733448029e-02</internalNodes> + <leafValues> + -2.0668580532073975e+00 -6.0173999518156052e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2169 -4.6769999898970127e-03</internalNodes> + <leafValues> + 4.4131800532341003e-01 2.3209000006318092e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2170 -1.3923999853432178e-02</internalNodes> + <leafValues> + 2.8606700897216797e-01 -2.9152700304985046e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2171 -1.5333999879658222e-02</internalNodes> + <leafValues> + -5.7414501905441284e-01 2.3063300549983978e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2172 -1.0239000432193279e-02</internalNodes> + <leafValues> + 3.4479200839996338e-01 -2.6080399751663208e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2173 -5.0988998264074326e-02</internalNodes> + <leafValues> + 5.6154102087020874e-01 6.1218999326229095e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2174 3.0689999461174011e-02</internalNodes> + <leafValues> + -1.4772799611091614e-01 1.6378489732742310e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2175 -1.1223999783396721e-02</internalNodes> + <leafValues> + 2.4006199836730957e-01 -4.4864898920059204e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2176 -6.2899999320507050e-03</internalNodes> + <leafValues> + 4.3119499087333679e-01 -2.3808999359607697e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2177 7.8590996563434601e-02</internalNodes> + <leafValues> + 1.9865000620484352e-02 8.0853801965713501e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2178 -1.0178999975323677e-02</internalNodes> + <leafValues> + 1.8193200230598450e-01 -3.2877799868583679e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2179 3.1227000057697296e-02</internalNodes> + <leafValues> + 1.4973899722099304e-01 -1.4180339574813843e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2180 4.0196999907493591e-02</internalNodes> + <leafValues> + -1.9760499894618988e-01 5.8508199453353882e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2181 1.6138000413775444e-02</internalNodes> + <leafValues> + 5.0000002374872565e-04 3.9050000905990601e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2182 -4.5519001781940460e-02</internalNodes> + <leafValues> + 1.2646820545196533e+00 -1.5632599592208862e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2183 -1.8130000680685043e-02</internalNodes> + <leafValues> + 6.5148502588272095e-01 1.0235999710857868e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2184 -1.4001999981701374e-02</internalNodes> + <leafValues> + -1.0344820022583008e+00 -3.2182998955249786e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2185 -3.8816001266241074e-02</internalNodes> + <leafValues> + -4.7874298691749573e-01 1.6290700435638428e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2186 3.1656000763177872e-02</internalNodes> + <leafValues> + -2.0983399450778961e-01 5.4575902223587036e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2187 -1.0839999653398991e-02</internalNodes> + <leafValues> + 5.1898801326751709e-01 -1.5080000273883343e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2188 1.2032999657094479e-02</internalNodes> + <leafValues> + -2.1107600629329681e-01 7.5937002897262573e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2189 7.0772998034954071e-02</internalNodes> + <leafValues> + 1.8048800528049469e-01 -7.4048501253128052e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2190 5.3139799833297729e-01</internalNodes> + <leafValues> + -1.4491699635982513e-01 1.5360039472579956e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2191 -1.4774000272154808e-02</internalNodes> + <leafValues> + -2.8153699636459351e-01 2.0407299697399139e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2192 -2.2410000674426556e-03</internalNodes> + <leafValues> + -4.4876301288604736e-01 5.3989000618457794e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2193 4.9968000501394272e-02</internalNodes> + <leafValues> + 4.1514001786708832e-02 2.9417100548744202e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2194 -4.7701999545097351e-02</internalNodes> + <leafValues> + 3.9674299955368042e-01 -2.8301799297332764e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2195 -9.1311000287532806e-02</internalNodes> + <leafValues> + 2.1994259357452393e+00 8.7964996695518494e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2196 3.8070000708103180e-02</internalNodes> + <leafValues> + -2.8025600314140320e-01 2.5156199932098389e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2197 -1.5538999810814857e-02</internalNodes> + <leafValues> + 3.4157499670982361e-01 1.7924999818205833e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2198 -1.5445999801158905e-02</internalNodes> + <leafValues> + 2.8680199384689331e-01 -2.5135898590087891e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2199 -5.7388000190258026e-02</internalNodes> + <leafValues> + 6.3830000162124634e-01 8.8597998023033142e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2200 -5.9440000914037228e-03</internalNodes> + <leafValues> + 7.9016998410224915e-02 -4.0774899721145630e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2201 -6.9968998432159424e-02</internalNodes> + <leafValues> + -4.4644200801849365e-01 1.7219600081443787e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2202 -2.5064999237656593e-02</internalNodes> + <leafValues> + -9.8270201683044434e-01 -3.5388000309467316e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2203 1.7216000705957413e-02</internalNodes> + <leafValues> + 2.2705900669097900e-01 -8.0550098419189453e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2204 -4.4279001653194427e-02</internalNodes> + <leafValues> + 8.3951997756958008e-01 -1.7429600656032562e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2205 4.3988998979330063e-02</internalNodes> + <leafValues> + 1.1557199805974960e-01 -1.9666889905929565e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2206 1.5907000750303268e-02</internalNodes> + <leafValues> + -3.7576001137495041e-02 -1.0311100482940674e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2207 -9.2754997313022614e-02</internalNodes> + <leafValues> + -1.3530019521713257e+00 1.2141299992799759e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2208 7.1037001907825470e-02</internalNodes> + <leafValues> + -1.7684300243854523e-01 7.4485200643539429e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2209 5.7762000709772110e-02</internalNodes> + <leafValues> + 1.2835599482059479e-01 -4.4444200396537781e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2210 -1.6432000324130058e-02</internalNodes> + <leafValues> + 8.0152702331542969e-01 -1.7491699755191803e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2211 2.3939000442624092e-02</internalNodes> + <leafValues> + 1.6144999861717224e-01 -1.2364500015974045e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2212 1.2636000290513039e-02</internalNodes> + <leafValues> + 1.5411999821662903e-01 -3.3293798565864563e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2213 -5.4347999393939972e-02</internalNodes> + <leafValues> + -1.8400700092315674e+00 1.4835999906063080e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2214 -1.3261999934911728e-02</internalNodes> + <leafValues> + -8.0838799476623535e-01 -2.7726000174880028e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2215 6.1340001411736012e-03</internalNodes> + <leafValues> + -1.3785000145435333e-01 3.2858499884605408e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2216 2.8991000726819038e-02</internalNodes> + <leafValues> + -2.5516999885439873e-02 -8.3387202024459839e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2217 -2.1986000239849091e-02</internalNodes> + <leafValues> + -7.3739999532699585e-01 1.7887100577354431e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2218 5.3269998170435429e-03</internalNodes> + <leafValues> + -4.5449298620223999e-01 6.8791002035140991e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2219 8.6047999560832977e-02</internalNodes> + <leafValues> + 2.1008500456809998e-01 -3.7808901071548462e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2220 -8.5549997165799141e-03</internalNodes> + <leafValues> + 4.0134999155998230e-01 -2.1074099838733673e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2221 6.7790001630783081e-03</internalNodes> + <leafValues> + -2.1648999303579330e-02 4.5421499013900757e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2222 -6.3959998078644276e-03</internalNodes> + <leafValues> + -4.9818599224090576e-01 7.5907997786998749e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2223 8.9469999074935913e-03</internalNodes> + <leafValues> + 1.7857700586318970e-01 -2.8454899787902832e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2224 3.2589999027550220e-03</internalNodes> + <leafValues> + 4.6624999493360519e-02 -5.5206298828125000e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2225 4.1476998478174210e-02</internalNodes> + <leafValues> + 1.7550499737262726e-01 -2.0703999698162079e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2226 -6.7449999041855335e-03</internalNodes> + <leafValues> + -4.6392598748207092e-01 6.9303996860980988e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2227 3.0564999207854271e-02</internalNodes> + <leafValues> + 5.1734998822212219e-02 7.5550502538681030e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2228 -7.4780001305043697e-03</internalNodes> + <leafValues> + 1.4893899857997894e-01 -3.1906801462173462e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2229 8.9088998734951019e-02</internalNodes> + <leafValues> + 1.3738800585269928e-01 -1.1379710435867310e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2230 7.3230001144111156e-03</internalNodes> + <leafValues> + -2.8829199075698853e-01 1.9088600575923920e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2231 -1.8205000087618828e-02</internalNodes> + <leafValues> + -3.0178600549697876e-01 1.6795800626277924e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2232 -2.5828000158071518e-02</internalNodes> + <leafValues> + -9.8137998580932617e-01 -1.9860999658703804e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2233 1.0936199873685837e-01</internalNodes> + <leafValues> + 4.8790000379085541e-02 5.3118300437927246e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2234 -1.1424999684095383e-02</internalNodes> + <leafValues> + 2.3705999553203583e-01 -2.7925300598144531e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2235 -5.7565998286008835e-02</internalNodes> + <leafValues> + 4.7255399823188782e-01 6.5171003341674805e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2236 1.0278300195932388e-01</internalNodes> + <leafValues> + -2.0765100419521332e-01 5.0947701930999756e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2237 2.7041999623179436e-02</internalNodes> + <leafValues> + 1.6421200335025787e-01 -1.4508620500564575e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2238 -1.3635000213980675e-02</internalNodes> + <leafValues> + -5.6543898582458496e-01 2.3788999766111374e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2239 -3.2158198952674866e-01</internalNodes> + <leafValues> + -3.5602829456329346e+00 1.1801300197839737e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2240 2.0458100736141205e-01</internalNodes> + <leafValues> + -3.7016000598669052e-02 -1.0225499868392944e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2241 -7.0347003638744354e-02</internalNodes> + <leafValues> + -5.6491899490356445e-01 1.8525199592113495e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2242 3.7831000983715057e-02</internalNodes> + <leafValues> + -2.9901999980211258e-02 -8.2921499013900757e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2243 -7.0298001170158386e-02</internalNodes> + <leafValues> + -5.3172302246093750e-01 1.4430199563503265e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2244 6.3221000134944916e-02</internalNodes> + <leafValues> + -2.2041200101375580e-01 4.7952198982238770e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2245 3.6393001675605774e-02</internalNodes> + <leafValues> + 1.4222699403762817e-01 -6.1193901300430298e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2246 4.0099998004734516e-03</internalNodes> + <leafValues> + -3.4560799598693848e-01 1.1738699674606323e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2247 -4.9106001853942871e-02</internalNodes> + <leafValues> + 9.5984101295471191e-01 6.4934998750686646e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2248 -7.1583002805709839e-02</internalNodes> + <leafValues> + 1.7385669946670532e+00 -1.4252899587154388e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2249 -3.8008999079465866e-02</internalNodes> + <leafValues> + 1.3872820138931274e+00 6.6188000142574310e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2250 -3.1570000573992729e-03</internalNodes> + <leafValues> + 5.3677000105381012e-02 -5.4048001766204834e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2251 1.9458999857306480e-02</internalNodes> + <leafValues> + -9.3620002269744873e-02 3.9131000638008118e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2252 1.1293999850749969e-02</internalNodes> + <leafValues> + 3.7223998457193375e-02 -5.4251801967620850e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2253 -3.3495001494884491e-02</internalNodes> + <leafValues> + 9.5307898521423340e-01 3.7696998566389084e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2254 9.2035003006458282e-02</internalNodes> + <leafValues> + -1.3488399982452393e-01 2.2897069454193115e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2255 3.7529999390244484e-03</internalNodes> + <leafValues> + 2.2824199497699738e-01 -5.9983700513839722e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2256 1.2848000042140484e-02</internalNodes> + <leafValues> + -2.2005200386047363e-01 3.7221899628639221e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2257 -1.4316199719905853e-01</internalNodes> + <leafValues> + 1.2855789661407471e+00 4.7237001359462738e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2258 -9.6879996359348297e-02</internalNodes> + <leafValues> + -3.9550929069519043e+00 -7.2903998196125031e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2259 -8.8459998369216919e-03</internalNodes> + <leafValues> + 3.7674999237060547e-01 -4.6484000980854034e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2260 1.5900000929832458e-02</internalNodes> + <leafValues> + -2.4457000195980072e-02 -8.0034798383712769e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2261 7.0372000336647034e-02</internalNodes> + <leafValues> + 1.7019000649452209e-01 -6.3068997859954834e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2262 -3.7953998893499374e-02</internalNodes> + <leafValues> + -9.3667197227478027e-01 -4.1214000433683395e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2263 5.1597899198532104e-01</internalNodes> + <leafValues> + 1.3080599904060364e-01 -1.5802290439605713e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2264 -3.2843001186847687e-02</internalNodes> + <leafValues> + -1.1441620588302612e+00 -4.9173999577760696e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2265 -3.6357000470161438e-02</internalNodes> + <leafValues> + 4.9606400728225708e-01 -3.4458998590707779e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2266 6.8080001510679722e-03</internalNodes> + <leafValues> + -3.0997800827026367e-01 1.7054800689220428e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2267 -1.6114000231027603e-02</internalNodes> + <leafValues> + -3.7904599308967590e-01 1.6078999638557434e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2268 8.4530003368854523e-03</internalNodes> + <leafValues> + -1.8655499815940857e-01 5.6367701292037964e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2269 -1.3752399384975433e-01</internalNodes> + <leafValues> + -5.8989900350570679e-01 1.1749500036239624e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2270 1.7688000202178955e-01</internalNodes> + <leafValues> + -1.5424899756908417e-01 9.2911100387573242e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2271 7.9309996217489243e-03</internalNodes> + <leafValues> + 3.2190701365470886e-01 -1.6392600536346436e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2272 1.0971800237894058e-01</internalNodes> + <leafValues> + -1.5876500308513641e-01 1.0186259746551514e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2273 -3.0293000862002373e-02</internalNodes> + <leafValues> + 7.5587302446365356e-01 3.1794998794794083e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2274 -2.3118000477552414e-02</internalNodes> + <leafValues> + -8.8451498746871948e-01 -9.5039997249841690e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2275 -3.0900000128895044e-03</internalNodes> + <leafValues> + 2.3838299512863159e-01 -1.1606200039386749e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2276 -3.3392000943422318e-02</internalNodes> + <leafValues> + -1.8738139867782593e+00 -6.8502999842166901e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2277 1.3190000317990780e-02</internalNodes> + <leafValues> + 1.2919899821281433e-01 -6.7512202262878418e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2278 1.4661000110208988e-02</internalNodes> + <leafValues> + -2.4829000234603882e-02 -7.4396800994873047e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2279 -1.3248000293970108e-02</internalNodes> + <leafValues> + 4.6820199489593506e-01 -2.4165000766515732e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2280 -1.6218999400734901e-02</internalNodes> + <leafValues> + 4.0083798766136169e-01 -2.1255700290203094e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2281 -2.9052000492811203e-02</internalNodes> + <leafValues> + -1.5650019645690918e+00 1.4375899732112885e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2282 -1.0153199732303619e-01</internalNodes> + <leafValues> + -1.9220689535140991e+00 -6.9559998810291290e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2283 3.7753999233245850e-02</internalNodes> + <leafValues> + 1.3396799564361572e-01 -2.2639141082763672e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2284 -2.8555598855018616e-01</internalNodes> + <leafValues> + 1.0215270519256592e+00 -1.5232199430465698e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2285 1.5360699594020844e-01</internalNodes> + <leafValues> + -9.7409002482891083e-02 4.1662400960922241e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2286 -2.1199999901000410e-04</internalNodes> + <leafValues> + 1.1271899938583374e-01 -4.1653999686241150e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2287 -2.0597999915480614e-02</internalNodes> + <leafValues> + 6.0540497303009033e-01 6.2467999756336212e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2288 3.7353999912738800e-02</internalNodes> + <leafValues> + -1.8919000029563904e-01 4.6464699506759644e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2289 5.7275000959634781e-02</internalNodes> + <leafValues> + 1.1565300077199936e-01 -1.3213009834289551e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2290 5.1029999740421772e-03</internalNodes> + <leafValues> + -2.8061500191688538e-01 1.9313399493694305e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2291 -5.4644998162984848e-02</internalNodes> + <leafValues> + 7.2428500652313232e-01 7.5447998940944672e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2292 2.5349000468850136e-02</internalNodes> + <leafValues> + -1.9481800496578217e-01 4.6032801270484924e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2293 2.4311000481247902e-02</internalNodes> + <leafValues> + 1.5564100444316864e-01 -4.9913901090621948e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2294 3.5962000489234924e-02</internalNodes> + <leafValues> + -5.8573000133037567e-02 -1.5418399572372437e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2295 -1.0000699758529663e-01</internalNodes> + <leafValues> + -1.6100039482116699e+00 1.1450500041246414e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2296 8.4435999393463135e-02</internalNodes> + <leafValues> + -6.1406999826431274e-02 -1.4673349857330322e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2297 1.5947999432682991e-02</internalNodes> + <leafValues> + 1.6287900507450104e-01 -1.1026400327682495e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2298 3.3824000507593155e-02</internalNodes> + <leafValues> + -1.7932699620723724e-01 5.7218402624130249e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2299 -6.1996001750230789e-02</internalNodes> + <leafValues> + 4.6511812210083008e+00 9.4534002244472504e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2300 6.9876998662948608e-02</internalNodes> + <leafValues> + -1.6985900700092316e-01 8.7028998136520386e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2301 -2.7916999533772469e-02</internalNodes> + <leafValues> + 9.1042500734329224e-01 5.6827001273632050e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2302 -1.2764000333845615e-02</internalNodes> + <leafValues> + 2.2066700458526611e-01 -2.7769100666046143e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>199</maxWeakCount> + <stageThreshold>-3.2573320865631104e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 2303 2.1662000566720963e-02</internalNodes> + <leafValues> + -8.9868897199630737e-01 2.9436299204826355e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2304 1.0044500231742859e-01</internalNodes> + <leafValues> + -3.7659201025962830e-01 6.0891002416610718e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2305 2.6003999635577202e-02</internalNodes> + <leafValues> + -3.8128501176834106e-01 3.9217400550842285e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2306 2.8441000729799271e-02</internalNodes> + <leafValues> + -1.8182300031185150e-01 5.8927202224731445e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2307 3.8612000644207001e-02</internalNodes> + <leafValues> + -2.2399599850177765e-01 6.3779997825622559e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2308 -4.6594999730587006e-02</internalNodes> + <leafValues> + 7.0812201499938965e-01 -1.4666199684143066e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2309 -4.2791999876499176e-02</internalNodes> + <leafValues> + 4.7680398821830750e-01 -2.9233199357986450e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2310 3.7960000336170197e-03</internalNodes> + <leafValues> + -1.8510299921035767e-01 5.2626699209213257e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2311 4.2348999530076981e-02</internalNodes> + <leafValues> + 3.9244998246431351e-02 -8.9197701215744019e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2312 1.9598999992012978e-02</internalNodes> + <leafValues> + -2.3358400166034698e-01 4.4146499037742615e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2313 8.7400001939386129e-04</internalNodes> + <leafValues> + -4.6063598990440369e-01 1.7689600586891174e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2314 -4.3629999272525311e-03</internalNodes> + <leafValues> + 3.3493199944496155e-01 -2.9893401265144348e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2315 1.6973000019788742e-02</internalNodes> + <leafValues> + -1.6408699750900269e-01 1.5993679761886597e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2316 3.6063998937606812e-02</internalNodes> + <leafValues> + 2.2601699829101562e-01 -5.3186100721359253e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2317 -7.0864997804164886e-02</internalNodes> + <leafValues> + 1.5220500528812408e-01 -4.1914600133895874e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2318 -6.3075996935367584e-02</internalNodes> + <leafValues> + -1.4874019622802734e+00 1.2953700125217438e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2319 2.9670000076293945e-02</internalNodes> + <leafValues> + -1.9145900011062622e-01 9.8184901475906372e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2320 3.7873998284339905e-02</internalNodes> + <leafValues> + 1.3459500670433044e-01 -5.6316298246383667e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2321 -3.3289000391960144e-02</internalNodes> + <leafValues> + -1.0828030109405518e+00 -1.1504000052809715e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2322 -3.1608998775482178e-02</internalNodes> + <leafValues> + -5.9224498271942139e-01 1.3394799828529358e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2323 1.0740000288933516e-03</internalNodes> + <leafValues> + -4.9185800552368164e-01 9.4446003437042236e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2324 -7.1556001901626587e-02</internalNodes> + <leafValues> + 5.9710198640823364e-01 -3.9553001523017883e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2325 -8.1170000135898590e-02</internalNodes> + <leafValues> + -1.1817820072174072e+00 -2.8254000470042229e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2326 4.4860001653432846e-03</internalNodes> + <leafValues> + -6.1028099060058594e-01 2.2619099915027618e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2327 -4.2176000773906708e-02</internalNodes> + <leafValues> + -1.1435619592666626e+00 -2.9001999646425247e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2328 -6.5640002489089966e-02</internalNodes> + <leafValues> + -1.6470279693603516e+00 1.2810300290584564e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2329 1.8188999965786934e-02</internalNodes> + <leafValues> + -3.1149399280548096e-01 2.5739601254463196e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2330 -5.1520001143217087e-02</internalNodes> + <leafValues> + -6.9206899404525757e-01 1.5270799398422241e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2331 -4.7150999307632446e-02</internalNodes> + <leafValues> + -7.1868300437927246e-01 2.6879999786615372e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2332 1.7488999292254448e-02</internalNodes> + <leafValues> + 2.2371199727058411e-01 -5.5381798744201660e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2333 -2.5264000520110130e-02</internalNodes> + <leafValues> + 1.0319819450378418e+00 -1.7496499419212341e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2334 -4.0745001286268234e-02</internalNodes> + <leafValues> + 4.4961598515510559e-01 3.9349000900983810e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2335 -3.7666998803615570e-02</internalNodes> + <leafValues> + -8.5475701093673706e-01 -1.2463999912142754e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2336 -1.3411000370979309e-02</internalNodes> + <leafValues> + 5.7845598459243774e-01 -1.7467999830842018e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2337 -7.8999997640494257e-05</internalNodes> + <leafValues> + -3.7749201059341431e-01 1.3961799442768097e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2338 -1.1415000073611736e-02</internalNodes> + <leafValues> + -2.6186600327491760e-01 2.3712499439716339e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2339 3.7200000137090683e-02</internalNodes> + <leafValues> + -2.8626000508666039e-02 -1.2945239543914795e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2340 3.4050000831484795e-03</internalNodes> + <leafValues> + 2.0531399548053741e-01 -1.8747499585151672e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2341 -2.2483000531792641e-02</internalNodes> + <leafValues> + 6.7027199268341064e-01 -1.9594000279903412e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2342 2.3274999111890793e-02</internalNodes> + <leafValues> + 1.7405399680137634e-01 -3.2746300101280212e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2343 -1.3917000032961369e-02</internalNodes> + <leafValues> + -8.3954298496246338e-01 -6.3760001212358475e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2344 7.5429999269545078e-03</internalNodes> + <leafValues> + -3.4194998443126678e-02 5.8998197317123413e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2345 -1.1539000086486340e-02</internalNodes> + <leafValues> + 4.2142799496650696e-01 -2.3510499298572540e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2346 5.2501998841762543e-02</internalNodes> + <leafValues> + 6.9303996860980988e-02 7.3226499557495117e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2347 5.2715998142957687e-02</internalNodes> + <leafValues> + -1.5688100457191467e-01 1.0907289981842041e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2348 -1.1726000346243382e-02</internalNodes> + <leafValues> + -7.0934301614761353e-01 1.6828800737857819e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2349 9.5945999026298523e-02</internalNodes> + <leafValues> + -1.6192899644374847e-01 1.0072519779205322e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2350 -1.5871999785304070e-02</internalNodes> + <leafValues> + 3.9008399844169617e-01 -5.3777001798152924e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2351 3.4818001091480255e-02</internalNodes> + <leafValues> + 1.7179999500513077e-02 -9.3941801786422729e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2352 3.4791998565196991e-02</internalNodes> + <leafValues> + 5.0462998449802399e-02 5.4465699195861816e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2353 1.6284000128507614e-02</internalNodes> + <leafValues> + -2.6981300115585327e-01 4.0365299582481384e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2354 -4.4319000095129013e-02</internalNodes> + <leafValues> + 8.4399998188018799e-01 3.2882999628782272e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2355 -5.5689997971057892e-03</internalNodes> + <leafValues> + 1.5309399366378784e-01 -3.4959799051284790e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2356 -6.5842002630233765e-02</internalNodes> + <leafValues> + -9.2711198329925537e-01 1.6800999641418457e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2357 -7.3337003588676453e-02</internalNodes> + <leafValues> + 5.1614499092102051e-01 -2.0236000418663025e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2358 1.6450000926852226e-02</internalNodes> + <leafValues> + 1.3950599730014801e-01 -4.9301299452781677e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2359 -9.2630004510283470e-03</internalNodes> + <leafValues> + -9.0101999044418335e-01 -1.6116000711917877e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2360 5.9139998629689217e-03</internalNodes> + <leafValues> + 1.9858199357986450e-01 -1.6731299459934235e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2361 -8.4699998842552304e-04</internalNodes> + <leafValues> + 9.4005003571510315e-02 -4.1570898890495300e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2362 2.0532900094985962e-01</internalNodes> + <leafValues> + -6.0022000223398209e-02 7.0993602275848389e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2363 -1.6883000731468201e-02</internalNodes> + <leafValues> + 2.4392199516296387e-01 -3.0551800131797791e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2364 -1.9111000001430511e-02</internalNodes> + <leafValues> + 6.1229902505874634e-01 2.4252999573945999e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2365 -2.5962999090552330e-02</internalNodes> + <leafValues> + 9.0764999389648438e-01 -1.6722099483013153e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2366 -2.1762000396847725e-02</internalNodes> + <leafValues> + -3.1384700536727905e-01 2.0134599506855011e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2367 -2.4119999259710312e-02</internalNodes> + <leafValues> + -6.6588401794433594e-01 7.4559999629855156e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2368 4.7129999846220016e-02</internalNodes> + <leafValues> + 5.9533998370170593e-02 8.7804502248764038e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2369 -4.5984998345375061e-02</internalNodes> + <leafValues> + 8.0067998170852661e-01 -1.7252300679683685e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2370 2.6507999747991562e-02</internalNodes> + <leafValues> + 1.8774099647998810e-01 -6.0850602388381958e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2371 -4.8615001142024994e-02</internalNodes> + <leafValues> + 5.8644098043441772e-01 -1.9427700340747833e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2372 -1.8562000244855881e-02</internalNodes> + <leafValues> + -2.5587901473045349e-01 1.6326199471950531e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2373 1.2678000144660473e-02</internalNodes> + <leafValues> + -1.4228000305593014e-02 -7.6738101243972778e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2374 -1.1919999960809946e-03</internalNodes> + <leafValues> + 2.0495000481605530e-01 -1.1404299736022949e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2375 -4.9088999629020691e-02</internalNodes> + <leafValues> + -1.0740849971771240e+00 -3.8940999656915665e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2376 -1.7436999827623367e-02</internalNodes> + <leafValues> + -5.7973802089691162e-01 1.8584500253200531e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2377 -1.4770000241696835e-02</internalNodes> + <leafValues> + -6.6150301694869995e-01 5.3119999356567860e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2378 -2.2905200719833374e-01</internalNodes> + <leafValues> + -4.8305100202560425e-01 1.2326399981975555e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2379 -1.2707099318504333e-01</internalNodes> + <leafValues> + 5.7452601194381714e-01 -1.9420400261878967e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2380 1.0339000262320042e-02</internalNodes> + <leafValues> + -5.4641999304294586e-02 2.4501800537109375e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2381 6.9010001607239246e-03</internalNodes> + <leafValues> + 1.2180600315332413e-01 -3.8797399401664734e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2382 2.9025399684906006e-01</internalNodes> + <leafValues> + 1.0966199636459351e-01 -30.</leafValues></_> + <_> + <internalNodes> + 0 -1 2383 -2.3804999887943268e-01</internalNodes> + <leafValues> + -1.7352679967880249e+00 -6.3809998333454132e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2384 6.2481001019477844e-02</internalNodes> + <leafValues> + 1.3523000478744507e-01 -7.0301097631454468e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2385 4.7109997831285000e-03</internalNodes> + <leafValues> + -4.6984100341796875e-01 6.0341998934745789e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2386 -2.7815999463200569e-02</internalNodes> + <leafValues> + 6.9807600975036621e-01 1.3719999697059393e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2387 -1.7020000144839287e-02</internalNodes> + <leafValues> + 1.6870440244674683e+00 -1.4314800500869751e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2388 -4.9754999577999115e-02</internalNodes> + <leafValues> + 7.9497700929641724e-01 7.7199999941512942e-04</leafValues></_> + <_> + <internalNodes> + 0 -1 2389 -7.4732996523380280e-02</internalNodes> + <leafValues> + -1.0132360458374023e+00 -1.9388999789953232e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2390 3.2009001821279526e-02</internalNodes> + <leafValues> + 1.4412100613117218e-01 -4.2139101028442383e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2391 -9.4463996589183807e-02</internalNodes> + <leafValues> + 5.0682598352432251e-01 -2.0478899776935577e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2392 -1.5426999889314175e-02</internalNodes> + <leafValues> + -1.5811300277709961e-01 1.7806899547576904e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2393 -4.0540001355111599e-03</internalNodes> + <leafValues> + -5.4366701841354370e-01 3.1235000118613243e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2394 3.0080000869929790e-03</internalNodes> + <leafValues> + -1.7376799881458282e-01 3.0441701412200928e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2395 -1.0091999545693398e-02</internalNodes> + <leafValues> + 2.5103801488876343e-01 -2.6224100589752197e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2396 -3.8818001747131348e-02</internalNodes> + <leafValues> + 9.3226701021194458e-01 7.2659999132156372e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2397 3.4651998430490494e-02</internalNodes> + <leafValues> + -3.3934999257326126e-02 -8.5707902908325195e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2398 -4.6729999594390392e-03</internalNodes> + <leafValues> + 3.4969300031661987e-01 -4.8517998307943344e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2399 6.8499997723847628e-04</internalNodes> + <leafValues> + 6.6573001444339752e-02 -4.4973799586296082e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2400 3.5317000001668930e-02</internalNodes> + <leafValues> + 1.4275799691677094e-01 -4.6726399660110474e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2401 -2.3569999262690544e-02</internalNodes> + <leafValues> + -1.0286079645156860e+00 -4.5288000255823135e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2402 -1.9109999993816018e-03</internalNodes> + <leafValues> + -1.9652199745178223e-01 2.8661000728607178e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2403 -1.6659000888466835e-02</internalNodes> + <leafValues> + -7.7532202005386353e-01 -8.3280000835657120e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2404 6.6062200069427490e-01</internalNodes> + <leafValues> + 1.3232499361038208e-01 -3.5266680717468262e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2405 1.0970599949359894e-01</internalNodes> + <leafValues> + -1.5547199547290802e-01 1.4674140214920044e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2406 1.3500999659299850e-02</internalNodes> + <leafValues> + 1.5233400464057922e-01 -1.3020930290222168e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2407 -2.2871999070048332e-02</internalNodes> + <leafValues> + -7.1325999498367310e-01 -8.7040001526474953e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2408 -8.1821002066135406e-02</internalNodes> + <leafValues> + 1.1127580404281616e+00 8.3219997584819794e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2409 -5.2728001028299332e-02</internalNodes> + <leafValues> + 9.3165099620819092e-01 -1.7103999853134155e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2410 -2.5242000818252563e-02</internalNodes> + <leafValues> + -1.9733799993991852e-01 2.5359401106834412e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2411 -4.3818999081850052e-02</internalNodes> + <leafValues> + 4.1815200448036194e-01 -2.4585500359535217e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2412 -1.8188999965786934e-02</internalNodes> + <leafValues> + -5.1743197441101074e-01 2.0174199342727661e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2413 2.3466000333428383e-02</internalNodes> + <leafValues> + -4.3071001768112183e-02 -1.0636579990386963e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2414 3.4216001629829407e-02</internalNodes> + <leafValues> + 5.3780999034643173e-02 4.9707201123237610e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2415 2.5692999362945557e-02</internalNodes> + <leafValues> + -2.3800100386142731e-01 4.1651499271392822e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2416 -2.6565000414848328e-02</internalNodes> + <leafValues> + -8.8574802875518799e-01 1.3365900516510010e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2417 6.0942001640796661e-02</internalNodes> + <leafValues> + -2.0669700205326080e-01 5.8309000730514526e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2418 1.4474500715732574e-01</internalNodes> + <leafValues> + 1.3282300531864166e-01 -3.1449348926544189e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2419 5.3410999476909637e-02</internalNodes> + <leafValues> + -1.7325200140476227e-01 6.9190698862075806e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2420 1.1408000253140926e-02</internalNodes> + <leafValues> + 5.4822001606225967e-02 3.0240398645401001e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2421 -2.3179999552667141e-03</internalNodes> + <leafValues> + 1.5820899605751038e-01 -3.1973201036453247e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2422 -2.9695000499486923e-02</internalNodes> + <leafValues> + 7.1274799108505249e-01 5.8136001229286194e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2423 2.7249999344348907e-02</internalNodes> + <leafValues> + -1.5754100680351257e-01 9.2143797874450684e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2424 -3.6200000904500484e-03</internalNodes> + <leafValues> + -3.4548398852348328e-01 2.0220999419689178e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2425 -1.2578999623656273e-02</internalNodes> + <leafValues> + -5.5650299787521362e-01 2.0388999953866005e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2426 -8.8849000632762909e-02</internalNodes> + <leafValues> + -3.6100010871887207e+00 1.3164199888706207e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2427 -1.9256999716162682e-02</internalNodes> + <leafValues> + 5.1908999681472778e-01 -1.9284300506114960e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2428 -1.6666999086737633e-02</internalNodes> + <leafValues> + -8.7499998509883881e-02 1.5812499821186066e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2429 1.2931999750435352e-02</internalNodes> + <leafValues> + 2.7405999600887299e-02 -5.5123901367187500e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2430 -1.3431999832391739e-02</internalNodes> + <leafValues> + 2.3457799851894379e-01 -4.3235000222921371e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2431 1.8810000270605087e-02</internalNodes> + <leafValues> + -3.9680998772382736e-02 -9.4373297691345215e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2432 -6.4349998719990253e-03</internalNodes> + <leafValues> + 4.5703700184822083e-01 -4.0520001202821732e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2433 -2.4249000474810600e-02</internalNodes> + <leafValues> + -7.6248002052307129e-01 -1.9857000559568405e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2434 -2.9667999595403671e-02</internalNodes> + <leafValues> + -3.7412509918212891e+00 1.1250600218772888e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2435 5.1150000654160976e-03</internalNodes> + <leafValues> + -6.3781797885894775e-01 1.1223999783396721e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2436 -5.7819997891783714e-03</internalNodes> + <leafValues> + 1.9374400377273560e-01 -8.2042001187801361e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2437 1.6606999561190605e-02</internalNodes> + <leafValues> + -1.6192099452018738e-01 1.1334990262985229e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2438 3.8228001445531845e-02</internalNodes> + <leafValues> + 2.1105000749230385e-02 7.6264202594757080e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2439 -5.7094000279903412e-02</internalNodes> + <leafValues> + -1.6974929571151733e+00 -5.9762001037597656e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2440 -5.3883001208305359e-02</internalNodes> + <leafValues> + 1.1850190162658691e+00 9.0966999530792236e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2441 -2.6110000908374786e-03</internalNodes> + <leafValues> + -4.0941199660301208e-01 8.3820998668670654e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2442 2.9714399576187134e-01</internalNodes> + <leafValues> + 1.5529899299144745e-01 -1.0995409488677979e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2443 -8.9063003659248352e-02</internalNodes> + <leafValues> + 4.8947200179100037e-01 -2.0041200518608093e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2444 -5.6193001568317413e-02</internalNodes> + <leafValues> + -2.4581399559974670e-01 1.4365500211715698e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2445 3.7004999816417694e-02</internalNodes> + <leafValues> + -4.8168998211622238e-02 -1.2310709953308105e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2446 -8.4840003401041031e-03</internalNodes> + <leafValues> + 4.3372601270675659e-01 1.3779999688267708e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2447 -2.4379999376833439e-03</internalNodes> + <leafValues> + 1.8949699401855469e-01 -3.2294198870658875e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2448 -7.1639999747276306e-02</internalNodes> + <leafValues> + -4.3979001045227051e-01 2.2730199992656708e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2449 5.2260002121329308e-03</internalNodes> + <leafValues> + -2.0548400282859802e-01 5.0933301448822021e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2450 -6.1360001564025879e-03</internalNodes> + <leafValues> + 3.1157198548316956e-01 7.0680998265743256e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2451 1.5595000237226486e-02</internalNodes> + <leafValues> + -3.0934798717498779e-01 1.5627700090408325e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2452 2.5995999574661255e-02</internalNodes> + <leafValues> + 1.3821600377559662e-01 -1.7616599798202515e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2453 -1.2085000053048134e-02</internalNodes> + <leafValues> + -5.1070201396942139e-01 5.8440998196601868e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2454 -6.7836001515388489e-02</internalNodes> + <leafValues> + 4.7757101058959961e-01 -7.1446001529693604e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2455 -1.4715000055730343e-02</internalNodes> + <leafValues> + 4.5238900184631348e-01 -1.9861400127410889e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2456 2.5118999183177948e-02</internalNodes> + <leafValues> + 1.2954899668693542e-01 -8.6266398429870605e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2457 1.8826000392436981e-02</internalNodes> + <leafValues> + -4.1570000350475311e-02 -1.1354700326919556e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2458 -2.1263999864459038e-02</internalNodes> + <leafValues> + -3.4738001227378845e-01 1.5779499709606171e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2459 9.4609996303915977e-03</internalNodes> + <leafValues> + 4.8639997839927673e-03 -6.1654800176620483e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2460 2.2957700490951538e-01</internalNodes> + <leafValues> + 8.1372998654842377e-02 6.9841402769088745e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2461 -3.8061998784542084e-02</internalNodes> + <leafValues> + 1.1616369485855103e+00 -1.4976699650287628e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2462 -1.3484999537467957e-02</internalNodes> + <leafValues> + -3.2036399841308594e-01 1.7365099489688873e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2463 3.6238998174667358e-02</internalNodes> + <leafValues> + -1.8158499896526337e-01 6.1956697702407837e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2464 6.7210001870989799e-03</internalNodes> + <leafValues> + 7.9600000753998756e-04 4.2441400885581970e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2465 9.6525996923446655e-02</internalNodes> + <leafValues> + -1.4696800708770752e-01 1.2525680065155029e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2466 -3.5656999796628952e-02</internalNodes> + <leafValues> + -3.9781698584556580e-01 1.4191399514675140e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2467 1.0772000066936016e-02</internalNodes> + <leafValues> + -1.8194000422954559e-01 5.9762197732925415e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2468 7.9279996454715729e-02</internalNodes> + <leafValues> + 1.4642499387264252e-01 -7.8836899995803833e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2469 3.2841000705957413e-02</internalNodes> + <leafValues> + -6.2408000230789185e-02 -1.4227490425109863e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2470 -2.7781000360846519e-02</internalNodes> + <leafValues> + 3.4033098816871643e-01 3.0670000240206718e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2471 -4.0339999832212925e-03</internalNodes> + <leafValues> + 3.1084701418876648e-01 -2.2595700621604919e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2472 7.4260002002120018e-03</internalNodes> + <leafValues> + -3.8936998695135117e-02 3.1702101230621338e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2473 1.1213999986648560e-01</internalNodes> + <leafValues> + -1.7578299343585968e-01 6.5056598186492920e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2474 -1.1878100037574768e-01</internalNodes> + <leafValues> + -1.0092990398406982e+00 1.1069700121879578e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2475 -4.1584998369216919e-02</internalNodes> + <leafValues> + -5.3806400299072266e-01 1.9905000925064087e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2476 -2.7966000139713287e-02</internalNodes> + <leafValues> + 4.8143199086189270e-01 3.3590998500585556e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2477 -1.2506400048732758e-01</internalNodes> + <leafValues> + 2.6352199912071228e-01 -2.5737899541854858e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2478 2.3666900396347046e-01</internalNodes> + <leafValues> + 3.6508001387119293e-02 9.0655601024627686e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2479 -2.9475999996066093e-02</internalNodes> + <leafValues> + -6.0048800706863403e-01 9.5880003646016121e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2480 3.7792999297380447e-02</internalNodes> + <leafValues> + 1.5506200492382050e-01 -9.5733499526977539e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2481 7.2044000029563904e-02</internalNodes> + <leafValues> + -1.4525899291038513e-01 1.3676730394363403e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2482 9.7759999334812164e-03</internalNodes> + <leafValues> + 1.2915999628603458e-02 2.1640899777412415e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2483 5.2154000848531723e-02</internalNodes> + <leafValues> + -1.6359999775886536e-02 -8.8356298208236694e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2484 -4.3790999799966812e-02</internalNodes> + <leafValues> + 3.5829600691795349e-01 6.5131001174449921e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2485 -3.8378998637199402e-02</internalNodes> + <leafValues> + 1.1961040496826172e+00 -1.4971500635147095e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2486 -9.8838999867439270e-02</internalNodes> + <leafValues> + -6.1834001541137695e-01 1.2786200642585754e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2487 -1.2190700322389603e-01</internalNodes> + <leafValues> + -1.8276120424270630e+00 -6.4862996339797974e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2488 -1.1981700360774994e-01</internalNodes> + <leafValues> + -30. 1.1323300004005432e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2489 3.0910000205039978e-02</internalNodes> + <leafValues> + -2.3934000730514526e-01 3.6332899332046509e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2490 1.0800999589264393e-02</internalNodes> + <leafValues> + -3.5140000283718109e-02 2.7707898616790771e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2491 5.6844998151063919e-02</internalNodes> + <leafValues> + -1.5524299442768097e-01 1.0802700519561768e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2492 1.0280000278726220e-03</internalNodes> + <leafValues> + -6.1202999204397202e-02 2.0508000254631042e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2493 -2.8273999691009521e-02</internalNodes> + <leafValues> + -6.4778000116348267e-01 2.3917000740766525e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2494 -1.6013599932193756e-01</internalNodes> + <leafValues> + 1.0892050266265869e+00 5.8389000594615936e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2495 4.9629998393356800e-03</internalNodes> + <leafValues> + -2.5806298851966858e-01 2.0834599435329437e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2496 4.6937000006437302e-02</internalNodes> + <leafValues> + 1.3886299729347229e-01 -1.5662620067596436e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2497 2.4286000058054924e-02</internalNodes> + <leafValues> + -2.0728300511837006e-01 5.2430999279022217e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2498 7.0202000439167023e-02</internalNodes> + <leafValues> + 1.4796899259090424e-01 -1.3095090389251709e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2499 9.8120002076029778e-03</internalNodes> + <leafValues> + 2.7906000614166260e-02 -5.0864601135253906e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2500 -5.6200999766588211e-02</internalNodes> + <leafValues> + 1.2618130445480347e+00 6.3801996409893036e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2501 1.0982800275087357e-01</internalNodes> + <leafValues> + -1.2850099802017212e-01 3.0776169300079346e+00</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>211</maxWeakCount> + <stageThreshold>-3.3703000545501709e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 2502 2.0910000428557396e-02</internalNodes> + <leafValues> + -6.8559402227401733e-01 3.8984298706054688e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2503 3.5032000392675400e-02</internalNodes> + <leafValues> + -4.7724398970603943e-01 4.5027199387550354e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2504 3.9799001067876816e-02</internalNodes> + <leafValues> + -4.7011101245880127e-01 4.2702499032020569e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2505 -4.8409998416900635e-03</internalNodes> + <leafValues> + 2.5614300370216370e-01 -6.6556298732757568e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2506 2.3439999204128981e-03</internalNodes> + <leafValues> + -4.8083499073982239e-01 2.8013798594474792e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2507 2.5312999263405800e-02</internalNodes> + <leafValues> + -2.3948200047016144e-01 4.4191798567771912e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2508 -3.2193001359701157e-02</internalNodes> + <leafValues> + 7.6086699962615967e-01 -2.5059100985527039e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2509 7.5409002602100372e-02</internalNodes> + <leafValues> + -3.4974598884582520e-01 3.4380298852920532e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2510 -1.8469000235199928e-02</internalNodes> + <leafValues> + -7.9085600376129150e-01 3.4788001328706741e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2511 -1.2802000157535076e-02</internalNodes> + <leafValues> + 4.7107800841331482e-01 -6.0006000101566315e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2512 -2.6598000898957253e-02</internalNodes> + <leafValues> + 6.7116099596023560e-01 -2.4257500469684601e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2513 2.1988999098539352e-02</internalNodes> + <leafValues> + 2.4717499315738678e-01 -4.8301699757575989e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2514 1.4654099941253662e-01</internalNodes> + <leafValues> + -2.1504099667072296e-01 7.2055900096893311e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2515 3.5310001112520695e-03</internalNodes> + <leafValues> + 2.7930998802185059e-01 -3.4339898824691772e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2516 9.4010001048445702e-03</internalNodes> + <leafValues> + 5.5861998349428177e-02 -8.2143598794937134e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2517 -8.6390003561973572e-03</internalNodes> + <leafValues> + -9.9620598554611206e-01 1.8874999880790710e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2518 -3.9193000644445419e-02</internalNodes> + <leafValues> + -1.1945559978485107e+00 -2.9198000207543373e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2519 2.4855000898241997e-02</internalNodes> + <leafValues> + 1.4987599849700928e-01 -5.4137802124023438e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2520 -3.4995000809431076e-02</internalNodes> + <leafValues> + -1.4210180044174194e+00 -4.2314000427722931e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2521 -1.8378999084234238e-02</internalNodes> + <leafValues> + -2.8242599964141846e-01 1.5581800043582916e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2522 -1.3592000119388103e-02</internalNodes> + <leafValues> + 4.7317099571228027e-01 -2.1937200427055359e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2523 6.2629999592900276e-03</internalNodes> + <leafValues> + -5.9714000672101974e-02 6.0625898838043213e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2524 -1.8478000536561012e-02</internalNodes> + <leafValues> + -8.5647201538085938e-01 -1.3783999718725681e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2525 1.4236000366508961e-02</internalNodes> + <leafValues> + 1.6654799878597260e-01 -2.7713999152183533e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2526 -3.2547000795602798e-02</internalNodes> + <leafValues> + -1.1728240251541138e+00 -4.0185000747442245e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2527 -2.6410000864416361e-03</internalNodes> + <leafValues> + 2.6514300704002380e-01 -5.6343000382184982e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2528 -8.7799999164417386e-04</internalNodes> + <leafValues> + 3.6556001752614975e-02 -5.5075198411941528e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2529 4.7371998429298401e-02</internalNodes> + <leafValues> + -4.2614001780748367e-02 4.8194900155067444e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2530 -7.0790001191198826e-03</internalNodes> + <leafValues> + 2.8698998689651489e-01 -3.2923001050949097e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2531 -4.3145999312400818e-02</internalNodes> + <leafValues> + -1.4065419435501099e+00 1.2836399674415588e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2532 2.0592000335454941e-02</internalNodes> + <leafValues> + -2.1435299515724182e-01 5.3981798887252808e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2533 -2.2367000579833984e-02</internalNodes> + <leafValues> + 3.3718299865722656e-01 4.5212000608444214e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2534 5.0039999186992645e-02</internalNodes> + <leafValues> + -2.5121700763702393e-01 4.1750499606132507e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2535 6.1794999986886978e-02</internalNodes> + <leafValues> + 4.0084999054670334e-02 6.8779802322387695e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2536 -4.1861999779939651e-02</internalNodes> + <leafValues> + 5.3027397394180298e-01 -2.2901999950408936e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2537 -3.1959998887032270e-03</internalNodes> + <leafValues> + 2.5161498785018921e-01 -2.1514600515365601e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2538 2.4255000054836273e-02</internalNodes> + <leafValues> + 7.2320001199841499e-03 -7.2519099712371826e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2539 -1.7303999513387680e-02</internalNodes> + <leafValues> + -4.9958199262619019e-01 1.8394500017166138e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2540 -4.1470001451671124e-03</internalNodes> + <leafValues> + 8.5211999714374542e-02 -4.6364700794219971e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2541 -1.4369999989867210e-02</internalNodes> + <leafValues> + -5.2258902788162231e-01 2.3892599344253540e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2542 -9.0399999171495438e-03</internalNodes> + <leafValues> + -6.3250398635864258e-01 3.2551001757383347e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2543 -1.2373100221157074e-01</internalNodes> + <leafValues> + 1.2856210470199585e+00 7.6545000076293945e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2544 -8.2221999764442444e-02</internalNodes> + <leafValues> + 8.3208197355270386e-01 -1.8590599298477173e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2545 6.5659001469612122e-02</internalNodes> + <leafValues> + 1.1298800259828568e-01 -30.</leafValues></_> + <_> + <internalNodes> + 0 -1 2546 -3.1582999974489212e-02</internalNodes> + <leafValues> + -1.3485900163650513e+00 -4.7097001224756241e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2547 -7.9636000096797943e-02</internalNodes> + <leafValues> + -1.3533639907836914e+00 1.5668800473213196e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2548 -1.8880000337958336e-02</internalNodes> + <leafValues> + 4.0300300717353821e-01 -2.5148901343345642e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2549 -5.0149997696280479e-03</internalNodes> + <leafValues> + -2.6287099719047546e-01 1.8582500517368317e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2550 -1.2218000367283821e-02</internalNodes> + <leafValues> + 5.8692401647567749e-01 -1.9427700340747833e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2551 1.2710000155493617e-03</internalNodes> + <leafValues> + -1.6688999533653259e-01 2.3006899654865265e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2552 2.9743999242782593e-02</internalNodes> + <leafValues> + 1.2520000338554382e-02 -6.6723597049713135e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2553 2.8175000101327896e-02</internalNodes> + <leafValues> + -1.7060000449419022e-02 6.4579397439956665e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2554 3.0345000326633453e-02</internalNodes> + <leafValues> + -2.4178700149059296e-01 3.4878900647163391e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2555 -1.7325999215245247e-02</internalNodes> + <leafValues> + -5.3599399328231812e-01 2.0995999872684479e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2556 -8.4178000688552856e-02</internalNodes> + <leafValues> + 7.5093299150466919e-01 -1.7593200504779816e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2557 7.4950000271201134e-03</internalNodes> + <leafValues> + -1.6188099980354309e-01 3.0657500028610229e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2558 5.6494999676942825e-02</internalNodes> + <leafValues> + -1.7318800091743469e-01 1.0016150474548340e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2559 -5.2939997985959053e-03</internalNodes> + <leafValues> + 2.3417599499225616e-01 -6.5347000956535339e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2560 -1.4945000410079956e-02</internalNodes> + <leafValues> + 2.5018900632858276e-01 -3.0591198801994324e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2561 5.4919000715017319e-02</internalNodes> + <leafValues> + 1.3121999800205231e-01 -9.3765097856521606e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2562 -1.9721999764442444e-02</internalNodes> + <leafValues> + -8.3978497982025146e-01 -2.3473000153899193e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2563 -6.7158997058868408e-02</internalNodes> + <leafValues> + 2.3586840629577637e+00 8.2970999181270599e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2564 -1.4325999654829502e-02</internalNodes> + <leafValues> + 1.8814499676227570e-01 -3.1221601366996765e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2565 2.9841000214219093e-02</internalNodes> + <leafValues> + 1.4825099706649780e-01 -8.4681701660156250e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2566 5.1883000880479813e-02</internalNodes> + <leafValues> + -4.3731000274419785e-02 -1.3366169929504395e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2567 4.1127000004053116e-02</internalNodes> + <leafValues> + 1.7660099267959595e-01 -6.0904097557067871e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2568 -1.2865099310874939e-01</internalNodes> + <leafValues> + -9.8701000213623047e-01 -3.7785001099109650e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2569 2.4170000106096268e-03</internalNodes> + <leafValues> + -1.6119599342346191e-01 3.2675701379776001e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2570 7.7030002139508724e-03</internalNodes> + <leafValues> + -2.3841500282287598e-01 2.9319399595260620e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2571 4.5520000159740448e-02</internalNodes> + <leafValues> + 1.4424599707126617e-01 -1.5010160207748413e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2572 -7.8700996935367584e-02</internalNodes> + <leafValues> + -1.0394560098648071e+00 -4.5375999063253403e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2573 7.8619997948408127e-03</internalNodes> + <leafValues> + 1.9633600115776062e-01 -1.4472399652004242e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2574 -1.3458999805152416e-02</internalNodes> + <leafValues> + -9.0634697675704956e-01 -3.8049001246690750e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2575 2.8827000409364700e-02</internalNodes> + <leafValues> + -2.9473999515175819e-02 6.0058397054672241e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2576 -2.7365999296307564e-02</internalNodes> + <leafValues> + -9.9804002046585083e-01 -3.8653001189231873e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2577 -7.2917997837066650e-02</internalNodes> + <leafValues> + 7.3361498117446899e-01 5.7440001517534256e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2578 -1.3988999649882317e-02</internalNodes> + <leafValues> + 2.7892601490020752e-01 -2.6516300439834595e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2579 4.3242998421192169e-02</internalNodes> + <leafValues> + 4.7760000452399254e-03 3.5925900936126709e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2580 2.9533000662922859e-02</internalNodes> + <leafValues> + -2.0083999633789062e-01 5.1202899217605591e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2581 -3.1897000968456268e-02</internalNodes> + <leafValues> + 6.4721697568893433e-01 -1.3760000001639128e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2582 3.7868998944759369e-02</internalNodes> + <leafValues> + -1.8363800644874573e-01 6.1343097686767578e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2583 -2.2417999804019928e-02</internalNodes> + <leafValues> + -2.9187899827957153e-01 1.8194800615310669e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2584 5.8958999812602997e-02</internalNodes> + <leafValues> + -6.6451996564865112e-02 -1.9290030002593994e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2585 3.1222999095916748e-02</internalNodes> + <leafValues> + -1.2732000090181828e-02 6.1560797691345215e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2586 3.7484999746084213e-02</internalNodes> + <leafValues> + -2.0856900513172150e-01 4.4363999366760254e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2587 -2.0966000854969025e-02</internalNodes> + <leafValues> + -3.5712799429893494e-01 2.4252200126647949e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2588 -2.5477999821305275e-02</internalNodes> + <leafValues> + 1.0846560001373291e+00 -1.5054400265216827e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2589 -7.2570000775158405e-03</internalNodes> + <leafValues> + 2.1302600204944611e-01 -1.8308199942111969e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2590 -5.0983000546693802e-02</internalNodes> + <leafValues> + 5.1736801862716675e-01 -1.8833099305629730e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2591 -2.0640000700950623e-02</internalNodes> + <leafValues> + -4.4030201435089111e-01 2.2745999693870544e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2592 1.0672999545931816e-02</internalNodes> + <leafValues> + 3.5059999674558640e-02 -5.1665002107620239e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2593 3.1895998865365982e-02</internalNodes> + <leafValues> + 1.3228000141680241e-02 3.4915199875831604e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2594 -2.3824999108910561e-02</internalNodes> + <leafValues> + 3.4118801355361938e-01 -2.1510200202465057e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2595 -6.0680001042783260e-03</internalNodes> + <leafValues> + 3.2937398552894592e-01 -2.8523799777030945e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2596 2.3881999775767326e-02</internalNodes> + <leafValues> + -2.5333800911903381e-01 2.6296100020408630e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2597 2.7966000139713287e-02</internalNodes> + <leafValues> + 1.4049099385738373e-01 -4.9887099862098694e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2598 1.4603000134229660e-02</internalNodes> + <leafValues> + -1.5395999886095524e-02 -7.6958000659942627e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2599 1.0872399806976318e-01</internalNodes> + <leafValues> + 1.9069600105285645e-01 -3.2393100857734680e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2600 -1.4038000255823135e-02</internalNodes> + <leafValues> + 3.4924700856208801e-01 -2.2358700633049011e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2601 4.0440000593662262e-03</internalNodes> + <leafValues> + -3.8329001516103745e-02 5.1177299022674561e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2602 -4.9769999459385872e-03</internalNodes> + <leafValues> + -4.2888298630714417e-01 4.9173999577760696e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2603 -8.5183002054691315e-02</internalNodes> + <leafValues> + 6.6624599695205688e-01 7.8079998493194580e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2604 2.1559998858720064e-03</internalNodes> + <leafValues> + -4.9135199189186096e-01 6.9555997848510742e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2605 3.6384499073028564e-01</internalNodes> + <leafValues> + 1.2997099757194519e-01 -1.8949509859085083e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2606 2.2082500159740448e-01</internalNodes> + <leafValues> + -5.7211998850107193e-02 -1.4281120300292969e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2607 -1.6140000894665718e-02</internalNodes> + <leafValues> + -5.7589399814605713e-01 1.8062500655651093e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2608 -4.8330001533031464e-02</internalNodes> + <leafValues> + 9.7308498620986938e-01 -1.6513000428676605e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2609 1.7529999837279320e-02</internalNodes> + <leafValues> + 1.7932699620723724e-01 -2.7948901057243347e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2610 -3.4309998154640198e-02</internalNodes> + <leafValues> + -8.1072497367858887e-01 -1.6596000641584396e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2611 -4.5830002054572105e-03</internalNodes> + <leafValues> + 2.7908998727798462e-01 -7.4519999325275421e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2612 1.2896400690078735e-01</internalNodes> + <leafValues> + -1.3508500158786774e-01 2.5411539077758789e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2613 3.0361000448465347e-02</internalNodes> + <leafValues> + -6.8419001996517181e-02 2.8734099864959717e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2614 4.4086001813411713e-02</internalNodes> + <leafValues> + -1.8135899305343628e-01 6.5413200855255127e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2615 3.0159999150782824e-03</internalNodes> + <leafValues> + -1.5690499544143677e-01 2.6963800191879272e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2616 -2.6336999610066414e-02</internalNodes> + <leafValues> + 2.9175600409507751e-01 -2.5274100899696350e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2617 -2.7866000309586525e-02</internalNodes> + <leafValues> + 4.4387501478195190e-01 5.5038001388311386e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2618 1.1725000105798244e-02</internalNodes> + <leafValues> + -1.9346499443054199e-01 4.6656700968742371e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2619 1.5689999563619494e-03</internalNodes> + <leafValues> + -8.2360003143548965e-03 2.5700899958610535e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2620 -3.5550000611692667e-03</internalNodes> + <leafValues> + -4.2430898547172546e-01 7.1174003183841705e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2621 -3.1695000827312469e-02</internalNodes> + <leafValues> + -8.5393500328063965e-01 1.6916200518608093e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2622 -3.2097000628709793e-02</internalNodes> + <leafValues> + 8.3784902095794678e-01 -1.7597299814224243e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2623 1.5544199943542480e-01</internalNodes> + <leafValues> + 9.9550001323223114e-02 2.3873300552368164e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2624 8.8045999407768250e-02</internalNodes> + <leafValues> + -1.8725299835205078e-01 6.2384301424026489e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2625 -1.6720000421628356e-03</internalNodes> + <leafValues> + 2.5008699297904968e-01 -6.5118998289108276e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2626 9.3409996479749680e-03</internalNodes> + <leafValues> + -3.5378900170326233e-01 1.0715000331401825e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2627 3.7138000130653381e-02</internalNodes> + <leafValues> + 1.6387000679969788e-01 -9.1718399524688721e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2628 8.0183997750282288e-02</internalNodes> + <leafValues> + -1.4812999963760376e-01 1.4895190000534058e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2629 -7.9100002767518163e-04</internalNodes> + <leafValues> + -2.1326899528503418e-01 1.9676400721073151e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2630 -5.0400001928210258e-03</internalNodes> + <leafValues> + -7.1318697929382324e-01 1.8240000354126096e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2631 1.1962399631738663e-01</internalNodes> + <leafValues> + 3.3098999410867691e-02 1.0441709756851196e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2632 -4.5280000194907188e-03</internalNodes> + <leafValues> + -2.7308499813079834e-01 2.7229800820350647e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2633 -2.9639000073075294e-02</internalNodes> + <leafValues> + 3.6225798726081848e-01 5.6795001029968262e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2634 2.6650000363588333e-02</internalNodes> + <leafValues> + -4.8041000962257385e-02 -9.6723502874374390e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2635 4.4422000646591187e-02</internalNodes> + <leafValues> + 1.3052900135517120e-01 -3.5077300667762756e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2636 -2.4359999224543571e-02</internalNodes> + <leafValues> + -1.0766899585723877e+00 -5.1222998648881912e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2637 1.9734999164938927e-02</internalNodes> + <leafValues> + 2.6238000020384789e-02 2.8070500493049622e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2638 5.4930001497268677e-03</internalNodes> + <leafValues> + -2.6111298799514771e-01 2.1011400222778320e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2639 -2.3200300335884094e-01</internalNodes> + <leafValues> + -1.7748440504074097e+00 1.1482600122690201e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2640 -2.5614000856876373e-02</internalNodes> + <leafValues> + 2.9900801181793213e-01 -2.2502499818801880e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2641 -6.4949998632073402e-03</internalNodes> + <leafValues> + 1.9563800096511841e-01 -9.9762998521327972e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2642 3.9840000681579113e-03</internalNodes> + <leafValues> + -4.3021500110626221e-01 8.1261001527309418e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2643 -3.5813000053167343e-02</internalNodes> + <leafValues> + -5.0987398624420166e-01 1.6345900297164917e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2644 -1.4169000089168549e-02</internalNodes> + <leafValues> + 7.7978098392486572e-01 -1.7476299405097961e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2645 -1.2642100453376770e-01</internalNodes> + <leafValues> + -6.3047897815704346e-01 1.2728300690650940e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2646 6.8677999079227448e-02</internalNodes> + <leafValues> + -4.6447999775409698e-02 -1.1128979921340942e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2647 8.5864998400211334e-02</internalNodes> + <leafValues> + 1.1835400015115738e-01 -4.8235158920288086e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2648 1.5511999838054180e-02</internalNodes> + <leafValues> + -1.7467999830842018e-02 -6.3693398237228394e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2649 8.1091001629829407e-02</internalNodes> + <leafValues> + 8.6133003234863281e-02 2.4559431076049805e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2650 1.8495000898838043e-02</internalNodes> + <leafValues> + 4.0229000151157379e-02 -5.0858199596405029e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2651 -8.6320996284484863e-02</internalNodes> + <leafValues> + -1.9006760120391846e+00 1.1019100248813629e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2652 7.2355002164840698e-02</internalNodes> + <leafValues> + -6.2111999839544296e-02 -1.4165179729461670e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2653 -7.8179001808166504e-02</internalNodes> + <leafValues> + 8.8849300146102905e-01 4.2369998991489410e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2654 9.6681997179985046e-02</internalNodes> + <leafValues> + -2.2094200551509857e-01 3.3575099706649780e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2655 -3.9875999093055725e-02</internalNodes> + <leafValues> + 5.7804799079895020e-01 4.5347999781370163e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2656 -9.5349997282028198e-03</internalNodes> + <leafValues> + -5.4175698757171631e-01 3.2399999909102917e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2657 4.0600000647827983e-04</internalNodes> + <leafValues> + -8.1549003720283508e-02 3.5837900638580322e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2658 1.2107999995350838e-02</internalNodes> + <leafValues> + -2.0280399918556213e-01 4.3768000602722168e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2659 -2.0873999223113060e-02</internalNodes> + <leafValues> + 4.1469898819923401e-01 -4.5568000525236130e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2660 5.7888001203536987e-02</internalNodes> + <leafValues> + -2.9009999707341194e-02 -9.1822302341461182e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2661 1.3200000103097409e-04</internalNodes> + <leafValues> + -1.1772400140762329e-01 2.0000000298023224e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2662 -1.7137000337243080e-02</internalNodes> + <leafValues> + 3.3004799485206604e-01 -2.3055200278759003e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2663 3.0655000358819962e-02</internalNodes> + <leafValues> + -2.1545000374317169e-02 2.6878198981285095e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2664 -7.8699999721720815e-04</internalNodes> + <leafValues> + -4.4100698828697205e-01 4.9157999455928802e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2665 8.8036999106407166e-02</internalNodes> + <leafValues> + 1.1782000213861465e-01 -2.8293309211730957e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2666 -3.9028998464345932e-02</internalNodes> + <leafValues> + 9.1777199506759644e-01 -1.5827399492263794e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2667 8.0105997622013092e-02</internalNodes> + <leafValues> + 1.1289200186729431e-01 -1.9937280416488647e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2668 3.9538998156785965e-02</internalNodes> + <leafValues> + -1.4357399940490723e-01 1.3085240125656128e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2669 2.0684000104665756e-02</internalNodes> + <leafValues> + 2.0048099756240845e-01 -4.4186998158693314e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2670 -6.7037999629974365e-02</internalNodes> + <leafValues> + 3.2618600130081177e-01 -2.0550400018692017e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2671 4.6815000474452972e-02</internalNodes> + <leafValues> + 1.5825299918651581e-01 -9.5535099506378174e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2672 7.8443996608257294e-02</internalNodes> + <leafValues> + -7.4651002883911133e-02 -2.1161499023437500e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2673 6.6380001604557037e-02</internalNodes> + <leafValues> + 1.1641900241374969e-01 -1.6113519668579102e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2674 3.0053999274969101e-02</internalNodes> + <leafValues> + -1.6562600433826447e-01 7.0025402307510376e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2675 1.7119999974966049e-02</internalNodes> + <leafValues> + 2.2627699375152588e-01 -4.0114998817443848e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2676 2.0073000341653824e-02</internalNodes> + <leafValues> + -1.9389699399471283e-01 4.4420298933982849e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2677 3.3101998269557953e-02</internalNodes> + <leafValues> + 1.1637499928474426e-01 -1.5771679878234863e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2678 -1.4882000163197517e-02</internalNodes> + <leafValues> + -8.9680302143096924e-01 -4.2010001838207245e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2679 -1.0281000286340714e-02</internalNodes> + <leafValues> + 3.5602998733520508e-01 -1.3124000281095505e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2680 -2.8695000335574150e-02</internalNodes> + <leafValues> + -4.6039599180221558e-01 2.6801999658346176e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2681 -4.7189998440444469e-03</internalNodes> + <leafValues> + 2.3788799345493317e-01 -6.5518997609615326e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2682 3.2201600074768066e-01</internalNodes> + <leafValues> + -2.8489999473094940e-02 -8.4234601259231567e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2683 -1.7045000568032265e-02</internalNodes> + <leafValues> + -5.0938802957534790e-01 1.6057600080966949e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2684 -7.3469998314976692e-03</internalNodes> + <leafValues> + -5.4154998064041138e-01 4.7320001758635044e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2685 -3.0001999810338020e-02</internalNodes> + <leafValues> + -8.8785797357559204e-01 1.3621799647808075e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2686 -1.1292999610304832e-02</internalNodes> + <leafValues> + 8.0615198612213135e-01 -1.6159500181674957e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2687 4.7749998047947884e-03</internalNodes> + <leafValues> + 1.2968000024557114e-02 5.5079901218414307e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2688 5.0710001960396767e-03</internalNodes> + <leafValues> + -4.5728001743555069e-02 -1.0766259431838989e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2689 1.9344100356101990e-01</internalNodes> + <leafValues> + 7.1262001991271973e-02 1.1694519519805908e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2690 5.3750001825392246e-03</internalNodes> + <leafValues> + -1.9736200571060181e-01 3.8206899166107178e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2691 -6.8276003003120422e-02</internalNodes> + <leafValues> + -5.4372339248657227e+00 1.1151900142431259e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2692 -3.4933000802993774e-02</internalNodes> + <leafValues> + 4.4793400168418884e-01 -1.8657900393009186e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2693 5.1219998858869076e-03</internalNodes> + <leafValues> + -1.4871999621391296e-02 1.8413899838924408e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2694 9.5311999320983887e-02</internalNodes> + <leafValues> + -1.5117099881172180e-01 9.4991499185562134e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2695 -6.2849000096321106e-02</internalNodes> + <leafValues> + 4.6473601460456848e-01 3.8405001163482666e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2696 -1.7040699720382690e-01</internalNodes> + <leafValues> + -1.6499999761581421e+00 -6.3236996531486511e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2697 1.0583999566733837e-02</internalNodes> + <leafValues> + -3.8348998874425888e-02 4.1913801431655884e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2698 -4.1579000651836395e-02</internalNodes> + <leafValues> + 3.4461900591850281e-01 -2.1187700331211090e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2699 1.2718600034713745e-01</internalNodes> + <leafValues> + 1.2398199737071991e-01 -2.1254889965057373e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2700 8.2557000219821930e-02</internalNodes> + <leafValues> + -6.2024001032114029e-02 -1.4875819683074951e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2701 8.5293002426624298e-02</internalNodes> + <leafValues> + 1.7087999731302261e-02 3.2076600193977356e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2702 5.5544000118970871e-02</internalNodes> + <leafValues> + -2.7414000034332275e-01 1.8976399302482605e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2703 4.5650000683963299e-03</internalNodes> + <leafValues> + -1.7920200526714325e-01 2.7967301011085510e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2704 1.2997999787330627e-02</internalNodes> + <leafValues> + -3.2297500967979431e-01 2.6941800117492676e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2705 5.7891998440027237e-02</internalNodes> + <leafValues> + 1.2644399702548981e-01 -6.0713499784469604e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2706 -2.2824000567197800e-02</internalNodes> + <leafValues> + -4.9682098627090454e-01 2.2376999258995056e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2707 4.8312000930309296e-02</internalNodes> + <leafValues> + 4.3607000261545181e-02 4.8537799715995789e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2708 2.5714000687003136e-02</internalNodes> + <leafValues> + -4.2950998991727829e-02 -9.3023502826690674e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2709 6.9269998930394650e-03</internalNodes> + <leafValues> + -2.9680000152438879e-03 3.4296301007270813e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2710 -3.4446999430656433e-02</internalNodes> + <leafValues> + -1.5299769639968872e+00 -6.1014998704195023e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2711 2.9387999325990677e-02</internalNodes> + <leafValues> + 3.7595998495817184e-02 6.4172399044036865e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2712 -2.4319998919963837e-03</internalNodes> + <leafValues> + 9.9088996648788452e-02 -3.9688101410865784e-01</leafValues></_></weakClassifiers></_> + <_> + <maxWeakCount>200</maxWeakCount> + <stageThreshold>-2.9928278923034668e+00</stageThreshold> + <weakClassifiers> + <_> + <internalNodes> + 0 -1 2713 -9.5944002270698547e-02</internalNodes> + <leafValues> + 6.2419098615646362e-01 -4.5875200629234314e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2714 1.6834000125527382e-02</internalNodes> + <leafValues> + -9.3072801828384399e-01 2.1563600003719330e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2715 2.6049999520182610e-02</internalNodes> + <leafValues> + -4.0532299876213074e-01 4.2256599664688110e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2716 3.6500001442618668e-04</internalNodes> + <leafValues> + 9.5288001000881195e-02 -6.3298100233078003e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2717 -6.6940002143383026e-03</internalNodes> + <leafValues> + 3.7243801355361938e-01 -3.0332401394844055e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2718 1.8874000757932663e-02</internalNodes> + <leafValues> + -2.3357200622558594e-01 4.0330699086189270e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2719 -1.6300000424962491e-04</internalNodes> + <leafValues> + 4.2886998504400253e-02 -7.7796798944473267e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2720 -7.6259002089500427e-02</internalNodes> + <leafValues> + -4.9628499150276184e-01 1.6335399448871613e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2721 5.0149001181125641e-02</internalNodes> + <leafValues> + 3.2747000455856323e-02 -8.0047899484634399e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2722 -2.9239999130368233e-03</internalNodes> + <leafValues> + -5.0002801418304443e-01 2.5480601191520691e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2723 1.6243999823927879e-02</internalNodes> + <leafValues> + 3.8913000375032425e-02 -7.0724898576736450e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2724 3.7811998277902603e-02</internalNodes> + <leafValues> + -6.6267997026443481e-02 7.3868799209594727e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2725 -1.2319999746978283e-02</internalNodes> + <leafValues> + 4.8696398735046387e-01 -2.4485599994659424e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2726 5.8003999292850494e-02</internalNodes> + <leafValues> + 1.3459099829196930e-01 -1.3232100009918213e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2727 4.8630000092089176e-03</internalNodes> + <leafValues> + -4.4172900915145874e-01 1.4005599915981293e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2728 4.5690998435020447e-02</internalNodes> + <leafValues> + 3.1217999756336212e-02 8.9818298816680908e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2729 2.1321000531315804e-02</internalNodes> + <leafValues> + 1.2008000165224075e-02 -8.6066198348999023e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2730 1.5679100155830383e-01</internalNodes> + <leafValues> + 1.4055999927222729e-02 8.5332900285720825e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2731 -1.0328999720513821e-02</internalNodes> + <leafValues> + 2.9022800922393799e-01 -2.9478800296783447e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2732 2.4290001019835472e-03</internalNodes> + <leafValues> + -4.0439900755882263e-01 1.9400200247764587e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2733 -2.3338999599218369e-02</internalNodes> + <leafValues> + 3.2945200800895691e-01 -2.5712698698043823e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2734 -6.8970001302659512e-03</internalNodes> + <leafValues> + -5.3352999687194824e-01 2.1635200083255768e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2735 -3.4403000026941299e-02</internalNodes> + <leafValues> + -1.4425489902496338e+00 -4.4682998210191727e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2736 -2.1235000342130661e-02</internalNodes> + <leafValues> + -7.9017502069473267e-01 1.9084100425243378e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2737 2.0620001014322042e-03</internalNodes> + <leafValues> + -2.6931199431419373e-01 3.1488001346588135e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2738 -4.2190002277493477e-03</internalNodes> + <leafValues> + -5.4464399814605713e-01 1.6574600338935852e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2739 -1.4334999956190586e-02</internalNodes> + <leafValues> + 2.2105000913143158e-02 -6.2342500686645508e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2740 -8.2120001316070557e-03</internalNodes> + <leafValues> + -4.9884998798370361e-01 1.9237099587917328e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2741 -9.3350000679492950e-03</internalNodes> + <leafValues> + -7.9131197929382324e-01 -1.4143999665975571e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2742 -3.7937998771667480e-02</internalNodes> + <leafValues> + 7.9841297864913940e-01 -3.3799000084400177e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2743 4.7059999778866768e-03</internalNodes> + <leafValues> + -3.3163401484489441e-01 2.0726299285888672e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2744 -4.4499998912215233e-03</internalNodes> + <leafValues> + -2.7256301045417786e-01 1.8402199447154999e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2745 5.2189999260008335e-03</internalNodes> + <leafValues> + -5.3096002340316772e-01 5.2607998251914978e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2746 -9.5399999991059303e-03</internalNodes> + <leafValues> + -5.6485402584075928e-01 1.9269399344921112e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2747 4.4969998300075531e-02</internalNodes> + <leafValues> + -1.7411500215530396e-01 9.5382601022720337e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2748 1.4209000393748283e-02</internalNodes> + <leafValues> + -9.1949000954627991e-02 2.4836100637912750e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2749 1.6380199790000916e-01</internalNodes> + <leafValues> + -5.8497000485658646e-02 -1.6404409408569336e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2750 2.5579999200999737e-03</internalNodes> + <leafValues> + 2.3447999358177185e-01 -9.2734001576900482e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2751 -3.8499999791383743e-03</internalNodes> + <leafValues> + 1.7880700528621674e-01 -3.5844099521636963e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2752 -2.5221999734640121e-02</internalNodes> + <leafValues> + -4.2903000116348267e-01 2.0244500041007996e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2753 -1.9415000453591347e-02</internalNodes> + <leafValues> + 5.8016300201416016e-01 -1.8806399405002594e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2754 1.4419999904930592e-02</internalNodes> + <leafValues> + 3.2846998423337936e-02 8.1980502605438232e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2755 5.1582999527454376e-02</internalNodes> + <leafValues> + 6.9176003336906433e-02 -4.5866298675537109e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2756 -3.7960000336170197e-02</internalNodes> + <leafValues> + -1.2553000450134277e+00 1.4332899451255798e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2757 -2.9560999944806099e-02</internalNodes> + <leafValues> + 5.3151798248291016e-01 -2.0596499741077423e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2758 -3.9110999554395676e-02</internalNodes> + <leafValues> + 1.1658719778060913e+00 5.3897000849246979e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2759 -2.9159000143408775e-02</internalNodes> + <leafValues> + 3.9307600259780884e-01 -2.2184500098228455e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2760 -8.3617001771926880e-02</internalNodes> + <leafValues> + -7.3744499683380127e-01 1.4268200099468231e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2761 4.2004001140594482e-01</internalNodes> + <leafValues> + -1.4277400076389313e-01 1.7894840240478516e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2762 6.0005001723766327e-02</internalNodes> + <leafValues> + 1.1976700276136398e-01 -1.8886189460754395e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2763 -1.8981000408530235e-02</internalNodes> + <leafValues> + -1.4148449897766113e+00 -5.6522998958826065e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2764 -6.0049998573958874e-03</internalNodes> + <leafValues> + 4.4170799851417542e-01 -1.0200800001621246e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2765 -5.8214001357555389e-02</internalNodes> + <leafValues> + -1.3918470144271851e+00 -4.8268999904394150e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2766 -1.2271000072360039e-02</internalNodes> + <leafValues> + 5.1317697763442993e-01 -9.3696996569633484e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2767 4.6585999429225922e-02</internalNodes> + <leafValues> + -5.7484000921249390e-02 -1.4283169507980347e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2768 1.2110000243410468e-03</internalNodes> + <leafValues> + -8.0891996622085571e-02 3.2333201169967651e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2769 -8.8642001152038574e-02</internalNodes> + <leafValues> + -8.6449098587036133e-01 -3.3146999776363373e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2770 -2.3184999823570251e-02</internalNodes> + <leafValues> + 5.2162200212478638e-01 -1.6168000176548958e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2771 4.3090000748634338e-02</internalNodes> + <leafValues> + -1.6153800487518311e-01 1.0915000438690186e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2772 2.0599999697878957e-04</internalNodes> + <leafValues> + -1.7091499269008636e-01 3.1236699223518372e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2773 8.9159999042749405e-03</internalNodes> + <leafValues> + -6.7039998248219490e-03 -6.8810397386550903e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2774 -1.7752999439835548e-02</internalNodes> + <leafValues> + 6.3292801380157471e-01 -4.2360001243650913e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2775 6.2299999408423901e-03</internalNodes> + <leafValues> + -3.3637198805809021e-01 1.2790599465370178e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2776 2.2770000621676445e-02</internalNodes> + <leafValues> + -3.4703999757766724e-02 3.9141800999641418e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2777 -2.1534999832510948e-02</internalNodes> + <leafValues> + 6.4765101671218872e-01 -2.0097799599170685e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2778 6.1758998781442642e-02</internalNodes> + <leafValues> + 5.4297000169754028e-02 9.0700101852416992e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2779 -7.8069999814033508e-02</internalNodes> + <leafValues> + 6.5523397922515869e-01 -1.9754399359226227e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2780 1.1315000243484974e-02</internalNodes> + <leafValues> + 1.9385300576686859e-01 -5.1707297563552856e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2781 -2.5590000674128532e-02</internalNodes> + <leafValues> + -9.3096500635147095e-01 -3.1546998769044876e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2782 -3.8058999925851822e-02</internalNodes> + <leafValues> + -6.8326902389526367e-01 1.2709100544452667e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2783 9.7970003262162209e-03</internalNodes> + <leafValues> + 1.5523999929428101e-02 -6.3347899913787842e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2784 -1.3841999694705009e-02</internalNodes> + <leafValues> + 1.0060529708862305e+00 6.2812998890876770e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2785 8.3459997549653053e-03</internalNodes> + <leafValues> + -2.3383200168609619e-01 3.0982699990272522e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2786 -7.1439996361732483e-02</internalNodes> + <leafValues> + -7.2505402565002441e-01 1.7148299515247345e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2787 1.0006000287830830e-02</internalNodes> + <leafValues> + -2.2071999311447144e-01 3.5266199707984924e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2788 1.1005300283432007e-01</internalNodes> + <leafValues> + 1.6662000119686127e-01 -7.4318999052047729e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2789 3.5310998558998108e-02</internalNodes> + <leafValues> + -2.3982700705528259e-01 4.1435998678207397e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2790 -1.1174699664115906e-01</internalNodes> + <leafValues> + 5.1045399904251099e-01 2.2319999989122152e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2791 -1.1367800086736679e-01</internalNodes> + <leafValues> + 9.0475201606750488e-01 -1.6615299880504608e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2792 1.6667999327182770e-02</internalNodes> + <leafValues> + 1.4024500548839569e-01 -5.2178502082824707e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2793 -8.0340001732110977e-03</internalNodes> + <leafValues> + -6.6178399324417114e-01 3.7640000227838755e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2794 -3.3096998929977417e-02</internalNodes> + <leafValues> + 8.0185902118682861e-01 5.9385001659393311e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2795 1.2547999620437622e-02</internalNodes> + <leafValues> + -3.3545500040054321e-01 1.4578600227832794e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2796 -4.2073998600244522e-02</internalNodes> + <leafValues> + -5.5509102344512939e-01 1.3266600668430328e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2797 2.5221999734640121e-02</internalNodes> + <leafValues> + -6.1631999909877777e-02 -1.3678770065307617e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2798 -2.4268999695777893e-02</internalNodes> + <leafValues> + 3.4185099601745605e-01 -7.4160001240670681e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2799 -1.2280000373721123e-02</internalNodes> + <leafValues> + 2.7745801210403442e-01 -3.1033900380134583e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2800 -1.1377099901437759e-01</internalNodes> + <leafValues> + 1.1719540357589722e+00 8.3681002259254456e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2801 -8.4771998226642609e-02</internalNodes> + <leafValues> + 8.1694799661636353e-01 -1.7837500572204590e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2802 -2.4552000686526299e-02</internalNodes> + <leafValues> + -1.8627299368381500e-01 1.4340099692344666e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2803 -9.0269995853304863e-03</internalNodes> + <leafValues> + 3.2659199833869934e-01 -2.3541299998760223e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2804 1.1177999898791313e-02</internalNodes> + <leafValues> + 1.9761200249195099e-01 -2.1701000630855560e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2805 -2.9366999864578247e-02</internalNodes> + <leafValues> + -9.3414801359176636e-01 -2.1704999729990959e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2806 6.3640000298619270e-03</internalNodes> + <leafValues> + 2.5573000311851501e-02 4.6412798762321472e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2807 1.4026000164449215e-02</internalNodes> + <leafValues> + -2.1228599548339844e-01 4.0078800916671753e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2808 -1.3341999612748623e-02</internalNodes> + <leafValues> + 7.4202698469161987e-01 2.9001999646425247e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2809 2.8422799706459045e-01</internalNodes> + <leafValues> + -1.9243599474430084e-01 4.3631199002265930e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2810 -2.3724000155925751e-01</internalNodes> + <leafValues> + 6.9736397266387939e-01 6.9307997822761536e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2811 -1.1169700324535370e-01</internalNodes> + <leafValues> + 3.9147201180458069e-01 -2.0922000706195831e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2812 1.2787500023841858e-01</internalNodes> + <leafValues> + -7.2555996477603912e-02 3.6088201403617859e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2813 -6.2900997698307037e-02</internalNodes> + <leafValues> + 9.5424997806549072e-01 -1.5402799844741821e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2814 1.7439000308513641e-02</internalNodes> + <leafValues> + -5.1134999841451645e-02 2.7750301361083984e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2815 1.2319999514147639e-03</internalNodes> + <leafValues> + 7.5627997517585754e-02 -3.6456099152565002e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2816 2.7495000511407852e-02</internalNodes> + <leafValues> + 5.1844000816345215e-02 4.1562598943710327e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2817 -4.3543998152017593e-02</internalNodes> + <leafValues> + 7.1969997882843018e-01 -1.7132200300693512e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2818 1.1025999672710896e-02</internalNodes> + <leafValues> + 1.4354600012302399e-01 -6.5403002500534058e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2819 2.0865999162197113e-02</internalNodes> + <leafValues> + 4.0089000016450882e-02 -4.5743298530578613e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2820 -2.2304000332951546e-02</internalNodes> + <leafValues> + 5.3855001926422119e-01 7.1662999689579010e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2821 3.2492000609636307e-02</internalNodes> + <leafValues> + -4.5991998165845871e-02 -1.0047069787979126e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2822 1.2269999831914902e-02</internalNodes> + <leafValues> + 3.4334998577833176e-02 4.2431798577308655e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2823 8.3820000290870667e-03</internalNodes> + <leafValues> + -2.5850600004196167e-01 2.6263499259948730e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2824 3.7353999912738800e-02</internalNodes> + <leafValues> + 1.5692499279975891e-01 -1.0429090261459351e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2825 -1.4111000113189220e-02</internalNodes> + <leafValues> + -7.3177701234817505e-01 -2.0276999101042747e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2826 5.7066999375820160e-02</internalNodes> + <leafValues> + 8.3360001444816589e-02 1.5661499500274658e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2827 4.9680001102387905e-03</internalNodes> + <leafValues> + -3.5318198800086975e-01 1.4698399603366852e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2828 -2.4492999538779259e-02</internalNodes> + <leafValues> + 2.8325900435447693e-01 -3.4640000667423010e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2829 -1.1254999786615372e-02</internalNodes> + <leafValues> + -8.4017497301101685e-01 -3.6251999437808990e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2830 3.4533001482486725e-02</internalNodes> + <leafValues> + 1.4998500049114227e-01 -8.7367099523544312e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2831 2.4303000420331955e-02</internalNodes> + <leafValues> + -1.8787500262260437e-01 5.9483999013900757e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2832 -7.8790001571178436e-03</internalNodes> + <leafValues> + 4.4315698742866516e-01 -5.6570999324321747e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2833 3.5142000764608383e-02</internalNodes> + <leafValues> + -5.6494999676942825e-02 -1.3617190122604370e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2834 4.6259998343884945e-03</internalNodes> + <leafValues> + -3.1161698698997498e-01 2.5447699427604675e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2835 -8.3131000399589539e-02</internalNodes> + <leafValues> + 1.6424349546432495e+00 -1.4429399371147156e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2836 -1.4015999622642994e-02</internalNodes> + <leafValues> + -7.7819502353668213e-01 1.7173300683498383e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2837 1.2450000504031777e-03</internalNodes> + <leafValues> + -2.3191399872303009e-01 2.8527900576591492e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2838 -1.6803000122308731e-02</internalNodes> + <leafValues> + -3.5965099930763245e-01 2.0412999391555786e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2839 -7.6747998595237732e-02</internalNodes> + <leafValues> + 7.8050500154495239e-01 -1.5612800419330597e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2840 -2.3671999573707581e-01</internalNodes> + <leafValues> + 1.1813700199127197e+00 7.8111998736858368e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2841 -1.0057400166988373e-01</internalNodes> + <leafValues> + -4.7104099392890930e-01 7.9172998666763306e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2842 1.3239999534562230e-03</internalNodes> + <leafValues> + 2.2262699902057648e-01 -3.7099799513816833e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2843 2.2152999415993690e-02</internalNodes> + <leafValues> + -3.8649000227451324e-02 -9.2274999618530273e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2844 -1.1246199905872345e-01</internalNodes> + <leafValues> + 4.1899600625038147e-01 8.0411002039909363e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2845 1.6481000930070877e-02</internalNodes> + <leafValues> + -1.6756699979305267e-01 7.1842402219772339e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2846 6.8113997578620911e-02</internalNodes> + <leafValues> + 1.5719899535179138e-01 -8.7681102752685547e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2847 1.6011999920010567e-02</internalNodes> + <leafValues> + -4.1600000113248825e-03 -5.9327799081802368e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2848 4.6640001237392426e-03</internalNodes> + <leafValues> + -3.0153999105095863e-02 4.8345300555229187e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2849 6.7579997703433037e-03</internalNodes> + <leafValues> + -2.2667400538921356e-01 3.3662301301956177e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2850 4.7289999201893806e-03</internalNodes> + <leafValues> + -6.0373999178409576e-02 3.1458100676536560e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2851 2.5869999080896378e-03</internalNodes> + <leafValues> + -2.9872599244117737e-01 1.7787499725818634e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2852 2.8989999555051327e-03</internalNodes> + <leafValues> + 2.1890200674533844e-01 -2.9567098617553711e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2853 -3.0053999274969101e-02</internalNodes> + <leafValues> + 1.2150429487228394e+00 -1.4354999363422394e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2854 1.4181000180542469e-02</internalNodes> + <leafValues> + 1.2451999820768833e-02 5.5490100383758545e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2855 -6.0527000576257706e-02</internalNodes> + <leafValues> + -1.4933999776840210e+00 -6.5227001905441284e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2856 -1.9882999360561371e-02</internalNodes> + <leafValues> + -3.8526400923728943e-01 1.9761200249195099e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2857 3.1218999996781349e-02</internalNodes> + <leafValues> + -2.1281200647354126e-01 2.9446500539779663e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2858 1.8271999433636665e-02</internalNodes> + <leafValues> + 9.7200000891461968e-04 6.6814202070236206e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2859 1.1089999461546540e-03</internalNodes> + <leafValues> + -6.2467902898788452e-01 -1.6599999507889152e-03</leafValues></_> + <_> + <internalNodes> + 0 -1 2860 -3.6713998764753342e-02</internalNodes> + <leafValues> + -4.2333900928497314e-01 1.2084700167179108e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2861 1.2044000439345837e-02</internalNodes> + <leafValues> + 2.5882000103592873e-02 -5.0732398033142090e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2862 7.4749000370502472e-02</internalNodes> + <leafValues> + 1.3184699416160583e-01 -2.1739600598812103e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2863 -2.3473200201988220e-01</internalNodes> + <leafValues> + 1.1775610446929932e+00 -1.5114699304103851e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2864 1.4096499979496002e-01</internalNodes> + <leafValues> + 3.3991001546382904e-02 3.9923098683357239e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2865 6.1789997853338718e-03</internalNodes> + <leafValues> + -3.1806701421737671e-01 1.1681699752807617e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2866 -5.7216998189687729e-02</internalNodes> + <leafValues> + 8.4399098157882690e-01 8.3889000117778778e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2867 -5.5227000266313553e-02</internalNodes> + <leafValues> + 3.6888301372528076e-01 -1.8913400173187256e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2868 -2.1583000198006630e-02</internalNodes> + <leafValues> + -5.2161800861358643e-01 1.5772600471973419e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2869 2.5747999548912048e-02</internalNodes> + <leafValues> + -5.9921998530626297e-02 -1.0674990415573120e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2870 -1.3098999857902527e-02</internalNodes> + <leafValues> + 7.8958398103713989e-01 5.2099999040365219e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2871 2.2799998987466097e-03</internalNodes> + <leafValues> + -1.1704430580139160e+00 -5.9356998652219772e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2872 8.8060004636645317e-03</internalNodes> + <leafValues> + 4.1717998683452606e-02 6.6352599859237671e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2873 -8.9699998497962952e-03</internalNodes> + <leafValues> + -3.5862699151039124e-01 6.0458000749349594e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2874 4.0230001322925091e-03</internalNodes> + <leafValues> + 2.0979399979114532e-01 -2.4806000292301178e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2875 2.5017000734806061e-02</internalNodes> + <leafValues> + -1.8795900046825409e-01 3.9547100663185120e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2876 -5.9009999968111515e-03</internalNodes> + <leafValues> + 2.5663900375366211e-01 -9.4919003546237946e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2877 4.3850000947713852e-03</internalNodes> + <leafValues> + 3.3139001578092575e-02 -4.6075400710105896e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2878 -3.3771999180316925e-02</internalNodes> + <leafValues> + -9.8881602287292480e-01 1.4636899530887604e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2879 4.4523000717163086e-02</internalNodes> + <leafValues> + -1.3286699354648590e-01 1.5796790122985840e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2880 -4.0929000824689865e-02</internalNodes> + <leafValues> + 3.3877098560333252e-01 7.4970997869968414e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2881 3.9351999759674072e-02</internalNodes> + <leafValues> + -1.8327899277210236e-01 4.6980699896812439e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2882 -7.0322997868061066e-02</internalNodes> + <leafValues> + -9.8322701454162598e-01 1.1808100342750549e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2883 3.5743001848459244e-02</internalNodes> + <leafValues> + -3.3050999045372009e-02 -8.3610898256301880e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2884 -4.2961999773979187e-02</internalNodes> + <leafValues> + 1.1670809984207153e+00 8.0692000687122345e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2885 -2.1007999777793884e-02</internalNodes> + <leafValues> + 6.3869798183441162e-01 -1.7626300454139709e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2886 -1.5742200613021851e-01</internalNodes> + <leafValues> + -2.3302499949932098e-01 1.2517499923706055e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2887 7.8659998252987862e-03</internalNodes> + <leafValues> + -2.2037999331951141e-01 2.7196800708770752e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2888 2.3622000589966774e-02</internalNodes> + <leafValues> + 1.6127300262451172e-01 -4.3329000473022461e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2889 7.4692003428936005e-02</internalNodes> + <leafValues> + -1.6991999745368958e-01 5.8884900808334351e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2890 -6.4799998654052615e-04</internalNodes> + <leafValues> + 2.5842899084091187e-01 -3.5911999642848969e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2891 -1.6290999948978424e-02</internalNodes> + <leafValues> + -7.6764398813247681e-01 -2.0472999662160873e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2892 -3.3133998513221741e-02</internalNodes> + <leafValues> + -2.7180099487304688e-01 1.4325700700283051e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2893 4.8797998577356339e-02</internalNodes> + <leafValues> + 7.6408997178077698e-02 -4.1445198655128479e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2894 2.2869999520480633e-03</internalNodes> + <leafValues> + -3.8628999143838882e-02 2.0753799378871918e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2895 4.5304000377655029e-02</internalNodes> + <leafValues> + -1.7777900397777557e-01 6.3461399078369141e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2896 1.0705800354480743e-01</internalNodes> + <leafValues> + 1.8972299993038177e-01 -5.1236200332641602e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2897 -4.0525000542402267e-02</internalNodes> + <leafValues> + 7.0614999532699585e-01 -1.7803299427032471e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2898 3.1968999654054642e-02</internalNodes> + <leafValues> + 6.8149998784065247e-02 6.8733102083206177e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2899 -5.7617001235485077e-02</internalNodes> + <leafValues> + 7.5170499086380005e-01 -1.5764999389648438e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2900 1.3593999668955803e-02</internalNodes> + <leafValues> + 1.9411900639533997e-01 -2.4561899900436401e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2901 7.1396000683307648e-02</internalNodes> + <leafValues> + -4.6881001442670822e-02 -8.8198298215866089e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2902 -1.4895999804139137e-02</internalNodes> + <leafValues> + -4.4532400369644165e-01 1.7679899930953979e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2903 -1.0026000440120697e-02</internalNodes> + <leafValues> + 6.5122699737548828e-01 -1.6709999740123749e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2904 3.7589999847114086e-03</internalNodes> + <leafValues> + -5.8301001787185669e-02 3.4483298659324646e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2905 1.6263000667095184e-02</internalNodes> + <leafValues> + -1.5581500530242920e-01 8.6432701349258423e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2906 -4.0176000446081161e-02</internalNodes> + <leafValues> + -6.1028599739074707e-01 1.1796399950981140e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2907 2.7080999687314034e-02</internalNodes> + <leafValues> + -4.9601998180150986e-02 -8.9990001916885376e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2908 5.2420001477003098e-02</internalNodes> + <leafValues> + 1.1297199875116348e-01 -1.0833640098571777e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2909 -1.9160000607371330e-02</internalNodes> + <leafValues> + -7.9880100488662720e-01 -3.4079000353813171e-02</leafValues></_> + <_> + <internalNodes> + 0 -1 2910 -3.7730000913143158e-03</internalNodes> + <leafValues> + -1.9124099612236023e-01 2.1535199880599976e-01</leafValues></_> + <_> + <internalNodes> + 0 -1 2911 7.5762003660202026e-02</internalNodes> + <leafValues> + -1.3421699404716492e-01 1.6807060241699219e+00</leafValues></_> + <_> + <internalNodes> + 0 -1 2912 -2.2173000499606133e-02</internalNodes> + <leafValues> + 4.8600998520851135e-01 3.6160000599920750e-03</leafValues></_></weakClassifiers></_></stages> + <features> + <_> + <rects> + <_> + 6 4 12 9 -1.</_> + <_> + 6 7 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 4 12 7 -1.</_> + <_> + 10 4 4 7 3.</_></rects></_> + <_> + <rects> + <_> + 3 9 18 9 -1.</_> + <_> + 3 12 18 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 18 9 6 -1.</_> + <_> + 8 20 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 5 4 19 -1.</_> + <_> + 5 5 2 19 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 12 16 -1.</_> + <_> + 6 13 12 8 2.</_></rects></_> + <_> + <rects> + <_> + 5 8 12 6 -1.</_> + <_> + 5 11 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 11 14 4 10 -1.</_> + <_> + 11 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 4 0 7 6 -1.</_> + <_> + 4 3 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 12 6 -1.</_> + <_> + 6 8 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 4 12 7 -1.</_> + <_> + 10 4 4 7 3.</_></rects></_> + <_> + <rects> + <_> + 1 8 19 12 -1.</_> + <_> + 1 12 19 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 3 -1.</_> + <_> + 8 2 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 9 6 15 -1.</_> + <_> + 9 14 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 10 -1.</_> + <_> + 5 11 14 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 14 9 -1.</_> + <_> + 5 3 14 3 3.</_></rects></_> + <_> + <rects> + <_> + 13 11 9 6 -1.</_> + <_> + 16 11 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 7 5 6 10 -1.</_> + <_> + 9 5 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 10 8 6 10 -1.</_> + <_> + 12 8 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 2 5 4 9 -1.</_> + <_> + 4 5 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 18 0 6 11 -1.</_> + <_> + 20 0 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 24 13 -1.</_> + <_> + 8 6 8 13 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 18 10 6 -1.</_> + <_> + 7 20 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 7 14 12 -1.</_> + <_> + 5 13 14 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 24 3 -1.</_> + <_> + 8 3 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 8 15 6 -1.</_> + <_> + 5 11 15 3 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 5 14 -1.</_> + <_> + 9 13 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 5 6 10 -1.</_> + <_> + 11 5 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 6 6 3 12 -1.</_> + <_> + 6 12 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 21 18 3 -1.</_> + <_> + 9 21 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 13 6 -1.</_> + <_> + 5 8 13 2 3.</_></rects></_> + <_> + <rects> + <_> + 18 1 6 15 -1.</_> + <_> + 18 1 3 15 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 6 15 -1.</_> + <_> + 4 1 3 15 2.</_></rects></_> + <_> + <rects> + <_> + 0 8 24 15 -1.</_> + <_> + 8 8 8 15 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 12 -1.</_> + <_> + 5 6 7 6 2.</_> + <_> + 12 12 7 6 2.</_></rects></_> + <_> + <rects> + <_> + 2 12 21 12 -1.</_> + <_> + 2 16 21 4 3.</_></rects></_> + <_> + <rects> + <_> + 8 1 4 10 -1.</_> + <_> + 10 1 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 2 13 20 10 -1.</_> + <_> + 2 13 10 10 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 6 13 -1.</_> + <_> + 2 1 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 20 2 4 13 -1.</_> + <_> + 20 2 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 0 5 22 19 -1.</_> + <_> + 11 5 11 19 2.</_></rects></_> + <_> + <rects> + <_> + 18 4 6 9 -1.</_> + <_> + 20 4 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 6 11 -1.</_> + <_> + 2 3 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 12 1 4 9 -1.</_> + <_> + 12 1 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 6 19 3 -1.</_> + <_> + 0 7 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 12 1 4 9 -1.</_> + <_> + 12 1 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 8 1 4 9 -1.</_> + <_> + 10 1 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 5 5 14 14 -1.</_> + <_> + 12 5 7 7 2.</_> + <_> + 5 12 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 1 10 18 2 -1.</_> + <_> + 1 11 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 17 13 4 11 -1.</_> + <_> + 17 13 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 0 4 6 9 -1.</_> + <_> + 0 7 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 4 12 9 -1.</_> + <_> + 6 7 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 5 12 6 -1.</_> + <_> + 10 5 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 5 -1.</_> + <_> + 8 1 8 5 3.</_></rects></_> + <_> + <rects> + <_> + 4 10 18 6 -1.</_> + <_> + 4 12 18 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 17 12 6 -1.</_> + <_> + 2 17 6 3 2.</_> + <_> + 8 20 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 19 3 4 13 -1.</_> + <_> + 19 3 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 1 3 4 13 -1.</_> + <_> + 3 3 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 23 -1.</_> + <_> + 8 1 8 23 3.</_></rects></_> + <_> + <rects> + <_> + 1 7 8 12 -1.</_> + <_> + 1 11 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 14 7 3 14 -1.</_> + <_> + 14 14 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 12 16 6 -1.</_> + <_> + 3 12 8 3 2.</_> + <_> + 11 15 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 12 6 -1.</_> + <_> + 6 8 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 8 7 6 12 -1.</_> + <_> + 8 13 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 15 15 9 6 -1.</_> + <_> + 15 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 17 18 3 -1.</_> + <_> + 1 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 4 4 16 12 -1.</_> + <_> + 4 10 16 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 4 20 -1.</_> + <_> + 2 1 2 20 2.</_></rects></_> + <_> + <rects> + <_> + 3 0 18 2 -1.</_> + <_> + 3 1 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 1 5 20 14 -1.</_> + <_> + 1 5 10 7 2.</_> + <_> + 11 12 10 7 2.</_></rects></_> + <_> + <rects> + <_> + 5 8 14 12 -1.</_> + <_> + 5 12 14 4 3.</_></rects></_> + <_> + <rects> + <_> + 3 14 7 9 -1.</_> + <_> + 3 17 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 14 15 9 6 -1.</_> + <_> + 14 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 15 9 6 -1.</_> + <_> + 1 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 11 6 8 10 -1.</_> + <_> + 15 6 4 5 2.</_> + <_> + 11 11 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 5 14 14 -1.</_> + <_> + 5 5 7 7 2.</_> + <_> + 12 12 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 12 5 -1.</_> + <_> + 10 0 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 9 -1.</_> + <_> + 9 3 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 6 9 -1.</_> + <_> + 9 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 6 9 -1.</_> + <_> + 12 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 6 6 9 -1.</_> + <_> + 10 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 8 18 4 -1.</_> + <_> + 9 8 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 12 9 -1.</_> + <_> + 6 3 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 6 -1.</_> + <_> + 8 0 8 6 3.</_></rects></_> + <_> + <rects> + <_> + 4 7 16 12 -1.</_> + <_> + 4 11 16 4 3.</_></rects></_> + <_> + <rects> + <_> + 11 6 6 6 -1.</_> + <_> + 11 6 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 20 24 3 -1.</_> + <_> + 8 20 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 11 6 4 9 -1.</_> + <_> + 11 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 4 13 15 4 -1.</_> + <_> + 9 13 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 11 6 4 9 -1.</_> + <_> + 11 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 4 9 -1.</_> + <_> + 11 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 12 -1.</_> + <_> + 9 18 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 22 18 2 -1.</_> + <_> + 1 23 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 10 7 4 10 -1.</_> + <_> + 10 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 8 10 -1.</_> + <_> + 6 12 8 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 10 6 -1.</_> + <_> + 7 8 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 10 4 -1.</_> + <_> + 0 16 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 6 18 18 2 -1.</_> + <_> + 6 19 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 22 3 -1.</_> + <_> + 1 2 22 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 16 18 3 -1.</_> + <_> + 6 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 4 6 15 -1.</_> + <_> + 5 4 3 15 2.</_></rects></_> + <_> + <rects> + <_> + 20 4 4 10 -1.</_> + <_> + 20 4 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 0 4 4 10 -1.</_> + <_> + 2 4 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 2 16 20 6 -1.</_> + <_> + 12 16 10 3 2.</_> + <_> + 2 19 10 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 12 8 9 -1.</_> + <_> + 4 12 4 9 2.</_></rects></_> + <_> + <rects> + <_> + 12 0 6 9 -1.</_> + <_> + 14 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 5 10 6 6 -1.</_> + <_> + 8 10 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 11 8 12 6 -1.</_> + <_> + 17 8 6 3 2.</_> + <_> + 11 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 8 12 6 -1.</_> + <_> + 0 8 6 3 2.</_> + <_> + 6 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 12 0 6 9 -1.</_> + <_> + 14 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 6 9 -1.</_> + <_> + 8 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 14 9 6 -1.</_> + <_> + 8 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 9 6 -1.</_> + <_> + 0 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 10 8 6 10 -1.</_> + <_> + 12 8 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 3 19 12 3 -1.</_> + <_> + 9 19 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 10 20 2 -1.</_> + <_> + 2 11 20 1 2.</_></rects></_> + <_> + <rects> + <_> + 2 9 18 12 -1.</_> + <_> + 2 9 9 6 2.</_> + <_> + 11 15 9 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 0 18 24 -1.</_> + <_> + 3 0 9 24 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 10 -1.</_> + <_> + 5 6 7 5 2.</_> + <_> + 12 11 7 5 2.</_></rects></_> + <_> + <rects> + <_> + 9 5 10 12 -1.</_> + <_> + 14 5 5 6 2.</_> + <_> + 9 11 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 5 12 12 -1.</_> + <_> + 4 5 6 6 2.</_> + <_> + 10 11 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 14 18 3 -1.</_> + <_> + 4 15 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 13 8 8 -1.</_> + <_> + 6 17 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 3 16 18 6 -1.</_> + <_> + 3 19 18 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 6 -1.</_> + <_> + 3 0 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 12 18 -1.</_> + <_> + 10 6 4 18 3.</_></rects></_> + <_> + <rects> + <_> + 6 1 4 14 -1.</_> + <_> + 8 1 2 14 2.</_></rects></_> + <_> + <rects> + <_> + 3 2 19 2 -1.</_> + <_> + 3 3 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 1 8 22 13 -1.</_> + <_> + 12 8 11 13 2.</_></rects></_> + <_> + <rects> + <_> + 8 9 11 4 -1.</_> + <_> + 8 11 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 12 15 10 -1.</_> + <_> + 5 12 5 10 3.</_></rects></_> + <_> + <rects> + <_> + 12 16 12 6 -1.</_> + <_> + 16 16 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 12 6 -1.</_> + <_> + 4 16 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 19 1 5 12 -1.</_> + <_> + 19 5 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 4 -1.</_> + <_> + 8 2 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 6 8 12 4 -1.</_> + <_> + 6 10 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 7 5 9 6 -1.</_> + <_> + 10 5 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 9 17 6 6 -1.</_> + <_> + 9 20 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 7 22 15 -1.</_> + <_> + 0 12 22 5 3.</_></rects></_> + <_> + <rects> + <_> + 4 1 17 9 -1.</_> + <_> + 4 4 17 3 3.</_></rects></_> + <_> + <rects> + <_> + 7 5 6 10 -1.</_> + <_> + 9 5 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 18 1 6 8 -1.</_> + <_> + 18 1 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 6 7 -1.</_> + <_> + 3 1 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 18 0 6 22 -1.</_> + <_> + 18 0 3 22 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 22 -1.</_> + <_> + 3 0 3 22 2.</_></rects></_> + <_> + <rects> + <_> + 16 7 8 16 -1.</_> + <_> + 16 7 4 16 2.</_></rects></_> + <_> + <rects> + <_> + 2 10 19 6 -1.</_> + <_> + 2 12 19 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 9 6 12 -1.</_> + <_> + 9 13 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 2 15 17 6 -1.</_> + <_> + 2 17 17 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 7 3 14 -1.</_> + <_> + 14 14 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 8 10 -1.</_> + <_> + 5 6 4 5 2.</_> + <_> + 9 11 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 15 8 9 11 -1.</_> + <_> + 18 8 3 11 3.</_></rects></_> + <_> + <rects> + <_> + 0 8 9 11 -1.</_> + <_> + 3 8 3 11 3.</_></rects></_> + <_> + <rects> + <_> + 8 6 10 18 -1.</_> + <_> + 8 15 10 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 3 14 -1.</_> + <_> + 7 14 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 14 24 8 -1.</_> + <_> + 8 14 8 8 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 18 14 -1.</_> + <_> + 10 10 9 14 2.</_></rects></_> + <_> + <rects> + <_> + 14 12 6 6 -1.</_> + <_> + 14 15 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 10 16 -1.</_> + <_> + 7 0 5 8 2.</_> + <_> + 12 8 5 8 2.</_></rects></_> + <_> + <rects> + <_> + 10 0 9 6 -1.</_> + <_> + 13 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 4 3 16 4 -1.</_> + <_> + 12 3 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 0 9 6 -1.</_> + <_> + 13 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 1 1 20 4 -1.</_> + <_> + 1 1 10 2 2.</_> + <_> + 11 3 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 10 0 9 6 -1.</_> + <_> + 13 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 9 6 -1.</_> + <_> + 8 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 8 18 10 6 -1.</_> + <_> + 8 20 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 3 6 9 -1.</_> + <_> + 8 3 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 3 12 6 -1.</_> + <_> + 7 5 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 10 18 3 -1.</_> + <_> + 0 11 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 22 3 -1.</_> + <_> + 1 11 22 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 11 8 8 -1.</_> + <_> + 9 11 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 12 11 6 6 -1.</_> + <_> + 12 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 11 6 6 -1.</_> + <_> + 9 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 10 11 6 -1.</_> + <_> + 7 12 11 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 13 24 4 -1.</_> + <_> + 0 13 12 2 2.</_> + <_> + 12 15 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 4 22 12 -1.</_> + <_> + 13 4 11 6 2.</_> + <_> + 2 10 11 6 2.</_></rects></_> + <_> + <rects> + <_> + 2 0 20 17 -1.</_> + <_> + 12 0 10 17 2.</_></rects></_> + <_> + <rects> + <_> + 14 0 2 24 -1.</_> + <_> + 14 0 1 24 2.</_></rects></_> + <_> + <rects> + <_> + 8 0 2 24 -1.</_> + <_> + 9 0 1 24 2.</_></rects></_> + <_> + <rects> + <_> + 14 1 2 22 -1.</_> + <_> + 14 1 1 22 2.</_></rects></_> + <_> + <rects> + <_> + 8 1 2 22 -1.</_> + <_> + 9 1 1 22 2.</_></rects></_> + <_> + <rects> + <_> + 17 6 3 18 -1.</_> + <_> + 18 6 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 6 14 9 6 -1.</_> + <_> + 6 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 13 14 9 4 -1.</_> + <_> + 13 16 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 18 18 3 -1.</_> + <_> + 3 19 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 4 8 18 -1.</_> + <_> + 13 4 4 9 2.</_> + <_> + 9 13 4 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 17 18 3 -1.</_> + <_> + 0 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 12 4 -1.</_> + <_> + 6 2 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 8 14 6 -1.</_> + <_> + 6 11 14 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 5 6 6 -1.</_> + <_> + 10 5 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 5 6 16 -1.</_> + <_> + 10 13 6 8 2.</_></rects></_> + <_> + <rects> + <_> + 1 4 9 16 -1.</_> + <_> + 4 4 3 16 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 18 9 -1.</_> + <_> + 5 3 18 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 15 5 8 -1.</_> + <_> + 9 19 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 20 0 4 9 -1.</_> + <_> + 20 0 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 2 0 18 3 -1.</_> + <_> + 2 1 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 22 19 2 -1.</_> + <_> + 5 23 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 4 9 -1.</_> + <_> + 2 0 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 19 18 -1.</_> + <_> + 5 12 19 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 6 9 -1.</_> + <_> + 2 1 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 5 14 12 -1.</_> + <_> + 13 5 7 6 2.</_> + <_> + 6 11 7 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 20 2 -1.</_> + <_> + 0 2 20 1 2.</_></rects></_> + <_> + <rects> + <_> + 1 2 22 3 -1.</_> + <_> + 1 3 22 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 8 7 9 -1.</_> + <_> + 2 11 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 12 22 4 -1.</_> + <_> + 13 12 11 2 2.</_> + <_> + 2 14 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 12 22 4 -1.</_> + <_> + 0 12 11 2 2.</_> + <_> + 11 14 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 7 6 11 -1.</_> + <_> + 11 7 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 7 1 9 6 -1.</_> + <_> + 10 1 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 11 2 4 10 -1.</_> + <_> + 11 7 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 12 12 -1.</_> + <_> + 6 10 12 6 2.</_></rects></_> + <_> + <rects> + <_> + 18 1 6 15 -1.</_> + <_> + 18 6 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 3 15 18 3 -1.</_> + <_> + 3 16 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 18 5 6 9 -1.</_> + <_> + 18 8 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 5 16 6 -1.</_> + <_> + 1 5 8 3 2.</_> + <_> + 9 8 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 11 0 6 9 -1.</_> + <_> + 13 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 4 24 14 -1.</_> + <_> + 0 4 12 7 2.</_> + <_> + 12 11 12 7 2.</_></rects></_> + <_> + <rects> + <_> + 13 0 4 13 -1.</_> + <_> + 13 0 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 4 13 -1.</_> + <_> + 9 0 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 11 6 6 9 -1.</_> + <_> + 13 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 7 6 9 -1.</_> + <_> + 10 7 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 13 17 9 6 -1.</_> + <_> + 13 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 18 14 6 -1.</_> + <_> + 2 18 7 3 2.</_> + <_> + 9 21 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 18 18 4 -1.</_> + <_> + 12 18 9 2 2.</_> + <_> + 3 20 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 20 15 4 -1.</_> + <_> + 5 20 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 9 15 15 9 -1.</_> + <_> + 14 15 5 9 3.</_></rects></_> + <_> + <rects> + <_> + 4 4 16 4 -1.</_> + <_> + 4 6 16 2 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 10 6 -1.</_> + <_> + 7 8 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 15 10 -1.</_> + <_> + 5 14 5 10 3.</_></rects></_> + <_> + <rects> + <_> + 7 9 10 14 -1.</_> + <_> + 12 9 5 7 2.</_> + <_> + 7 16 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 6 9 -1.</_> + <_> + 9 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 6 18 3 -1.</_> + <_> + 3 7 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 10 18 3 -1.</_> + <_> + 0 11 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 16 18 4 -1.</_> + <_> + 12 16 9 2 2.</_> + <_> + 3 18 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 4 6 14 6 -1.</_> + <_> + 4 6 7 3 2.</_> + <_> + 11 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 13 0 2 18 -1.</_> + <_> + 13 0 1 18 2.</_></rects></_> + <_> + <rects> + <_> + 9 0 2 18 -1.</_> + <_> + 10 0 1 18 2.</_></rects></_> + <_> + <rects> + <_> + 5 7 15 10 -1.</_> + <_> + 10 7 5 10 3.</_></rects></_> + <_> + <rects> + <_> + 1 20 21 4 -1.</_> + <_> + 8 20 7 4 3.</_></rects></_> + <_> + <rects> + <_> + 10 5 5 18 -1.</_> + <_> + 10 14 5 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 6 -1.</_> + <_> + 0 2 12 3 2.</_> + <_> + 12 5 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 22 8 -1.</_> + <_> + 12 1 11 4 2.</_> + <_> + 1 5 11 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 0 15 9 -1.</_> + <_> + 4 3 15 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 19 -1.</_> + <_> + 8 0 8 19 3.</_></rects></_> + <_> + <rects> + <_> + 2 21 18 3 -1.</_> + <_> + 11 21 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 9 7 10 4 -1.</_> + <_> + 9 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 5 7 10 4 -1.</_> + <_> + 10 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 17 8 6 16 -1.</_> + <_> + 20 8 3 8 2.</_> + <_> + 17 16 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 1 15 20 4 -1.</_> + <_> + 1 15 10 2 2.</_> + <_> + 11 17 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 14 15 10 6 -1.</_> + <_> + 14 17 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 16 9 -1.</_> + <_> + 3 3 16 3 3.</_></rects></_> + <_> + <rects> + <_> + 15 6 7 15 -1.</_> + <_> + 15 11 7 5 3.</_></rects></_> + <_> + <rects> + <_> + 9 1 6 13 -1.</_> + <_> + 11 1 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 17 2 6 14 -1.</_> + <_> + 17 2 3 14 2.</_></rects></_> + <_> + <rects> + <_> + 3 14 12 10 -1.</_> + <_> + 3 14 6 5 2.</_> + <_> + 9 19 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 10 6 -1.</_> + <_> + 7 8 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 2 6 14 -1.</_> + <_> + 4 2 3 14 2.</_></rects></_> + <_> + <rects> + <_> + 10 4 5 12 -1.</_> + <_> + 10 8 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 17 24 5 -1.</_> + <_> + 8 17 8 5 3.</_></rects></_> + <_> + <rects> + <_> + 15 7 5 12 -1.</_> + <_> + 15 11 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 3 1 6 12 -1.</_> + <_> + 3 1 3 6 2.</_> + <_> + 6 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 12 13 6 6 -1.</_> + <_> + 12 16 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 13 6 6 -1.</_> + <_> + 6 16 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 14 6 3 16 -1.</_> + <_> + 14 14 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 1 12 13 6 -1.</_> + <_> + 1 14 13 2 3.</_></rects></_> + <_> + <rects> + <_> + 13 1 4 9 -1.</_> + <_> + 13 1 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 9 6 -1.</_> + <_> + 10 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 12 2 6 9 -1.</_> + <_> + 12 2 3 9 2.</_></rects></_> + <_> + <rects> + <_> + 6 2 6 9 -1.</_> + <_> + 9 2 3 9 2.</_></rects></_> + <_> + <rects> + <_> + 6 18 12 6 -1.</_> + <_> + 6 20 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 7 6 6 9 -1.</_> + <_> + 9 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 7 12 3 -1.</_> + <_> + 7 7 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 3 8 21 -1.</_> + <_> + 8 10 8 7 3.</_></rects></_> + <_> + <rects> + <_> + 7 4 10 12 -1.</_> + <_> + 7 8 10 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 6 9 -1.</_> + <_> + 0 4 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 15 2 2 20 -1.</_> + <_> + 15 2 1 20 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 6 9 -1.</_> + <_> + 0 6 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 15 3 2 21 -1.</_> + <_> + 15 3 1 21 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 2 23 -1.</_> + <_> + 8 0 1 23 2.</_></rects></_> + <_> + <rects> + <_> + 15 8 9 4 -1.</_> + <_> + 15 10 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 8 9 4 -1.</_> + <_> + 0 10 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 8 14 9 6 -1.</_> + <_> + 8 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 9 6 -1.</_> + <_> + 0 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 10 18 4 -1.</_> + <_> + 9 10 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 19 -1.</_> + <_> + 8 0 8 19 3.</_></rects></_> + <_> + <rects> + <_> + 9 1 8 12 -1.</_> + <_> + 9 7 8 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 10 -1.</_> + <_> + 12 6 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 7 9 10 12 -1.</_> + <_> + 12 9 5 6 2.</_> + <_> + 7 15 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 3 19 -1.</_> + <_> + 6 0 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 14 0 6 10 -1.</_> + <_> + 16 0 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 6 12 -1.</_> + <_> + 2 0 3 6 2.</_> + <_> + 5 6 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 11 24 2 -1.</_> + <_> + 0 12 24 1 2.</_></rects></_> + <_> + <rects> + <_> + 4 9 13 4 -1.</_> + <_> + 4 11 13 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 8 6 9 -1.</_> + <_> + 9 11 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 16 4 -1.</_> + <_> + 0 14 16 2 2.</_></rects></_> + <_> + <rects> + <_> + 18 12 6 9 -1.</_> + <_> + 18 15 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 6 9 -1.</_> + <_> + 0 15 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 7 10 4 -1.</_> + <_> + 8 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 8 7 6 9 -1.</_> + <_> + 10 7 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 11 0 6 9 -1.</_> + <_> + 13 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 6 9 -1.</_> + <_> + 9 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 12 3 6 15 -1.</_> + <_> + 14 3 2 15 3.</_></rects></_> + <_> + <rects> + <_> + 6 3 6 15 -1.</_> + <_> + 8 3 2 15 3.</_></rects></_> + <_> + <rects> + <_> + 15 2 9 4 -1.</_> + <_> + 15 4 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 10 6 7 -1.</_> + <_> + 8 10 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 14 6 10 -1.</_> + <_> + 9 19 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 13 5 8 -1.</_> + <_> + 7 17 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 14 5 3 16 -1.</_> + <_> + 14 13 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 2 17 18 3 -1.</_> + <_> + 2 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 18 19 3 -1.</_> + <_> + 5 19 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 9 -1.</_> + <_> + 11 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 12 4 3 18 -1.</_> + <_> + 13 4 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 9 4 3 18 -1.</_> + <_> + 10 4 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 3 3 18 9 -1.</_> + <_> + 9 3 6 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 1 6 14 -1.</_> + <_> + 8 1 2 14 3.</_></rects></_> + <_> + <rects> + <_> + 12 16 9 6 -1.</_> + <_> + 12 19 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 3 20 16 -1.</_> + <_> + 1 3 10 8 2.</_> + <_> + 11 11 10 8 2.</_></rects></_> + <_> + <rects> + <_> + 12 5 6 12 -1.</_> + <_> + 15 5 3 6 2.</_> + <_> + 12 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 2 22 16 -1.</_> + <_> + 1 2 11 8 2.</_> + <_> + 12 10 11 8 2.</_></rects></_> + <_> + <rects> + <_> + 10 14 5 10 -1.</_> + <_> + 10 19 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 21 18 3 -1.</_> + <_> + 3 22 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 10 14 6 10 -1.</_> + <_> + 12 14 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 4 -1.</_> + <_> + 8 2 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 6 4 12 9 -1.</_> + <_> + 6 7 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 6 12 5 -1.</_> + <_> + 10 6 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 5 8 14 12 -1.</_> + <_> + 5 12 14 4 3.</_></rects></_> + <_> + <rects> + <_> + 4 14 8 10 -1.</_> + <_> + 4 14 4 5 2.</_> + <_> + 8 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 11 6 5 14 -1.</_> + <_> + 11 13 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 3 16 -1.</_> + <_> + 7 14 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 3 7 18 8 -1.</_> + <_> + 9 7 6 8 3.</_></rects></_> + <_> + <rects> + <_> + 2 3 20 2 -1.</_> + <_> + 2 4 20 1 2.</_></rects></_> + <_> + <rects> + <_> + 3 12 19 6 -1.</_> + <_> + 3 14 19 2 3.</_></rects></_> + <_> + <rects> + <_> + 8 6 6 9 -1.</_> + <_> + 10 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 16 6 6 14 -1.</_> + <_> + 16 6 3 14 2.</_></rects></_> + <_> + <rects> + <_> + 7 9 6 12 -1.</_> + <_> + 9 9 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 18 6 6 18 -1.</_> + <_> + 21 6 3 9 2.</_> + <_> + 18 15 3 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 6 6 18 -1.</_> + <_> + 0 6 3 9 2.</_> + <_> + 3 15 3 9 2.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 9 -1.</_> + <_> + 18 5 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 18 15 6 -1.</_> + <_> + 3 20 15 2 3.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 9 -1.</_> + <_> + 18 5 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 9 -1.</_> + <_> + 0 5 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 10 18 2 -1.</_> + <_> + 5 11 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 12 6 -1.</_> + <_> + 6 2 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 6 9 -1.</_> + <_> + 12 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 0 6 9 -1.</_> + <_> + 10 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 15 12 9 6 -1.</_> + <_> + 15 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 6 13 6 -1.</_> + <_> + 3 8 13 2 3.</_></rects></_> + <_> + <rects> + <_> + 15 12 9 6 -1.</_> + <_> + 15 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 5 6 15 -1.</_> + <_> + 5 5 3 15 2.</_></rects></_> + <_> + <rects> + <_> + 8 8 9 6 -1.</_> + <_> + 11 8 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 8 6 3 14 -1.</_> + <_> + 8 13 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 15 12 9 6 -1.</_> + <_> + 15 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 12 10 4 -1.</_> + <_> + 9 12 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 13 1 4 19 -1.</_> + <_> + 13 1 2 19 2.</_></rects></_> + <_> + <rects> + <_> + 7 1 4 19 -1.</_> + <_> + 9 1 2 19 2.</_></rects></_> + <_> + <rects> + <_> + 18 9 6 9 -1.</_> + <_> + 18 12 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 21 18 3 -1.</_> + <_> + 1 22 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 14 13 10 9 -1.</_> + <_> + 14 16 10 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 13 22 4 -1.</_> + <_> + 1 13 11 2 2.</_> + <_> + 12 15 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 4 6 16 6 -1.</_> + <_> + 12 6 8 3 2.</_> + <_> + 4 9 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 0 18 22 -1.</_> + <_> + 1 0 9 11 2.</_> + <_> + 10 11 9 11 2.</_></rects></_> + <_> + <rects> + <_> + 10 7 8 14 -1.</_> + <_> + 14 7 4 7 2.</_> + <_> + 10 14 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 4 6 20 -1.</_> + <_> + 0 4 3 10 2.</_> + <_> + 3 14 3 10 2.</_></rects></_> + <_> + <rects> + <_> + 15 0 6 9 -1.</_> + <_> + 17 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 6 9 -1.</_> + <_> + 5 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 15 12 6 12 -1.</_> + <_> + 18 12 3 6 2.</_> + <_> + 15 18 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 12 6 12 -1.</_> + <_> + 3 12 3 6 2.</_> + <_> + 6 18 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 15 12 9 6 -1.</_> + <_> + 15 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 9 6 -1.</_> + <_> + 0 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 14 19 3 -1.</_> + <_> + 4 15 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 13 19 3 -1.</_> + <_> + 2 14 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 14 15 10 6 -1.</_> + <_> + 14 17 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 10 12 -1.</_> + <_> + 6 0 5 6 2.</_> + <_> + 11 6 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 17 1 6 12 -1.</_> + <_> + 20 1 3 6 2.</_> + <_> + 17 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 6 12 -1.</_> + <_> + 1 1 3 6 2.</_> + <_> + 4 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 16 14 6 9 -1.</_> + <_> + 16 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 7 3 9 12 -1.</_> + <_> + 7 9 9 6 2.</_></rects></_> + <_> + <rects> + <_> + 12 1 4 12 -1.</_> + <_> + 12 7 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 0 14 8 -1.</_> + <_> + 4 4 14 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 6 6 9 -1.</_> + <_> + 12 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 2 10 18 3 -1.</_> + <_> + 8 10 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 15 15 9 6 -1.</_> + <_> + 15 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 21 23 -1.</_> + <_> + 7 1 7 23 3.</_></rects></_> + <_> + <rects> + <_> + 6 9 17 4 -1.</_> + <_> + 6 11 17 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 0 11 18 -1.</_> + <_> + 1 6 11 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 15 13 6 -1.</_> + <_> + 6 17 13 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 9 6 -1.</_> + <_> + 0 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 8 7 15 4 -1.</_> + <_> + 13 7 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 9 -1.</_> + <_> + 9 15 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 8 18 3 -1.</_> + <_> + 12 8 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 24 4 -1.</_> + <_> + 8 14 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 16 10 3 12 -1.</_> + <_> + 16 16 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 24 3 -1.</_> + <_> + 0 4 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 14 17 10 6 -1.</_> + <_> + 14 19 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 13 18 3 -1.</_> + <_> + 7 13 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 18 9 -1.</_> + <_> + 5 3 18 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 3 16 9 -1.</_> + <_> + 4 6 16 3 3.</_></rects></_> + <_> + <rects> + <_> + 16 5 3 12 -1.</_> + <_> + 16 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 7 18 4 -1.</_> + <_> + 6 7 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 6 9 -1.</_> + <_> + 12 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 8 6 10 -1.</_> + <_> + 11 8 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 9 15 6 9 -1.</_> + <_> + 11 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 1 18 21 -1.</_> + <_> + 12 1 9 21 2.</_></rects></_> + <_> + <rects> + <_> + 6 8 12 7 -1.</_> + <_> + 6 8 6 7 2.</_></rects></_> + <_> + <rects> + <_> + 8 5 6 9 -1.</_> + <_> + 10 5 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 4 -1.</_> + <_> + 8 2 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 14 7 5 12 -1.</_> + <_> + 14 11 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 5 7 5 12 -1.</_> + <_> + 5 11 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 6 17 -1.</_> + <_> + 3 1 3 17 2.</_></rects></_> + <_> + <rects> + <_> + 3 1 19 9 -1.</_> + <_> + 3 4 19 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 18 12 6 -1.</_> + <_> + 3 18 6 3 2.</_> + <_> + 9 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 20 4 4 19 -1.</_> + <_> + 20 4 2 19 2.</_></rects></_> + <_> + <rects> + <_> + 0 16 10 7 -1.</_> + <_> + 5 16 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 8 7 10 12 -1.</_> + <_> + 13 7 5 6 2.</_> + <_> + 8 13 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 10 12 -1.</_> + <_> + 6 7 5 6 2.</_> + <_> + 11 13 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 9 2 9 6 -1.</_> + <_> + 12 2 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 1 20 21 4 -1.</_> + <_> + 8 20 7 4 3.</_></rects></_> + <_> + <rects> + <_> + 9 12 9 6 -1.</_> + <_> + 9 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 7 2 9 6 -1.</_> + <_> + 10 2 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 4 14 -1.</_> + <_> + 13 0 2 14 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 4 14 -1.</_> + <_> + 9 0 2 14 2.</_></rects></_> + <_> + <rects> + <_> + 14 15 9 6 -1.</_> + <_> + 14 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 8 18 5 -1.</_> + <_> + 8 8 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 18 3 6 11 -1.</_> + <_> + 20 3 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 6 5 11 14 -1.</_> + <_> + 6 12 11 7 2.</_></rects></_> + <_> + <rects> + <_> + 18 4 6 9 -1.</_> + <_> + 18 7 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 7 6 9 6 -1.</_> + <_> + 7 8 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 18 4 6 9 -1.</_> + <_> + 18 7 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 4 6 9 -1.</_> + <_> + 0 7 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 4 9 4 -1.</_> + <_> + 9 6 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 22 19 2 -1.</_> + <_> + 0 23 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 17 14 6 9 -1.</_> + <_> + 17 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 14 6 9 -1.</_> + <_> + 1 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 14 11 4 9 -1.</_> + <_> + 14 11 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 6 11 4 9 -1.</_> + <_> + 8 11 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 9 18 7 -1.</_> + <_> + 9 9 6 7 3.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 10 -1.</_> + <_> + 9 17 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 12 0 6 9 -1.</_> + <_> + 14 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 6 9 -1.</_> + <_> + 8 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 17 18 3 -1.</_> + <_> + 6 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 17 18 3 -1.</_> + <_> + 1 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 11 12 -1.</_> + <_> + 10 12 11 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 6 -1.</_> + <_> + 5 6 7 3 2.</_> + <_> + 12 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 4 15 4 -1.</_> + <_> + 5 6 15 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 22 2 -1.</_> + <_> + 0 1 22 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 24 -1.</_> + <_> + 8 0 8 24 3.</_></rects></_> + <_> + <rects> + <_> + 1 15 18 4 -1.</_> + <_> + 10 15 9 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 8 12 9 -1.</_> + <_> + 6 11 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 12 7 12 -1.</_> + <_> + 4 16 7 4 3.</_></rects></_> + <_> + <rects> + <_> + 1 2 22 6 -1.</_> + <_> + 12 2 11 3 2.</_> + <_> + 1 5 11 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 20 14 3 -1.</_> + <_> + 12 20 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 16 -1.</_> + <_> + 12 0 12 8 2.</_> + <_> + 0 8 12 8 2.</_></rects></_> + <_> + <rects> + <_> + 3 13 18 4 -1.</_> + <_> + 3 13 9 2 2.</_> + <_> + 12 15 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 10 22 2 -1.</_> + <_> + 2 11 22 1 2.</_></rects></_> + <_> + <rects> + <_> + 6 3 11 8 -1.</_> + <_> + 6 7 11 4 2.</_></rects></_> + <_> + <rects> + <_> + 14 5 6 6 -1.</_> + <_> + 14 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 7 24 6 -1.</_> + <_> + 0 9 24 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 0 10 10 -1.</_> + <_> + 19 0 5 5 2.</_> + <_> + 14 5 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 10 10 -1.</_> + <_> + 0 0 5 5 2.</_> + <_> + 5 5 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 4 -1.</_> + <_> + 12 1 12 2 2.</_> + <_> + 0 3 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 17 18 3 -1.</_> + <_> + 0 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 15 16 6 -1.</_> + <_> + 13 15 8 3 2.</_> + <_> + 5 18 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 15 16 6 -1.</_> + <_> + 3 15 8 3 2.</_> + <_> + 11 18 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 16 18 3 -1.</_> + <_> + 6 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 13 21 10 -1.</_> + <_> + 0 18 21 5 2.</_></rects></_> + <_> + <rects> + <_> + 13 0 6 24 -1.</_> + <_> + 15 0 2 24 3.</_></rects></_> + <_> + <rects> + <_> + 7 4 6 11 -1.</_> + <_> + 9 4 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 9 5 9 6 -1.</_> + <_> + 12 5 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 1 4 2 20 -1.</_> + <_> + 1 14 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 13 0 6 24 -1.</_> + <_> + 15 0 2 24 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 6 24 -1.</_> + <_> + 7 0 2 24 3.</_></rects></_> + <_> + <rects> + <_> + 16 7 6 14 -1.</_> + <_> + 19 7 3 7 2.</_> + <_> + 16 14 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 4 7 4 12 -1.</_> + <_> + 6 7 2 12 2.</_></rects></_> + <_> + <rects> + <_> + 0 5 24 14 -1.</_> + <_> + 8 5 8 14 3.</_></rects></_> + <_> + <rects> + <_> + 5 13 10 6 -1.</_> + <_> + 5 15 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 12 0 6 9 -1.</_> + <_> + 14 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 2 7 6 14 -1.</_> + <_> + 2 7 3 7 2.</_> + <_> + 5 14 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 15 2 9 15 -1.</_> + <_> + 18 2 3 15 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 9 -1.</_> + <_> + 2 2 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 12 2 10 14 -1.</_> + <_> + 17 2 5 7 2.</_> + <_> + 12 9 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 11 6 2 18 -1.</_> + <_> + 12 6 1 18 2.</_></rects></_> + <_> + <rects> + <_> + 9 5 15 6 -1.</_> + <_> + 14 5 5 6 3.</_></rects></_> + <_> + <rects> + <_> + 8 6 6 10 -1.</_> + <_> + 10 6 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 12 0 6 9 -1.</_> + <_> + 14 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 3 9 7 -1.</_> + <_> + 6 3 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 6 7 14 3 -1.</_> + <_> + 6 7 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 8 6 -1.</_> + <_> + 11 7 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 12 7 7 12 -1.</_> + <_> + 12 13 7 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 18 -1.</_> + <_> + 10 6 2 9 2.</_> + <_> + 12 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 16 14 6 9 -1.</_> + <_> + 16 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 0 6 13 -1.</_> + <_> + 6 0 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 2 2 21 3 -1.</_> + <_> + 9 2 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 4 5 12 -1.</_> + <_> + 5 8 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 10 3 4 10 -1.</_> + <_> + 10 8 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 8 4 5 8 -1.</_> + <_> + 8 8 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 11 9 -1.</_> + <_> + 6 3 11 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 6 12 5 -1.</_> + <_> + 10 6 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 5 -1.</_> + <_> + 8 0 8 5 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 23 6 -1.</_> + <_> + 1 12 23 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 21 18 3 -1.</_> + <_> + 9 21 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 6 21 6 -1.</_> + <_> + 3 8 21 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 6 12 -1.</_> + <_> + 2 5 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 10 2 4 15 -1.</_> + <_> + 10 7 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 8 7 8 10 -1.</_> + <_> + 8 12 8 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 7 15 12 -1.</_> + <_> + 10 7 5 12 3.</_></rects></_> + <_> + <rects> + <_> + 0 17 10 6 -1.</_> + <_> + 0 19 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 18 9 6 -1.</_> + <_> + 14 20 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 16 -1.</_> + <_> + 9 14 6 8 2.</_></rects></_> + <_> + <rects> + <_> + 14 18 9 6 -1.</_> + <_> + 14 20 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 18 9 6 -1.</_> + <_> + 1 20 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 15 9 9 6 -1.</_> + <_> + 15 11 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 9 9 6 -1.</_> + <_> + 0 11 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 17 3 6 9 -1.</_> + <_> + 19 3 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 2 17 18 3 -1.</_> + <_> + 2 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 15 21 6 -1.</_> + <_> + 3 17 21 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 17 6 6 -1.</_> + <_> + 9 20 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 18 3 6 9 -1.</_> + <_> + 18 6 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 6 9 -1.</_> + <_> + 0 6 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 0 16 10 -1.</_> + <_> + 12 0 8 5 2.</_> + <_> + 4 5 8 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 0 10 16 -1.</_> + <_> + 2 0 5 8 2.</_> + <_> + 7 8 5 8 2.</_></rects></_> + <_> + <rects> + <_> + 14 0 10 5 -1.</_> + <_> + 14 0 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 10 5 -1.</_> + <_> + 5 0 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 18 3 6 10 -1.</_> + <_> + 18 3 3 10 2.</_></rects></_> + <_> + <rects> + <_> + 5 11 12 6 -1.</_> + <_> + 5 11 6 3 2.</_> + <_> + 11 14 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 21 0 3 18 -1.</_> + <_> + 22 0 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 6 9 -1.</_> + <_> + 8 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 8 9 7 -1.</_> + <_> + 11 8 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 7 12 8 10 -1.</_> + <_> + 7 12 4 5 2.</_> + <_> + 11 17 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 21 0 3 18 -1.</_> + <_> + 22 0 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 9 -1.</_> + <_> + 12 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 15 0 9 6 -1.</_> + <_> + 15 2 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 3 -1.</_> + <_> + 0 3 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 11 7 6 9 -1.</_> + <_> + 13 7 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 6 6 10 -1.</_> + <_> + 9 6 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 12 1 6 12 -1.</_> + <_> + 14 1 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 6 4 12 12 -1.</_> + <_> + 6 10 12 6 2.</_></rects></_> + <_> + <rects> + <_> + 14 3 2 21 -1.</_> + <_> + 14 3 1 21 2.</_></rects></_> + <_> + <rects> + <_> + 6 1 12 8 -1.</_> + <_> + 6 5 12 4 2.</_></rects></_> + <_> + <rects> + <_> + 3 0 18 8 -1.</_> + <_> + 3 4 18 4 2.</_></rects></_> + <_> + <rects> + <_> + 3 0 18 3 -1.</_> + <_> + 3 1 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 13 24 4 -1.</_> + <_> + 12 13 12 2 2.</_> + <_> + 0 15 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 10 5 4 9 -1.</_> + <_> + 12 5 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 11 1 6 9 -1.</_> + <_> + 13 1 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 2 6 22 -1.</_> + <_> + 8 2 2 22 3.</_></rects></_> + <_> + <rects> + <_> + 16 10 8 14 -1.</_> + <_> + 20 10 4 7 2.</_> + <_> + 16 17 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 4 16 15 -1.</_> + <_> + 3 9 16 5 3.</_></rects></_> + <_> + <rects> + <_> + 16 10 8 14 -1.</_> + <_> + 20 10 4 7 2.</_> + <_> + 16 17 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 10 8 14 -1.</_> + <_> + 0 10 4 7 2.</_> + <_> + 4 17 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 10 14 11 6 -1.</_> + <_> + 10 17 11 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 7 24 9 -1.</_> + <_> + 8 7 8 9 3.</_></rects></_> + <_> + <rects> + <_> + 13 1 4 16 -1.</_> + <_> + 13 1 2 16 2.</_></rects></_> + <_> + <rects> + <_> + 7 1 4 16 -1.</_> + <_> + 9 1 2 16 2.</_></rects></_> + <_> + <rects> + <_> + 5 5 16 8 -1.</_> + <_> + 13 5 8 4 2.</_> + <_> + 5 9 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 9 6 9 -1.</_> + <_> + 0 12 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 16 18 3 -1.</_> + <_> + 6 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 12 6 9 -1.</_> + <_> + 3 15 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 14 9 6 -1.</_> + <_> + 8 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 13 8 10 -1.</_> + <_> + 2 13 4 5 2.</_> + <_> + 6 18 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 15 5 3 18 -1.</_> + <_> + 15 11 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 3 5 18 3 -1.</_> + <_> + 3 6 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 17 5 6 11 -1.</_> + <_> + 19 5 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 1 5 6 11 -1.</_> + <_> + 3 5 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 19 1 4 9 -1.</_> + <_> + 19 1 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 4 9 -1.</_> + <_> + 3 1 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 4 15 18 9 -1.</_> + <_> + 4 15 9 9 2.</_></rects></_> + <_> + <rects> + <_> + 6 9 12 4 -1.</_> + <_> + 6 11 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 15 2 9 6 -1.</_> + <_> + 15 4 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 9 6 -1.</_> + <_> + 0 4 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 15 0 6 17 -1.</_> + <_> + 17 0 2 17 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 6 17 -1.</_> + <_> + 5 0 2 17 3.</_></rects></_> + <_> + <rects> + <_> + 8 17 9 4 -1.</_> + <_> + 8 19 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 3 18 -1.</_> + <_> + 6 11 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 2 14 12 -1.</_> + <_> + 5 8 14 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 2 3 12 -1.</_> + <_> + 10 8 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 7 14 15 -1.</_> + <_> + 10 12 14 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 7 14 15 -1.</_> + <_> + 0 12 14 5 3.</_></rects></_> + <_> + <rects> + <_> + 15 0 9 6 -1.</_> + <_> + 15 2 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 9 6 -1.</_> + <_> + 0 2 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 12 6 6 14 -1.</_> + <_> + 14 6 2 14 3.</_></rects></_> + <_> + <rects> + <_> + 9 7 6 9 -1.</_> + <_> + 11 7 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 12 6 6 15 -1.</_> + <_> + 14 6 2 15 3.</_></rects></_> + <_> + <rects> + <_> + 6 6 6 15 -1.</_> + <_> + 8 6 2 15 3.</_></rects></_> + <_> + <rects> + <_> + 15 3 8 9 -1.</_> + <_> + 15 3 4 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 9 21 -1.</_> + <_> + 3 0 3 21 3.</_></rects></_> + <_> + <rects> + <_> + 11 9 8 12 -1.</_> + <_> + 11 13 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 6 7 10 12 -1.</_> + <_> + 6 7 5 6 2.</_> + <_> + 11 13 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 18 -1.</_> + <_> + 12 6 2 9 2.</_> + <_> + 10 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 9 -1.</_> + <_> + 0 3 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 14 18 3 -1.</_> + <_> + 3 15 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 14 8 10 -1.</_> + <_> + 3 14 4 5 2.</_> + <_> + 7 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 12 24 4 -1.</_> + <_> + 12 12 12 2 2.</_> + <_> + 0 14 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 3 20 -1.</_> + <_> + 1 2 1 20 3.</_></rects></_> + <_> + <rects> + <_> + 12 16 10 8 -1.</_> + <_> + 17 16 5 4 2.</_> + <_> + 12 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 2 16 10 8 -1.</_> + <_> + 2 16 5 4 2.</_> + <_> + 7 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 10 9 -1.</_> + <_> + 7 3 10 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 3 -1.</_> + <_> + 8 0 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 8 15 4 -1.</_> + <_> + 3 10 15 2 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 12 6 -1.</_> + <_> + 10 5 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 13 14 6 -1.</_> + <_> + 5 16 14 3 2.</_></rects></_> + <_> + <rects> + <_> + 11 14 4 10 -1.</_> + <_> + 11 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 6 6 7 -1.</_> + <_> + 3 6 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 18 0 6 6 -1.</_> + <_> + 18 0 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 1 18 3 -1.</_> + <_> + 3 2 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 14 18 -1.</_> + <_> + 9 12 14 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 6 -1.</_> + <_> + 3 0 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 13 11 6 6 -1.</_> + <_> + 13 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 20 24 3 -1.</_> + <_> + 8 20 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 13 11 6 7 -1.</_> + <_> + 13 11 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 4 12 10 6 -1.</_> + <_> + 4 14 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 13 11 6 6 -1.</_> + <_> + 13 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 11 6 7 -1.</_> + <_> + 8 11 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 7 4 11 12 -1.</_> + <_> + 7 8 11 4 3.</_></rects></_> + <_> + <rects> + <_> + 6 15 10 4 -1.</_> + <_> + 6 17 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 14 0 6 9 -1.</_> + <_> + 16 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 4 0 6 9 -1.</_> + <_> + 6 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 11 2 4 15 -1.</_> + <_> + 11 7 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 20 3 -1.</_> + <_> + 0 1 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 13 18 10 6 -1.</_> + <_> + 13 20 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 7 6 11 -1.</_> + <_> + 5 7 3 11 2.</_></rects></_> + <_> + <rects> + <_> + 10 14 10 9 -1.</_> + <_> + 10 17 10 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 2 4 9 -1.</_> + <_> + 10 2 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 14 3 10 4 -1.</_> + <_> + 14 3 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 12 6 -1.</_> + <_> + 6 6 6 3 2.</_> + <_> + 12 9 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 8 8 10 -1.</_> + <_> + 12 8 4 5 2.</_> + <_> + 8 13 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 4 4 16 -1.</_> + <_> + 7 12 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 8 8 9 4 -1.</_> + <_> + 8 10 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 2 14 9 -1.</_> + <_> + 5 5 14 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 16 19 8 -1.</_> + <_> + 3 20 19 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 10 8 -1.</_> + <_> + 5 0 5 8 2.</_></rects></_> + <_> + <rects> + <_> + 5 2 16 18 -1.</_> + <_> + 5 2 8 18 2.</_></rects></_> + <_> + <rects> + <_> + 0 11 24 11 -1.</_> + <_> + 8 11 8 11 3.</_></rects></_> + <_> + <rects> + <_> + 3 3 18 5 -1.</_> + <_> + 3 3 9 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 16 18 3 -1.</_> + <_> + 1 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 17 18 3 -1.</_> + <_> + 5 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 13 9 6 -1.</_> + <_> + 1 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 9 23 10 -1.</_> + <_> + 1 14 23 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 7 18 3 -1.</_> + <_> + 3 8 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 8 12 3 -1.</_> + <_> + 6 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 2 3 22 -1.</_> + <_> + 7 2 1 22 3.</_></rects></_> + <_> + <rects> + <_> + 14 17 10 6 -1.</_> + <_> + 14 19 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 18 10 6 -1.</_> + <_> + 1 20 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 11 3 6 12 -1.</_> + <_> + 13 3 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 9 -1.</_> + <_> + 12 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 11 0 6 9 -1.</_> + <_> + 13 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 6 9 -1.</_> + <_> + 9 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 12 10 9 6 -1.</_> + <_> + 15 10 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 2 11 6 9 -1.</_> + <_> + 5 11 3 9 2.</_></rects></_> + <_> + <rects> + <_> + 14 5 3 19 -1.</_> + <_> + 15 5 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 6 6 9 6 -1.</_> + <_> + 6 8 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 5 3 19 -1.</_> + <_> + 15 5 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 6 9 -1.</_> + <_> + 0 6 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 21 18 3 -1.</_> + <_> + 5 22 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 18 4 -1.</_> + <_> + 7 10 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 13 4 8 10 -1.</_> + <_> + 17 4 4 5 2.</_> + <_> + 13 9 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 9 6 -1.</_> + <_> + 10 8 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 12 9 9 8 -1.</_> + <_> + 15 9 3 8 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 5 12 -1.</_> + <_> + 0 10 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 7 6 14 6 -1.</_> + <_> + 14 6 7 3 2.</_> + <_> + 7 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 5 3 19 -1.</_> + <_> + 8 5 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 8 4 15 20 -1.</_> + <_> + 13 4 5 20 3.</_></rects></_> + <_> + <rects> + <_> + 1 4 15 20 -1.</_> + <_> + 6 4 5 20 3.</_></rects></_> + <_> + <rects> + <_> + 13 10 6 6 -1.</_> + <_> + 13 10 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 10 6 6 -1.</_> + <_> + 8 10 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 14 2 6 14 -1.</_> + <_> + 17 2 3 7 2.</_> + <_> + 14 9 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 4 2 6 14 -1.</_> + <_> + 4 2 3 7 2.</_> + <_> + 7 9 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 12 4 6 7 -1.</_> + <_> + 12 4 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 4 6 9 -1.</_> + <_> + 11 4 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 11 4 8 10 -1.</_> + <_> + 11 4 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 5 4 8 10 -1.</_> + <_> + 9 4 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 8 18 10 6 -1.</_> + <_> + 8 20 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 18 21 6 -1.</_> + <_> + 1 20 21 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 2 12 6 -1.</_> + <_> + 9 2 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 2 12 6 -1.</_> + <_> + 9 2 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 12 5 12 6 -1.</_> + <_> + 18 5 6 3 2.</_> + <_> + 12 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 8 6 9 -1.</_> + <_> + 8 11 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 7 20 6 -1.</_> + <_> + 2 9 20 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 12 6 -1.</_> + <_> + 0 5 6 3 2.</_> + <_> + 6 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 14 14 8 10 -1.</_> + <_> + 18 14 4 5 2.</_> + <_> + 14 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 14 8 10 -1.</_> + <_> + 2 14 4 5 2.</_> + <_> + 6 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 11 20 13 -1.</_> + <_> + 2 11 10 13 2.</_></rects></_> + <_> + <rects> + <_> + 6 9 12 5 -1.</_> + <_> + 12 9 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 16 6 -1.</_> + <_> + 13 6 8 3 2.</_> + <_> + 5 9 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 19 9 4 -1.</_> + <_> + 1 21 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 7 5 12 5 -1.</_> + <_> + 11 5 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 3 5 14 12 -1.</_> + <_> + 3 5 7 6 2.</_> + <_> + 10 11 7 6 2.</_></rects></_> + <_> + <rects> + <_> + 9 4 9 6 -1.</_> + <_> + 12 4 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 2 6 19 3 -1.</_> + <_> + 2 7 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 18 10 6 9 -1.</_> + <_> + 18 13 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 7 18 2 -1.</_> + <_> + 3 8 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 20 2 4 18 -1.</_> + <_> + 22 2 2 9 2.</_> + <_> + 20 11 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 2 18 20 3 -1.</_> + <_> + 2 19 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 9 22 3 -1.</_> + <_> + 1 10 22 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 4 18 -1.</_> + <_> + 0 2 2 9 2.</_> + <_> + 2 11 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 19 0 4 23 -1.</_> + <_> + 19 0 2 23 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 6 19 -1.</_> + <_> + 3 3 3 19 2.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 9 -1.</_> + <_> + 20 2 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 10 6 -1.</_> + <_> + 0 7 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 12 12 -1.</_> + <_> + 13 0 6 6 2.</_> + <_> + 7 6 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 24 6 -1.</_> + <_> + 0 3 12 3 2.</_> + <_> + 12 6 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 10 14 4 10 -1.</_> + <_> + 10 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 8 9 4 15 -1.</_> + <_> + 8 14 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 4 11 17 6 -1.</_> + <_> + 4 14 17 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 5 18 8 -1.</_> + <_> + 2 5 9 4 2.</_> + <_> + 11 9 9 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 14 6 -1.</_> + <_> + 14 6 7 3 2.</_> + <_> + 7 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 6 14 6 -1.</_> + <_> + 3 6 7 3 2.</_> + <_> + 10 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 16 5 3 18 -1.</_> + <_> + 17 5 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 5 5 3 18 -1.</_> + <_> + 6 5 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 10 10 14 4 -1.</_> + <_> + 10 12 14 2 2.</_></rects></_> + <_> + <rects> + <_> + 4 10 9 4 -1.</_> + <_> + 4 12 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 0 18 9 -1.</_> + <_> + 2 3 18 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 3 12 8 -1.</_> + <_> + 10 3 4 8 3.</_></rects></_> + <_> + <rects> + <_> + 1 1 8 5 -1.</_> + <_> + 5 1 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 12 7 7 8 -1.</_> + <_> + 12 11 7 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 12 22 4 -1.</_> + <_> + 0 14 22 2 2.</_></rects></_> + <_> + <rects> + <_> + 15 6 4 15 -1.</_> + <_> + 15 11 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 5 7 7 8 -1.</_> + <_> + 5 11 7 4 2.</_></rects></_> + <_> + <rects> + <_> + 8 18 9 4 -1.</_> + <_> + 8 20 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 2 22 4 -1.</_> + <_> + 1 4 22 2 2.</_></rects></_> + <_> + <rects> + <_> + 17 3 6 17 -1.</_> + <_> + 19 3 2 17 3.</_></rects></_> + <_> + <rects> + <_> + 8 2 8 18 -1.</_> + <_> + 8 11 8 9 2.</_></rects></_> + <_> + <rects> + <_> + 17 0 6 12 -1.</_> + <_> + 20 0 3 6 2.</_> + <_> + 17 6 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 6 9 -1.</_> + <_> + 9 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 15 5 9 12 -1.</_> + <_> + 15 11 9 6 2.</_></rects></_> + <_> + <rects> + <_> + 2 22 18 2 -1.</_> + <_> + 2 23 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 10 10 12 6 -1.</_> + <_> + 16 10 6 3 2.</_> + <_> + 10 13 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 4 11 -1.</_> + <_> + 2 1 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 20 0 4 10 -1.</_> + <_> + 20 0 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 1 3 6 17 -1.</_> + <_> + 3 3 2 17 3.</_></rects></_> + <_> + <rects> + <_> + 15 15 9 6 -1.</_> + <_> + 15 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 13 8 9 -1.</_> + <_> + 0 16 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 16 8 6 12 -1.</_> + <_> + 16 12 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 2 8 6 12 -1.</_> + <_> + 2 12 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 10 2 4 15 -1.</_> + <_> + 10 7 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 1 5 19 3 -1.</_> + <_> + 1 6 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 11 8 9 7 -1.</_> + <_> + 14 8 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 3 8 12 9 -1.</_> + <_> + 3 11 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 6 18 3 -1.</_> + <_> + 3 7 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 4 12 -1.</_> + <_> + 10 6 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 9 18 14 -1.</_> + <_> + 3 9 9 14 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 4 9 -1.</_> + <_> + 2 0 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 12 5 4 18 -1.</_> + <_> + 12 5 2 18 2.</_></rects></_> + <_> + <rects> + <_> + 8 5 4 18 -1.</_> + <_> + 10 5 2 18 2.</_></rects></_> + <_> + <rects> + <_> + 10 5 6 10 -1.</_> + <_> + 12 5 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 9 4 4 11 -1.</_> + <_> + 11 4 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 4 16 18 3 -1.</_> + <_> + 4 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 20 3 -1.</_> + <_> + 0 17 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 9 6 12 -1.</_> + <_> + 9 13 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 8 13 8 8 -1.</_> + <_> + 8 17 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 13 10 3 12 -1.</_> + <_> + 13 16 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 9 14 14 -1.</_> + <_> + 5 9 7 7 2.</_> + <_> + 12 16 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 10 -1.</_> + <_> + 12 0 12 5 2.</_> + <_> + 0 5 12 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 11 18 2 -1.</_> + <_> + 1 12 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 19 5 5 12 -1.</_> + <_> + 19 9 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 5 12 -1.</_> + <_> + 0 9 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 16 6 8 18 -1.</_> + <_> + 20 6 4 9 2.</_> + <_> + 16 15 4 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 6 8 18 -1.</_> + <_> + 0 6 4 9 2.</_> + <_> + 4 15 4 9 2.</_></rects></_> + <_> + <rects> + <_> + 12 5 12 12 -1.</_> + <_> + 18 5 6 6 2.</_> + <_> + 12 11 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 6 9 -1.</_> + <_> + 9 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 13 6 11 -1.</_> + <_> + 11 13 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 12 12 -1.</_> + <_> + 0 5 6 6 2.</_> + <_> + 6 11 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 2 23 3 -1.</_> + <_> + 1 3 23 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 15 19 3 -1.</_> + <_> + 1 16 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 13 17 11 4 -1.</_> + <_> + 13 19 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 13 8 5 -1.</_> + <_> + 4 13 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 12 10 10 4 -1.</_> + <_> + 12 10 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 6 9 9 -1.</_> + <_> + 4 9 9 3 3.</_></rects></_> + <_> + <rects> + <_> + 15 14 9 6 -1.</_> + <_> + 15 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 12 9 6 -1.</_> + <_> + 1 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 10 20 8 -1.</_> + <_> + 13 10 10 4 2.</_> + <_> + 3 14 10 4 2.</_></rects></_> + <_> + <rects> + <_> + 2 0 9 18 -1.</_> + <_> + 5 0 3 18 3.</_></rects></_> + <_> + <rects> + <_> + 13 11 9 10 -1.</_> + <_> + 16 11 3 10 3.</_></rects></_> + <_> + <rects> + <_> + 1 2 8 5 -1.</_> + <_> + 5 2 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 4 21 6 -1.</_> + <_> + 10 4 7 6 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 10 14 -1.</_> + <_> + 7 0 5 7 2.</_> + <_> + 12 7 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 12 17 12 4 -1.</_> + <_> + 12 19 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 6 23 4 -1.</_> + <_> + 0 8 23 2 2.</_></rects></_> + <_> + <rects> + <_> + 13 10 8 10 -1.</_> + <_> + 17 10 4 5 2.</_> + <_> + 13 15 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 16 18 3 -1.</_> + <_> + 0 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 15 16 9 4 -1.</_> + <_> + 15 18 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 16 9 4 -1.</_> + <_> + 0 18 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 13 11 6 6 -1.</_> + <_> + 13 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 11 6 6 -1.</_> + <_> + 8 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 24 6 -1.</_> + <_> + 12 3 12 3 2.</_> + <_> + 0 6 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 4 18 3 -1.</_> + <_> + 2 5 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 4 -1.</_> + <_> + 12 0 12 2 2.</_> + <_> + 0 2 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 16 18 3 -1.</_> + <_> + 1 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 15 15 9 6 -1.</_> + <_> + 15 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 9 6 -1.</_> + <_> + 0 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 17 18 3 -1.</_> + <_> + 6 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 8 6 10 -1.</_> + <_> + 10 8 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 6 9 -1.</_> + <_> + 12 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 8 5 8 -1.</_> + <_> + 8 12 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 12 8 6 8 -1.</_> + <_> + 12 12 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 6 11 -1.</_> + <_> + 8 5 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 13 6 8 9 -1.</_> + <_> + 13 9 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 7 21 6 -1.</_> + <_> + 1 9 21 2 3.</_></rects></_> + <_> + <rects> + <_> + 15 5 3 12 -1.</_> + <_> + 15 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 9 11 12 -1.</_> + <_> + 6 13 11 4 3.</_></rects></_> + <_> + <rects> + <_> + 13 8 10 8 -1.</_> + <_> + 18 8 5 4 2.</_> + <_> + 13 12 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 5 8 12 3 -1.</_> + <_> + 11 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 11 18 4 -1.</_> + <_> + 12 11 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 22 22 -1.</_> + <_> + 0 11 22 11 2.</_></rects></_> + <_> + <rects> + <_> + 11 2 6 8 -1.</_> + <_> + 11 6 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 9 -1.</_> + <_> + 11 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 6 9 -1.</_> + <_> + 12 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 3 6 14 -1.</_> + <_> + 8 3 3 7 2.</_> + <_> + 11 10 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 10 18 8 -1.</_> + <_> + 9 10 6 8 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 3 14 -1.</_> + <_> + 10 7 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 4 3 16 20 -1.</_> + <_> + 4 13 16 10 2.</_></rects></_> + <_> + <rects> + <_> + 9 4 6 10 -1.</_> + <_> + 11 4 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 16 4 -1.</_> + <_> + 5 2 16 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 5 18 4 -1.</_> + <_> + 8 5 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 6 9 -1.</_> + <_> + 15 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 4 8 5 -1.</_> + <_> + 12 4 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 12 10 10 4 -1.</_> + <_> + 12 10 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 2 10 10 4 -1.</_> + <_> + 7 10 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 11 12 5 -1.</_> + <_> + 11 11 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 3 10 8 10 -1.</_> + <_> + 3 10 4 5 2.</_> + <_> + 7 15 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 11 12 9 8 -1.</_> + <_> + 14 12 3 8 3.</_></rects></_> + <_> + <rects> + <_> + 0 21 24 3 -1.</_> + <_> + 8 21 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 20 18 4 -1.</_> + <_> + 9 20 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 1 15 9 6 -1.</_> + <_> + 1 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 11 17 10 4 -1.</_> + <_> + 11 19 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 12 4 12 -1.</_> + <_> + 9 18 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 9 6 -1.</_> + <_> + 12 6 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 1 13 6 9 -1.</_> + <_> + 1 16 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 16 12 4 -1.</_> + <_> + 6 18 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 5 20 3 -1.</_> + <_> + 1 6 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 1 9 9 -1.</_> + <_> + 8 4 9 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 19 9 4 -1.</_> + <_> + 2 21 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 11 1 4 18 -1.</_> + <_> + 11 7 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 7 2 8 12 -1.</_> + <_> + 7 2 4 6 2.</_> + <_> + 11 8 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 11 10 9 8 -1.</_> + <_> + 14 10 3 8 3.</_></rects></_> + <_> + <rects> + <_> + 5 11 12 5 -1.</_> + <_> + 9 11 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 11 9 9 6 -1.</_> + <_> + 14 9 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 10 6 9 -1.</_> + <_> + 7 10 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 4 7 5 12 -1.</_> + <_> + 4 11 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 21 6 -1.</_> + <_> + 9 0 7 6 3.</_></rects></_> + <_> + <rects> + <_> + 7 6 10 6 -1.</_> + <_> + 7 8 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 15 -1.</_> + <_> + 11 0 2 15 3.</_></rects></_> + <_> + <rects> + <_> + 2 2 18 2 -1.</_> + <_> + 2 3 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 8 17 8 6 -1.</_> + <_> + 8 20 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 0 18 2 -1.</_> + <_> + 3 1 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 8 0 9 6 -1.</_> + <_> + 11 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 17 18 3 -1.</_> + <_> + 0 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 7 12 5 -1.</_> + <_> + 10 7 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 6 9 -1.</_> + <_> + 2 3 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 20 2 4 9 -1.</_> + <_> + 20 2 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 4 9 -1.</_> + <_> + 2 2 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 4 -1.</_> + <_> + 12 1 12 2 2.</_> + <_> + 0 3 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 16 9 6 -1.</_> + <_> + 0 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 13 9 6 -1.</_> + <_> + 14 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 19 3 -1.</_> + <_> + 0 16 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 5 22 12 -1.</_> + <_> + 12 5 11 6 2.</_> + <_> + 1 11 11 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 13 6 6 -1.</_> + <_> + 8 13 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 2 20 3 -1.</_> + <_> + 4 3 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 14 6 10 -1.</_> + <_> + 10 14 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 6 12 16 6 -1.</_> + <_> + 14 12 8 3 2.</_> + <_> + 6 15 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 13 8 9 -1.</_> + <_> + 2 16 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 11 8 6 14 -1.</_> + <_> + 14 8 3 7 2.</_> + <_> + 11 15 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 2 12 16 6 -1.</_> + <_> + 2 12 8 3 2.</_> + <_> + 10 15 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 16 16 8 -1.</_> + <_> + 5 20 16 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 1 4 12 -1.</_> + <_> + 9 7 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 8 2 8 10 -1.</_> + <_> + 12 2 4 5 2.</_> + <_> + 8 7 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 12 6 -1.</_> + <_> + 6 6 6 3 2.</_> + <_> + 12 9 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 10 7 6 9 -1.</_> + <_> + 12 7 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 8 12 -1.</_> + <_> + 0 0 4 6 2.</_> + <_> + 4 6 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 18 8 6 9 -1.</_> + <_> + 18 11 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 12 6 6 -1.</_> + <_> + 5 12 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 21 21 3 -1.</_> + <_> + 10 21 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 16 6 -1.</_> + <_> + 2 3 16 3 2.</_></rects></_> + <_> + <rects> + <_> + 13 6 7 6 -1.</_> + <_> + 13 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 4 14 -1.</_> + <_> + 6 11 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 7 6 9 -1.</_> + <_> + 11 7 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 8 6 14 -1.</_> + <_> + 7 8 3 7 2.</_> + <_> + 10 15 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 18 8 4 16 -1.</_> + <_> + 18 16 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 9 14 6 10 -1.</_> + <_> + 11 14 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 6 11 12 5 -1.</_> + <_> + 10 11 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 23 3 -1.</_> + <_> + 0 13 23 1 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 6 12 -1.</_> + <_> + 15 0 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 0 10 12 5 -1.</_> + <_> + 4 10 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 13 2 10 4 -1.</_> + <_> + 13 4 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 6 12 -1.</_> + <_> + 7 0 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 11 6 9 6 -1.</_> + <_> + 14 6 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 4 6 9 6 -1.</_> + <_> + 7 6 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 11 18 13 -1.</_> + <_> + 12 11 6 13 3.</_></rects></_> + <_> + <rects> + <_> + 0 11 18 13 -1.</_> + <_> + 6 11 6 13 3.</_></rects></_> + <_> + <rects> + <_> + 12 16 12 6 -1.</_> + <_> + 16 16 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 21 3 -1.</_> + <_> + 0 7 21 1 3.</_></rects></_> + <_> + <rects> + <_> + 12 16 12 6 -1.</_> + <_> + 16 16 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 7 6 14 -1.</_> + <_> + 5 14 6 7 2.</_></rects></_> + <_> + <rects> + <_> + 5 10 19 2 -1.</_> + <_> + 5 11 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 5 4 14 4 -1.</_> + <_> + 5 6 14 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 18 18 4 -1.</_> + <_> + 9 18 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 4 9 -1.</_> + <_> + 9 0 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 13 3 11 4 -1.</_> + <_> + 13 5 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 0 9 6 -1.</_> + <_> + 5 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 19 1 4 23 -1.</_> + <_> + 19 1 2 23 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 4 23 -1.</_> + <_> + 3 1 2 23 2.</_></rects></_> + <_> + <rects> + <_> + 5 16 18 3 -1.</_> + <_> + 5 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 11 4 -1.</_> + <_> + 0 5 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 16 20 3 -1.</_> + <_> + 2 17 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 3 13 4 -1.</_> + <_> + 5 5 13 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 9 22 15 -1.</_> + <_> + 1 9 11 15 2.</_></rects></_> + <_> + <rects> + <_> + 3 4 14 3 -1.</_> + <_> + 10 4 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 7 10 4 -1.</_> + <_> + 8 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 10 4 -1.</_> + <_> + 11 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 4 6 9 -1.</_> + <_> + 12 4 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 1 12 9 6 -1.</_> + <_> + 4 12 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 8 3 8 10 -1.</_> + <_> + 12 3 4 5 2.</_> + <_> + 8 8 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 6 16 6 -1.</_> + <_> + 3 6 8 3 2.</_> + <_> + 11 9 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 6 -1.</_> + <_> + 5 9 14 3 2.</_></rects></_> + <_> + <rects> + <_> + 4 3 9 6 -1.</_> + <_> + 4 5 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 3 18 2 -1.</_> + <_> + 6 4 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 9 6 -1.</_> + <_> + 10 6 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 3 -1.</_> + <_> + 0 2 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 17 10 6 -1.</_> + <_> + 0 19 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 18 18 3 -1.</_> + <_> + 3 19 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 5 6 16 -1.</_> + <_> + 2 5 3 8 2.</_> + <_> + 5 13 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 11 6 -1.</_> + <_> + 7 8 11 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 2 12 22 -1.</_> + <_> + 5 13 12 11 2.</_></rects></_> + <_> + <rects> + <_> + 10 7 4 10 -1.</_> + <_> + 10 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 9 0 4 18 -1.</_> + <_> + 9 6 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 18 8 6 9 -1.</_> + <_> + 18 11 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 7 15 10 -1.</_> + <_> + 9 7 5 10 3.</_></rects></_> + <_> + <rects> + <_> + 10 5 6 9 -1.</_> + <_> + 12 5 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 9 6 10 -1.</_> + <_> + 11 9 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 11 14 6 10 -1.</_> + <_> + 13 14 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 7 14 6 10 -1.</_> + <_> + 9 14 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 4 8 16 9 -1.</_> + <_> + 4 11 16 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 11 20 3 -1.</_> + <_> + 2 12 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 4 13 -1.</_> + <_> + 13 0 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 4 13 -1.</_> + <_> + 9 0 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 3 1 18 7 -1.</_> + <_> + 9 1 6 7 3.</_></rects></_> + <_> + <rects> + <_> + 1 11 6 9 -1.</_> + <_> + 1 14 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 18 9 6 -1.</_> + <_> + 8 20 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 9 15 6 -1.</_> + <_> + 3 11 15 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 10 19 2 -1.</_> + <_> + 5 11 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 8 6 7 16 -1.</_> + <_> + 8 14 7 8 2.</_></rects></_> + <_> + <rects> + <_> + 9 14 9 6 -1.</_> + <_> + 9 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 7 8 12 -1.</_> + <_> + 0 11 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 6 4 18 3 -1.</_> + <_> + 6 5 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 12 6 -1.</_> + <_> + 4 16 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 13 13 9 4 -1.</_> + <_> + 13 15 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 8 14 14 -1.</_> + <_> + 5 8 7 7 2.</_> + <_> + 12 15 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 1 16 22 6 -1.</_> + <_> + 12 16 11 3 2.</_> + <_> + 1 19 11 3 2.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 9 -1.</_> + <_> + 11 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 5 10 10 -1.</_> + <_> + 14 5 5 5 2.</_> + <_> + 9 10 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 5 10 10 -1.</_> + <_> + 5 5 5 5 2.</_> + <_> + 10 10 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 4 6 16 6 -1.</_> + <_> + 12 6 8 3 2.</_> + <_> + 4 9 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 7 6 9 -1.</_> + <_> + 0 10 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 16 10 8 14 -1.</_> + <_> + 20 10 4 7 2.</_> + <_> + 16 17 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 12 -1.</_> + <_> + 9 18 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 8 10 8 12 -1.</_> + <_> + 12 10 4 6 2.</_> + <_> + 8 16 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 8 0 4 9 -1.</_> + <_> + 10 0 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 10 4 8 16 -1.</_> + <_> + 14 4 4 8 2.</_> + <_> + 10 12 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 7 10 10 6 -1.</_> + <_> + 7 12 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 14 -1.</_> + <_> + 12 6 7 7 2.</_> + <_> + 5 13 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 2 11 20 2 -1.</_> + <_> + 2 12 20 1 2.</_></rects></_> + <_> + <rects> + <_> + 18 8 4 16 -1.</_> + <_> + 18 16 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 1 11 12 10 -1.</_> + <_> + 1 11 6 5 2.</_> + <_> + 7 16 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 9 12 4 -1.</_> + <_> + 6 11 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 7 -1.</_> + <_> + 12 12 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 10 4 8 16 -1.</_> + <_> + 14 4 4 8 2.</_> + <_> + 10 12 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 8 16 -1.</_> + <_> + 6 4 4 8 2.</_> + <_> + 10 12 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 8 9 9 6 -1.</_> + <_> + 11 9 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 1 5 16 12 -1.</_> + <_> + 1 5 8 6 2.</_> + <_> + 9 11 8 6 2.</_></rects></_> + <_> + <rects> + <_> + 9 9 6 8 -1.</_> + <_> + 9 9 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 3 18 -1.</_> + <_> + 7 0 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 17 9 5 14 -1.</_> + <_> + 17 16 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 2 9 5 14 -1.</_> + <_> + 2 16 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 7 4 10 6 -1.</_> + <_> + 7 7 10 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 3 23 18 -1.</_> + <_> + 1 9 23 6 3.</_></rects></_> + <_> + <rects> + <_> + 1 1 21 3 -1.</_> + <_> + 8 1 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 18 12 6 -1.</_> + <_> + 3 18 6 3 2.</_> + <_> + 9 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 16 8 8 16 -1.</_> + <_> + 20 8 4 8 2.</_> + <_> + 16 16 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 0 19 24 4 -1.</_> + <_> + 8 19 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 16 8 8 16 -1.</_> + <_> + 20 8 4 8 2.</_> + <_> + 16 16 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 0 8 8 16 -1.</_> + <_> + 0 8 4 8 2.</_> + <_> + 4 16 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 8 12 8 10 -1.</_> + <_> + 8 17 8 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 7 5 8 -1.</_> + <_> + 5 11 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 1 19 2 -1.</_> + <_> + 4 2 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 12 24 9 -1.</_> + <_> + 8 12 8 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 13 8 -1.</_> + <_> + 6 4 13 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 3 -1.</_> + <_> + 0 1 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 20 3 4 11 -1.</_> + <_> + 20 3 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 8 6 6 9 -1.</_> + <_> + 10 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 11 12 8 -1.</_> + <_> + 12 11 6 4 2.</_> + <_> + 6 15 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 8 12 6 -1.</_> + <_> + 0 8 6 3 2.</_> + <_> + 6 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 17 18 3 -1.</_> + <_> + 6 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 9 6 -1.</_> + <_> + 0 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 20 3 4 9 -1.</_> + <_> + 20 3 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 4 9 -1.</_> + <_> + 2 3 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 15 0 9 19 -1.</_> + <_> + 18 0 3 19 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 9 19 -1.</_> + <_> + 3 0 3 19 3.</_></rects></_> + <_> + <rects> + <_> + 13 11 6 8 -1.</_> + <_> + 13 11 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 5 11 6 8 -1.</_> + <_> + 8 11 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 5 11 19 3 -1.</_> + <_> + 5 12 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 20 18 4 -1.</_> + <_> + 9 20 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 6 6 16 6 -1.</_> + <_> + 6 8 16 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 9 6 -1.</_> + <_> + 9 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 10 3 4 14 -1.</_> + <_> + 10 10 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 1 5 15 12 -1.</_> + <_> + 1 11 15 6 2.</_></rects></_> + <_> + <rects> + <_> + 11 12 8 5 -1.</_> + <_> + 11 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 6 9 -1.</_> + <_> + 7 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 12 0 6 9 -1.</_> + <_> + 14 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 5 5 12 8 -1.</_> + <_> + 5 5 6 4 2.</_> + <_> + 11 9 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 13 12 11 6 -1.</_> + <_> + 13 14 11 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 13 21 3 -1.</_> + <_> + 0 14 21 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 1 8 12 -1.</_> + <_> + 12 1 4 6 2.</_> + <_> + 8 7 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 0 6 12 -1.</_> + <_> + 1 0 3 6 2.</_> + <_> + 4 6 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 2 2 21 2 -1.</_> + <_> + 2 3 21 1 2.</_></rects></_> + <_> + <rects> + <_> + 2 2 19 3 -1.</_> + <_> + 2 3 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 17 10 6 14 -1.</_> + <_> + 20 10 3 7 2.</_> + <_> + 17 17 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 1 10 6 14 -1.</_> + <_> + 1 10 3 7 2.</_> + <_> + 4 17 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 14 14 -1.</_> + <_> + 14 6 7 7 2.</_> + <_> + 7 13 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 12 9 6 -1.</_> + <_> + 0 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 15 14 8 9 -1.</_> + <_> + 15 17 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 1 22 4 -1.</_> + <_> + 1 1 11 2 2.</_> + <_> + 12 3 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 11 9 6 -1.</_> + <_> + 9 13 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 18 3 -1.</_> + <_> + 0 16 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 16 14 7 9 -1.</_> + <_> + 16 17 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 3 16 4 -1.</_> + <_> + 12 3 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 12 5 -1.</_> + <_> + 7 6 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 4 9 -1.</_> + <_> + 11 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 12 1 4 10 -1.</_> + <_> + 12 1 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 8 1 4 10 -1.</_> + <_> + 10 1 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 15 15 6 9 -1.</_> + <_> + 15 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 15 6 9 -1.</_> + <_> + 3 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 15 1 3 19 -1.</_> + <_> + 16 1 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 1 3 6 9 -1.</_> + <_> + 3 3 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 15 0 3 19 -1.</_> + <_> + 16 0 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 6 3 12 4 -1.</_> + <_> + 12 3 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 5 4 9 -1.</_> + <_> + 10 5 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 3 19 -1.</_> + <_> + 7 0 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 11 1 3 12 -1.</_> + <_> + 11 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 10 5 -1.</_> + <_> + 11 7 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 11 3 3 18 -1.</_> + <_> + 12 3 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 9 3 6 12 -1.</_> + <_> + 11 3 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 3 7 19 3 -1.</_> + <_> + 3 8 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 7 18 3 -1.</_> + <_> + 2 8 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 13 18 4 -1.</_> + <_> + 12 13 9 2 2.</_> + <_> + 3 15 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 5 6 9 -1.</_> + <_> + 5 5 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 4 1 20 4 -1.</_> + <_> + 14 1 10 2 2.</_> + <_> + 4 3 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 20 4 -1.</_> + <_> + 0 1 10 2 2.</_> + <_> + 10 3 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 10 15 6 6 -1.</_> + <_> + 10 15 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 8 -1.</_> + <_> + 8 2 8 8 3.</_></rects></_> + <_> + <rects> + <_> + 5 5 18 3 -1.</_> + <_> + 5 6 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 15 6 6 -1.</_> + <_> + 11 15 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 11 12 8 5 -1.</_> + <_> + 11 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 12 8 5 -1.</_> + <_> + 9 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 14 6 -1.</_> + <_> + 5 2 14 2 3.</_></rects></_> + <_> + <rects> + <_> + 10 2 4 15 -1.</_> + <_> + 10 7 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 10 7 5 12 -1.</_> + <_> + 10 11 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 7 9 8 14 -1.</_> + <_> + 7 9 4 7 2.</_> + <_> + 11 16 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 1 5 22 6 -1.</_> + <_> + 12 5 11 3 2.</_> + <_> + 1 8 11 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 5 6 6 -1.</_> + <_> + 0 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 12 17 9 4 -1.</_> + <_> + 12 19 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 18 19 3 -1.</_> + <_> + 2 19 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 12 17 9 4 -1.</_> + <_> + 12 19 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 17 18 3 -1.</_> + <_> + 1 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 12 17 9 4 -1.</_> + <_> + 12 19 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 3 -1.</_> + <_> + 0 1 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 14 4 -1.</_> + <_> + 5 2 14 2 2.</_></rects></_> + <_> + <rects> + <_> + 6 14 9 6 -1.</_> + <_> + 6 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 13 6 9 -1.</_> + <_> + 14 16 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 20 13 4 -1.</_> + <_> + 5 22 13 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 9 6 12 -1.</_> + <_> + 9 13 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 21 3 -1.</_> + <_> + 8 10 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 8 9 6 -1.</_> + <_> + 11 8 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 3 10 9 7 -1.</_> + <_> + 6 10 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 12 10 10 8 -1.</_> + <_> + 17 10 5 4 2.</_> + <_> + 12 14 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 15 24 3 -1.</_> + <_> + 8 15 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 5 9 6 -1.</_> + <_> + 8 7 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 13 6 9 -1.</_> + <_> + 4 16 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 12 17 9 4 -1.</_> + <_> + 12 19 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 6 -1.</_> + <_> + 9 15 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 9 9 14 10 -1.</_> + <_> + 16 9 7 5 2.</_> + <_> + 9 14 7 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 9 14 10 -1.</_> + <_> + 1 9 7 5 2.</_> + <_> + 8 14 7 5 2.</_></rects></_> + <_> + <rects> + <_> + 8 7 9 17 -1.</_> + <_> + 11 7 3 17 3.</_></rects></_> + <_> + <rects> + <_> + 3 4 6 20 -1.</_> + <_> + 3 4 3 10 2.</_> + <_> + 6 14 3 10 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 10 4 -1.</_> + <_> + 7 8 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 7 4 9 -1.</_> + <_> + 12 7 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 10 15 6 9 -1.</_> + <_> + 12 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 8 6 16 -1.</_> + <_> + 3 8 3 8 2.</_> + <_> + 6 16 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 12 17 9 4 -1.</_> + <_> + 12 19 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 17 9 4 -1.</_> + <_> + 3 19 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 10 1 9 6 -1.</_> + <_> + 13 1 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 7 4 10 -1.</_> + <_> + 5 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 5 12 6 -1.</_> + <_> + 11 5 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 4 9 8 -1.</_> + <_> + 9 4 3 8 3.</_></rects></_> + <_> + <rects> + <_> + 12 16 10 8 -1.</_> + <_> + 17 16 5 4 2.</_> + <_> + 12 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 2 16 10 8 -1.</_> + <_> + 2 16 5 4 2.</_> + <_> + 7 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 4 -1.</_> + <_> + 12 0 12 2 2.</_> + <_> + 0 2 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 6 9 6 -1.</_> + <_> + 0 8 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 4 24 6 -1.</_> + <_> + 12 4 12 3 2.</_> + <_> + 0 7 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 11 4 -1.</_> + <_> + 5 2 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 22 4 -1.</_> + <_> + 12 1 11 2 2.</_> + <_> + 1 3 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 18 -1.</_> + <_> + 9 15 6 9 2.</_></rects></_> + <_> + <rects> + <_> + 2 9 20 4 -1.</_> + <_> + 2 11 20 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 2 14 14 -1.</_> + <_> + 5 9 14 7 2.</_></rects></_> + <_> + <rects> + <_> + 4 2 16 6 -1.</_> + <_> + 4 5 16 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 3 19 3 -1.</_> + <_> + 2 4 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 7 1 10 4 -1.</_> + <_> + 7 3 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 9 4 15 -1.</_> + <_> + 0 14 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 2 10 21 3 -1.</_> + <_> + 2 11 21 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 6 6 -1.</_> + <_> + 6 0 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 14 9 -1.</_> + <_> + 6 7 14 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 1 6 9 -1.</_> + <_> + 11 1 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 15 8 9 9 -1.</_> + <_> + 15 11 9 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 0 4 21 -1.</_> + <_> + 8 7 4 7 3.</_></rects></_> + <_> + <rects> + <_> + 3 22 19 2 -1.</_> + <_> + 3 23 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 2 15 20 3 -1.</_> + <_> + 2 16 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 19 0 4 13 -1.</_> + <_> + 19 0 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 1 7 8 8 -1.</_> + <_> + 1 11 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 14 14 6 9 -1.</_> + <_> + 14 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 14 6 9 -1.</_> + <_> + 4 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 14 5 4 10 -1.</_> + <_> + 14 5 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 4 10 -1.</_> + <_> + 8 5 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 14 5 6 6 -1.</_> + <_> + 14 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 4 5 6 6 -1.</_> + <_> + 4 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 21 -1.</_> + <_> + 8 2 8 21 3.</_></rects></_> + <_> + <rects> + <_> + 1 2 6 13 -1.</_> + <_> + 3 2 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 20 0 4 21 -1.</_> + <_> + 20 0 2 21 2.</_></rects></_> + <_> + <rects> + <_> + 0 4 4 20 -1.</_> + <_> + 2 4 2 20 2.</_></rects></_> + <_> + <rects> + <_> + 8 16 9 6 -1.</_> + <_> + 8 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 6 9 -1.</_> + <_> + 9 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 16 12 7 9 -1.</_> + <_> + 16 15 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 21 14 3 -1.</_> + <_> + 12 21 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 11 5 6 9 -1.</_> + <_> + 11 5 3 9 2.</_></rects></_> + <_> + <rects> + <_> + 10 5 4 10 -1.</_> + <_> + 12 5 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 10 6 6 9 -1.</_> + <_> + 12 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 5 6 9 -1.</_> + <_> + 10 5 3 9 2.</_></rects></_> + <_> + <rects> + <_> + 14 14 10 4 -1.</_> + <_> + 14 16 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 5 14 14 -1.</_> + <_> + 5 5 7 7 2.</_> + <_> + 12 12 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 12 8 12 6 -1.</_> + <_> + 18 8 6 3 2.</_> + <_> + 12 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 12 12 -1.</_> + <_> + 6 6 6 6 2.</_> + <_> + 12 12 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 11 13 6 10 -1.</_> + <_> + 13 13 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 20 8 -1.</_> + <_> + 1 10 10 4 2.</_> + <_> + 11 14 10 4 2.</_></rects></_> + <_> + <rects> + <_> + 15 13 9 6 -1.</_> + <_> + 15 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 9 -1.</_> + <_> + 9 3 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 10 1 5 14 -1.</_> + <_> + 10 8 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 4 16 6 -1.</_> + <_> + 3 6 16 2 3.</_></rects></_> + <_> + <rects> + <_> + 16 3 8 9 -1.</_> + <_> + 16 6 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 7 13 6 10 -1.</_> + <_> + 9 13 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 15 13 9 6 -1.</_> + <_> + 15 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 13 9 6 -1.</_> + <_> + 0 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 13 16 9 6 -1.</_> + <_> + 13 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 16 9 6 -1.</_> + <_> + 2 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 16 18 3 -1.</_> + <_> + 5 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 16 18 3 -1.</_> + <_> + 1 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 18 3 -1.</_> + <_> + 5 1 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 1 19 2 -1.</_> + <_> + 1 2 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 14 2 6 11 -1.</_> + <_> + 16 2 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 4 15 15 6 -1.</_> + <_> + 9 15 5 6 3.</_></rects></_> + <_> + <rects> + <_> + 14 2 6 11 -1.</_> + <_> + 16 2 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 4 2 6 11 -1.</_> + <_> + 6 2 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 9 -1.</_> + <_> + 18 5 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 2 22 4 -1.</_> + <_> + 1 2 11 2 2.</_> + <_> + 12 4 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 0 21 12 -1.</_> + <_> + 9 0 7 12 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 18 3 -1.</_> + <_> + 0 13 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 12 2 6 9 -1.</_> + <_> + 14 2 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 10 18 3 -1.</_> + <_> + 3 11 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 16 3 8 9 -1.</_> + <_> + 16 6 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 7 18 3 -1.</_> + <_> + 3 8 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 11 6 9 -1.</_> + <_> + 11 11 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 8 6 9 -1.</_> + <_> + 11 8 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 15 0 2 18 -1.</_> + <_> + 15 0 1 18 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 2 18 -1.</_> + <_> + 8 0 1 18 2.</_></rects></_> + <_> + <rects> + <_> + 17 3 7 9 -1.</_> + <_> + 17 6 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 18 9 6 -1.</_> + <_> + 3 20 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 18 21 3 -1.</_> + <_> + 3 19 21 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 7 9 -1.</_> + <_> + 0 6 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 7 22 3 -1.</_> + <_> + 2 8 22 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 24 16 -1.</_> + <_> + 0 3 12 8 2.</_> + <_> + 12 11 12 8 2.</_></rects></_> + <_> + <rects> + <_> + 13 17 9 4 -1.</_> + <_> + 13 19 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 5 12 8 -1.</_> + <_> + 5 5 6 4 2.</_> + <_> + 11 9 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 6 -1.</_> + <_> + 12 6 7 3 2.</_> + <_> + 5 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 16 14 6 -1.</_> + <_> + 5 16 7 3 2.</_> + <_> + 12 19 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 9 -1.</_> + <_> + 18 5 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 9 -1.</_> + <_> + 0 5 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 4 20 10 -1.</_> + <_> + 13 4 10 5 2.</_> + <_> + 3 9 10 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 13 9 8 -1.</_> + <_> + 5 13 3 8 3.</_></rects></_> + <_> + <rects> + <_> + 2 1 21 15 -1.</_> + <_> + 9 1 7 15 3.</_></rects></_> + <_> + <rects> + <_> + 5 12 14 8 -1.</_> + <_> + 12 12 7 8 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 12 4 -1.</_> + <_> + 6 7 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 9 6 -1.</_> + <_> + 9 5 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 13 11 6 6 -1.</_> + <_> + 13 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 11 6 6 -1.</_> + <_> + 8 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 18 2 -1.</_> + <_> + 6 5 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 11 -1.</_> + <_> + 2 2 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 18 0 6 15 -1.</_> + <_> + 20 0 2 15 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 13 -1.</_> + <_> + 2 0 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 12 0 6 9 -1.</_> + <_> + 14 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 6 9 -1.</_> + <_> + 8 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 4 -1.</_> + <_> + 8 2 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 3 13 18 4 -1.</_> + <_> + 12 13 9 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 7 10 4 -1.</_> + <_> + 9 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 5 8 12 3 -1.</_> + <_> + 11 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 4 14 19 3 -1.</_> + <_> + 4 15 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 4 20 -1.</_> + <_> + 10 10 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 8 15 9 6 -1.</_> + <_> + 8 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 9 15 4 -1.</_> + <_> + 7 9 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 8 4 12 7 -1.</_> + <_> + 12 4 4 7 3.</_></rects></_> + <_> + <rects> + <_> + 0 10 6 9 -1.</_> + <_> + 0 13 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 18 5 6 9 -1.</_> + <_> + 18 8 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 18 16 6 -1.</_> + <_> + 0 18 8 3 2.</_> + <_> + 8 21 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 9 18 14 6 -1.</_> + <_> + 16 18 7 3 2.</_> + <_> + 9 21 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 20 20 4 -1.</_> + <_> + 1 20 10 2 2.</_> + <_> + 11 22 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 8 20 6 -1.</_> + <_> + 12 8 10 3 2.</_> + <_> + 2 11 10 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 6 9 -1.</_> + <_> + 9 8 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 5 12 8 -1.</_> + <_> + 12 5 4 8 3.</_></rects></_> + <_> + <rects> + <_> + 4 5 12 8 -1.</_> + <_> + 8 5 4 8 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 6 9 -1.</_> + <_> + 12 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 6 16 -1.</_> + <_> + 4 0 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 15 4 6 12 -1.</_> + <_> + 15 8 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 3 4 6 12 -1.</_> + <_> + 3 8 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 15 12 9 6 -1.</_> + <_> + 15 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 0 15 22 -1.</_> + <_> + 4 11 15 11 2.</_></rects></_> + <_> + <rects> + <_> + 15 12 9 6 -1.</_> + <_> + 15 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 9 6 -1.</_> + <_> + 0 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 15 15 9 6 -1.</_> + <_> + 15 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 9 6 -1.</_> + <_> + 0 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 8 10 -1.</_> + <_> + 14 0 4 5 2.</_> + <_> + 10 5 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 0 4 16 -1.</_> + <_> + 3 0 2 16 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 10 6 -1.</_> + <_> + 7 8 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 10 12 4 10 -1.</_> + <_> + 10 17 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 8 4 10 6 -1.</_> + <_> + 8 6 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 22 18 2 -1.</_> + <_> + 12 22 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 11 6 -1.</_> + <_> + 7 9 11 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 12 10 -1.</_> + <_> + 0 0 6 5 2.</_> + <_> + 6 5 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 10 1 12 6 -1.</_> + <_> + 16 1 6 3 2.</_> + <_> + 10 4 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 16 9 4 -1.</_> + <_> + 7 18 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 7 15 16 -1.</_> + <_> + 10 7 5 16 3.</_></rects></_> + <_> + <rects> + <_> + 5 10 12 13 -1.</_> + <_> + 11 10 6 13 2.</_></rects></_> + <_> + <rects> + <_> + 6 2 12 6 -1.</_> + <_> + 12 2 6 3 2.</_> + <_> + 6 5 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 9 12 9 -1.</_> + <_> + 3 12 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 16 2 8 6 -1.</_> + <_> + 16 5 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 8 6 -1.</_> + <_> + 0 5 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 24 11 -1.</_> + <_> + 0 3 12 11 2.</_></rects></_> + <_> + <rects> + <_> + 0 13 8 10 -1.</_> + <_> + 0 13 4 5 2.</_> + <_> + 4 18 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 10 14 4 10 -1.</_> + <_> + 10 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 10 2 4 21 -1.</_> + <_> + 10 9 4 7 3.</_></rects></_> + <_> + <rects> + <_> + 4 4 15 9 -1.</_> + <_> + 4 7 15 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 6 -1.</_> + <_> + 8 1 8 6 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 5 16 -1.</_> + <_> + 9 14 5 8 2.</_></rects></_> + <_> + <rects> + <_> + 3 21 18 3 -1.</_> + <_> + 9 21 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 5 3 12 -1.</_> + <_> + 6 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 11 6 4 9 -1.</_> + <_> + 11 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 9 8 -1.</_> + <_> + 8 6 3 8 3.</_></rects></_> + <_> + <rects> + <_> + 4 3 20 2 -1.</_> + <_> + 4 4 20 1 2.</_></rects></_> + <_> + <rects> + <_> + 2 10 18 3 -1.</_> + <_> + 8 10 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 7 15 10 6 -1.</_> + <_> + 7 17 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 4 4 18 -1.</_> + <_> + 1 4 2 9 2.</_> + <_> + 3 13 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 13 0 6 9 -1.</_> + <_> + 15 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 6 9 -1.</_> + <_> + 7 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 11 0 6 9 -1.</_> + <_> + 13 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 7 9 6 -1.</_> + <_> + 9 7 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 18 2 -1.</_> + <_> + 3 1 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 10 20 4 -1.</_> + <_> + 0 10 10 2 2.</_> + <_> + 10 12 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 10 2 4 12 -1.</_> + <_> + 10 8 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 6 12 -1.</_> + <_> + 6 5 3 6 2.</_> + <_> + 9 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 18 22 -1.</_> + <_> + 15 0 9 11 2.</_> + <_> + 6 11 9 11 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 18 22 -1.</_> + <_> + 0 0 9 11 2.</_> + <_> + 9 11 9 11 2.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 11 -1.</_> + <_> + 20 2 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 11 -1.</_> + <_> + 2 2 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 11 0 6 9 -1.</_> + <_> + 13 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 20 3 -1.</_> + <_> + 0 1 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 2 20 2 -1.</_> + <_> + 2 3 20 1 2.</_></rects></_> + <_> + <rects> + <_> + 1 10 18 2 -1.</_> + <_> + 1 11 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 18 7 6 9 -1.</_> + <_> + 18 10 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 22 9 -1.</_> + <_> + 0 3 22 3 3.</_></rects></_> + <_> + <rects> + <_> + 17 3 6 9 -1.</_> + <_> + 17 6 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 7 6 9 -1.</_> + <_> + 0 10 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 24 6 -1.</_> + <_> + 0 8 24 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 10 -1.</_> + <_> + 2 2 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 6 9 -1.</_> + <_> + 12 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 6 9 -1.</_> + <_> + 9 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 15 0 6 9 -1.</_> + <_> + 17 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 6 9 -1.</_> + <_> + 5 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 6 -1.</_> + <_> + 15 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 17 18 3 -1.</_> + <_> + 0 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 15 14 9 6 -1.</_> + <_> + 15 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 23 6 -1.</_> + <_> + 0 17 23 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 15 18 3 -1.</_> + <_> + 5 16 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 9 6 -1.</_> + <_> + 0 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 8 8 10 -1.</_> + <_> + 13 8 4 5 2.</_> + <_> + 9 13 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 7 15 6 -1.</_> + <_> + 8 7 5 6 3.</_></rects></_> + <_> + <rects> + <_> + 9 8 8 10 -1.</_> + <_> + 13 8 4 5 2.</_> + <_> + 9 13 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 6 12 -1.</_> + <_> + 8 0 3 12 2.</_></rects></_> + <_> + <rects> + <_> + 9 8 8 10 -1.</_> + <_> + 13 8 4 5 2.</_> + <_> + 9 13 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 8 5 6 9 -1.</_> + <_> + 10 5 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 18 -1.</_> + <_> + 12 6 2 9 2.</_> + <_> + 10 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 5 7 12 4 -1.</_> + <_> + 11 7 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 8 8 10 -1.</_> + <_> + 13 8 4 5 2.</_> + <_> + 9 13 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 8 10 -1.</_> + <_> + 7 8 4 5 2.</_> + <_> + 11 13 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 11 10 6 14 -1.</_> + <_> + 14 10 3 7 2.</_> + <_> + 11 17 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 5 6 19 -1.</_> + <_> + 12 5 3 19 2.</_></rects></_> + <_> + <rects> + <_> + 6 12 12 6 -1.</_> + <_> + 12 12 6 3 2.</_> + <_> + 6 15 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 9 18 6 -1.</_> + <_> + 1 9 9 3 2.</_> + <_> + 10 12 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 16 14 8 10 -1.</_> + <_> + 20 14 4 5 2.</_> + <_> + 16 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 9 22 8 -1.</_> + <_> + 0 9 11 4 2.</_> + <_> + 11 13 11 4 2.</_></rects></_> + <_> + <rects> + <_> + 8 18 12 6 -1.</_> + <_> + 14 18 6 3 2.</_> + <_> + 8 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 6 20 18 -1.</_> + <_> + 0 6 10 9 2.</_> + <_> + 10 15 10 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 6 20 12 -1.</_> + <_> + 13 6 10 6 2.</_> + <_> + 3 12 10 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 16 10 8 -1.</_> + <_> + 0 16 5 4 2.</_> + <_> + 5 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 16 18 3 -1.</_> + <_> + 6 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 11 19 3 -1.</_> + <_> + 0 12 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 14 6 6 9 -1.</_> + <_> + 14 9 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 7 22 4 -1.</_> + <_> + 1 7 11 2 2.</_> + <_> + 12 9 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 13 6 7 12 -1.</_> + <_> + 13 10 7 4 3.</_></rects></_> + <_> + <rects> + <_> + 4 7 11 9 -1.</_> + <_> + 4 10 11 3 3.</_></rects></_> + <_> + <rects> + <_> + 12 10 10 8 -1.</_> + <_> + 17 10 5 4 2.</_> + <_> + 12 14 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 2 12 9 7 -1.</_> + <_> + 5 12 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 16 14 6 9 -1.</_> + <_> + 16 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 12 6 12 -1.</_> + <_> + 3 16 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 14 13 6 6 -1.</_> + <_> + 14 16 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 0 6 9 -1.</_> + <_> + 10 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 1 6 23 -1.</_> + <_> + 11 1 2 23 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 9 6 -1.</_> + <_> + 0 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 17 18 3 -1.</_> + <_> + 4 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 2 13 14 -1.</_> + <_> + 5 9 13 7 2.</_></rects></_> + <_> + <rects> + <_> + 15 0 8 12 -1.</_> + <_> + 19 0 4 6 2.</_> + <_> + 15 6 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 8 12 -1.</_> + <_> + 0 0 4 6 2.</_> + <_> + 4 6 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 8 2 8 7 -1.</_> + <_> + 8 2 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 6 9 -1.</_> + <_> + 3 1 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 14 8 6 12 -1.</_> + <_> + 17 8 3 6 2.</_> + <_> + 14 14 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 8 6 12 -1.</_> + <_> + 4 8 3 6 2.</_> + <_> + 7 14 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 16 5 5 15 -1.</_> + <_> + 16 10 5 5 3.</_></rects></_> + <_> + <rects> + <_> + 3 5 5 15 -1.</_> + <_> + 3 10 5 5 3.</_></rects></_> + <_> + <rects> + <_> + 18 4 6 9 -1.</_> + <_> + 18 7 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 7 6 15 -1.</_> + <_> + 1 12 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 11 15 12 8 -1.</_> + <_> + 17 15 6 4 2.</_> + <_> + 11 19 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 4 -1.</_> + <_> + 0 2 12 2 2.</_> + <_> + 12 4 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 15 1 2 19 -1.</_> + <_> + 15 1 1 19 2.</_></rects></_> + <_> + <rects> + <_> + 7 1 2 19 -1.</_> + <_> + 8 1 1 19 2.</_></rects></_> + <_> + <rects> + <_> + 22 1 2 20 -1.</_> + <_> + 22 1 1 20 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 2 20 -1.</_> + <_> + 1 1 1 20 2.</_></rects></_> + <_> + <rects> + <_> + 18 11 6 12 -1.</_> + <_> + 20 11 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 0 11 6 12 -1.</_> + <_> + 2 11 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 3 6 18 14 -1.</_> + <_> + 3 13 18 7 2.</_></rects></_> + <_> + <rects> + <_> + 6 10 7 8 -1.</_> + <_> + 6 14 7 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 9 12 12 -1.</_> + <_> + 7 13 12 4 3.</_></rects></_> + <_> + <rects> + <_> + 2 18 18 5 -1.</_> + <_> + 11 18 9 5 2.</_></rects></_> + <_> + <rects> + <_> + 4 21 20 3 -1.</_> + <_> + 4 22 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 12 -1.</_> + <_> + 9 12 3 6 2.</_> + <_> + 12 18 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 6 18 3 -1.</_> + <_> + 4 7 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 6 18 3 -1.</_> + <_> + 3 7 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 18 4 6 9 -1.</_> + <_> + 18 7 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 12 9 6 -1.</_> + <_> + 2 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 14 18 4 -1.</_> + <_> + 13 14 9 2 2.</_> + <_> + 4 16 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 6 14 -1.</_> + <_> + 7 7 3 7 2.</_> + <_> + 10 14 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 7 13 12 6 -1.</_> + <_> + 13 13 6 3 2.</_> + <_> + 7 16 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 12 9 -1.</_> + <_> + 10 7 4 9 3.</_></rects></_> + <_> + <rects> + <_> + 12 12 6 6 -1.</_> + <_> + 12 12 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 4 10 -1.</_> + <_> + 0 7 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 8 0 9 6 -1.</_> + <_> + 11 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 2 9 12 6 -1.</_> + <_> + 2 12 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 13 10 6 9 -1.</_> + <_> + 13 13 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 10 6 9 -1.</_> + <_> + 5 13 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 15 9 6 -1.</_> + <_> + 9 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 16 12 6 -1.</_> + <_> + 5 19 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 2 20 3 -1.</_> + <_> + 3 3 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 5 12 6 -1.</_> + <_> + 6 5 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 11 0 3 24 -1.</_> + <_> + 12 0 1 24 3.</_></rects></_> + <_> + <rects> + <_> + 3 16 15 4 -1.</_> + <_> + 8 16 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 12 -1.</_> + <_> + 9 18 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 15 12 8 -1.</_> + <_> + 1 15 6 4 2.</_> + <_> + 7 19 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 15 10 8 14 -1.</_> + <_> + 19 10 4 7 2.</_> + <_> + 15 17 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 1 9 8 14 -1.</_> + <_> + 1 9 4 7 2.</_> + <_> + 5 16 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 11 9 10 -1.</_> + <_> + 9 16 9 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 12 6 -1.</_> + <_> + 6 9 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 10 15 6 9 -1.</_> + <_> + 12 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 8 9 7 -1.</_> + <_> + 10 8 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 10 4 8 10 -1.</_> + <_> + 14 4 4 5 2.</_> + <_> + 10 9 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 4 6 6 9 -1.</_> + <_> + 4 9 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 24 12 -1.</_> + <_> + 8 6 8 12 3.</_></rects></_> + <_> + <rects> + <_> + 3 7 6 14 -1.</_> + <_> + 6 7 3 14 2.</_></rects></_> + <_> + <rects> + <_> + 19 8 5 8 -1.</_> + <_> + 19 12 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 8 5 8 -1.</_> + <_> + 0 12 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 17 3 6 6 -1.</_> + <_> + 17 6 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 3 6 6 -1.</_> + <_> + 1 6 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 9 -1.</_> + <_> + 18 5 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 9 -1.</_> + <_> + 0 5 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 3 18 6 -1.</_> + <_> + 3 5 18 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 3 9 6 -1.</_> + <_> + 2 5 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 3 10 8 -1.</_> + <_> + 14 3 5 4 2.</_> + <_> + 9 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 5 3 10 8 -1.</_> + <_> + 5 3 5 4 2.</_> + <_> + 10 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 11 6 12 -1.</_> + <_> + 10 11 3 12 2.</_></rects></_> + <_> + <rects> + <_> + 8 11 6 11 -1.</_> + <_> + 11 11 3 11 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 10 4 -1.</_> + <_> + 7 8 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 7 -1.</_> + <_> + 12 6 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 5 18 18 3 -1.</_> + <_> + 5 19 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 4 6 9 -1.</_> + <_> + 10 4 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 1 9 7 -1.</_> + <_> + 11 1 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 6 11 6 6 -1.</_> + <_> + 9 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 14 12 4 11 -1.</_> + <_> + 14 12 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 6 12 4 11 -1.</_> + <_> + 8 12 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 8 0 12 18 -1.</_> + <_> + 12 0 4 18 3.</_></rects></_> + <_> + <rects> + <_> + 2 12 10 5 -1.</_> + <_> + 7 12 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 20 22 3 -1.</_> + <_> + 2 21 22 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 4 2 20 -1.</_> + <_> + 1 4 1 20 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 4 -1.</_> + <_> + 8 2 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 7 8 10 4 -1.</_> + <_> + 7 10 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 8 10 -1.</_> + <_> + 6 7 4 5 2.</_> + <_> + 10 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 14 0 6 14 -1.</_> + <_> + 17 0 3 7 2.</_> + <_> + 14 7 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 4 11 5 8 -1.</_> + <_> + 4 15 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 2 0 20 9 -1.</_> + <_> + 2 3 20 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 7 12 8 -1.</_> + <_> + 6 7 6 4 2.</_> + <_> + 12 11 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 17 6 6 -1.</_> + <_> + 9 20 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 10 10 4 -1.</_> + <_> + 7 12 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 12 9 -1.</_> + <_> + 10 5 4 9 3.</_></rects></_> + <_> + <rects> + <_> + 5 11 6 8 -1.</_> + <_> + 8 11 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 18 4 4 17 -1.</_> + <_> + 18 4 2 17 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 6 -1.</_> + <_> + 3 0 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 18 4 4 17 -1.</_> + <_> + 18 4 2 17 2.</_></rects></_> + <_> + <rects> + <_> + 2 4 4 17 -1.</_> + <_> + 4 4 2 17 2.</_></rects></_> + <_> + <rects> + <_> + 5 18 19 3 -1.</_> + <_> + 5 19 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 11 0 2 18 -1.</_> + <_> + 11 9 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 15 4 2 18 -1.</_> + <_> + 15 13 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 4 2 18 -1.</_> + <_> + 7 13 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 11 10 8 -1.</_> + <_> + 12 11 5 4 2.</_> + <_> + 7 15 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 9 -1.</_> + <_> + 12 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 10 0 6 9 -1.</_> + <_> + 12 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 2 9 16 8 -1.</_> + <_> + 2 9 8 4 2.</_> + <_> + 10 13 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 14 15 6 9 -1.</_> + <_> + 14 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 7 6 9 -1.</_> + <_> + 10 7 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 14 15 6 9 -1.</_> + <_> + 14 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 12 12 6 -1.</_> + <_> + 3 14 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 12 9 6 -1.</_> + <_> + 14 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 12 9 6 -1.</_> + <_> + 1 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 7 18 3 -1.</_> + <_> + 3 8 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 7 22 6 -1.</_> + <_> + 1 9 22 2 3.</_></rects></_> + <_> + <rects> + <_> + 18 4 6 6 -1.</_> + <_> + 18 7 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 4 6 6 -1.</_> + <_> + 0 7 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 11 16 6 -1.</_> + <_> + 5 14 16 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 16 9 4 -1.</_> + <_> + 6 18 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 14 15 6 9 -1.</_> + <_> + 14 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 15 6 9 -1.</_> + <_> + 4 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 15 1 6 23 -1.</_> + <_> + 17 1 2 23 3.</_></rects></_> + <_> + <rects> + <_> + 0 21 24 3 -1.</_> + <_> + 8 21 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 20 24 4 -1.</_> + <_> + 8 20 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 3 1 6 23 -1.</_> + <_> + 5 1 2 23 3.</_></rects></_> + <_> + <rects> + <_> + 3 17 18 3 -1.</_> + <_> + 3 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 18 3 -1.</_> + <_> + 0 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 16 22 4 -1.</_> + <_> + 12 16 11 2 2.</_> + <_> + 1 18 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 16 9 6 -1.</_> + <_> + 0 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 10 21 3 -1.</_> + <_> + 9 10 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 18 12 6 -1.</_> + <_> + 2 18 6 3 2.</_> + <_> + 8 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 5 24 4 -1.</_> + <_> + 0 7 24 2 2.</_></rects></_> + <_> + <rects> + <_> + 10 2 4 15 -1.</_> + <_> + 10 7 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 10 7 6 12 -1.</_> + <_> + 10 13 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 6 9 -1.</_> + <_> + 8 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 11 0 6 9 -1.</_> + <_> + 13 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 7 6 9 -1.</_> + <_> + 11 7 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 2 1 20 3 -1.</_> + <_> + 2 2 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 18 12 6 -1.</_> + <_> + 1 18 6 3 2.</_> + <_> + 7 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 13 2 4 13 -1.</_> + <_> + 13 2 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 12 4 -1.</_> + <_> + 12 7 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 1 4 13 -1.</_> + <_> + 10 1 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 3 18 -1.</_> + <_> + 7 0 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 14 3 10 5 -1.</_> + <_> + 14 3 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 15 12 8 -1.</_> + <_> + 10 15 4 8 3.</_></rects></_> + <_> + <rects> + <_> + 9 10 6 9 -1.</_> + <_> + 11 10 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 3 4 9 -1.</_> + <_> + 10 3 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 17 0 6 14 -1.</_> + <_> + 20 0 3 7 2.</_> + <_> + 17 7 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 1 0 6 14 -1.</_> + <_> + 1 0 3 7 2.</_> + <_> + 4 7 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 14 0 6 16 -1.</_> + <_> + 17 0 3 8 2.</_> + <_> + 14 8 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 7 4 4 10 -1.</_> + <_> + 9 4 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 3 17 18 6 -1.</_> + <_> + 12 17 9 3 2.</_> + <_> + 3 20 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 20 22 4 -1.</_> + <_> + 12 20 11 4 2.</_></rects></_> + <_> + <rects> + <_> + 14 3 10 5 -1.</_> + <_> + 14 3 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 10 5 -1.</_> + <_> + 5 3 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 12 6 12 16 -1.</_> + <_> + 16 6 4 16 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 12 16 -1.</_> + <_> + 4 6 4 16 3.</_></rects></_> + <_> + <rects> + <_> + 10 9 5 15 -1.</_> + <_> + 10 14 5 5 3.</_></rects></_> + <_> + <rects> + <_> + 1 18 21 2 -1.</_> + <_> + 1 19 21 1 2.</_></rects></_> + <_> + <rects> + <_> + 15 0 9 6 -1.</_> + <_> + 15 2 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 1 12 4 -1.</_> + <_> + 12 1 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 12 12 -1.</_> + <_> + 12 0 6 6 2.</_> + <_> + 6 6 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 8 10 8 12 -1.</_> + <_> + 8 10 4 6 2.</_> + <_> + 12 16 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 14 16 10 8 -1.</_> + <_> + 19 16 5 4 2.</_> + <_> + 14 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 16 10 8 -1.</_> + <_> + 0 16 5 4 2.</_> + <_> + 5 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 12 12 5 -1.</_> + <_> + 14 12 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 6 16 10 8 -1.</_> + <_> + 6 16 5 4 2.</_> + <_> + 11 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 12 6 -1.</_> + <_> + 13 6 6 3 2.</_> + <_> + 7 9 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 4 18 -1.</_> + <_> + 9 6 2 9 2.</_> + <_> + 11 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 10 9 6 14 -1.</_> + <_> + 13 9 3 7 2.</_> + <_> + 10 16 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 8 9 6 14 -1.</_> + <_> + 8 9 3 7 2.</_> + <_> + 11 16 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 7 4 11 12 -1.</_> + <_> + 7 10 11 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 8 6 16 -1.</_> + <_> + 4 8 3 8 2.</_> + <_> + 7 16 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 17 3 4 21 -1.</_> + <_> + 17 10 4 7 3.</_></rects></_> + <_> + <rects> + <_> + 3 3 4 21 -1.</_> + <_> + 3 10 4 7 3.</_></rects></_> + <_> + <rects> + <_> + 10 1 8 18 -1.</_> + <_> + 14 1 4 9 2.</_> + <_> + 10 10 4 9 2.</_></rects></_> + <_> + <rects> + <_> + 2 5 16 8 -1.</_> + <_> + 2 5 8 4 2.</_> + <_> + 10 9 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 3 6 18 12 -1.</_> + <_> + 3 10 18 4 3.</_></rects></_> + <_> + <rects> + <_> + 4 10 16 12 -1.</_> + <_> + 4 14 16 4 3.</_></rects></_> + <_> + <rects> + <_> + 15 4 8 20 -1.</_> + <_> + 19 4 4 10 2.</_> + <_> + 15 14 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 7 2 9 6 -1.</_> + <_> + 10 2 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 15 4 8 20 -1.</_> + <_> + 19 4 4 10 2.</_> + <_> + 15 14 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 1 4 8 20 -1.</_> + <_> + 1 4 4 10 2.</_> + <_> + 5 14 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 11 8 8 14 -1.</_> + <_> + 15 8 4 7 2.</_> + <_> + 11 15 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 5 8 8 14 -1.</_> + <_> + 5 8 4 7 2.</_> + <_> + 9 15 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 10 13 5 8 -1.</_> + <_> + 10 17 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 13 7 9 -1.</_> + <_> + 4 16 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 13 24 10 -1.</_> + <_> + 0 18 24 5 2.</_></rects></_> + <_> + <rects> + <_> + 4 2 8 11 -1.</_> + <_> + 8 2 4 11 2.</_></rects></_> + <_> + <rects> + <_> + 10 2 8 16 -1.</_> + <_> + 14 2 4 8 2.</_> + <_> + 10 10 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 6 -1.</_> + <_> + 0 2 12 3 2.</_> + <_> + 12 5 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 12 9 -1.</_> + <_> + 6 3 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 2 12 12 -1.</_> + <_> + 1 2 6 6 2.</_> + <_> + 7 8 6 6 2.</_></rects></_> + <_> + <rects> + <_> + 18 5 6 9 -1.</_> + <_> + 18 8 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 3 8 10 -1.</_> + <_> + 4 3 4 5 2.</_> + <_> + 8 8 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 21 18 3 -1.</_> + <_> + 6 22 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 18 2 -1.</_> + <_> + 1 11 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 1 10 22 3 -1.</_> + <_> + 1 11 22 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 8 12 9 -1.</_> + <_> + 2 11 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 12 8 12 6 -1.</_> + <_> + 18 8 6 3 2.</_> + <_> + 12 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 8 12 6 -1.</_> + <_> + 0 8 6 3 2.</_> + <_> + 6 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 10 15 6 9 -1.</_> + <_> + 12 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 13 9 6 -1.</_> + <_> + 7 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 8 7 12 -1.</_> + <_> + 9 14 7 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 13 9 6 -1.</_> + <_> + 7 13 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 15 18 4 -1.</_> + <_> + 12 15 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 5 4 4 16 -1.</_> + <_> + 7 4 2 16 2.</_></rects></_> + <_> + <rects> + <_> + 10 15 6 9 -1.</_> + <_> + 12 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 15 6 9 -1.</_> + <_> + 10 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 11 12 10 -1.</_> + <_> + 15 11 6 5 2.</_> + <_> + 9 16 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 6 14 6 -1.</_> + <_> + 3 8 14 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 2 17 8 -1.</_> + <_> + 4 6 17 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 2 12 21 -1.</_> + <_> + 6 9 12 7 3.</_></rects></_> + <_> + <rects> + <_> + 8 1 9 9 -1.</_> + <_> + 8 4 9 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 7 24 3 -1.</_> + <_> + 12 7 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 11 6 9 10 -1.</_> + <_> + 11 11 9 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 11 18 3 -1.</_> + <_> + 2 12 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 16 9 4 -1.</_> + <_> + 8 18 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 9 6 -1.</_> + <_> + 0 2 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 11 24 6 -1.</_> + <_> + 0 13 24 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 9 20 6 -1.</_> + <_> + 2 12 20 3 2.</_></rects></_> + <_> + <rects> + <_> + 4 5 16 12 -1.</_> + <_> + 12 5 8 6 2.</_> + <_> + 4 11 8 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 2 4 15 -1.</_> + <_> + 10 7 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 7 3 10 4 -1.</_> + <_> + 7 5 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 15 6 8 -1.</_> + <_> + 9 19 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 17 0 7 10 -1.</_> + <_> + 17 5 7 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 7 10 -1.</_> + <_> + 0 5 7 5 2.</_></rects></_> + <_> + <rects> + <_> + 16 1 6 12 -1.</_> + <_> + 19 1 3 6 2.</_> + <_> + 16 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 0 19 8 -1.</_> + <_> + 1 4 19 4 2.</_></rects></_> + <_> + <rects> + <_> + 12 2 9 4 -1.</_> + <_> + 12 4 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 2 9 4 -1.</_> + <_> + 3 4 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 12 2 10 6 -1.</_> + <_> + 12 4 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 4 18 2 -1.</_> + <_> + 12 4 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 12 1 4 9 -1.</_> + <_> + 12 1 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 8 1 4 9 -1.</_> + <_> + 10 1 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 10 5 8 10 -1.</_> + <_> + 14 5 4 5 2.</_> + <_> + 10 10 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 12 13 -1.</_> + <_> + 10 4 4 13 3.</_></rects></_> + <_> + <rects> + <_> + 13 5 6 6 -1.</_> + <_> + 13 5 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 5 12 3 -1.</_> + <_> + 7 5 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 5 10 6 -1.</_> + <_> + 7 7 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 21 5 -1.</_> + <_> + 9 0 7 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 8 9 9 -1.</_> + <_> + 0 11 9 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 6 7 -1.</_> + <_> + 3 3 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 18 12 6 -1.</_> + <_> + 15 18 6 3 2.</_> + <_> + 9 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 8 20 6 -1.</_> + <_> + 2 8 10 3 2.</_> + <_> + 12 11 10 3 2.</_></rects></_> + <_> + <rects> + <_> + 13 2 10 4 -1.</_> + <_> + 13 4 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 4 5 5 18 -1.</_> + <_> + 4 11 5 6 3.</_></rects></_> + <_> + <rects> + <_> + 20 4 4 9 -1.</_> + <_> + 20 4 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 8 6 8 14 -1.</_> + <_> + 8 13 8 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 6 -1.</_> + <_> + 12 1 12 3 2.</_> + <_> + 0 4 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 4 4 9 -1.</_> + <_> + 2 4 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 6 18 3 -1.</_> + <_> + 3 7 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 17 16 6 -1.</_> + <_> + 3 19 16 2 3.</_></rects></_> + <_> + <rects> + <_> + 13 6 6 9 -1.</_> + <_> + 13 9 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 6 -1.</_> + <_> + 5 6 7 3 2.</_> + <_> + 12 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 13 5 8 10 -1.</_> + <_> + 17 5 4 5 2.</_> + <_> + 13 10 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 2 20 3 -1.</_> + <_> + 2 3 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 2 9 6 -1.</_> + <_> + 12 2 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 8 6 6 9 -1.</_> + <_> + 10 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 12 3 4 11 -1.</_> + <_> + 12 3 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 8 3 4 11 -1.</_> + <_> + 10 3 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 8 3 8 10 -1.</_> + <_> + 12 3 4 5 2.</_> + <_> + 8 8 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 11 1 2 18 -1.</_> + <_> + 12 1 1 18 2.</_></rects></_> + <_> + <rects> + <_> + 9 2 9 6 -1.</_> + <_> + 12 2 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 19 3 -1.</_> + <_> + 0 3 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 14 9 6 -1.</_> + <_> + 9 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 8 18 5 -1.</_> + <_> + 7 8 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 12 0 6 9 -1.</_> + <_> + 14 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 6 9 -1.</_> + <_> + 8 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 13 6 4 15 -1.</_> + <_> + 13 11 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 1 5 18 3 -1.</_> + <_> + 1 6 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 7 14 6 -1.</_> + <_> + 9 9 14 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 16 18 3 -1.</_> + <_> + 2 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 6 -1.</_> + <_> + 15 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 8 12 6 -1.</_> + <_> + 0 8 6 3 2.</_> + <_> + 6 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 9 13 7 8 -1.</_> + <_> + 9 17 7 4 2.</_></rects></_> + <_> + <rects> + <_> + 2 17 20 3 -1.</_> + <_> + 2 18 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 6 -1.</_> + <_> + 15 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 0 15 4 -1.</_> + <_> + 4 2 15 2 2.</_></rects></_> + <_> + <rects> + <_> + 17 2 6 6 -1.</_> + <_> + 17 5 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 6 9 -1.</_> + <_> + 0 6 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 6 -1.</_> + <_> + 15 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 17 9 6 -1.</_> + <_> + 0 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 18 12 6 -1.</_> + <_> + 15 18 6 3 2.</_> + <_> + 9 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 15 6 9 -1.</_> + <_> + 3 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 16 13 8 10 -1.</_> + <_> + 20 13 4 5 2.</_> + <_> + 16 18 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 14 24 4 -1.</_> + <_> + 8 14 8 4 3.</_></rects></_> + <_> + <rects> + <_> + 13 18 6 6 -1.</_> + <_> + 13 18 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 13 8 10 -1.</_> + <_> + 0 13 4 5 2.</_> + <_> + 4 18 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 14 24 6 -1.</_> + <_> + 0 17 24 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 2 12 8 -1.</_> + <_> + 5 2 6 4 2.</_> + <_> + 11 6 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 8 9 9 6 -1.</_> + <_> + 11 9 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 4 3 16 4 -1.</_> + <_> + 4 5 16 2 2.</_></rects></_> + <_> + <rects> + <_> + 10 2 4 10 -1.</_> + <_> + 10 7 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 8 4 5 8 -1.</_> + <_> + 8 8 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 11 5 9 12 -1.</_> + <_> + 11 9 9 4 3.</_></rects></_> + <_> + <rects> + <_> + 4 5 9 12 -1.</_> + <_> + 4 9 9 4 3.</_></rects></_> + <_> + <rects> + <_> + 14 6 6 9 -1.</_> + <_> + 14 9 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 4 20 12 -1.</_> + <_> + 2 8 20 4 3.</_></rects></_> + <_> + <rects> + <_> + 4 4 17 16 -1.</_> + <_> + 4 12 17 8 2.</_></rects></_> + <_> + <rects> + <_> + 8 7 7 6 -1.</_> + <_> + 8 10 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 9 23 2 -1.</_> + <_> + 1 10 23 1 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 6 9 -1.</_> + <_> + 9 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 13 3 4 9 -1.</_> + <_> + 13 3 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 8 1 6 13 -1.</_> + <_> + 10 1 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 4 22 18 2 -1.</_> + <_> + 4 23 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 3 10 9 6 -1.</_> + <_> + 6 10 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 14 0 2 24 -1.</_> + <_> + 14 0 1 24 2.</_></rects></_> + <_> + <rects> + <_> + 8 0 2 24 -1.</_> + <_> + 9 0 1 24 2.</_></rects></_> + <_> + <rects> + <_> + 3 2 18 10 -1.</_> + <_> + 9 2 6 10 3.</_></rects></_> + <_> + <rects> + <_> + 4 13 15 6 -1.</_> + <_> + 9 13 5 6 3.</_></rects></_> + <_> + <rects> + <_> + 3 21 18 3 -1.</_> + <_> + 9 21 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 1 4 11 -1.</_> + <_> + 11 1 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 9 7 10 4 -1.</_> + <_> + 9 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 10 18 -1.</_> + <_> + 12 0 5 18 2.</_></rects></_> + <_> + <rects> + <_> + 12 1 6 16 -1.</_> + <_> + 14 1 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 6 1 6 16 -1.</_> + <_> + 8 1 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 6 -1.</_> + <_> + 18 5 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 5 18 2 -1.</_> + <_> + 3 6 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 6 -1.</_> + <_> + 18 5 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 6 -1.</_> + <_> + 0 5 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 13 11 11 6 -1.</_> + <_> + 13 13 11 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 7 10 4 -1.</_> + <_> + 10 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 11 9 10 7 -1.</_> + <_> + 11 9 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 9 10 7 -1.</_> + <_> + 8 9 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 16 4 6 6 -1.</_> + <_> + 16 4 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 10 8 -1.</_> + <_> + 5 6 5 4 2.</_> + <_> + 10 10 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 21 16 3 -1.</_> + <_> + 7 21 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 21 16 3 -1.</_> + <_> + 9 21 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 5 22 14 -1.</_> + <_> + 13 5 11 7 2.</_> + <_> + 2 12 11 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 10 8 10 -1.</_> + <_> + 3 10 4 5 2.</_> + <_> + 7 15 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 17 0 6 12 -1.</_> + <_> + 20 0 3 6 2.</_> + <_> + 17 6 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 2 6 18 -1.</_> + <_> + 7 2 2 18 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 6 9 -1.</_> + <_> + 15 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 7 9 -1.</_> + <_> + 0 15 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 15 13 8 10 -1.</_> + <_> + 19 13 4 5 2.</_> + <_> + 15 18 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 0 6 12 -1.</_> + <_> + 1 0 3 6 2.</_> + <_> + 4 6 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 12 1 3 12 -1.</_> + <_> + 12 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 13 8 10 -1.</_> + <_> + 1 13 4 5 2.</_> + <_> + 5 18 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 21 19 2 -1.</_> + <_> + 3 22 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 6 3 4 13 -1.</_> + <_> + 8 3 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 5 10 18 3 -1.</_> + <_> + 5 11 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 3 5 12 -1.</_> + <_> + 9 7 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 11 2 4 15 -1.</_> + <_> + 11 7 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 4 1 16 4 -1.</_> + <_> + 4 3 16 2 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 18 3 -1.</_> + <_> + 6 1 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 1 10 8 -1.</_> + <_> + 5 1 5 4 2.</_> + <_> + 10 5 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 11 18 12 6 -1.</_> + <_> + 17 18 6 3 2.</_> + <_> + 11 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 15 12 3 -1.</_> + <_> + 11 15 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 10 22 4 -1.</_> + <_> + 1 10 11 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 9 9 6 -1.</_> + <_> + 10 9 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 11 12 5 -1.</_> + <_> + 10 11 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 6 7 10 7 -1.</_> + <_> + 11 7 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 11 2 8 10 -1.</_> + <_> + 11 2 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 5 2 8 10 -1.</_> + <_> + 9 2 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 18 6 -1.</_> + <_> + 15 4 9 3 2.</_> + <_> + 6 7 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 5 10 9 -1.</_> + <_> + 0 8 10 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 7 21 6 -1.</_> + <_> + 2 9 21 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 4 22 16 -1.</_> + <_> + 0 4 11 8 2.</_> + <_> + 11 12 11 8 2.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 22 -1.</_> + <_> + 9 11 6 11 2.</_></rects></_> + <_> + <rects> + <_> + 9 1 3 12 -1.</_> + <_> + 9 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 12 0 12 18 -1.</_> + <_> + 18 0 6 9 2.</_> + <_> + 12 9 6 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 12 18 -1.</_> + <_> + 0 0 6 9 2.</_> + <_> + 6 9 6 9 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 22 4 -1.</_> + <_> + 12 1 11 2 2.</_> + <_> + 1 3 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 0 18 4 -1.</_> + <_> + 3 2 18 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 5 22 6 -1.</_> + <_> + 2 7 22 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 6 9 -1.</_> + <_> + 5 3 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 10 14 6 9 -1.</_> + <_> + 12 14 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 14 6 9 -1.</_> + <_> + 10 14 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 5 18 18 3 -1.</_> + <_> + 5 19 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 6 13 -1.</_> + <_> + 9 0 3 13 2.</_></rects></_> + <_> + <rects> + <_> + 7 4 12 4 -1.</_> + <_> + 7 4 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 5 2 12 6 -1.</_> + <_> + 9 2 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 4 1 18 3 -1.</_> + <_> + 4 2 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 8 6 12 -1.</_> + <_> + 0 12 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 9 15 6 9 -1.</_> + <_> + 11 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 10 6 13 -1.</_> + <_> + 11 10 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 6 17 18 2 -1.</_> + <_> + 6 18 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 9 4 6 9 -1.</_> + <_> + 11 4 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 6 9 -1.</_> + <_> + 12 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 10 8 -1.</_> + <_> + 5 6 5 4 2.</_> + <_> + 10 10 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 14 9 5 8 -1.</_> + <_> + 14 13 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 5 9 5 8 -1.</_> + <_> + 5 13 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 14 11 9 6 -1.</_> + <_> + 14 13 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 23 15 -1.</_> + <_> + 0 7 23 5 3.</_></rects></_> + <_> + <rects> + <_> + 16 0 8 12 -1.</_> + <_> + 16 6 8 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 15 6 9 -1.</_> + <_> + 4 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 18 9 4 -1.</_> + <_> + 8 20 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 17 18 3 -1.</_> + <_> + 0 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 13 11 11 6 -1.</_> + <_> + 13 13 11 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 11 11 6 -1.</_> + <_> + 0 13 11 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 9 24 6 -1.</_> + <_> + 12 9 12 3 2.</_> + <_> + 0 12 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 16 8 8 -1.</_> + <_> + 6 20 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 16 14 6 -1.</_> + <_> + 10 18 14 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 1 21 3 -1.</_> + <_> + 1 2 21 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 3 -1.</_> + <_> + 0 2 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 15 8 5 -1.</_> + <_> + 6 15 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 11 21 3 -1.</_> + <_> + 9 11 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 18 12 6 -1.</_> + <_> + 1 18 6 3 2.</_> + <_> + 7 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 10 14 4 10 -1.</_> + <_> + 10 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 4 10 -1.</_> + <_> + 7 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 9 8 6 12 -1.</_> + <_> + 9 12 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 7 1 9 6 -1.</_> + <_> + 10 1 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 3 14 19 2 -1.</_> + <_> + 3 15 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 10 10 -1.</_> + <_> + 7 7 5 5 2.</_> + <_> + 12 12 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 12 18 12 -1.</_> + <_> + 3 12 9 12 2.</_></rects></_> + <_> + <rects> + <_> + 8 0 6 12 -1.</_> + <_> + 10 0 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 17 9 -1.</_> + <_> + 3 3 17 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 12 11 -1.</_> + <_> + 10 0 4 11 3.</_></rects></_> + <_> + <rects> + <_> + 1 0 6 13 -1.</_> + <_> + 4 0 3 13 2.</_></rects></_> + <_> + <rects> + <_> + 5 8 16 6 -1.</_> + <_> + 5 11 16 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 8 5 12 -1.</_> + <_> + 8 14 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 21 18 3 -1.</_> + <_> + 9 21 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 6 -1.</_> + <_> + 3 0 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 2 0 20 3 -1.</_> + <_> + 2 1 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 4 6 15 10 -1.</_> + <_> + 9 6 5 10 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 9 -1.</_> + <_> + 11 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 14 0 6 9 -1.</_> + <_> + 16 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 16 9 6 -1.</_> + <_> + 7 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 0 6 9 -1.</_> + <_> + 16 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 4 0 6 9 -1.</_> + <_> + 6 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 17 1 6 16 -1.</_> + <_> + 19 1 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 1 1 6 16 -1.</_> + <_> + 3 1 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 14 13 6 9 -1.</_> + <_> + 14 16 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 9 -1.</_> + <_> + 0 3 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 5 6 6 -1.</_> + <_> + 9 5 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 10 9 6 -1.</_> + <_> + 6 10 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 14 7 3 16 -1.</_> + <_> + 14 15 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 4 10 14 12 -1.</_> + <_> + 4 10 7 6 2.</_> + <_> + 11 16 7 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 12 6 -1.</_> + <_> + 7 8 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 7 2 4 20 -1.</_> + <_> + 9 2 2 20 2.</_></rects></_> + <_> + <rects> + <_> + 14 13 6 9 -1.</_> + <_> + 14 16 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 9 -1.</_> + <_> + 12 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 14 13 6 9 -1.</_> + <_> + 14 16 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 20 14 4 -1.</_> + <_> + 5 22 14 2 2.</_></rects></_> + <_> + <rects> + <_> + 4 4 16 12 -1.</_> + <_> + 4 10 16 6 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 21 4 -1.</_> + <_> + 3 2 21 2 2.</_></rects></_> + <_> + <rects> + <_> + 4 13 6 9 -1.</_> + <_> + 4 16 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 16 16 5 8 -1.</_> + <_> + 16 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 0 16 16 -1.</_> + <_> + 4 0 8 8 2.</_> + <_> + 12 8 8 8 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 14 6 -1.</_> + <_> + 13 6 7 3 2.</_> + <_> + 6 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 10 5 4 15 -1.</_> + <_> + 10 10 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 9 15 12 8 -1.</_> + <_> + 15 15 6 4 2.</_> + <_> + 9 19 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 12 4 -1.</_> + <_> + 12 7 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 6 -1.</_> + <_> + 12 6 7 3 2.</_> + <_> + 5 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 6 18 10 -1.</_> + <_> + 3 6 9 5 2.</_> + <_> + 12 11 9 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 18 21 -1.</_> + <_> + 12 0 6 21 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 21 -1.</_> + <_> + 8 0 8 21 3.</_></rects></_> + <_> + <rects> + <_> + 6 18 18 3 -1.</_> + <_> + 6 19 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 9 6 -1.</_> + <_> + 0 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 3 19 2 -1.</_> + <_> + 4 4 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 24 2 -1.</_> + <_> + 0 4 24 1 2.</_></rects></_> + <_> + <rects> + <_> + 15 14 9 4 -1.</_> + <_> + 15 16 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 14 9 4 -1.</_> + <_> + 0 16 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 6 15 18 2 -1.</_> + <_> + 6 16 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 3 17 18 3 -1.</_> + <_> + 3 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 12 0 3 23 -1.</_> + <_> + 13 0 1 23 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 8 6 -1.</_> + <_> + 6 3 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 16 18 3 -1.</_> + <_> + 6 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 0 3 23 -1.</_> + <_> + 10 0 1 23 3.</_></rects></_> + <_> + <rects> + <_> + 10 7 4 10 -1.</_> + <_> + 10 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 10 12 -1.</_> + <_> + 7 12 10 4 3.</_></rects></_> + <_> + <rects> + <_> + 14 9 6 14 -1.</_> + <_> + 17 9 3 7 2.</_> + <_> + 14 16 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 2 0 10 9 -1.</_> + <_> + 2 3 10 3 3.</_></rects></_> + <_> + <rects> + <_> + 11 1 5 12 -1.</_> + <_> + 11 7 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 4 12 10 -1.</_> + <_> + 1 4 6 5 2.</_> + <_> + 7 9 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 15 1 9 4 -1.</_> + <_> + 15 3 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 2 8 10 -1.</_> + <_> + 1 2 4 5 2.</_> + <_> + 5 7 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 10 1 5 12 -1.</_> + <_> + 10 5 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 4 0 14 24 -1.</_> + <_> + 11 0 7 24 2.</_></rects></_> + <_> + <rects> + <_> + 7 17 10 4 -1.</_> + <_> + 7 19 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 10 14 4 10 -1.</_> + <_> + 10 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 13 15 6 9 -1.</_> + <_> + 15 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 21 18 3 -1.</_> + <_> + 3 22 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 13 15 6 9 -1.</_> + <_> + 15 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 5 15 6 9 -1.</_> + <_> + 7 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 18 -1.</_> + <_> + 12 6 2 9 2.</_> + <_> + 10 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 3 6 11 -1.</_> + <_> + 9 3 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 15 1 9 4 -1.</_> + <_> + 15 3 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 4 14 8 -1.</_> + <_> + 5 8 14 4 2.</_></rects></_> + <_> + <rects> + <_> + 8 1 15 9 -1.</_> + <_> + 8 4 15 3 3.</_></rects></_> + <_> + <rects> + <_> + 7 2 8 10 -1.</_> + <_> + 7 2 4 5 2.</_> + <_> + 11 7 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 12 2 6 12 -1.</_> + <_> + 12 2 3 12 2.</_></rects></_> + <_> + <rects> + <_> + 6 2 6 12 -1.</_> + <_> + 9 2 3 12 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 12 4 -1.</_> + <_> + 7 7 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 3 12 10 -1.</_> + <_> + 10 3 4 10 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 16 6 -1.</_> + <_> + 13 6 8 3 2.</_> + <_> + 5 9 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 1 18 9 -1.</_> + <_> + 9 1 6 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 8 18 5 -1.</_> + <_> + 9 8 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 22 -1.</_> + <_> + 0 0 12 11 2.</_> + <_> + 12 11 12 11 2.</_></rects></_> + <_> + <rects> + <_> + 14 16 9 6 -1.</_> + <_> + 14 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 24 8 -1.</_> + <_> + 0 20 24 4 2.</_></rects></_> + <_> + <rects> + <_> + 1 19 22 4 -1.</_> + <_> + 12 19 11 2 2.</_> + <_> + 1 21 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 16 9 6 -1.</_> + <_> + 1 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 7 8 10 4 -1.</_> + <_> + 7 8 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 15 6 9 -1.</_> + <_> + 11 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 10 18 12 6 -1.</_> + <_> + 16 18 6 3 2.</_> + <_> + 10 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 18 12 6 -1.</_> + <_> + 2 18 6 3 2.</_> + <_> + 8 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 3 16 9 -1.</_> + <_> + 8 6 16 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 10 6 -1.</_> + <_> + 0 7 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 5 18 3 -1.</_> + <_> + 5 6 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 6 9 6 -1.</_> + <_> + 2 9 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 14 2 10 9 -1.</_> + <_> + 14 5 10 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 6 18 3 -1.</_> + <_> + 3 7 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 2 15 6 -1.</_> + <_> + 9 4 15 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 8 15 6 -1.</_> + <_> + 4 10 15 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 24 4 -1.</_> + <_> + 12 5 12 2 2.</_> + <_> + 0 7 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 6 12 -1.</_> + <_> + 9 8 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 11 0 6 9 -1.</_> + <_> + 13 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 6 12 -1.</_> + <_> + 0 12 3 6 2.</_> + <_> + 3 18 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 14 12 10 6 -1.</_> + <_> + 14 14 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 7 18 9 -1.</_> + <_> + 2 10 18 3 3.</_></rects></_> + <_> + <rects> + <_> + 11 14 10 9 -1.</_> + <_> + 11 17 10 3 3.</_></rects></_> + <_> + <rects> + <_> + 7 6 10 8 -1.</_> + <_> + 7 6 5 4 2.</_> + <_> + 12 10 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 14 6 -1.</_> + <_> + 13 6 7 3 2.</_> + <_> + 6 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 4 13 9 7 -1.</_> + <_> + 7 13 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 14 10 6 12 -1.</_> + <_> + 17 10 3 6 2.</_> + <_> + 14 16 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 10 6 12 -1.</_> + <_> + 4 10 3 6 2.</_> + <_> + 7 16 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 13 9 8 6 -1.</_> + <_> + 13 9 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 8 3 4 14 -1.</_> + <_> + 10 3 2 14 2.</_></rects></_> + <_> + <rects> + <_> + 17 0 3 18 -1.</_> + <_> + 18 0 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 4 12 16 12 -1.</_> + <_> + 12 12 8 12 2.</_></rects></_> + <_> + <rects> + <_> + 15 0 6 14 -1.</_> + <_> + 17 0 2 14 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 6 14 -1.</_> + <_> + 5 0 2 14 3.</_></rects></_> + <_> + <rects> + <_> + 12 2 12 20 -1.</_> + <_> + 16 2 4 20 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 12 20 -1.</_> + <_> + 4 2 4 20 3.</_></rects></_> + <_> + <rects> + <_> + 16 0 6 17 -1.</_> + <_> + 18 0 2 17 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 6 17 -1.</_> + <_> + 4 0 2 17 3.</_></rects></_> + <_> + <rects> + <_> + 15 6 9 6 -1.</_> + <_> + 15 8 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 9 6 -1.</_> + <_> + 0 8 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 18 1 6 13 -1.</_> + <_> + 20 1 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 6 13 -1.</_> + <_> + 2 1 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 16 0 4 9 -1.</_> + <_> + 16 0 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 5 10 12 7 -1.</_> + <_> + 9 10 4 7 3.</_></rects></_> + <_> + <rects> + <_> + 12 9 12 6 -1.</_> + <_> + 12 11 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 9 12 6 -1.</_> + <_> + 0 11 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 7 14 9 -1.</_> + <_> + 5 10 14 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 20 3 -1.</_> + <_> + 0 16 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 10 8 10 -1.</_> + <_> + 12 10 4 5 2.</_> + <_> + 8 15 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 4 13 9 -1.</_> + <_> + 5 7 13 3 3.</_></rects></_> + <_> + <rects> + <_> + 10 2 6 18 -1.</_> + <_> + 10 8 6 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 6 9 -1.</_> + <_> + 8 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 9 12 4 -1.</_> + <_> + 6 11 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 2 15 12 -1.</_> + <_> + 3 6 15 4 3.</_></rects></_> + <_> + <rects> + <_> + 12 0 12 5 -1.</_> + <_> + 16 0 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 18 3 -1.</_> + <_> + 6 15 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 24 5 -1.</_> + <_> + 8 14 8 5 3.</_></rects></_> + <_> + <rects> + <_> + 5 1 3 18 -1.</_> + <_> + 6 1 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 4 14 -1.</_> + <_> + 10 0 2 14 2.</_></rects></_> + <_> + <rects> + <_> + 9 3 4 9 -1.</_> + <_> + 11 3 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 8 2 12 6 -1.</_> + <_> + 14 2 6 3 2.</_> + <_> + 8 5 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 4 17 4 -1.</_> + <_> + 0 6 17 2 2.</_></rects></_> + <_> + <rects> + <_> + 16 16 5 8 -1.</_> + <_> + 16 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 3 16 5 8 -1.</_> + <_> + 3 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 18 18 2 -1.</_> + <_> + 6 19 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 12 5 -1.</_> + <_> + 4 0 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 14 3 6 12 -1.</_> + <_> + 17 3 3 6 2.</_> + <_> + 14 9 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 12 6 12 -1.</_> + <_> + 2 12 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 2 3 21 3 -1.</_> + <_> + 2 4 21 1 3.</_></rects></_> + <_> + <rects> + <_> + 4 3 6 12 -1.</_> + <_> + 4 3 3 6 2.</_> + <_> + 7 9 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 12 8 12 6 -1.</_> + <_> + 18 8 6 3 2.</_> + <_> + 12 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 15 16 9 -1.</_> + <_> + 8 15 8 9 2.</_></rects></_> + <_> + <rects> + <_> + 6 13 18 5 -1.</_> + <_> + 6 13 9 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 6 15 6 -1.</_> + <_> + 6 6 5 6 3.</_></rects></_> + <_> + <rects> + <_> + 11 9 9 6 -1.</_> + <_> + 14 9 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 15 11 -1.</_> + <_> + 8 0 5 11 3.</_></rects></_> + <_> + <rects> + <_> + 15 3 3 18 -1.</_> + <_> + 15 9 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 3 3 18 -1.</_> + <_> + 6 9 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 9 5 10 8 -1.</_> + <_> + 14 5 5 4 2.</_> + <_> + 9 9 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 4 16 8 -1.</_> + <_> + 4 4 8 4 2.</_> + <_> + 12 8 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 12 3 -1.</_> + <_> + 7 7 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 9 13 -1.</_> + <_> + 8 0 3 13 3.</_></rects></_> + <_> + <rects> + <_> + 11 0 6 9 -1.</_> + <_> + 13 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 6 9 -1.</_> + <_> + 9 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 1 10 9 -1.</_> + <_> + 8 4 10 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 18 2 -1.</_> + <_> + 0 3 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 10 13 14 6 -1.</_> + <_> + 17 13 7 3 2.</_> + <_> + 10 16 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 13 14 6 -1.</_> + <_> + 0 13 7 3 2.</_> + <_> + 7 16 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 20 2 3 21 -1.</_> + <_> + 21 2 1 21 3.</_></rects></_> + <_> + <rects> + <_> + 0 9 5 12 -1.</_> + <_> + 0 13 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 12 6 12 6 -1.</_> + <_> + 12 8 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 8 20 3 -1.</_> + <_> + 1 9 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 7 19 3 -1.</_> + <_> + 5 8 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 12 9 6 -1.</_> + <_> + 1 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 10 14 12 -1.</_> + <_> + 6 14 14 4 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 18 -1.</_> + <_> + 5 12 14 6 3.</_></rects></_> + <_> + <rects> + <_> + 11 12 9 7 -1.</_> + <_> + 14 12 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 1 15 18 4 -1.</_> + <_> + 1 17 18 2 2.</_></rects></_> + <_> + <rects> + <_> + 11 14 6 9 -1.</_> + <_> + 11 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 8 18 4 -1.</_> + <_> + 0 8 9 2 2.</_> + <_> + 9 10 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 10 20 6 -1.</_> + <_> + 13 10 10 3 2.</_> + <_> + 3 13 10 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 10 20 6 -1.</_> + <_> + 1 10 10 3 2.</_> + <_> + 11 13 10 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 9 24 2 -1.</_> + <_> + 0 9 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 12 20 8 -1.</_> + <_> + 1 12 10 4 2.</_> + <_> + 11 16 10 4 2.</_></rects></_> + <_> + <rects> + <_> + 11 12 9 7 -1.</_> + <_> + 14 12 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 4 12 9 7 -1.</_> + <_> + 7 12 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 12 12 8 5 -1.</_> + <_> + 12 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 4 12 8 5 -1.</_> + <_> + 8 12 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 13 10 4 10 -1.</_> + <_> + 13 10 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 1 15 20 2 -1.</_> + <_> + 11 15 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 10 6 6 -1.</_> + <_> + 9 10 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 21 3 -1.</_> + <_> + 7 1 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 4 13 9 -1.</_> + <_> + 6 7 13 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 5 12 5 -1.</_> + <_> + 10 5 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 10 10 10 6 -1.</_> + <_> + 10 12 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 12 5 8 -1.</_> + <_> + 6 16 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 13 0 6 9 -1.</_> + <_> + 15 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 2 10 18 6 -1.</_> + <_> + 8 10 6 6 3.</_></rects></_> + <_> + <rects> + <_> + 11 2 9 4 -1.</_> + <_> + 11 4 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 20 21 3 -1.</_> + <_> + 8 20 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 22 2 -1.</_> + <_> + 1 11 22 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 17 18 3 -1.</_> + <_> + 0 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 6 9 -1.</_> + <_> + 15 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 6 9 -1.</_> + <_> + 7 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 20 -1.</_> + <_> + 20 2 2 20 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 20 -1.</_> + <_> + 2 2 2 20 3.</_></rects></_> + <_> + <rects> + <_> + 11 7 6 14 -1.</_> + <_> + 14 7 3 7 2.</_> + <_> + 11 14 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 4 9 -1.</_> + <_> + 2 1 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 12 14 9 4 -1.</_> + <_> + 12 16 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 13 9 4 -1.</_> + <_> + 1 15 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 15 6 -1.</_> + <_> + 7 8 15 2 3.</_></rects></_> + <_> + <rects> + <_> + 8 2 3 18 -1.</_> + <_> + 8 8 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 6 12 6 -1.</_> + <_> + 12 6 6 3 2.</_> + <_> + 6 9 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 19 20 4 -1.</_> + <_> + 2 19 10 2 2.</_> + <_> + 12 21 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 14 15 6 9 -1.</_> + <_> + 14 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 5 18 14 -1.</_> + <_> + 3 5 9 7 2.</_> + <_> + 12 12 9 7 2.</_></rects></_> + <_> + <rects> + <_> + 15 6 4 18 -1.</_> + <_> + 17 6 2 9 2.</_> + <_> + 15 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 4 18 -1.</_> + <_> + 5 6 2 9 2.</_> + <_> + 7 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 11 0 6 9 -1.</_> + <_> + 13 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 6 9 -1.</_> + <_> + 9 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 11 5 6 9 -1.</_> + <_> + 13 5 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 5 6 6 -1.</_> + <_> + 12 5 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 1 16 6 -1.</_> + <_> + 12 1 8 3 2.</_> + <_> + 4 4 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 9 13 6 11 -1.</_> + <_> + 11 13 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 17 1 6 12 -1.</_> + <_> + 20 1 3 6 2.</_> + <_> + 17 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 17 18 3 -1.</_> + <_> + 1 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 7 13 10 8 -1.</_> + <_> + 7 17 10 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 18 10 6 -1.</_> + <_> + 6 20 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 14 9 4 -1.</_> + <_> + 9 16 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 6 12 -1.</_> + <_> + 1 1 3 6 2.</_> + <_> + 4 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 19 4 5 12 -1.</_> + <_> + 19 8 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 8 8 -1.</_> + <_> + 4 0 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 3 5 19 3 -1.</_> + <_> + 3 6 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 5 12 6 -1.</_> + <_> + 1 5 6 3 2.</_> + <_> + 7 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 1 21 8 -1.</_> + <_> + 9 1 7 8 3.</_></rects></_> + <_> + <rects> + <_> + 4 1 16 8 -1.</_> + <_> + 4 5 16 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 18 3 -1.</_> + <_> + 6 1 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 4 4 10 14 -1.</_> + <_> + 4 11 10 7 2.</_></rects></_> + <_> + <rects> + <_> + 15 6 4 10 -1.</_> + <_> + 15 11 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 18 18 3 -1.</_> + <_> + 9 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 18 12 6 -1.</_> + <_> + 12 18 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 3 15 6 9 -1.</_> + <_> + 6 15 3 9 2.</_></rects></_> + <_> + <rects> + <_> + 15 7 6 8 -1.</_> + <_> + 15 11 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 3 7 6 8 -1.</_> + <_> + 3 11 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 5 9 18 6 -1.</_> + <_> + 14 9 9 3 2.</_> + <_> + 5 12 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 13 12 6 -1.</_> + <_> + 1 15 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 15 10 6 -1.</_> + <_> + 14 17 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 10 6 -1.</_> + <_> + 0 17 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 15 13 6 9 -1.</_> + <_> + 15 16 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 13 6 9 -1.</_> + <_> + 3 16 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 5 8 8 -1.</_> + <_> + 9 5 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 1 18 12 6 -1.</_> + <_> + 1 18 6 3 2.</_> + <_> + 7 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 13 19 10 4 -1.</_> + <_> + 13 21 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 19 10 4 -1.</_> + <_> + 1 21 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 6 19 18 3 -1.</_> + <_> + 6 20 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 14 4 10 -1.</_> + <_> + 8 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 6 -1.</_> + <_> + 0 2 24 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 6 9 -1.</_> + <_> + 0 4 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 9 20 6 -1.</_> + <_> + 14 9 10 3 2.</_> + <_> + 4 12 10 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 15 19 8 -1.</_> + <_> + 1 19 19 4 2.</_></rects></_> + <_> + <rects> + <_> + 14 0 10 6 -1.</_> + <_> + 14 2 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 21 14 -1.</_> + <_> + 8 10 7 14 3.</_></rects></_> + <_> + <rects> + <_> + 10 10 8 8 -1.</_> + <_> + 10 10 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 6 8 10 4 -1.</_> + <_> + 11 8 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 5 4 9 -1.</_> + <_> + 10 5 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 5 6 10 -1.</_> + <_> + 9 5 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 14 4 4 13 -1.</_> + <_> + 14 4 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 4 13 -1.</_> + <_> + 8 4 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 8 7 9 6 -1.</_> + <_> + 11 7 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 3 6 16 6 -1.</_> + <_> + 3 6 8 3 2.</_> + <_> + 11 9 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 4 16 14 -1.</_> + <_> + 13 4 8 7 2.</_> + <_> + 5 11 8 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 4 -1.</_> + <_> + 0 0 12 2 2.</_> + <_> + 12 2 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 1 9 6 -1.</_> + <_> + 12 1 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 4 1 14 4 -1.</_> + <_> + 11 1 7 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 14 7 9 -1.</_> + <_> + 10 17 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 3 8 10 -1.</_> + <_> + 8 3 4 5 2.</_> + <_> + 12 8 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 3 12 5 -1.</_> + <_> + 11 3 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 8 2 4 13 -1.</_> + <_> + 10 2 2 13 2.</_></rects></_> + <_> + <rects> + <_> + 11 2 3 19 -1.</_> + <_> + 12 2 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 7 7 9 6 -1.</_> + <_> + 10 7 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 4 22 20 2 -1.</_> + <_> + 4 22 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 16 24 4 -1.</_> + <_> + 0 16 12 2 2.</_> + <_> + 12 18 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 7 3 12 5 -1.</_> + <_> + 11 3 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 8 14 -1.</_> + <_> + 1 10 4 7 2.</_> + <_> + 5 17 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 11 16 6 6 -1.</_> + <_> + 11 19 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 10 24 -1.</_> + <_> + 6 0 5 12 2.</_> + <_> + 11 12 5 12 2.</_></rects></_> + <_> + <rects> + <_> + 7 5 14 14 -1.</_> + <_> + 14 5 7 7 2.</_> + <_> + 7 12 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 10 8 -1.</_> + <_> + 7 8 5 4 2.</_> + <_> + 12 12 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 1 9 6 -1.</_> + <_> + 12 1 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 24 3 -1.</_> + <_> + 12 6 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 3 12 5 -1.</_> + <_> + 11 3 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 1 13 22 4 -1.</_> + <_> + 1 13 11 2 2.</_> + <_> + 12 15 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 12 12 6 -1.</_> + <_> + 9 14 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 9 6 -1.</_> + <_> + 0 7 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 5 23 6 -1.</_> + <_> + 1 7 23 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 6 19 12 -1.</_> + <_> + 1 10 19 4 3.</_></rects></_> + <_> + <rects> + <_> + 9 1 6 21 -1.</_> + <_> + 9 8 6 7 3.</_></rects></_> + <_> + <rects> + <_> + 3 19 18 3 -1.</_> + <_> + 9 19 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 14 6 9 -1.</_> + <_> + 11 14 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 4 12 -1.</_> + <_> + 11 6 2 12 2.</_></rects></_> + <_> + <rects> + <_> + 16 0 6 9 -1.</_> + <_> + 18 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 6 9 -1.</_> + <_> + 4 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 13 1 4 22 -1.</_> + <_> + 15 1 2 11 2.</_> + <_> + 13 12 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 1 8 8 12 -1.</_> + <_> + 1 14 8 6 2.</_></rects></_> + <_> + <rects> + <_> + 14 7 7 9 -1.</_> + <_> + 14 10 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 12 18 4 -1.</_> + <_> + 3 12 9 2 2.</_> + <_> + 12 14 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 13 1 4 22 -1.</_> + <_> + 15 1 2 11 2.</_> + <_> + 13 12 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 7 1 4 22 -1.</_> + <_> + 7 1 2 11 2.</_> + <_> + 9 12 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 4 7 20 4 -1.</_> + <_> + 14 7 10 2 2.</_> + <_> + 4 9 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 10 6 7 -1.</_> + <_> + 12 10 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 10 4 -1.</_> + <_> + 7 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 4 15 -1.</_> + <_> + 0 8 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 15 0 8 12 -1.</_> + <_> + 19 0 4 6 2.</_> + <_> + 15 6 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 1 0 8 12 -1.</_> + <_> + 1 0 4 6 2.</_> + <_> + 5 6 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 14 5 6 16 -1.</_> + <_> + 16 5 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 4 5 6 16 -1.</_> + <_> + 6 5 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 15 0 6 16 -1.</_> + <_> + 17 0 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 6 16 -1.</_> + <_> + 5 0 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 24 3 -1.</_> + <_> + 0 3 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 7 1 10 4 -1.</_> + <_> + 7 3 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 0 23 8 -1.</_> + <_> + 1 4 23 4 2.</_></rects></_> + <_> + <rects> + <_> + 1 17 19 3 -1.</_> + <_> + 1 18 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 18 18 2 -1.</_> + <_> + 6 19 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 1 17 9 6 -1.</_> + <_> + 1 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 15 15 6 9 -1.</_> + <_> + 15 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 15 6 9 -1.</_> + <_> + 3 18 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 14 20 6 -1.</_> + <_> + 4 17 20 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 10 6 14 -1.</_> + <_> + 0 10 3 7 2.</_> + <_> + 3 17 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 6 18 18 3 -1.</_> + <_> + 6 19 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 4 12 9 7 -1.</_> + <_> + 7 12 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 6 10 18 5 -1.</_> + <_> + 12 10 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 10 18 5 -1.</_> + <_> + 6 10 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 3 2 18 9 -1.</_> + <_> + 9 2 6 9 3.</_></rects></_> + <_> + <rects> + <_> + 4 6 10 10 -1.</_> + <_> + 4 6 5 5 2.</_> + <_> + 9 11 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 20 14 4 9 -1.</_> + <_> + 20 14 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 14 4 9 -1.</_> + <_> + 2 14 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 11 1 4 20 -1.</_> + <_> + 13 1 2 10 2.</_> + <_> + 11 11 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 6 21 12 3 -1.</_> + <_> + 12 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 11 1 4 20 -1.</_> + <_> + 13 1 2 10 2.</_> + <_> + 11 11 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 1 16 10 8 -1.</_> + <_> + 1 16 5 4 2.</_> + <_> + 6 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 11 1 4 20 -1.</_> + <_> + 13 1 2 10 2.</_> + <_> + 11 11 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 1 0 3 19 -1.</_> + <_> + 2 0 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 11 1 4 20 -1.</_> + <_> + 13 1 2 10 2.</_> + <_> + 11 11 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 6 9 -1.</_> + <_> + 2 1 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 7 19 4 -1.</_> + <_> + 3 9 19 2 2.</_></rects></_> + <_> + <rects> + <_> + 7 14 9 6 -1.</_> + <_> + 7 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 17 1 7 6 -1.</_> + <_> + 17 4 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 14 8 -1.</_> + <_> + 5 4 14 4 2.</_></rects></_> + <_> + <rects> + <_> + 16 1 8 6 -1.</_> + <_> + 16 4 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 8 6 -1.</_> + <_> + 0 4 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 18 4 -1.</_> + <_> + 15 0 9 2 2.</_> + <_> + 6 2 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 14 9 6 -1.</_> + <_> + 0 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 7 18 8 -1.</_> + <_> + 9 7 6 8 3.</_></rects></_> + <_> + <rects> + <_> + 2 11 6 9 -1.</_> + <_> + 4 11 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 10 5 6 9 -1.</_> + <_> + 12 5 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 18 -1.</_> + <_> + 10 6 2 9 2.</_> + <_> + 12 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 11 1 4 20 -1.</_> + <_> + 13 1 2 10 2.</_> + <_> + 11 11 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 9 1 4 20 -1.</_> + <_> + 9 1 2 10 2.</_> + <_> + 11 11 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 5 9 18 6 -1.</_> + <_> + 14 9 9 3 2.</_> + <_> + 5 12 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 6 9 -1.</_> + <_> + 8 4 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 10 16 8 6 -1.</_> + <_> + 10 16 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 18 8 -1.</_> + <_> + 0 0 9 4 2.</_> + <_> + 9 4 9 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 14 12 -1.</_> + <_> + 13 5 7 6 2.</_> + <_> + 6 11 7 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 3 15 7 -1.</_> + <_> + 9 3 5 7 3.</_></rects></_> + <_> + <rects> + <_> + 14 12 10 6 -1.</_> + <_> + 14 14 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 11 4 10 -1.</_> + <_> + 0 16 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 10 22 3 -1.</_> + <_> + 1 11 22 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 9 6 10 -1.</_> + <_> + 10 9 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 13 2 6 12 -1.</_> + <_> + 16 2 3 6 2.</_> + <_> + 13 8 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 18 -1.</_> + <_> + 10 6 2 9 2.</_> + <_> + 12 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 10 16 -1.</_> + <_> + 12 8 5 8 2.</_> + <_> + 7 16 5 8 2.</_></rects></_> + <_> + <rects> + <_> + 8 1 8 12 -1.</_> + <_> + 8 1 4 6 2.</_> + <_> + 12 7 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 1 12 14 -1.</_> + <_> + 13 1 6 7 2.</_> + <_> + 7 8 6 7 2.</_></rects></_> + <_> + <rects> + <_> + 2 14 12 6 -1.</_> + <_> + 2 16 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 11 16 6 6 -1.</_> + <_> + 11 19 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 16 6 6 -1.</_> + <_> + 7 19 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 13 4 4 10 -1.</_> + <_> + 13 4 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 0 19 19 3 -1.</_> + <_> + 0 20 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 12 8 6 8 -1.</_> + <_> + 12 12 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 8 1 8 22 -1.</_> + <_> + 8 12 8 11 2.</_></rects></_> + <_> + <rects> + <_> + 12 8 6 8 -1.</_> + <_> + 12 12 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 8 6 8 -1.</_> + <_> + 6 12 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 14 5 6 9 -1.</_> + <_> + 14 8 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 24 4 -1.</_> + <_> + 0 8 24 2 2.</_></rects></_> + <_> + <rects> + <_> + 14 12 10 6 -1.</_> + <_> + 14 14 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 10 6 -1.</_> + <_> + 0 14 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 6 19 3 -1.</_> + <_> + 4 7 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 1 6 19 3 -1.</_> + <_> + 1 7 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 4 0 16 9 -1.</_> + <_> + 4 3 16 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 5 -1.</_> + <_> + 8 1 8 5 3.</_></rects></_> + <_> + <rects> + <_> + 3 6 6 15 -1.</_> + <_> + 3 11 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 17 18 3 -1.</_> + <_> + 0 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 22 18 2 -1.</_> + <_> + 6 23 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 2 12 6 9 -1.</_> + <_> + 2 15 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 18 12 6 9 -1.</_> + <_> + 18 15 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 6 9 -1.</_> + <_> + 0 15 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 11 14 4 10 -1.</_> + <_> + 11 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 16 -1.</_> + <_> + 9 14 6 8 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 10 10 -1.</_> + <_> + 7 12 10 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 3 6 13 -1.</_> + <_> + 3 3 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 18 1 6 13 -1.</_> + <_> + 18 1 3 13 2.</_></rects></_> + <_> + <rects> + <_> + 5 1 6 9 -1.</_> + <_> + 7 1 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 18 2 6 11 -1.</_> + <_> + 18 2 3 11 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 11 -1.</_> + <_> + 3 2 3 11 2.</_></rects></_> + <_> + <rects> + <_> + 9 12 15 6 -1.</_> + <_> + 9 14 15 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 2 20 3 -1.</_> + <_> + 2 3 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 9 -1.</_> + <_> + 10 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 12 14 -1.</_> + <_> + 5 6 6 7 2.</_> + <_> + 11 13 6 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 9 -1.</_> + <_> + 11 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 9 6 -1.</_> + <_> + 10 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 6 9 -1.</_> + <_> + 12 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 4 1 12 20 -1.</_> + <_> + 4 1 6 10 2.</_> + <_> + 10 11 6 10 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 18 3 -1.</_> + <_> + 6 7 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 7 18 3 -1.</_> + <_> + 9 7 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 20 18 3 -1.</_> + <_> + 9 20 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 2 12 15 -1.</_> + <_> + 10 2 4 15 3.</_></rects></_> + <_> + <rects> + <_> + 2 3 18 3 -1.</_> + <_> + 2 4 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 19 4 4 18 -1.</_> + <_> + 21 4 2 9 2.</_> + <_> + 19 13 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 19 3 -1.</_> + <_> + 0 2 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 15 4 -1.</_> + <_> + 5 2 15 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 2 14 5 -1.</_> + <_> + 12 2 7 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 2 22 14 -1.</_> + <_> + 1 2 11 14 2.</_></rects></_> + <_> + <rects> + <_> + 8 15 6 9 -1.</_> + <_> + 10 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 17 18 3 -1.</_> + <_> + 6 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 3 18 -1.</_> + <_> + 9 12 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 20 3 -1.</_> + <_> + 2 1 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 4 5 12 -1.</_> + <_> + 5 8 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 8 6 12 5 -1.</_> + <_> + 12 6 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 12 -1.</_> + <_> + 9 12 3 6 2.</_> + <_> + 12 18 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 14 14 8 10 -1.</_> + <_> + 18 14 4 5 2.</_> + <_> + 14 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 14 8 10 -1.</_> + <_> + 2 14 4 5 2.</_> + <_> + 6 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 10 18 12 6 -1.</_> + <_> + 16 18 6 3 2.</_> + <_> + 10 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 3 6 9 -1.</_> + <_> + 1 6 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 11 3 3 20 -1.</_> + <_> + 12 3 1 20 3.</_></rects></_> + <_> + <rects> + <_> + 4 6 14 6 -1.</_> + <_> + 4 6 7 3 2.</_> + <_> + 11 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 12 13 -1.</_> + <_> + 10 5 4 13 3.</_></rects></_> + <_> + <rects> + <_> + 5 4 4 15 -1.</_> + <_> + 5 9 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 9 16 15 4 -1.</_> + <_> + 14 16 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 7 8 6 14 -1.</_> + <_> + 7 8 3 7 2.</_> + <_> + 10 15 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 10 6 -1.</_> + <_> + 7 8 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 5 18 3 -1.</_> + <_> + 2 6 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 1 15 8 -1.</_> + <_> + 5 5 15 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 1 8 18 -1.</_> + <_> + 7 10 8 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 10 24 3 -1.</_> + <_> + 0 11 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 13 -1.</_> + <_> + 2 2 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 16 0 8 10 -1.</_> + <_> + 20 0 4 5 2.</_> + <_> + 16 5 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 1 10 9 -1.</_> + <_> + 5 4 10 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 18 3 -1.</_> + <_> + 5 7 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 3 -1.</_> + <_> + 0 2 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 11 4 6 11 -1.</_> + <_> + 13 4 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 8 10 -1.</_> + <_> + 0 0 4 5 2.</_> + <_> + 4 5 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 4 16 18 3 -1.</_> + <_> + 4 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 16 18 3 -1.</_> + <_> + 2 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 18 10 -1.</_> + <_> + 12 0 9 5 2.</_> + <_> + 3 5 9 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 3 20 21 -1.</_> + <_> + 12 3 10 21 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 14 3 -1.</_> + <_> + 6 7 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 9 12 6 -1.</_> + <_> + 0 9 6 3 2.</_> + <_> + 6 12 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 14 21 4 -1.</_> + <_> + 10 14 7 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 21 4 -1.</_> + <_> + 7 14 7 4 3.</_></rects></_> + <_> + <rects> + <_> + 5 21 18 3 -1.</_> + <_> + 11 21 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 21 18 3 -1.</_> + <_> + 7 21 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 19 4 4 18 -1.</_> + <_> + 21 4 2 9 2.</_> + <_> + 19 13 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 7 18 3 -1.</_> + <_> + 3 8 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 19 4 4 18 -1.</_> + <_> + 21 4 2 9 2.</_> + <_> + 19 13 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 15 10 6 -1.</_> + <_> + 7 17 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 13 11 9 -1.</_> + <_> + 9 16 11 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 4 10 -1.</_> + <_> + 0 11 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 15 16 9 6 -1.</_> + <_> + 15 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 5 4 18 -1.</_> + <_> + 1 5 2 9 2.</_> + <_> + 3 14 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 9 8 8 10 -1.</_> + <_> + 13 8 4 5 2.</_> + <_> + 9 13 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 8 10 -1.</_> + <_> + 7 8 4 5 2.</_> + <_> + 11 13 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 9 8 12 5 -1.</_> + <_> + 13 8 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 7 8 9 7 -1.</_> + <_> + 10 8 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 9 8 12 5 -1.</_> + <_> + 13 8 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 7 6 9 7 -1.</_> + <_> + 10 6 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 9 8 12 5 -1.</_> + <_> + 13 8 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 10 5 4 18 -1.</_> + <_> + 10 11 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 5 14 12 -1.</_> + <_> + 5 11 14 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 11 4 -1.</_> + <_> + 0 3 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 10 6 10 -1.</_> + <_> + 11 10 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 2 17 11 6 -1.</_> + <_> + 2 19 11 2 3.</_></rects></_> + <_> + <rects> + <_> + 15 16 9 6 -1.</_> + <_> + 15 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 18 2 -1.</_> + <_> + 1 11 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 12 13 -1.</_> + <_> + 10 4 4 13 3.</_></rects></_> + <_> + <rects> + <_> + 0 18 18 3 -1.</_> + <_> + 0 19 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 18 18 3 -1.</_> + <_> + 6 19 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 9 6 -1.</_> + <_> + 0 18 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 13 15 9 6 -1.</_> + <_> + 13 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 15 9 6 -1.</_> + <_> + 2 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 13 1 6 16 -1.</_> + <_> + 13 1 3 16 2.</_></rects></_> + <_> + <rects> + <_> + 5 1 6 16 -1.</_> + <_> + 8 1 3 16 2.</_></rects></_> + <_> + <rects> + <_> + 11 5 6 10 -1.</_> + <_> + 13 5 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 7 5 6 10 -1.</_> + <_> + 9 5 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 6 24 -1.</_> + <_> + 12 0 2 24 3.</_></rects></_> + <_> + <rects> + <_> + 3 4 4 20 -1.</_> + <_> + 3 4 2 10 2.</_> + <_> + 5 14 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 14 0 6 9 -1.</_> + <_> + 16 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 4 0 6 9 -1.</_> + <_> + 6 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 4 5 18 5 -1.</_> + <_> + 10 5 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 6 9 -1.</_> + <_> + 7 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 7 2 15 8 -1.</_> + <_> + 12 2 5 8 3.</_></rects></_> + <_> + <rects> + <_> + 2 2 15 8 -1.</_> + <_> + 7 2 5 8 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 4 9 -1.</_> + <_> + 10 0 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 4 6 12 -1.</_> + <_> + 3 4 3 6 2.</_> + <_> + 6 10 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 16 0 8 18 -1.</_> + <_> + 16 0 4 18 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 8 18 -1.</_> + <_> + 4 0 4 18 2.</_></rects></_> + <_> + <rects> + <_> + 0 7 24 6 -1.</_> + <_> + 0 9 24 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 7 14 3 -1.</_> + <_> + 11 7 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 10 8 8 15 -1.</_> + <_> + 10 8 4 15 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 10 14 -1.</_> + <_> + 12 0 5 14 2.</_></rects></_> + <_> + <rects> + <_> + 13 10 8 10 -1.</_> + <_> + 17 10 4 5 2.</_> + <_> + 13 15 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 0 4 9 -1.</_> + <_> + 5 0 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 16 1 6 8 -1.</_> + <_> + 16 1 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 2 1 6 8 -1.</_> + <_> + 5 1 3 8 2.</_></rects></_> + <_> + <rects> + <_> + 3 6 18 12 -1.</_> + <_> + 3 10 18 4 3.</_></rects></_> + <_> + <rects> + <_> + 4 12 16 4 -1.</_> + <_> + 4 14 16 2 2.</_></rects></_> + <_> + <rects> + <_> + 4 9 16 15 -1.</_> + <_> + 4 14 16 5 3.</_></rects></_> + <_> + <rects> + <_> + 3 10 8 10 -1.</_> + <_> + 3 10 4 5 2.</_> + <_> + 7 15 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 8 18 16 6 -1.</_> + <_> + 16 18 8 3 2.</_> + <_> + 8 21 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 16 12 5 -1.</_> + <_> + 6 16 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 14 14 9 4 -1.</_> + <_> + 14 16 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 7 14 9 6 -1.</_> + <_> + 7 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 10 16 12 -1.</_> + <_> + 4 14 16 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 13 19 6 -1.</_> + <_> + 0 15 19 2 3.</_></rects></_> + <_> + <rects> + <_> + 10 13 9 6 -1.</_> + <_> + 10 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 3 23 -1.</_> + <_> + 6 0 1 23 3.</_></rects></_> + <_> + <rects> + <_> + 0 8 24 6 -1.</_> + <_> + 0 10 24 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 5 12 -1.</_> + <_> + 0 9 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 19 18 -1.</_> + <_> + 3 9 19 9 2.</_></rects></_> + <_> + <rects> + <_> + 9 11 6 12 -1.</_> + <_> + 9 11 3 6 2.</_> + <_> + 12 17 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 5 24 8 -1.</_> + <_> + 12 5 12 4 2.</_> + <_> + 0 9 12 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 18 9 4 -1.</_> + <_> + 6 20 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 8 8 10 6 -1.</_> + <_> + 8 10 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 7 20 3 -1.</_> + <_> + 2 8 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 12 0 7 20 -1.</_> + <_> + 12 10 7 10 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 7 20 -1.</_> + <_> + 5 10 7 10 2.</_></rects></_> + <_> + <rects> + <_> + 14 2 2 18 -1.</_> + <_> + 14 11 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 5 8 10 12 -1.</_> + <_> + 10 8 5 12 2.</_></rects></_> + <_> + <rects> + <_> + 6 9 12 8 -1.</_> + <_> + 12 9 6 4 2.</_> + <_> + 6 13 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 3 14 -1.</_> + <_> + 7 14 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 11 2 12 16 -1.</_> + <_> + 17 2 6 8 2.</_> + <_> + 11 10 6 8 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 6 9 -1.</_> + <_> + 9 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 13 14 9 4 -1.</_> + <_> + 13 16 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 12 22 4 -1.</_> + <_> + 0 12 11 2 2.</_> + <_> + 11 14 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 12 22 6 -1.</_> + <_> + 12 12 11 3 2.</_> + <_> + 1 15 11 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 9 6 -1.</_> + <_> + 9 6 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 4 9 -1.</_> + <_> + 10 0 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 8 18 7 -1.</_> + <_> + 9 8 6 7 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 24 6 -1.</_> + <_> + 0 8 24 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 11 24 10 -1.</_> + <_> + 8 11 8 10 3.</_></rects></_> + <_> + <rects> + <_> + 3 3 18 21 -1.</_> + <_> + 9 3 6 21 3.</_></rects></_> + <_> + <rects> + <_> + 7 12 4 10 -1.</_> + <_> + 9 12 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 10 16 10 8 -1.</_> + <_> + 15 16 5 4 2.</_> + <_> + 10 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 8 6 6 9 -1.</_> + <_> + 10 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 12 10 6 12 -1.</_> + <_> + 15 10 3 6 2.</_> + <_> + 12 16 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 10 6 12 -1.</_> + <_> + 6 10 3 6 2.</_> + <_> + 9 16 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 16 12 6 12 -1.</_> + <_> + 19 12 3 6 2.</_> + <_> + 16 18 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 2 12 6 12 -1.</_> + <_> + 2 12 3 6 2.</_> + <_> + 5 18 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 15 6 9 -1.</_> + <_> + 12 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 15 6 9 -1.</_> + <_> + 10 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 14 20 10 4 -1.</_> + <_> + 14 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 20 10 4 -1.</_> + <_> + 5 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 11 17 9 6 -1.</_> + <_> + 11 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 2 14 4 -1.</_> + <_> + 3 4 14 2 2.</_></rects></_> + <_> + <rects> + <_> + 10 1 10 4 -1.</_> + <_> + 10 3 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 15 10 4 -1.</_> + <_> + 5 15 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 19 2 3 19 -1.</_> + <_> + 20 2 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 4 12 9 8 -1.</_> + <_> + 7 12 3 8 3.</_></rects></_> + <_> + <rects> + <_> + 4 7 5 12 -1.</_> + <_> + 4 11 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 3 -1.</_> + <_> + 8 1 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 8 12 4 -1.</_> + <_> + 6 10 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 19 3 4 10 -1.</_> + <_> + 19 3 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 0 6 9 6 -1.</_> + <_> + 3 6 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 18 0 6 22 -1.</_> + <_> + 20 0 2 22 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 22 -1.</_> + <_> + 2 0 2 22 3.</_></rects></_> + <_> + <rects> + <_> + 5 15 19 3 -1.</_> + <_> + 5 16 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 10 7 4 15 -1.</_> + <_> + 10 12 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 21 18 3 -1.</_> + <_> + 0 22 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 7 3 10 15 -1.</_> + <_> + 7 8 10 5 3.</_></rects></_> + <_> + <rects> + <_> + 1 7 18 3 -1.</_> + <_> + 1 8 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 2 9 6 -1.</_> + <_> + 11 2 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 10 24 14 -1.</_> + <_> + 0 17 24 7 2.</_></rects></_> + <_> + <rects> + <_> + 13 9 8 10 -1.</_> + <_> + 17 9 4 5 2.</_> + <_> + 13 14 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 10 5 4 9 -1.</_> + <_> + 12 5 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 13 9 8 10 -1.</_> + <_> + 17 9 4 5 2.</_> + <_> + 13 14 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 11 10 10 -1.</_> + <_> + 7 11 5 5 2.</_> + <_> + 12 16 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 4 13 18 4 -1.</_> + <_> + 13 13 9 2 2.</_> + <_> + 4 15 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 19 2 -1.</_> + <_> + 0 1 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 18 24 6 -1.</_> + <_> + 8 18 8 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 4 8 16 -1.</_> + <_> + 6 12 8 8 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 10 4 -1.</_> + <_> + 7 10 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 3 6 9 -1.</_> + <_> + 0 6 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 13 15 7 9 -1.</_> + <_> + 13 18 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 18 12 6 -1.</_> + <_> + 3 18 6 3 2.</_> + <_> + 9 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 12 14 6 9 -1.</_> + <_> + 12 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 15 15 8 -1.</_> + <_> + 2 19 15 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 16 -1.</_> + <_> + 9 14 6 8 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 7 12 -1.</_> + <_> + 6 10 7 4 3.</_></rects></_> + <_> + <rects> + <_> + 14 6 6 9 -1.</_> + <_> + 14 9 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 14 6 9 -1.</_> + <_> + 5 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 10 8 6 9 -1.</_> + <_> + 12 8 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 6 4 18 -1.</_> + <_> + 6 6 2 9 2.</_> + <_> + 8 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 14 9 6 12 -1.</_> + <_> + 17 9 3 6 2.</_> + <_> + 14 15 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 9 6 12 -1.</_> + <_> + 4 9 3 6 2.</_> + <_> + 7 15 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 14 15 9 6 -1.</_> + <_> + 14 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 20 18 4 -1.</_> + <_> + 0 20 9 2 2.</_> + <_> + 9 22 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 13 18 9 6 -1.</_> + <_> + 13 20 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 2 18 9 6 -1.</_> + <_> + 2 20 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 16 18 3 -1.</_> + <_> + 6 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 18 3 -1.</_> + <_> + 0 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 19 2 4 22 -1.</_> + <_> + 21 2 2 11 2.</_> + <_> + 19 13 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 1 2 4 22 -1.</_> + <_> + 1 2 2 11 2.</_> + <_> + 3 13 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 15 0 2 24 -1.</_> + <_> + 15 0 1 24 2.</_></rects></_> + <_> + <rects> + <_> + 3 20 16 4 -1.</_> + <_> + 11 20 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 11 6 4 18 -1.</_> + <_> + 13 6 2 9 2.</_> + <_> + 11 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 9 10 14 -1.</_> + <_> + 7 9 5 7 2.</_> + <_> + 12 16 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 14 6 6 9 -1.</_> + <_> + 14 9 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 6 7 9 -1.</_> + <_> + 3 9 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 20 4 4 20 -1.</_> + <_> + 22 4 2 10 2.</_> + <_> + 20 14 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 6 9 -1.</_> + <_> + 7 9 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 10 14 -1.</_> + <_> + 12 0 5 7 2.</_> + <_> + 7 7 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 2 1 18 6 -1.</_> + <_> + 11 1 9 6 2.</_></rects></_> + <_> + <rects> + <_> + 15 0 2 24 -1.</_> + <_> + 15 0 1 24 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 2 24 -1.</_> + <_> + 8 0 1 24 2.</_></rects></_> + <_> + <rects> + <_> + 13 12 6 7 -1.</_> + <_> + 13 12 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 5 12 6 7 -1.</_> + <_> + 8 12 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 5 18 19 -1.</_> + <_> + 9 5 6 19 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 9 6 -1.</_> + <_> + 8 6 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 9 5 9 6 -1.</_> + <_> + 12 5 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 3 16 10 8 -1.</_> + <_> + 3 16 5 4 2.</_> + <_> + 8 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 19 8 5 15 -1.</_> + <_> + 19 13 5 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 8 5 15 -1.</_> + <_> + 0 13 5 5 3.</_></rects></_> + <_> + <rects> + <_> + 20 4 4 20 -1.</_> + <_> + 22 4 2 10 2.</_> + <_> + 20 14 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 0 4 4 20 -1.</_> + <_> + 0 4 2 10 2.</_> + <_> + 2 14 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 10 4 -1.</_> + <_> + 7 7 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 19 14 4 -1.</_> + <_> + 11 19 7 4 2.</_></rects></_> + <_> + <rects> + <_> + 10 11 12 3 -1.</_> + <_> + 10 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 3 -1.</_> + <_> + 0 2 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 7 2 14 20 -1.</_> + <_> + 14 2 7 10 2.</_> + <_> + 7 12 7 10 2.</_></rects></_> + <_> + <rects> + <_> + 0 13 6 9 -1.</_> + <_> + 2 13 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 4 19 -1.</_> + <_> + 13 0 2 19 2.</_></rects></_> + <_> + <rects> + <_> + 1 11 14 3 -1.</_> + <_> + 8 11 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 1 16 20 -1.</_> + <_> + 15 1 8 10 2.</_> + <_> + 7 11 8 10 2.</_></rects></_> + <_> + <rects> + <_> + 0 10 21 9 -1.</_> + <_> + 7 10 7 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 19 15 5 -1.</_> + <_> + 11 19 5 5 3.</_></rects></_> + <_> + <rects> + <_> + 8 10 6 6 -1.</_> + <_> + 11 10 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 1 16 20 -1.</_> + <_> + 15 1 8 10 2.</_> + <_> + 7 11 8 10 2.</_></rects></_> + <_> + <rects> + <_> + 1 1 16 20 -1.</_> + <_> + 1 1 8 10 2.</_> + <_> + 9 11 8 10 2.</_></rects></_> + <_> + <rects> + <_> + 16 4 3 12 -1.</_> + <_> + 16 10 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 4 3 12 -1.</_> + <_> + 5 10 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 10 8 -1.</_> + <_> + 12 6 5 4 2.</_> + <_> + 7 10 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 9 6 6 -1.</_> + <_> + 4 12 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 12 4 -1.</_> + <_> + 6 7 12 2 2.</_></rects></_> + <_> + <rects> + <_> + 9 2 5 15 -1.</_> + <_> + 9 7 5 5 3.</_></rects></_> + <_> + <rects> + <_> + 15 0 9 6 -1.</_> + <_> + 15 2 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 11 10 -1.</_> + <_> + 6 5 11 5 2.</_></rects></_> + <_> + <rects> + <_> + 12 7 4 12 -1.</_> + <_> + 12 13 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 2 9 4 -1.</_> + <_> + 7 4 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 6 0 13 6 -1.</_> + <_> + 6 2 13 2 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 18 -1.</_> + <_> + 10 6 2 9 2.</_> + <_> + 12 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 10 8 6 9 -1.</_> + <_> + 12 8 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 18 10 6 -1.</_> + <_> + 3 20 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 14 20 3 -1.</_> + <_> + 4 15 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 15 9 6 -1.</_> + <_> + 2 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 4 19 -1.</_> + <_> + 13 0 2 19 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 4 19 -1.</_> + <_> + 9 0 2 19 2.</_></rects></_> + <_> + <rects> + <_> + 1 4 22 2 -1.</_> + <_> + 1 5 22 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 9 6 -1.</_> + <_> + 0 2 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 24 18 -1.</_> + <_> + 0 9 24 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 2 16 8 -1.</_> + <_> + 3 6 16 4 2.</_></rects></_> + <_> + <rects> + <_> + 3 6 18 6 -1.</_> + <_> + 3 8 18 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 1 6 10 -1.</_> + <_> + 5 1 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 9 6 -1.</_> + <_> + 16 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 9 6 -1.</_> + <_> + 5 0 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 10 2 4 15 -1.</_> + <_> + 10 7 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 7 10 -1.</_> + <_> + 6 5 7 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 2 20 4 -1.</_> + <_> + 12 2 10 2 2.</_> + <_> + 2 4 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 11 19 3 -1.</_> + <_> + 2 12 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 10 8 6 9 -1.</_> + <_> + 12 8 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 8 6 9 -1.</_> + <_> + 10 8 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 13 8 4 9 -1.</_> + <_> + 13 8 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 11 9 9 -1.</_> + <_> + 6 11 3 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 9 18 5 -1.</_> + <_> + 9 9 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 2 4 2 20 -1.</_> + <_> + 2 14 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 14 17 8 6 -1.</_> + <_> + 14 20 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 21 18 2 -1.</_> + <_> + 3 22 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 5 4 15 6 -1.</_> + <_> + 10 4 5 6 3.</_></rects></_> + <_> + <rects> + <_> + 2 15 12 6 -1.</_> + <_> + 2 17 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 17 8 6 9 -1.</_> + <_> + 17 11 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 2 12 20 4 -1.</_> + <_> + 2 12 10 2 2.</_> + <_> + 12 14 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 17 24 6 -1.</_> + <_> + 0 19 24 2 3.</_></rects></_> + <_> + <rects> + <_> + 7 16 9 4 -1.</_> + <_> + 7 18 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 15 1 4 22 -1.</_> + <_> + 17 1 2 11 2.</_> + <_> + 15 12 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 5 1 4 22 -1.</_> + <_> + 5 1 2 11 2.</_> + <_> + 7 12 2 11 2.</_></rects></_> + <_> + <rects> + <_> + 11 13 8 9 -1.</_> + <_> + 11 16 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 1 6 9 -1.</_> + <_> + 8 1 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 11 4 3 18 -1.</_> + <_> + 11 10 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 8 12 6 -1.</_> + <_> + 5 8 6 3 2.</_> + <_> + 11 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 15 7 5 8 -1.</_> + <_> + 15 11 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 7 5 8 -1.</_> + <_> + 4 11 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 12 6 6 12 -1.</_> + <_> + 15 6 3 6 2.</_> + <_> + 12 12 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 6 12 -1.</_> + <_> + 6 6 3 6 2.</_> + <_> + 9 12 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 9 14 8 -1.</_> + <_> + 12 9 7 4 2.</_> + <_> + 5 13 7 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 1 3 14 -1.</_> + <_> + 9 8 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 12 6 6 12 -1.</_> + <_> + 12 10 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 4 5 4 18 -1.</_> + <_> + 4 5 2 9 2.</_> + <_> + 6 14 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 4 6 16 18 -1.</_> + <_> + 4 12 16 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 4 7 20 -1.</_> + <_> + 5 14 7 10 2.</_></rects></_> + <_> + <rects> + <_> + 14 8 8 12 -1.</_> + <_> + 14 14 8 6 2.</_></rects></_> + <_> + <rects> + <_> + 9 10 6 14 -1.</_> + <_> + 9 10 3 7 2.</_> + <_> + 12 17 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 5 9 6 -1.</_> + <_> + 12 5 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 9 4 3 18 -1.</_> + <_> + 10 4 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 1 4 22 14 -1.</_> + <_> + 12 4 11 7 2.</_> + <_> + 1 11 11 7 2.</_></rects></_> + <_> + <rects> + <_> + 2 7 18 2 -1.</_> + <_> + 2 8 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 12 6 6 12 -1.</_> + <_> + 12 10 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 6 5 9 7 -1.</_> + <_> + 9 5 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 12 7 4 12 -1.</_> + <_> + 12 13 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 8 7 4 12 -1.</_> + <_> + 8 13 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 2 10 22 -1.</_> + <_> + 7 13 10 11 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 3 20 -1.</_> + <_> + 1 1 1 20 3.</_></rects></_> + <_> + <rects> + <_> + 4 13 18 4 -1.</_> + <_> + 13 13 9 2 2.</_> + <_> + 4 15 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 13 18 4 -1.</_> + <_> + 2 13 9 2 2.</_> + <_> + 11 15 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 15 15 9 6 -1.</_> + <_> + 15 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 9 6 -1.</_> + <_> + 0 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 18 24 -1.</_> + <_> + 15 0 9 12 2.</_> + <_> + 6 12 9 12 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 6 12 -1.</_> + <_> + 6 10 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 8 7 10 4 -1.</_> + <_> + 8 9 10 2 2.</_></rects></_> + <_> + <rects> + <_> + 1 9 18 6 -1.</_> + <_> + 1 9 9 3 2.</_> + <_> + 10 12 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 18 3 -1.</_> + <_> + 6 7 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 7 7 9 8 -1.</_> + <_> + 10 7 3 8 3.</_></rects></_> + <_> + <rects> + <_> + 10 12 6 12 -1.</_> + <_> + 12 12 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 3 14 18 3 -1.</_> + <_> + 3 15 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 7 -1.</_> + <_> + 18 17 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 1 12 10 6 -1.</_> + <_> + 1 14 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 7 -1.</_> + <_> + 18 17 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 10 3 3 19 -1.</_> + <_> + 11 3 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 7 -1.</_> + <_> + 18 17 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 6 1 11 9 -1.</_> + <_> + 6 4 11 3 3.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 7 -1.</_> + <_> + 18 17 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 6 5 11 6 -1.</_> + <_> + 6 8 11 3 2.</_></rects></_> + <_> + <rects> + <_> + 16 7 8 5 -1.</_> + <_> + 16 7 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 4 20 19 -1.</_> + <_> + 12 4 10 19 2.</_></rects></_> + <_> + <rects> + <_> + 2 1 21 6 -1.</_> + <_> + 9 1 7 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 5 12 14 -1.</_> + <_> + 6 5 6 7 2.</_> + <_> + 12 12 6 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 9 -1.</_> + <_> + 11 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 2 11 8 5 -1.</_> + <_> + 6 11 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 16 7 8 5 -1.</_> + <_> + 16 7 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 7 8 5 -1.</_> + <_> + 4 7 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 7 -1.</_> + <_> + 18 17 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 8 6 8 10 -1.</_> + <_> + 8 6 4 5 2.</_> + <_> + 12 11 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 15 15 9 9 -1.</_> + <_> + 18 15 3 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 15 9 9 -1.</_> + <_> + 3 15 3 9 3.</_></rects></_> + <_> + <rects> + <_> + 12 10 9 7 -1.</_> + <_> + 15 10 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 3 10 9 7 -1.</_> + <_> + 6 10 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 13 15 10 8 -1.</_> + <_> + 18 15 5 4 2.</_> + <_> + 13 19 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 6 12 -1.</_> + <_> + 0 1 3 6 2.</_> + <_> + 3 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 0 6 12 -1.</_> + <_> + 13 0 3 6 2.</_> + <_> + 10 6 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 10 12 -1.</_> + <_> + 7 0 5 6 2.</_> + <_> + 12 6 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 1 16 8 -1.</_> + <_> + 4 1 8 8 2.</_></rects></_> + <_> + <rects> + <_> + 0 21 19 3 -1.</_> + <_> + 0 22 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 9 18 4 -1.</_> + <_> + 15 9 9 2 2.</_> + <_> + 6 11 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 4 9 6 -1.</_> + <_> + 3 6 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 1 6 15 -1.</_> + <_> + 9 6 6 5 3.</_></rects></_> + <_> + <rects> + <_> + 5 9 6 6 -1.</_> + <_> + 8 9 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 1 14 9 -1.</_> + <_> + 5 4 14 3 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 8 20 -1.</_> + <_> + 3 0 4 10 2.</_> + <_> + 7 10 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 7 9 -1.</_> + <_> + 5 3 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 6 12 5 -1.</_> + <_> + 10 6 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 8 14 -1.</_> + <_> + 4 1 4 14 2.</_></rects></_> + <_> + <rects> + <_> + 2 12 22 4 -1.</_> + <_> + 2 14 22 2 2.</_></rects></_> + <_> + <rects> + <_> + 8 17 6 6 -1.</_> + <_> + 8 20 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 18 1 6 7 -1.</_> + <_> + 18 1 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 6 -1.</_> + <_> + 3 0 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 6 17 18 -1.</_> + <_> + 4 12 17 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 12 6 -1.</_> + <_> + 6 0 6 3 2.</_> + <_> + 12 3 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 4 7 18 4 -1.</_> + <_> + 13 7 9 2 2.</_> + <_> + 4 9 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 4 12 10 6 -1.</_> + <_> + 4 14 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 7 9 10 12 -1.</_> + <_> + 12 9 5 6 2.</_> + <_> + 7 15 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 3 -1.</_> + <_> + 8 1 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 13 11 6 6 -1.</_> + <_> + 13 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 11 6 6 -1.</_> + <_> + 8 11 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 10 19 3 -1.</_> + <_> + 3 11 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 9 -1.</_> + <_> + 0 5 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 14 16 10 6 -1.</_> + <_> + 14 18 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 10 6 -1.</_> + <_> + 0 18 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 13 9 6 -1.</_> + <_> + 14 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 18 3 -1.</_> + <_> + 0 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 16 18 3 -1.</_> + <_> + 6 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 18 9 6 -1.</_> + <_> + 0 20 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 13 9 6 -1.</_> + <_> + 14 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 2 6 9 -1.</_> + <_> + 8 2 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 15 8 4 12 -1.</_> + <_> + 15 8 2 12 2.</_></rects></_> + <_> + <rects> + <_> + 8 13 8 8 -1.</_> + <_> + 8 17 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 20 18 3 -1.</_> + <_> + 10 20 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 8 4 12 -1.</_> + <_> + 7 8 2 12 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 12 3 -1.</_> + <_> + 7 7 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 9 -1.</_> + <_> + 12 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 5 20 18 3 -1.</_> + <_> + 11 20 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 20 18 3 -1.</_> + <_> + 7 20 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 18 1 6 20 -1.</_> + <_> + 21 1 3 10 2.</_> + <_> + 18 11 3 10 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 6 20 -1.</_> + <_> + 0 1 3 10 2.</_> + <_> + 3 11 3 10 2.</_></rects></_> + <_> + <rects> + <_> + 13 3 4 18 -1.</_> + <_> + 15 3 2 9 2.</_> + <_> + 13 12 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 6 12 -1.</_> + <_> + 0 6 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 12 9 12 6 -1.</_> + <_> + 18 9 6 3 2.</_> + <_> + 12 12 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 3 4 18 -1.</_> + <_> + 7 3 2 9 2.</_> + <_> + 9 12 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 14 0 6 9 -1.</_> + <_> + 16 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 0 9 12 6 -1.</_> + <_> + 0 9 6 3 2.</_> + <_> + 6 12 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 14 4 8 20 -1.</_> + <_> + 18 4 4 10 2.</_> + <_> + 14 14 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 2 4 8 20 -1.</_> + <_> + 2 4 4 10 2.</_> + <_> + 6 14 4 10 2.</_></rects></_> + <_> + <rects> + <_> + 14 13 9 6 -1.</_> + <_> + 14 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 13 9 6 -1.</_> + <_> + 1 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 15 18 3 -1.</_> + <_> + 9 15 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 13 9 6 -1.</_> + <_> + 5 15 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 18 3 -1.</_> + <_> + 5 1 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 8 2 6 7 -1.</_> + <_> + 11 2 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 1 9 6 -1.</_> + <_> + 12 1 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 1 9 6 -1.</_> + <_> + 9 1 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 6 14 6 -1.</_> + <_> + 12 6 7 3 2.</_> + <_> + 5 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 2 6 13 -1.</_> + <_> + 10 2 2 13 3.</_></rects></_> + <_> + <rects> + <_> + 6 11 12 6 -1.</_> + <_> + 12 11 6 3 2.</_> + <_> + 6 14 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 3 1 18 15 -1.</_> + <_> + 9 1 6 15 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 6 7 -1.</_> + <_> + 13 0 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 3 16 6 -1.</_> + <_> + 3 6 16 3 2.</_></rects></_> + <_> + <rects> + <_> + 12 1 3 12 -1.</_> + <_> + 12 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 6 9 -1.</_> + <_> + 9 7 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 13 0 4 24 -1.</_> + <_> + 13 0 2 24 2.</_></rects></_> + <_> + <rects> + <_> + 7 0 4 24 -1.</_> + <_> + 9 0 2 24 2.</_></rects></_> + <_> + <rects> + <_> + 11 9 5 12 -1.</_> + <_> + 11 13 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 7 15 9 6 -1.</_> + <_> + 7 17 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 7 18 6 -1.</_> + <_> + 5 9 18 2 3.</_></rects></_> + <_> + <rects> + <_> + 8 9 5 12 -1.</_> + <_> + 8 13 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 4 17 17 6 -1.</_> + <_> + 4 19 17 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 18 14 -1.</_> + <_> + 0 3 9 7 2.</_> + <_> + 9 10 9 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 1 24 2 -1.</_> + <_> + 0 2 24 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 15 18 3 -1.</_> + <_> + 0 16 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 9 -1.</_> + <_> + 11 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 3 3 14 12 -1.</_> + <_> + 3 9 14 6 2.</_></rects></_> + <_> + <rects> + <_> + 12 1 3 12 -1.</_> + <_> + 12 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 8 0 6 9 -1.</_> + <_> + 10 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 10 6 6 10 -1.</_> + <_> + 12 6 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 6 9 -1.</_> + <_> + 7 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 21 7 -1.</_> + <_> + 9 0 7 7 3.</_></rects></_> + <_> + <rects> + <_> + 6 11 12 5 -1.</_> + <_> + 10 11 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 8 7 9 8 -1.</_> + <_> + 11 7 3 8 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 18 -1.</_> + <_> + 9 6 3 9 2.</_> + <_> + 12 15 3 9 2.</_></rects></_> + <_> + <rects> + <_> + 15 14 8 10 -1.</_> + <_> + 19 14 4 5 2.</_> + <_> + 15 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 14 8 10 -1.</_> + <_> + 1 14 4 5 2.</_> + <_> + 5 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 11 0 8 10 -1.</_> + <_> + 15 0 4 5 2.</_> + <_> + 11 5 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 8 10 -1.</_> + <_> + 5 0 4 5 2.</_> + <_> + 9 5 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 1 12 5 -1.</_> + <_> + 6 1 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 1 12 18 2 -1.</_> + <_> + 10 12 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 8 20 6 -1.</_> + <_> + 12 8 10 3 2.</_> + <_> + 2 11 10 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 9 7 -1.</_> + <_> + 10 6 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 10 5 8 16 -1.</_> + <_> + 14 5 4 8 2.</_> + <_> + 10 13 4 8 2.</_></rects></_> + <_> + <rects> + <_> + 3 9 16 8 -1.</_> + <_> + 3 9 8 4 2.</_> + <_> + 11 13 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 8 10 4 -1.</_> + <_> + 7 8 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 7 12 10 8 -1.</_> + <_> + 7 12 5 4 2.</_> + <_> + 12 16 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 19 15 4 -1.</_> + <_> + 14 19 5 4 3.</_></rects></_> + <_> + <rects> + <_> + 1 0 18 9 -1.</_> + <_> + 7 0 6 9 3.</_></rects></_> + <_> + <rects> + <_> + 13 4 10 8 -1.</_> + <_> + 18 4 5 4 2.</_> + <_> + 13 8 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 3 16 18 4 -1.</_> + <_> + 9 16 6 4 3.</_></rects></_> + <_> + <rects> + <_> + 8 7 10 12 -1.</_> + <_> + 13 7 5 6 2.</_> + <_> + 8 13 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 7 10 12 -1.</_> + <_> + 6 7 5 6 2.</_> + <_> + 11 13 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 4 6 18 7 -1.</_> + <_> + 10 6 6 7 3.</_></rects></_> + <_> + <rects> + <_> + 0 17 18 3 -1.</_> + <_> + 0 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 17 18 3 -1.</_> + <_> + 3 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 4 6 10 -1.</_> + <_> + 4 4 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 16 0 8 24 -1.</_> + <_> + 16 0 4 24 2.</_></rects></_> + <_> + <rects> + <_> + 4 0 8 15 -1.</_> + <_> + 8 0 4 15 2.</_></rects></_> + <_> + <rects> + <_> + 16 0 8 24 -1.</_> + <_> + 16 0 4 24 2.</_></rects></_> + <_> + <rects> + <_> + 1 4 18 9 -1.</_> + <_> + 7 4 6 9 3.</_></rects></_> + <_> + <rects> + <_> + 15 12 9 6 -1.</_> + <_> + 15 14 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 9 18 6 -1.</_> + <_> + 3 9 9 3 2.</_> + <_> + 12 12 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 18 5 6 9 -1.</_> + <_> + 18 8 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 6 9 -1.</_> + <_> + 0 8 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 7 18 4 -1.</_> + <_> + 13 7 9 2 2.</_> + <_> + 4 9 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 1 12 20 -1.</_> + <_> + 2 1 6 10 2.</_> + <_> + 8 11 6 10 2.</_></rects></_> + <_> + <rects> + <_> + 17 0 6 23 -1.</_> + <_> + 17 0 3 23 2.</_></rects></_> + <_> + <rects> + <_> + 1 6 2 18 -1.</_> + <_> + 1 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 8 8 10 6 -1.</_> + <_> + 8 10 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 6 20 6 -1.</_> + <_> + 0 6 10 3 2.</_> + <_> + 10 9 10 3 2.</_></rects></_> + <_> + <rects> + <_> + 11 12 12 5 -1.</_> + <_> + 15 12 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 4 3 19 -1.</_> + <_> + 1 4 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 19 1 3 18 -1.</_> + <_> + 20 1 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 2 1 3 18 -1.</_> + <_> + 3 1 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 3 10 18 3 -1.</_> + <_> + 9 10 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 4 10 9 -1.</_> + <_> + 9 4 5 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 13 14 7 -1.</_> + <_> + 7 13 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 13 14 7 -1.</_> + <_> + 10 13 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 8 15 9 6 -1.</_> + <_> + 11 15 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 4 14 8 10 -1.</_> + <_> + 4 14 4 5 2.</_> + <_> + 8 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 10 14 4 10 -1.</_> + <_> + 10 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 8 5 16 -1.</_> + <_> + 3 16 5 8 2.</_></rects></_> + <_> + <rects> + <_> + 15 10 9 6 -1.</_> + <_> + 15 12 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 10 9 6 -1.</_> + <_> + 0 12 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 7 12 9 -1.</_> + <_> + 6 10 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 9 10 5 8 -1.</_> + <_> + 9 14 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 12 1 3 12 -1.</_> + <_> + 12 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 8 15 6 9 -1.</_> + <_> + 10 15 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 16 6 7 6 -1.</_> + <_> + 16 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 1 4 22 -1.</_> + <_> + 10 1 2 22 2.</_></rects></_> + <_> + <rects> + <_> + 6 6 14 3 -1.</_> + <_> + 6 6 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 18 19 3 -1.</_> + <_> + 0 19 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 17 0 6 24 -1.</_> + <_> + 17 0 3 24 2.</_></rects></_> + <_> + <rects> + <_> + 0 13 15 6 -1.</_> + <_> + 5 13 5 6 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 10 14 -1.</_> + <_> + 14 6 5 7 2.</_> + <_> + 9 13 5 7 2.</_></rects></_> + <_> + <rects> + <_> + 1 6 8 10 -1.</_> + <_> + 1 6 4 5 2.</_> + <_> + 5 11 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 12 5 -1.</_> + <_> + 7 6 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 7 7 9 6 -1.</_> + <_> + 10 7 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 7 8 14 14 -1.</_> + <_> + 14 8 7 7 2.</_> + <_> + 7 15 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 8 14 14 -1.</_> + <_> + 3 8 7 7 2.</_> + <_> + 10 15 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 8 13 4 -1.</_> + <_> + 9 10 13 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 2 6 12 -1.</_> + <_> + 3 2 3 6 2.</_> + <_> + 6 8 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 10 17 6 -1.</_> + <_> + 6 13 17 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 10 17 6 -1.</_> + <_> + 1 13 17 3 2.</_></rects></_> + <_> + <rects> + <_> + 16 7 8 9 -1.</_> + <_> + 16 10 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 7 8 9 -1.</_> + <_> + 0 10 8 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 9 24 10 -1.</_> + <_> + 12 9 12 5 2.</_> + <_> + 0 14 12 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 2 15 8 -1.</_> + <_> + 8 2 5 8 3.</_></rects></_> + <_> + <rects> + <_> + 4 2 18 8 -1.</_> + <_> + 10 2 6 8 3.</_></rects></_> + <_> + <rects> + <_> + 0 1 18 4 -1.</_> + <_> + 0 1 9 2 2.</_> + <_> + 9 3 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 20 2 3 18 -1.</_> + <_> + 21 2 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 1 3 3 19 -1.</_> + <_> + 2 3 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 18 8 6 16 -1.</_> + <_> + 20 8 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 0 8 6 16 -1.</_> + <_> + 2 8 2 16 3.</_></rects></_> + <_> + <rects> + <_> + 8 18 11 6 -1.</_> + <_> + 8 20 11 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 6 12 5 -1.</_> + <_> + 8 6 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 7 6 12 5 -1.</_> + <_> + 11 6 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 6 3 9 6 -1.</_> + <_> + 9 3 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 7 6 12 5 -1.</_> + <_> + 7 6 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 9 8 6 7 -1.</_> + <_> + 12 8 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 8 2 9 6 -1.</_> + <_> + 11 2 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 8 14 6 9 -1.</_> + <_> + 8 17 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 2 9 6 -1.</_> + <_> + 11 2 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 4 3 16 20 -1.</_> + <_> + 4 3 8 10 2.</_> + <_> + 12 13 8 10 2.</_></rects></_> + <_> + <rects> + <_> + 7 6 10 12 -1.</_> + <_> + 12 6 5 6 2.</_> + <_> + 7 12 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 2 7 12 -1.</_> + <_> + 0 6 7 4 3.</_></rects></_> + <_> + <rects> + <_> + 12 17 11 6 -1.</_> + <_> + 12 19 11 2 3.</_></rects></_> + <_> + <rects> + <_> + 4 7 12 8 -1.</_> + <_> + 4 7 6 4 2.</_> + <_> + 10 11 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 8 11 8 10 -1.</_> + <_> + 12 11 4 5 2.</_> + <_> + 8 16 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 9 1 4 9 -1.</_> + <_> + 11 1 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 14 0 3 22 -1.</_> + <_> + 15 0 1 22 3.</_></rects></_> + <_> + <rects> + <_> + 7 0 3 22 -1.</_> + <_> + 8 0 1 22 3.</_></rects></_> + <_> + <rects> + <_> + 4 7 18 4 -1.</_> + <_> + 13 7 9 2 2.</_> + <_> + 4 9 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 10 2 4 15 -1.</_> + <_> + 10 7 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 12 1 3 12 -1.</_> + <_> + 12 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 18 13 -1.</_> + <_> + 9 0 9 13 2.</_></rects></_> + <_> + <rects> + <_> + 16 0 3 24 -1.</_> + <_> + 17 0 1 24 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 3 24 -1.</_> + <_> + 6 0 1 24 3.</_></rects></_> + <_> + <rects> + <_> + 10 15 5 8 -1.</_> + <_> + 10 19 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 2 18 18 2 -1.</_> + <_> + 2 19 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 2 8 20 3 -1.</_> + <_> + 2 9 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 7 6 9 6 -1.</_> + <_> + 7 8 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 2 19 10 -1.</_> + <_> + 3 7 19 5 2.</_></rects></_> + <_> + <rects> + <_> + 2 7 19 3 -1.</_> + <_> + 2 8 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 15 6 9 4 -1.</_> + <_> + 15 8 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 2 2 18 8 -1.</_> + <_> + 8 2 6 8 3.</_></rects></_> + <_> + <rects> + <_> + 10 9 14 4 -1.</_> + <_> + 10 9 7 4 2.</_></rects></_> + <_> + <rects> + <_> + 4 4 6 16 -1.</_> + <_> + 7 4 3 16 2.</_></rects></_> + <_> + <rects> + <_> + 15 8 9 16 -1.</_> + <_> + 18 8 3 16 3.</_></rects></_> + <_> + <rects> + <_> + 0 8 9 16 -1.</_> + <_> + 3 8 3 16 3.</_></rects></_> + <_> + <rects> + <_> + 18 0 6 14 -1.</_> + <_> + 20 0 2 14 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 6 14 -1.</_> + <_> + 2 0 2 14 3.</_></rects></_> + <_> + <rects> + <_> + 15 0 6 22 -1.</_> + <_> + 17 0 2 22 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 6 22 -1.</_> + <_> + 5 0 2 22 3.</_></rects></_> + <_> + <rects> + <_> + 12 2 12 20 -1.</_> + <_> + 16 2 4 20 3.</_></rects></_> + <_> + <rects> + <_> + 0 2 12 20 -1.</_> + <_> + 4 2 4 20 3.</_></rects></_> + <_> + <rects> + <_> + 11 6 4 9 -1.</_> + <_> + 11 6 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 9 0 6 16 -1.</_> + <_> + 12 0 3 16 2.</_></rects></_> + <_> + <rects> + <_> + 12 1 3 12 -1.</_> + <_> + 12 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 4 18 6 -1.</_> + <_> + 3 4 9 3 2.</_> + <_> + 12 7 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 5 16 8 -1.</_> + <_> + 13 5 8 4 2.</_> + <_> + 5 9 8 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 13 10 6 -1.</_> + <_> + 0 15 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 8 14 9 6 -1.</_> + <_> + 8 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 2 9 6 -1.</_> + <_> + 9 2 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 14 1 10 8 -1.</_> + <_> + 19 1 5 4 2.</_> + <_> + 14 5 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 1 3 12 -1.</_> + <_> + 9 7 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 12 9 -1.</_> + <_> + 6 7 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 5 12 6 -1.</_> + <_> + 10 5 4 6 3.</_></rects></_> + <_> + <rects> + <_> + 1 1 8 5 -1.</_> + <_> + 5 1 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 12 12 6 8 -1.</_> + <_> + 12 16 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 3 12 12 6 -1.</_> + <_> + 3 14 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 9 18 12 6 -1.</_> + <_> + 15 18 6 3 2.</_> + <_> + 9 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 4 13 6 6 -1.</_> + <_> + 4 16 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 11 3 7 18 -1.</_> + <_> + 11 12 7 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 9 18 3 -1.</_> + <_> + 9 9 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 3 19 2 -1.</_> + <_> + 5 4 19 1 2.</_></rects></_> + <_> + <rects> + <_> + 4 2 12 6 -1.</_> + <_> + 4 2 6 3 2.</_> + <_> + 10 5 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 9 6 6 9 -1.</_> + <_> + 11 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 8 6 6 9 -1.</_> + <_> + 10 6 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 16 9 5 15 -1.</_> + <_> + 16 14 5 5 3.</_></rects></_> + <_> + <rects> + <_> + 3 9 5 15 -1.</_> + <_> + 3 14 5 5 3.</_></rects></_> + <_> + <rects> + <_> + 6 6 14 6 -1.</_> + <_> + 13 6 7 3 2.</_> + <_> + 6 9 7 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 6 3 14 -1.</_> + <_> + 8 13 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 16 24 5 -1.</_> + <_> + 8 16 8 5 3.</_></rects></_> + <_> + <rects> + <_> + 0 20 20 3 -1.</_> + <_> + 10 20 10 3 2.</_></rects></_> + <_> + <rects> + <_> + 5 10 18 2 -1.</_> + <_> + 5 11 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 6 6 10 -1.</_> + <_> + 2 6 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 2 1 20 3 -1.</_> + <_> + 2 2 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 13 6 11 -1.</_> + <_> + 11 13 2 11 3.</_></rects></_> + <_> + <rects> + <_> + 9 15 6 8 -1.</_> + <_> + 9 19 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 9 -1.</_> + <_> + 9 15 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 11 18 2 -1.</_> + <_> + 5 12 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 2 6 15 6 -1.</_> + <_> + 2 8 15 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 18 3 -1.</_> + <_> + 6 1 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 0 3 18 -1.</_> + <_> + 6 0 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 18 3 6 10 -1.</_> + <_> + 20 3 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 6 10 -1.</_> + <_> + 2 3 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 10 5 8 9 -1.</_> + <_> + 10 5 4 9 2.</_></rects></_> + <_> + <rects> + <_> + 6 5 8 9 -1.</_> + <_> + 10 5 4 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 2 20 3 -1.</_> + <_> + 3 3 20 1 3.</_></rects></_> + <_> + <rects> + <_> + 5 2 13 4 -1.</_> + <_> + 5 4 13 2 2.</_></rects></_> + <_> + <rects> + <_> + 17 0 7 14 -1.</_> + <_> + 17 7 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 7 14 -1.</_> + <_> + 0 7 7 7 2.</_></rects></_> + <_> + <rects> + <_> + 9 11 10 6 -1.</_> + <_> + 9 11 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 11 10 6 -1.</_> + <_> + 10 11 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 11 6 3 18 -1.</_> + <_> + 11 12 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 18 3 -1.</_> + <_> + 0 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 16 18 3 -1.</_> + <_> + 6 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 4 6 9 10 -1.</_> + <_> + 4 11 9 5 2.</_></rects></_> + <_> + <rects> + <_> + 9 7 15 4 -1.</_> + <_> + 9 9 15 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 6 12 6 -1.</_> + <_> + 5 6 6 3 2.</_> + <_> + 11 9 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 6 1 12 9 -1.</_> + <_> + 6 4 12 3 3.</_></rects></_> + <_> + <rects> + <_> + 7 9 6 12 -1.</_> + <_> + 7 9 3 6 2.</_> + <_> + 10 15 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 11 5 13 6 -1.</_> + <_> + 11 7 13 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 11 22 13 -1.</_> + <_> + 12 11 11 13 2.</_></rects></_> + <_> + <rects> + <_> + 18 8 6 6 -1.</_> + <_> + 18 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 8 6 6 -1.</_> + <_> + 0 11 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 6 24 3 -1.</_> + <_> + 0 7 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 10 6 -1.</_> + <_> + 0 7 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 7 18 3 -1.</_> + <_> + 6 8 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 10 6 -1.</_> + <_> + 0 2 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 19 0 3 19 -1.</_> + <_> + 20 0 1 19 3.</_></rects></_> + <_> + <rects> + <_> + 4 6 12 16 -1.</_> + <_> + 4 6 6 8 2.</_> + <_> + 10 14 6 8 2.</_></rects></_> + <_> + <rects> + <_> + 19 6 4 18 -1.</_> + <_> + 21 6 2 9 2.</_> + <_> + 19 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 1 6 4 18 -1.</_> + <_> + 1 6 2 9 2.</_> + <_> + 3 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 3 21 18 3 -1.</_> + <_> + 3 22 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 19 9 4 -1.</_> + <_> + 0 21 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 12 18 12 6 -1.</_> + <_> + 18 18 6 3 2.</_> + <_> + 12 21 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 7 18 9 4 -1.</_> + <_> + 7 20 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 12 16 10 8 -1.</_> + <_> + 17 16 5 4 2.</_> + <_> + 12 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 2 16 10 8 -1.</_> + <_> + 2 16 5 4 2.</_> + <_> + 7 20 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 14 0 10 12 -1.</_> + <_> + 19 0 5 6 2.</_> + <_> + 14 6 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 0 10 12 -1.</_> + <_> + 0 0 5 6 2.</_> + <_> + 5 6 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 15 14 9 6 -1.</_> + <_> + 15 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 9 6 -1.</_> + <_> + 0 16 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 14 14 10 6 -1.</_> + <_> + 14 16 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 10 6 -1.</_> + <_> + 0 16 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 5 18 18 2 -1.</_> + <_> + 5 19 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 0 18 18 3 -1.</_> + <_> + 0 19 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 3 5 18 12 -1.</_> + <_> + 12 5 9 6 2.</_> + <_> + 3 11 9 6 2.</_></rects></_> + <_> + <rects> + <_> + 5 3 7 9 -1.</_> + <_> + 5 6 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 0 19 15 -1.</_> + <_> + 4 5 19 5 3.</_></rects></_> + <_> + <rects> + <_> + 3 0 16 4 -1.</_> + <_> + 3 2 16 2 2.</_></rects></_> + <_> + <rects> + <_> + 4 12 16 12 -1.</_> + <_> + 4 12 8 12 2.</_></rects></_> + <_> + <rects> + <_> + 4 3 12 15 -1.</_> + <_> + 10 3 6 15 2.</_></rects></_> + <_> + <rects> + <_> + 16 4 2 19 -1.</_> + <_> + 16 4 1 19 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 2 19 -1.</_> + <_> + 7 4 1 19 2.</_></rects></_> + <_> + <rects> + <_> + 13 14 8 10 -1.</_> + <_> + 17 14 4 5 2.</_> + <_> + 13 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 3 14 8 10 -1.</_> + <_> + 3 14 4 5 2.</_> + <_> + 7 19 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 12 6 3 18 -1.</_> + <_> + 12 12 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 5 11 12 6 -1.</_> + <_> + 5 11 6 3 2.</_> + <_> + 11 14 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 10 5 8 10 -1.</_> + <_> + 14 5 4 5 2.</_> + <_> + 10 10 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 4 12 10 -1.</_> + <_> + 6 4 6 5 2.</_> + <_> + 12 9 6 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 8 18 10 -1.</_> + <_> + 15 8 9 5 2.</_> + <_> + 6 13 9 5 2.</_></rects></_> + <_> + <rects> + <_> + 0 8 18 10 -1.</_> + <_> + 0 8 9 5 2.</_> + <_> + 9 13 9 5 2.</_></rects></_> + <_> + <rects> + <_> + 12 6 3 18 -1.</_> + <_> + 12 12 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 0 14 18 3 -1.</_> + <_> + 0 15 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 12 6 3 18 -1.</_> + <_> + 12 12 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 9 6 3 18 -1.</_> + <_> + 9 12 3 6 3.</_></rects></_> + <_> + <rects> + <_> + 6 14 18 3 -1.</_> + <_> + 6 15 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 5 18 3 -1.</_> + <_> + 0 6 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 2 5 22 3 -1.</_> + <_> + 2 6 22 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 21 10 -1.</_> + <_> + 7 0 7 10 3.</_></rects></_> + <_> + <rects> + <_> + 6 3 18 17 -1.</_> + <_> + 12 3 6 17 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 18 17 -1.</_> + <_> + 6 3 6 17 3.</_></rects></_> + <_> + <rects> + <_> + 0 12 24 11 -1.</_> + <_> + 8 12 8 11 3.</_></rects></_> + <_> + <rects> + <_> + 4 10 16 6 -1.</_> + <_> + 4 13 16 3 2.</_></rects></_> + <_> + <rects> + <_> + 12 8 6 8 -1.</_> + <_> + 12 12 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 14 8 7 -1.</_> + <_> + 10 14 4 7 2.</_></rects></_> + <_> + <rects> + <_> + 15 10 6 14 -1.</_> + <_> + 18 10 3 7 2.</_> + <_> + 15 17 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 10 6 14 -1.</_> + <_> + 3 10 3 7 2.</_> + <_> + 6 17 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 6 12 18 2 -1.</_> + <_> + 6 13 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 5 8 10 6 -1.</_> + <_> + 5 10 10 2 3.</_></rects></_> + <_> + <rects> + <_> + 12 11 9 4 -1.</_> + <_> + 12 13 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 0 11 9 6 -1.</_> + <_> + 0 13 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 11 2 3 18 -1.</_> + <_> + 12 2 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 10 2 3 18 -1.</_> + <_> + 11 2 1 18 3.</_></rects></_> + <_> + <rects> + <_> + 9 12 6 10 -1.</_> + <_> + 11 12 2 10 3.</_></rects></_> + <_> + <rects> + <_> + 1 10 6 9 -1.</_> + <_> + 1 13 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 6 9 16 6 -1.</_> + <_> + 14 9 8 3 2.</_> + <_> + 6 12 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 8 9 6 -1.</_> + <_> + 1 10 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 7 7 16 6 -1.</_> + <_> + 7 9 16 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 0 18 3 -1.</_> + <_> + 0 1 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 10 0 6 9 -1.</_> + <_> + 12 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 5 6 6 -1.</_> + <_> + 12 5 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 18 -1.</_> + <_> + 12 6 2 9 2.</_> + <_> + 10 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 8 0 6 9 -1.</_> + <_> + 10 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 1 6 9 -1.</_> + <_> + 9 4 6 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 0 18 9 -1.</_> + <_> + 1 3 18 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 3 24 3 -1.</_> + <_> + 0 4 24 1 3.</_></rects></_> + <_> + <rects> + <_> + 6 14 9 4 -1.</_> + <_> + 6 16 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 8 9 8 10 -1.</_> + <_> + 12 9 4 5 2.</_> + <_> + 8 14 4 5 2.</_></rects></_> + <_> + <rects> + <_> + 5 2 13 9 -1.</_> + <_> + 5 5 13 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 4 16 9 -1.</_> + <_> + 4 7 16 3 3.</_></rects></_> + <_> + <rects> + <_> + 4 4 14 9 -1.</_> + <_> + 4 7 14 3 3.</_></rects></_> + <_> + <rects> + <_> + 8 5 9 6 -1.</_> + <_> + 8 7 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 7 16 6 -1.</_> + <_> + 1 9 16 2 3.</_></rects></_> + <_> + <rects> + <_> + 10 5 13 9 -1.</_> + <_> + 10 8 13 3 3.</_></rects></_> + <_> + <rects> + <_> + 1 5 13 9 -1.</_> + <_> + 1 8 13 3 3.</_></rects></_> + <_> + <rects> + <_> + 0 4 24 6 -1.</_> + <_> + 12 4 12 3 2.</_> + <_> + 0 7 12 3 2.</_></rects></_> + <_> + <rects> + <_> + 1 14 10 9 -1.</_> + <_> + 1 17 10 3 3.</_></rects></_> + <_> + <rects> + <_> + 5 17 18 3 -1.</_> + <_> + 5 18 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 16 18 3 -1.</_> + <_> + 0 17 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 17 9 6 -1.</_> + <_> + 9 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 20 22 4 -1.</_> + <_> + 1 20 11 2 2.</_> + <_> + 12 22 11 2 2.</_></rects></_> + <_> + <rects> + <_> + 8 14 8 6 -1.</_> + <_> + 8 17 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 8 6 8 15 -1.</_> + <_> + 8 11 8 5 3.</_></rects></_> + <_> + <rects> + <_> + 5 4 18 3 -1.</_> + <_> + 5 5 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 3 5 10 -1.</_> + <_> + 9 8 5 5 2.</_></rects></_> + <_> + <rects> + <_> + 6 8 12 3 -1.</_> + <_> + 6 8 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 2 6 18 6 -1.</_> + <_> + 2 6 9 3 2.</_> + <_> + 11 9 9 3 2.</_></rects></_> + <_> + <rects> + <_> + 10 6 4 18 -1.</_> + <_> + 12 6 2 9 2.</_> + <_> + 10 15 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 7 5 6 6 -1.</_> + <_> + 10 5 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 14 5 2 18 -1.</_> + <_> + 14 14 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 8 5 2 18 -1.</_> + <_> + 8 14 2 9 2.</_></rects></_> + <_> + <rects> + <_> + 9 2 10 6 -1.</_> + <_> + 9 2 5 6 2.</_></rects></_> + <_> + <rects> + <_> + 3 1 18 12 -1.</_> + <_> + 12 1 9 12 2.</_></rects></_> + <_> + <rects> + <_> + 5 2 17 22 -1.</_> + <_> + 5 13 17 11 2.</_></rects></_> + <_> + <rects> + <_> + 4 0 12 6 -1.</_> + <_> + 4 2 12 2 3.</_></rects></_> + <_> + <rects> + <_> + 6 9 16 6 -1.</_> + <_> + 14 9 8 3 2.</_> + <_> + 6 12 8 3 2.</_></rects></_> + <_> + <rects> + <_> + 9 0 5 18 -1.</_> + <_> + 9 9 5 9 2.</_></rects></_> + <_> + <rects> + <_> + 12 0 6 9 -1.</_> + <_> + 14 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 6 0 6 9 -1.</_> + <_> + 8 0 2 9 3.</_></rects></_> + <_> + <rects> + <_> + 9 1 6 12 -1.</_> + <_> + 11 1 2 12 3.</_></rects></_> + <_> + <rects> + <_> + 5 9 13 4 -1.</_> + <_> + 5 11 13 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 8 19 3 -1.</_> + <_> + 5 9 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 9 9 6 8 -1.</_> + <_> + 9 13 6 4 2.</_></rects></_> + <_> + <rects> + <_> + 11 9 4 15 -1.</_> + <_> + 11 14 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 2 0 6 14 -1.</_> + <_> + 2 0 3 7 2.</_> + <_> + 5 7 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 15 1 6 14 -1.</_> + <_> + 18 1 3 7 2.</_> + <_> + 15 8 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 1 6 14 -1.</_> + <_> + 3 1 3 7 2.</_> + <_> + 6 8 3 7 2.</_></rects></_> + <_> + <rects> + <_> + 3 20 18 4 -1.</_> + <_> + 12 20 9 2 2.</_> + <_> + 3 22 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 5 0 4 20 -1.</_> + <_> + 5 0 2 10 2.</_> + <_> + 7 10 2 10 2.</_></rects></_> + <_> + <rects> + <_> + 16 8 8 12 -1.</_> + <_> + 20 8 4 6 2.</_> + <_> + 16 14 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 8 8 12 -1.</_> + <_> + 0 8 4 6 2.</_> + <_> + 4 14 4 6 2.</_></rects></_> + <_> + <rects> + <_> + 13 13 10 8 -1.</_> + <_> + 18 13 5 4 2.</_> + <_> + 13 17 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 1 13 10 8 -1.</_> + <_> + 1 13 5 4 2.</_> + <_> + 6 17 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 15 8 4 15 -1.</_> + <_> + 15 13 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 5 8 4 15 -1.</_> + <_> + 5 13 4 5 3.</_></rects></_> + <_> + <rects> + <_> + 6 11 16 12 -1.</_> + <_> + 6 15 16 4 3.</_></rects></_> + <_> + <rects> + <_> + 2 11 16 12 -1.</_> + <_> + 2 15 16 4 3.</_></rects></_> + <_> + <rects> + <_> + 14 12 7 9 -1.</_> + <_> + 14 15 7 3 3.</_></rects></_> + <_> + <rects> + <_> + 10 1 3 21 -1.</_> + <_> + 10 8 3 7 3.</_></rects></_> + <_> + <rects> + <_> + 13 11 9 4 -1.</_> + <_> + 13 13 9 2 2.</_></rects></_> + <_> + <rects> + <_> + 3 10 17 9 -1.</_> + <_> + 3 13 17 3 3.</_></rects></_> + <_> + <rects> + <_> + 13 8 8 15 -1.</_> + <_> + 13 13 8 5 3.</_></rects></_> + <_> + <rects> + <_> + 3 8 8 15 -1.</_> + <_> + 3 13 8 5 3.</_></rects></_> + <_> + <rects> + <_> + 11 14 10 8 -1.</_> + <_> + 16 14 5 4 2.</_> + <_> + 11 18 5 4 2.</_></rects></_> + <_> + <rects> + <_> + 0 18 22 6 -1.</_> + <_> + 0 18 11 3 2.</_> + <_> + 11 21 11 3 2.</_></rects></_> + <_> + <rects> + <_> + 0 16 24 4 -1.</_> + <_> + 0 16 12 4 2.</_></rects></_> + <_> + <rects> + <_> + 6 20 12 3 -1.</_> + <_> + 12 20 6 3 2.</_></rects></_> + <_> + <rects> + <_> + 18 12 6 12 -1.</_> + <_> + 21 12 3 6 2.</_> + <_> + 18 18 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 0 12 6 12 -1.</_> + <_> + 0 12 3 6 2.</_> + <_> + 3 18 3 6 2.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 6 -1.</_> + <_> + 15 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 1 6 22 10 -1.</_> + <_> + 1 6 11 5 2.</_> + <_> + 12 11 11 5 2.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 6 -1.</_> + <_> + 15 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 18 18 2 -1.</_> + <_> + 0 19 18 1 2.</_></rects></_> + <_> + <rects> + <_> + 3 15 19 3 -1.</_> + <_> + 3 16 19 1 3.</_></rects></_> + <_> + <rects> + <_> + 0 13 18 3 -1.</_> + <_> + 0 14 18 1 3.</_></rects></_> + <_> + <rects> + <_> + 15 17 9 6 -1.</_> + <_> + 15 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 0 17 9 6 -1.</_> + <_> + 0 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 12 17 9 6 -1.</_> + <_> + 12 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 3 17 9 6 -1.</_> + <_> + 3 19 9 2 3.</_></rects></_> + <_> + <rects> + <_> + 16 2 3 20 -1.</_> + <_> + 17 2 1 20 3.</_></rects></_> + <_> + <rects> + <_> + 0 13 24 8 -1.</_> + <_> + 0 17 24 4 2.</_></rects></_> + <_> + <rects> + <_> + 9 1 6 22 -1.</_> + <_> + 12 1 3 11 2.</_> + <_> + 9 12 3 11 2.</_></rects></_></features></cascade> +</opencv_storage> diff --git a/hangman.java b/hangman.java new file mode 100644 index 00000000..fa26b478 --- /dev/null +++ b/hangman.java @@ -0,0 +1,62 @@ +import java.util.Scanner; +import java.util.Random; + +public class HangmanGame { + public static void main(String[] args) { + String[] words = { "java", "programming", "hangman", "computer", "algorithm", "developer" }; + Random random = new Random(); + String wordToGuess = words[random.nextInt(words.length)]; + + int maxAttempts = 6; + int attemptsLeft = maxAttempts; + boolean[] guessedLetters = new boolean[wordToGuess.length()]; + + Scanner scanner = new Scanner(System.in); + + System.out.println("Welcome to Hangman!"); + char[] displayWord = new char[wordToGuess.length()]; + for (int i = 0; i < wordToGuess.length(); i++) { + displayWord[i] = '_'; + } + + while (attemptsLeft > 0) { + System.out.println("Word to guess: " + new String(displayWord)); + System.out.println("Attempts left: " + attemptsLeft); + System.out.print("Guess a letter: "); + char guess = scanner.next().charAt(0); + + boolean found = false; + for (int i = 0; i < wordToGuess.length(); i++) { + if (wordToGuess.charAt(i) == guess) { + displayWord[i] = guess; + guessedLetters[i] = true; + found = true; + } + } + + if (!found) { + System.out.println("Incorrect guess."); + attemptsLeft--; + } + + boolean isComplete = true; + for (boolean guessed : guessedLetters) { + if (!guessed) { + isComplete = false; + break; + } + } + + if (isComplete) { + System.out.println("Congratulations! You've guessed the word: " + wordToGuess); + break; + } + } + + if (attemptsLeft == 0) { + System.out.println("Out of attempts. The word was: " + wordToGuess); + } + + scanner.close(); + } +} diff --git a/headsTails3524.java b/headsTails3524.java new file mode 100644 index 00000000..a0152b20 --- /dev/null +++ b/headsTails3524.java @@ -0,0 +1,39 @@ +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.*; + +public class headsTails3524 { + public static void main(String[] args) { + System.out.println("2021503524 - Mugundh J B"); + System.out.println("Date: " + LocalDate.now() + " Time: " + LocalTime.now()); + + // Create a random number generator + Random rand = new Random(); + + // Generate a random number (0 or 1) + int num = rand.nextInt(2); + + // Create a Scanner to read user input + Scanner in = new Scanner(System.in); + + // Prompt the user for their choice + System.out.print("Enter your choice (h / H / t / T): "); + char choice = in.next().charAt(0); + + // Validate user's choice + while (choice != 'h' && choice != 'H' && choice != 't' && choice != 'T') { + System.out.printf("Invalid choice. Enter your choice (h / H / t / T): "); + choice = in.next().charAt(0); + } + + // Display the random value generated + System.out.printf("Random value = %d\n", num); + + // Check if the user won or lost based on their choice and the random value + if (((choice == 'h' || choice == 'H') && num == 1) || ((choice == 't' || choice == 'T') && num == 0)) + System.out.print("You won!"); + else + System.out.print("You lose!"); + + } +} diff --git a/helloWorld3524.java b/helloWorld3524.java new file mode 100644 index 00000000..cc48fce0 --- /dev/null +++ b/helloWorld3524.java @@ -0,0 +1,13 @@ + +import java.time.LocalDate; +import java.time.LocalTime; + +public class helloWorld3524 { + public static void main(String[] a) { + System.out.println("2021503524 - Mugundh J B"); + System.out.printf("Date: " + LocalDate.now() + " Time: " + LocalTime.now()); + System.out.print("\nHello, "); + System.out.print(a[0]); + System.out.println("\nGood morning! "); + } +} diff --git a/img/Thumbs.db b/img/Thumbs.db new file mode 100644 index 00000000..db7506be Binary files /dev/null and b/img/Thumbs.db differ diff --git a/img/business.jpg b/img/business.jpg new file mode 100644 index 00000000..87313554 Binary files /dev/null and b/img/business.jpg differ diff --git a/img/business1.JPG b/img/business1.JPG new file mode 100644 index 00000000..0eeaff31 Binary files /dev/null and b/img/business1.JPG differ diff --git a/img/economic.jpg b/img/economic.jpg new file mode 100644 index 00000000..e53df2ae Binary files /dev/null and b/img/economic.jpg differ diff --git a/img/economic1.JPG b/img/economic1.JPG new file mode 100644 index 00000000..b3f95814 Binary files /dev/null and b/img/economic1.JPG differ diff --git a/index.html b/index.html new file mode 100644 index 00000000..8d8fd623 --- /dev/null +++ b/index.html @@ -0,0 +1,32 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta http-equiv="X-UA-Compatible" content="ie=edge"> + <title>Number Guessing Game</title> + <link rel="stylesheet" href="style.css"> +</head> +<body style="background-color:#212121; color:#fff;"> + + + <div id="wrapper"> + <h1>Number guessing game</h1> + <p>Try and guess a random number between 1 and 100.</p> + <p>You have 10 attempts to guess the right number.</p> + </br> + <form class="form"> + <label2 for="guessField" id="guess">Guess a number</label> + <input type="text" id="guessField" class="guessField"> + <input type="submit" id="subt" value="Submit guess" class="guessSubmit"> + </form> + + <div class="resultParas"> + <p >Previous Guesses: <span class="guesses"></span></p> + <p >Guesses Remaining: <span class="lastResult">10</span></p> + <p class="lowOrHi"></p> + </div> + </div> + <script src="script.js"></script> +</body> +</html> \ No newline at end of file diff --git a/inheritance&polymorphism.java b/inheritance&polymorphism.java new file mode 100644 index 00000000..d40b498a --- /dev/null +++ b/inheritance&polymorphism.java @@ -0,0 +1,27 @@ +class Animal { + void sound() { + System.out.println("Animal makes a sound"); + } +} + +class Dog extends Animal { + void sound() { + System.out.println("Dog barks"); + } +} + +class Cat extends Animal { + void sound() { + System.out.println("Cat meows"); + } +} + +public class AnimalDemo { + public static void main(String[] args) { + Animal myDog = new Dog(); + Animal myCat = new Cat(); + + myDog.sound(); + myCat.sound(); + } +} diff --git a/interface.java b/interface.java new file mode 100644 index 00000000..8906c46d --- /dev/null +++ b/interface.java @@ -0,0 +1,28 @@ +interface Shape { + double area(); + double perimeter(); +} + +class Circle implements Shape { + private double radius; + + public Circle(double radius) { + this.radius = radius; + } + + public double area() { + return Math.PI * radius * radius; + } + + public double perimeter() { + return 2 * Math.PI * radius; + } +} + +public class InterfaceDemo { + public static void main(String[] args) { + Circle circle = new Circle(5.0); + System.out.println("Circle Area: " + circle.area()); + System.out.println("Circle Perimeter: " + circle.perimeter()); + } +} diff --git a/javaCalculator.java b/javaCalculator.java new file mode 100644 index 00000000..b9c8c4ad --- /dev/null +++ b/javaCalculator.java @@ -0,0 +1,319 @@ +import java.awt.*; +import java.awt.event.*; +/*********************************************/ + +public class MyCalculator extends Frame +{ + +public boolean setClear=true; +double number, memValue; +char op; + +String digitButtonText[] = {"7", "8", "9", "4", "5", "6", "1", "2", "3", "0", "+/-", "." }; +String operatorButtonText[] = {"/", "sqrt", "*", "%", "-", "1/X", "+", "=" }; +String memoryButtonText[] = {"MC", "MR", "MS", "M+" }; +String specialButtonText[] = {"Backspc", "C", "CE" }; + +MyDigitButton digitButton[]=new MyDigitButton[digitButtonText.length]; +MyOperatorButton operatorButton[]=new MyOperatorButton[operatorButtonText.length]; +MyMemoryButton memoryButton[]=new MyMemoryButton[memoryButtonText.length]; +MySpecialButton specialButton[]=new MySpecialButton[specialButtonText.length]; + +Label displayLabel=new Label("0",Label.RIGHT); +Label memLabel=new Label(" ",Label.RIGHT); + +final int FRAME_WIDTH=325,FRAME_HEIGHT=325; +final int HEIGHT=30, WIDTH=30, H_SPACE=10,V_SPACE=10; +final int TOPX=30, TOPY=50; +/////////////////////////// +MyCalculator(String frameText)//constructor +{ +super(frameText); + +int tempX=TOPX, y=TOPY; +displayLabel.setBounds(tempX,y,240,HEIGHT); +displayLabel.setBackground(Color.BLUE); +displayLabel.setForeground(Color.WHITE); +add(displayLabel); + +memLabel.setBounds(TOPX, TOPY+HEIGHT+ V_SPACE,WIDTH, HEIGHT); +add(memLabel); + +// set Co-ordinates for Memory Buttons +tempX=TOPX; +y=TOPY+2*(HEIGHT+V_SPACE); +for(int i=0; i<memoryButton.length; i++) +{ +memoryButton[i]=new MyMemoryButton(tempX,y,WIDTH,HEIGHT,memoryButtonText[i], this); +memoryButton[i].setForeground(Color.RED); +y+=HEIGHT+V_SPACE; +} + +//set Co-ordinates for Special Buttons +tempX=TOPX+1*(WIDTH+H_SPACE); y=TOPY+1*(HEIGHT+V_SPACE); +for(int i=0;i<specialButton.length;i++) +{ +specialButton[i]=new MySpecialButton(tempX,y,WIDTH*2,HEIGHT,specialButtonText[i], this); +specialButton[i].setForeground(Color.RED); +tempX=tempX+2*WIDTH+H_SPACE; +} + +//set Co-ordinates for Digit Buttons +int digitX=TOPX+WIDTH+H_SPACE; +int digitY=TOPY+2*(HEIGHT+V_SPACE); +tempX=digitX; y=digitY; +for(int i=0;i<digitButton.length;i++) +{ +digitButton[i]=new MyDigitButton(tempX,y,WIDTH,HEIGHT,digitButtonText[i], this); +digitButton[i].setForeground(Color.BLUE); +tempX+=WIDTH+H_SPACE; +if((i+1)%3==0){tempX=digitX; y+=HEIGHT+V_SPACE;} +} + +//set Co-ordinates for Operator Buttons +int opsX=digitX+2*(WIDTH+H_SPACE)+H_SPACE; +int opsY=digitY; +tempX=opsX; y=opsY; +for(int i=0;i<operatorButton.length;i++) +{ +tempX+=WIDTH+H_SPACE; +operatorButton[i]=new MyOperatorButton(tempX,y,WIDTH,HEIGHT,operatorButtonText[i], this); +operatorButton[i].setForeground(Color.RED); +if((i+1)%2==0){tempX=opsX; y+=HEIGHT+V_SPACE;} +} + +addWindowListener(new WindowAdapter() +{ +public void windowClosing(WindowEvent ev) +{System.exit(0);} +}); + +setLayout(null); +setSize(FRAME_WIDTH,FRAME_HEIGHT); +setVisible(true); +} +////////////////////////////////// +static String getFormattedText(double temp) +{ +String resText=""+temp; +if(resText.lastIndexOf(".0")>0) + resText=resText.substring(0,resText.length()-2); +return resText; +} +//////////////////////////////////////// +public static void main(String []args) +{ +new MyCalculator("Calculator - JavaTpoint"); +} +} + +/*******************************************/ + +class MyDigitButton extends Button implements ActionListener +{ +MyCalculator cl; + +////////////////////////////////////////// +MyDigitButton(int x,int y, int width,int height,String cap, MyCalculator clc) +{ +super(cap); +setBounds(x,y,width,height); +this.cl=clc; +this.cl.add(this); +addActionListener(this); +} +//////////////////////////////////////////////// +static boolean isInString(String s, char ch) +{ +for(int i=0; i<s.length();i++) if(s.charAt(i)==ch) return true; +return false; +} +///////////////////////////////////////////////// +public void actionPerformed(ActionEvent ev) +{ +String tempText=((MyDigitButton)ev.getSource()).getLabel(); + +if(tempText.equals(".")) +{ + if(cl.setClear) + {cl.displayLabel.setText("0.");cl.setClear=false;} + else if(!isInString(cl.displayLabel.getText(),'.')) + cl.displayLabel.setText(cl.displayLabel.getText()+"."); + return; +} + +int index=0; +try{ + index=Integer.parseInt(tempText); + }catch(NumberFormatException e){return;} + +if (index==0 && cl.displayLabel.getText().equals("0")) return; + +if(cl.setClear) + {cl.displayLabel.setText(""+index);cl.setClear=false;} +else + cl.displayLabel.setText(cl.displayLabel.getText()+index); +}//actionPerformed +}//class defination + +/********************************************/ + +class MyOperatorButton extends Button implements ActionListener +{ +MyCalculator cl; + +MyOperatorButton(int x,int y, int width,int height,String cap, MyCalculator clc) +{ +super(cap); +setBounds(x,y,width,height); +this.cl=clc; +this.cl.add(this); +addActionListener(this); +} +/////////////////////// +public void actionPerformed(ActionEvent ev) +{ +String opText=((MyOperatorButton)ev.getSource()).getLabel(); + +cl.setClear=true; +double temp=Double.parseDouble(cl.displayLabel.getText()); + +if(opText.equals("1/x")) + { + try + {double tempd=1/(double)temp; + cl.displayLabel.setText(MyCalculator.getFormattedText(tempd));} + catch(ArithmeticException excp) + {cl.displayLabel.setText("Divide by 0.");} + return; + } +if(opText.equals("sqrt")) + { + try + {double tempd=Math.sqrt(temp); + cl.displayLabel.setText(MyCalculator.getFormattedText(tempd));} + catch(ArithmeticException excp) + {cl.displayLabel.setText("Divide by 0.");} + return; + } +if(!opText.equals("=")) + { + cl.number=temp; + cl.op=opText.charAt(0); + return; + } +// process = button pressed +switch(cl.op) +{ +case '+': + temp+=cl.number;break; +case '-': + temp=cl.number-temp;break; +case '*': + temp*=cl.number;break; +case '%': + try{temp=cl.number%temp;} + catch(ArithmeticException excp) + {cl.displayLabel.setText("Divide by 0."); return;} + break; +case '/': + try{temp=cl.number/temp;} + catch(ArithmeticException excp) + {cl.displayLabel.setText("Divide by 0."); return;} + break; +}//switch + +cl.displayLabel.setText(MyCalculator.getFormattedText(temp)); +//cl.number=temp; +}//actionPerformed +}//class + +/****************************************/ + +class MyMemoryButton extends Button implements ActionListener +{ +MyCalculator cl; + +///////////////////////////////// +MyMemoryButton(int x,int y, int width,int height,String cap, MyCalculator clc) +{ +super(cap); +setBounds(x,y,width,height); +this.cl=clc; +this.cl.add(this); +addActionListener(this); +} +//////////////////////////////////////////////// +public void actionPerformed(ActionEvent ev) +{ +char memop=((MyMemoryButton)ev.getSource()).getLabel().charAt(1); + +cl.setClear=true; +double temp=Double.parseDouble(cl.displayLabel.getText()); + +switch(memop) +{ +case 'C': + cl.memLabel.setText(" ");cl.memValue=0.0;break; +case 'R': + cl.displayLabel.setText(MyCalculator.getFormattedText(cl.memValue));break; +case 'S': + cl.memValue=0.0; +case '+': + cl.memValue+=Double.parseDouble(cl.displayLabel.getText()); + if(cl.displayLabel.getText().equals("0") || cl.displayLabel.getText().equals("0.0") ) + cl.memLabel.setText(" "); + else + cl.memLabel.setText("M"); + break; +}//switch +}//actionPerformed +}//class + +/*****************************************/ + +class MySpecialButton extends Button implements ActionListener +{ +MyCalculator cl; + +MySpecialButton(int x,int y, int width,int height,String cap, MyCalculator clc) +{ +super(cap); +setBounds(x,y,width,height); +this.cl=clc; +this.cl.add(this); +addActionListener(this); +} +////////////////////// +static String backSpace(String s) +{ +String Res=""; +for(int i=0; i<s.length()-1; i++) Res+=s.charAt(i); +return Res; +} + +////////////////////////////////////////////////////////// +public void actionPerformed(ActionEvent ev) +{ +String opText=((MySpecialButton)ev.getSource()).getLabel(); +//check for backspace button +if(opText.equals("Backspc")) +{ +String tempText=backSpace(cl.displayLabel.getText()); +if(tempText.equals("")) + cl.displayLabel.setText("0"); +else + cl.displayLabel.setText(tempText); +return; +} +//check for "C" button i.e. Reset +if(opText.equals("C")) +{ +cl.number=0.0; cl.op=' '; cl.memValue=0.0; +cl.memLabel.setText(" "); +} + +//it must be CE button pressed +cl.displayLabel.setText("0");cl.setClear=true; +}//actionPerformed +}//class diff --git a/javagame/GuessTheNumber.java b/javagame/GuessTheNumber.java new file mode 100644 index 00000000..a07c765b --- /dev/null +++ b/javagame/GuessTheNumber.java @@ -0,0 +1,55 @@ +import java.util.Random; +import java.util.Scanner; + +class Game { + public int number; + public int usernumber; + public int gusses = 0; + + public int getGusses( ) { + return this.gusses; + } + + public void setGusses( int gusses ) { + this.gusses = gusses; + } + + Game( ) { + Random rand = new Random( ); + this.number = rand.nextInt( 100 ); + } + + void userinput( ) { + System.out.println( "Guess the number" ); + Scanner sc = new Scanner( System.in ); + usernumber = sc.nextInt( ); + } + + boolean check( ) { + gusses++; + if ( usernumber == number ) { + System.out.format( "Yes you guessed it right, it was %d\nYou guessed it in %d attempts" , number , gusses ); + return true; + } + else if ( usernumber < number ) { + System.out.println( "Too low..." ); + } + else if ( usernumber > number ) { + System.out.println( "Too high..." ); + } + return false; + } + +} + +public class GuessTheNumber { + + public static void main( String[] args ) { + Game g = new Game( ); + boolean b = false; + while ( ! b ) { + g.userinput( ); + b = g.check( ); + } + } +} diff --git a/javagame/README.md b/javagame/README.md new file mode 100644 index 00000000..5763d010 --- /dev/null +++ b/javagame/README.md @@ -0,0 +1,3 @@ +# ATM interface program using Java + +A Java program can be written to make a stone paper scissor game. diff --git a/javagame/SPS.java b/javagame/SPS.java new file mode 100644 index 00000000..36316255 --- /dev/null +++ b/javagame/SPS.java @@ -0,0 +1,58 @@ +package com.company; + + +import java.util.Scanner; +import java.util.Random; + +public class CWH_L20_EXERCISE_2_stone_paper_scissor { + public static void main(String[] args) { + // 1 for stone + // 2 for paper + // 3 for scissor + + Scanner sc = new Scanner(System.in); + System.out.println("WELCOME TO STONE,PAPER,SCISSOR GAME!"); + + int stone = 1, paper = 2, scissor =3; + System.out.println(" PLAYER 1 : Enter (1) for Stone , (2) for paper, (3) for scissor : "); + int choiceplayer1= sc.nextInt(); + + Random random= new Random(); + int computerInput = random.nextInt(3); + + if(choiceplayer1 == computerInput) { + System.out.println("It's a Tie"); + } + else { + switch (choiceplayer1) { + case 1 : + if (computerInput == 2) + System.out.println("computer wins!" + "computer choice: paper"); + + else + System.out.println("Player 1 wins!" + "Your choice : Stone"); + break; + + case 2: + if(computerInput == 3) + System.out.println("computer wins" + "Computer choice : Scissor"); + + else + System.out.println("Player 1 wins!" + "Your choice : Paper"); + break; + + case 3: + if(computerInput == 1) + System.out.println("computer wins!" + "computer choice : Stone"); + + else + System.out.println("Player 1 wins!" + "Your choice : scissor"); + break; + + default : + System.out.println("You have entered wrong number"); + + + + } + } \ No newline at end of file diff --git a/jcalendar-1.4.jar b/jcalendar-1.4.jar new file mode 100644 index 00000000..617a3351 Binary files /dev/null and b/jcalendar-1.4.jar differ diff --git a/loading-annimation.java b/loading-annimation.java new file mode 100644 index 00000000..8e9061fe --- /dev/null +++ b/loading-annimation.java @@ -0,0 +1,30 @@ +import java.util.Scanner; + +public class LoadingAnimation { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + System.out.print("Enter the loading percentage (0-100): "); + int percentage = scanner.nextInt(); + scanner.close(); + + if (percentage < 0 || percentage > 100) { + System.out.println("Invalid input. Percentage must be between 0 and 100."); + return; + } + + int width = 50; // Width of the loading bar + int progress = (int) (width * (percentage / 100.0)); // Calculate the progress + + System.out.print("Loading: ["); + for (int i = 0; i < width; i++) { + if (i < progress) { + System.out.print("="); + } else { + System.out.print(" "); + } + } + System.out.println("] " + percentage + "% Complete"); + } +} + diff --git a/longestpalindrome.java b/longestpalindrome.java new file mode 100644 index 00000000..a00d5121 --- /dev/null +++ b/longestpalindrome.java @@ -0,0 +1,27 @@ +public String longestPalindrome(String s) { + int n=s.length(); + boolean dp[][]=new boolean[n][n]; + int c=0; + String x=""; + for(int g=0;g<n;g++) + { + for(int i=0,j=g;j<n;j++,i++) + { + if(g==0) + dp[i][j]=true; + else if(g==1) + { + if(s.charAt(i)==s.charAt(j)) + dp[i][j]=true; + } + else + { + if(s.charAt(i)==s.charAt(j) && dp[i+1][j-1]==true) + dp[i][j]=true; + } + if(dp[i][j]) + x=s.substring(i,j+1); + } + } + return x; + } diff --git a/maildemo/.idea/artifacts/maildemo_war_exploded.xml b/maildemo/.idea/artifacts/maildemo_war_exploded.xml new file mode 100644 index 00000000..e545de15 --- /dev/null +++ b/maildemo/.idea/artifacts/maildemo_war_exploded.xml @@ -0,0 +1,13 @@ +<component name="ArtifactManager"> + <artifact type="exploded-war" name="maildemo:war exploded"> + <output-path>$PROJECT_DIR$/out/artifacts/maildemo_war_exploded</output-path> + <root id="root"> + <element id="javaee-facet-resources" facet="maildemo/web/Web" /> + <element id="directory" name="WEB-INF"> + <element id="directory" name="classes"> + <element id="module-output" name="maildemo" /> + </element> + </element> + </root> + </artifact> +</component> \ No newline at end of file diff --git a/maildemo/.idea/libraries/servlet_api.xml b/maildemo/.idea/libraries/servlet_api.xml new file mode 100644 index 00000000..5731210c --- /dev/null +++ b/maildemo/.idea/libraries/servlet_api.xml @@ -0,0 +1,9 @@ +<component name="libraryTable"> + <library name="servlet-api"> + <CLASSES> + <root url="jar://F:/Study/resource/tomcat/apache-tomcat-7.0.52/lib/servlet-api.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> +</component> \ No newline at end of file diff --git a/maildemo/.idea/misc.xml b/maildemo/.idea/misc.xml new file mode 100644 index 00000000..05483570 --- /dev/null +++ b/maildemo/.idea/misc.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/out" /> + </component> +</project> \ No newline at end of file diff --git a/maildemo/.idea/modules.xml b/maildemo/.idea/modules.xml new file mode 100644 index 00000000..a309e63f --- /dev/null +++ b/maildemo/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/maildemo.iml" filepath="$PROJECT_DIR$/maildemo.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/maildemo/.idea/workspace.xml b/maildemo/.idea/workspace.xml new file mode 100644 index 00000000..48033ef7 --- /dev/null +++ b/maildemo/.idea/workspace.xml @@ -0,0 +1,764 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ArtifactsWorkspaceSettings"> + <artifacts-to-build> + <artifact name="maildemo:war exploded" /> + </artifacts-to-build> + </component> + <component name="ChangeListManager"> + <list default="true" id="0dc3174e-e0ec-4382-ace0-3607229980d7" name="Default" comment="" /> + <ignored path="$PROJECT_DIR$/out/" /> + <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> + <option name="TRACKING_ENABLED" value="true" /> + <option name="SHOW_DIALOG" value="false" /> + <option name="HIGHLIGHT_CONFLICTS" value="true" /> + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> + <option name="LAST_RESOLUTION" value="IGNORE" /> + </component> + <component name="CodeInsightWorkspaceSettings"> + <option name="optimizeImportsOnTheFly" value="true" /> + </component> + <component name="FavoritesManager"> + <favorites_list name="maildemo" /> + </component> + <component name="FileEditorManager"> + <leaf /> + </component> + <component name="FileTemplateManagerImpl"> + <option name="RECENT_TEMPLATES"> + <list> + <option value="package-info" /> + <option value="Interface" /> + <option value="Class" /> + <option value="Jsp File" /> + </list> + </option> + </component> + <component name="FindInProjectRecents"> + <findStrings> + <find>pers.hdh.servlet.ActiveServlet</find> + </findStrings> + </component> + <component name="GradleLocalSettings"> + <option name="externalProjectsViewState"> + <projects_view /> + </option> + </component> + <component name="IdeDocumentHistory"> + <option name="CHANGED_PATHS"> + <list> + <option value="$PROJECT_DIR$/src/main/java/pers/hdh/utils/DataSourceUtils.java" /> + <option value="$PROJECT_DIR$/src/main/recources/c3p0.properties" /> + <option value="$PROJECT_DIR$/web/index.jsp" /> + <option value="$PROJECT_DIR$/src/main/java/pers/hdh/utils/UUIDUtils.java" /> + <option value="$PROJECT_DIR$/src/main/java/pers/hdh/domain/User.java" /> + <option value="$PROJECT_DIR$/src/main/java/pers/hdh/service/UserService.java" /> + <option value="$PROJECT_DIR$/src/main/java/pers/hdh/dao/UserDao.java" /> + <option value="$PROJECT_DIR$/src/main/java/pers/hdh/dao/impl/UserDaoImpl.java" /> + <option value="$PROJECT_DIR$/src/main/java/pers/hdh/service/impl/UserServiceImpl.java" /> + <option value="$PROJECT_DIR$/web/success.jsp" /> + <option value="$PROJECT_DIR$/web/error.jsp" /> + <option value="$PROJECT_DIR$/web/message.jsp" /> + <option value="$PROJECT_DIR$/src/main/java/pers/hdh/servlet/ActiveServlet.java" /> + <option value="$PROJECT_DIR$/src/main/java/pers/hdh/servlet/RegistServlet.java" /> + <option value="$PROJECT_DIR$/web/WEB-INF/web.xml" /> + <option value="$PROJECT_DIR$/src/main/java/pers/hdh/utils/MailUtils.java" /> + </list> + </option> + </component> + <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" /> + <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" /> + <component name="JsGulpfileManager"> + <detection-done>true</detection-done> + <sorting>DEFINITION_ORDER</sorting> + </component> + <component name="LogFilters"> + <option name="FILTER_ERRORS" value="false" /> + <option name="FILTER_WARNINGS" value="false" /> + <option name="FILTER_INFO" value="true" /> + <option name="FILTER_DEBUG" value="true" /> + <option name="CUSTOM_FILTER" /> + </component> + <component name="MavenProjectNavigator"> + <treeState> + <expand /> + <select /> + </treeState> + </component> + <component name="ProjectFrameBounds" extendedState="6"> + <option name="x" value="1105" /> + <option name="y" value="35" /> + <option name="width" value="720" /> + <option name="height" value="705" /> + </component> + <component name="ProjectView"> + <navigator currentView="ProjectPane" proportions="" version="1"> + <flattenPackages /> + <showMembers /> + <showModules /> + <showLibraryContents /> + <hideEmptyPackages /> + <abbreviatePackageNames /> + <autoscrollToSource /> + <autoscrollFromSource /> + <sortByType /> + <manualOrder /> + <foldersAlwaysOnTop value="true" /> + </navigator> + <panes> + <pane id="Scratches" /> + <pane id="AndroidView" /> + <pane id="PackagesPane" /> + <pane id="ProjectPane"> + <subPane> + <expand> + <path> + <item name="maildemo" type="b2602c69:ProjectViewProjectNode" /> + <item name="maildemo" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="maildemo" type="b2602c69:ProjectViewProjectNode" /> + <item name="maildemo" type="462c0819:PsiDirectoryNode" /> + <item name="web" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="maildemo" type="b2602c69:ProjectViewProjectNode" /> + <item name="maildemo" type="462c0819:PsiDirectoryNode" /> + <item name="web" type="462c0819:PsiDirectoryNode" /> + <item name="WEB-INF" type="462c0819:PsiDirectoryNode" /> + </path> + </expand> + <select /> + </subPane> + </pane> + <pane id="Scope" /> + </panes> + </component> + <component name="PropertiesComponent"> + <property name="settings.editor.selected.configurable" value="project.propVCSSupport.CommitDialog" /> + <property name="WebServerToolWindowFactoryState" value="false" /> + <property name="aspect.path.notification.shown" value="true" /> + <property name="project.structure.last.edited" value="Libraries" /> + <property name="project.structure.proportion" value="0.15" /> + <property name="project.structure.side.proportion" value="0.24908088" /> + <property name="last_opened_file_path" value="F:/Study/resource/tomcat/apache-tomcat-7.0.52/lib/servlet-api.jar!/" /> + </component> + <component name="RecentsManager"> + <key name="CopyFile.RECENT_KEYS"> + <recent name="F:\git_repository\javaproject\maildemo\src\main\java\pers\hdh\utils" /> + <recent name="F:\git_repository\javaproject\maildemo\src\main\recources" /> + <recent name="F:\git_repository\javaproject\maildemo\web\WEB-INF\lib" /> + </key> + </component> + <component name="RunDashboard"> + <option name="ruleStates"> + <list> + <RuleState> + <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> + </RuleState> + <RuleState> + <option name="name" value="StatusDashboardGroupingRule" /> + </RuleState> + </list> + </option> + </component> + <component name="RunManager" selected="Tomcat Server.maildemo_tomcat"> + <configuration default="true" type="Applet" factoryName="Applet"> + <option name="HTML_USED" value="false" /> + <option name="WIDTH" value="400" /> + <option name="HEIGHT" value="300" /> + <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> + <module /> + </configuration> + <configuration default="true" type="Application" factoryName="Application"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <option name="MAIN_CLASS_NAME" /> + <option name="VM_PARAMETERS" /> + <option name="PROGRAM_PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="ENABLE_SWING_INSPECTOR" value="false" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <module name="" /> + <envs /> + </configuration> + <configuration default="true" type="JUnit" factoryName="JUnit"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="TEST_OBJECT" value="class" /> + <option name="VM_PARAMETERS" value="-ea" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="singleModule" /> + </option> + <envs /> + <patterns /> + </configuration> + <configuration default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat 7.0.52" ALTERNATIVE_JRE_ENABLED="false"> + <option name="UPDATING_POLICY" value="restart-server" /> + <deployment /> + <server-settings> + <option name="BASE_DIRECTORY_NAME" value="_maildemo" /> + </server-settings> + <predefined_log_file id="Tomcat" enabled="true" /> + <predefined_log_file id="Tomcat Catalina" enabled="true" /> + <predefined_log_file id="Tomcat Manager" enabled="false" /> + <predefined_log_file id="Tomcat Host Manager" enabled="false" /> + <predefined_log_file id="Tomcat Localhost Access" enabled="false" /> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <RunnerSettings RunnerId="Debug"> + <option name="DEBUG_PORT" value="4760" /> + </RunnerSettings> + <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover"> + <option name="USE_ENV_VARIABLES" value="true" /> + <STARTUP> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </STARTUP> + <SHUTDOWN> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </SHUTDOWN> + </ConfigurationWrapper> + <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug"> + <option name="USE_ENV_VARIABLES" value="true" /> + <STARTUP> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </STARTUP> + <SHUTDOWN> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </SHUTDOWN> + </ConfigurationWrapper> + <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run"> + <option name="USE_ENV_VARIABLES" value="true" /> + <STARTUP> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </STARTUP> + <SHUTDOWN> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </SHUTDOWN> + </ConfigurationWrapper> + </configuration> + <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin"> + <module name="" /> + <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" /> + <option name="PROGRAM_PARAMETERS" /> + <predefined_log_file id="idea.log" enabled="true" /> + </configuration> + <configuration default="true" type="Remote" factoryName="Remote"> + <option name="USE_SOCKET_TRANSPORT" value="true" /> + <option name="SERVER_MODE" value="false" /> + <option name="SHMEM_ADDRESS" value="javadebug" /> + <option name="HOST" value="localhost" /> + <option name="PORT" value="5005" /> + </configuration> + <configuration default="true" type="JavaScriptNodeJsTraceType" factoryName="Spy-js for Node.js" config="" node="project" node-params="" app="" app-params="" working-dir="$PROJECT_DIR$" proxy-port="3547" pass-parent-env="true" limits="1,3,3,50"> + <envs /> + </configuration> + <configuration default="true" type="TestNG" factoryName="TestNG"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="SUITE_NAME" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="GROUP_NAME" /> + <option name="TEST_OBJECT" value="CLASS" /> + <option name="VM_PARAMETERS" value="-ea" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" /> + <option name="OUTPUT_DIRECTORY" /> + <option name="ANNOTATION_TYPE" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="singleModule" /> + </option> + <option name="USE_DEFAULT_REPORTERS" value="false" /> + <option name="PROPERTIES_FILE" /> + <envs /> + <properties /> + <listeners /> + </configuration> + <configuration name="maildemo_tomcat" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat 7.0.52" ALTERNATIVE_JRE_ENABLED="false"> + <option name="OPEN_IN_BROWSER_URL" value="http://localhost:8080/maildemo" /> + <option name="UPDATE_ON_FRAME_DEACTIVATION" value="true" /> + <option name="UPDATE_CLASSES_ON_FRAME_DEACTIVATION" value="true" /> + <option name="SHOW_DIALOG_ON_UPDATE" value="false" /> + <deployment> + <artifact name="maildemo:war exploded"> + <settings> + <option name="CONTEXT_PATH" value="/maildemo" /> + </settings> + </artifact> + </deployment> + <server-settings> + <option name="BASE_DIRECTORY_NAME" value="Unnamed_maildemo" /> + </server-settings> + <predefined_log_file id="Tomcat" enabled="true" /> + <predefined_log_file id="Tomcat Catalina" enabled="true" /> + <predefined_log_file id="Tomcat Manager" enabled="false" /> + <predefined_log_file id="Tomcat Host Manager" enabled="false" /> + <predefined_log_file id="Tomcat Localhost Access" enabled="false" /> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <RunnerSettings RunnerId="Debug"> + <option name="DEBUG_PORT" value="4760" /> + </RunnerSettings> + <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover"> + <option name="USE_ENV_VARIABLES" value="true" /> + <STARTUP> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </STARTUP> + <SHUTDOWN> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </SHUTDOWN> + </ConfigurationWrapper> + <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug"> + <option name="USE_ENV_VARIABLES" value="true" /> + <STARTUP> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </STARTUP> + <SHUTDOWN> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </SHUTDOWN> + </ConfigurationWrapper> + <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run"> + <option name="USE_ENV_VARIABLES" value="true" /> + <STARTUP> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </STARTUP> + <SHUTDOWN> + <option name="USE_DEFAULT" value="true" /> + <option name="SCRIPT" value="" /> + <option name="VM_PARAMETERS" value="" /> + <option name="PROGRAM_PARAMETERS" value="" /> + </SHUTDOWN> + </ConfigurationWrapper> + <method> + <option name="BuildArtifacts" enabled="true"> + <artifact name="maildemo:war exploded" /> + </option> + </method> + </configuration> + </component> + <component name="ShelveChangesManager" show_recycled="false"> + <option name="remove_strategy" value="false" /> + </component> + <component name="SvnConfiguration"> + <configuration /> + </component> + <component name="TaskManager"> + <task active="true" id="Default" summary="Default task"> + <changelist id="0dc3174e-e0ec-4382-ace0-3607229980d7" name="Default" comment="" /> + <created>1508907153694</created> + <option name="number" value="Default" /> + <option name="presentableId" value="Default" /> + <updated>1508907153694</updated> + <workItem from="1508907156102" duration="12246000" /> + </task> + <servers /> + </component> + <component name="TimeTrackingManager"> + <option name="totallyTimeSpent" value="12246000" /> + </component> + <component name="TodoView"> + <todo-panel id="selected-file"> + <is-autoscroll-to-source value="true" /> + </todo-panel> + <todo-panel id="all"> + <are-packages-shown value="true" /> + <is-autoscroll-to-source value="true" /> + </todo-panel> + </component> + <component name="ToolWindowManager"> + <frame x="-9" y="-9" width="1938" height="1048" extended-state="6" /> + <layout> + <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> + <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" /> + <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32865497" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> + <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3299356" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> + <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> + <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> + <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> + <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32982457" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" /> + <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.45614034" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Java Enterprise" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32982457" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.38011697" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> + <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32982457" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> + <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.21727468" sideWeight="0.49590644" order="6" side_tool="false" content_ui="combo" /> + <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.21727468" sideWeight="0.5040936" order="3" side_tool="true" content_ui="tabs" /> + <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> + <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.21727468" sideWeight="0.5040936" order="4" side_tool="true" content_ui="tabs" /> + <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" /> + <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="8" side_tool="false" content_ui="combo" /> + <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> + <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> + <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" /> + </layout> + <layout-to-restore> + <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> + <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" /> + <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> + <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> + <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="true" content_ui="tabs" /> + <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32865497" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> + <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3299356" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> + <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> + <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> + <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="8" side_tool="false" content_ui="combo" /> + <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> + <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32982457" sideWeight="0.5" order="12" side_tool="false" content_ui="tabs" /> + <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32982457" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Java Enterprise" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32982457" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.30760235" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> + <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32982457" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.21727468" sideWeight="0.49590644" order="6" side_tool="false" content_ui="combo" /> + <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.21727468" sideWeight="0.5040936" order="3" side_tool="true" content_ui="tabs" /> + <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> + <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.21727468" sideWeight="0.5040936" order="4" side_tool="true" content_ui="tabs" /> + </layout-to-restore> + </component> + <component name="TypeScriptGeneratedFilesManager"> + <option name="version" value="1" /> + </component> + <component name="VcsContentAnnotationSettings"> + <option name="myLimit" value="2678400000" /> + </component> + <component name="XDebuggerManager"> + <breakpoint-manager /> + <watches-manager /> + </component> + <component name="editorHistoryManager"> + <entry file="file://$PROJECT_DIR$/src/main/java/package-info.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="0"> + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/utils/DataSourceUtils.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="198"> + <caret line="15" column="15" lean-forward="true" selection-start-line="15" selection-start-column="15" selection-end-line="15" selection-end-column="15" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/recources/c3p0.properties"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="22"> + <caret line="1" column="43" lean-forward="true" selection-start-line="1" selection-start-column="43" selection-end-line="1" selection-end-column="43" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/utils/JDBCUtils.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="44"> + <caret line="2" column="22" lean-forward="false" selection-start-line="2" selection-start-column="22" selection-end-line="2" selection-end-column="22" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/utils/UUIDUtils.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="198"> + <caret line="9" column="14" lean-forward="false" selection-start-line="9" selection-start-column="14" selection-end-line="9" selection-end-column="14" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/domain/User.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="352"> + <caret line="16" column="0" lean-forward="true" selection-start-line="16" selection-start-column="0" selection-end-line="16" selection-end-column="0" /> + <folding> + <element signature="e#209#210#0" expanded="true" /> + <element signature="e#235#236#0" expanded="true" /> + <element signature="e#273#274#0" expanded="true" /> + <element signature="e#303#304#0" expanded="true" /> + <element signature="e#338#339#0" expanded="true" /> + <element signature="e#369#370#0" expanded="true" /> + <element signature="e#417#418#0" expanded="true" /> + <element signature="e#457#458#0" expanded="true" /> + <element signature="e#492#493#0" expanded="true" /> + <element signature="e#523#524#0" expanded="true" /> + <element signature="e#571#572#0" expanded="true" /> + <element signature="e#611#612#0" expanded="true" /> + <element signature="e#643#644#0" expanded="true" /> + <element signature="e#671#672#0" expanded="true" /> + <element signature="e#713#714#0" expanded="true" /> + <element signature="e#747#748#0" expanded="true" /> + <element signature="e#780#781#0" expanded="true" /> + <element signature="e#808#809#0" expanded="true" /> + <element signature="e#851#852#0" expanded="true" /> + <element signature="e#885#886#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/web/error.jsp"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="286"> + <caret line="13" column="17" lean-forward="false" selection-start-line="13" selection-start-column="17" selection-end-line="13" selection-end-column="17" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/web/message.jsp"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="286"> + <caret line="13" column="27" lean-forward="false" selection-start-line="13" selection-start-column="27" selection-end-line="13" selection-end-column="27" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/web/success.jsp"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="286"> + <caret line="13" column="15" lean-forward="true" selection-start-line="13" selection-start-column="15" selection-end-line="13" selection-end-column="15" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/servlet/RegistServlet.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="334"> + <caret line="37" column="52" lean-forward="false" selection-start-line="37" selection-start-column="52" selection-end-line="37" selection-end-column="52" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/web/WEB-INF/web.xml"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="254"> + <caret line="16" column="53" lean-forward="false" selection-start-line="16" selection-start-column="23" selection-end-line="16" selection-end-column="53" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/dao/impl/UserDaoImpl.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="379"> + <caret line="33" column="63" lean-forward="true" selection-start-line="33" selection-start-column="63" selection-end-line="33" selection-end-column="63" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/dao/UserDao.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="286"> + <caret line="13" column="1" lean-forward="true" selection-start-line="13" selection-start-column="1" selection-end-line="13" selection-end-column="1" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/service/impl/UserServiceImpl.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="440"> + <caret line="34" column="25" lean-forward="true" selection-start-line="34" selection-start-column="25" selection-end-line="34" selection-end-column="25" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/service/UserService.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="242"> + <caret line="11" column="9" lean-forward="false" selection-start-line="11" selection-start-column="9" selection-end-line="11" selection-end-column="9" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/servlet/ActiveServlet.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="269"> + <caret line="27" column="40" lean-forward="true" selection-start-line="27" selection-start-column="40" selection-end-line="27" selection-end-column="40" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/web/index.jsp"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="136"> + <caret line="10" column="15" lean-forward="false" selection-start-line="10" selection-start-column="15" selection-end-line="10" selection-end-column="15" /> + <folding /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/pers/hdh/utils/MailUtils.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="213"> + <caret line="38" column="52" lean-forward="true" selection-start-line="38" selection-start-column="52" selection-end-line="38" selection-end-column="52" /> + <folding> + <element signature="imports" expanded="true" /> + <element signature="e#1107#1323#0" expanded="true" /> + <element signature="e#1322#1323#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + </component> + <component name="masterDetails"> + <states> + <state key="ArtifactsStructureConfigurable.UI"> + <settings> + <artifact-editor /> + <last-edited>maildemo:war exploded</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.24908088" /> + <option value="0.5" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="FacetStructureConfigurable.UI"> + <settings> + <last-edited>Web</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.24908088" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="GlobalLibrariesConfigurable.UI"> + <settings> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.24908088" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="JdkListConfigurable.UI"> + <settings> + <last-edited>1.8</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.24908088" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="ModuleStructureConfigurable.UI"> + <settings> + <last-edited>Web|maildemo</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.24908088" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="ProjectLibrariesConfigurable.UI"> + <settings> + <last-edited>servlet-api</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.24908088" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + <state key="ScopeChooserConfigurable.UI"> + <settings> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + </states> + </component> +</project> \ No newline at end of file diff --git a/maildemo/Readme.txt b/maildemo/Readme.txt new file mode 100644 index 00000000..2c08c191 --- /dev/null +++ b/maildemo/Readme.txt @@ -0,0 +1,2 @@ +使用JavaMail使用的小Demo +要求Jdk版本1.7以上,本人使用的是1.8 \ No newline at end of file diff --git a/maildemo/maildemo.iml b/maildemo/maildemo.iml new file mode 100644 index 00000000..fff8629e --- /dev/null +++ b/maildemo/maildemo.iml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="FacetManager"> + <facet type="web" name="Web"> + <configuration> + <descriptors> + <deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" /> + </descriptors> + <webroots> + <root url="file://$MODULE_DIR$/web" relative="/" /> + </webroots> + <sourceRoots> + <root url="file://$MODULE_DIR$/src" /> + </sourceRoots> + </configuration> + </facet> + </component> + <component name="NewModuleRootManager"> + <output url="file://$MODULE_DIR$/web/WEB-INF/classes" /> + <output-test url="file://$MODULE_DIR$/web/WEB-INF/classes" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/recources" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="file://$MODULE_DIR$/web/WEB-INF/lib" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + <jarDirectory url="file://$MODULE_DIR$/web/WEB-INF/lib" recursive="false" /> + </library> + </orderEntry> + <orderEntry type="library" name="servlet-api" level="project" /> + </component> +</module> \ No newline at end of file diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/c3p0.properties b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/c3p0.properties new file mode 100644 index 00000000..a81ecc0a --- /dev/null +++ b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/c3p0.properties @@ -0,0 +1,4 @@ +c3p0.driverClass=com.mysql.jdbc.Driver +c3p0.jdbcUrl=jdbc:mysql://localhost:3306/db +c3p0.user=root +c3p0.password=toor \ No newline at end of file diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/main/recources/c3p0.properties b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/main/recources/c3p0.properties new file mode 100644 index 00000000..a81ecc0a --- /dev/null +++ b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/main/recources/c3p0.properties @@ -0,0 +1,4 @@ +c3p0.driverClass=com.mysql.jdbc.Driver +c3p0.jdbcUrl=jdbc:mysql://localhost:3306/db +c3p0.user=root +c3p0.password=toor \ No newline at end of file diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/dao/UserDao.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/dao/UserDao.class new file mode 100644 index 00000000..52498e4f Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/dao/UserDao.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/dao/impl/UserDaoImpl.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/dao/impl/UserDaoImpl.class new file mode 100644 index 00000000..401df2fa Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/dao/impl/UserDaoImpl.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/domain/User.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/domain/User.class new file mode 100644 index 00000000..f9dc5d7e Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/domain/User.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/service/UserService.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/service/UserService.class new file mode 100644 index 00000000..5b0fbb4e Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/service/UserService.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/service/impl/UserServiceImpl.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/service/impl/UserServiceImpl.class new file mode 100644 index 00000000..0f928e2c Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/service/impl/UserServiceImpl.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/servlet/ActiveServlet.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/servlet/ActiveServlet.class new file mode 100644 index 00000000..6db31d8f Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/servlet/ActiveServlet.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/servlet/RegistServlet.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/servlet/RegistServlet.class new file mode 100644 index 00000000..762db82c Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/servlet/RegistServlet.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/DataSourceUtils.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/DataSourceUtils.class new file mode 100644 index 00000000..a86503b9 Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/DataSourceUtils.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/MailUtils$1.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/MailUtils$1.class new file mode 100644 index 00000000..adc32f16 Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/MailUtils$1.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/MailUtils.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/MailUtils.class new file mode 100644 index 00000000..f6e2544a Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/MailUtils.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/UUIDUtils.class b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/UUIDUtils.class new file mode 100644 index 00000000..f90e8b62 Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/pers/hdh/utils/UUIDUtils.class differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/recources/c3p0.properties b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/recources/c3p0.properties new file mode 100644 index 00000000..a81ecc0a --- /dev/null +++ b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/classes/recources/c3p0.properties @@ -0,0 +1,4 @@ +c3p0.driverClass=com.mysql.jdbc.Driver +c3p0.jdbcUrl=jdbc:mysql://localhost:3306/db +c3p0.user=root +c3p0.password=toor \ No newline at end of file diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/c3p0-0.9.1.2.jar b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/c3p0-0.9.1.2.jar new file mode 100644 index 00000000..0f42d60e Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/c3p0-0.9.1.2.jar differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/commons-dbutils-1.6.jar b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/commons-dbutils-1.6.jar new file mode 100644 index 00000000..b2590db9 Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/commons-dbutils-1.6.jar differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/mail.jar b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/mail.jar new file mode 100644 index 00000000..9d60d13b Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/mail.jar differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/mysql-connector-java-5.1.37-bin.jar b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/mysql-connector-java-5.1.37-bin.jar new file mode 100644 index 00000000..465af670 Binary files /dev/null and b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/lib/mysql-connector-java-5.1.37-bin.jar differ diff --git a/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/web.xml b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/web.xml new file mode 100644 index 00000000..4543e1cd --- /dev/null +++ b/maildemo/out/artifacts/maildemo_war_exploded/WEB-INF/web.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://java.sun.com/xml/ns/javaee" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + id="WebApp_ID" version="2.5"> + + <servlet> + <servlet-name>RegistServlet</servlet-name> + <servlet-class>pers.hdh.servlet.RegistServlet</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>RegistServlet</servlet-name> + <url-pattern>/RegistServlet</url-pattern> + </servlet-mapping> + <servlet> + <servlet-name>ActiveServlet</servlet-name> + <servlet-class>pers.hdh.servlet.ActiveServlet</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>ActiveServlet</servlet-name> + <url-pattern>/ActiveServlet</url-pattern> + </servlet-mapping> +</web-app> \ No newline at end of file diff --git a/maildemo/out/artifacts/maildemo_war_exploded/error.jsp b/maildemo/out/artifacts/maildemo_war_exploded/error.jsp new file mode 100644 index 00000000..9a075516 --- /dev/null +++ b/maildemo/out/artifacts/maildemo_war_exploded/error.jsp @@ -0,0 +1,16 @@ +<%-- + Created by IntelliJ IDEA. + User: Lenovo + Date: 2017/10/25 + Time: 17:41 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<html> +<head> + <title>注册失败</title> +</head> +<body> + 账号注册失败,请重新注册! +</body> +</html> diff --git a/maildemo/out/artifacts/maildemo_war_exploded/index.jsp b/maildemo/out/artifacts/maildemo_war_exploded/index.jsp new file mode 100644 index 00000000..e841e4a4 --- /dev/null +++ b/maildemo/out/artifacts/maildemo_war_exploded/index.jsp @@ -0,0 +1,34 @@ +<%-- + Created by IntelliJ IDEA. + User: Lenovo + Date: 2017/10/25 + Time: 12:52 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<html> + <head> + <title>用户注册</title> + </head> + <body> + <form action="${pageContext.request.contextPath}/RegistServlet" method="post"> + <table width="500" border="1" align="center"> + <tr> + <td>用户名</td> + <td><input type="text" name="username"/></td> + </tr> + <tr> + <td>密码</td> + <td><input type="password" name="password"/></td> + </tr> + <tr> + <td>邮箱</td> + <td><input type="email" name="email" /></td> + </tr> + <tr> + <td colspan="2"><input type="submit" value="注册"/></td> + </tr> + </table> + </form> + </body> +</html> diff --git a/maildemo/out/artifacts/maildemo_war_exploded/message.jsp b/maildemo/out/artifacts/maildemo_war_exploded/message.jsp new file mode 100644 index 00000000..4760f201 --- /dev/null +++ b/maildemo/out/artifacts/maildemo_war_exploded/message.jsp @@ -0,0 +1,16 @@ +<%-- + Created by IntelliJ IDEA. + User: Lenovo + Date: 2017/10/25 + Time: 17:42 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<html> +<head> + <title>请前往邮箱激活账号</title> +</head> +<body> + 注册操作已成功完成,请前往邮箱进行激活账号操作 +</body> +</html> diff --git a/maildemo/out/artifacts/maildemo_war_exploded/success.jsp b/maildemo/out/artifacts/maildemo_war_exploded/success.jsp new file mode 100644 index 00000000..1cb82eca --- /dev/null +++ b/maildemo/out/artifacts/maildemo_war_exploded/success.jsp @@ -0,0 +1,16 @@ +<%-- + Created by IntelliJ IDEA. + User: Lenovo + Date: 2017/10/25 + Time: 17:40 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<html> +<head> + <title>注册成功</title> +</head> +<body> + 恭喜您,账号激活成功! +</body> +</html> diff --git a/maildemo/src/main/java/package-info.java b/maildemo/src/main/java/package-info.java new file mode 100644 index 00000000..e69de29b diff --git a/maildemo/src/main/java/pers/hdh/dao/UserDao.java b/maildemo/src/main/java/pers/hdh/dao/UserDao.java new file mode 100644 index 00000000..222c4bdd --- /dev/null +++ b/maildemo/src/main/java/pers/hdh/dao/UserDao.java @@ -0,0 +1,14 @@ +package pers.hdh.dao; + +import pers.hdh.domain.User; + +import java.sql.SQLException; + +public interface UserDao { + + void add(User user) throws SQLException; + + User getUser(String uid) throws SQLException; + + void update(User user) throws SQLException; +} diff --git a/maildemo/src/main/java/pers/hdh/dao/impl/UserDaoImpl.java b/maildemo/src/main/java/pers/hdh/dao/impl/UserDaoImpl.java new file mode 100644 index 00000000..d17a47bd --- /dev/null +++ b/maildemo/src/main/java/pers/hdh/dao/impl/UserDaoImpl.java @@ -0,0 +1,43 @@ +package pers.hdh.dao.impl; + +import org.apache.commons.dbutils.QueryRunner; +import org.apache.commons.dbutils.handlers.BeanHandler; +import pers.hdh.dao.UserDao; +import pers.hdh.domain.User; +import pers.hdh.utils.DataSourceUtils; + +import java.sql.SQLException; + +public class UserDaoImpl implements UserDao { + + /** + * 往user表插入数据,添加新用户 + * @param user + * @throws SQLException + */ + @Override + public void add(User user) throws SQLException { + QueryRunner qr = new QueryRunner(DataSourceUtils.getDataSource()); + String sql = "insert into user values (?,?,?,?,?)"; + qr.update(sql, user.getUid(), user.getUsername(), user.getPassword(), user.getEmail(), user.getState()); + } + + /** + * 通过uid查询user表 + * @param uid + * @return + */ + @Override + public User getUser(String uid) throws SQLException { + QueryRunner qr = new QueryRunner(DataSourceUtils.getDataSource()); + String sql = "select uid, username, password, email, state from user where uid=?"; + return qr.query(sql, new BeanHandler<User>(User.class), uid); + } + + @Override + public void update(User user) throws SQLException { + QueryRunner qr = new QueryRunner(DataSourceUtils.getDataSource()); + String sql = "update user set username=?, password=?, email=?, state=? where uid=?"; + qr.update(sql, user.getUsername(), user.getPassword(), user.getEmail(), user.getState(), user.getUid()); + } +} diff --git a/maildemo/src/main/java/pers/hdh/domain/User.java b/maildemo/src/main/java/pers/hdh/domain/User.java new file mode 100644 index 00000000..744e0077 --- /dev/null +++ b/maildemo/src/main/java/pers/hdh/domain/User.java @@ -0,0 +1,50 @@ +package pers.hdh.domain; + +public class User { + private String uid; + private String username; + private String password; + private String email; + private Integer state; + + public String getUid() { + return uid; + } + + public void setUid(String uid) { + this.uid = uid; + } + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public Integer getState() { + return state; + } + + public void setState(Integer state) { + this.state = state; + } + +} diff --git a/maildemo/src/main/java/pers/hdh/service/UserService.java b/maildemo/src/main/java/pers/hdh/service/UserService.java new file mode 100644 index 00000000..63994585 --- /dev/null +++ b/maildemo/src/main/java/pers/hdh/service/UserService.java @@ -0,0 +1,13 @@ +package pers.hdh.service; + +import pers.hdh.domain.User; + +import java.sql.SQLException; + +public interface UserService { + void add(User user) throws Exception; + + User getUser(String uid) throws SQLException; + + void update(User user) throws SQLException; +} diff --git a/maildemo/src/main/java/pers/hdh/service/impl/UserServiceImpl.java b/maildemo/src/main/java/pers/hdh/service/impl/UserServiceImpl.java new file mode 100644 index 00000000..ac310363 --- /dev/null +++ b/maildemo/src/main/java/pers/hdh/service/impl/UserServiceImpl.java @@ -0,0 +1,47 @@ +package pers.hdh.service.impl; + +import pers.hdh.dao.UserDao; +import pers.hdh.dao.impl.UserDaoImpl; +import pers.hdh.domain.User; +import pers.hdh.service.UserService; +import pers.hdh.utils.MailUtils; + +import java.sql.SQLException; + +public class UserServiceImpl implements UserService { + + /** + * 添加用户 + * @param user + */ + @Override + public void add(User user) throws Exception { + // 添加新用户 + UserDao dao = new UserDaoImpl(); + dao.add(user); + + // 发送邮件 + MailUtils.sendMail(user.getEmail(), user.getUid()); + } + + /** + * 通过id查找用户 + * @param uid + * @return + */ + @Override + public User getUser(String uid) throws SQLException { + UserDao dao = new UserDaoImpl(); + return dao.getUser(uid); + } + + /** + * 更新用户数据 + * @param user + */ + @Override + public void update(User user) throws SQLException { + UserDao dao = new UserDaoImpl(); + dao.update(user); + } +} diff --git a/maildemo/src/main/java/pers/hdh/servlet/ActiveServlet.java b/maildemo/src/main/java/pers/hdh/servlet/ActiveServlet.java new file mode 100644 index 00000000..28e09427 --- /dev/null +++ b/maildemo/src/main/java/pers/hdh/servlet/ActiveServlet.java @@ -0,0 +1,46 @@ +package pers.hdh.servlet; + +import pers.hdh.domain.User; +import pers.hdh.service.UserService; +import pers.hdh.service.impl.UserServiceImpl; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.sql.SQLException; + +/** + * 激活用户 + */ +public class ActiveServlet extends HttpServlet { + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String uid = req.getParameter("uid"); + + // 调用业务处理数据 + UserService service = new UserServiceImpl(); + // 先查询到user + User user = null; + try { + user = service.getUser(uid); + if (user != null) { + user.setState(1); + service.update(user); + resp.sendRedirect(req.getContextPath()+"/success.jsp"); + } + } catch (SQLException e) { + e.printStackTrace(); + resp.sendRedirect(req.getContextPath()+"/error.jsp"); + } + + + } + + @Override + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + doGet(req, resp); + } +} diff --git a/maildemo/src/main/java/pers/hdh/servlet/RegistServlet.java b/maildemo/src/main/java/pers/hdh/servlet/RegistServlet.java new file mode 100644 index 00000000..a18446f5 --- /dev/null +++ b/maildemo/src/main/java/pers/hdh/servlet/RegistServlet.java @@ -0,0 +1,53 @@ +package pers.hdh.servlet; + +import pers.hdh.domain.User; +import pers.hdh.service.UserService; +import pers.hdh.service.impl.UserServiceImpl; +import pers.hdh.utils.UUIDUtils; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +/** + * 用户注册的servlet + */ +public class RegistServlet extends HttpServlet { + + @Override + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + // 处理中文乱码 + req.setCharacterEncoding("utf-8"); + + // 接收数据 + String username = req.getParameter("username"); + String password = req.getParameter("password"); + String email = req.getParameter("email"); + + // 封装数据 + User user = new User(); + user.setUid(UUIDUtils.getId()); + user.setUsername(username); + user.setPassword(password); + user.setEmail(email); + user.setState(0); + + // 调用业务处理数据 + UserService service = new UserServiceImpl(); + try { + service.add(user); + resp.sendRedirect(req.getContextPath()+"/message.jsp"); + } catch (Exception e) { + e.printStackTrace(); + throw new RuntimeException(); + } + + } + + @Override + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + doGet(req, resp); + } +} diff --git a/maildemo/src/main/java/pers/hdh/utils/DataSourceUtils.java b/maildemo/src/main/java/pers/hdh/utils/DataSourceUtils.java new file mode 100644 index 00000000..a6863942 --- /dev/null +++ b/maildemo/src/main/java/pers/hdh/utils/DataSourceUtils.java @@ -0,0 +1,127 @@ +package pers.hdh.utils; + +import com.mchange.v2.c3p0.ComboPooledDataSource; + +import javax.sql.DataSource; +import java.sql.Connection; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +public class DataSourceUtils { + private static ComboPooledDataSource ds = new ComboPooledDataSource(); + private static ThreadLocal<Connection> tl=new ThreadLocal<>(); + + /** + * 从线程中获取连接 + * @return + * @throws SQLException + */ + public static Connection getConnection() throws SQLException { + //从线程中获取conneciton + Connection conn = tl.get(); + if(conn==null){ + conn=ds.getConnection(); + //和当前线程绑定 + tl.set(conn); + } + return conn; + } + + // 获取数据源 + public static DataSource getDataSource() { + return ds; + } + + // 释放资源 + public static void closeResource( Statement st, ResultSet rs) { + closeResultSet(rs); + closeStatement(st); + } + + // 释放资源 + public static void closeResource(Connection conn, Statement st, ResultSet rs) { + closeResource(st, rs); + closeConn(conn); + } + + // 释放 connection + public static void closeConn(Connection conn) { + if (conn != null) { + try { + conn.close(); + //和线程解绑 + tl.remove(); + } catch (SQLException e) { + e.printStackTrace(); + } + conn = null; + } + } + + // 释放 statement ctrl + shift + f 格式化代码 + public static void closeStatement(Statement st) { + if (st != null) { + try { + st.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + st = null; + } + } + + // 释放结果集 + public static void closeResultSet(ResultSet rs) { + if (rs != null) { + try { + rs.close(); + } catch (SQLException e) { + e.printStackTrace(); + } + rs = null; + } + } + + + //开启事务 + public static void startTransaction() throws SQLException{ + getConnection().setAutoCommit(false); + } + + /** + * 事务提交且释放连接 + */ + public static void commitAndClose(){ + Connection conn = null; + try { + conn=getConnection(); + //事务提交 + conn.commit(); + //关闭资源 + conn.close(); + //解除版定 + tl.remove(); + } catch (SQLException e) { + e.printStackTrace(); + } + } + + /** + * 事务回滚且释放资源 + */ + public static void rollbackAndClose(){ + Connection conn = null; + try { + conn=getConnection(); + //事务回滚 + conn.rollback(); + //关闭资源 + conn.close(); + //解除版定 + tl.remove(); + } catch (SQLException e) { + e.printStackTrace(); + } + } +} diff --git a/maildemo/src/main/java/pers/hdh/utils/MailUtils.java b/maildemo/src/main/java/pers/hdh/utils/MailUtils.java new file mode 100644 index 00000000..0a3a8f9e --- /dev/null +++ b/maildemo/src/main/java/pers/hdh/utils/MailUtils.java @@ -0,0 +1,60 @@ +package pers.hdh.utils; + +import com.sun.mail.util.MailSSLSocketFactory; + +import javax.mail.*; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeMessage; +import java.util.Properties; + +public class MailUtils { + + // 发件者的邮箱与密码/授权码 + private static String[] from={ "邮箱", "授权码"}; + + /** + * 发送邮件的方法 + * @param to 邮箱地址 + * @param msg 发送的信息 + */ + public static void sendMail(String to, String msg) throws Exception { + + // 1.创建连接对象,连接到邮箱服务器 + Properties prop = new Properties(); + // 设置邮件服务器主机名 + prop.setProperty("mail.host", "smtp.qq.com"); + // 发送邮件协议名称 + prop.setProperty("mail.transport.protocol", "smtp"); + // 发送服务器需要身份验证 + prop.setProperty("mail.smtp.auth", "true"); + + /* + 注意:使用qq邮箱发送需要开启ssl加密 + */ + MailSSLSocketFactory sf = new MailSSLSocketFactory(); + sf.setTrustAllHosts(true); + prop.setProperty("mail.smtp.ssl.enable", "true"); + prop.put("mail.smtp.ssl.socketFactory", sf); + + Session session = Session.getInstance(prop, new Authenticator() { + public PasswordAuthentication getPasswordAuthentication() { + //设置发送人的帐号和密码 + return new PasswordAuthentication(from[0], from[1]); + } + }); + + // 2.创建邮件对象 + Message message = new MimeMessage(session); + // 2.1 设置发件者 + message.setFrom(new InternetAddress(from[0])); + // 2.2 设置收件者 + message.setRecipient(Message.RecipientType.TO, new InternetAddress(to)); + // 2.3 设置邮件主题 + message.setSubject("欢迎您注册我们网站"); + // 2.4 设置邮件的正文 + message.setContent("<h1>请点击<a href='http://localhost:8080/maildemo/ActiveServlet?uid="+msg+"'>此链接</a>以激活账号</h1>", "text/html;charset=utf-8"); + + // 3.发送邮件 + Transport.send(message); + } +} diff --git a/maildemo/src/main/java/pers/hdh/utils/UUIDUtils.java b/maildemo/src/main/java/pers/hdh/utils/UUIDUtils.java new file mode 100644 index 00000000..3f87173b --- /dev/null +++ b/maildemo/src/main/java/pers/hdh/utils/UUIDUtils.java @@ -0,0 +1,25 @@ +package pers.hdh.utils; + +import java.util.UUID; + +public class UUIDUtils { + /** + * 随机生成id + * @return + */ + public static String getId(){ + return UUID.randomUUID().toString().replace("-", "").toUpperCase(); + } + + /** + * 生成随机码 + * @return + */ + public static String getCode(){ + return getId(); + } + + public static void main(String[] args) { + System.out.println(getId()); + } +} diff --git a/maildemo/src/main/recources/c3p0.properties b/maildemo/src/main/recources/c3p0.properties new file mode 100644 index 00000000..a81ecc0a --- /dev/null +++ b/maildemo/src/main/recources/c3p0.properties @@ -0,0 +1,4 @@ +c3p0.driverClass=com.mysql.jdbc.Driver +c3p0.jdbcUrl=jdbc:mysql://localhost:3306/db +c3p0.user=root +c3p0.password=toor \ No newline at end of file diff --git a/maildemo/web/WEB-INF/classes/c3p0.properties b/maildemo/web/WEB-INF/classes/c3p0.properties new file mode 100644 index 00000000..a81ecc0a --- /dev/null +++ b/maildemo/web/WEB-INF/classes/c3p0.properties @@ -0,0 +1,4 @@ +c3p0.driverClass=com.mysql.jdbc.Driver +c3p0.jdbcUrl=jdbc:mysql://localhost:3306/db +c3p0.user=root +c3p0.password=toor \ No newline at end of file diff --git a/maildemo/web/WEB-INF/classes/main/recources/c3p0.properties b/maildemo/web/WEB-INF/classes/main/recources/c3p0.properties new file mode 100644 index 00000000..a81ecc0a --- /dev/null +++ b/maildemo/web/WEB-INF/classes/main/recources/c3p0.properties @@ -0,0 +1,4 @@ +c3p0.driverClass=com.mysql.jdbc.Driver +c3p0.jdbcUrl=jdbc:mysql://localhost:3306/db +c3p0.user=root +c3p0.password=toor \ No newline at end of file diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/dao/UserDao.class b/maildemo/web/WEB-INF/classes/pers/hdh/dao/UserDao.class new file mode 100644 index 00000000..52498e4f Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/dao/UserDao.class differ diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/dao/impl/UserDaoImpl.class b/maildemo/web/WEB-INF/classes/pers/hdh/dao/impl/UserDaoImpl.class new file mode 100644 index 00000000..401df2fa Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/dao/impl/UserDaoImpl.class differ diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/domain/User.class b/maildemo/web/WEB-INF/classes/pers/hdh/domain/User.class new file mode 100644 index 00000000..f9dc5d7e Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/domain/User.class differ diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/service/UserService.class b/maildemo/web/WEB-INF/classes/pers/hdh/service/UserService.class new file mode 100644 index 00000000..5b0fbb4e Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/service/UserService.class differ diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/service/impl/UserServiceImpl.class b/maildemo/web/WEB-INF/classes/pers/hdh/service/impl/UserServiceImpl.class new file mode 100644 index 00000000..0f928e2c Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/service/impl/UserServiceImpl.class differ diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/servlet/ActiveServlet.class b/maildemo/web/WEB-INF/classes/pers/hdh/servlet/ActiveServlet.class new file mode 100644 index 00000000..6db31d8f Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/servlet/ActiveServlet.class differ diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/servlet/RegistServlet.class b/maildemo/web/WEB-INF/classes/pers/hdh/servlet/RegistServlet.class new file mode 100644 index 00000000..762db82c Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/servlet/RegistServlet.class differ diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/utils/DataSourceUtils.class b/maildemo/web/WEB-INF/classes/pers/hdh/utils/DataSourceUtils.class new file mode 100644 index 00000000..a86503b9 Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/utils/DataSourceUtils.class differ diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/utils/MailUtils$1.class b/maildemo/web/WEB-INF/classes/pers/hdh/utils/MailUtils$1.class new file mode 100644 index 00000000..adc32f16 Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/utils/MailUtils$1.class differ diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/utils/MailUtils.class b/maildemo/web/WEB-INF/classes/pers/hdh/utils/MailUtils.class new file mode 100644 index 00000000..f6e2544a Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/utils/MailUtils.class differ diff --git a/maildemo/web/WEB-INF/classes/pers/hdh/utils/UUIDUtils.class b/maildemo/web/WEB-INF/classes/pers/hdh/utils/UUIDUtils.class new file mode 100644 index 00000000..f90e8b62 Binary files /dev/null and b/maildemo/web/WEB-INF/classes/pers/hdh/utils/UUIDUtils.class differ diff --git a/maildemo/web/WEB-INF/classes/recources/c3p0.properties b/maildemo/web/WEB-INF/classes/recources/c3p0.properties new file mode 100644 index 00000000..a81ecc0a --- /dev/null +++ b/maildemo/web/WEB-INF/classes/recources/c3p0.properties @@ -0,0 +1,4 @@ +c3p0.driverClass=com.mysql.jdbc.Driver +c3p0.jdbcUrl=jdbc:mysql://localhost:3306/db +c3p0.user=root +c3p0.password=toor \ No newline at end of file diff --git a/maildemo/web/WEB-INF/lib/c3p0-0.9.1.2.jar b/maildemo/web/WEB-INF/lib/c3p0-0.9.1.2.jar new file mode 100644 index 00000000..0f42d60e Binary files /dev/null and b/maildemo/web/WEB-INF/lib/c3p0-0.9.1.2.jar differ diff --git a/maildemo/web/WEB-INF/lib/commons-dbutils-1.6.jar b/maildemo/web/WEB-INF/lib/commons-dbutils-1.6.jar new file mode 100644 index 00000000..b2590db9 Binary files /dev/null and b/maildemo/web/WEB-INF/lib/commons-dbutils-1.6.jar differ diff --git a/maildemo/web/WEB-INF/lib/mail.jar b/maildemo/web/WEB-INF/lib/mail.jar new file mode 100644 index 00000000..9d60d13b Binary files /dev/null and b/maildemo/web/WEB-INF/lib/mail.jar differ diff --git a/maildemo/web/WEB-INF/lib/mysql-connector-java-5.1.37-bin.jar b/maildemo/web/WEB-INF/lib/mysql-connector-java-5.1.37-bin.jar new file mode 100644 index 00000000..465af670 Binary files /dev/null and b/maildemo/web/WEB-INF/lib/mysql-connector-java-5.1.37-bin.jar differ diff --git a/maildemo/web/WEB-INF/web.xml b/maildemo/web/WEB-INF/web.xml new file mode 100644 index 00000000..4543e1cd --- /dev/null +++ b/maildemo/web/WEB-INF/web.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://java.sun.com/xml/ns/javaee" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + id="WebApp_ID" version="2.5"> + + <servlet> + <servlet-name>RegistServlet</servlet-name> + <servlet-class>pers.hdh.servlet.RegistServlet</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>RegistServlet</servlet-name> + <url-pattern>/RegistServlet</url-pattern> + </servlet-mapping> + <servlet> + <servlet-name>ActiveServlet</servlet-name> + <servlet-class>pers.hdh.servlet.ActiveServlet</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>ActiveServlet</servlet-name> + <url-pattern>/ActiveServlet</url-pattern> + </servlet-mapping> +</web-app> \ No newline at end of file diff --git a/maildemo/web/error.jsp b/maildemo/web/error.jsp new file mode 100644 index 00000000..9a075516 --- /dev/null +++ b/maildemo/web/error.jsp @@ -0,0 +1,16 @@ +<%-- + Created by IntelliJ IDEA. + User: Lenovo + Date: 2017/10/25 + Time: 17:41 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<html> +<head> + <title>注册失败</title> +</head> +<body> + 账号注册失败,请重新注册! +</body> +</html> diff --git a/maildemo/web/index.jsp b/maildemo/web/index.jsp new file mode 100644 index 00000000..e841e4a4 --- /dev/null +++ b/maildemo/web/index.jsp @@ -0,0 +1,34 @@ +<%-- + Created by IntelliJ IDEA. + User: Lenovo + Date: 2017/10/25 + Time: 12:52 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<html> + <head> + <title>用户注册</title> + </head> + <body> + <form action="${pageContext.request.contextPath}/RegistServlet" method="post"> + <table width="500" border="1" align="center"> + <tr> + <td>用户名</td> + <td><input type="text" name="username"/></td> + </tr> + <tr> + <td>密码</td> + <td><input type="password" name="password"/></td> + </tr> + <tr> + <td>邮箱</td> + <td><input type="email" name="email" /></td> + </tr> + <tr> + <td colspan="2"><input type="submit" value="注册"/></td> + </tr> + </table> + </form> + </body> +</html> diff --git a/maildemo/web/message.jsp b/maildemo/web/message.jsp new file mode 100644 index 00000000..4760f201 --- /dev/null +++ b/maildemo/web/message.jsp @@ -0,0 +1,16 @@ +<%-- + Created by IntelliJ IDEA. + User: Lenovo + Date: 2017/10/25 + Time: 17:42 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<html> +<head> + <title>请前往邮箱激活账号</title> +</head> +<body> + 注册操作已成功完成,请前往邮箱进行激活账号操作 +</body> +</html> diff --git a/maildemo/web/success.jsp b/maildemo/web/success.jsp new file mode 100644 index 00000000..1cb82eca --- /dev/null +++ b/maildemo/web/success.jsp @@ -0,0 +1,16 @@ +<%-- + Created by IntelliJ IDEA. + User: Lenovo + Date: 2017/10/25 + Time: 17:40 + To change this template use File | Settings | File Templates. +--%> +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<html> +<head> + <title>注册成功</title> +</head> +<body> + 恭喜您,账号激活成功! +</body> +</html> diff --git a/main.py b/main.py new file mode 100644 index 00000000..5b3ff5d5 --- /dev/null +++ b/main.py @@ -0,0 +1,842 @@ +from tkinter import * +import time +import sqlite3 +import random +import tempfile +import win32api +import win32print + +f = '' +flag = '' +flags = '' + +login = sqlite3.connect("admin.db") +l = login.cursor() + +c = sqlite3.connect("medicine.db") +cur = c.cursor() + +columns = ('Sl No', 'Name', 'Type', 'Quantity Left', 'Cost', 'Purpose', 'Expiry Date', 'Rack location', 'Manufacture') + + +def open_win(): + global apt, flag + flag = 'apt' + apt = Tk() + apt.title("Interface") + Label(apt, text="EVANZ MEDICAL STORE COMPANY").grid(row=0, column=0, columnspan=3) + Label(apt, text='*' * 80).grid(row=1, column=0, columnspan=3) + Label(apt, text='-' * 80).grid(row=3, column=0, columnspan=3) + + Label(apt, text="Stock Maintenance", bg='green', fg='white').grid(row=2, column=0) + Button(apt, text='New V.C.', width=25, bg='green', fg='white', command=val_cus).grid(row=4, column=0) + Button(apt, text='Add product to Stock', bg='green', fg='white', width=25, command=stock).grid(row=5, column=0) + Button(apt, text='Delete product from Stock', bg='red', fg='white', width=25, command=delete_stock).grid(row=6, + column=0) + + Label(apt, text="Access Database", bg='blue', fg='white').grid(row=2, column=1) + Button(apt, text='Modify', width=15, bg='blue', fg='white', command=modify).grid(row=4, column=1) + Button(apt, text='Search', width=15, bg='blue', fg='white', command=search).grid(row=5, column=1) + Button(apt, text='Expiry Check', bg='red', fg='white', width=15, command=exp_date).grid(row=6, column=1) + + Label(apt, text="Handle Cash Flows", bg='skyblue', fg='black').grid(row=2, column=2) + Button(apt, text="Check Today's Revenue", bg='skyblue', fg='black', width=20, command=show_rev).grid(row=5, + column=2) + Button(apt, text='Billing', width=20, bg='skyblue', fg='black', command=billing).grid(row=4, column=2) + Button(apt, text='Logout', bg='red', fg='white', width=20, command=again).grid(row=6, column=2) + apt.mainloop() + + +def delete_stock(): + global cur, c, flag, lb1, d + apt.destroy() + flag = 'd' + d = Tk() + d.title("Delete a product from Stock") + Label(d, text='Enter Product to delete:').grid(row=0, column=0) + Label(d, text='', width=30, bg='white').grid(row=0, column=1) + Label(d, text='Product').grid(row=2, column=0) + Label(d, text='Qty. Exp.dt. Cost ').grid(row=2, column=1) + ren() + b = Button(d, width=20, text='Delete', bg='red', fg='white', command=delt).grid(row=0, column=3) + b = Button(d, width=20, text='Main Menu', bg='green', fg='white', command=main_menu).grid(row=5, column=3) + d.mainloop() + + +def ren(): + global lb1, d, cur, c + + def onvsb(*args): + lb1.yview(*args) + lb2.yview(*args) + + def onmousewheel(): + lb1.ywiew = ('scroll', event.delta, 'units') + lb2.ywiew = ('scroll', event.delta, 'units') + return 'break' + + cx = 0 + vsb = Scrollbar(orient='vertical', command=onvsb) + lb1 = Listbox(d, width=25, yscrollcommand=vsb.set) + lb2 = Listbox(d, width=30, yscrollcommand=vsb.set) + vsb.grid(row=3, column=2, sticky=N + S) + lb1.grid(row=3, column=0) + lb2.grid(row=3, column=1) + lb1.bind('<MouseWheel>', onmousewheel) + lb2.bind('<MouseWheel>', onmousewheel) + cur.execute("select *from med") + for i in cur: + cx += 1 + s1 = [str(i[0]), str(i[1])] + s2 = [str(i[3]), str(i[6]), str(i[4])] + lb1.insert(cx, '. '.join(s1)) + lb2.insert(cx, ' '.join(s2)) + c.commit() + lb1.bind('<<ListboxSelect>>', sel_del) + + +def sel_del(e): + global lb1, d, cur, c, p, sl2 + p = lb1.curselection() + print(p) + x = 0 + sl2 = '' + cur.execute("select * from med") + for i in cur: + print(x, p[0]) + if x == int(p[0]): + sl2 = i[0] + break + x += 1 + c.commit() + print(sl2) + Label(d, text=' ', bg='white', width=20).grid(row=0, column=1) + cur.execute('Select * from med') + for i in cur: + if i[0] == sl2: + Label(d, text=i[0] + '. ' + i[1], bg='white').grid(row=0, column=1) + c.commit() + + +def delt(): + global p, c, cur, d + cur.execute("delete from med where sl_no=?", (sl2,)) + c.commit() + ren() + + +def modify(): + global cur, c, accept, flag, att, up, n, name_, apt, st, col, col_n + col = ('', '', 'type', 'qty_left', 'cost', 'purpose', 'expdt', 'loc', 'mfg') + col_n = ('', '', 'Type', 'Quantity Left', 'Cost', 'Purpose', 'Expiry Date', 'Rack location', 'Manufacture') + flag = 'st' + name_ = '' + apt.destroy() + n = [] + cur.execute("select * from med") + for i in cur: + n.append(i[1]) + c.commit() + st = Tk() + st.title('MODIFY') + Label(st, text='-' * 48 + ' MODIFY DATABASE ' + '-' * 48).grid(row=0, column=0, columnspan=6) + + def onvsb(*args): + name_.yview(*args) + + def onmousewheel(): + name_.ywiew = ('scroll', event.delta, 'units') + return 'break' + + cx = 0 + vsb = Scrollbar(orient='vertical', command=onvsb) + vsb.grid(row=1, column=3, sticky=N + S) + name_ = Listbox(st, width=43, yscrollcommand=vsb.set) + cur.execute("select *from med") + for i in cur: + cx += 1 + name_.insert(cx, (str(i[0]) + '. ' + str(i[1]))) + name_.grid(row=1, column=1, columnspan=2) + c.commit() + name_.bind('<MouseWheel>', onmousewheel) + name_.bind('<<ListboxSelect>>', sel_mn) + + Label(st, text='Enter Medicine Name: ').grid(row=1, column=0) + Label(st, text='Enter changed Value of: ').grid(row=2, column=0) + att = Spinbox(st, values=col_n) + att.grid(row=2, column=1) + up = Entry(st) + up.grid(row=2, column=2) + Button(st, width=10, text='Submit', bg='green', fg='white', command=save_mod).grid(row=2, column=4) + Button(st, width=10, text='Reset', bg='red', fg='white', command=res).grid(row=2, column=5) + Button(st, width=10, text='Show data', bg='blue', fg='white', command=show_val).grid(row=1, column=4) + Label(st, text='-' * 120).grid(row=3, column=0, columnspan=6) + Button(st, width=10, text='Main Menu', bg='green', fg='white', command=main_menu).grid(row=5, column=5) + st.mainloop() + + +def res(): + global st, up + up = Entry(st) + up.grid(row=2, column=2) + Label(st, width=20, text=' ').grid(row=5, column=i) + + +def sel_mn(e): + global n, name_, name_mn, sl, c, cur + name_mn = '' + p = name_.curselection() + print(p) + x = 0 + sl = '' + cur.execute("select * from med") + for i in cur: + print(x, p[0]) + if x == int(p[0]): + sl = i[0] + break + x += 1 + c.commit() + print(sl) + name_nm = n[int(sl)] + print(name_nm) + + +def show_val(): + global st, name_mn, att, cur, c, col, col_n, sl + for i in range(3): + Label(st, width=20, text=' ').grid(row=5, column=i) + cur.execute("select * from med") + for i in cur: + for j in range(9): + if att.get() == col_n[j] and sl == i[0]: + Label(st, text=str(i[0])).grid(row=5, column=0) + Label(st, text=str(i[1])).grid(row=5, column=1) + Label(st, text=str(i[j])).grid(row=5, column=2) + c.commit() + + +def save_mod(): # save modified data + global cur, c, att, name_mn, st, up, col_n, sl + for i in range(9): + if att.get() == col_n[i]: + a = col[i] + sql = "update med set '%s' = '%s' where sl_no = '%s'" % (a, up.get(), sl) + cur.execute(sql) + c.commit() + Label(st, text='Updated!').grid(row=5, column=4) + + +def stock(): + global cur, c, columns, accept, flag, sto, apt + apt.destroy() + flag = 'sto' + accept = [''] * 10 + sto = Tk() + sto.title('STOCK ENTRY') + Label(sto, text='ENTER NEW PRODUCT DATA TO THE STOCK').grid(row=0, column=0, columnspan=2) + Label(sto, text='-' * 50).grid(row=1, column=0, columnspan=2) + for i in range(1, len(columns)): + Label(sto, width=15, text=' ' * (14 - len(str(columns[i]))) + str(columns[i]) + ':').grid(row=i + 2, column=0) + accept[i] = Entry(sto) + accept[i].grid(row=i + 2, column=1) + Button(sto, width=15, text='Submit', bg='blue', fg='white', command=submit).grid(row=12, column=1) + Label(sto, text='-' * 165).grid(row=13, column=0, columnspan=7) + Button(sto, width=15, text='Reset', bg='red', fg='white', command=reset).grid(row=12, column=0) + Button(sto, width=15, text='Refresh stock', bg='skyblue', fg='black', command=ref).grid(row=12, column=4) + for i in range(1, 6): + Label(sto, text=columns[i]).grid(row=14, column=i - 1) + Label(sto, text='Exp Rack Manufacturer ').grid(row=14, column=5) + Button(sto, width=10, text='Main Menu', bg='green', fg='white', command=main_menu).grid(row=12, column=5) + ref() + sto.mainloop() + + +def ref(): + global sto, c, cur + + def onvsb(*args): + lb1.yview(*args) + lb2.yview(*args) + lb3.yview(*args) + lb4.yview(*args) + lb5.yview(*args) + lb6.yview(*args) + + def onmousewheel(): + lb1.ywiew = ('scroll', event.delta, 'units') + lb2.ywiew = ('scroll', event.delta, 'units') + lb3.ywiew = ('scroll', event.delta, 'units') + lb4.ywiew = ('scroll', event.delta, 'units') + lb5.ywiew = ('scroll', event.delta, 'units') + lb6.ywiew = ('scroll', event.delta, 'units') + + return 'break' + + cx = 0 + vsb = Scrollbar(orient='vertical', command=onvsb) + lb1 = Listbox(sto, yscrollcommand=vsb.set) + lb2 = Listbox(sto, yscrollcommand=vsb.set) + lb3 = Listbox(sto, yscrollcommand=vsb.set, width=10) + lb4 = Listbox(sto, yscrollcommand=vsb.set, width=7) + lb5 = Listbox(sto, yscrollcommand=vsb.set, width=25) + lb6 = Listbox(sto, yscrollcommand=vsb.set, width=37) + vsb.grid(row=15, column=6, sticky=N + S) + lb1.grid(row=15, column=0) + lb2.grid(row=15, column=1) + lb3.grid(row=15, column=2) + lb4.grid(row=15, column=3) + lb5.grid(row=15, column=4) + lb6.grid(row=15, column=5) + lb1.bind('<MouseWheel>', onmousewheel) + lb2.bind('<MouseWheel>', onmousewheel) + lb3.bind('<MouseWheel>', onmousewheel) + lb4.bind('<MouseWheel>', onmousewheel) + lb5.bind('<MouseWheel>', onmousewheel) + lb6.bind('<MouseWheel>', onmousewheel) + cur.execute("select *from med") + for i in cur: + cx += 1 + seq = (str(i[0]), str(i[1])) + lb1.insert(cx, '. '.join(seq)) + lb2.insert(cx, i[2]) + lb3.insert(cx, i[3]) + lb4.insert(cx, i[4]) + lb5.insert(cx, i[5]) + lb6.insert(cx, i[6] + ' ' + i[7] + ' ' + i[8]) + c.commit() + + +def reset(): + global sto, accept + for i in range(1, len(columns)): + Label(sto, width=15, text=' ' * (14 - len(str(columns[i]))) + str(columns[i]) + ':').grid(row=i + 2, column=0) + accept[i] = Entry(sto) + accept[i].grid(row=i + 2, column=1) + + +def submit(): + global accept, c, cur, columns, sto + + x = [''] * 10 + cur.execute("select * from med") + for i in cur: + y = int(i[0]) + for i in range(1, 9): + x[i] = accept[i].get() + sql = "insert into med values('%s','%s','%s','%s','%s','%s','%s','%s','%s')" % ( + y + 1, x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8]) + cur.execute(sql) + cur.execute("select * from med") + c.commit() + + top = Tk() + Label(top, width=20, text='Success!').pack() + top.mainloop() + main_menu() + + +def chk(): + global cur, c, accept, sto + cur.execute("select * from med") + for i in cur: + if accept[6].get() == i[6] and i[1] == accept[1].get(): + sql = "update med set qty_left = '%s' where name = '%s'" % ( + str(int(i[3]) + int(accept[3].get())), accept[1].get()) + cur.execute(sql) + c.commit() + top = Tk() + Label(top, width=20, text='Modified!').pack() + top.mainloop() + main_menu() + else: + submit() + c.commit() + + +def exp_date(): + global exp, s, c, cur, flag, apt, flags + apt.destroy() + flag = 'exp' + from datetime import date + now = time.localtime() + n = [] + cur.execute("select *from med") + for i in cur: + n.append(i[1]) + c.commit() + exp = Tk() + exp.title('EXPIRY CHECK') + Label(exp, text='Today : ' + str(now[2]) + '/' + str(now[1]) + '/' + str(now[0])).grid(row=0, column=0, + columnspan=3) + Label(exp, text='Selling Expired Medicines and Drugs is Illegal').grid(row=1, column=0, columnspan=3) + Label(exp, text='-' * 80).grid(row=2, column=0, columnspan=3) + s = Spinbox(exp, values=n) + s.grid(row=3, column=0) + Button(exp, text='Check Expiry date', bg='red', fg='white', command=s_exp).grid(row=3, column=1) + Label(exp, text='-' * 80).grid(row=4, column=0, columnspan=3) + if flags == 'apt1': + Button(exp, text='Main Menu', bg='green', fg='white', command=main_cus).grid(row=5, column=2) + else: + Button(exp, width=20, text='Check Products expiring', bg='red', fg='white', command=exp_dt).grid(row=5, + column=0) + Button(exp, text='Main Menu', bg='green', fg='white', command=main_menu).grid(row=5, column=2) + exp.mainloop() + + +def s_exp(): + global c, cur, s, exp, top + from datetime import date + now = time.localtime() + d1 = date(now[0], now[1], now[2]) + cur.execute("select * from med") + for i in cur: + if (i[1] == s.get()): + q = i[6] + d2 = date(int('20' + q[8:10]), int(q[3:5]), int(q[0:2])) + if d1 > d2: + Label(exp, text='EXPIRED! on ' + i[6]).grid(row=3, column=2) + top = Tk() + Label(top, text='EXPIRED!').pack() + else: + Label(exp, text=i[6]).grid(row=3, column=2) + c.commit() + + +def exp_dt(): + global c, cur, exp, top + x = 0 + z = 1 + from datetime import datetime, timedelta + N = 7 + dt = datetime.now() + timedelta(days=N) + d = str(dt) + from datetime import date + now = time.localtime() + d1 = date(now[0], now[1], now[2]) + d3 = date(int(d[0:4]), int(d[5:7]), int(d[8:10])) + Label(exp, text='S.No' + ' ' + 'Name' + ' Qty. ' + 'Exp_date').grid(row=6, column=0, columnspan=2) + cur.execute("select * from med") + for i in cur: + s = i[6] + d2 = date(int('20' + s[8:10]), int(s[3:5]), int(s[0:2])) + + if d1 < d2 < d3: + Label(exp, text=str(z) + '. ' + str(i[1]) + ' ' + str(i[3]) + ' ' + str(i[6])).grid(row=x + 7, + column=0, + columnspan=2) + x += 1 + z += 1 + elif d1 > d2: + top = Tk() + Label(top, width=20, text=str(i[1]) + ' is EXPIRED!').pack() + c.commit() + + +def billing(): + global c, cur, apt, flag, t, name, name1, add, st, names, qty, sl, qtys, vc_id, n, namee, lb1 + t = 0 + vc_id = '' + names = [] + qty = [] + sl = [] + n = [] + qtys = [''] * 10 + cur.execute("select *from med") + for i in cur: + n.append(i[1]) + c.commit() + if flag == 'st': + st.destroy() + else: + apt.destroy() + flag = 'st' + st = Tk() + st.title('BILLING SYSTEM') + Label(st, text='-' * 48 + 'BILLING SYSTEM' + '-' * 49).grid(row=0, column=0, columnspan=7) + Label(st, text='Enter Name: ').grid(row=1, column=0) + name1 = Entry(st) + name1.grid(row=1, column=1) + Label(st, text='Enter Address: ').grid(row=2, column=0) + add = Entry(st) + add.grid(row=2, column=1) + Label(st, text="Value Id (if available)").grid(row=3, column=0) + vc_id = Entry(st) + vc_id.grid(row=3, column=1) + Button(st, text='Check V.C.', bg='green', fg='white', command=blue).grid(row=4, column=0) + Label(st, text='-' * 115).grid(row=6, column=0, columnspan=7) + Label(st, text='SELECT PRODUCT', width=25, relief='ridge').grid(row=7, column=0) + Label(st, text=' RACK QTY LEFT COST ', width=25, relief='ridge').grid(row=7, column=1) + Button(st, text='Add to bill', bg='blue', fg='white', width=15, command=append2bill).grid(row=8, column=6) + Label(st, text='QUANTITY', width=20, relief='ridge').grid(row=7, column=5) + qtys = Entry(st) + qtys.grid(row=8, column=5) + refresh() + Button(st, width=15, text='Main Menu', bg='green', fg='white', command=main_menu).grid(row=1, column=6) + Button(st, width=15, text='Refresh Stock', bg='skyblue', fg='black', command=refresh).grid(row=3, column=6) + Button(st, width=15, text='Reset Bill', bg='red', fg='white', command=billing).grid(row=4, column=6) + Button(st, width=15, text='Print Bill', bg='orange', fg='white', command=print_bill).grid(row=5, column=6) + Button(st, width=15, text='Save Bill', bg='blue', fg='white', command=make_bill).grid(row=7, column=6) + + st.mainloop() + + +def refresh(): + global cur, c, st, lb1, lb2, vsb + + def onvsb(*args): + lb1.yview(*args) + lb2.yview(*args) + + def onmousewheel(): + lb1.ywiew = ('scroll', event.delta, 'units') + lb2.ywiew = ('scroll', event.delta, 'units') + return 'break' + + cx = 0 + vsb = Scrollbar(orient='vertical', command=onvsb) + lb1 = Listbox(st, width=25, yscrollcommand=vsb.set) + lb2 = Listbox(st, width=25, yscrollcommand=vsb.set) + vsb.grid(row=8, column=2, sticky=N + S) + lb1.grid(row=8, column=0) + lb2.grid(row=8, column=1) + lb1.bind('<MouseWheel>', onmousewheel) + lb2.bind('<MouseWheel>', onmousewheel) + cur.execute("select *from med") + for i in cur: + cx += 1 + lb1.insert(cx, str(i[0]) + '. ' + str(i[1])) + lb2.insert(cx, ' ' + str(i[7]) + ' ' + str(i[3]) + ' PHP ' + str(i[4])) + c.commit() + lb1.bind('<<ListboxSelect>>', select_mn) + + +def select_mn(e): + global st, lb1, n, p, nm, sl1 + p = lb1.curselection() + x = 0 + sl1 = '' + from datetime import date + now = time.localtime() + d1 = date(now[0], now[1], now[2]) + cur.execute("select * from med") + for i in cur: + if x == int(p[0]): + sl1 = int(i[0]) + break + x += 1 + c.commit() + print(sl1) + nm = n[x] + print(nm) + + +def append2bill(): + global st, names, nm, qty, sl, cur, c, sl1 + sl.append(sl1) + names.append(nm) + qty.append(qtys.get()) + print(qty) + print(sl[len(sl) - 1], names[len(names) - 1], qty[len(qty) - 1]) + + +def blue(): + global st, c, cur, named, addd, t, vc_id + cur.execute("select * from cus") + for i in cur: + if vc_id.get() != '' and int(vc_id.get()) == i[2]: + named = i[0] + addd = i[1] + Label(st, text=named, width=20).grid(row=1, column=1) + Label(st, text=addd, width=20).grid(row=2, column=1) + Label(st, text=i[2], width=20).grid(row=3, column=1) + Label(st, text='Valued Customer!').grid(row=4, column=1) + t = 1 + break + c.commit() + + +def make_bill(): + global t, c, B, cur, st, names, qty, sl, named, addd, name1, add, det, vc_id + price = [0.0] * 10 + q = 0 + det = ['', '', '', '', '', '', '', ''] + det[2] = str(sl) + for i in range(len(sl)): + print(sl[i], ' ', qty[i], ' ', names[i]) + for k in range(len(sl)): + cur.execute("select * from med where sl_no=?", (sl[k],)) + for i in cur: + price[k] = int(qty[k]) * float(i[4]) + print(qty[k], price[k]) + cur.execute("update med set qty_left=? where sl_no=?", (int(i[3]) - int(qty[k]), sl[k])) + c.commit() + det[5] = str(random.randint(100, 999)) + B = 'bill_' + str(det[5]) + '.txt' + total = 0.00 + for i in range(10): + if price[i] != '': + total += price[i] # totalling + m = '\n\n\n' + m += "===============================================\n" + m += " No :%s\n\n" % det[5] + m += " EVANZ MEDICAL STORE COMPANY\n" + m += " BINALBAGAN BRANCH, NEGROS OCCIDENTAL\n\n" + m += "-----------------------------------------------\n" + if t == 1: + m += "Name: %s\n" % named + m += "Address: %s\n" % addd + det[0] = named + det[1] = addd + cur.execute('select * from cus') + for i in cur: + if i[0] == named: + det[7] = i[2] + else: + m += "Name: %s\n" % name1.get() + m += "Address: %s\n" % add.get() + det[0] = name1.get() + det[1] = add.get() + m += "-----------------------------------------------\n" + m += "Product Qty. Price\n" + m += "-----------------------------------------------\n" + for i in range(len(sl)): + if names[i] != 'nil': + s1 = ' ' + s1 = (names[i]) + (s1 * (27 - len(names[i]))) + s1 * (3 - len(qty[i])) + qty[i] + s1 * ( + 15 - len(str(price[i]))) + str(price[i]) + '\n' + m += s1 + m += "\n-----------------------------------------------\n" + if t == 1: + ntotal = total * 0.8 + m += 'Total' + (' ' * 25) + (' ' * (15 - len(str(total)))) + str(total) + '\n' + m += "Valued customer Discount" + (' ' * (20 - len(str(total - ntotal)))) + '-' + str(total - ntotal) + '\n' + m += "-----------------------------------------------\n" + m += 'Total' + (' ' * 25) + (' ' * (12 - len(str(ntotal)))) + 'PHP ' + str(ntotal) + '\n' + det[3] = str(ntotal) + else: + m += 'Total' + (' ' * 25) + (' ' * (12 - len(str(total)))) + 'PHP ' + str(total) + '\n' + det[3] = str(total) + + m += "-----------------------------------------------\n\n" + m += "Dealer 's signature:___________________________\n" + m += "===============================================\n" + print(m) + p = time.localtime() + det[4] = str(p[2]) + '/' + str(p[1]) + '/' + str(p[0]) + det[6] = m + bill = open(B, 'w') + bill.write(m) + bill.close() + cb = ('cus_name', 'cus_add', 'items', 'Total_cost', 'bill_dt', 'bill_no', 'bill', 'val_id') + cur.execute('insert into bills values(?,?,?,?,?,?,?,?)', + (det[0], det[1], det[2], det[3], det[4], det[5], det[6], det[7])) + c.commit() + + +def print_bill(): + win32api.ShellExecute(0, "print", B, '/d:"%s"' % win32print.GetDefaultPrinter(), ".", 0) + + +def show_rev(): + global c, cur, flag, rev + apt.destroy() + cb = ('cus_name', 'cus_add', 'items', 'Total_cost', 'bill_dt', 'bill_no', 'bill', 'val_id') + flag = 'rev' + rev = Tk() + total = 0.0 + today = str(time.localtime()[2]) + '/' + str(time.localtime()[1]) + '/' + str(time.localtime()[0]) + Label(rev, text='Today: ' + today).grid(row=0, column=0) + cur.execute('select * from bills') + for i in cur: + if i[4] == today: + total += float(i[3]) + print(total) + Label(rev, width=22, text='Total revenue: PHP ' + str(total), bg='blue', fg='white').grid(row=1, column=0) + cx = 0 + vsb = Scrollbar(orient='vertical') + lb1 = Listbox(rev, width=25, yscrollcommand=vsb.set) + vsb.grid(row=2, column=1, sticky=N + S) + lb1.grid(row=2, column=0) + vsb.config(command=lb1.yview) + cur.execute("select * from bills") + for i in cur: + if i[4] == today: + cx += 1 + lb1.insert(cx, 'Bill No.: ' + str(i[5]) + ' : PHP ' + str(i[3])) + c.commit() + Button(rev, text='Main Menu', bg='green', fg='white', command=main_menu).grid(row=15, column=0) + rev.mainloop() + + +def search(): + global c, cur, flag, st, mn, sym, flags + flag = 'st' + apt.destroy() + cur.execute("Select * from med") + symp = ['nil'] + med_name = ['nil'] + for i in cur: + symp.append(i[5]) + med_name.append(i[1]) + st = Tk() + st.title('SEARCH') + Label(st, bg='green', fg='white', text=' SEARCH FOR MEDICINE ').grid(row=0, column=0, columnspan=3) + Label(st, text='~' * 40).grid(row=1, column=0, columnspan=3) + Label(st, text='Symptom Name').grid(row=3, column=0) + sym = Spinbox(st, values=symp) + sym.grid(row=3, column=1) + Button(st, width=15, text='Search', bg='blue', fg='white', command=search_med).grid(row=3, column=2) + Label(st, text='-' * 70).grid(row=4, column=0, columnspan=3) + if flags == 'apt1': + Button(st, width=15, text='Main Menu', bg='green', fg='white', command=main_cus).grid(row=6, column=2) + else: + Button(st, width=15, text='Main Menu', bg='green', fg='white', command=main_menu).grid(row=6, column=2) + st.mainloop() + + +def search_med(): + global c, cur, st, sym, columns + cur.execute("select * from med") + y = [] + x = 0 + for i in cur: + if i[5] == sym.get(): + y.append( + str(i[0]) + '. ' + str(i[1]) + ' PHP ' + str(i[4]) + ' Rack : ' + str(i[7]) + ' Mfg : ' + str( + i[8])) + x = x + 1 + top = Tk() + for i in range(len(y)): + Label(top, text=y[i]).grid(row=i, column=0) + Button(top, text='OK', command=top.destroy).grid(row=5, column=0) + c.commit() + top.mainloop() + + +def val_cus(): + global val, flag, dbt, name_vc, add_vc, cur, c, vc_id + apt.destroy() + cur.execute("select * from cus") + flag = 'val' + val = Tk() + Label(val, bg='blue', fg='white', text="****ENTER VALUED CUSTOMER DETAILS****").grid(row=0, column=0, columnspan=3) + Label(val, text="-" * 60).grid(row=1, column=0, columnspan=3) + Label(val, text="Name: ").grid(row=2, column=0) + name_vc = Entry(val) + name_vc.grid(row=2, column=1) + Label(val, text="Address: ").grid(row=3, column=0) + add_vc = Entry(val) + add_vc.grid(row=3, column=1) + Label(val, text="Value Id: ").grid(row=4, column=0) + vc_id = Entry(val) + vc_id.grid(row=4, column=1) + Button(val, text='Submit', bg='blue', fg='white', command=val_get).grid(row=5, column=1) + Button(val, text='Main Menu', bg='green', fg='white', command=main_menu).grid(row=5, column=2) + Label(val, text='-' * 60).grid(row=6, column=0, columnspan=3) + val.mainloop() + + +def val_get(): + global name_vc, add_vc, val, dbt, c, cur, apt, vc_id + cur.execute("insert into cus values(?,?,?)", (name_vc.get(), add_vc.get(), vc_id.get())) + l.execute("insert into log values(?,?)", (name_vc.get(), vc_id.get())) + cur.execute("select * from cus") + for i in cur: + print(i[0], i[1], i[2]) + c.commit() + login.commit() + + +def again(): + global un, pwd, flag, root, apt + if flag == 'apt': + apt.destroy() + root = Tk() + root.geometry('300x150') + root.title('ITSOURCECODE COMPANY') + Label(root, text='EVANZ MEDICAL STORE COMPANY').grid(row=0, column=0, columnspan=5) + Label(root, text="BINALBAGAN BRANCH, NEGROS OCCIDENTAL").grid(row=1, column=0, columnspan=5) + Label(root, text='-------------------------------------------------------').grid(row=2, column=0, columnspan=5) + Label(root, text='Username').grid(row=3, column=0) + un = Entry(root, width=30) + un.grid(row=3, column=1) + Label(root, text='Password').grid(row=4, column=0) + pwd = Entry(root, width=30) + pwd.grid(row=4, column=1) + Button(root, width=6, bg='blue', fg='white', text='Enter', command=check).grid(row=5, column=0) + Button(root, width=6, bg='red', fg='white', text='Close', command=root.destroy).grid(row=5, column=1) + root.mainloop() + + +def check(): + global un, pwd, login, l, root + u = un.get() + p = pwd.get() + l.execute("select * from log") + for i in l: + if i[0] == u and i[1] == p and u == 'admin': + root.destroy() + open_win() + elif i[0] == u and i[1] == p: + root.destroy() + open_cus() + login.commit() + + +def main_menu(): + global sto, apt, flag, root, st, val, exp, st1, rev + if flag == 'sto': + sto.destroy() + if flag == 'rev': + rev.destroy() + elif flag == 'st': + st.destroy() + elif flag == 'st1': + st1.destroy() + elif flag == 'val': + val.destroy() + elif flag == 'exp': + exp.destroy() + elif flag == 'd': + d.destroy() + open_win() + + +def main_cus(): + global st, flag, exp + if flag == 'exp': + exp.destroy() + elif flag == 'st': + st.destroy() + open_cus() + + +def open_cus(): + global apt, flag, flags + flags = 'apt1' + apt = Tk() + apt.title("Interface") + Label(apt, text="*** EVANZ MEDICAL DRUG STORE ***", bg='blue', fg='white').grid(row=0, column=0) + Label(apt, text='*' * 40).grid(row=1, column=0) + Label(apt, text='* WELCOME CUSTOMER SERVICES *', bg='green', fg='white').grid(row=2, column=0) + Label(apt, text='-' * 40).grid(row=3, column=0) + + Label(apt, text='-' * 40).grid(row=5, column=0) + Button(apt, text='Search', bg='blue', fg='white', width=15, command=search).grid(row=6, column=0) + Button(apt, text='Expiry Check', bg='red', fg='white', width=15, command=exp_date).grid(row=7, column=0) + + Label(apt, text='-' * 40).grid(row=8, column=0) + Button(apt, text='Logout', bg='green', fg='white', command=again1).grid(row=9, column=0) + apt.mainloop() + + +def again1(): + global flags + apt.destroy() + flags = '' + again() + + +again() + diff --git a/manifest.mf b/manifest.mf new file mode 100644 index 00000000..328e8e5b --- /dev/null +++ b/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/map1.jpg b/map1.jpg new file mode 100644 index 00000000..6fb6c584 Binary files /dev/null and b/map1.jpg differ diff --git a/matrix_multiplication.java b/matrix_multiplication.java new file mode 100644 index 00000000..6688f9e7 --- /dev/null +++ b/matrix_multiplication.java @@ -0,0 +1,34 @@ +public class MatrixMultiplication { + public static void main(String[] args) { + int[][] A = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; + int[][] B = {{9, 8, 7}, {6, 5, 4}, {3, 2, 1}}; + int[][] RES = new int[3][3]; + + // Perform matrix multiplication + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 3; j++) { + for (int k = 0; k < 3; k++) { + RES[i][j] += A[i][k] * B[k][j]; + } + } + } + + // Print the arrays + System.out.println("Matrix A:"); + printMatrix(A); + System.out.println("Matrix B:"); + printMatrix(B); + System.out.println("Result Matrix (A * B):"); + printMatrix(RES); + } + + // Helper method to print a matrix + public static void printMatrix(int[][] matrix) { + for (int i = 0; i < matrix.length; i++) { + for (int j = 0; j < matrix[i].length; j++) { + System.out.print(matrix[i][j] + " "); + } + System.out.println(); + } + } +} diff --git a/medicine.db b/medicine.db new file mode 100644 index 00000000..61f1f369 Binary files /dev/null and b/medicine.db differ diff --git a/meditation-app/README.md b/meditation-app/README.md new file mode 100644 index 00000000..8c7d525c --- /dev/null +++ b/meditation-app/README.md @@ -0,0 +1,10 @@ +## Meditation App + +A relaxing breathing app with a visual director to tell you when to breathe in, hold and breathe out + +## Project Specifications + +- Create circle and gradient circle with CSS +- Create and animate pointer (Small circle) +- Create grow and shrink animations +- Add JavaScript to create the breath animation effect diff --git a/meditation-app/img/bg.jpg b/meditation-app/img/bg.jpg new file mode 100644 index 00000000..70ec8578 Binary files /dev/null and b/meditation-app/img/bg.jpg differ diff --git a/meditation-app/index.html b/meditation-app/index.html new file mode 100644 index 00000000..db51c075 --- /dev/null +++ b/meditation-app/index.html @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="UTF-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta http-equiv="X-UA-Compatible" content="ie=edge" /> + <link rel="stylesheet" href="style.css" /> + <title>meditate</title> + </head> + <body> + <h1>Namaste!</h1> + <h2>Relax your body and mind </h2> + <h3>Calm down and take a break</h3> + + <div class="container" id="container"> + <div class="circle"></div> + + <p id="text"></p> + + <div class="pointer-container"> + <span class="pointer"></span> + </div> + + <div class="gradient-circle"></div> + </div> + + <script src="script.js"></script> + </body> +</html> diff --git a/meditation-app/script.js b/meditation-app/script.js new file mode 100644 index 00000000..e06de786 --- /dev/null +++ b/meditation-app/script.js @@ -0,0 +1,24 @@ +const container = document.getElementById('container'); +const text = document.getElementById('text'); + +const totalTime = 7500; +const breatheTime = (totalTime / 5) * 2; +const holdTime = totalTime / 5; + +breathAnimation(); + +function breathAnimation() { + text.innerText = 'Breathe In!'; + container.className = 'container grow'; + + setTimeout(() => { + text.innerText = 'Hold'; + + setTimeout(() => { + text.innerText = 'Breathe Out!'; + container.className = 'container shrink'; + }, holdTime); + }, breatheTime); +} + +setInterval(breathAnimation, totalTime); diff --git a/meditation-app/style.css b/meditation-app/style.css new file mode 100644 index 00000000..38980a4b --- /dev/null +++ b/meditation-app/style.css @@ -0,0 +1,113 @@ +@import url('https://fonts.googleapis.com/css?family=Montserrat&display=swap'); + +* { + box-sizing: border-box; +} + +body { + background: #224941 url('./img/bg.jpg') no-repeat center center/cover; + color: #fff; + font-family: 'Montserrat', sans-serif; + min-height: 100vh; + overflow: hidden; + display: flex; + flex-direction: column; + align-items: center; + margin: 0; +} + +.container { + display: flex; + align-items: center; + justify-content: center; + margin: auto; + height: 300px; + width: 300px; + position: relative; + transform: scale(1); +} + +.circle { + background-color: #010f1c; + height: 100%; + width: 100%; + border-radius: 50%; + position: absolute; + top: 0; + left: 0; + z-index: -1; +} + +.gradient-circle { + background: conic-gradient( + #55b7a4 0%, + #4ca493 40%, + #fff 40%, + #fff 60%, + #336d62 60%, + #2a5b52 100% + ); + height: 320px; + width: 320px; + z-index: -2; + border-radius: 50%; + position: absolute; + top: -10px; + left: -10px; +} + +.pointer { + background-color: #fff; + border-radius: 50%; + height: 20px; + width: 20px; + display: block; +} + +.pointer-container { + position: absolute; + top: -40px; + left: 140px; + width: 20px; + height: 190px; + animation: rotate 7.5s linear forwards infinite; + transform-origin: bottom center; +} + +@keyframes rotate { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} + +.container.grow { + animation: grow 3s linear forwards; +} + +@keyframes grow { + from { + transform: scale(1); + } + + to { + transform: scale(1.2); + } +} + +.container.shrink { + animation: shrink 3s linear forwards; +} + +@keyframes shrink { + from { + transform: scale(1.2); + } + + to { + transform: scale(1); + } +} diff --git a/middleNodeLL.java b/middleNodeLL.java new file mode 100644 index 00000000..25415def --- /dev/null +++ b/middleNodeLL.java @@ -0,0 +1,55 @@ +import java.io.*; +class LinkedList { + Node head; + + class Node { + int data; + Node next; + Node(int d) + { + data = d; + next = null; + } + } + + void printMiddle() + { + Node slow_ptr = head; + Node fast_ptr = head; + + while (fast_ptr != null && fast_ptr.next != null) { + fast_ptr = fast_ptr.next.next; + slow_ptr = slow_ptr.next; + } + System.out.println("The middle element is [" + + slow_ptr.data + "] \n"); + } + + public void push(int new_data) + { + Node new_node = new Node(new_data); + + new_node.next = head; + + head = new_node; + } + public void printList() + { + Node tnode = head; + while (tnode != null) { + System.out.print(tnode.data + "->"); + tnode = tnode.next; + } + System.out.println("NULL"); + } + + public static void main(String[] args) + { + LinkedList llist = new LinkedList(); + for (int i = 5; i > 0; --i) { + llist.push(i); + llist.printList(); + llist.printMiddle(); + } + } +} diff --git a/mineswepper game.java b/mineswepper game.java new file mode 100644 index 00000000..76c27c04 --- /dev/null +++ b/mineswepper game.java @@ -0,0 +1,143 @@ +import java.util.Random; +import java.util.Scanner; + +public class Minesweeper { + private static final int SIZE = 10; + private static final int MINES = 15; + + private char[][] board; + private boolean[][] mines; + private boolean[][] revealed; + private boolean gameOver; + + public Minesweeper() { + board = new char[SIZE][SIZE]; + mines = new boolean[SIZE][SIZE]; + revealed = new boolean[SIZE][SIZE]; + gameOver = false; + } + + public void initialize() { + // Initialize the board and randomly place mines + for (int i = 0; i < SIZE; i++) { + for (int j = 0; j < SIZE; j++) { + board[i][j] = ' '; + mines[i][j] = false; + revealed[i][j] = false; + } + } + placeMines(); + } + + public void placeMines() { + Random random = new Random(); + int minesPlaced = 0; + + while (minesPlaced < MINES) { + int x = random.nextInt(SIZE); + int y = random.nextInt(SIZE); + + if (!mines[x][y]) { + mines[x][y] = true; + minesPlaced++; + } + } + } + + public void printBoard() { + System.out.println("Minesweeper"); + System.out.print(" "); + for (int i = 0; i < SIZE; i++) { + System.out.print(i + " "); + } + System.out.println(); + + for (int i = 0; i < SIZE; i++) { + System.out.print(i + ": "); + for (int j = 0; j < SIZE; j++) { + char cell = revealed[i][j] ? board[i][j] : ' '; + System.out.print(cell + " "); + } + System.out.println(); + } + } + + public void revealCell(int x, int y) { + if (x < 0 || x >= SIZE || y < 0 || y >= SIZE || revealed[x][y] || gameOver) { + return; + } + + if (mines[x][y]) { + gameOver = true; + return; + } + + revealed[x][y] = true; + int count = countMinesAround(x, y); + if (count > 0) { + board[x][y] = (char) (count + '0'); + } else { + for (int i = -1; i <= 1; i++) { + for (int j = -1; j <= 1; j++) { + revealCell(x + i, y + j); + } + } + } + } + + public int countMinesAround(int x, int y) { + int count = 0; + + for (int i = -1; i <= 1; i++) { + for (int j = -1; j <= 1; j++) { + int nx = x + i; + int ny = y + j; + if (nx >= 0 && nx < SIZE && ny >= 0 && ny < SIZE && mines[nx][ny]) { + count++; + } + } + } + + return count; + } + + public boolean isGameOver() { + return gameOver; + } + + public boolean isGameWon() { + int unrevealedCells = 0; + for (int i = 0; i < SIZE; i++) { + for (int j = 0; j < SIZE; j++) { + if (!revealed[i][j]) { + unrevealedCells++; + } + } + } + return unrevealedCells == MINES; + } + + public static void main(String[] args) { + Minesweeper game = new Minesweeper(); + game.initialize(); + + Scanner scanner = new Scanner(System.in); + + while (!game.isGameOver() && !game.isGameWon()) { + game.printBoard(); + System.out.print("Enter row and column (e.g., '1 2'): "); + int x = scanner.nextInt(); + int y = scanner.nextInt(); + game.revealCell(x, y); + } + + game.printBoard(); + if (game.isGameWon()) { + System.out.println("You won! Congratulations!"); + } else { + System.out.println("Game over! You hit a mine!"); + } + + scanner.close(); + } +} diff --git a/monthDays3524.java b/monthDays3524.java new file mode 100644 index 00000000..5530030f --- /dev/null +++ b/monthDays3524.java @@ -0,0 +1,42 @@ +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.Scanner; + +public class monthDays3524 { + public static void main(String[] args) { + System.out.println("2021503524 - Mugundh J B"); + System.out.println("Date: " + LocalDate.now() + " Time: " + LocalTime.now()); + Scanner scanner = new Scanner(System.in); + + System.out.print("Enter the year: "); + int year = scanner.nextInt(); // Getting the year as input + + while (year < 1000 || year > 9999) { // Checking if the entered year is valid + System.out.printf("Invalid input for the year!\nEnter the year again: "); + year = scanner.nextInt(); // Getting input again if input is invalid + } + System.out.print("Enter the month (1 to 12): "); + int month = scanner.nextInt(); // Getting the month as input + + int daysInMonth = 0; // Variable to store no of days in that month + switch(month){ + case 1: case 3: case 5: case 7: case 8: case 10: case 12: + daysInMonth = 31; + break; + case 4: case 6: case 9: case 11: + daysInMonth = 30; + break; + case 2: + if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) { + daysInMonth = 29; // Leap year + } else { + daysInMonth = 28; // Non-leap year + } + break; + default: + System.out.println("Invalid month!"); + return; + } + System.out.printf("Number of days in %d th month: %d", month, daysInMonth); + } +} diff --git a/mouse1.class b/mouse1.class new file mode 100644 index 00000000..2003563a Binary files /dev/null and b/mouse1.class differ diff --git a/mouse2.class b/mouse2.class new file mode 100644 index 00000000..1006208c Binary files /dev/null and b/mouse2.class differ diff --git a/mouse3.class b/mouse3.class new file mode 100644 index 00000000..5534b3d1 Binary files /dev/null and b/mouse3.class differ diff --git a/mymodel.h5 b/mymodel.h5 new file mode 100644 index 00000000..7cedbef0 Binary files /dev/null and b/mymodel.h5 differ diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 00000000..cd41a1b1 --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1420 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +*** GENERATED FROM project.xml - DO NOT EDIT *** +*** EDIT ../build.xml INSTEAD *** + +For the purpose of easier reading the script +is divided into following sections: + + - initialization + - compilation + - jar + - execution + - debugging + - javadoc + - test compilation + - test execution + - test debugging + - applet + - cleanup + + --> +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="BusTicketBooking-impl"> + <fail message="Please build using Ant 1.8.0 or higher."> + <condition> + <not> + <antversion atleast="1.8.0"/> + </not> + </condition> + </fail> + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> + <!-- + ====================== + INITIALIZATION SECTION + ====================== + --> + <target name="-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init" name="-init-private"> + <property file="nbproject/private/config.properties"/> + <property file="nbproject/private/configs/${config}.properties"/> + <property file="nbproject/private/private.properties"/> + </target> + <target depends="-pre-init,-init-private" name="-init-user"> + <property file="${user.properties.file}"/> + <!-- The two properties below are usually overridden --> + <!-- by the active platform. Just a fallback. --> + <property name="default.javac.source" value="1.6"/> + <property name="default.javac.target" value="1.6"/> + </target> + <target depends="-pre-init,-init-private,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> + <property file="nbproject/project.properties"/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init"> + <property name="platform.java" value="${java.home}/bin/java"/> + <available file="${manifest.file}" property="manifest.available"/> + <condition property="splashscreen.available"> + <and> + <not> + <equals arg1="${application.splash}" arg2="" trim="true"/> + </not> + <available file="${application.splash}"/> + </and> + </condition> + <condition property="main.class.available"> + <and> + <isset property="main.class"/> + <not> + <equals arg1="${main.class}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition property="profile.available"> + <and> + <isset property="javac.profile"/> + <length length="0" string="${javac.profile}" when="greater"/> + <matches pattern="((1\.[89])|9)(\..*)?" string="${javac.source}"/> + </and> + </condition> + <condition property="do.archive"> + <or> + <not> + <istrue value="${jar.archive.disabled}"/> + </not> + <istrue value="${not.archive.disabled}"/> + </or> + </condition> + <condition property="do.mkdist"> + <and> + <isset property="do.archive"/> + <isset property="libs.CopyLibs.classpath"/> + <not> + <istrue value="${mkdist.disabled}"/> + </not> + </and> + </condition> + <condition property="do.archive+manifest.available"> + <and> + <isset property="manifest.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+main.class.available"> + <and> + <isset property="main.class.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+splashscreen.available"> + <and> + <isset property="splashscreen.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+profile.available"> + <and> + <isset property="profile.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="have.tests"> + <or> + <available file="${test.src.dir}"/> + </or> + </condition> + <condition property="have.sources"> + <or> + <available file="${src.dir}"/> + </or> + </condition> + <condition property="netbeans.home+have.tests"> + <and> + <isset property="netbeans.home"/> + <isset property="have.tests"/> + </and> + </condition> + <condition property="no.javadoc.preview"> + <and> + <isset property="javadoc.preview"/> + <isfalse value="${javadoc.preview}"/> + </and> + </condition> + <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> + <property name="javac.compilerargs" value=""/> + <property name="work.dir" value="${basedir}"/> + <condition property="no.deps"> + <and> + <istrue value="${no.dependencies}"/> + </and> + </condition> + <property name="javac.debug" value="true"/> + <property name="javadoc.preview" value="true"/> + <property name="application.args" value=""/> + <property name="source.encoding" value="${file.encoding}"/> + <property name="runtime.encoding" value="${source.encoding}"/> + <property name="manifest.encoding" value="${source.encoding}"/> + <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> + <and> + <isset property="javadoc.encoding"/> + <not> + <equals arg1="${javadoc.encoding}" arg2=""/> + </not> + </and> + </condition> + <property name="javadoc.encoding.used" value="${source.encoding}"/> + <property name="includes" value="**"/> + <property name="excludes" value=""/> + <property name="do.depend" value="false"/> + <condition property="do.depend.true"> + <istrue value="${do.depend}"/> + </condition> + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> + <and> + <isset property="endorsed.classpath"/> + <not> + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> + <isset property="profile.available"/> + </condition> + <condition else="false" property="jdkBug6558476"> + <and> + <matches pattern="1\.[56]" string="${java.specification.version}"/> + <not> + <os family="unix"/> + </not> + </and> + </condition> + <condition else="false" property="javac.fork"> + <or> + <istrue value="${jdkBug6558476}"/> + <istrue value="${javac.external.vm}"/> + </or> + </condition> + <property name="jar.index" value="false"/> + <property name="jar.index.metainf" value="${jar.index}"/> + <property name="copylibs.rebase" value="true"/> + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <property name="java.failonerror" value="true"/> + </target> + <target name="-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> + <fail unless="src.dir">Must set src.dir</fail> + <fail unless="test.src.dir">Must set test.src.dir</fail> + <fail unless="build.dir">Must set build.dir</fail> + <fail unless="dist.dir">Must set dist.dir</fail> + <fail unless="build.classes.dir">Must set build.classes.dir</fail> + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> + <fail unless="dist.jar">Must set dist.jar</fail> + </target> + <target name="-init-macrodef-property"> + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${@{value}}"/> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <mkdir dir="@{apgeneratedsrcdir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <compilerarg value="-processorpath"/> + <compilerarg path="@{processorpath}:${empty.dir}"/> + <compilerarg line="${ap.processors.internal}"/> + <compilerarg line="${annotation.processing.processor.options}"/> + <compilerarg value="-s"/> + <compilerarg path="@{apgeneratedsrcdir}"/> + <compilerarg line="${ap.proc.none.internal}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <sequential> + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </depend> + </sequential> + </macrodef> + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${build.classes.dir}" name="destdir"/> + <sequential> + <fail unless="javac.includes">Must set javac.includes</fail> + <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> + <path> + <filelist dir="@{destdir}" files="${javac.includes}"/> + </path> + <globmapper from="*.java" to="*.class"/> + </pathconvert> + <tempfile deleteonexit="true" property="javac.includesfile.binary"/> + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> + <delete> + <files includesfile="${javac.includesfile.binary}"/> + </delete> + <delete> + <fileset file="${javac.includesfile.binary}"/> + </delete> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target name="-init-test-properties"> + <property name="test.binaryincludes" value="<nothing>"/> + <property name="test.binarytestincludes" value=""/> + <property name="test.binaryexcludes" value=""/> + </target> + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="BusTicketBooking" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch"> + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg value="-ea"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <customize/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit-debug> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename BusTicketBooking -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customize> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customize> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> + <macrodef name="resolve"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${env.@{value}}"/> + </sequential> + </macrodef> + <macrodef name="profile"> + <attribute default="${main.class}" name="classname"/> + <element name="customize" optional="true"/> + <sequential> + <property environment="env"/> + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <arg line="${application.args}"/> + <classpath> + <path path="${run.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> + </target> + <!-- + end of pre NB7.2 profiling section + --> + <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="name"/> + <attribute default="${debug.classpath}" name="classpath"/> + <attribute default="" name="stopclassname"/> + <sequential> + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </nbjpdastart> + </sequential> + </macrodef> + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${build.classes.dir}" name="dir"/> + <sequential> + <nbjpdareload> + <fileset dir="@{dir}" includes="${fix.classes}"> + <include name="${fix.includes}*.class"/> + </fileset> + </nbjpdareload> + </sequential> + </macrodef> + </target> + <target name="-init-debug-args"> + <property name="version-output" value="java version "${ant.java.version}"/> + <condition property="have-jdk-older-than-1.4"> + <or> + <contains string="${version-output}" substring="java version "1.0"/> + <contains string="${version-output}" substring="java version "1.1"/> + <contains string="${version-output}" substring="java version "1.2"/> + <contains string="${version-output}" substring="java version "1.3"/> + </or> + </condition> + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none"> + <istrue value="${have-jdk-older-than-1.4}"/> + </condition> + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> + <os family="windows"/> + </condition> + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> + <isset property="debug.transport"/> + </condition> + </target> + <target depends="-init-debug-args" name="-init-macrodef-debug"> + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${debug.classpath}" name="classpath"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg line="${debug-args-line}"/> + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-java"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="classname"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-copylibs"> + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${manifest.file}" name="manifest"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert pathsep=" " property="jar.classpath"> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + <manifest> + <attribute name="Class-Path" value="${jar.classpath}"/> + <customize/> + </manifest> + </copylibs> + </sequential> + </macrodef> + </target> + <target name="-init-presetdef-jar"> + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8"> + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + </jar> + </presetdef> + </target> + <target name="-init-ap-cmdline-properties"> + <property name="annotation.processing.enabled" value="true"/> + <property name="annotation.processing.processors.list" value=""/> + <property name="annotation.processing.processor.options" value=""/> + <property name="annotation.processing.run.all.processors" value="true"/> + <property name="javac.processorpath" value="${javac.classpath}"/> + <property name="javac.test.processorpath" value="${javac.test.classpath}"/> + <condition property="ap.supported.internal" value="true"> + <not> + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> + </not> + </condition> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> + <isfalse value="${annotation.processing.run.all.processors}"/> + </condition> + <condition else="" property="ap.proc.none.internal" value="-proc:none"> + <isfalse value="${annotation.processing.enabled}"/> + </condition> + </target> + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> + <property name="ap.cmd.line.internal" value=""/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> + <!-- + =================== + COMPILATION SECTION + =================== + --> + <target name="-deps-jar-init" unless="built-jar.properties"> + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> + <delete file="${built-jar.properties}" quiet="true"/> + </target> + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> + <echo level="warn" message="Cycle detected: BusTicketBooking was already built"/> + </target> + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-jar.properties}" verbose="false"/> + <property file="${built-jar.properties}" prefix="already.built.jar."/> + <antcall target="-warn-already-built-jar"/> + <propertyfile file="${built-jar.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> + <target depends="init" name="-check-automatic-build"> + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> + </target> + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> + <antcall target="clean"/> + </target> + <target depends="init,deps-jar" name="-pre-pre-compile"> + <mkdir dir="${build.classes.dir}"/> + </target> + <target name="-pre-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-depend"> + <pathconvert property="build.generated.subdirs"> + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </pathconvert> + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> + <copy todir="${build.classes.dir}"> + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target if="has.persistence.xml" name="-copy-persistence-xml"> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy todir="${build.classes.dir}/META-INF"> + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> + </copy> + </target> + <target name="-post-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> + <target name="-pre-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile/> + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/> + </target> + <target name="-post-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> + <!-- + ==================== + JAR BUILDING SECTION + ==================== + --> + <target depends="init" name="-pre-pre-jar"> + <dirname file="${dist.jar}" property="dist.jar.dir"/> + <mkdir dir="${dist.jar.dir}"/> + </target> + <target name="-pre-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <touch file="${tmp.manifest.file}" verbose="false"/> + </target> + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="Main-Class" value="${main.class}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="Profile" value="${javac.profile}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> + <basename file="${application.splash}" property="splashscreen.basename"/> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> + </manifest> + </target> + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.mkdist" name="-do-jar-copylibs"> + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> + <echo level="info">To run this application from the command line without Ant, try:</echo> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <echo level="info">java -jar "${dist.jar.resolved}"</echo> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> + <j2seproject1:jar manifest="${tmp.manifest.file}"/> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <pathconvert property="run.classpath.with.dist.jar"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> + </pathconvert> + <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java} -cp ${run.classpath.with.dist.jar} ${main.class}"> + <isset property="main.class.available"/> + </condition> + <condition else="debug" property="jar.usage.level" value="info"> + <isset property="main.class.available"/> + </condition> + <echo level="${jar.usage.level}" message="${jar.usage.message}"/> + </target> + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> + <delete> + <fileset file="${tmp.manifest.file}"/> + </delete> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> + <target name="-post-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-jar,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> + <target depends="init,compile,-pre-jar,-do-jar,-post-jar" description="Build JAR." name="jar"/> + <!-- + ================= + EXECUTION SECTION + ================= + --> + <target depends="init,compile" description="Run a main class." name="run"> + <j2seproject1:java> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject1:java> + </target> + <target name="-do-not-recompile"> + <property name="javac.includes.binary" value=""/> + </target> + <target depends="init,compile-single" name="run-single"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}"/> + </target> + <target depends="init,compile-test-single" name="run-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> + </target> + <!-- + ================= + DEBUGGING SECTION + ================= + --> + <target depends="init" if="netbeans.home" name="-debug-start-debugger"> + <j2seproject1:nbjpdastart name="${debug.class}"/> + </target> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> + </target> + <target depends="init,compile" name="-debug-start-debuggee"> + <j2seproject3:debug> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> + <j2seproject1:nbjpdastart stopclassname="${main.class}"/> + </target> + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}"/> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> + <target depends="init" name="-pre-debug-fix"> + <fail unless="fix.includes">Must set fix.includes</fail> + <property name="javac.includes" value="${fix.includes}.java"/> + </target> + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> + <j2seproject1:nbjpdareload/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> + <!-- + ================= + PROFILING SECTION + ================= + --> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile/> + </target> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="${profile.class}"/> + </target> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </profile> + </target> + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + </nbprofiledirect> + <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true"> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <test name="${profile.class}"/> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + </junit> + </target> + <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- + =============== + JAVADOC SECTION + =============== + --> + <target depends="init" if="have.sources" name="-javadoc-build"> + <mkdir dir="${dist.javadoc.dir}"/> + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> + <and> + <isset property="endorsed.classpath.cmd.line.arg"/> + <not> + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> + </not> + </and> + </condition> + <condition else="" property="bug5101868workaround" value="*.java"> + <matches pattern="1\.[56](\..*)?" string="${java.version}"/> + </condition> + <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> + <classpath> + <path path="${javac.classpath}"/> + </classpath> + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/*.java"/> + <exclude name="*.java"/> + </fileset> + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> + </javadoc> + <copy todir="${dist.javadoc.dir}"> + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/doc-files/**"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/doc-files/**"/> + </fileset> + </copy> + </target> + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> + <nbbrowse file="${dist.javadoc.dir}/index.html"/> + </target> + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> + <!-- + ========================= + TEST COMPILATION SECTION + ========================= + --> + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> + <mkdir dir="${build.test.classes.dir}"/> + </target> + <target name="-pre-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-test-depend"> + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + </target> + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> + <target name="-pre-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> + <!-- + ======================= + TEST EXECUTION SECTION + ======================= + --> + <target depends="init" if="have.tests" name="-pre-test-run"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run"> + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/> + </target> + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init" if="have.tests" name="test-report"/> + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> + <target depends="init" if="have.tests" name="-pre-test-run-single"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> + <!-- + ======================= + TEST DEBUGGING SECTION + ======================= + --> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> + <!-- + ========================= + APPLET EXECUTION SECTION + ========================= + --> + <target depends="init,compile-single" name="run-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject1:java classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject1:java> + </target> + <!-- + ========================= + APPLET DEBUGGING SECTION + ========================= + --> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject3:debug classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject3:debug> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> + <!-- + =============== + CLEANUP SECTION + =============== + --> + <target name="-deps-clean-init" unless="built-clean.properties"> + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> + <delete file="${built-clean.properties}" quiet="true"/> + </target> + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> + <echo level="warn" message="Cycle detected: BusTicketBooking was already built"/> + </target> + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-clean.properties}" verbose="false"/> + <property file="${built-clean.properties}" prefix="already.built.clean."/> + <antcall target="-warn-already-built-clean"/> + <propertyfile file="${built-clean.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init" name="-do-clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> + </target> + <target name="-post-clean"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> + <target name="-check-call-dep"> + <property file="${call.built.properties}" prefix="already.built."/> + <condition property="should.call.dep"> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> + </condition> + </target> + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> + <ant antfile="${call.script}" inheritall="false" target="${call.target}"> + <propertyset> + <propertyref prefix="transfer."/> + <mapper from="transfer.*" to="*" type="glob"/> + </propertyset> + </ant> + </target> +</project> diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 00000000..3203955d --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=6b152df2 +build.xml.script.CRC32=d717e09c +build.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=6b152df2 +nbproject/build-impl.xml.script.CRC32=a6c4018d +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties new file mode 100644 index 00000000..e0da6adb --- /dev/null +++ b/nbproject/private/private.properties @@ -0,0 +1,3 @@ +compile.on.save=true +file.reference.jcalendar-1.4.jar=C:\\Users\\Ritesh\\Downloads\\Compressed\\jcalendar-1.4.jar +user.properties.file=C:\\Users\\jude\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 00000000..95bedc36 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> + <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> + <group> + <file>file:/C:/Users/jude/Desktop/Bus%20Ticket%20Fair%20Calculator/src/ticketbooking/BusTicketing.java</file> + </group> + </open-files> +</project-private> diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 00000000..d6028f24 --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,81 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/BusTicketBooking.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +file.reference.DateChooser.jar=DateChooser.jar +file.reference.jcalendar-1.4.jar=C:\\Users\\janhavi\\Downloads\\jcalendar-1.4.jar +file.reference.jcalendar-1.4.jar-1=jcalendar-1.4.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.jcalendar-1.4.jar}:\ + ${libs.MySQLDriver.classpath}:\ + ${file.reference.DateChooser.jar}:\ + ${file.reference.jcalendar-1.4.jar-1} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=ticketbooking.BusTicketing +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 00000000..0223b8a3 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.java.j2seproject</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> + <name>BusTicketBooking</name> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> + </data> + </configuration> +</project> diff --git a/note_bg.gif b/note_bg.gif new file mode 100644 index 00000000..3483edee Binary files /dev/null and b/note_bg.gif differ diff --git a/notes keeping app.java b/notes keeping app.java new file mode 100644 index 00000000..548186ce --- /dev/null +++ b/notes keeping app.java @@ -0,0 +1,88 @@ +import java.io.*; +import java.util.ArrayList; +import java.util.Scanner; + +class Note { + private String title; + private String content; + + public Note(String title, String content) { + this.title = title; + this.content = content; + } + + // Getters and setters for note details +} + +public class NotesApp { + private static ArrayList<Note> notes = new ArrayList<>(); + private static final String FILENAME = "notes.txt"; // File to save notes + private static Scanner scanner = new Scanner(System.in); + + public static void main(String[] args) { + loadNotes(); // Load saved notes from the file + + while (true) { + displayMenu(); + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume newline character + + switch (choice) { + case 1: + createNote(); + break; + case 2: + viewNotes(); + break; + case 3: + editNote(); + break; + case 4: + deleteNote(); + break; + case 5: + saveNotes(); // Save notes to the file + System.out.println("Goodbye!"); + System.exit(0); + default: + System.out.println("Invalid choice. Please try again."); + } + } + } + + // Implement methods for creating, viewing, editing, and deleting notes + + private static void displayMenu() { + System.out.println("\nNotes Keeping App"); + System.out.println("1. Create a new note"); + System.out.println("2. View saved notes"); + System.out.println("3. Edit a note"); + System.out.println("4. Delete a note"); + System.out.println("5. Exit"); + System.out.print("Enter your choice: "); + } + + private static void loadNotes() { + try (BufferedReader reader = new BufferedReader(new FileReader(FILENAME))) { + String line; + while ((line = reader.readLine()) != null) { + String[] parts = line.split("\\|"); + if (parts.length == 2) { + notes.add(new Note(parts[0], parts[1])); + } + } + } catch (IOException e) { + // Handle file loading errors, or create the file if it doesn't exist + } + } + + private static void saveNotes() { + try (PrintWriter writer = new PrintWriter(new FileWriter(FILENAME))) { + for (Note note : notes) { + writer.println(note.getTitle() + "|" + note.getContent()); + } + } catch (IOException e) { + e.printStackTrace(); + } + } +} diff --git a/number.py b/number.py new file mode 100644 index 00000000..37aa99c2 --- /dev/null +++ b/number.py @@ -0,0 +1,108 @@ + +import random +import string + +def generate_password(length=12, include_digits=True, include_special_chars=True): + characters = string.ascii_letters + if include_digits: + characters += string.digits + if include_special_chars: + characters += string.punctuation + + password = ''.join(random.choice(characters) for _ in range(length)) + return password + +if __name__ == "__main__": + password_length = 16 + use_digits = True + use_special_chars = True + + password = generate_password(password_length, use_digits, use_special_chars) + print(f"Random Password: {password}") + +def generaword(length=12, include_digits=True, include_special_chars=True): + characters = string.ascii_letters + if include_digits: + characters += string.digits + if include_special_chars: + characters += string.punctuation + + password = ''.join(random.choice(characters) for _ in range(length)) + return password + +if __name__ == "__main__": + password_length = 16 + use_digits = True + use_special_chars = True + + password = generate_password(password_length, use_digits, use_special_chars) + print(f"Random Password: {password}") + +def generate(length=12, include_digits=True, include_special_chars=True): + characters = string.ascii_letters + if include_digits: + characters += string.digits + if include_special_chars: + characters += string.punctuation + + password = ''.join(random.choice(characters) for _ in range(length)) + return password + +if __name__ == "__main__": + password_length = 16 + use_digits = True + use_special_chars = True + + password = generate_password(password_length, use_digits, use_special_chars) + print(f"Random Password: {password}") +def generate_password(length=12, include_digits=True, include_special_chars=True): + characters = string.ascii_letters + if include_digits: + characters += string.digits + if include_special_chars: + characters += string.punctuation + + password = ''.join(random.choice(characters) for _ in range(length)) + return password + +if __name__ == "__main__": + password_length = 16 + use_digits = True + use_special_chars = True + + password = generate_password(password_length, use_digits, use_special_chars) + print(f"Random Password: {password}") +def genssword(length=12, include_digits=True, include_special_chars=True): + characters = string.ascii_letters + if include_digits: + characters += string.digits + if include_special_chars: + characters += string.punctuation + + password = ''.join(random.choice(characters) for _ in range(length)) + return password + +if __name__ == "__main__": + password_length = 16 + use_digits = True + use_special_chars = True + + password = generate_password(password_length, use_digits, use_special_chars) + print(f"Random Password: {password}") +def gepassword(length=12, include_digits=True, include_special_chars=True): + characters = string.ascii_letters + if include_digits: + characters += string.digits + if include_special_chars: + characters += string.punctuation + + password = ''.join(random.choice(characters) for _ in range(length)) + return password + +if __name__ == "__main__": + password_length = 16 + use_digits = True + use_special_chars = True + + password = generate_password(password_length, use_digits, use_special_chars) + print(f"Random Password: {password}") diff --git a/numberGuess.java b/numberGuess.java new file mode 100644 index 00000000..8da3531c --- /dev/null +++ b/numberGuess.java @@ -0,0 +1,40 @@ +import java.util.*; +import java.lang.Math.*; + +import javax.swing.*; + +public class numberGuess { + public static void main(String[] args) { + int computerNumber = (int) (Math.random()*100 + 1); + int userAnswer = 0; + System.out.println("The correct guess would be " + computerNumber); + int count = 1; + + while (userAnswer != computerNumber) + { + String response = JOptionPane.showInputDialog(null, + "Enter a guess between 1 and 100", "Guessing Game", 3); + userAnswer = Integer.parseInt(response); + JOptionPane.showMessageDialog(null, ""+ determineGuess(userAnswer, computerNumber, count)); + count++; + } + } + + public static String determineGuess(int userAnswer, int computerNumber, int count){ + if (userAnswer <=0 || userAnswer >100) { + return "Your guess is invalid"; + } + else if (userAnswer == computerNumber ){ + return "Correct!\nTotal Guesses: " + count; + } + else if (userAnswer > computerNumber) { + return "Your guess is too high, try again.\nTry Number: " + count; + } + else if (userAnswer < computerNumber) { + return "Your guess is too low, try again.\nTry Number: " + count; + } + else { + return "Your guess is incorrect\nTry Number: " + count; + } + } +} \ No newline at end of file diff --git a/numberGuessingGame.java b/numberGuessingGame.java new file mode 100644 index 00000000..ee003f70 --- /dev/null +++ b/numberGuessingGame.java @@ -0,0 +1,21 @@ +import java.util.*; +import java.lang.Math.*; + +class NumberGuessingGame{ + public static void main(String args[]){ + Scanner scan = new Scanner(System.in); + var random = new Random(); + int randNum = (random.nextInt(100))+1; + int guess,guessCount=0; + do{ + System.out.println("Guess the number: "); + guess = scan.nextInt(); + if(guess==randNum){ + System.out.println("Your guess is correct!\nYour score is "+(100-guessCount)); + } + else + System.out.println(guess>randNum?"Smaller Number ":"Larger Number " + "Try again!"); + guessCount++; + }while(guess!=randNum); + } +} diff --git a/numberpattern.java b/numberpattern.java new file mode 100644 index 00000000..49fdc895 --- /dev/null +++ b/numberpattern.java @@ -0,0 +1,31 @@ +// Java Program to print pattern +// Number triangle pattern +import java.util.*; + +public class GeeksForGeeks { + // Function to demonstrate pattern + public static void printPattern(int n) + { + int i, j; + // outer loop to handle number of rows + for (i = 1; i <= n; i++) { + // inner loop to print space + for (j = 1; j <= n - i; j++) { + System.out.print(" "); + } + // inner loop to print star + for (j = 1; j <= i; j++) { + System.out.print(i + " "); + } + // print new line for each row + System.out.println(); + } + } + + // Driver Function + public static void main(String args[]) + { + int n = 6; + printPattern(n); + } +} diff --git a/online exam/WebContent/META-INF/MANIFEST.MF b/online exam/WebContent/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/online exam/WebContent/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/online exam/WebContent/WEB-INF/web.xml b/online exam/WebContent/WEB-INF/web.xml new file mode 100644 index 00000000..ca58ed98 --- /dev/null +++ b/online exam/WebContent/WEB-INF/web.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> + <display-name> + online exam</display-name> + <servlet> + <description> + </description> + <display-name> + registration</display-name> + <servlet-name>registration</servlet-name> + <servlet-class> + registration</servlet-class> + </servlet> + <servlet> + <description> + </description> + <display-name> + asd</display-name> + <servlet-name>asd</servlet-name> + <servlet-class> + asd</servlet-class> + </servlet> + <servlet-mapping> + <servlet-name>registration</servlet-name> + <url-pattern>/registration</url-pattern> + </servlet-mapping> + <servlet-mapping> + <servlet-name>asd</servlet-name> + <url-pattern>/asd</url-pattern> + </servlet-mapping> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + <welcome-file>default.html</welcome-file> + <welcome-file>default.htm</welcome-file> + <welcome-file>default.jsp</welcome-file> + </welcome-file-list> +</web-app> diff --git a/online exam/WebContent/adminlogin.jsp b/online exam/WebContent/adminlogin.jsp new file mode 100644 index 00000000..e3ae895c --- /dev/null +++ b/online exam/WebContent/adminlogin.jsp @@ -0,0 +1,59 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body background="F:\wallies\HD Wallpapers\img36.jpg"> +<form name="f1" method="post"> +<CENTER> +<BR><BR><BR><BR><BR> +<table cellpadding=8 cellspacing=8 border="10" bgcolor="transparent"> +<th bgcolor="transparent" colspan=2> +<font face="Times New Roman" color=LIGHTgrey size=5 >ADMINISTRATOR LOGIN</FONT><BR></th> + +<tr bgcolor="transparent"> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b> USER_ID </b> +</font> +<input type="text" name="t1" value="" size=20 maxlength=20></td> +</tr> + +<tr bgcolor="transparent"> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b>PASSWORD</b> +</font> +<input type="password" name="t2" value="" size=20 maxlength=20></td> +</tr> + +<tr bgcolor="transparent"> +<td valign=top> +<input type="button" name="b1" value=" LOGIN " onclick="location.href='adminupdate.jsp'"> +<input type="button" value=" EXIT " onclick="location.href='page1.jsp'"> +</tr> + + +</TABLE> +</CENTER> + +<% +String user=request.getParameter("t1"); +String pass=request.getParameter("t2"); + + + if(user=="anil" && pass=="yadav") + { + %> + <jsp:forward page="adminupdate.jsp" /> + <% } + + + +%> +</form> +</body> +</html> \ No newline at end of file diff --git a/online exam/WebContent/adminupdate.jsp b/online exam/WebContent/adminupdate.jsp new file mode 100644 index 00000000..9747f01c --- /dev/null +++ b/online exam/WebContent/adminupdate.jsp @@ -0,0 +1,24 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body background="F:\wallies\HD Wallpapers\img36.jpg"> +<br><br><br><br> +<center> +<table cellpadding=8 cellspacing=8 border="10" bgcolor="transparent"> +<th bgcolor="transparent" colspan=2> +<font face="Times New Roman" color=LIGHTGREY size=5>WHAT DO YOU WANT TO UPDATE</FONT><BR></th> + +<tr bgcolor="transparent"> +<td valign=top> +<input type="button" value="STUDENT INFO" onclick="location.href='studentregistration.jsp'" ><br><BR> +<input type="button" value=" QUESTIONS " onclick="location.href='question.jsp'"><br><BR> +<input type="button" value="INSTRUCTIONS" onclick="location.href='.jsp'" ><br><BR> +<input type="button" value=" SETTINGS " onclick="location.href='.jsp'" ><br><BR> +<input type="button" value=" EXIT " onclick="location.href='page1.jsp'"> +</body> +</html> \ No newline at end of file diff --git a/online exam/WebContent/aitlogo2.gif b/online exam/WebContent/aitlogo2.gif new file mode 100644 index 00000000..5a49bb1b Binary files /dev/null and b/online exam/WebContent/aitlogo2.gif differ diff --git a/online exam/WebContent/exam1.jsp b/online exam/WebContent/exam1.jsp new file mode 100644 index 00000000..e8bf4c12 --- /dev/null +++ b/online exam/WebContent/exam1.jsp @@ -0,0 +1,100 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body background="F:\wallies\HD Wallpapers\img36.jpg"> + + + + <!-- <script language="javascript"> + var dminute=0,dsecond=10; + function delay() + { + + + document.write("TIME LEFT - " + dminute +":" + dsecond); + if (dminute==0 && dsecond ==0) + {alert( "TIME IS OVER"); + location = "page1.jsp"; + } + if (dsecond==0) + { + dminute = dminute - 1; + dsecond = 60; + } + dsecond = dsecond - 1; + } +window.onload = function() +{ + while(dminute!=-1 && dsecond!=0) + { + setTimeout(delay,1000); + } + } +</script> --> + +<font size=5 face="Times New Roman" color=LIGHTgrey> + +<% +try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); + ResultSet rs=st.executeQuery("select * from question"); + + + rs.next(); + + + + out.println( "<h1> Author :-</h>" + rs.getString(4) ); + out.println( "<br><br>"+rs.getString(1) ); + out.println( rs.getString(2) ); + out.println("<br><br> <input type='radio' name='o1'> " + rs.getString(5) ); + out.println(" <br><br><input type='radio' name='o1'> " + rs.getString(6) ); + out.println(" <br><br><input type='radio' name='o1'> " + rs.getString(7) ); + out.println(" <br><br><input type='radio' name='o1'>" + rs.getString(8) ); + + + + + + + + + + + } +catch(Exception e) +{ + out.println(e); +} + +%> +<script language="JAVASCRIPT"> +function getDet() +{ + + rs.next(); + out.println( "<h1> Author :-</h>" + rs.getString(4) ); + out.println( "<br><br>"+rs.getString(1) ); + out.println( rs.getString(2) ); + out.println("<br><br> <input type='radio' name='o1'> " + rs.getString(5) ); + out.println(" <br><br><input type='radio' name='o1'> " + rs.getString(6) ); + out.println(" <br><br><input type='radio' name='o1'> " + rs.getString(7) ); + out.println(" <br><br><input type='radio' name='o1'>" + rs.getString(8) ); +} + +</script> + + +<br><br><br><input type="BUTTON" value="NEXT" onclick="getDet()"> + +</font> +</body> +</html> diff --git a/online exam/WebContent/img36.jpg b/online exam/WebContent/img36.jpg new file mode 100644 index 00000000..74831877 Binary files /dev/null and b/online exam/WebContent/img36.jpg differ diff --git a/online exam/WebContent/instructions.jsp b/online exam/WebContent/instructions.jsp new file mode 100644 index 00000000..1954ced1 --- /dev/null +++ b/online exam/WebContent/instructions.jsp @@ -0,0 +1,52 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body background="F:\wallies\HD Wallpapers\img36.jpg"> + + + +<font face="Times New Roman" color=LIGHTYELLOW size=5 > +<TABLE border=10 align=center> +<th bgcolor="transparent" colspan=2> +<font size=10 face="Times New Roman" color=LIGHTgrey>INSTRUCTIONS </font> +<br> +</th> + + +<% + + + try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(); + ResultSet rs=st.executeQuery("select inst from rule"); + while(rs.next()) + { + %> +<tr><td> +<% + out.println( rs.getString (1)); +%> +</tr> + <% + } +}catch(Exception e1) +{} + + +%> + +</TABLE> +</font> +<center> +<input type="button" value="START" onclick="location.href='exam.jsp'"><br><BR> +</center> +</body> +</html> \ No newline at end of file diff --git a/online exam/WebContent/page1.jsp b/online exam/WebContent/page1.jsp new file mode 100644 index 00000000..aaac34e0 --- /dev/null +++ b/online exam/WebContent/page1.jsp @@ -0,0 +1,32 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body background="D:\workspace\images\img36.jpg"> + +<center> +<table cellpadding=8 cellspacing=8 border="10" bgcolor="transparent"> +<th bgcolor="transparent" colspan=2> +<IMG style="WIDTH: 120px; HEIGHT: 90px" height=90 src="C:\Users\anil\Desktop/aitlogo2.gif" width=115 > <BR> +<font face="Times New Roman" color=white size=15 >ARMY INSTITUTE OF TECHNOLOGY</FONT><BR></th> + +<tr bgcolor="transparent"> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +DEPARTMENT OF INFORMATION TECHNOLOGY<BR><BR></font> +<font face="Times New Roman" color=LIGHTYELLOW size=5> +<MARQUEE direction=left WIDTH=100% BEHAVIOR=SCROLL BGColor=TRANSPARENT >ONLINE EXAMINATION</MARQUEE><BR><BR> +<input type="button" value=" STUDENT LOGIN " onclick="location.href='studlog.jsp'" ><br><BR> +<input type="button" value="ADMINISTRATOR LOGIN" onclick="location.href='adminlogin.jsp'"><br><BR> +<input type="button" value=" CLOSE " onclick="window.close()"><br><BR> +</font> +</tr> + + + +</body> +</html> \ No newline at end of file diff --git a/online exam/WebContent/question.jsp b/online exam/WebContent/question.jsp new file mode 100644 index 00000000..b09c907b --- /dev/null +++ b/online exam/WebContent/question.jsp @@ -0,0 +1,203 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"import="java.sql.*" %> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body background="F:\wallies\HD Wallpapers\img36.jpg"> +<form action="question.jsp" method=post> +<center> +<table cellpadding=8 cellspacing=8 border="10" bgcolor="transparent"> +<BR><BR><BR><BR> +<th bgcolor="transparent" colspan=2> +<font size=10 face="Times New Roman" color=LIGHTgrey>QUESTION BANK</font> +<br> +</th> + +<tr bgcolor="transparent"> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b>Q.NO.</b> +</font> +<input type="text" name="t1" value="" id="txt1" size=3 maxlength=3></td> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b>AUTHOR</b> +</font> +<input type="text" name="t2" value="" size=30 maxlength=30></td> +</tr> + +<tr bgcolor="transparent"> +<td align=center colspan=2> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b>QUESTION</b> +</font> +<br><TEXTAREA name="t3" rows=5 cols=100 Wrap=true> </TEXTAREA></td> +</tr> +<tr bgcolor="transparent"> +<td align=center colspan=2> +<input type='radio' name='o1'>1 +<input type="text" name="t4" value="" size=40 maxlength=40><br> +<input type='radio' name='o1'>2 +<input type="text" name="t5" value="" size=40 maxlength=40><br> +<input type='radio' name='o1'>3 +<input type="text" name="t6" value="" size=40 maxlength=40><br> +<input type='radio' name='o1'>4 +<input type="text" name="t7" value="" size=40 maxlength=40> +</td> +</tr> + +<tr bgcolor="transparent"> +<td align=center colspan=2> +<input type="SUBMIT" value="SUBMIT"> + + +<% +String qid=request.getParameter("t1"); +String author=request.getParameter("t2"); +String quest=request.getParameter("t3"); +String op1=request.getParameter("t4"); +String op2=request.getParameter("t5"); +String op3=request.getParameter("t6"); +String op4=request.getParameter("t7"); +String ans=request.getParameter("o1"); +if(!(qid==" " && author==" " && quest==" " && op1== " "&& op2== " "&& op3== " "&& op4== " "&& ans== " ")) +{ + + + try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(); + + st.executeQuery("insert into question values("+qid+",'"+quest+"',"+ans+",'"+author+"','"+op1+"','"+op2+"','"+op3+"','"+op4+"')"); + + + out.println ("Insert Successful"); + +}catch(Exception e1) +{ + out.println(e1); +} +} +%> +<input type="button" value="SEARCH" > + +<% +if(!( qid==" " )) +{ + + + try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(); + ResultSet rs=st.executeQuery("select * from question"); + while(rs.next()) + { + String username=rs.getString(1); + if(qid.equals(username) ) + { + + //setElementById("txt1")=rs.getString(2); + } + + + } + if(rs.isLast()==true) + { + out.println("Login Failed,Please try Again"); + } + +}catch(Exception e1) +{ +} +} + +%> +<input type="SUBMIT" value="DELETE" > +<% +qid=request.getParameter("t2"); +if(!(qid==" ")) +{ + + + try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(); + String query="delete from question where q_id="+qid; + st.executeUpdate(query); + +}catch(Exception e1) +{ +} +} +%> + + + +<input type="SUBMIT" value="UPDATE"> +<% +qid=request.getParameter("t1"); +author=request.getParameter("t2"); +quest=request.getParameter("t3"); + op1=request.getParameter("t4"); + op2=request.getParameter("t5"); + op3=request.getParameter("t6"); + op4=request.getParameter("t7"); + ans=request.getParameter("o1"); + + if(!(qid==" " && author==" " && quest==" " && op1== " "&& op2== " "&& op3== " "&& op4== " "&& ans== " ")) +{ + + + try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(); + String query="update question set q_id="+qid+",ques='"+quest+"',ans="+ans+",author='"+author+"',op1='"+op1+"',op2='"+op2+"',op3='"+op3+"',op4='"+op4+"'where q_id="+qid; + st.executeUpdate(query); + +}catch(Exception e1) +{ +} +} +%> + +<input type="button" value=" EXIT " onclick="location.href='page1.jsp'"> +</td> +</tr> + +</table> +</center> + </form> +</body> +</html> + + + + + + + + + + + + + + + + + + + + + diff --git a/online exam/WebContent/registration.jsp b/online exam/WebContent/registration.jsp new file mode 100644 index 00000000..4956d7ea --- /dev/null +++ b/online exam/WebContent/registration.jsp @@ -0,0 +1,12 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<title>Insert title here</title> +</head> +<body> + +</body> +</html> \ No newline at end of file diff --git a/online exam/WebContent/studentregistration.jsp b/online exam/WebContent/studentregistration.jsp new file mode 100644 index 00000000..cee3f919 --- /dev/null +++ b/online exam/WebContent/studentregistration.jsp @@ -0,0 +1,167 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1" import="java.sql.*"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> + +<html> +<body background="F:\wallies\HD Wallpapers\img36.jpg"> +<form action="studentregistration.jsp" method=post> +<center> +<table cellpadding=8 cellspacing=8 border="10" bgcolor="transparent"> +<BR><BR><BR><BR> +<th bgcolor="transparent" colspan=2> +<font size=10 face="Times New Roman" color=LIGHTgrey>STUDENT REGISTRATION </font> +<br> +</th> + +<tr bgcolor="transparent"> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b>NAME</b> +</font> +<input type="text" name="t1" value="" id="txt1" size=20 maxlength=20></td> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b>STUDENT_ID</b> +</font> +<input type="text" name="t2" value="" size=20 maxlength=20></td> +</tr> + +<tr bgcolor="transparent"> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b>CONTACT NO.</b> +</font> +<input type="text" name="t3" value="" size=20 maxlength=10></td> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b>PASSWORD</b> +</font> +<input type="text" name="t4" value="" size=20 maxlength=20></td> + + +<tr bgcolor="transparent"> +<td align=center colspan=2> +<input type="SUBMIT" value="SUBMIT"> + + +<% +String name=request.getParameter("t1"); +String id=request.getParameter("t2"); +String phone=request.getParameter("t3"); +String pwd=request.getParameter("t4"); + +if(!(name==" " && id==" " && phone==" " && pwd== " ")) +{ + + + try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(); + st.executeQuery("insert into student values("+id+",'"+name+"',"+phone+",'"+pwd+"')"); + out.println ("Insert Successful"); + +}catch(Exception e1) +{ +} +} +%> +<input type="submit" value="SEARCH" > + +<% +if(!( id==" " )) +{ + + + try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(); + ResultSet rs=st.executeQuery("select * from student"); + while(rs.next()) + { + String username=rs.getString(1); + + + + + if(id.equals(username) ) + { + %> + + <input type="text" name="t3" value="<%= username %>" size=20 maxlength=20></td> + <% + } + + + } + if(rs.isLast()==true) + { + out.println("Login Failed,Please try Again"); + } + +}catch(Exception e1) +{ +} +} + +%> +<input type="SUBMIT" value="DELETE" > +<% +id=request.getParameter("t2"); +if(!(id==" ")) +{ + + + try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(); + String query="delete from student where stud_id="+id; + st.executeUpdate(query); + +}catch(Exception e1) +{ +} +} +%> + + + +<input type="SUBMIT" value="UPDATE"> +<% +name=request.getParameter("t1"); +id=request.getParameter("t2"); +phone=request.getParameter("t3"); +pwd=request.getParameter("t4"); + +if(!(name==" " && id==" " && phone==" " && pwd== " ")) +{ + + + try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(); + String query="update student set stud_id="+id+",stud_name='"+name+"',phone="+phone+",pwd='"+pwd+"'where stud_id="+id; + st.executeUpdate(query); + +}catch(Exception e1) +{ +} +} +%> + +<input type="button" value=" EXIT " onclick="location.href='page1.jsp'"> + +</tr> + +</table> +</center> + </form> +</body> +</html> diff --git a/online exam/WebContent/studlog.jsp b/online exam/WebContent/studlog.jsp new file mode 100644 index 00000000..dfbe0fd1 --- /dev/null +++ b/online exam/WebContent/studlog.jsp @@ -0,0 +1,74 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> + + +<%@ page language ="java" import="java.sql.*" %> +<html> +<body background="F:\wallies\HD Wallpapers\img36.jpg"> +<form name="f1" method="post"> +<CENTER> +<BR><BR><BR><BR><BR> +<table cellpadding=8 cellspacing=8 border="10" bgcolor="transparent"> +<th bgcolor="transparent" colspan=2> +<font face="Times New Roman" color=LIGHTgrey size=10 >STUDENT LOGIN</FONT><BR></th> + +<tr bgcolor="transparent"> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b>USER_ID</b> +</font> +<input type="text" name="t1" value="" size=20 maxlength=20></td> +</tr> + +<tr bgcolor="transparent"> +<td valign=top> +<font size=5 face="Times New Roman" color=LIGHTYELLOW> +<b>PASSWORD</b> +</font> +<input type="password" name="t2" value="" size=20 maxlength=20></td> +</tr> + +<tr bgcolor="transparent"> +<td valign=top> +<input type="submit" name="b1" value="LOGIN"> +<input type="button" value="EXIT" onclick="location.href='page1.jsp'"> +</tr> + + +</TABLE> +</CENTER> + +<% +String user=request.getParameter("t1"); +String pass=request.getParameter("t2"); + + try{ + + Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); + Connection con=DriverManager.getConnection("jdbc:odbc:abc", "scott", "tiger"); + Statement st=con.createStatement(); + ResultSet rs=st.executeQuery("select stud_id,pwd from student"); + while(rs.next()) + { + String username=rs.getString(1); + String password=rs.getString(2); + if(user.equals(username) && pass.equals(password)) + { + %> + <jsp:forward page="instructions.jsp" /> + <% } + + + } + if(rs.isLast()==true) + { + out.println("Login Failed,Please try Again"); + } +}catch(Exception e1) +{} + +%> + +</body> +</html> \ No newline at end of file diff --git a/online exam/sample.class b/online exam/sample.class new file mode 100644 index 00000000..83487aa6 Binary files /dev/null and b/online exam/sample.class differ diff --git a/online exam/sample.java b/online exam/sample.java new file mode 100644 index 00000000..96747097 --- /dev/null +++ b/online exam/sample.java @@ -0,0 +1,109 @@ +import java.awt.*; +import java.awt.event.*; +import java.sql.*; + +public class sample extends Frame implements WindowListener,ActionListener +{ +public void windowActivated(WindowEvent e) { } +public void windowDeactivated(WindowEvent e) { } +public void windowIconified(WindowEvent e) { } +public void windowDeiconified(WindowEvent e) { } +public void windowClosing(WindowEvent e) { System.exit(0); } +public void windowClosed(WindowEvent e) { } +public void windowOpened(WindowEvent e) { } +TextArea t1; +Checkbox c1,c2,c3; +CheckboxGroup g; +Button b1,b2; +Connection c; +Statement s; +ResultSet rs; +int i=0; +int marks=0; +int j=0; + +public static void main(String args[]) throws Exception +{ +sample s= new sample(); // Create a new frame + + + +} +public void actionPerformed(ActionEvent ae) +{ +if(ae.getSource()== b2) // Start +{ +try{ +rs.next(); +t1.setText(rs.getString(1)); +c1.setLabel(rs.getString(2)); +c2.setLabel(rs.getString(3)); +c3.setLabel(rs.getString(4)); +}catch(Exception e) { System.out.println(e); } +} +if(ae.getSource()== b1) // Submit +{ +try{ +t1.setText(rs.getString(1)); +c1.setLabel(rs.getString(2)); +c2.setLabel(rs.getString(3)); +c3.setLabel(rs.getString(4)); +if(c1.getState()==true) j=1; +if(c2.getState()==true) j=2; +if(c3.getState()==true) j=3; +String ans=rs.getString(5); +int k=Integer.parseInt(ans); +if(j==k) +marks=marks+2; +else +marks=marks-1; +System.out.println("ANS IS " + k); +System.out.println("J IS " + j); +System.out.println(marks); +rs.next(); +}catch(Exception e) { System.out.println(e); } + + + + +} + + +} +sample() +{ +try{ +Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); +c= DriverManager.getConnection( "jdbc:odbc:abc","root","root"); +s=c.createStatement(); +rs= s.executeQuery("select * from exam"); +}catch(Exception e) { System.out.println(e); } +b1= new Button("Submit"); +b2= new Button("Start"); +b1.addActionListener(this); +b2.addActionListener(this); +t1= new TextArea(100,100); +g= new CheckboxGroup(); +c1= new Checkbox("Option1",g, true); +c2= new Checkbox("Option2",g, false); +c3= new Checkbox("Option3",g, false); +add(t1); +add(c1); +add(c2); +add(c3); +add(b1); +add(b2); + +setLayout( new GridLayout(4,4)); +addWindowListener(this); +setVisible(true); +setSize(400,400); +setLocation(0,0); +} + + + +} + + + \ No newline at end of file diff --git a/orderBook b/orderBook new file mode 160000 index 00000000..1e5ed09f --- /dev/null +++ b/orderBook @@ -0,0 +1 @@ +Subproject commit 1e5ed09f70b085b47e64eb25ec32a4f3267be627 diff --git a/painting.java b/painting.java new file mode 100644 index 00000000..cbed191b --- /dev/null +++ b/painting.java @@ -0,0 +1,18 @@ +import java.awt.*; +import java.awt.event.*; +import java.applet.*; +public class MouseDrag extends Applet implements MouseMotionListener{ + +public void init(){ +addMouseMotionListener(this); +setBackground(Color.red); +} + +public void mouseDragged(MouseEvent me){ +Graphics g=getGraphics(); +g.setColor(Color.white); +g.fillOval(me.getX(),me.getY(),5,5); +} +public void mouseMoved(MouseEvent me){} + +} diff --git a/passcode.java b/passcode.java new file mode 100644 index 00000000..c0ae01a7 --- /dev/null +++ b/passcode.java @@ -0,0 +1,28 @@ +import java.security.SecureRandom; + +public class PasswordGenerator { + + private static final String UPPERCASE = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + private static final String LOWERCASE = "abcdefghijklmnopqrstuvwxyz"; + private static final String DIGITS = "0123456789"; + private static final String SPECIAL_CHARACTERS = "!@#$%^&*()-_+=<>?"; + + public static String generatePassword(int length) { + String validCharacters = UPPERCASE + LOWERCASE + DIGITS + SPECIAL_CHARACTERS; + SecureRandom random = new SecureRandom(); + + StringBuilder password = new StringBuilder(length); + for (int i = 0; i < length; i++) { + int randomIndex = random.nextInt(validCharacters.length()); + password.append(validCharacters.charAt(randomIndex)); + } + + return password.toString(); + } + + public static void main(String[] args) { + int passwordLength = 12; // Adjust the length as per your requirement + String generatedPassword = generatePassword(passwordLength); + System.out.println("Generated Password: " + generatedPassword); + } +} diff --git a/passowrd¬es.java b/passowrd¬es.java new file mode 100644 index 00000000..9c8933d6 --- /dev/null +++ b/passowrd¬es.java @@ -0,0 +1,698 @@ +import java.awt.*; +import javax.swing.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.security.SecureRandom; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.security.spec.AlgorithmParameterSpec; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.KeySpec; +import java.util.Base64; +import javax.crypto.*; +import javax.crypto.spec.PBEKeySpec; +import javax.crypto.spec.PBEParameterSpec; + + +// This class is used to create a loading screen +class SplashScreen { + JFrame frame; + JLabel image=new JLabel(new ImageIcon("key-lock.png")); + JLabel text=new JLabel("PASSWORD & NOTES MANAGER"); + JProgressBar progressBar=new JProgressBar(); + JLabel message=new JLabel(); + SplashScreen() + { + createGUI(); + addImage(); + addText(); + addProgressBar(); + runningPBar(); + } + + public void createGUI(){ + frame=new JFrame(); // to create a frame + frame.getContentPane().setLayout(null); // to set the layout of the frame + frame.setUndecorated(true); + frame.setSize(400,400); // to set the size of the frame + frame.setLocationRelativeTo(null); + frame.getContentPane().setBackground(new Color(0XFF8787)); // to set the background color of the frame + frame.setVisible(true); + } + + public void addImage(){ + image.setSize(400,200); // to set the size of the image + frame.add(image); + } + + public void addText() + { + text.setFont(new Font("MV Boli",Font.BOLD,20)); // to set the font of the text + text.setBounds(30,200,400,30); + text.setForeground(Color.black); + frame.add(text); + } + + public void addProgressBar(){ + progressBar.setBounds(100,280,200,30); // to set the size of the progress bar + progressBar.setBorderPainted(true); + progressBar.setStringPainted(true); + progressBar.setBackground(Color.black); + progressBar.setForeground(new Color(0X38E54D)); + progressBar.setValue(0); + frame.add(progressBar); + } + public void runningPBar(){ + int i=0;//Creating an integer variable and initializing it to 0 + while( i<=100) + { + try{ + Thread.sleep(40); //Pausing execution for 50 milliseconds + progressBar.setValue(i); //Setting value of Progress Bar + i++; + if(i==100) + frame.dispose(); + }catch(Exception e){ + e.printStackTrace(); + } + } + } +} + +//Linear Probing Implementation +class HashtablePassword implements hashTableMap { + private final int useProbe; //0 = Linear Probing, 1 = Quadratic Probing + private Entry[] entries; //The array of entries + private final float loadFactor; //The load factor + private int size, used; //used acquires space for NIL + private final Entry NIL = new Entry(null, null); //Deleted entries + + private static class Entry{ + Object key, value; + Entry(Object k, Object v){ + key = k; value = v; + } + } + public HashtablePassword(int capacity, float loadFactor, int useProbe){ + entries = new Entry[capacity]; + this.loadFactor = loadFactor; + this.useProbe = useProbe; + } + + + //Complementary functions + public int hash(Object key){ + return (key.hashCode() & 0x7FFFFFFF) % entries.length; + } + + private int nextProbe(int h, int i){ + return (h+i) % entries.length; //Linear Probing + } + + private void rehash(){ + Entry[] oldEntries = entries; + entries = new Entry[2*entries.length+1]; + for (Entry entry : oldEntries) { + if (entry == NIL || entry == null) continue; + int h = hash(entry.key); + for (int x = 0; x < entries.length; x++) { + int j = nextProbe(h, x); + if (entries[j] == null) { + entries[j] = entry; + break; + } + } + used = size; + } + } + + @Override + public int add_Acc(Object Account, Object passwd) { + if(used > (loadFactor*entries.length))rehash(); + int h = hash(Account); + for (int i = 0; i < entries.length; i++){ + int j = (h+i) % entries.length; + Entry entry = entries[j]; + if(entry==null){ + entries[j]= new Entry(Account, passwd); + ++size; + ++used; + return h; + } + if(entry == NIL)continue; + if(entry.key.equals(Account)){ + Object oldValue = entry.value; + entries[j].value = passwd; + return (int) oldValue; + } + } + return h; + } + + @Override + public Object get_Acc(Object Account) { + int h = hash(Account); + for(int i = 0; i < entries.length; i++){ + int j = nextProbe(h , i); + Entry entry = entries[j]; + if(entry == null)break; + if(entry == NIL)continue; + if(entry.key.equals(Account)) return entry.value; + } + return null; + } + + @Override + public Object remove_Acc(Object Account) { + int h = hash(Account); + for(int i = 0; i < entries.length; i++){ + int j = nextProbe(h,i); + Entry entry = entries[j]; + if(entry == NIL)continue; + if(entry.key.equals(Account)){ + Object Value = entry.value; + entries[j] = NIL; + size--; + return Value; + } + } + return null; + } +} +class CryptoUtil +{ + + Cipher ecipher; + Cipher dcipher; + // 8-byte Salt + byte[] salt = { + (byte) 0xA9, (byte) 0x9B, (byte) 0xC8, (byte) 0x32, + (byte) 0x56, (byte) 0x35, (byte) 0xE3, (byte) 0x03 + }; + // Iteration count + int iterationCount = 19; + + public CryptoUtil() { + + } + + /** + * + * @param secretKey Key used to encrypt data + * @param plainText Text input to be encrypted + * @return Returns encrypted text + * @throws java.security.NoSuchAlgorithmException + * @throws java.security.spec.InvalidKeySpecException + * @throws javax.crypto.NoSuchPaddingException + * @throws java.security.InvalidKeyException + * @throws java.security.InvalidAlgorithmParameterException + * @throws java.io.UnsupportedEncodingException + * @throws javax.crypto.IllegalBlockSizeException + * @throws javax.crypto.BadPaddingException + * + */ + public String encrypt(String secretKey, String plainText) + throws NoSuchAlgorithmException, + InvalidKeySpecException, + NoSuchPaddingException, + InvalidKeyException, + InvalidAlgorithmParameterException, + UnsupportedEncodingException, + IllegalBlockSizeException, + BadPaddingException { + //Key generation for enc and desc + KeySpec keySpec = new PBEKeySpec(secretKey.toCharArray(), salt, iterationCount); + SecretKey key = SecretKeyFactory.getInstance("PBEWithMD5AndDES").generateSecret(keySpec); + // Prepare the parameter to the ciphers + AlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount); + + //Enc process + ecipher = Cipher.getInstance(key.getAlgorithm()); + ecipher.init(Cipher.ENCRYPT_MODE, key, paramSpec); + String charSet = "UTF-8"; + byte[] in = plainText.getBytes(charSet); + byte[] out = ecipher.doFinal(in); + String encStr = new String(Base64.getEncoder().encode(out)); + return encStr; + } + + /** + * @param secretKey Key used to decrypt data + * @param encryptedText encrypted text input to decrypt + * @return Returns plain text after decryption + * @throws java.security.NoSuchAlgorithmException + * @throws java.security.spec.InvalidKeySpecException + * @throws javax.crypto.NoSuchPaddingException + * @throws java.security.InvalidKeyException + * @throws java.security.InvalidAlgorithmParameterException + * @throws java.io.UnsupportedEncodingException + * @throws javax.crypto.IllegalBlockSizeException + * @throws javax.crypto.BadPaddingException + */ + public String decrypt(String secretKey, String encryptedText) + throws NoSuchAlgorithmException, + InvalidKeySpecException, + NoSuchPaddingException, + InvalidKeyException, + InvalidAlgorithmParameterException, + UnsupportedEncodingException, + IllegalBlockSizeException, + BadPaddingException, + IOException { + //Key generation for enc and desc + KeySpec keySpec = new PBEKeySpec(secretKey.toCharArray(), salt, iterationCount); + SecretKey key = SecretKeyFactory.getInstance("PBEWithMD5AndDES").generateSecret(keySpec); + // Prepare the parameter to the ciphers + AlgorithmParameterSpec paramSpec = new PBEParameterSpec(salt, iterationCount); + //Decryption process; same key will be used for decr + dcipher = Cipher.getInstance(key.getAlgorithm()); + dcipher.init(Cipher.DECRYPT_MODE, key, paramSpec); + byte[] enc = Base64.getDecoder().decode(encryptedText); + byte[] utf8 = dcipher.doFinal(enc); + String charSet = "UTF-8"; + String plainStr = new String(utf8, charSet); + return plainStr; + } + +} + +class PasswordGenerator { + private static final SecureRandom random = new SecureRandom(); + private static final String caps="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + private static final String small_caps="abcdefghijklmnopqrstuvwxyz"; + private static final String Numeric="1234567890"; + private static final String special_char="~!@#$%^&*(_+{}|:_[?]>=<"; + private static final String dic = caps + small_caps + Numeric + special_char; + + public String generatePassword(int len) { + StringBuilder password= new StringBuilder(); + for (int i = 0; i <len ; i++) { + int index = random.nextInt(dic.length()); + password.append(dic.charAt(index)); + } + return password.toString(); + } + +} + + +interface hashTableMap { + + Object get_Acc(Object Account); + int add_Acc(Object Account, Object passwd); + Object remove_Acc(Object Account); +} + +class PasswordManager implements ActionListener { + + //Store password class reference + HashtablePassword data = new HashtablePassword(15,0.5F,0); + + // GUI variables declaration + JFrame frame; + JFrame frame2; + JLabel background; + Container conn1,conn2; + JLabel lAcc,lPass; + JTextArea encryptPasswdArea, genePassArea, searchPassArea; + JButton PassGeneBtn,PassEncryptBtn, PassStoreBtn, PassSearchBtn, AccAddBtn, PassDeleteBtn; + JTextField tAcc,tPass; + JButton addNoteBtn; + JLabel addNoteLabel; + JTextArea tNote; + JButton addNote; + JFrame conn3; + + ArrayList<String> notes = new ArrayList<>(); // to store the notes in an array list of string type + + @Override + public void actionPerformed(ActionEvent e) { } + + //Frame settings + public static void FrameGUI(JFrame frame){ + frame.setVisible(true); + frame.setLayout(null); + frame.setLocationRelativeTo(null); + } + + + //container settings + public static void ContainerGUI(Container conn){ + conn.setVisible(true); + conn.setBackground(Color.getHSBColor(20.4f, 10.5f, 12.9f)); + conn.setLayout(null); + } + + + // buttons settings + public void GUIButtonsSetting(JButton btn){ + btn.setBackground(new Color(0XFB2576)); + btn.setForeground(Color.WHITE); + btn.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3)); + btn.setFocusable(false); + Cursor crs = new Cursor(Cursor.HAND_CURSOR); + btn.setCursor(crs); + Font fn = new Font("MV Boli", Font.BOLD, 15); + btn.setFont(fn); + } + + //GUI of Store password + public void StoringGUI() + { + frame2 = new JFrame("Store your passwords"); + frame2.setBounds(1400, 300, 800, 500); + frame2.setSize(400,400); + FrameGUI(frame2); + conn2 = frame2.getContentPane(); + ContainerGUI(conn2); + Font fn = new Font("MV Boli", Font.BOLD, 20); + + //Account textFiled and label + lAcc = new JLabel("ACCOUNT NAME"); + lAcc.setBounds(90, 23, 380, 20); + lAcc.setFont(fn); + conn2.add(lAcc); + + tAcc = new JTextField(); + tAcc.setBounds(90,70,200,50); + tAcc.setFont(fn); + tAcc.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3)); + tAcc.setForeground(Color.DARK_GRAY); + conn2.add(tAcc); + + //Account password textField and label + lPass = new JLabel("ACCOUNT PASSWORD"); + lPass.setBounds(90, 160, 380, 20); + lPass.setFont(fn); + conn2.add(lPass); + + tPass = new JTextField(); + tPass.setBounds(90,200,200,50); + tPass.setFont(fn); + tPass.setBorder(BorderFactory.createLineBorder(Color.BLACK, 3)); + tPass.setForeground(Color.DARK_GRAY); + conn2.add(tPass); + + AccAddBtn = new JButton("STORE"); + AccAddBtn.setBounds(120, 290, 150, 50); + conn2.add(AccAddBtn); + GUIButtonsSetting(AccAddBtn); + } + + //for password generator and encryption + public void textArea(String Pass,JTextArea TA){ + TA.setText(Pass); + Font fn = new Font("MV Boli", Font.BOLD, 20); + TA.setWrapStyleWord(true); + TA.setLineWrap(true); + TA.setCaretPosition(0); + TA.setEditable(false); + TA.setFont(fn); + + } + + //GUI of Password Manager + PasswordManager() { + + frame = new JFrame("Password Manager"); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setSize(400,650); + frame.setResizable(false); + ImageIcon img = new ImageIcon("background.png"); + background = new JLabel("",img,JLabel.CENTER); + background.setBounds(0,0,400,650); + background.setVisible(true); + frame.add(background); + + FrameGUI(frame); + + conn1 = frame.getContentPane(); + ContainerGUI(conn1); + + //Generator buttons settings + PassGeneBtn = new JButton("GENERATE PASSWORD"); + PassGeneBtn.setBounds(90, 20, 220, 40); + conn1.add(PassGeneBtn); + GUIButtonsSetting(PassGeneBtn); + + //generating password + PassGeneBtn.addActionListener(e -> { + if(PassGeneBtn ==e.getSource()) + { + try{ + int len = Integer.parseInt(JOptionPane.showInputDialog("Enter the password length")); + if(len>4) + { + // password generator class reference + PasswordGenerator pass = new PasswordGenerator(); + String passwd = pass.generatePassword(len); + genePassArea = new JTextArea(5,4); + textArea(passwd,genePassArea); + JOptionPane.showMessageDialog(conn1,new JScrollPane(genePassArea),"Copy your password",JOptionPane.INFORMATION_MESSAGE); + + } + else JOptionPane.showMessageDialog (conn1,"Password length must be greater than 8!","Invalid Input Error",JOptionPane.WARNING_MESSAGE); + + } + catch(Exception ex){JOptionPane.showMessageDialog(conn1,"Write something","EXIT!",JOptionPane.ERROR_MESSAGE);} + } + } + ); + + // add a encryption button and action + JButton EncryptBtn = new JButton("ENCRYPT Text"); + EncryptBtn.setBounds(90, 90, 220, 40); + conn1.add(EncryptBtn); + GUIButtonsSetting(EncryptBtn); + EncryptBtn.addActionListener(e -> { + if(EncryptBtn ==e.getSource()) + { + try{ + String text = JOptionPane.showInputDialog("Enter the text to encrypt"); + String secretKey = JOptionPane.showInputDialog("Enter the secret key"); + if(text.length()>0 && secretKey.length()>0) + { + // password generator class reference + CryptoUtil pass1 = new CryptoUtil(); + String passwd = pass1.encrypt(secretKey, text); // encrypting the text + genePassArea = new JTextArea(5,4); // text area for the encrypted text + textArea(passwd,genePassArea); // setting the text area + JOptionPane.showMessageDialog(conn1,new JScrollPane(genePassArea),"Copy your password",JOptionPane.INFORMATION_MESSAGE); // showing the encrypted text + + } + else JOptionPane.showMessageDialog (conn1,"Write something","Invalid Input Error",JOptionPane.WARNING_MESSAGE); + + } + catch(Exception ex){JOptionPane.showMessageDialog(conn1,"Write something","EXIT!",JOptionPane.ERROR_MESSAGE);} + } + } + ); + + // add a decryption button and action + JButton DecryptBtn = new JButton("DECRYPT Text"); + DecryptBtn.setBounds(90, 160, 220, 40); + conn1.add(DecryptBtn); + GUIButtonsSetting(DecryptBtn); + DecryptBtn.addActionListener(e -> { + if(DecryptBtn ==e.getSource()) + { + try{ + String text = JOptionPane.showInputDialog("Enter the text to decrypt"); // getting the encrypted text + String secretKey = JOptionPane.showInputDialog("Enter the secret key"); // getting the secret key + if(text.length()>0 && secretKey.length()>0) // checking if the text and secret key is not empty + { + // password generator class reference + CryptoUtil pass1 = new CryptoUtil(); // creating a object of the CryptoUtil class + String passwd = pass1.decrypt(secretKey, text); // decrypting the text + genePassArea = new JTextArea(5,4); // text area for the decrypted text + textArea(passwd,genePassArea); // setting the text area + JOptionPane.showMessageDialog(conn1,new JScrollPane(genePassArea),"Decrypted text",JOptionPane.INFORMATION_MESSAGE); // showing the decrypted text + + } + else JOptionPane.showMessageDialog (conn1,"Password length must be greater than 8!","Invalid Input Error",JOptionPane.WARNING_MESSAGE); + + } + catch(Exception ex){JOptionPane.showMessageDialog(conn1,"Write something","EXIT!",JOptionPane.ERROR_MESSAGE);} + } + } + ); + + //storing password using hashtable + PassStoreBtn = new JButton("STORE PASSWORD"); + PassStoreBtn.setBounds(90, 230, 220, 40); + conn1.add(PassStoreBtn); + GUIButtonsSetting(PassStoreBtn); + //Store password action + PassStoreBtn.addActionListener(e -> { + if(PassStoreBtn ==e.getSource()) + { + try{ + StoringGUI(); + // action on the Store btn + AccAddBtn.addActionListener(e4 -> { + if (AccAddBtn == e4.getSource()) { + String account_name = tAcc.getText(); // getting the account name + String acc_pass = tPass.getText(); // getting the password + if (account_name.isEmpty() && acc_pass.isEmpty()) { + JOptionPane.showMessageDialog(conn2,"unable to store your password!","ERROR",JOptionPane.ERROR_MESSAGE); + } + else{ + //calling put method of the hashtablePassword class + data.add_Acc(account_name,acc_pass); // adding the account name and password to the hashtable + JOptionPane.showMessageDialog(conn2, "Account added Successfully !"); + tAcc.setText(null); + tPass.setText(null); + } + } + } + ); + } + catch(Exception ex) {JOptionPane.showMessageDialog(conn2,"Write something","EXIT",JOptionPane.ERROR_MESSAGE);} + } + } + ); + + //searching password + PassSearchBtn = new JButton("SEARCH PASSWORD"); + GUIButtonsSetting(PassSearchBtn); + PassSearchBtn.setBounds(90, 300, 220, 40); + conn1.add(PassSearchBtn); + PassSearchBtn.addActionListener(e ->{ + if (PassSearchBtn ==e.getSource()){ + try{ + String acc_name = JOptionPane.showInputDialog("Enter your Account Name"); // getting the account name + if (!acc_name.isBlank()) { // checking if the account name is not empty + Object pass = data.get_Acc(acc_name.toLowerCase()); // getting the password of the account name + if(pass!=null) { // checking if the password is not null + searchPassArea = new JTextArea(4,5); // text area for the password + textArea(String.valueOf(pass), searchPassArea); // setting the text area + JOptionPane.showMessageDialog(conn1, new JScrollPane(searchPassArea), "Copy your password", JOptionPane.INFORMATION_MESSAGE); + } + else JOptionPane.showMessageDialog(conn1, "Account not Found!"); + } + } + catch (Exception ex){ + JOptionPane.showMessageDialog(conn1,"Write something","EXIT",JOptionPane.ERROR_MESSAGE); + } + } + } + ); + + // deleting password + PassDeleteBtn = new JButton("DELETE PASSWORD"); + GUIButtonsSetting(PassDeleteBtn); + PassDeleteBtn.setBounds(90, 370, 220, 40); + conn1.add(PassDeleteBtn); + PassDeleteBtn.addActionListener(e -> { + if (PassDeleteBtn == e.getSource()) { + try { + String acc_name = JOptionPane.showInputDialog("Enter the Account Name"); // getting the account name + if (!acc_name.isBlank()) { + data.remove_Acc(acc_name.toLowerCase()); // removing the account name and password from the hashtable + JOptionPane.showMessageDialog(conn1, "Delete successfully!"); // showing the message + } + else JOptionPane.showMessageDialog(conn1, "Account not found!", "INFO", JOptionPane.INFORMATION_MESSAGE); + } catch (Exception ex) { + JOptionPane.showMessageDialog(conn1, "Write something", "EXIT", JOptionPane.ERROR_MESSAGE); + } + } + + } + ); + + addNoteBtn = new JButton("ADD NOTE"); + GUIButtonsSetting(addNoteBtn); + addNoteBtn.setBounds(90, 440, 220, 40); + conn1.add(addNoteBtn); + addNoteBtn.addActionListener(e -> { + if (addNoteBtn == e.getSource()) { + try { + NoteGUI(); + // action on the add note btn + addNote.addActionListener(e4 -> { + if (addNote == e4.getSource()) { + String note = tNote.getText(); // getting the note + if (note.isEmpty()) { + JOptionPane.showMessageDialog(conn3, "unable to store your note!", "ERROR", JOptionPane.ERROR_MESSAGE); + } else { + //calling put method of the hashtablePassword class + notes.add(note); // adding the note to the arraylist + JOptionPane.showMessageDialog(conn3, "Note added Successfully !"); + conn3.setVisible(false); + tNote.setText(null); + } + } + }); + } catch (Exception ex) { + JOptionPane.showMessageDialog(conn3, "Write something", "EXIT", JOptionPane.ERROR_MESSAGE); + } + } + } + ); + + //get all notes + JButton getNoteBtn = new JButton("GET NOTE"); + GUIButtonsSetting(getNoteBtn); + getNoteBtn.setBounds(90, 510, 220, 40); + conn1.add(getNoteBtn); + getNoteBtn.addActionListener(e -> { + if (getNoteBtn == e.getSource()) { + try { + String allNotes = notes.get(notes.size() - 1); // getting the last note added + if (allNotes.isEmpty()) { // checking if the note is empty or not + JOptionPane.showMessageDialog(conn1, "No note found!", "INFO", JOptionPane.INFORMATION_MESSAGE); // showing the message + } else { + searchPassArea = new JTextArea(4, 5); // text area for the note + textArea(allNotes, searchPassArea); // setting the text area + JOptionPane.showMessageDialog(conn1, new JScrollPane(searchPassArea), "Get your notes", JOptionPane.INFORMATION_MESSAGE); // showing the message + } + } catch (Exception ex) { + JOptionPane.showMessageDialog(conn1, "Add a note before trying to retrive", "EXIT", JOptionPane.ERROR_MESSAGE); + } + } + } + ); + + } + + // method for setting the buttons and GUI for adding notes + private void NoteGUI() { + + conn3 = new JFrame("Add Note"); + conn3.setSize(500, 500); + conn3.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + conn3.setLocationRelativeTo(null); + conn3.setLayout(null); + conn3.setVisible(true); + conn3.setResizable(false); + + //add note label + addNoteLabel = new JLabel("Add Note"); + addNoteLabel.setBounds(200, 20, 100, 30); + conn3.add(addNoteLabel); + + //add note text area + tNote = new JTextArea(10, 10); + tNote.setBounds(100, 60, 300, 300); + conn3.add(tNote); + + //add note button + addNote = new JButton("ADD NOTE"); + GUIButtonsSetting(addNote); + addNote.setBounds(140, 380, 220, 30); + conn3.add(addNote); + } + + // main method to run the application + public static void main(String[] args) { + //loading screen class + new SplashScreen(); + try { + new PasswordManager(); + }catch (Exception ex) { ex.printStackTrace(); } + } +} diff --git a/pat.java b/pat.java new file mode 100644 index 00000000..07b4c1ea --- /dev/null +++ b/pat.java @@ -0,0 +1,39 @@ +// Java Program to print pattern +// Palindrome triangle +import java.util.*; + +public class GeeksForGeeks { + // Function to demonstrate pattern + public static void printPattern(int n) + { + int i, j; + + // outer loop to handle number of rows + for (i = 1; i <= n; i++) { + // inner loop to print the spaces + for (j = 1; j <= 2 * (n - i); j++) { + System.out.print(" "); + } + + // inner loop to print the first part + for (j = i; j >= 1; j--) { + System.out.print(j + " "); + } + + // inner loop to print the second part + for (j = 2; j <= i; j++) { + System.out.print(j + " "); + } + + // printing new line for each row + System.out.println(); + } + } + + // Driver Function + public static void main(String args[]) + { + int n = 6; + printPattern(n); + } +} diff --git a/pattern.java b/pattern.java new file mode 100644 index 00000000..221288af --- /dev/null +++ b/pattern.java @@ -0,0 +1,31 @@ +// Java Program to print pattern +// Number triangle pattern +import java.util.*; + +public class GeeksForGeeks { + // Function to demonstrate pattern + public static void printPattern(int n) + { + int i, j; + // outer loop to handle number of rows + for (i = 1; i <= n; i++) { + // inner loop to print space + for (j = 1; j <= n - i; j++) { + System.out.print(" "); + } + // inner loop to print star + for (j = 1; j <= i; j++) { + System.out.print(i + " "); + } + // print new line for each row + System.out.println(); + } + } + + // Driver Function + public static void main(String args[]) + { + int n = 6; + printPattern(n); + } +} diff --git a/pattern2.java b/pattern2.java new file mode 100644 index 00000000..07480f71 --- /dev/null +++ b/pattern2.java @@ -0,0 +1,30 @@ +// Java Program to print pattern +// Number-increasing pyramid +import java.util.*; + +public class GeeksForGeeks { + // Function to demonstrate pattern + public static void printPattern(int n) + { + int i, j; + // outer loop to handle number of rows + for (i = 1; i <= n; i++) { + // inner loop to handle number of columns + for (j = 1; j <= i; j++) { + // printing column values upto the row + // value. + System.out.print(j + " "); + } + + // print new line for each row + System.out.println(); + } + } + + // Driver Function + public static void main(String args[]) + { + int n = 6; + printPattern(n); + } +} diff --git a/petshop/petshop.java.java b/petshop/petshop.java.java new file mode 100644 index 00000000..510eeecc --- /dev/null +++ b/petshop/petshop.java.java @@ -0,0 +1,325 @@ +import java.awt.EventQueue; +import java.awt.event.*; +import java.awt.*; +import java.awt.Font; +import java.awt.event.ActionListener; +import java.awt.event.ActionEvent; +import javax.swing.JLabel; +import javax.swing.JTextField; +import javax.swing.*; +import javax.swing.JFrame; +import javax.swing.ImageIcon; + + + +public class eps { + + private JFrame frame; + private JLabel z1; + private JLabel y1; + private JLabel y2; + private JLabel y3; + private JLabel y4; + private JLabel x1; + private JLabel x2; + private JLabel l1; + private JLabel l2; + private JLabel l3; + private JLabel l4; + private JLabel l5; + private JLabel l6; + private JLabel l7; + private JLabel l8; + private JLabel a1; + private JLabel a2; + private JLabel a3; + private JLabel a4; + private JLabel a5; + private JLabel a6; + private JLabel a7; + private JLabel a8; + private JLabel a9; + private JLabel a0; + public static void main(String[] args) { + EventQueue.invokeLater(new Runnable() { + public void run() { + try { + eps window = new eps(); + window.frame.setVisible(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + }); + } + + public eps() { + initialize(); + } + + private void initialize() { + frame = new JFrame(); + frame.setBounds(50, 50, 50, 50); + + JFrame f = new JFrame("Pet Store"); + JButton b1 = new JButton("Login"); + JButton b2 = new JButton("Register a pet"); + JButton b3 = new JButton("Rescued pets"); + JButton b4 = new JButton("Missing pets"); + z1=new JLabel(" NO.15 PET SHOP "); + + z1.setBounds(250,100,200,50); + b1.setBounds(200,200,200,50); + b2.setBounds(200,300,200,50); + b3.setBounds(200,400,200,50); + b4.setBounds(200,500,200,50); + + f.add(z1); + f.add(b1); + f.add(b2); + f.add(b3); + f.add(b4); + + + f.setLayout(null); + f.setVisible(true); + f.setSize(800,800); + b1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) { + JFrame f2 = new JFrame("LOGIN DETAILS"); + f2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + JButton but1 = new JButton("Exit"); + JButton but2 = new JButton("Login"); + JTextField t1=new JTextField(); + JTextField t2=new JTextField(); + + x1=new JLabel("NAME : "); + x2=new JLabel("PASSWORD : "); + + x1.setBounds(50,100,200,50); + t1.setBounds(300,100,200,50); + x2.setBounds(50,200,200,50); + t2.setBounds(300,200,200,50); + + but2.setBounds(50,500,200,45); + but1.setBounds(300,500,200,45); + + f2.add(but1); + f2.add(but2); + + f2.add(x1); + f2.add(x2); + + f2.add(t1); + f2.add(t2); + + f2.setLayout(null); + f2.setVisible(true); + f2.setSize(800,800); + } + }); + b2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) { + JFrame f3 = new JFrame("Registration"); + JButton button1 = new JButton("DOG"); + JButton button2 = new JButton("CAT"); + + button1.setBounds(200,200,200,50); + button2.setBounds(200,300,200,50); + + f3.add(button1); + f3.add(button2); + + f3.setLayout(null); + f3.setVisible(true); + f3.setSize(800,800); + button1.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) { + JFrame g1 = new JFrame("Dog Registration"); + JButton buts1 = new JButton("Exit"); + JButton buts2 = new JButton("Submit"); + JTextField t1=new JTextField(); + JTextField t2=new JTextField(); + JTextField t3=new JTextField(); + JTextField t4=new JTextField(); + JTextField t5=new JTextField(); + JTextField t6=new JTextField(); + + l1=new JLabel("DOG NAME : "); + l2=new JLabel(" AGE : "); + l3=new JLabel("BREED : "); + l4=new JLabel(" SEX : "); + y1=new JLabel("OWNER'S NAME : "); + y2=new JLabel("OWNER'S LOCALITY : "); + + l1.setBounds(50,100,200,50); + t1.setBounds(300,100,200,50); + l2.setBounds(50,200,200,50); + t2.setBounds(300,200,200,50); + l3.setBounds(50,300,200,50); + t3.setBounds(300,300,200,50); + l4.setBounds(50,400,200,50); + t4.setBounds(300,400,200,50); + y1.setBounds(50,500,200,50); + t5.setBounds(300,500,200,50); + y2.setBounds(50,600,200,50); + t6.setBounds(300,600,200,50); + + + buts2.setBounds(50,700,200,45); + buts1.setBounds(300,700,200,45); + + g1.add(buts1); + g1.add(buts2); + g1.add(l1); + g1.add(l2); + g1.add(l3); + g1.add(l4); + g1.add(y1); + g1.add(y2); + + g1.add(t1); + g1.add(t2); + g1.add(t3); + g1.add(t4); + g1.add(t5); + g1.add(t6); + + g1.setLayout(null); + g1.setVisible(true); + g1.setSize(1200,1200); + + buts2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) { + JOptionPane.showMessageDialog(frame.getComponent(0), "Sussesfully Submitted"); + } + }); + } + }); + button2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) { + JFrame g2 = new JFrame("Cat Registration"); + JButton butts1 = new JButton("Exit"); + JButton butts2 = new JButton("Submit"); + JTextField t1=new JTextField(); + JTextField t2=new JTextField(); + JTextField t3=new JTextField(); + JTextField t4=new JTextField(); + JTextField t5=new JTextField(); + JTextField t6=new JTextField(); + + + l1=new JLabel("CAT NAME : "); + l2=new JLabel(" AGE : "); + l3=new JLabel("COLOUR : "); + l4=new JLabel(" SEX : "); + y3=new JLabel("OWNER'S NAME : "); + y4=new JLabel("OWNER'S LOCALITY : "); + + l1.setBounds(50,100,200,50); + t1.setBounds(300,100,200,50); + l2.setBounds(50,200,200,50); + t2.setBounds(300,200,200,50); + l3.setBounds(50,300,200,50); + t3.setBounds(300,300,200,50); + l4.setBounds(50,400,200,50); + t4.setBounds(300,400,200,50); + y3.setBounds(50,500,200,50); + t5.setBounds(300,500,200,50); + y4.setBounds(50,600,200,50); + t6.setBounds(300,600,200,50); + + + butts2.setBounds(50,700,200,45); + butts1.setBounds(300,700,200,45); + + g2.add(butts1); + g2.add(butts2); + g2.add(l1); + g2.add(l2); + g2.add(l3); + g2.add(l4); + g2.add(y3); + g2.add(y4); + + g2.add(t1); + g2.add(t2); + g2.add(t3); + g2.add(t4); + g2.add(t5); + g2.add(t6); + + + g2.setLayout(null); + g2.setVisible(true); + g2.setSize(1200,1200); + + butts2.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) { + JOptionPane.showMessageDialog(frame.getComponent(0), "Sussesfully Submitted"); + } + }); + } + }); + } + }); + b3.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) { + JFrame f4 = new JFrame("RESCUED PETS"); + ImageIcon ii = new ImageIcon("C:/java/jimmy2.gif"); + ImageIcon ij = new ImageIcon("C:/java/ramu2.gif"); + a1=new JLabel("RESCUED PETS DETAILS :"); + a2=new JLabel(" (1) Jimmy(cat) is one of the pets rescued by our NGOs.It is 22 months old and black in colour."); + a3=new JLabel(ii); + a4=new JLabel(" (2) Ramu(dog) is one of the pets rescued by our NGOs.It is 38 months old.It belongs to German Shepherd breed.It is a highly inteligent dog."); + a5=new JLabel(ij); + a1.setBounds(50,30,200,50); + a2.setBounds(50,60,800,50); + a3.setBounds(50,80,350,300); + a4.setBounds(50,360,900,50); + a5.setBounds(50,390,500,400); + f4.add(a1); + f4.add(a2); + f4.add(a3); + f4.add(a4); + f4.add(a5); + f4.setLayout(null); + f4.setVisible(true); + f4.setSize(1200,1200); + } + }); + b4.addActionListener(new ActionListener() + { + public void actionPerformed(ActionEvent e) { + JFrame f5 = new JFrame("Missing pets"); + ImageIcon ik = new ImageIcon("C:/java/peter2.gif"); + ImageIcon il = new ImageIcon("C:/java/Roni2.gif"); + a6=new JLabel("MISSING PETS DETAILS :"); + a7=new JLabel(" (1) Peter(dog) is missing since last month.It belongs to Golden Retriever breed.The image of missing dog is shown below.If found please contact pet owner , 9413299638."); + a8=new JLabel(ik); + a9=new JLabel(" (2) Roni(cat) is missing since last week.It is orange in colour.The image of missing cat is shown below.If found please contact pet owner , 9413299638."); + a0=new JLabel(il); + a6.setBounds(50,30,200,50); + a7.setBounds(50,60,960,50); + a8.setBounds(50,80,350,300); + a9.setBounds(50,360,950,50); + a0.setBounds(50,390,450,250); + f5.add(a6); + f5.add(a7); + f5.add(a8); + f5.add(a9); + f5.add(a0); + f5.setLayout(null); + f5.setVisible(true); + f5.setSize(1200,1200); + } + }); +} +} \ No newline at end of file diff --git a/piglatinWord,java b/piglatinWord,java new file mode 100644 index 00000000..a7c4ef15 --- /dev/null +++ b/piglatinWord,java @@ -0,0 +1,33 @@ +import java.util.Scanner; + +public class KboatPigLatin +{ + public static void main(String args[]) { + + Scanner in = new Scanner(System.in); + System.out.print("Enter word: "); + String word = in.next(); + int len = word.length(); + + word=word.toUpperCase(); + String piglatin=""; + int flag=0; + + for(int i = 0; i < len; i++) + { + char x = word.charAt(i); + if(x=='A' || x=='E' || x=='I' || x=='O' || x=='U') + { + piglatin=word.substring(i) + word.substring(0,i) + "AY"; + flag=1; + break; + } + } + + if(flag == 0) + { + piglatin = word + "AY"; + } + System.out.println(word + " in Piglatin format is " + piglatin); + } +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..420bbe01 --- /dev/null +++ b/pom.xml @@ -0,0 +1,53 @@ +<project> + <modelVersion>4.0.0</modelVersion> + <groupId>mygroupid</groupId> + <artifactId>myartifactid</artifactId> + <version>0.0-SNAPSHOT</version> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>com.googlecode.json-simple</groupId> + <artifactId>json-simple</artifactId> + <version>1.1.1</version> + <type>jar</type> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>hamcrest-core</artifactId> + <version>1.3</version> + <type>jar</type> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>de.qaware.maven</groupId> + <artifactId>go-offline-maven-plugin</artifactId> + <version>1.2.5</version> + <configuration> + <dynamicDependencies> + <DynamicDependency> + <groupId>org.apache.maven.surefire</groupId> + <artifactId>surefire-junit4</artifactId> + <version>2.20.1</version> + <classifier></classifier> + <repositoryType>PLUGIN</repositoryType> + </DynamicDependency> + <DynamicDependency> + <groupId>com.querydsl</groupId> + <artifactId>querydsl-apt</artifactId> + <version>4.2.1</version> + <classifier>jpa</classifier> + <repositoryType>MAIN</repositoryType> + </DynamicDependency> + </dynamicDependencies> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file diff --git a/pran1 b/pran1 new file mode 100644 index 00000000..f38b087f --- /dev/null +++ b/pran1 @@ -0,0 +1,43 @@ +import javax.crypto.*; +import java.security.*; +import java.util.Base64; + +public class SecureCommunication { + + public static void main(String[] args) { + try { + // Generate a secret key for symmetric encryption + SecretKey secretKey = generateSecretKey(); + + // Simulate two parties communicating over a secure channel + String messageToSend = "Hello, secure world!"; + byte[] encryptedMessage = encryptMessage(messageToSend, secretKey); + String decryptedMessage = decryptMessage(encryptedMessage, secretKey); + + System.out.println("Original Message: " + messageToSend); + System.out.println("Encrypted Message: " + Base64.getEncoder().encodeToString(encryptedMessage)); + System.out.println("Decrypted Message: " + decryptedMessage); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private static SecretKey generateSecretKey() throws NoSuchAlgorithmException { + KeyGenerator keyGenerator = KeyGenerator.getInstance("AES"); + keyGenerator.init(256); // Key size, you can choose other sizes like 128 or 192 + return keyGenerator.generateKey(); + } + + private static byte[] encryptMessage(String message, SecretKey secretKey) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException { + Cipher cipher = Cipher.getInstance("AES"); + cipher.init(Cipher.ENCRYPT_MODE, secretKey); + return cipher.doFinal(message.getBytes()); + } + + private static String decryptMessage(byte[] encryptedMessage, SecretKey secretKey) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException { + Cipher cipher = Cipher.getInstance("AES"); + cipher.init(Cipher.DECRYPT_MODE, secretKey); + byte[] decryptedBytes = cipher.doFinal(encryptedMessage); + return new String(decryptedBytes); + } +} diff --git a/puzzleGame.java b/puzzleGame.java new file mode 100644 index 00000000..c4fe82d5 --- /dev/null +++ b/puzzleGame.java @@ -0,0 +1,178 @@ +import java.awt.*; +import java.awt.event.*; +import javax.swing.JOptionPane; +public class Puzzle extends Frame implements ActionListener{ +Button b1,b2,b3,b4,b5,b6,b7,b8,b9; +Puzzle(){ + super("Puzzle - JavaTpoint"); + b1=new Button("1"); + b1.setBounds(50,100,40,40); + b2=new Button("2"); + b2.setBounds(100,100,40,40); + b3=new Button("3"); + b3.setBounds(150,100,40,40); + b4=new Button("4"); + b4.setBounds(50,150,40,40); + b5=new Button("5"); + b5.setBounds(100,150,40,40); + b6=new Button("6"); + b6.setBounds(150,150,40,40); + b7=new Button("7"); + b7.setBounds(50,200,40,40); + b8=new Button(""); + b8.setBounds(100,200,40,40); + b9=new Button("8"); + b9.setBounds(150,200,40,40); + + b1.addActionListener(this); + b2.addActionListener(this); + b3.addActionListener(this); + b4.addActionListener(this); + b5.addActionListener(this); + b6.addActionListener(this); + b7.addActionListener(this); + b8.addActionListener(this); + b9.addActionListener(this); + + add(b1);add(b2);add(b3);add(b4);add(b5);add(b6);add(b7);add(b8);add(b9); + setSize(400,400); + setLayout(null); + setVisible(true); +} +public void actionPerformed(ActionEvent e){ + if(e.getSource()==b1){ + String label=b1.getLabel(); + if(b2.getLabel().equals("")){ + b2.setLabel(label); + b1.setLabel(""); + } + if(b4.getLabel().equals("")){ + b4.setLabel(label); + b1.setLabel(""); + } + } + if(e.getSource()==b2){ + String label=b2.getLabel(); + if(b1.getLabel().equals("")){ + b1.setLabel(label); + b2.setLabel(""); + } + if(b3.getLabel().equals("")){ + b3.setLabel(label); + b2.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b2.setLabel(""); + } + } + if(e.getSource()==b3){ + String label=b3.getLabel(); + if(b2.getLabel().equals("")){ + b2.setLabel(label); + b3.setLabel(""); + } + if(b6.getLabel().equals("")){ + b6.setLabel(label); + b3.setLabel(""); + } + } + if(e.getSource()==b4){ + String label=b4.getLabel(); + if(b1.getLabel().equals("")){ + b1.setLabel(label); + b4.setLabel(""); + } + if(b7.getLabel().equals("")){ + b7.setLabel(label); + b4.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b4.setLabel(""); + } + } + if(e.getSource()==b5){ + String label=b5.getLabel(); + if(b2.getLabel().equals("")){ + b2.setLabel(label); + b5.setLabel(""); + } + if(b6.getLabel().equals("")){ + b6.setLabel(label); + b5.setLabel(""); + } + if(b4.getLabel().equals("")){ + b4.setLabel(label); + b5.setLabel(""); + } + if(b8.getLabel().equals("")){ + b8.setLabel(label); + b5.setLabel(""); + } + } + if(e.getSource()==b6){ + String label=b6.getLabel(); + if(b9.getLabel().equals("")){ + b9.setLabel(label); + b6.setLabel(""); + } + if(b3.getLabel().equals("")){ + b3.setLabel(label); + b6.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b6.setLabel(""); + } + } + if(e.getSource()==b7){ + String label=b7.getLabel(); + if(b4.getLabel().equals("")){ + b4.setLabel(label); + b7.setLabel(""); + } + if(b8.getLabel().equals("")){ + b8.setLabel(label); + b7.setLabel(""); + } + } + if(e.getSource()==b8){ + String label=b8.getLabel(); + if(b9.getLabel().equals("")){ + b9.setLabel(label); + b8.setLabel(""); + } + if(b7.getLabel().equals("")){ + b7.setLabel(label); + b8.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b8.setLabel(""); + } + } + if(e.getSource()==b9){ + String label=b9.getLabel(); + if(b6.getLabel().equals("")){ + b6.setLabel(label); + b9.setLabel(""); + } + if(b8.getLabel().equals("")){ + b8.setLabel(label); + b9.setLabel(""); + } + } + + //congrats code + if(b1.getLabel().equals("1")&&b2.getLabel().equals("2")&&b3.getLabel() + .equals("3")&&b4.getLabel().equals("4")&&b5.getLabel().equals("5") + &&b6.getLabel().equals("6")&&b7.getLabel().equals("7")&&b8.getLabel() + .equals("8")&&b9.getLabel().equals("")){ + JOptionPane.showMessageDialog(this,"Congratulations! You won."); + } +} +public static void main(String[] args) { + new Puzzle(); +} +} \ No newline at end of file diff --git a/puzzle_awt.java b/puzzle_awt.java new file mode 100644 index 00000000..9c3bfae7 --- /dev/null +++ b/puzzle_awt.java @@ -0,0 +1,178 @@ +import java.awt.*; +import java.awt.event.*; +import javax.swing.JOptionPane; +public class Puzzle extends Frame implements ActionListener{ +Button b1,b2,b3,b4,b5,b6,b7,b8,b9; +Puzzle(){ + super("Puzzle - JavaTpoint"); + b1=new Button("1"); + b1.setBounds(50,100,40,40); + b2=new Button("2"); + b2.setBounds(100,100,40,40); + b3=new Button("3"); + b3.setBounds(150,100,40,40); + b4=new Button("4"); + b4.setBounds(50,150,40,40); + b5=new Button("5"); + b5.setBounds(100,150,40,40); + b6=new Button("6"); + b6.setBounds(150,150,40,40); + b7=new Button("7"); + b7.setBounds(50,200,40,40); + b8=new Button(""); + b8.setBounds(100,200,40,40); + b9=new Button("8"); + b9.setBounds(150,200,40,40); + + b1.addActionListener(this); + b2.addActionListener(this); + b3.addActionListener(this); + b4.addActionListener(this); + b5.addActionListener(this); + b6.addActionListener(this); + b7.addActionListener(this); + b8.addActionListener(this); + b9.addActionListener(this); + + add(b1);add(b2);add(b3);add(b4);add(b5);add(b6);add(b7);add(b8);add(b9); + setSize(400,400); + setLayout(null); + setVisible(true); +} +public void actionPerformed(ActionEvent e){ + if(e.getSource()==b1){ + String label=b1.getLabel(); + if(b2.getLabel().equals("")){ + b2.setLabel(label); + b1.setLabel(""); + } + if(b4.getLabel().equals("")){ + b4.setLabel(label); + b1.setLabel(""); + } + } + if(e.getSource()==b2){ + String label=b2.getLabel(); + if(b1.getLabel().equals("")){ + b1.setLabel(label); + b2.setLabel(""); + } + if(b3.getLabel().equals("")){ + b3.setLabel(label); + b2.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b2.setLabel(""); + } + } + if(e.getSource()==b3){ + String label=b3.getLabel(); + if(b2.getLabel().equals("")){ + b2.setLabel(label); + b3.setLabel(""); + } + if(b6.getLabel().equals("")){ + b6.setLabel(label); + b3.setLabel(""); + } + } + if(e.getSource()==b4){ + String label=b4.getLabel(); + if(b1.getLabel().equals("")){ + b1.setLabel(label); + b4.setLabel(""); + } + if(b7.getLabel().equals("")){ + b7.setLabel(label); + b4.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b4.setLabel(""); + } + } + if(e.getSource()==b5){ + String label=b5.getLabel(); + if(b2.getLabel().equals("")){ + b2.setLabel(label); + b5.setLabel(""); + } + if(b6.getLabel().equals("")){ + b6.setLabel(label); + b5.setLabel(""); + } + if(b4.getLabel().equals("")){ + b4.setLabel(label); + b5.setLabel(""); + } + if(b8.getLabel().equals("")){ + b8.setLabel(label); + b5.setLabel(""); + } + } + if(e.getSource()==b6){ + String label=b6.getLabel(); + if(b9.getLabel().equals("")){ + b9.setLabel(label); + b6.setLabel(""); + } + if(b3.getLabel().equals("")){ + b3.setLabel(label); + b6.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b6.setLabel(""); + } + } + if(e.getSource()==b7){ + String label=b7.getLabel(); + if(b4.getLabel().equals("")){ + b4.setLabel(label); + b7.setLabel(""); + } + if(b8.getLabel().equals("")){ + b8.setLabel(label); + b7.setLabel(""); + } + } + if(e.getSource()==b8){ + String label=b8.getLabel(); + if(b9.getLabel().equals("")){ + b9.setLabel(label); + b8.setLabel(""); + } + if(b7.getLabel().equals("")){ + b7.setLabel(label); + b8.setLabel(""); + } + if(b5.getLabel().equals("")){ + b5.setLabel(label); + b8.setLabel(""); + } + } + if(e.getSource()==b9){ + String label=b9.getLabel(); + if(b6.getLabel().equals("")){ + b6.setLabel(label); + b9.setLabel(""); + } + if(b8.getLabel().equals("")){ + b8.setLabel(label); + b9.setLabel(""); + } + } + + //congrats code + if(b1.getLabel().equals("1")&&b2.getLabel().equals("2")&&b3.getLabel() + .equals("3")&&b4.getLabel().equals("4")&&b5.getLabel().equals("5") + &&b6.getLabel().equals("6")&&b7.getLabel().equals("7")&&b8.getLabel() + .equals("8")&&b9.getLabel().equals("")){ + JOptionPane.showMessageDialog(this,"Congratulations! You won."); + } +} +public static void main(String[] args) { + new Puzzle(); +} +} diff --git a/qr code generator.java b/qr code generator.java new file mode 100644 index 00000000..ab6a7841 --- /dev/null +++ b/qr code generator.java @@ -0,0 +1,46 @@ +import java.io.File; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import com.google.zxing.BarcodeFormat; +import com.google.zxing.EncodeHintType; +import com.google.zxing.MultiFormatWriter; +import com.google.zxing.Writer; +import com.google.zxing.WriterException; +import com.google.zxing.common.BitMatrix; +import com.google.zxing.qrcode.QRCodeWriter; +import com.google.zxing.client.j2se.MatrixToImageWriter; +import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; + +public class QRCodeGenerator { + public static void main(String[] args) { + // The data to be encoded as a QR code + String data = "Hello, this is a QR code example!"; + + // Path where the QR code image will be saved + String filePath = "qrcode.png"; + + // Encoding charset + String charset = "UTF-8"; + + // Create a QR code writer + QRCodeWriter writer = new QRCodeWriter(); + + // Set QR code parameters + Map<EncodeHintType, ErrorCorrectionLevel> hintMap = new HashMap<>(); + hintMap.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.L); + + try { + // Generate a QR code + BitMatrix bitMatrix = writer.encode(data, BarcodeFormat.QR_CODE, 200, 200, hintMap); + + // Save the QR code as an image + MatrixToImageWriter.writeToFile(bitMatrix, "PNG", new File(filePath)); + + System.out.println("QR Code generated and saved as " + filePath); + } catch (WriterException | IOException e) { + e.printStackTrace(); + } + } +} diff --git a/randomPasswordGenerator.java b/randomPasswordGenerator.java new file mode 100644 index 00000000..023772ff --- /dev/null +++ b/randomPasswordGenerator.java @@ -0,0 +1,53 @@ +package Master.JavaExample; + +import org.passay.CharacterRule; +import org.passay.EnglishCharacterData; +import org.passay.PasswordGenerator; + +// create class GeneratePasswordExample1 to generate a random and secure password +public class GeneratePasswordExample1 { + + // main() method start + public static void main(String args[]) { + + // call the generatePassword() method to generate a random password using the Passay library + String pass = generateSecurePassword(); + + // print Passay generated password + System.out.println("The Passay generated password is:"+pass); + + } + + // create generateSecurePassword() method that find the secure password and returns it to the main() method + public static String generateSecurePassword() { + + // create character rule for lower case + CharacterRule LCR = new CharacterRule(EnglishCharacterData.LowerCase); + // set number of lower case characters + LCR.setNumberOfCharacters(2); + + // create character rule for upper case + CharacterRule UCR = new CharacterRule(EnglishCharacterData.UpperCase); + // set number of upper case characters + UCR.setNumberOfCharacters(2); + + // create character rule for digit + CharacterRule DR = new CharacterRule(EnglishCharacterData.Digit); + // set number of digits + DR.setNumberOfCharacters(2); + + // create character rule for lower case + CharacterRule SR = new CharacterRule(EnglishCharacterData.Special); + // set number of special characters + SR.setNumberOfCharacters(2); + + // create instance of the PasswordGenerator class + PasswordGenerator passGen = new PasswordGenerator(); + + // call generatePassword() method of PasswordGenerator class to get Passay generated password + String password = passGen.generatePassword(8, SR, LCR, UCR, DR); + + // return Passay generated password to the main() method + return password; + } +} \ No newline at end of file diff --git a/readme.txt b/readme.txt new file mode 100644 index 00000000..d7cbf40c --- /dev/null +++ b/readme.txt @@ -0,0 +1,2 @@ +Username: admin +Password: admin \ No newline at end of file diff --git a/rectangle.java b/rectangle.java new file mode 100644 index 00000000..f6932717 --- /dev/null +++ b/rectangle.java @@ -0,0 +1,36 @@ +// Java Program to print pattern +// Square hollow pattern +import java.util.*; + +public class GeeksForGeeks { + // Function to demonstrate pattern + public static void printPattern(int n) + { + int i, j; + // outer loop to handle number of rows + for (i = 0; i < n; i++) { + // inner loop to handle number of columns + for (j = 0; j < n; j++) { + // star will print only when it is in first + // row or last row or first column or last + // column + if (i == 0 || j == 0 || i == n - 1 + || j == n - 1) { + System.out.print("*"); + } + // otherwise print space only. + else { + System.out.print(" "); + } + } + System.out.println(); + } + } + + // Driver Function + public static void main(String args[]) + { + int n = 6; + printPattern(n); + } +} diff --git a/recursiveFactorial.java b/recursiveFactorial.java new file mode 100644 index 00000000..b0ea7693 --- /dev/null +++ b/recursiveFactorial.java @@ -0,0 +1,25 @@ +import java.util.Scanner; + +public class recursiveFactorial { + + public static void main(String args[]) { + // Scanner object for capturing the user input + Scanner scanner = new Scanner(System.in); + System.out.println("Enter the number:"); + // Stored the entered value in variable + int num = scanner.nextInt(); + // Called the user defined function fact + int factorial = fact(num); + System.out.println("Factorial of entered number is: " + factorial); + } + + static int fact(int n) { + int output; + if (n == 1) { + return 1; + } + // Recursion: Function calling itself!! + output = fact(n - 1) * n; + return output; + } +} diff --git a/replit.nix b/replit.nix new file mode 100644 index 00000000..7f7e1291 --- /dev/null +++ b/replit.nix @@ -0,0 +1,8 @@ +{ pkgs }: { + deps = [ + pkgs.graalvm17-ce + pkgs.maven + pkgs.replitPackages.jdt-language-server + pkgs.replitPackages.java-debug + ]; +} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..4eadde41 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,46 @@ +absl-py==0.11.0 +astunparse==1.6.3 +cached-property==1.5.2 +cachetools==4.2.0 +certifi==2020.12.5 +chardet==4.0.0 +DateTime==4.3 +flatbuffers==1.12 +gast==0.3.3 +google-auth==1.24.0 +google-auth-oauthlib==0.4.2 +google-pasta==0.2.0 +grpcio==1.32.0 +h5py==2.10.0 +idna==2.10 +importlib-metadata==3.3.0 +Keras==2.4.3 +Keras-Preprocessing==1.1.2 +Markdown==3.3.3 +numpy==1.19.4 +oauthlib==3.1.0 +opencv-python==4.4.0.46 +opt-einsum==3.3.0 +protobuf==3.14.0 +pyasn1==0.4.8 +pyasn1-modules==0.2.8 +pyspark==3.0.1 +pytz==2020.5 +PyYAML==5.4 +requests==2.25.1 +requests-oauthlib==1.3.0 +rsa==4.7 +scipy==1.5.4 +six==1.15.0 +tensorboard==2.4.0 +tensorboard-plugin-wit==1.7.0 +tensorflow==2.5.0 +tensorflow-estimator==2.4.0 +termcolor==1.1.0 +typing-extensions==3.7.4.3 +urllib3==1.26.5 +Werkzeug==1.0.1 +wincertstore==0.2 +wrapt==1.12.1 +zipp==3.4.0 +zope.interface==5.2.0 diff --git a/resume-builder-java/resume_proj/AbsoluteLayout.jar b/resume-builder-java/resume_proj/AbsoluteLayout.jar new file mode 100644 index 00000000..ee023b60 Binary files /dev/null and b/resume-builder-java/resume_proj/AbsoluteLayout.jar differ diff --git a/resume-builder-java/resume_proj/build.xml b/resume-builder-java/resume_proj/build.xml new file mode 100644 index 00000000..20f2363f --- /dev/null +++ b/resume-builder-java/resume_proj/build.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- You may freely edit this file. See commented blocks below for --> +<!-- some examples of how to customize the build. --> +<!-- (If you delete it and reopen the project it will be recreated.) --> +<!-- By default, only the Clean and Build commands use this build script. --> +<!-- Commands such as Run, Debug, and Test only use this build script if --> +<!-- the Compile on Save feature is turned off for the project. --> +<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> +<!-- in the project's Project Properties dialog box.--> +<project name="resume_proj" default="default" basedir="."> + <description>Builds, tests, and runs the project resume_proj.</description> + <import file="nbproject/build-impl.xml"/> + <!-- + + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: + + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation + -pre-compile-single: called before javac compilation of single file + -post-compile-single: called after javac compilation of single file + -pre-compile-test: called before javac compilation of JUnit tests + -post-compile-test: called after javac compilation of JUnit tests + -pre-compile-test-single: called before javac compilation of single JUnit test + -post-compile-test-single: called after javac compilation of single JUunit test + -pre-jar: called before JAR building + -post-jar: called after JAR building + -post-clean: called after cleaning build products + + (Targets beginning with '-' are not intended to be called on their own.) + + Example of inserting an obfuscator after compilation could look like this: + + <target name="-post-compile"> + <obfuscate> + <fileset dir="${build.classes.dir}"/> + </obfuscate> + </target> + + For list of available properties check the imported + nbproject/build-impl.xml file. + + + Another way to customize the build is by overriding existing main targets. + The targets of interest are: + + -init-macrodef-javac: defines macro for javac compilation + -init-macrodef-junit: defines macro for junit execution + -init-macrodef-debug: defines macro for class debugging + -init-macrodef-java: defines macro for class execution + -do-jar: JAR building + run: execution of project + -javadoc-build: Javadoc generation + test-report: JUnit report generation + + An example of overriding the target for project execution could look like this: + + <target name="run" depends="resume_proj-impl.jar"> + <exec dir="bin" executable="launcher.exe"> + <arg file="${dist.jar}"/> + </exec> + </target> + + Notice that the overridden target depends on the jar target and not only on + the compile target as the regular run target does. Again, for a list of available + properties which you can use, check the target you are overriding in the + nbproject/build-impl.xml file. + + --> +</project> diff --git a/resume-builder-java/resume_proj/build/classes/RESS1.png b/resume-builder-java/resume_proj/build/classes/RESS1.png new file mode 100644 index 00000000..1027b3a6 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/RESS1.png differ diff --git a/resume-builder-java/resume_proj/build/classes/RESS2.png b/resume-builder-java/resume_proj/build/classes/RESS2.png new file mode 100644 index 00000000..fe1c89d6 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/RESS2.png differ diff --git a/resume-builder-java/resume_proj/build/classes/RESUME.doc b/resume-builder-java/resume_proj/build/classes/RESUME.doc new file mode 100644 index 00000000..cb438abc Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/RESUME.doc differ diff --git a/resume-builder-java/resume_proj/build/classes/RESUME2.doc b/resume-builder-java/resume_proj/build/classes/RESUME2.doc new file mode 100644 index 00000000..ffa77aa1 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/RESUME2.doc differ diff --git a/resume-builder-java/resume_proj/build/classes/Screenshot 2021-07-09 at 12.54.35 PM.png b/resume-builder-java/resume_proj/build/classes/Screenshot 2021-07-09 at 12.54.35 PM.png new file mode 100644 index 00000000..a27154c1 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/Screenshot 2021-07-09 at 12.54.35 PM.png differ diff --git a/resume-builder-java/resume_proj/build/classes/Screenshot 2021-07-10 at 12.01.53 PM.png b/resume-builder-java/resume_proj/build/classes/Screenshot 2021-07-10 at 12.01.53 PM.png new file mode 100644 index 00000000..fc65b07a Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/Screenshot 2021-07-10 at 12.01.53 PM.png differ diff --git a/resume-builder-java/resume_proj/build/classes/replace$1.class b/resume-builder-java/resume_proj/build/classes/replace$1.class new file mode 100644 index 00000000..4e96bbcd Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/replace$1.class differ diff --git a/resume-builder-java/resume_proj/build/classes/replace$2.class b/resume-builder-java/resume_proj/build/classes/replace$2.class new file mode 100644 index 00000000..6e76bfc3 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/replace$2.class differ diff --git a/resume-builder-java/resume_proj/build/classes/replace$3.class b/resume-builder-java/resume_proj/build/classes/replace$3.class new file mode 100644 index 00000000..618c1151 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/replace$3.class differ diff --git a/resume-builder-java/resume_proj/build/classes/replace$4.class b/resume-builder-java/resume_proj/build/classes/replace$4.class new file mode 100644 index 00000000..fc7dea44 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/replace$4.class differ diff --git a/resume-builder-java/resume_proj/build/classes/replace$5.class b/resume-builder-java/resume_proj/build/classes/replace$5.class new file mode 100644 index 00000000..b99ad038 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/replace$5.class differ diff --git a/resume-builder-java/resume_proj/build/classes/replace.class b/resume-builder-java/resume_proj/build/classes/replace.class new file mode 100644 index 00000000..f4ff8226 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/replace.class differ diff --git a/resume-builder-java/resume_proj/build/classes/replace.form b/resume-builder-java/resume_proj/build/classes/replace.form new file mode 100644 index 00000000..625e964b --- /dev/null +++ b/resume-builder-java/resume_proj/build/classes/replace.form @@ -0,0 +1,1053 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <NonVisualComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane2"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea2"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JScrollPane" name="jScrollPane3"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea3"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + </NonVisualComponents> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-9,0,0,3,119"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="CREATE CV"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="157" y="432" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JSeparator" name="jSeparator1"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="36" width="881" height="10"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value="ENTER YOUR DETAILS TO MAKE A RESUME"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="313" y="8" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Container class="javax.swing.JTabbedPane" name="jTabbedPane1"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="6" y="52" width="-1" height="374"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="GENERAL"> + <Property name="tabTitle" type="java.lang.String" value="GENERAL"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField1" min="-2" pref="238" max="-2" attributes="0"/> + <Component id="jTextField2" min="-2" pref="238" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="126" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jTextField4" min="-2" pref="240" max="-2" attributes="0"/> + <Component id="jTextField3" min="-2" pref="240" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel7" min="-2" max="-2" attributes="0"/> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <Component id="jLabel8" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Component id="jTextField9" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField5" alignment="0" pref="158" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField6" pref="158" max="32767" attributes="0"/> + <Component id="jTextField10" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="24" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField7" pref="158" max="32767" attributes="0"/> + <Component id="jTextField11" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField8" pref="158" max="32767" attributes="0"/> + <Component id="jTextField12" max="32767" attributes="0"/> + </Group> + </Group> + <Component id="jScrollPane1" min="-2" pref="752" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace pref="16" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField3" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField4" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="123" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextField5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField6" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField7" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField8" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField9" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField10" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField11" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField12" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="text" type="java.lang.String" value="OBJECTIVE:"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea1"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="9"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JTextField" name="jTextField3"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField3ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextField4"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="text" type="java.lang.String" value="SKILLS:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField5"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField6"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField7"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField1"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField2"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="text" type="java.lang.String" value="NAME:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="EMAIL ID:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="text" type="java.lang.String" value="MOBILE NUMBER:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField8"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="text" type="java.lang.String" value="LINKEDIN URL:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="text" type="java.lang.String" value="HOBBIES:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField9"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField10"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField11"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField12"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel2"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="PROJECTS/ EXPERIENCE"> + <Property name="tabTitle" type="java.lang.String" value="PROJECTS/ EXPERIENCE"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="25" max="-2" attributes="0"/> + <Component id="jTabbedPane2" pref="817" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jTabbedPane2" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JTabbedPane" name="jTabbedPane2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="99" red="99" type="rgb"/> + </Property> + </Properties> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel4"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="PROJECT 1"> + <Property name="tabTitle" type="java.lang.String" value="PROJECT 1"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel11" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jScrollPane4" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel9" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel10" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField13" pref="203" max="32767" attributes="0"/> + <Component id="jTextField14" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField13" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField14" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel11" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane4" min="-2" pref="184" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="15" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT TITLE: "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DURATION:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DESCRIPTION: "/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField13"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField14"> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane4"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea4"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="9"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="PROJECT 2"> + <Property name="tabTitle" type="java.lang.String" value="PROJECT 2"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel14" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jScrollPane5" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel12" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel13" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField15" alignment="0" pref="203" max="32767" attributes="0"/> + <Component id="jTextField16" alignment="0" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField15" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel13" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField16" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel14" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane5" alignment="0" min="-2" pref="184" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="15" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT TITLE: "/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField15"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DURATION:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField16"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DESCRIPTION: "/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane5"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea5"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="9"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel6"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="PROJECT 3"> + <Property name="tabTitle" type="java.lang.String" value="PROJECT 3"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel17" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jScrollPane6" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel15" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel16" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField17" alignment="0" pref="203" max="32767" attributes="0"/> + <Component id="jTextField18" alignment="0" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel15" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField17" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel16" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField18" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel17" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane6" alignment="0" min="-2" pref="184" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="15" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT TITLE: "/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField17"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel16"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DURATION:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField18"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel17"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DESCRIPTION: "/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane6"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea6"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="9"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel3"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="EDUCATION"> + <Property name="tabTitle" type="java.lang.String" value="EDUCATION"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jTabbedPane3" alignment="0" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jTabbedPane3" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JTabbedPane" name="jTabbedPane3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="99" red="99" type="rgb"/> + </Property> + </Properties> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel7"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="CURRENT (UNIV/ COLLEGE)"> + <Property name="tabTitle" type="java.lang.String" value="CURRENT (UNIV/ COLLEGE)"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="282" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel18" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel19" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel20" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel21" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel22" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField21" pref="198" max="32767" attributes="0"/> + <Component id="jTextField20" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField19" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField22" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField23" alignment="0" max="32767" attributes="0"/> + </Group> + <EmptySpace pref="167" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel18" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField19" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel19" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField20" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel20" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField21" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel21" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField22" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextField23" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel22" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="50" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel18"> + <Properties> + <Property name="text" type="java.lang.String" value="DEGREE NAME:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel19"> + <Properties> + <Property name="text" type="java.lang.String" value="BRANCH:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel20"> + <Properties> + <Property name="text" type="java.lang.String" value="UNIV/ COLLEGE NAME:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel21"> + <Properties> + <Property name="text" type="java.lang.String" value="BATCH:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel22"> + <Properties> + <Property name="text" type="java.lang.String" value="CGPA/PERCENTAGE:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField19"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField20"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField21"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField22"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField23"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel8"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="SENIOR SECONDARY (X11)"> + <Property name="tabTitle" type="java.lang.String" value="SENIOR SECONDARY (X11)"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="282" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel23" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel24" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel25" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel26" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel27" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField26" alignment="0" pref="198" max="32767" attributes="0"/> + <Component id="jTextField25" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField24" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField27" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField28" alignment="0" max="32767" attributes="0"/> + </Group> + <EmptySpace pref="184" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel23" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField24" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel24" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField25" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel25" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField26" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel26" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField27" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextField28" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel27" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="50" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel23"> + <Properties> + <Property name="text" type="java.lang.String" value="STREAM:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField24"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField25"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel24"> + <Properties> + <Property name="text" type="java.lang.String" value="BOARD:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel25"> + <Properties> + <Property name="text" type="java.lang.String" value="SCHOOL NAME:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField26"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField27"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel26"> + <Properties> + <Property name="text" type="java.lang.String" value="YEAR OF PASSING:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel27"> + <Properties> + <Property name="text" type="java.lang.String" value="CGPA/PERCENTAGE:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField28"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel9"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="SECONDARY (X)"> + <Property name="tabTitle" type="java.lang.String" value="SECONDARY (X)"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="282" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel29" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel30" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel31" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel32" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField31" alignment="0" pref="198" max="32767" attributes="0"/> + <Component id="jTextField30" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField32" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField33" alignment="0" max="32767" attributes="0"/> + </Group> + <EmptySpace pref="184" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="60" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel29" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField30" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel30" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField31" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel31" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField32" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextField33" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel32" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="64" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextField" name="jTextField30"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel29"> + <Properties> + <Property name="text" type="java.lang.String" value="BOARD:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel30"> + <Properties> + <Property name="text" type="java.lang.String" value="SCHOOL NAME:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField31"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField32"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel31"> + <Properties> + <Property name="text" type="java.lang.String" value="YEAR OF PASSING:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel32"> + <Properties> + <Property name="text" type="java.lang.String" value="CGPA/PERCENTAGE:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField33"> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="text" type="java.lang.String" value="RESET"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="665" y="432" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="text" type="java.lang.String" value="BACK"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="405" y="432" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel28"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Screenshot 2021-07-10 at 12.01.53 PM.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="890" height="510"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/resume-builder-java/resume_proj/build/classes/start$1.class b/resume-builder-java/resume_proj/build/classes/start$1.class new file mode 100644 index 00000000..e8ff96e5 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/start$1.class differ diff --git a/resume-builder-java/resume_proj/build/classes/start$2.class b/resume-builder-java/resume_proj/build/classes/start$2.class new file mode 100644 index 00000000..6f294b08 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/start$2.class differ diff --git a/resume-builder-java/resume_proj/build/classes/start$3.class b/resume-builder-java/resume_proj/build/classes/start$3.class new file mode 100644 index 00000000..d36c17a7 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/start$3.class differ diff --git a/resume-builder-java/resume_proj/build/classes/start.class b/resume-builder-java/resume_proj/build/classes/start.class new file mode 100644 index 00000000..82a19325 Binary files /dev/null and b/resume-builder-java/resume_proj/build/classes/start.class differ diff --git a/resume-builder-java/resume_proj/build/classes/start.form b/resume-builder-java/resume_proj/build/classes/start.form new file mode 100644 index 00000000..adf1cc63 --- /dev/null +++ b/resume-builder-java/resume_proj/build/classes/start.form @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,26,0,0,3,64"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/RESS1.png"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel1MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="40" y="80" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/RESS2.png"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder/> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel2MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="490" y="80" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="CHOOSE A RESUME TEMPLATE"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="300" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Screenshot 2021-07-09 at 12.54.35 PM.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/resume-builder-java/resume_proj/manifest.mf b/resume-builder-java/resume_proj/manifest.mf new file mode 100644 index 00000000..328e8e5b --- /dev/null +++ b/resume-builder-java/resume_proj/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/resume-builder-java/resume_proj/nbproject/build-impl.xml b/resume-builder-java/resume_proj/nbproject/build-impl.xml new file mode 100644 index 00000000..3121d8dd --- /dev/null +++ b/resume-builder-java/resume_proj/nbproject/build-impl.xml @@ -0,0 +1,1771 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +*** GENERATED FROM project.xml - DO NOT EDIT *** +*** EDIT ../build.xml INSTEAD *** + +For the purpose of easier reading the script +is divided into following sections: + + - initialization + - compilation + - jar + - execution + - debugging + - javadoc + - test compilation + - test execution + - test debugging + - applet + - cleanup + + --> +<project xmlns:if="ant:if" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" xmlns:unless="ant:unless" basedir=".." default="default" name="resume_proj-impl"> + <fail message="Please build using Ant 1.8.0 or higher."> + <condition> + <not> + <antversion atleast="1.8.0"/> + </not> + </condition> + </fail> + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> + <!-- + ====================== + INITIALIZATION SECTION + ====================== + --> + <target name="-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init" name="-init-private"> + <property file="nbproject/private/config.properties"/> + <property file="nbproject/private/configs/${config}.properties"/> + <property file="nbproject/private/private.properties"/> + </target> + <target depends="-pre-init,-init-private" name="-init-user"> + <property file="${user.properties.file}"/> + <!-- The two properties below are usually overridden --> + <!-- by the active platform. Just a fallback. --> + <property name="default.javac.source" value="1.6"/> + <property name="default.javac.target" value="1.6"/> + </target> + <target depends="-pre-init,-init-private,-init-user" name="-init-project"> + <property file="nbproject/configs/${config}.properties"/> + <property file="nbproject/project.properties"/> + </target> + <target name="-init-modules-supported"> + <condition property="modules.supported.internal" value="true"> + <not> + <matches pattern="1\.[0-8](\..*)?" string="${javac.source}"/> + </not> + </condition> + </target> + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-modulename"> + <macrodef name="modulename" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute name="property"/> + <attribute name="sourcepath"/> + <sequential> + <loadresource property="@{property}" quiet="true"> + <javaresource classpath="@{sourcepath}" name="module-info.java" parentFirst="false"/> + <filterchain> + <stripjavacomments/> + <linecontainsregexp> + <regexp pattern="module .* \{"/> + </linecontainsregexp> + <tokenfilter> + <linetokenizer/> + <replaceregex flags="s" pattern="(\s*module\s+)(\S*)(\s*\{.*)" replace="\2"/> + </tokenfilter> + <striplinebreaks/> + </filterchain> + </loadresource> + </sequential> + </macrodef> + </target> + <target depends="-init-modules-supported,-init-macrodef-modulename" if="modules.supported.internal" name="-init-source-module-properties"> + <fail message="Java 9 support requires Ant 1.10.0 or higher."> + <condition> + <not> + <antversion atleast="1.10.0"/> + </not> + </condition> + </fail> + <j2seproject3:modulename property="module.name" sourcepath="${src.dir}"/> + <condition property="named.module.internal"> + <and> + <isset property="module.name"/> + <length length="0" string="${module.name}" when="greater"/> + </and> + </condition> + <condition property="unnamed.module.internal"> + <not> + <isset property="named.module.internal"/> + </not> + </condition> + <property name="javac.modulepath" value=""/> + <property name="run.modulepath" value="${javac.modulepath}"/> + <property name="module.build.classes.dir" value="${build.classes.dir}"/> + <property name="debug.modulepath" value="${run.modulepath}"/> + <property name="javac.upgrademodulepath" value=""/> + <property name="run.upgrademodulepath" value="${javac.upgrademodulepath}"/> + <condition else="" property="javac.systemmodulepath.cmd.line.arg" value="--system '${javac.systemmodulepath}'"> + <and> + <isset property="javac.systemmodulepath"/> + <length length="0" string="${javac.systemmodulepath}" when="greater"/> + </and> + </condition> + <property name="dist.jlink.dir" value="${dist.dir}/jlink"/> + <property name="dist.jlink.output" value="${dist.jlink.dir}/${application.title}"/> + <property name="module.name" value=""/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property,-init-modules-supported" name="-do-init"> + <property name="platform.java" value="${java.home}/bin/java"/> + <available file="${manifest.file}" property="manifest.available"/> + <condition property="splashscreen.available"> + <and> + <not> + <equals arg1="${application.splash}" arg2="" trim="true"/> + </not> + <available file="${application.splash}"/> + </and> + </condition> + <condition property="main.class.available"> + <and> + <isset property="main.class"/> + <not> + <equals arg1="${main.class}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition property="profile.available"> + <and> + <isset property="javac.profile"/> + <length length="0" string="${javac.profile}" when="greater"/> + <not> + <matches pattern="1\.[0-7](\..*)?" string="${javac.source}"/> + </not> + </and> + </condition> + <condition property="do.archive"> + <or> + <not> + <istrue value="${jar.archive.disabled}"/> + </not> + <istrue value="${not.archive.disabled}"/> + </or> + </condition> + <condition property="do.archive+manifest.available"> + <and> + <isset property="manifest.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+main.class.available"> + <and> + <isset property="main.class.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+splashscreen.available"> + <and> + <isset property="splashscreen.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="do.archive+profile.available"> + <and> + <isset property="profile.available"/> + <istrue value="${do.archive}"/> + </and> + </condition> + <condition property="have.tests"> + <or> + <available file="${test.src.dir}"/> + </or> + </condition> + <condition property="have.sources"> + <or> + <available file="${src.dir}"/> + </or> + </condition> + <condition property="netbeans.home+have.tests"> + <and> + <isset property="netbeans.home"/> + <isset property="have.tests"/> + </and> + </condition> + <condition property="no.javadoc.preview"> + <and> + <isset property="javadoc.preview"/> + <isfalse value="${javadoc.preview}"/> + </and> + </condition> + <property name="run.jvmargs" value=""/> + <property name="run.jvmargs.ide" value=""/> + <property name="javac.compilerargs" value=""/> + <property name="work.dir" value="${basedir}"/> + <condition property="no.deps"> + <and> + <istrue value="${no.dependencies}"/> + </and> + </condition> + <property name="javac.debug" value="true"/> + <property name="javadoc.preview" value="true"/> + <property name="application.args" value=""/> + <property name="source.encoding" value="${file.encoding}"/> + <property name="runtime.encoding" value="${source.encoding}"/> + <property name="manifest.encoding" value="${source.encoding}"/> + <condition property="javadoc.encoding.used" value="${javadoc.encoding}"> + <and> + <isset property="javadoc.encoding"/> + <not> + <equals arg1="${javadoc.encoding}" arg2=""/> + </not> + </and> + </condition> + <property name="javadoc.encoding.used" value="${source.encoding}"/> + <property name="includes" value="**"/> + <property name="excludes" value=""/> + <property name="do.depend" value="false"/> + <condition property="do.depend.true"> + <istrue value="${do.depend}"/> + </condition> + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/> + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'"> + <and> + <isset property="endorsed.classpath"/> + <not> + <equals arg1="${endorsed.classpath}" arg2="" trim="true"/> + </not> + </and> + </condition> + <condition else="" property="javac.profile.cmd.line.arg" value="-profile ${javac.profile}"> + <isset property="profile.available"/> + </condition> + <condition else="false" property="jdkBug6558476"> + <and> + <matches pattern="1\.[56]" string="${java.specification.version}"/> + <not> + <os family="unix"/> + </not> + </and> + </condition> + <condition else="false" property="javac.fork"> + <or> + <istrue value="${jdkBug6558476}"/> + <istrue value="${javac.external.vm}"/> + </or> + </condition> + <property name="jar.index" value="false"/> + <property name="jar.index.metainf" value="${jar.index}"/> + <property name="copylibs.rebase" value="true"/> + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/> + <condition property="junit.available"> + <or> + <available classname="org.junit.Test" classpath="${run.test.classpath}"/> + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/> + </or> + </condition> + <condition property="testng.available"> + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/> + </condition> + <condition property="junit+testng.available"> + <and> + <istrue value="${junit.available}"/> + <istrue value="${testng.available}"/> + </and> + </condition> + <condition else="testng" property="testng.mode" value="mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <condition else="" property="testng.debug.mode" value="-mixed"> + <istrue value="${junit+testng.available}"/> + </condition> + <property name="java.failonerror" value="true"/> + </target> + <target name="-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check"> + <fail unless="src.dir">Must set src.dir</fail> + <fail unless="test.src.dir">Must set test.src.dir</fail> + <fail unless="build.dir">Must set build.dir</fail> + <fail unless="dist.dir">Must set dist.dir</fail> + <fail unless="build.classes.dir">Must set build.classes.dir</fail> + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail> + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail> + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail> + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail> + <fail unless="dist.jar">Must set dist.jar</fail> + </target> + <target name="-init-macrodef-property"> + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${@{value}}"/> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="modules.supported.internal" name="-init-macrodef-javac-with-module"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.modulepath}" name="modulepath"/> + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${javac.processormodulepath}" name="processormodulepath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath" unless:set="named.module.internal"/> + <attribute default="${src.dir}" if:set="named.module.internal" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <condition property="warn.excludes.internal"> + <and> + <isset property="named.module.internal"/> + <length length="0" string="@{excludes}" trim="true" when="greater"/> + </and> + </condition> + <echo if:set="warn.excludes.internal" level="warning" message="The javac excludes are not supported in the JDK 9 Named Module."/> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <mkdir dir="@{apgeneratedsrcdir}"/> + <condition property="processormodulepath.set"> + <resourcecount count="0" when="greater"> + <path> + <pathelement path="@{processormodulepath}"/> + </path> + </resourcecount> + </condition> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <modulepath> + <path path="@{modulepath}"/> + </modulepath> + <upgrademodulepath> + <path path="@{upgrademodulepath}"/> + </upgrademodulepath> + <compilerarg line="${javac.systemmodulepath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <compilerarg if:set="processormodulepath.set" value="--processor-module-path"/> + <compilerarg if:set="processormodulepath.set" path="@{processormodulepath}"/> + <compilerarg unless:set="processormodulepath.set" value="-processorpath"/> + <compilerarg path="@{processorpath}:${empty.dir}" unless:set="processormodulepath.set"/> + <compilerarg line="${ap.processors.internal}"/> + <compilerarg line="${annotation.processing.processor.options}"/> + <compilerarg value="-s"/> + <compilerarg path="@{apgeneratedsrcdir}"/> + <compilerarg line="${ap.proc.none.internal}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors" unless="modules.supported.internal"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.modulepath}" name="modulepath"/> + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <mkdir dir="@{apgeneratedsrcdir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <compilerarg value="-processorpath"/> + <compilerarg path="@{processorpath}:${empty.dir}"/> + <compilerarg line="${ap.processors.internal}"/> + <compilerarg line="${annotation.processing.processor.options}"/> + <compilerarg value="-s"/> + <compilerarg path="@{apgeneratedsrcdir}"/> + <compilerarg line="${ap.proc.none.internal}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-ap-cmdline-properties,-init-source-module-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal"> + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <attribute default="${javac.modulepath}" name="modulepath"/> + <attribute default="${javac.upgrademodulepath}" name="upgrademodulepath"/> + <attribute default="${javac.processorpath}" name="processorpath"/> + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="${javac.debug}" name="debug"/> + <attribute default="${empty.dir}" name="sourcepath"/> + <attribute default="${empty.dir}" name="gensrcdir"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.dir}/empty" name="empty.dir"/> + <mkdir dir="${empty.dir}"/> + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"> + <src> + <dirset dir="@{gensrcdir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </src> + <classpath> + <path path="@{classpath}"/> + </classpath> + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/> + <compilerarg line="${javac.profile.cmd.line.arg}"/> + <compilerarg line="${javac.compilerargs}"/> + <customize/> + </javac> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-javac-with-module,-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac"> + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${src.dir}" name="srcdir"/> + <attribute default="${build.classes.dir}" name="destdir"/> + <attribute default="${javac.classpath}" name="classpath"/> + <sequential> + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + </depend> + </sequential> + </macrodef> + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${build.classes.dir}" name="destdir"/> + <sequential> + <fail unless="javac.includes">Must set javac.includes</fail> + <pathconvert pathsep="${line.separator}" property="javac.includes.binary"> + <path> + <filelist dir="@{destdir}" files="${javac.includes}"/> + </path> + <globmapper from="*.java" to="*.class"/> + </pathconvert> + <tempfile deleteonexit="true" property="javac.includesfile.binary"/> + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/> + <delete> + <files includesfile="${javac.includesfile.binary}"/> + </delete> + <delete> + <fileset file="${javac.includesfile.binary}"/> + </delete> + </sequential> + </macrodef> + </target> + <target if="${junit.available}" name="-init-macrodef-junit-init"> + <condition else="false" property="nb.junit.batch" value="true"> + <and> + <istrue value="${junit.available}"/> + <not> + <isset property="test.method"/> + </not> + </and> + </condition> + <condition else="false" property="nb.junit.single" value="true"> + <and> + <istrue value="${junit.available}"/> + <isset property="test.method"/> + </and> + </condition> + </target> + <target name="-init-test-properties"> + <property name="test.binaryincludes" value="<nothing>"/> + <property name="test.binarytestincludes" value=""/> + <property name="test.binaryexcludes" value=""/> + </target> + <target depends="-init-modules-supported" if="modules.supported.internal" name="-init-macrodef-junit-prototype-with-module"> + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <element name="customizePrototype" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <modulepath> + <path path="${run.test.modulepath}"/> + </modulepath> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-ea"/> + <jvmarg line="${run.test.jvmargs}"/> + <customizePrototype/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-modules-supported" name="-init-macrodef-junit-prototype-without-module" unless="modules.supported.internal"> + <macrodef name="junit-prototype" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <element name="customizePrototype" optional="true"/> + <sequential> + <property name="junit.forkmode" value="perTest"/> + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}"> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <formatter type="brief" usefile="false"/> + <formatter type="xml"/> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-ea"/> + <customizePrototype/> + </junit> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-prototype> + <customizePrototype> + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/> + <customize/> + </customizePrototype> + </j2seproject3:junit-prototype> + </sequential> + </macrodef> + </target> + <target depends="-init-test-properties,-init-macrodef-junit-prototype-with-module,-init-macrodef-junit-prototype-without-module" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}"> + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <j2seproject3:junit-prototype> + <customizePrototype> + <batchtest todir="${build.test.results.dir}"> + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + <fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}"> + <filename name="${test.binarytestincludes}"/> + </fileset> + </batchtest> + <customize/> + </customizePrototype> + </j2seproject3:junit-prototype> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/> + <target if="${testng.available}" name="-init-macrodef-testng"> + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customize" optional="true"/> + <sequential> + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}"> + <isset property="test.method"/> + </condition> + <union id="test.set"> + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}"> + <filename name="@{testincludes}"/> + </fileset> + </union> + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/> + <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="resume_proj" testname="TestNG tests" workingDir="${work.dir}"> + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/> + <propertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </propertyset> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <customize/> + </testng> + </sequential> + </macrodef> + </target> + <target name="-init-macrodef-test-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <echo>No tests executed.</echo> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl"> + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element implicit="true" name="customize" optional="true"/> + <sequential> + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize/> + </j2seproject3:testng> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test"> + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <sequential> + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customize> + </j2seproject3:test-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-debug-impl"> + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <element name="customizeDebuggee" optional="true"/> + <sequential> + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customize> + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/> + <customizeDebuggee/> + </customize> + </j2seproject3:junit> + </sequential> + </macrodef> + </target> + <target if="${testng.available}" name="-init-macrodef-testng-debug"> + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element name="customize2" optional="true"/> + <sequential> + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}"> + <isset property="test.method"/> + </condition> + <condition else="-suitename resume_proj -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}"> + <matches pattern=".*\.xml" string="@{testClass}"/> + </condition> + <delete dir="${build.test.results.dir}" quiet="true"/> + <mkdir dir="${build.test.results.dir}"/> + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}"> + <customizeDebuggee> + <customize2/> + <jvmarg value="-ea"/> + <arg line="${testng.debug.mode}"/> + <arg line="-d ${build.test.results.dir}"/> + <arg line="-listener org.testng.reporters.VerboseReporter"/> + <arg line="${testng.cmd.args}"/> + </customizeDebuggee> + </j2seproject3:debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl"> + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <element implicit="true" name="customize2" optional="true"/> + <sequential> + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2/> + </j2seproject3:testng-debug> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}"> + <customizeDebuggee> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + </customizeDebuggee> + </j2seproject3:test-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng"> + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${includes}" name="includes"/> + <attribute default="${excludes}" name="excludes"/> + <attribute default="**" name="testincludes"/> + <attribute default="" name="testmethods"/> + <attribute default="${main.class}" name="testClass"/> + <attribute default="" name="testMethod"/> + <sequential> + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}"> + <customize2> + <syspropertyset> + <propertyref prefix="test-sys-prop."/> + <mapper from="test-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + </customize2> + </j2seproject3:testng-debug-impl> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/> + <!-- + pre NB7.2 profiling section; consider it deprecated + --> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/> + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-post-init"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile"> + <macrodef name="resolve"> + <attribute name="name"/> + <attribute name="value"/> + <sequential> + <property name="@{name}" value="${env.@{value}}"/> + </sequential> + </macrodef> + <macrodef name="profile"> + <attribute default="${main.class}" name="classname"/> + <element name="customize" optional="true"/> + <sequential> + <property environment="env"/> + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/> + <java classname="@{classname}" dir="${profiler.info.dir}" failonerror="${java.failonerror}" fork="true" jvm="${profiler.info.jvm}"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <arg line="${application.args}"/> + <classpath> + <path path="${run.classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check"> + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail> + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail> + </target> + <!-- + end of pre NB7.2 profiling section + --> + <target depends="-init-debug-args" name="-init-macrodef-nbjpda"> + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${main.class}" name="name"/> + <attribute default="${debug.modulepath}" name="modulepath"/> + <attribute default="${debug.classpath}" name="classpath"/> + <attribute default="" name="stopclassname"/> + <sequential> + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}"> + <modulepath> + <path path="@{modulepath}"/> + </modulepath> + <classpath> + <path path="@{classpath}"/> + </classpath> + </nbjpdastart> + </sequential> + </macrodef> + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${build.classes.dir}" name="dir"/> + <sequential> + <nbjpdareload> + <fileset dir="@{dir}" includes="${fix.classes}"> + <include name="${fix.includes}*.class"/> + </fileset> + </nbjpdareload> + </sequential> + </macrodef> + </target> + <target name="-init-debug-args"> + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem"> + <os family="windows"/> + </condition> + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}"> + <isset property="debug.transport"/> + </condition> + </target> + <target depends="-init-debug-args" name="-init-macrodef-debug"> + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${module.name}" name="modulename"/> + <attribute default="${main.class}" name="classname"/> + <attribute default="${debug.modulepath}" name="modulepath"/> + <attribute default="${debug.classpath}" name="classpath"/> + <element name="customizeDebuggee" optional="true"/> + <sequential> + <j2seproject1:java classname="@{classname}" classpath="@{classpath}" modulename="@{modulename}" modulepath="@{modulepath}"> + <customize> + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/> + <customizeDebuggee/> + </customize> + </j2seproject1:java> + </sequential> + </macrodef> + </target> + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-macrodef-java-with-module"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="${module.name}" name="modulename"/> + <attribute default="${main.class}" name="classname"/> + <attribute default="${run.modulepath}" name="modulepath"/> + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true" module="@{modulename}"> + <classpath> + <path path="@{classpath}"/> + </classpath> + <modulepath> + <pathelement path="@{modulepath}"/> + <pathelement location="${module.build.classes.dir}"/> + </modulepath> + <upgrademodulepath> + <path path="@{upgrademodulepath}"/> + </upgrademodulepath> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-init-source-module-properties" if="unnamed.module.internal" name="-init-macrodef-java-with-unnamed-module"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="" name="modulename"/> + <attribute default="${main.class}" name="classname"/> + <attribute default="${run.modulepath}" name="modulepath"/> + <attribute default="${run.upgrademodulepath}" name="upgrademodulepath"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true"> + <classpath> + <path path="@{classpath}"/> + </classpath> + <modulepath> + <path path="@{modulepath}"/> + </modulepath> + <upgrademodulepath> + <path path="@{upgrademodulepath}"/> + </upgrademodulepath> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-init-source-module-properties" name="-init-macrodef-java-without-module" unless="modules.supported.internal"> + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1"> + <attribute default="" name="modulename"/> + <attribute default="${main.class}" name="classname"/> + <attribute default="" name="modulepath"/> + <attribute default="${run.classpath}" name="classpath"/> + <attribute default="jvm" name="jvm"/> + <element name="customize" optional="true"/> + <sequential> + <java classname="@{classname}" dir="${work.dir}" failonerror="${java.failonerror}" fork="true"> + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/> + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/> + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/> + <jvmarg line="${run.jvmargs}"/> + <jvmarg line="${run.jvmargs.ide}"/> + <classpath> + <path path="@{classpath}"/> + </classpath> + <syspropertyset> + <propertyref prefix="run-sys-prop."/> + <mapper from="run-sys-prop.*" to="*" type="glob"/> + </syspropertyset> + <customize/> + </java> + </sequential> + </macrodef> + </target> + <target depends="-init-macrodef-java-with-module, -init-macrodef-java-with-unnamed-module, -init-macrodef-java-without-module" name="-init-macrodef-java"/> + <target name="-init-macrodef-copylibs"> + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3"> + <attribute default="${manifest.file}" name="manifest"/> + <element name="customize" optional="true"/> + <sequential> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <pathconvert property="run.classpath.without.build.classes.dir"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to=""/> + </pathconvert> + <pathconvert pathsep=" " property="jar.classpath"> + <path path="${run.classpath.without.build.classes.dir}"/> + <chainedmapper> + <flattenmapper/> + <filtermapper> + <replacestring from=" " to="%20"/> + </filtermapper> + <globmapper from="*" to="lib/*"/> + </chainedmapper> + </pathconvert> + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/> + <copylibs compress="${jar.compress}" excludeFromCopy="${copylibs.excludes}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" manifestencoding="UTF-8" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}"> + <fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + <manifest> + <attribute name="Class-Path" value="${jar.classpath}"/> + <customize/> + </manifest> + </copylibs> + </sequential> + </macrodef> + </target> + <target name="-init-presetdef-jar"> + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1"> + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}" manifestencoding="UTF-8"> + <j2seproject1:fileset dir="${build.classes.dir}" excludes="${dist.archive.excludes}"/> + </jar> + </presetdef> + </target> + <target name="-init-ap-cmdline-properties"> + <property name="annotation.processing.enabled" value="true"/> + <property name="annotation.processing.processors.list" value=""/> + <property name="annotation.processing.processor.options" value=""/> + <property name="annotation.processing.run.all.processors" value="true"/> + <property name="javac.processorpath" value="${javac.classpath}"/> + <property name="javac.test.processorpath" value="${javac.test.classpath}"/> + <condition property="ap.supported.internal" value="true"> + <not> + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/> + </not> + </condition> + </target> + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported"> + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}"> + <isfalse value="${annotation.processing.run.all.processors}"/> + </condition> + <condition else="" property="ap.proc.none.internal" value="-proc:none"> + <isfalse value="${annotation.processing.enabled}"/> + </condition> + </target> + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline"> + <property name="ap.cmd.line.internal" value=""/> + </target> + <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/> + <!-- + =================== + COMPILATION SECTION + =================== + --> + <target name="-deps-jar-init" unless="built-jar.properties"> + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/> + <delete file="${built-jar.properties}" quiet="true"/> + </target> + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar"> + <echo level="warn" message="Cycle detected: resume_proj was already built"/> + </target> + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-jar.properties}" verbose="false"/> + <property file="${built-jar.properties}" prefix="already.built.jar."/> + <antcall target="-warn-already-built-jar"/> + <propertyfile file="${built-jar.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/> + <target depends="init" name="-check-automatic-build"> + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/> + </target> + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build"> + <antcall target="clean"> + <param name="no.dependencies" value="true"/> + </antcall> + </target> + <target depends="init,deps-jar" name="-pre-pre-compile"> + <mkdir dir="${build.classes.dir}"/> + </target> + <target name="-pre-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target if="do.depend.true" name="-compile-depend"> + <pathconvert property="build.generated.subdirs"> + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="*"/> + </dirset> + </pathconvert> + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/> + </target> + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile"> + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/> + <copy todir="${build.classes.dir}"> + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target if="has.persistence.xml" name="-copy-persistence-xml"> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy todir="${build.classes.dir}/META-INF"> + <fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/> + </copy> + </target> + <target name="-post-compile"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/> + <target name="-pre-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile/> + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}, module-info.java" sourcepath="${src.dir}"/> + </target> + <target name="-post-compile-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/> + <!-- + ==================== + JAR BUILDING SECTION + ==================== + --> + <target depends="init" name="-pre-pre-jar"> + <dirname file="${dist.jar}" property="dist.jar.dir"/> + <mkdir dir="${dist.jar.dir}"/> + </target> + <target name="-pre-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile" name="-check-module-main-class"> + <pathconvert property="main.class.file"> + <string value="${main.class}"/> + <unpackagemapper from="*" to="*.class"/> + </pathconvert> + <condition property="do.module.main.class"> + <and> + <isset property="main.class.available"/> + <available file="${build.classes.dir}/module-info.class"/> + <available file="${build.classes.dir}/${main.class.file}"/> + <isset property="libs.CopyLibs.classpath"/> + <available classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}"/> + </and> + </condition> + </target> + <target depends="-check-module-main-class" if="do.module.main.class" name="-set-module-main-class"> + <taskdef classname="org.netbeans.modules.java.j2seproject.moduletask.ModuleMainClass" classpath="${libs.CopyLibs.classpath}" name="modulemainclass"/> + <modulemainclass failonerror="false" mainclass="${main.class}" moduleinfo="${build.classes.dir}/module-info.class"/> + </target> + <target depends="init" if="do.archive" name="-do-jar-create-manifest" unless="manifest.available"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <touch file="${tmp.manifest.file}" verbose="false"/> + </target> + <target depends="init" if="do.archive+manifest.available" name="-do-jar-copy-manifest"> + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/> + <copy encoding="${manifest.encoding}" file="${manifest.file}" outputencoding="UTF-8" tofile="${tmp.manifest.file}"/> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+main.class.available" name="-do-jar-set-mainclass"> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="Main-Class" value="${main.class}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+profile.available" name="-do-jar-set-profile"> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="Profile" value="${javac.profile}"/> + </manifest> + </target> + <target depends="init,-do-jar-create-manifest,-do-jar-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-set-splashscreen"> + <basename file="${application.splash}" property="splashscreen.basename"/> + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/> + <manifest encoding="UTF-8" file="${tmp.manifest.file}" mode="update"> + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/> + </manifest> + </target> + <target depends="init,compile" name="-check-do-mkdist"> + <condition property="do.mkdist"> + <and> + <isset property="do.archive"/> + <isset property="libs.CopyLibs.classpath"/> + <not> + <istrue value="${mkdist.disabled}"/> + </not> + <not> + <available file="${build.classes.dir}/module-info.class"/> + </not> + </and> + </condition> + </target> + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.mkdist" name="-do-jar-copylibs"> + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/> + <echo level="info">To run this application from the command line without Ant, try:</echo> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <echo level="info">java -jar "${dist.jar.resolved}"</echo> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-check-do-mkdist" if="do.archive" name="-do-jar-jar" unless="do.mkdist"> + <j2seproject1:jar manifest="${tmp.manifest.file}"/> + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/> + <property location="${dist.jar}" name="dist.jar.resolved"/> + <condition else="${dist.jar.resolved}" property="jar.usage.message.class.path.replacement" value=""> + <isset property="named.module.internal"/> + </condition> + <pathconvert property="run.classpath.with.dist.jar"> + <path path="${run.classpath}"/> + <map from="${build.classes.dir.resolved}" to="${jar.usage.message.class.path.replacement}"/> + </pathconvert> + <pathconvert property="run.modulepath.with.dist.jar"> + <path location="${dist.jar.resolved}"/> + <path path="${run.modulepath}"/> + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/> + </pathconvert> + <condition else="${run.modulepath}" property="jar.usage.message.run.modulepath.with.dist.jar" value="${run.modulepath.with.dist.jar}"> + <isset property="named.module.internal"/> + </condition> + <condition else="" property="jar.usage.message.module.path" value=" -p ${jar.usage.message.run.modulepath.with.dist.jar}"> + <and> + <isset property="modules.supported.internal"/> + <length length="0" string="${jar.usage.message.run.modulepath.with.dist.jar}" when="greater"/> + </and> + </condition> + <condition else="" property="jar.usage.message.class.path" value=" -cp ${run.classpath.with.dist.jar}"> + <length length="0" string="${run.classpath.with.dist.jar}" when="greater"/> + </condition> + <condition else="/${main.class}" property="jar.usage.message.main.class.class.selector" value=""> + <isset property="do.module.main.class"/> + </condition> + <condition else=" ${main.class}" property="jar.usage.message.main.class" value=" -m ${module.name}${jar.usage.message.main.class.class.selector}"> + <isset property="named.module.internal"/> + </condition> + <condition else="" property="jar.usage.message" value="To run this application from the command line without Ant, try:${line.separator}${platform.java}${jar.usage.message.module.path}${jar.usage.message.class.path}${jar.usage.message.main.class}"> + <isset property="main.class.available"/> + </condition> + <condition else="debug" property="jar.usage.level" value="info"> + <isset property="main.class.available"/> + </condition> + <echo level="${jar.usage.level}" message="${jar.usage.message}"/> + </target> + <target depends="-do-jar-copylibs" if="do.archive" name="-do-jar-delete-manifest"> + <delete> + <fileset file="${tmp.manifest.file}"/> + </delete> + </target> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-jar,-do-jar-delete-manifest" name="-do-jar-without-libraries"/> + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-create-manifest,-do-jar-copy-manifest,-do-jar-set-mainclass,-do-jar-set-profile,-do-jar-set-splashscreen,-do-jar-copylibs,-do-jar-delete-manifest" name="-do-jar-with-libraries"/> + <target name="-post-jar"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-jar,-set-module-main-class,-do-jar-without-libraries,-do-jar-with-libraries,-post-jar" name="-do-jar"/> + <target depends="init,compile,-pre-jar,-do-jar,-post-jar,deploy" description="Build JAR." name="jar"/> + <!-- + ================= + DEPLOY SECTION + ================= + --> + <target name="-pre-deploy"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init" name="-check-jlink"> + <condition property="do.jlink.internal"> + <and> + <istrue value="${do.jlink}"/> + <isset property="do.archive"/> + <isset property="named.module.internal"/> + </and> + </condition> + </target> + <target depends="init,-do-jar,-post-jar,-pre-deploy,-check-jlink" if="do.jlink.internal" name="-do-deploy"> + <delete dir="${dist.jlink.dir}" failonerror="false" quiet="true"/> + <property name="jlink.launcher.name" value="${application.title}"/> + <condition else="${module.name}" property="jlink.add.modules" value="${module.name},${jlink.additionalmodules}"> + <and> + <isset property="jlink.additionalmodules"/> + <length length="0" string="${jlink.additionalmodules}" when="greater"/> + </and> + </condition> + <condition property="jlink.do.strip.internal"> + <and> + <isset property="jlink.strip"/> + <istrue value="${jlink.strip}"/> + </and> + </condition> + <condition property="jlink.do.additionalparam.internal"> + <and> + <isset property="jlink.additionalparam"/> + <length length="0" string="${jlink.additionalparam}" when="greater"/> + </and> + </condition> + <condition property="jlink.do.launcher.internal"> + <and> + <istrue value="${jlink.launcher}"/> + <isset property="main.class.available"/> + </and> + </condition> + <property name="platform.jlink" value="${jdk.home}/bin/jlink"/> + <property name="jlink.systemmodules.internal" value="${jdk.home}/jmods"/> + <exec executable="${platform.jlink}"> + <arg value="--module-path"/> + <arg path="${jlink.systemmodules.internal}:${run.modulepath}:${dist.jar}"/> + <arg value="--add-modules"/> + <arg value="${jlink.add.modules}"/> + <arg if:set="jlink.do.strip.internal" value="--strip-debug"/> + <arg if:set="jlink.do.launcher.internal" value="--launcher"/> + <arg if:set="jlink.do.launcher.internal" value="${jlink.launcher.name}=${module.name}/${main.class}"/> + <arg if:set="jlink.do.additionalparam.internal" line="${jlink.additionalparam}"/> + <arg value="--output"/> + <arg value="${dist.jlink.output}"/> + </exec> + </target> + <target name="-post-deploy"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-do-jar,-post-jar,-pre-deploy,-do-deploy,-post-deploy" name="deploy"/> + <!-- + ================= + EXECUTION SECTION + ================= + --> + <target depends="init,compile" description="Run a main class." name="run"> + <j2seproject1:java> + <customize> + <arg line="${application.args}"/> + </customize> + </j2seproject1:java> + </target> + <target name="-do-not-recompile"> + <property name="javac.includes.binary" value=""/> + </target> + <target depends="init,compile-single" name="run-single"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}"/> + </target> + <target depends="init,compile-test-single" name="run-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/> + </target> + <!-- + ================= + DEBUGGING SECTION + ================= + --> + <target depends="init" if="netbeans.home" name="-debug-start-debugger"> + <j2seproject1:nbjpdastart name="${debug.class}"/> + </target> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/> + </target> + <target depends="init,compile" name="-debug-start-debuggee"> + <j2seproject3:debug> + <customizeDebuggee> + <arg line="${application.args}"/> + </customizeDebuggee> + </j2seproject3:debug> + </target> + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/> + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto"> + <j2seproject1:nbjpdastart stopclassname="${main.class}"/> + </target> + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}"/> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/> + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test"> + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/> + </target> + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/> + <target depends="init" name="-pre-debug-fix"> + <fail unless="fix.includes">Must set fix.includes</fail> + <property name="javac.includes" value="${fix.includes}.java"/> + </target> + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix"> + <j2seproject1:nbjpdareload/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/> + <!-- + ================= + PROFILING SECTION + ================= + --> + <!-- + pre NB7.2 profiler integration + --> + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile/> + </target> + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72"> + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="${profile.class}"/> + </target> + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.classpath}"/> + </classpath> + </nbprofiledirect> + <profile classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </profile> + </target> + <target depends="-init-macrodef-junit,profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72"> + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail> + <nbprofiledirect> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + </nbprofiledirect> + <j2seproject3:junit excludes="${excludes}" includes="${includes}" testincludes="${profile.class}" testmethods=""> + <customize> + <jvmarg value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/> + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/> + <jvmarg value="${profiler.info.jvmargs.agent}"/> + <jvmarg line="${profiler.info.jvmargs}"/> + <classpath> + <path path="${run.test.classpath}"/> + </classpath> + </customize> + </j2seproject3:junit> + </target> + <!-- + end of pre NB72 profiling section + --> + <target if="netbeans.home" name="-profile-check"> + <condition property="profiler.configured"> + <or> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/> + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/> + </or> + </condition> + </target> + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent"> + <startprofiler/> + <antcall target="run"/> + </target> + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-single"/> + </target> + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/> + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <startprofiler/> + <antcall target="test-single"/> + </target> + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main"> + <fail unless="run.class">Must select one file in the IDE or set run.class</fail> + <startprofiler/> + <antcall target="run-test-with-main"/> + </target> + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <startprofiler/> + <antcall target="run-applet"/> + </target> + <!-- + =============== + JAVADOC SECTION + =============== + --> + <target depends="init" if="have.sources" name="-javadoc-build"> + <mkdir dir="${dist.javadoc.dir}"/> + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}"> + <and> + <isset property="endorsed.classpath.cmd.line.arg"/> + <not> + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/> + </not> + </and> + </condition> + <condition else="" property="bug5101868workaround" value="*.java"> + <matches pattern="1\.[56](\..*)?" string="${java.version}"/> + </condition> + <condition else="" property="javadoc.html5.cmd.line.arg" value="-html5"> + <and> + <isset property="javadoc.html5"/> + <available file="${jdk.home}${file.separator}lib${file.separator}jrt-fs.jar"/> + </and> + </condition> + <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> + <classpath> + <path path="${javac.classpath}"/> + </classpath> + <fileset dir="${src.dir}" excludes="${bug5101868workaround},${excludes}" includes="${includes}"> + <filename name="**/*.java"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/*.java"/> + <exclude name="*.java"/> + </fileset> + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/> + <arg line="${javadoc.html5.cmd.line.arg}"/> + </javadoc> + <copy todir="${dist.javadoc.dir}"> + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}"> + <filename name="**/doc-files/**"/> + </fileset> + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false"> + <include name="**/doc-files/**"/> + </fileset> + </copy> + </target> + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview"> + <nbbrowse file="${dist.javadoc.dir}/index.html"/> + </target> + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/> + <!-- + ========================= + TEST COMPILATION SECTION + ========================= + --> + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> + <mkdir dir="${build.test.classes.dir}"/> + </target> + <target name="-pre-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-javac-module-properties-with-module"> + <j2seproject3:modulename property="test.module.name" sourcepath="${test.src.dir}"/> + <condition else="${empty.dir}" property="javac.test.sourcepath" value="${test.src.dir}"> + <and> + <isset property="test.module.name"/> + <length length="0" string="${test.module.name}" when="greater"/> + </and> + </condition> + <condition else="--patch-module ${module.name}=${test.src.dir} --add-reads ${module.name}=ALL-UNNAMED" property="javac.test.compilerargs" value="--add-reads ${test.module.name}=ALL-UNNAMED"> + <and> + <isset property="test.module.name"/> + <length length="0" string="${test.module.name}" when="greater"/> + </and> + </condition> + </target> + <target depends="-init-source-module-properties" if="named.module.internal" name="-init-test-run-module-properties"> + <condition else="${module.name}" property="run.test.addexport.source.module.internal" value="${test.module.name}"> + <and> + <isset property="test.module.name"/> + <length length="0" string="${test.module.name}" when="greater"/> + </and> + </condition> + <fileset dir="${build.test.classes.dir}" id="run.test.packages.internal" includes="**/*.class"/> + <property location="${build.test.classes.dir}" name="build.test.classes.dir.abs.internal"/> + <pathconvert pathsep=" " property="run.test.addexports.internal" refid="run.test.packages.internal"> + <chainedmapper> + <regexpmapper from="^(.*)\Q${file.separator}\E.*\.class$$" to="\1"/> + <filtermapper> + <uniqfilter/> + <replacestring from="${build.test.classes.dir.abs.internal}" to=""/> + </filtermapper> + <cutdirsmapper dirs="1"/> + <packagemapper from="*" to="--add-exports ${run.test.addexport.source.module.internal}/*=ALL-UNNAMED"/> + </chainedmapper> + </pathconvert> + <condition else="--patch-module ${module.name}=${build.test.classes.dir} --add-modules ${module.name} --add-reads ${module.name}=ALL-UNNAMED ${run.test.addexports.internal}" property="run.test.jvmargs" value="--add-modules ${test.module.name} --add-reads ${test.module.name}=ALL-UNNAMED ${run.test.addexports.internal}"> + <and> + <isset property="test.module.name"/> + <length length="0" string="${test.module.name}" when="greater"/> + </and> + </condition> + </target> + <target depends="-init-source-module-properties" name="-init-test-module-properties-without-module" unless="named.module.internal"> + <property name="javac.test.sourcepath" value="${empty.dir}"/> + <property name="javac.test.compilerargs" value=""/> + <property name="run.test.jvmargs" value=""/> + </target> + <target depends="-init-test-javac-module-properties-with-module,-init-test-module-properties-without-module" name="-init-test-module-properties"/> + <target if="do.depend.true" name="-compile-test-depend"> + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/> + </target> + <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test"> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${javac.test.sourcepath}" srcdir="${test.src.dir}"> + <customize> + <compilerarg line="${javac.test.compilerargs}"/> + </customize> + </j2seproject3:javac> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/> + <target name="-pre-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-jar,compile,-init-test-module-properties,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single"> + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail> + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/> + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}, module-info.java" modulepath="${javac.test.modulepath}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"> + <customize> + <compilerarg line="${javac.test.compilerargs}"/> + </customize> + </j2seproject3:javac> + <copy todir="${build.test.classes.dir}"> + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/> + </copy> + </target> + <target name="-post-compile-test-single"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> + <!-- + ======================= + TEST EXECUTION SECTION + ======================= + --> + <target depends="init" if="have.tests" name="-pre-test-run"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test,-init-test-run-module-properties,-pre-test-run" if="have.tests" name="-do-test-run"> + <j2seproject3:test includes="${includes}" testincludes="**/*Test.java"/> + </target> + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init" if="have.tests" name="test-report"/> + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/> + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/> + <target depends="init" if="have.tests" name="-pre-test-run-single"> + <mkdir dir="${build.test.results.dir}"/> + </target> + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single" if="have.tests" name="-do-test-run-single"> + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail> + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method"> + <fail unless="test.class">Must select some files in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method"> + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail> + </target> + <target depends="init,compile-test-single,-init-test-run-module-properties,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/> + <!-- + ======================= + TEST DEBUGGING SECTION + ======================= + --> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/> + </target> + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method"> + <fail unless="test.class">Must select one file in the IDE or set test.class</fail> + <fail unless="test.method">Must select some method in the IDE or set test.method</fail> + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/> + </target> + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test"> + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/> + </target> + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/> + <target depends="init,compile-test-single,-init-test-run-module-properties,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/> + <target depends="debug-test-method" name="debug-single-method"/> + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test"> + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/> + </target> + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> + <!-- + ========================= + APPLET EXECUTION SECTION + ========================= + --> + <target depends="init,compile-single" name="run-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject1:java classname="sun.applet.AppletViewer"> + <customize> + <arg value="${applet.url}"/> + </customize> + </j2seproject1:java> + </target> + <!-- + ========================= + APPLET DEBUGGING SECTION + ========================= + --> + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet"> + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail> + <j2seproject3:debug classname="sun.applet.AppletViewer"> + <customizeDebuggee> + <arg value="${applet.url}"/> + </customizeDebuggee> + </j2seproject3:debug> + </target> + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/> + <!-- + =============== + CLEANUP SECTION + =============== + --> + <target name="-deps-clean-init" unless="built-clean.properties"> + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/> + <delete file="${built-clean.properties}" quiet="true"/> + </target> + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean"> + <echo level="warn" message="Cycle detected: resume_proj was already built"/> + </target> + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps"> + <mkdir dir="${build.dir}"/> + <touch file="${built-clean.properties}" verbose="false"/> + <property file="${built-clean.properties}" prefix="already.built.clean."/> + <antcall target="-warn-already-built-clean"/> + <propertyfile file="${built-clean.properties}"> + <entry key="${basedir}" value=""/> + </propertyfile> + </target> + <target depends="init" name="-do-clean"> + <delete dir="${build.dir}"/> + <delete dir="${dist.jlink.output}"/> + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/> + </target> + <target name="-post-clean"> + <!-- Empty placeholder for easier customization. --> + <!-- You can override this target in the ../build.xml file. --> + </target> + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/> + <target name="-check-call-dep"> + <property file="${call.built.properties}" prefix="already.built."/> + <condition property="should.call.dep"> + <and> + <not> + <isset property="already.built.${call.subproject}"/> + </not> + <available file="${call.script}"/> + </and> + </condition> + </target> + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep"> + <ant antfile="${call.script}" inheritall="false" target="${call.target}"> + <propertyset> + <propertyref prefix="transfer."/> + <mapper from="transfer.*" to="*" type="glob"/> + </propertyset> + </ant> + </target> +</project> diff --git a/resume-builder-java/resume_proj/nbproject/genfiles.properties b/resume-builder-java/resume_proj/nbproject/genfiles.properties new file mode 100644 index 00000000..3f5de4b3 --- /dev/null +++ b/resume-builder-java/resume_proj/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=9b87a647 +build.xml.script.CRC32=cc43b192 +build.xml.stylesheet.CRC32=f85dc8f2@1.99.0.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=9b87a647 +nbproject/build-impl.xml.script.CRC32=81985337 +nbproject/build-impl.xml.stylesheet.CRC32=d549e5cc@1.99.0.48 diff --git a/resume-builder-java/resume_proj/nbproject/private/config.properties b/resume-builder-java/resume_proj/nbproject/private/config.properties new file mode 100644 index 00000000..e69de29b diff --git a/resume-builder-java/resume_proj/nbproject/private/private.properties b/resume-builder-java/resume_proj/nbproject/private/private.properties new file mode 100644 index 00000000..fe1af954 --- /dev/null +++ b/resume-builder-java/resume_proj/nbproject/private/private.properties @@ -0,0 +1,8 @@ +compile.on.save=true +do.depend=false +do.jar=true +do.jlink=false +javac.debug=true +javadoc.preview=true +jlink.strip=false +user.properties.file=/Users/madhuragrawal/Library/Application Support/NetBeans/12.4/build.properties diff --git a/resume-builder-java/resume_proj/nbproject/private/private.xml b/resume-builder-java/resume_proj/nbproject/private/private.xml new file mode 100644 index 00000000..bd200ce1 --- /dev/null +++ b/resume-builder-java/resume_proj/nbproject/private/private.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> + <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> + <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> + <group> + <file>file:/Users/madhuragrawal/Desktop/Madhur/PROJECTS/resume_proj/src/start.java</file> + <file>file:/Users/madhuragrawal/Desktop/Madhur/PROJECTS/resume_proj/src/replace.java</file> + </group> + </open-files> +</project-private> diff --git a/resume-builder-java/resume_proj/nbproject/project.properties b/resume-builder-java/resume_proj/nbproject/project.properties new file mode 100644 index 00000000..48c9acd5 --- /dev/null +++ b/resume-builder-java/resume_proj/nbproject/project.properties @@ -0,0 +1,140 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=resume_proj +application.vendor=madhuragrawal +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.modulepath=\ + ${run.modulepath} +debug.test.classpath=\ + ${run.test.classpath} +debug.test.modulepath=\ + ${run.test.modulepath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/resume_proj.jar +dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= +excludes= +file.reference.batik-all-1.13.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/auxiliary/batik-all-1.13.jar +file.reference.bcpkix-jdk15on-1.68.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/auxiliary/bcpkix-jdk15on-1.68.jar +file.reference.bcprov-jdk15on-1.68.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/auxiliary/bcprov-jdk15on-1.68.jar +file.reference.commons-codec-1.15.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/lib/commons-codec-1.15.jar +file.reference.commons-collections4-4.4.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/lib/commons-collections4-4.4.jar +file.reference.commons-compress-1.20.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/ooxml-lib/commons-compress-1.20.jar +file.reference.commons-math3-3.6.1.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/lib/commons-math3-3.6.1.jar +file.reference.curvesapi-1.06.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/ooxml-lib/curvesapi-1.06.jar +file.reference.fontbox-2.0.22.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/auxiliary/fontbox-2.0.22.jar +file.reference.graphics2d-0.30.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/auxiliary/graphics2d-0.30.jar +file.reference.pdfbox-2.0.22.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/auxiliary/pdfbox-2.0.22.jar +file.reference.poi-5.0.0.jar=../../../../Downloads/poi-5.0.0/poi-5.0.0.jar +file.reference.poi-examples-5.0.0.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/poi-examples-5.0.0.jar +file.reference.poi-excelant-5.0.0.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/poi-excelant-5.0.0.jar +file.reference.poi-integration-5.0.0.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/poi-integration-5.0.0.jar +file.reference.poi-ooxml-5.0.0.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/poi-ooxml-5.0.0.jar +file.reference.poi-ooxml-full-5.0.0.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/poi-ooxml-full-5.0.0.jar +file.reference.poi-ooxml-lite-5.0.0.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/poi-ooxml-lite-5.0.0.jar +file.reference.poi-scratchpad-5.0.0.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/poi-scratchpad-5.0.0.jar +file.reference.SparseBitSet-1.2.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/lib/SparseBitSet-1.2.jar +file.reference.xml-apis-ext-1.3.04.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/auxiliary/xml-apis-ext-1.3.04.jar +file.reference.xmlbeans-4.0.0.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/ooxml-lib/xmlbeans-4.0.0.jar +file.reference.xmlgraphics-commons-2.4.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/auxiliary/xmlgraphics-commons-2.4.jar +file.reference.xmlsec-2.2.1.jar=/Users/madhuragrawal/Downloads/poi-5.0.0/auxiliary/xmlsec-2.2.1.jar +includes=** +jar.compress=false +javac.classpath=\ + ${file.reference.poi-5.0.0.jar}:\ + ${file.reference.poi-scratchpad-5.0.0.jar}:\ + ${libs.Absolute.classpath}:\ + ${file.reference.SparseBitSet-1.2.jar}:\ + ${file.reference.commons-codec-1.15.jar}:\ + ${file.reference.commons-collections4-4.4.jar}:\ + ${file.reference.commons-math3-3.6.1.jar}:\ + ${file.reference.commons-compress-1.20.jar}:\ + ${file.reference.curvesapi-1.06.jar}:\ + ${file.reference.xmlbeans-4.0.0.jar}:\ + ${file.reference.poi-examples-5.0.0.jar}:\ + ${file.reference.poi-excelant-5.0.0.jar}:\ + ${file.reference.poi-integration-5.0.0.jar}:\ + ${file.reference.poi-ooxml-5.0.0.jar}:\ + ${file.reference.poi-ooxml-full-5.0.0.jar}:\ + ${file.reference.poi-ooxml-lite-5.0.0.jar}:\ + ${file.reference.batik-all-1.13.jar}:\ + ${file.reference.bcpkix-jdk15on-1.68.jar}:\ + ${file.reference.bcprov-jdk15on-1.68.jar}:\ + ${file.reference.fontbox-2.0.22.jar}:\ + ${file.reference.graphics2d-0.30.jar}:\ + ${file.reference.pdfbox-2.0.22.jar}:\ + ${file.reference.xml-apis-ext-1.3.04.jar}:\ + ${file.reference.xmlgraphics-commons-2.4.jar}:\ + ${file.reference.xmlsec-2.2.1.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.modulepath= +javac.processormodulepath= +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.modulepath=\ + ${javac.modulepath} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.html5=false +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +jlink.launcher=false +jlink.launcher.name=resume_proj +main.class=start +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.modulepath=\ + ${javac.modulepath} +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +run.test.modulepath=\ + ${javac.test.modulepath} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/resume-builder-java/resume_proj/nbproject/project.xml b/resume-builder-java/resume_proj/nbproject/project.xml new file mode 100644 index 00000000..1c291931 --- /dev/null +++ b/resume-builder-java/resume_proj/nbproject/project.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://www.netbeans.org/ns/project/1"> + <type>org.netbeans.modules.java.j2seproject</type> + <configuration> + <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> + <name>resume_proj</name> + <source-roots> + <root id="src.dir"/> + </source-roots> + <test-roots> + <root id="test.src.dir"/> + </test-roots> + </data> + </configuration> +</project> diff --git a/resume-builder-java/resume_proj/src/RESS1.png b/resume-builder-java/resume_proj/src/RESS1.png new file mode 100644 index 00000000..1027b3a6 Binary files /dev/null and b/resume-builder-java/resume_proj/src/RESS1.png differ diff --git a/resume-builder-java/resume_proj/src/RESS2.png b/resume-builder-java/resume_proj/src/RESS2.png new file mode 100644 index 00000000..fe1c89d6 Binary files /dev/null and b/resume-builder-java/resume_proj/src/RESS2.png differ diff --git a/resume-builder-java/resume_proj/src/RESUME.doc b/resume-builder-java/resume_proj/src/RESUME.doc new file mode 100644 index 00000000..cb438abc Binary files /dev/null and b/resume-builder-java/resume_proj/src/RESUME.doc differ diff --git a/resume-builder-java/resume_proj/src/RESUME2.doc b/resume-builder-java/resume_proj/src/RESUME2.doc new file mode 100644 index 00000000..ffa77aa1 Binary files /dev/null and b/resume-builder-java/resume_proj/src/RESUME2.doc differ diff --git a/resume-builder-java/resume_proj/src/Screenshot 2021-07-09 at 12.54.35 PM.png b/resume-builder-java/resume_proj/src/Screenshot 2021-07-09 at 12.54.35 PM.png new file mode 100644 index 00000000..a27154c1 Binary files /dev/null and b/resume-builder-java/resume_proj/src/Screenshot 2021-07-09 at 12.54.35 PM.png differ diff --git a/resume-builder-java/resume_proj/src/Screenshot 2021-07-10 at 12.01.53 PM.png b/resume-builder-java/resume_proj/src/Screenshot 2021-07-10 at 12.01.53 PM.png new file mode 100644 index 00000000..fc65b07a Binary files /dev/null and b/resume-builder-java/resume_proj/src/Screenshot 2021-07-10 at 12.01.53 PM.png differ diff --git a/resume-builder-java/resume_proj/src/replace.form b/resume-builder-java/resume_proj/src/replace.form new file mode 100644 index 00000000..625e964b --- /dev/null +++ b/resume-builder-java/resume_proj/src/replace.form @@ -0,0 +1,1053 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <NonVisualComponents> + <Container class="javax.swing.JScrollPane" name="jScrollPane2"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea2"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JScrollPane" name="jScrollPane3"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea3"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + </Component> + </SubComponents> + </Container> + </NonVisualComponents> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,-9,0,0,3,119"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JButton" name="jButton1"> + <Properties> + <Property name="text" type="java.lang.String" value="CREATE CV"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="157" y="432" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JSeparator" name="jSeparator1"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="36" width="881" height="10"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="text" type="java.lang.String" value="ENTER YOUR DETAILS TO MAKE A RESUME"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="313" y="8" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Container class="javax.swing.JTabbedPane" name="jTabbedPane1"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="6" y="52" width="-1" height="374"/> + </Constraint> + </Constraints> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="GENERAL"> + <Property name="tabTitle" type="java.lang.String" value="GENERAL"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField1" min="-2" pref="238" max="-2" attributes="0"/> + <Component id="jTextField2" min="-2" pref="238" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="126" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jTextField4" min="-2" pref="240" max="-2" attributes="0"/> + <Component id="jTextField3" min="-2" pref="240" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel7" min="-2" max="-2" attributes="0"/> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <Component id="jLabel8" alignment="1" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="1" max="-2" attributes="0"> + <Component id="jTextField9" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField5" alignment="0" pref="158" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField6" pref="158" max="32767" attributes="0"/> + <Component id="jTextField10" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="24" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField7" pref="158" max="32767" attributes="0"/> + <Component id="jTextField11" max="32767" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField8" pref="158" max="32767" attributes="0"/> + <Component id="jTextField12" max="32767" attributes="0"/> + </Group> + </Group> + <Component id="jScrollPane1" min="-2" pref="752" max="-2" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace pref="16" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField3" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField2" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField4" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel6" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane1" min="-2" pref="123" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextField5" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField6" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField7" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField8" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField9" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField10" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField11" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField12" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="text" type="java.lang.String" value="OBJECTIVE:"/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane1"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea1"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="9"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JTextField" name="jTextField3"> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextField3ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextField4"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="text" type="java.lang.String" value="SKILLS:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField5"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField6"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField7"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField1"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField2"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="text" type="java.lang.String" value="NAME:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="EMAIL ID:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="text" type="java.lang.String" value="MOBILE NUMBER:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField8"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="text" type="java.lang.String" value="LINKEDIN URL:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="text" type="java.lang.String" value="HOBBIES:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField9"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField10"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField11"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField12"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel2"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="PROJECTS/ EXPERIENCE"> + <Property name="tabTitle" type="java.lang.String" value="PROJECTS/ EXPERIENCE"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace min="-2" pref="25" max="-2" attributes="0"/> + <Component id="jTabbedPane2" pref="817" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jTabbedPane2" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JTabbedPane" name="jTabbedPane2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="99" red="99" type="rgb"/> + </Property> + </Properties> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel4"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="PROJECT 1"> + <Property name="tabTitle" type="java.lang.String" value="PROJECT 1"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel11" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jScrollPane4" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel9" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel10" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField13" pref="203" max="32767" attributes="0"/> + <Component id="jTextField14" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel9" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField13" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField14" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel11" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane4" min="-2" pref="184" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="15" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT TITLE: "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DURATION:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DESCRIPTION: "/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField13"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField14"> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane4"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea4"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="9"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel5"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="PROJECT 2"> + <Property name="tabTitle" type="java.lang.String" value="PROJECT 2"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel14" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jScrollPane5" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel12" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel13" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField15" alignment="0" pref="203" max="32767" attributes="0"/> + <Component id="jTextField16" alignment="0" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel12" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField15" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel13" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField16" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel14" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane5" alignment="0" min="-2" pref="184" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="15" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT TITLE: "/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField15"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DURATION:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField16"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DESCRIPTION: "/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane5"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea5"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="9"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel6"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="PROJECT 3"> + <Property name="tabTitle" type="java.lang.String" value="PROJECT 3"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel17" min="-2" max="-2" attributes="0"/> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jScrollPane6" max="32767" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel15" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel16" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField17" alignment="0" pref="203" max="32767" attributes="0"/> + <Component id="jTextField18" alignment="0" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel15" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField17" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel16" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField18" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel17" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jScrollPane6" alignment="0" min="-2" pref="184" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="15" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT TITLE: "/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField17"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel16"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DURATION:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField18"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel17"> + <Properties> + <Property name="text" type="java.lang.String" value="PROJECT DESCRIPTION: "/> + </Properties> + </Component> + <Container class="javax.swing.JScrollPane" name="jScrollPane6"> + <AuxValues> + <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> + <SubComponents> + <Component class="javax.swing.JTextArea" name="jTextArea6"> + <Properties> + <Property name="columns" type="int" value="20"/> + <Property name="rows" type="int" value="5"/> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="9"/> + </AuxValues> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel3"> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="EDUCATION"> + <Property name="tabTitle" type="java.lang.String" value="EDUCATION"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jTabbedPane3" alignment="0" max="32767" attributes="0"/> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jTabbedPane3" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JTabbedPane" name="jTabbedPane3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="99" red="99" type="rgb"/> + </Property> + </Properties> + + <Layout class="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout"/> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel7"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="CURRENT (UNIV/ COLLEGE)"> + <Property name="tabTitle" type="java.lang.String" value="CURRENT (UNIV/ COLLEGE)"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="282" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel18" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel19" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel20" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel21" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel22" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField21" pref="198" max="32767" attributes="0"/> + <Component id="jTextField20" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField19" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField22" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField23" alignment="0" max="32767" attributes="0"/> + </Group> + <EmptySpace pref="167" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel18" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField19" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel19" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField20" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel20" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField21" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel21" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField22" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextField23" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel22" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="50" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel18"> + <Properties> + <Property name="text" type="java.lang.String" value="DEGREE NAME:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel19"> + <Properties> + <Property name="text" type="java.lang.String" value="BRANCH:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel20"> + <Properties> + <Property name="text" type="java.lang.String" value="UNIV/ COLLEGE NAME:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel21"> + <Properties> + <Property name="text" type="java.lang.String" value="BATCH:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel22"> + <Properties> + <Property name="text" type="java.lang.String" value="CGPA/PERCENTAGE:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField19"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField20"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField21"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField22"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField23"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel8"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="SENIOR SECONDARY (X11)"> + <Property name="tabTitle" type="java.lang.String" value="SENIOR SECONDARY (X11)"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="282" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel23" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel24" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel25" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel26" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel27" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField26" alignment="0" pref="198" max="32767" attributes="0"/> + <Component id="jTextField25" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField24" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField27" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField28" alignment="0" max="32767" attributes="0"/> + </Group> + <EmptySpace pref="184" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel23" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField24" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel24" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField25" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel25" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField26" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel26" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField27" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextField28" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel27" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="50" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel23"> + <Properties> + <Property name="text" type="java.lang.String" value="STREAM:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField24"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField25"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel24"> + <Properties> + <Property name="text" type="java.lang.String" value="BOARD:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel25"> + <Properties> + <Property name="text" type="java.lang.String" value="SCHOOL NAME:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField26"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField27"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel26"> + <Properties> + <Property name="text" type="java.lang.String" value="YEAR OF PASSING:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel27"> + <Properties> + <Property name="text" type="java.lang.String" value="CGPA/PERCENTAGE:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField28"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel9"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="ff" type="rgb"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout" value="org.netbeans.modules.form.compat2.layouts.support.JTabbedPaneSupportLayout$JTabbedPaneConstraintsDescription"> + <JTabbedPaneConstraints tabName="SECONDARY (X)"> + <Property name="tabTitle" type="java.lang.String" value="SECONDARY (X)"/> + </JTabbedPaneConstraints> + </Constraint> + </Constraints> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="282" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel29" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel30" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel31" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel32" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Component id="jTextField31" alignment="0" pref="198" max="32767" attributes="0"/> + <Component id="jTextField30" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField32" alignment="0" max="32767" attributes="0"/> + <Component id="jTextField33" alignment="0" max="32767" attributes="0"/> + </Group> + <EmptySpace pref="184" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="60" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel29" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField30" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel30" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField31" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel31" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jTextField32" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextField33" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel32" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="64" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JTextField" name="jTextField30"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel29"> + <Properties> + <Property name="text" type="java.lang.String" value="BOARD:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel30"> + <Properties> + <Property name="text" type="java.lang.String" value="SCHOOL NAME:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField31"> + </Component> + <Component class="javax.swing.JTextField" name="jTextField32"> + </Component> + <Component class="javax.swing.JLabel" name="jLabel31"> + <Properties> + <Property name="text" type="java.lang.String" value="YEAR OF PASSING:"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel32"> + <Properties> + <Property name="text" type="java.lang.String" value="CGPA/PERCENTAGE:"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextField33"> + </Component> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButton2"> + <Properties> + <Property name="text" type="java.lang.String" value="RESET"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="665" y="432" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JButton" name="jButton3"> + <Properties> + <Property name="text" type="java.lang.String" value="BACK"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="405" y="432" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel28"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Screenshot 2021-07-10 at 12.01.53 PM.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="890" height="510"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/resume-builder-java/resume_proj/src/replace.java b/resume-builder-java/resume_proj/src/replace.java new file mode 100644 index 00000000..3b6a0081 --- /dev/null +++ b/resume-builder-java/resume_proj/src/replace.java @@ -0,0 +1,956 @@ + + +// importing libraries +import org.apache.poi.hwpf.HWPFDocument; +import org.apache.poi.hwpf.usermodel.CharacterRun; +import org.apache.poi.hwpf.usermodel.Paragraph; +import org.apache.poi.hwpf.usermodel.Range; +import org.apache.poi.hwpf.usermodel.Section; +import org.apache.poi.poifs.filesystem.POIFSFileSystem; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import javax.swing.JOptionPane; + +/** + * + * @author madhuragrawal + */ +public class replace extends javax.swing.JFrame { + + public replace() { + initComponents(); + } + + + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jScrollPane2 = new javax.swing.JScrollPane(); + jTextArea2 = new javax.swing.JTextArea(); + jScrollPane3 = new javax.swing.JScrollPane(); + jTextArea3 = new javax.swing.JTextArea(); + jButton1 = new javax.swing.JButton(); + jSeparator1 = new javax.swing.JSeparator(); + jLabel1 = new javax.swing.JLabel(); + jTabbedPane1 = new javax.swing.JTabbedPane(); + jPanel1 = new javax.swing.JPanel(); + jLabel6 = new javax.swing.JLabel(); + jScrollPane1 = new javax.swing.JScrollPane(); + jTextArea1 = new javax.swing.JTextArea(); + jTextField3 = new javax.swing.JTextField(); + jTextField4 = new javax.swing.JTextField(); + jLabel7 = new javax.swing.JLabel(); + jTextField5 = new javax.swing.JTextField(); + jTextField6 = new javax.swing.JTextField(); + jTextField7 = new javax.swing.JTextField(); + jTextField1 = new javax.swing.JTextField(); + jTextField2 = new javax.swing.JTextField(); + jLabel2 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + jTextField8 = new javax.swing.JTextField(); + jLabel5 = new javax.swing.JLabel(); + jLabel8 = new javax.swing.JLabel(); + jTextField9 = new javax.swing.JTextField(); + jTextField10 = new javax.swing.JTextField(); + jTextField11 = new javax.swing.JTextField(); + jTextField12 = new javax.swing.JTextField(); + jPanel2 = new javax.swing.JPanel(); + jTabbedPane2 = new javax.swing.JTabbedPane(); + jPanel4 = new javax.swing.JPanel(); + jLabel9 = new javax.swing.JLabel(); + jLabel10 = new javax.swing.JLabel(); + jLabel11 = new javax.swing.JLabel(); + jTextField13 = new javax.swing.JTextField(); + jTextField14 = new javax.swing.JTextField(); + jScrollPane4 = new javax.swing.JScrollPane(); + jTextArea4 = new javax.swing.JTextArea(); + jPanel5 = new javax.swing.JPanel(); + jLabel12 = new javax.swing.JLabel(); + jTextField15 = new javax.swing.JTextField(); + jLabel13 = new javax.swing.JLabel(); + jTextField16 = new javax.swing.JTextField(); + jLabel14 = new javax.swing.JLabel(); + jScrollPane5 = new javax.swing.JScrollPane(); + jTextArea5 = new javax.swing.JTextArea(); + jPanel6 = new javax.swing.JPanel(); + jLabel15 = new javax.swing.JLabel(); + jTextField17 = new javax.swing.JTextField(); + jLabel16 = new javax.swing.JLabel(); + jTextField18 = new javax.swing.JTextField(); + jLabel17 = new javax.swing.JLabel(); + jScrollPane6 = new javax.swing.JScrollPane(); + jTextArea6 = new javax.swing.JTextArea(); + jPanel3 = new javax.swing.JPanel(); + jTabbedPane3 = new javax.swing.JTabbedPane(); + jPanel7 = new javax.swing.JPanel(); + jLabel18 = new javax.swing.JLabel(); + jLabel19 = new javax.swing.JLabel(); + jLabel20 = new javax.swing.JLabel(); + jLabel21 = new javax.swing.JLabel(); + jLabel22 = new javax.swing.JLabel(); + jTextField19 = new javax.swing.JTextField(); + jTextField20 = new javax.swing.JTextField(); + jTextField21 = new javax.swing.JTextField(); + jTextField22 = new javax.swing.JTextField(); + jTextField23 = new javax.swing.JTextField(); + jPanel8 = new javax.swing.JPanel(); + jLabel23 = new javax.swing.JLabel(); + jTextField24 = new javax.swing.JTextField(); + jTextField25 = new javax.swing.JTextField(); + jLabel24 = new javax.swing.JLabel(); + jLabel25 = new javax.swing.JLabel(); + jTextField26 = new javax.swing.JTextField(); + jTextField27 = new javax.swing.JTextField(); + jLabel26 = new javax.swing.JLabel(); + jLabel27 = new javax.swing.JLabel(); + jTextField28 = new javax.swing.JTextField(); + jPanel9 = new javax.swing.JPanel(); + jTextField30 = new javax.swing.JTextField(); + jLabel29 = new javax.swing.JLabel(); + jLabel30 = new javax.swing.JLabel(); + jTextField31 = new javax.swing.JTextField(); + jTextField32 = new javax.swing.JTextField(); + jLabel31 = new javax.swing.JLabel(); + jLabel32 = new javax.swing.JLabel(); + jTextField33 = new javax.swing.JTextField(); + jButton2 = new javax.swing.JButton(); + jButton3 = new javax.swing.JButton(); + jLabel28 = new javax.swing.JLabel(); + + jTextArea2.setColumns(20); + jTextArea2.setRows(5); + jScrollPane2.setViewportView(jTextArea2); + + jTextArea3.setColumns(20); + jTextArea3.setRows(5); + jScrollPane3.setViewportView(jTextArea3); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setBackground(new java.awt.Color(255, 255, 255)); + getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jButton1.setText("CREATE CV"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton1ActionPerformed(evt); + } + }); + getContentPane().add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(157, 432, -1, -1)); + getContentPane().add(jSeparator1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 36, 881, 10)); + + jLabel1.setText("ENTER YOUR DETAILS TO MAKE A RESUME"); + getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(313, 8, -1, -1)); + + jPanel1.setBackground(new java.awt.Color(255, 255, 255)); + + jLabel6.setText("OBJECTIVE:"); + + jTextArea1.setColumns(20); + jTextArea1.setRows(5); + jScrollPane1.setViewportView(jTextArea1); + + jTextField3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextField3ActionPerformed(evt); + } + }); + + jLabel7.setText("SKILLS:"); + + jLabel2.setText("NAME:"); + + jLabel3.setText("EMAIL ID:"); + + jLabel4.setText("MOBILE NUMBER:"); + + jLabel5.setText("LINKEDIN URL:"); + + jLabel8.setText("HOBBIES:"); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel3) + .addComponent(jLabel2)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(126, 126, 126) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel4) + .addComponent(jLabel5)) + .addGap(18, 18, 18) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 240, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel7) + .addComponent(jLabel6) + .addComponent(jLabel8)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(jTextField9, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jTextField5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)) + .addGap(26, 26, 26) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField6, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE) + .addComponent(jTextField10)) + .addGap(24, 24, 24) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField7, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE) + .addComponent(jTextField11)) + .addGap(32, 32, 32) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField8, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE) + .addComponent(jTextField12))) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 752, javax.swing.GroupLayout.PREFERRED_SIZE)))) + .addContainerGap(16, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addGap(30, 30, 30) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel2) + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel4) + .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel3) + .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel5) + .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel6) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(10, 10, 10) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel7)) + .addGap(18, 18, 18) + .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel8) + .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextField12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(36, 36, 36)) + ); + + jTabbedPane1.addTab("GENERAL", jPanel1); + + jTabbedPane2.setBackground(new java.awt.Color(153, 153, 255)); + + jPanel4.setBackground(new java.awt.Color(255, 255, 255)); + + jLabel9.setText("PROJECT TITLE: "); + + jLabel10.setText("PROJECT DURATION:"); + + jLabel11.setText("PROJECT DESCRIPTION: "); + + jTextArea4.setColumns(20); + jTextArea4.setRows(5); + jScrollPane4.setViewportView(jTextArea4); + + javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); + jPanel4.setLayout(jPanel4Layout); + jPanel4Layout.setHorizontalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addComponent(jLabel11) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jScrollPane4)) + .addGroup(jPanel4Layout.createSequentialGroup() + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel9) + .addComponent(jLabel10)) + .addGap(28, 28, 28) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField13, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE) + .addComponent(jTextField14)))) + .addContainerGap()) + ); + jPanel4Layout.setVerticalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addGap(13, 13, 13) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel9) + .addComponent(jTextField13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel10) + .addComponent(jTextField14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel11) + .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(15, Short.MAX_VALUE)) + ); + + jTabbedPane2.addTab("PROJECT 1", jPanel4); + + jPanel5.setBackground(new java.awt.Color(255, 255, 255)); + + jLabel12.setText("PROJECT TITLE: "); + + jLabel13.setText("PROJECT DURATION:"); + + jLabel14.setText("PROJECT DESCRIPTION: "); + + jTextArea5.setColumns(20); + jTextArea5.setRows(5); + jScrollPane5.setViewportView(jTextArea5); + + javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); + jPanel5.setLayout(jPanel5Layout); + jPanel5Layout.setHorizontalGroup( + jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel5Layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel5Layout.createSequentialGroup() + .addComponent(jLabel14) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jScrollPane5)) + .addGroup(jPanel5Layout.createSequentialGroup() + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel12) + .addComponent(jLabel13)) + .addGap(28, 28, 28) + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField15, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE) + .addComponent(jTextField16)))) + .addContainerGap()) + ); + jPanel5Layout.setVerticalGroup( + jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel5Layout.createSequentialGroup() + .addGap(13, 13, 13) + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel12) + .addComponent(jTextField15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel13) + .addComponent(jTextField16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel14) + .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(15, Short.MAX_VALUE)) + ); + + jTabbedPane2.addTab("PROJECT 2", jPanel5); + + jPanel6.setBackground(new java.awt.Color(255, 255, 255)); + + jLabel15.setText("PROJECT TITLE: "); + + jLabel16.setText("PROJECT DURATION:"); + + jLabel17.setText("PROJECT DESCRIPTION: "); + + jTextArea6.setColumns(20); + jTextArea6.setRows(5); + jScrollPane6.setViewportView(jTextArea6); + + javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); + jPanel6.setLayout(jPanel6Layout); + jPanel6Layout.setHorizontalGroup( + jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addComponent(jLabel17) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jScrollPane6)) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel15) + .addComponent(jLabel16)) + .addGap(28, 28, 28) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField17, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE) + .addComponent(jTextField18)))) + .addContainerGap()) + ); + jPanel6Layout.setVerticalGroup( + jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel6Layout.createSequentialGroup() + .addGap(13, 13, 13) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel15) + .addComponent(jTextField17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel16) + .addComponent(jTextField18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel17) + .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(15, Short.MAX_VALUE)) + ); + + jTabbedPane2.addTab("PROJECT 3", jPanel6); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(25, 25, 25) + .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 817, Short.MAX_VALUE) + .addContainerGap()) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() + .addComponent(jTabbedPane2) + .addContainerGap()) + ); + + jTabbedPane1.addTab("PROJECTS/ EXPERIENCE", jPanel2); + + jTabbedPane3.setBackground(new java.awt.Color(153, 153, 255)); + + jPanel7.setBackground(new java.awt.Color(255, 255, 255)); + + jLabel18.setText("DEGREE NAME:"); + + jLabel19.setText("BRANCH:"); + + jLabel20.setText("UNIV/ COLLEGE NAME:"); + + jLabel21.setText("BATCH:"); + + jLabel22.setText("CGPA/PERCENTAGE:"); + + javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); + jPanel7.setLayout(jPanel7Layout); + jPanel7Layout.setHorizontalGroup( + jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel7Layout.createSequentialGroup() + .addGap(282, 282, 282) + .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel18) + .addComponent(jLabel19) + .addComponent(jLabel20) + .addComponent(jLabel21) + .addComponent(jLabel22)) + .addGap(37, 37, 37) + .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField21, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE) + .addComponent(jTextField20) + .addComponent(jTextField19) + .addComponent(jTextField22) + .addComponent(jTextField23)) + .addContainerGap(167, Short.MAX_VALUE)) + ); + jPanel7Layout.setVerticalGroup( + jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel7Layout.createSequentialGroup() + .addGap(30, 30, 30) + .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel18) + .addComponent(jTextField19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel19) + .addComponent(jTextField20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel20) + .addComponent(jTextField21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel21) + .addComponent(jTextField22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jTextField23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel22)) + .addContainerGap(50, Short.MAX_VALUE)) + ); + + jTabbedPane3.addTab("CURRENT (UNIV/ COLLEGE)", jPanel7); + + jPanel8.setBackground(new java.awt.Color(255, 255, 255)); + + jLabel23.setText("STREAM:"); + + jLabel24.setText("BOARD:"); + + jLabel25.setText("SCHOOL NAME:"); + + jLabel26.setText("YEAR OF PASSING:"); + + jLabel27.setText("CGPA/PERCENTAGE:"); + + javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); + jPanel8.setLayout(jPanel8Layout); + jPanel8Layout.setHorizontalGroup( + jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(282, 282, 282) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel23) + .addComponent(jLabel24) + .addComponent(jLabel25) + .addComponent(jLabel26) + .addComponent(jLabel27)) + .addGap(37, 37, 37) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField26, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE) + .addComponent(jTextField25) + .addComponent(jTextField24) + .addComponent(jTextField27) + .addComponent(jTextField28)) + .addContainerGap(184, Short.MAX_VALUE)) + ); + jPanel8Layout.setVerticalGroup( + jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel8Layout.createSequentialGroup() + .addGap(30, 30, 30) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel23) + .addComponent(jTextField24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel24) + .addComponent(jTextField25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel25) + .addComponent(jTextField26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel26) + .addComponent(jTextField27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jTextField28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel27)) + .addContainerGap(50, Short.MAX_VALUE)) + ); + + jTabbedPane3.addTab("SENIOR SECONDARY (X11)", jPanel8); + + jPanel9.setBackground(new java.awt.Color(255, 255, 255)); + + jLabel29.setText("BOARD:"); + + jLabel30.setText("SCHOOL NAME:"); + + jLabel31.setText("YEAR OF PASSING:"); + + jLabel32.setText("CGPA/PERCENTAGE:"); + + javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); + jPanel9.setLayout(jPanel9Layout); + jPanel9Layout.setHorizontalGroup( + jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel9Layout.createSequentialGroup() + .addGap(282, 282, 282) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel29) + .addComponent(jLabel30) + .addComponent(jLabel31) + .addComponent(jLabel32)) + .addGap(37, 37, 37) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(jTextField31, javax.swing.GroupLayout.DEFAULT_SIZE, 198, Short.MAX_VALUE) + .addComponent(jTextField30) + .addComponent(jTextField32) + .addComponent(jTextField33)) + .addContainerGap(184, Short.MAX_VALUE)) + ); + jPanel9Layout.setVerticalGroup( + jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel9Layout.createSequentialGroup() + .addGap(60, 60, 60) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel29) + .addComponent(jTextField30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel30) + .addComponent(jTextField31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel31) + .addComponent(jTextField32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jTextField33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel32)) + .addContainerGap(64, Short.MAX_VALUE)) + ); + + jTabbedPane3.addTab("SECONDARY (X)", jPanel9); + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jTabbedPane3) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jTabbedPane3) + .addContainerGap()) + ); + + jTabbedPane1.addTab("EDUCATION", jPanel3); + + getContentPane().add(jTabbedPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(6, 52, -1, 374)); + + jButton2.setText("RESET"); + jButton2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton2ActionPerformed(evt); + } + }); + getContentPane().add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(665, 432, -1, -1)); + + jButton3.setText("BACK"); + jButton3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButton3ActionPerformed(evt); + } + }); + getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(405, 432, -1, -1)); + + jLabel28.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Screenshot 2021-07-10 at 12.01.53 PM.png"))); // NOI18N + getContentPane().add(jLabel28, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 890, 510)); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed +//General Details +String name= jTextField1.getText(); +String email= jTextField2.getText(); +String phn= jTextField3.getText(); +String lkd_url= jTextField4.getText(); +String objective= jTextArea1.getText(); +//Skills +String skill1= jTextField5.getText(); +String skill2= jTextField6.getText(); +String skill3= jTextField7.getText(); +String skill4= jTextField8.getText(); +//Hobbies +String hobby1= jTextField9.getText(); +String hobby2= jTextField10.getText(); +String hobby3= jTextField11.getText(); +String hobby4= jTextField12.getText(); +//Project/Experience Details +String prj1= jTextField13.getText(); +String prj1dur= jTextField14.getText(); +String prj1desc= jTextArea4.getText(); +String prj2= jTextField15.getText(); +String prj2dur= jTextField16.getText(); +String prj2desc= jTextArea5.getText(); +String prj3= jTextField17.getText(); +String prj3dur= jTextField18.getText(); +String prj3desc= jTextArea6.getText(); +//College Details +String Colldeg = jTextField19.getText(); +String Collbranch = jTextField20.getText(); +String Collname = jTextField21.getText(); +String Collbatch = jTextField22.getText(); +String Collpercent = jTextField23.getText(); +//XII details +String xiistream = jTextField24.getText(); +String xiiboard = jTextField25.getText(); +String xiiname = jTextField26.getText(); +String xiiyear = jTextField27.getText(); +String xiipercent = jTextField28.getText(); +//X details +String xboard = jTextField30.getText(); +String xname = jTextField31.getText(); +String xyear = jTextField32.getText(); +String xpercent = jTextField33.getText(); + +try{ + replace instance = new replace(); + HWPFDocument doc = instance.openDocument(location); + if (doc != null) { + //General + doc = instance.replaceText(doc, "<NAME COMES HERE>", name); + doc = instance.replaceText(doc, "<id>",email); + doc = instance.replaceText(doc, "<phn>",phn); + doc = instance.replaceText(doc, "<url>",lkd_url); + doc = instance.replaceText(doc, "<objectivecomeshere>",objective); + //Skills + doc = instance.replaceText(doc, "<Skill1comeshere>",skill1); + doc = instance.replaceText(doc, "<Skill2comeshere>",skill2); + doc = instance.replaceText(doc, "<Skill3comeshere>",skill3); + doc = instance.replaceText(doc, "<Skill4comeshere>",skill4); + //Hobby + doc = instance.replaceText(doc, "<hobby1comeshere>",hobby1); + doc = instance.replaceText(doc, "<hobby2comeshere>",hobby2); + doc = instance.replaceText(doc, "<hobby3comeshere>",hobby3); + doc = instance.replaceText(doc, "<hobby4comeshere>",hobby4); + //Project + doc = instance.replaceText(doc, "<Prj1>",prj1); + doc = instance.replaceText(doc, "<DUR1>",prj1dur); + doc = instance.replaceText(doc, "<Prj1desc>",prj1desc); + doc = instance.replaceText(doc, "<Project_2>",prj2); + doc = instance.replaceText(doc, "<DUR2>",prj2dur); + doc = instance.replaceText(doc, "<Prj2desc>",prj2desc); + doc = instance.replaceText(doc, "<Prj3>",prj3); + doc = instance.replaceText(doc, "<DUR3>",prj3dur); + doc = instance.replaceText(doc, "<Prj3desc>",prj3desc); + //Education + doc = instance.replaceText(doc, "<Currented>",Colldeg); + doc = instance.replaceText(doc, "<Currentedstream>",Collbranch); + doc = instance.replaceText(doc, "<Univ/College>",Collname); + doc = instance.replaceText(doc, "<Batch>",Collbatch); + doc = instance.replaceText(doc, "<cgpa/percent>",Collpercent); + doc = instance.replaceText(doc, "<Xiistream>",xiistream); + doc = instance.replaceText(doc, "<SCHOOLNAME12>",xiiname); + doc = instance.replaceText(doc, "<BOARD12>",xiiboard); + doc = instance.replaceText(doc, "<YEAROFPASS12>",xiiyear); + doc = instance.replaceText(doc, "<PER12>",xiipercent); + doc = instance.replaceText(doc, "<SCHOOLNAME10>",xname); + doc = instance.replaceText(doc, "<BOARD10>",xboard); + doc = instance.replaceText(doc, "<YEAROFPASS10>",xyear); + doc = instance.replaceText(doc, "<PER10>",xpercent); + + instance.saveDocument(doc, "enter path of location"+name+"-cv.doc");//location whee you want to save the file + } + + } +catch (Exception e){ + JOptionPane.showMessageDialog(null, e); +} + }//GEN-LAST:event_jButton1ActionPerformed + + private void jTextField3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextField3ActionPerformed + + }//GEN-LAST:event_jTextField3ActionPerformed + + private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed + +// Reset + jTextField1.setText(""); + jTextField2.setText(""); + jTextField3.setText(""); + jTextField4.setText(""); + jTextField5.setText(""); + jTextField6.setText(""); + jTextField7.setText(""); + jTextField8.setText(""); + jTextField9.setText(""); + jTextField10.setText(""); + jTextField11.setText(""); + jTextField12.setText(""); + jTextField13.setText(""); + jTextField14.setText(""); + jTextField15.setText(""); + jTextField16.setText(""); + jTextField17.setText(""); + jTextField18.setText(""); + jTextField19.setText(""); + jTextField20.setText(""); + jTextField21.setText(""); + jTextField22.setText(""); + jTextField23.setText(""); + jTextField24.setText(""); + jTextField25.setText(""); + jTextField26.setText(""); + jTextField27.setText(""); + jTextField28.setText(""); + jTextArea1.setText(""); + jTextArea2.setText(""); + jTextArea3.setText(""); + jTextArea4.setText(""); + jTextArea5.setText(""); + jTextArea6.setText(""); + jTextArea1.setLineWrap(true); + jTextArea1.setWrapStyleWord(true); + jTextArea4.setLineWrap(true); + jTextArea4.setWrapStyleWord(true); + jTextArea5.setLineWrap(true); + jTextArea5.setWrapStyleWord(true); + jTextArea6.setLineWrap(true); + jTextArea6.setWrapStyleWord(true); + + + }//GEN-LAST:event_jButton2ActionPerformed + + private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed + this.setVisible(false); + new start().setVisible(true); + }//GEN-LAST:event_jButton3ActionPerformed + + public static void main(String args[]) { + + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new replace().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JButton jButton2; + private javax.swing.JButton jButton3; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; + private javax.swing.JLabel jLabel15; + private javax.swing.JLabel jLabel16; + private javax.swing.JLabel jLabel17; + private javax.swing.JLabel jLabel18; + private javax.swing.JLabel jLabel19; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel20; + private javax.swing.JLabel jLabel21; + private javax.swing.JLabel jLabel22; + private javax.swing.JLabel jLabel23; + private javax.swing.JLabel jLabel24; + private javax.swing.JLabel jLabel25; + private javax.swing.JLabel jLabel26; + private javax.swing.JLabel jLabel27; + private javax.swing.JLabel jLabel28; + private javax.swing.JLabel jLabel29; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel30; + private javax.swing.JLabel jLabel31; + private javax.swing.JLabel jLabel32; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JPanel jPanel4; + private javax.swing.JPanel jPanel5; + private javax.swing.JPanel jPanel6; + private javax.swing.JPanel jPanel7; + private javax.swing.JPanel jPanel8; + private javax.swing.JPanel jPanel9; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JScrollPane jScrollPane2; + private javax.swing.JScrollPane jScrollPane3; + private javax.swing.JScrollPane jScrollPane4; + private javax.swing.JScrollPane jScrollPane5; + private javax.swing.JScrollPane jScrollPane6; + private javax.swing.JSeparator jSeparator1; + private javax.swing.JTabbedPane jTabbedPane1; + private javax.swing.JTabbedPane jTabbedPane2; + private javax.swing.JTabbedPane jTabbedPane3; + public static javax.swing.JTextArea jTextArea1; + private javax.swing.JTextArea jTextArea2; + private javax.swing.JTextArea jTextArea3; + public static javax.swing.JTextArea jTextArea4; + public static javax.swing.JTextArea jTextArea5; + public static javax.swing.JTextArea jTextArea6; + private javax.swing.JTextField jTextField1; + private javax.swing.JTextField jTextField10; + private javax.swing.JTextField jTextField11; + private javax.swing.JTextField jTextField12; + private javax.swing.JTextField jTextField13; + private javax.swing.JTextField jTextField14; + private javax.swing.JTextField jTextField15; + private javax.swing.JTextField jTextField16; + private javax.swing.JTextField jTextField17; + private javax.swing.JTextField jTextField18; + private javax.swing.JTextField jTextField19; + private javax.swing.JTextField jTextField2; + private javax.swing.JTextField jTextField20; + private javax.swing.JTextField jTextField21; + private javax.swing.JTextField jTextField22; + private javax.swing.JTextField jTextField23; + private javax.swing.JTextField jTextField24; + private javax.swing.JTextField jTextField25; + private javax.swing.JTextField jTextField26; + private javax.swing.JTextField jTextField27; + private javax.swing.JTextField jTextField28; + private javax.swing.JTextField jTextField3; + private javax.swing.JTextField jTextField30; + private javax.swing.JTextField jTextField31; + private javax.swing.JTextField jTextField32; + private javax.swing.JTextField jTextField33; + private javax.swing.JTextField jTextField4; + private javax.swing.JTextField jTextField5; + private javax.swing.JTextField jTextField6; + private javax.swing.JTextField jTextField7; + private javax.swing.JTextField jTextField8; + private javax.swing.JTextField jTextField9; + // End of variables declaration//GEN-END:variables + + private HWPFDocument replaceText(HWPFDocument doc, String findText, String replaceText) { + Range r = doc.getRange(); + for (int i = 0; i < r.numSections(); ++i) { + Section s = r.getSection(i); + for (int j = 0; j < s.numParagraphs(); j++) { + Paragraph p = s.getParagraph(j); + for (int k = 0; k < p.numCharacterRuns(); k++) { + CharacterRun run = p.getCharacterRun(k); + String text = run.text(); + if (text.contains(findText)) { + run.replaceText(findText, replaceText); + } + } + } + } + return doc; + } + + private HWPFDocument openDocument(String file) throws Exception { + URL res = getClass().getClassLoader().getResource(file); + HWPFDocument document = new HWPFDocument(new FileInputStream(location)); + return document; + } + + private void saveDocument(HWPFDocument doc, String file) { + try ( + FileOutputStream out = new FileOutputStream(file)) { + doc.write(out); + } catch (IOException e) { + e.printStackTrace(); + } + } + public static String location; + static String file_loc1 = "./src/RESUME.doc"; + static String file_loc2 = "./src/RESUME2.doc"; +} diff --git a/resume-builder-java/resume_proj/src/start.form b/resume-builder-java/resume_proj/src/start.form new file mode 100644 index 00000000..adf1cc63 --- /dev/null +++ b/resume-builder-java/resume_proj/src/start.form @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,2,26,0,0,3,64"/> + </AuxValues> + + <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> + <Property name="useNullLayout" type="boolean" value="false"/> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/RESS1.png"/> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel1MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="40" y="80" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/RESS2.png"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder/> + </Border> + </Property> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jLabel2MouseClicked"/> + </Events> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="490" y="80" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="text" type="java.lang.String" value="CHOOSE A RESUME TEMPLATE"/> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="300" y="30" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> + <Image iconType="3" name="/Screenshot 2021-07-09 at 12.54.35 PM.png"/> + </Property> + </Properties> + <Constraints> + <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> + <AbsoluteConstraints x="0" y="0" width="-1" height="-1"/> + </Constraint> + </Constraints> + </Component> + </SubComponents> +</Form> diff --git a/resume-builder-java/resume_proj/src/start.java b/resume-builder-java/resume_proj/src/start.java new file mode 100644 index 00000000..9f908c31 --- /dev/null +++ b/resume-builder-java/resume_proj/src/start.java @@ -0,0 +1,90 @@ + +public class start extends javax.swing.JFrame { + + public start() { + initComponents(); + } + + + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + jLabel1 = new javax.swing.JLabel(); + jLabel2 = new javax.swing.JLabel(); + jLabel3 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); + + jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/RESS1.png"))); // NOI18N + jLabel1.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jLabel1MouseClicked(evt); + } + }); + getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 80, -1, -1)); + + jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/RESS2.png"))); // NOI18N + jLabel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); + jLabel2.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jLabel2MouseClicked(evt); + } + }); + getContentPane().add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(490, 80, -1, -1)); + + jLabel3.setText("CHOOSE A RESUME TEMPLATE"); + getContentPane().add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(300, 30, -1, -1)); + + jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Screenshot 2021-07-09 at 12.54.35 PM.png"))); // NOI18N + getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, -1, -1)); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jLabel1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1MouseClicked + new replace().setVisible(true); + this.setVisible(false); + replace.location = replace.file_loc1; + replace.jTextArea1.setLineWrap(true); + replace.jTextArea1.setWrapStyleWord(true); + replace.jTextArea4.setLineWrap(true); + replace.jTextArea4.setWrapStyleWord(true); + replace.jTextArea5.setLineWrap(true); + replace.jTextArea5.setWrapStyleWord(true); + replace.jTextArea6.setLineWrap(true); + replace.jTextArea6.setWrapStyleWord(true); + }//GEN-LAST:event_jLabel1MouseClicked + + private void jLabel2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel2MouseClicked + new replace().setVisible(true); + this.setVisible(false); + replace.location = replace.file_loc2; + replace.jTextArea1.setLineWrap(true); + replace.jTextArea1.setWrapStyleWord(true); + replace.jTextArea4.setLineWrap(true); + replace.jTextArea4.setWrapStyleWord(true); + replace.jTextArea5.setLineWrap(true); + replace.jTextArea5.setWrapStyleWord(true); + replace.jTextArea6.setLineWrap(true); + replace.jTextArea6.setWrapStyleWord(true); + }//GEN-LAST:event_jLabel2MouseClicked + + public static void main(String args[]) { + + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new start().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + // End of variables declaration//GEN-END:variables +} diff --git a/rightpyramid.java b/rightpyramid.java new file mode 100644 index 00000000..16b3a0b5 --- /dev/null +++ b/rightpyramid.java @@ -0,0 +1,30 @@ +// Java Program to print pattern +// Number-increasing pyramid +import java.util.*; + +public class GeeksForGeeks { + // Function to demonstrate pattern + public static void printPattern(int n) + { + int i, j; + // outer loop to handle number of rows + for (i = 1; i <= n; i++) { + // inner loop to handle number of columns + for (j = 1; j <= i; j++) { + // printing column values upto the row + // value. + System.out.print(j + " "); + } + + // print new line for each row + System.out.println(); + } + } + + // Driver Function + public static void main(String args[]) + { + int n = 6; + printPattern(n); + } +} diff --git a/save2 b/save2 new file mode 100644 index 00000000..c1794e94 Binary files /dev/null and b/save2 differ diff --git a/script.js b/script.js new file mode 100644 index 00000000..42b96b0b --- /dev/null +++ b/script.js @@ -0,0 +1,93 @@ + +let randomNumber = parseInt(Math.random() * 100 + 1); + +const submit = document.querySelector('#subt'); +const userInput = document.querySelector('#guessField'); +const guessSlot = document.querySelector('.guesses'); +const remaining = document.querySelector('.lastResult'); +const lowOrHi = document.querySelector('.lowOrHi'); +const startOver = document.querySelector('.resultParas'); + +const p = document.createElement('p'); + +let prevGuess = []; +let numGuess = 1; + +let playGame = true; + +if (playGame) { + submit.addEventListener('click', function (e) { + e.preventDefault(); + const guess = parseInt(userInput.value); + console.log(guess); + validateGuess(guess); + }); +} + +function validateGuess(guess) { + if (isNaN(guess)) { + alert('PLease enter a valid number'); + } else if (guess < 1) { + alert('PLease enter a number more than 1'); + } else if (guess > 100) { + alert('PLease enter a number less than 100'); + } else { + prevGuess.push(guess); + if (numGuess === 11) { + displayGuess(guess); + displayMessage(`Game Over. Random number was ${randomNumber}`); + endGame(); + } else { + displayGuess(guess); + checkGuess(guess); + } + } +} + +function checkGuess(guess) { + if (guess === randomNumber) { + displayMessage(`You guessed it right`); + endGame(); + } else if (guess < randomNumber) { + displayMessage(`Number is TOOO low`); + } else if (guess > randomNumber) { + displayMessage(`Number is TOOO High`); + } +} + +function displayGuess(guess) { + userInput.value = ''; + guessSlot.innerHTML += `${guess}, `; + numGuess++; + remaining.innerHTML = `${11 - numGuess} `; +} + +function displayMessage(message) { + lowOrHi.innerHTML = `<h2>${message}</h2>`; +} + +function endGame() { + userInput.value = ''; + userInput.setAttribute('disabled', ''); + p.classList.add('button'); + p.innerHTML = `<h2 id="newGame">Start new Game</h2>`; + startOver.appendChild(p); + playGame = false; + newGame(); +} + +function newGame() { + const newGameButton = document.querySelector('#newGame'); + newGameButton.addEventListener('click', function (e) { + randomNumber = parseInt(Math.random() * 100 + 1); + prevGuess = []; + numGuess = 1; + guessSlot.innerHTML = ''; + remaining.innerHTML = `${11 - numGuess} `; + userInput.removeAttribute('disabled'); + startOver.removeChild(p); + + playGame = true; + }); +} + diff --git a/snakeGame.html b/snakeGame.html new file mode 100644 index 00000000..ec783491 --- /dev/null +++ b/snakeGame.html @@ -0,0 +1,147 @@ +<!DOCTYPE html> +<html> + <head> + <title>Snake Game</title> + <style> + body { + font-family: Arial, sans-serif; + text-align: center; + } + canvas { + border: 1px solid #000; + margin: 20px auto; + } + </style> + </head> + <body> + <h1>Snake Game</h1> + <canvas id="gameCanvas" width="400" height="400"></canvas> + <button id="tryAgain" style="display: none">Try Again</button> + + <script> + const canvas = document.getElementById("gameCanvas"); + const ctx = canvas.getContext("2d"); + const tryAgainButton = document.getElementById("tryAgain"); + + const gridSize = 20; + const snakeColor = "#000"; + const foodColor = "#f00"; + + let snake = [{ x: 5, y: 5 }]; + let food = { x: 10, y: 10 }; + let dx = 1; + let dy = 0; + let gameInterval; + + function drawSnake() { + snake.forEach((segment) => { + ctx.fillStyle = snakeColor; + ctx.fillRect( + segment.x * gridSize, + segment.y * gridSize, + gridSize, + gridSize + ); + }); + } + + function drawFood() { + ctx.fillStyle = foodColor; + ctx.fillRect(food.x * gridSize, food.y * gridSize, gridSize, gridSize); + } + + function moveSnake() { + const head = { x: snake[0].x + dx, y: snake[0].y + dy }; + snake.unshift(head); + + if (head.x === food.x && head.y === food.y) { + food = generateFood(); + } else { + snake.pop(); + } + } + + function generateFood() { + const newFood = { + x: Math.floor(Math.random() * (canvas.width / gridSize)), + y: Math.floor(Math.random() * (canvas.height / gridSize)), + }; + + return newFood; + } + + function checkCollision() { + const head = snake[0]; + + if ( + head.x < 0 || + head.x >= canvas.width / gridSize || + head.y < 0 || + head.y >= canvas.height / gridSize || + snake + .slice(1) + .some((segment) => segment.x === head.x && segment.y === head.y) + ) { + gameOver(); + } + } + + function gameOver() { + clearInterval(gameInterval); + tryAgainButton.style.display = "block"; + alert("Game Over!"); + } + + function startGame() { + snake = [{ x: 5, y: 5 }]; + food = generateFood(); + dx = 1; + dy = 0; + gameInterval = setInterval(gameLoop, 100); + tryAgainButton.style.display = "none"; + } + + function gameLoop() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + + drawSnake(); + drawFood(); + moveSnake(); + checkCollision(); + } + + document.addEventListener("keydown", (e) => { + switch (e.key) { + case "ArrowUp": + if (dy === 0) { + dx = 0; + dy = -1; + } + break; + case "ArrowDown": + if (dy === 0) { + dx = 0; + dy = 1; + } + break; + case "ArrowLeft": + if (dx === 0) { + dx = -1; + dy = 0; + } + break; + case "ArrowRight": + if (dx === 0) { + dx = 1; + dy = 0; + } + break; + } + }); + + tryAgainButton.addEventListener("click", startGame); + + startGame(); // Start the game initially. + </script> + </body> +</html> diff --git a/snakeWaterGun.java b/snakeWaterGun.java new file mode 100644 index 00000000..33e776c3 --- /dev/null +++ b/snakeWaterGun.java @@ -0,0 +1,92 @@ +import java.util.Scanner; +import java.util.Random; + +public class Mini_Project { + + public static void main(String[] args) { + Scanner sc=new Scanner(System.in); + Random rand=new Random(); + int com=rand.nextInt(100); + System.out.println("Enter the number of matches,You want to Play"); + int match=sc.nextInt(); + int won=0; + int loose=0; + int draw=0; + for(int i=0;i<match;i++) { + System.out.println("Please enter s for snake,g for gun or w for water"); + char v = sc.next().charAt(0); + System.out.println("You have entered: "+v); + if(v=='s'|| v=='g' || v=='w'){ + + //System.out.println("The computer has selected:"+com); + { + + if(com<33) //Selected Snake + { com=115; + char s=(char)com; + System.out.println("Computer has choose: "+s); + if(s==v) + { + System.out.println("The match has drawn"); + draw++; + } + else if(v==103) + { + System.out.println("You won the match:)"); + won++; + } + else if(v==119) + { + System.out.println("You loose the match:("); + loose++; + } + } + + else if(com>33 &com<66) //Selected Gun g=103, s=115, w=119 + { com=103; + char g=(char)com; + System.out.println("Computer has choose: "+g); + if(g==v) + { + System.out.println("The match has drawn"); + draw++;} + else if(v==115) + { + System.out.println("You loose the match:("); + loose++;} + else if(v==119) + { + System.out.println("You won the match:)"); + won++;} + } + else if (com>66) //Selected Water + { com=119; + char w=(char)com; + System.out.println("Computer has choose: "+w); + if(w==v) + { + System.out.println("The match has drawn"); + draw++;} + else if(v==103) + { + System.out.println("You loose the match:("); + loose++;} + else if(v==115) + { + System.out.println("You won the match:)"); + won++;} + } + + + } + +} + else + System.out.println("Please Enter the valid input"); +} + System.out.println("********************************"); + System.out.println("STATATICS :)"); + System.out.println("You Won :"+won); + System.out.println("You loose :"+loose); + System.out.println("Drawn :"+draw); + System.out.println("********************************");}} \ No newline at end of file diff --git a/space-invader-game.java b/space-invader-game.java new file mode 100644 index 00000000..c682d3dd --- /dev/null +++ b/space-invader-game.java @@ -0,0 +1,185 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +public class SpaceInvadersGame extends JPanel implements KeyListener, ActionListener { + private int playerX, playerY; + private List<Alien> aliens; + private List<Bullet> bullets; + private boolean isGameOver; + private int score; + + private SpaceInvadersGame() { + playerX = 300; + playerY = 480; + isGameOver = false; + score = 0; + + aliens = new ArrayList<>(); + bullets = new ArrayList(); + + // Initialize aliens + for (int i = 0; i < 6; i++) { + aliens.add(new Alien(i * 100, 0)); + } + + Timer timer = new Timer(15, this); + timer.start(); + + addKeyListener(this); + setFocusable(true); + setFocusTraversalKeysEnabled(false); + } + + public void paintComponent(Graphics g) { + super.paintComponent(g); + // Draw background + g.setColor(Color.black); + g.fillRect(0, 0, 800, 600); + + // Draw player + g.setColor(Color.blue); + g.fillRect(playerX, playerY, 50, 50); + + // Draw aliens + for (Alien alien : aliens) { + g.setColor(Color.green); + g.fillRect(alien.x, alien.y, 50, 50); + } + + // Draw bullets + for (Bullet bullet : bullets) { + g.setColor(Color.red); + g.fillRect(bullet.x, bullet.y, 10, 20); + } + + // Display score + g.setColor(Color.white); + g.setFont(new Font("Arial", Font.PLAIN, 20)); + g.drawString("Score: " + score, 10, 30); + + if (isGameOver) { + g.setFont(new Font("Arial", Font.PLAIN, 50)); + g.drawString("Game Over", 300, 300); + } + } + + public void actionPerformed(ActionEvent e) { + if (!isGameOver) { + // Move aliens + for (Alien alien : aliens) { + alien.y += 2; + } + + // Move bullets + for (Bullet bullet : bullets) { + bullet.y -= 5; + } + + // Check for collisions + checkCollisions(); + + // Remove off-screen aliens and bullets + aliens.removeIf(alien -> alien.y > 600); + bullets.removeIf(bullet -> bullet.y < 0); + + // Spawn new aliens + if (aliens.isEmpty()) { + for (int i = 0; i < 6; i++) { + aliens.add(new Alien(i * 100, 0)); + } + } + + repaint(); + } + } + + private void checkCollisions() { + for (Alien alien : new ArrayList<>(aliens)) { + for (Bullet bullet : new ArrayList<>(bullets)) { + if (alien.getBounds().intersects(bullet.getBounds())) { + aliens.remove(alien); + bullets.remove(bullet); + score += 10; + } + } + + if (alien.getBounds().intersects(new Rectangle(playerX, playerY, 50, 50))) { + isGameOver = true; + } + } + } + + public void keyTyped(KeyEvent e) {} + + public void keyPressed(KeyEvent e) { + int key = e.getKeyCode(); + + if (key == KeyEvent.VK_LEFT && playerX > 0) { + playerX -= 20; + } + + if (key == KeyEvent.VK_RIGHT && playerX < 750) { + playerX += 20; + } + + if (key == KeyEvent.VK_SPACE) { + if (!isGameOver) { + bullets.add(new Bullet(playerX + 20, playerY)); + } else { + // Restart the game + isGameOver = false; + playerX = 300; + score = 0; + aliens.clear(); + bullets.clear(); + for (int i = 0; i < 6; i++) { + aliens.add(new Alien(i * 100, 0)); + } + } + } + } + + public void keyReleased(KeyEvent e) {} + + public static void main(String[] args) { + JFrame frame = new JFrame("Space Invaders"); + SpaceInvadersGame game = new SpaceInvadersGame(); + frame.add(game); + frame.setSize(800, 600); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setVisible(true); + } + + private class Alien { + int x, y; + + Alien(int x, int y) { + this.x = x; + this.y = y; + } + + Rectangle getBounds() { + return new Rectangle(x, y, 50, 50); + } + } + + private class Bullet { + int x, y; + + Bullet(int x, int y) { + this.x = x; + this.y = y; + } + + Rectangle getBounds() { + return new Rectangle(x, y, 10, 20); + } + } +} \ No newline at end of file diff --git a/springAPIApplication b/springAPIApplication new file mode 160000 index 00000000..2714903d --- /dev/null +++ b/springAPIApplication @@ -0,0 +1 @@ +Subproject commit 2714903d242036cf0abdd75cb22789b66088b49b diff --git a/src/ticketbooking/BusTicketing.form b/src/ticketbooking/BusTicketing.form new file mode 100644 index 00000000..a0eed955 --- /dev/null +++ b/src/ticketbooking/BusTicketing.form @@ -0,0 +1,819 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> + <NonVisualComponents> + <Component class="javax.swing.ButtonGroup" name="buttonGroup1"> + </Component> + </NonVisualComponents> + <Properties> + <Property name="defaultCloseOperation" type="int" value="3"/> + <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> + <Dimension value="[1200, 700]"/> + </Property> + </Properties> + <SyntheticProperties> + <SyntheticProperty name="formSizePolicy" type="int" value="1"/> + <SyntheticProperty name="generateCenter" type="boolean" value="false"/> + </SyntheticProperties> + <AuxValues> + <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> + <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> + <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> + </AuxValues> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel1" max="32767" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="223" max="-2" attributes="0"/> + <Component id="jButtonTotal" min="-2" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jPanel4" max="32767" attributes="0"/> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + </Group> + </Group> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jPanel1" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jPanel3" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> + <Component id="jButtonTotal" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="29" max="-2" attributes="0"/> + <Component id="jPanel4" min="-2" pref="143" max="-2" attributes="0"/> + </Group> + <Component id="jPanel2" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="0" pref="80" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Container class="javax.swing.JPanel" name="jPanel1"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="33" green="33" red="33" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="3"/> + </Border> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="33" type="rgb"/> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="129" max="-2" attributes="0"/> + <Component id="jLabel1" min="-2" pref="790" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Component id="jLabel1" max="32767" attributes="0"/> + <EmptySpace max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="80" style="1"/> + </Property> + <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="ff" green="ff" red="33" type="rgb"/> + </Property> + <Property name="text" type="java.lang.String" value=" Bus Ticketing System"/> + </Properties> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="99" red="99" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="3"/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" max="-2" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel9" min="-2" pref="119" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="103" max="-2" attributes="0"/> + <Component id="jTextFieldTo" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel8" min="-2" pref="119" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jTextFieldForm" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jButtonReset" min="-2" pref="99" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> + </Group> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel14" min="-2" pref="185" max="-2" attributes="0"/> + <Component id="jLabel13" min="-2" pref="144" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jTextFieldPassengers2" min="-2" pref="185" max="-2" attributes="0"/> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="42" max="-2" attributes="0"/> + <Component id="jButtonExit" min="-2" pref="88" max="-2" attributes="0"/> + </Group> + <Component id="jTextFieldPrice" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel10" min="-2" pref="119" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="103" max="-2" attributes="0"/> + <Component id="jTextFieldClass" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel15" min="-2" pref="185" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="37" max="-2" attributes="0"/> + <Component id="jTextFieldTicketType" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel11" min="-2" pref="119" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="103" max="-2" attributes="0"/> + <Component id="jTextFieldTime2" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jLabel12" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="72" max="-2" attributes="0"/> + <Component id="jTextFieldDate2" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace pref="370" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="21" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel8" alignment="3" min="-2" pref="45" max="-2" attributes="0"/> + <Component id="jTextFieldForm" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel9" alignment="3" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldTo" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel12" alignment="3" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldDate2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel11" alignment="3" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldTime2" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel15" alignment="3" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldTicketType" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace pref="30" max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel10" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldClass" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel14" alignment="0" min="-2" pref="39" max="-2" attributes="0"/> + <Component id="jTextFieldPassengers2" alignment="0" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel13" min="-2" pref="39" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jButtonReset" alignment="3" max="32767" attributes="0"/> + <Component id="jButtonExit" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" attributes="0"> + <Component id="jTextFieldPrice" min="-2" max="-2" attributes="0"/> + <EmptySpace min="0" pref="0" max="32767" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="15" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel8"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="From"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel9"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="To"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel10"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Class"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel11"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Departure"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel12"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Date of Journey"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel13"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Amount Paid"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel14"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="No. of Passangers "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel15"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Ticket Type"/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldForm"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldFormActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldTo"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldToActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldDate2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldDate2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldTime2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldTime2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldClass"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldClassActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldTicketType"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldTicketTypeActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldPassengers2"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldPassengers2ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldPrice"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldPriceActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButtonReset"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="0" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Reset"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonResetActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JButton" name="jButtonExit"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="99" red="ff" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Exit"/> + </Properties> + <Events> + <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButtonExitMouseClicked"/> + <EventHandler event="mouseExited" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jButtonExitMouseExited"/> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonExitActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel3"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="99" red="99" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="3"/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel2" min="-2" pref="121" max="-2" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel4" alignment="0" min="-2" pref="121" max="-2" attributes="0"/> + <Component id="jLabel7" alignment="0" min="-2" pref="121" max="-2" attributes="0"/> + <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/> + <Component id="jLabel3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel5" alignment="0" min="-2" pref="121" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jTextFieldPassenger1" alignment="1" max="32767" attributes="0"/> + <Component id="jComboBoxDestination" alignment="1" max="32767" attributes="0"/> + <Component id="jComboBoxTime" max="32767" attributes="0"/> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="1" attributes="0"> + <Component id="jRadioButtonFirstClass1" min="-2" max="-2" attributes="0"/> + <EmptySpace type="separate" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jRadioButtonSingle1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="50" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jRadioButtonReturn1" min="-2" max="-2" attributes="0"/> + <Component id="jRadioButtonEconomy1" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <Group type="102" alignment="0" attributes="0"> + <Component id="jDateChooser" min="-2" pref="222" max="-2" attributes="0"/> + <EmptySpace min="0" pref="57" max="32767" attributes="0"/> + </Group> + </Group> + </Group> + </Group> + <EmptySpace pref="47" max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel2" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jComboBoxDestination" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="separate" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel3" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jDateChooser" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Component id="jLabel5" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jComboBoxTime" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> + <Group type="103" groupAlignment="1" attributes="0"> + <Group type="102" attributes="0"> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel4" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jRadioButtonReturn1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Component id="jLabel7" min="-2" pref="31" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jRadioButtonSingle1" min="-2" max="-2" attributes="0"/> + <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> + </Group> + <Group type="103" alignment="1" groupAlignment="3" attributes="0"> + <Component id="jRadioButtonFirstClass1" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jRadioButtonEconomy1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace type="unrelated" max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel6" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jTextFieldPassenger1" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="32767" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel2"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Destinantion "/> + </Properties> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBoxDestination"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="7"> + <StringItem index="0" value="Select Destination "/> + <StringItem index="1" value="Himamaylan"/> + <StringItem index="2" value="Binalbagan"/> + <StringItem index="3" value="Kabankalan"/> + <StringItem index="4" value="Bacolod"/> + <StringItem index="5" value="Hinigaran"/> + <StringItem index="6" value="Isabela"/> + </StringArray> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jComboBoxDestinationActionPerformed"/> + </Events> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="javax.swing.JLabel" name="jLabel3"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Date of Journey"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel4"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Ticket Type "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel5"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Departure"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel6"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="No. of Passengers "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel7"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Class"/> + </Properties> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButtonSingle1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Single"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRadioButtonSingle1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButtonEconomy1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Economy"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRadioButtonEconomy1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButtonReturn1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Return"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRadioButtonReturn1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JRadioButton" name="jRadioButtonFirstClass1"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="15" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="First Class"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jRadioButtonFirstClass1ActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldPassenger1"> + </Component> + <Component class="javax.swing.JComboBox" name="jComboBoxTime"> + <Properties> + <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor"> + <StringArray count="5"> + <StringItem index="0" value="Select Time"/> + <StringItem index="1" value="11:30"/> + <StringItem index="2" value="12:30"/> + <StringItem index="3" value="1:30"/> + <StringItem index="4" value="2:30"/> + </StringArray> + </Property> + </Properties> + <AuxValues> + <AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/> + </AuxValues> + </Component> + <Component class="com.toedter.calendar.JDateChooser" name="jDateChooser"> + </Component> + </SubComponents> + </Container> + <Container class="javax.swing.JPanel" name="jPanel4"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="99" green="99" red="99" type="rgb"/> + </Property> + <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor"> + <Border info="org.netbeans.modules.form.compat2.border.LineBorderInfo"> + <LineBorder thickness="3"/> + </Border> + </Property> + </Properties> + + <Layout> + <DimensionLayout dim="0"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace min="-2" pref="49" max="-2" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" attributes="0"> + <Component id="jLabel16" min="-2" pref="121" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jTextFieldTotal" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel18" min="-2" pref="121" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jTextFieldTax" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + <Group type="102" alignment="1" attributes="0"> + <Component id="jLabel17" min="-2" pref="121" max="-2" attributes="0"/> + <EmptySpace max="32767" attributes="0"/> + <Component id="jTextFieldSubTotal" min="-2" pref="185" max="-2" attributes="0"/> + </Group> + </Group> + <EmptySpace min="-2" pref="68" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + <DimensionLayout dim="1"> + <Group type="103" groupAlignment="0" attributes="0"> + <Group type="102" alignment="0" attributes="0"> + <EmptySpace max="32767" attributes="0"/> + <Group type="103" groupAlignment="0" attributes="0"> + <Component id="jLabel16" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jTextFieldTotal" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jLabel18" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + <Component id="jTextFieldTax" alignment="3" min="-2" max="-2" attributes="0"/> + </Group> + <EmptySpace max="-2" attributes="0"/> + <Group type="103" groupAlignment="3" attributes="0"> + <Component id="jTextFieldSubTotal" alignment="3" min="-2" max="-2" attributes="0"/> + <Component id="jLabel17" alignment="3" min="-2" pref="31" max="-2" attributes="0"/> + </Group> + <EmptySpace min="-2" pref="64" max="-2" attributes="0"/> + </Group> + </Group> + </DimensionLayout> + </Layout> + <SubComponents> + <Component class="javax.swing.JLabel" name="jLabel16"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Total"/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel17"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Sub Total "/> + </Properties> + </Component> + <Component class="javax.swing.JLabel" name="jLabel18"> + <Properties> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="20" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Tax "/> + </Properties> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldTax"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldTaxActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldTotal"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldTotalActionPerformed"/> + </Events> + </Component> + <Component class="javax.swing.JTextField" name="jTextFieldSubTotal"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="cc" green="cc" red="cc" type="rgb"/> + </Property> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jTextFieldSubTotalActionPerformed"/> + </Events> + </Component> + </SubComponents> + </Container> + <Component class="javax.swing.JButton" name="jButtonTotal"> + <Properties> + <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> + <Color blue="0" green="ff" red="0" type="rgb"/> + </Property> + <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor"> + <Font name="Times New Roman" size="22" style="1"/> + </Property> + <Property name="text" type="java.lang.String" value="Submit"/> + </Properties> + <Events> + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButtonTotalActionPerformed"/> + </Events> + </Component> + </SubComponents> +</Form> diff --git a/src/ticketbooking/BusTicketing.java b/src/ticketbooking/BusTicketing.java new file mode 100644 index 00000000..efa9cf70 --- /dev/null +++ b/src/ticketbooking/BusTicketing.java @@ -0,0 +1,1694 @@ +package ticketbooking; + +import javax.swing.JComponent; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author janhavi + */ +public class BusTicketing extends javax.swing.JFrame { + + /** + * Creates new form BusTicketing + */ + public BusTicketing() { + initComponents(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { + + buttonGroup1 = new javax.swing.ButtonGroup(); + jPanel1 = new javax.swing.JPanel(); + jLabel1 = new javax.swing.JLabel(); + jPanel2 = new javax.swing.JPanel(); + jLabel8 = new javax.swing.JLabel(); + jLabel9 = new javax.swing.JLabel(); + jLabel10 = new javax.swing.JLabel(); + jLabel11 = new javax.swing.JLabel(); + jLabel12 = new javax.swing.JLabel(); + jLabel13 = new javax.swing.JLabel(); + jLabel14 = new javax.swing.JLabel(); + jLabel15 = new javax.swing.JLabel(); + jTextFieldForm = new javax.swing.JTextField(); + jTextFieldTo = new javax.swing.JTextField(); + jTextFieldDate2 = new javax.swing.JTextField(); + jTextFieldTime2 = new javax.swing.JTextField(); + jTextFieldClass = new javax.swing.JTextField(); + jTextFieldTicketType = new javax.swing.JTextField(); + jTextFieldPassengers2 = new javax.swing.JTextField(); + jTextFieldPrice = new javax.swing.JTextField(); + jButtonReset = new javax.swing.JButton(); + jButtonExit = new javax.swing.JButton(); + jPanel3 = new javax.swing.JPanel(); + jLabel2 = new javax.swing.JLabel(); + jComboBoxDestination = new javax.swing.JComboBox<>(); + jLabel3 = new javax.swing.JLabel(); + jLabel4 = new javax.swing.JLabel(); + jLabel5 = new javax.swing.JLabel(); + jLabel6 = new javax.swing.JLabel(); + jLabel7 = new javax.swing.JLabel(); + jRadioButtonSingle1 = new javax.swing.JRadioButton(); + jRadioButtonEconomy1 = new javax.swing.JRadioButton(); + jRadioButtonReturn1 = new javax.swing.JRadioButton(); + jRadioButtonFirstClass1 = new javax.swing.JRadioButton(); + jTextFieldPassenger1 = new javax.swing.JTextField(); + jComboBoxTime = new javax.swing.JComboBox<>(); + jDateChooser = new com.toedter.calendar.JDateChooser(); + jPanel4 = new javax.swing.JPanel(); + jLabel16 = new javax.swing.JLabel(); + jLabel17 = new javax.swing.JLabel(); + jLabel18 = new javax.swing.JLabel(); + jTextFieldTax = new javax.swing.JTextField(); + jTextFieldTotal = new javax.swing.JTextField(); + jTextFieldSubTotal = new javax.swing.JTextField(); + jButtonTotal = new javax.swing.JButton(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setMinimumSize(new java.awt.Dimension(1200, 700)); + + jPanel1.setBackground(new java.awt.Color(51, 51, 51)); + jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); + jPanel1.setForeground(new java.awt.Color(51, 255, 255)); + + jLabel1.setFont(new java.awt.Font("Times New Roman", 1, 80)); // NOI18N + jLabel1.setForeground(new java.awt.Color(51, 255, 255)); + jLabel1.setText(" Bus Ticketing System"); + + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel1Layout.createSequentialGroup() + .addGap(129, 129, 129) + .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 790, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() + .addContainerGap() + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addContainerGap()) + ); + + jPanel2.setBackground(new java.awt.Color(153, 153, 153)); + jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); + + jLabel8.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jLabel8.setText("From"); + + jLabel9.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jLabel9.setText("To"); + + jLabel10.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jLabel10.setText("Class"); + + jLabel11.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jLabel11.setText("Departure"); + + jLabel12.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jLabel12.setText("Date of Journey"); + + jLabel13.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jLabel13.setText("Amount Paid"); + + jLabel14.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jLabel14.setText("No. of Passangers "); + + jLabel15.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jLabel15.setText("Ticket Type"); + + jTextFieldForm.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldForm.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldFormActionPerformed(evt); + } + }); + + jTextFieldTo.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldTo.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldToActionPerformed(evt); + } + }); + + jTextFieldDate2.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldDate2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldDate2ActionPerformed(evt); + } + }); + + jTextFieldTime2.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldTime2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldTime2ActionPerformed(evt); + } + }); + + jTextFieldClass.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldClass.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldClassActionPerformed(evt); + } + }); + + jTextFieldTicketType.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldTicketType.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldTicketTypeActionPerformed(evt); + } + }); + + jTextFieldPassengers2.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldPassengers2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldPassengers2ActionPerformed(evt); + } + }); + + jTextFieldPrice.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldPrice.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldPriceActionPerformed(evt); + } + }); + + jButtonReset.setBackground(new java.awt.Color(255, 0, 0)); + jButtonReset.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jButtonReset.setText("Reset"); + jButtonReset.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButtonResetActionPerformed(evt); + } + }); + + jButtonExit.setBackground(new java.awt.Color(255, 153, 0)); + jButtonExit.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jButtonExit.setText("Exit"); + jButtonExit.addMouseListener(new java.awt.event.MouseAdapter() { + public void mouseClicked(java.awt.event.MouseEvent evt) { + jButtonExitMouseClicked(evt); + } + public void mouseExited(java.awt.event.MouseEvent evt) { + jButtonExitMouseExited(evt); + } + }); + jButtonExit.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButtonExitActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(103, 103, 103) + .addComponent(jTextFieldTo, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jTextFieldForm, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() + .addComponent(jButtonReset, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(13, 13, 13)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(37, 37, 37))) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jTextFieldPassengers2, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(42, 42, 42) + .addComponent(jButtonExit, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jTextFieldPrice, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(103, 103, 103) + .addComponent(jTextFieldClass, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(37, 37, 37) + .addComponent(jTextFieldTicketType, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(103, 103, 103) + .addComponent(jTextFieldTime2, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel12) + .addGap(72, 72, 72) + .addComponent(jTextFieldDate2, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap(370, Short.MAX_VALUE)) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGap(21, 21, 21) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextFieldForm, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextFieldTo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextFieldDate2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextFieldTime2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextFieldTicketType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextFieldClass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextFieldPassengers2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jButtonReset, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jButtonExit))) + .addGroup(jPanel2Layout.createSequentialGroup() + .addComponent(jTextFieldPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 0, Short.MAX_VALUE))) + .addGap(15, 15, 15)) + ); + + jPanel3.setBackground(new java.awt.Color(153, 153, 153)); + jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); + + jLabel2.setFont(new java.awt.Font("Times New Roman", 1, 20)); // NOI18N + jLabel2.setText("Destinantion "); + + jComboBoxDestination.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select Destination ", "Himamaylan", "Binalbagan", "Kabankalan", "Bacolod", "Hinigaran", "Isabela" })); + jComboBoxDestination.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jComboBoxDestinationActionPerformed(evt); + } + }); + + jLabel3.setFont(new java.awt.Font("Times New Roman", 1, 20)); // NOI18N + jLabel3.setText("Date of Journey"); + + jLabel4.setFont(new java.awt.Font("Times New Roman", 1, 20)); // NOI18N + jLabel4.setText("Ticket Type "); + + jLabel5.setFont(new java.awt.Font("Times New Roman", 1, 20)); // NOI18N + jLabel5.setText("Departure"); + + jLabel6.setFont(new java.awt.Font("Times New Roman", 1, 20)); // NOI18N + jLabel6.setText("No. of Passengers "); + + jLabel7.setFont(new java.awt.Font("Times New Roman", 1, 20)); // NOI18N + jLabel7.setText("Class"); + + jRadioButtonSingle1.setFont(new java.awt.Font("Times New Roman", 1, 15)); // NOI18N + jRadioButtonSingle1.setText("Single"); + jRadioButtonSingle1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jRadioButtonSingle1ActionPerformed(evt); + } + }); + + jRadioButtonEconomy1.setFont(new java.awt.Font("Times New Roman", 1, 15)); // NOI18N + jRadioButtonEconomy1.setText("Economy"); + jRadioButtonEconomy1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jRadioButtonEconomy1ActionPerformed(evt); + } + }); + + jRadioButtonReturn1.setFont(new java.awt.Font("Times New Roman", 1, 15)); // NOI18N + jRadioButtonReturn1.setText("Return"); + jRadioButtonReturn1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jRadioButtonReturn1ActionPerformed(evt); + } + }); + + jRadioButtonFirstClass1.setFont(new java.awt.Font("Times New Roman", 1, 15)); // NOI18N + jRadioButtonFirstClass1.setText("First Class"); + jRadioButtonFirstClass1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jRadioButtonFirstClass1ActionPerformed(evt); + } + }); + + jComboBoxTime.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Select Time", "11:30", "12:30", "1:30", "2:30" })); + + javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); + jPanel3.setLayout(jPanel3Layout); + jPanel3Layout.setHorizontalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGap(36, 36, 36) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel6) + .addComponent(jLabel3) + .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(32, 32, 32) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jTextFieldPassenger1, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jComboBoxDestination, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jComboBoxTime, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() + .addComponent(jRadioButtonFirstClass1) + .addGap(18, 18, 18)) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(jRadioButtonSingle1) + .addGap(50, 50, 50))) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jRadioButtonReturn1) + .addComponent(jRadioButtonEconomy1))) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(jDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, 222, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(0, 57, Short.MAX_VALUE))))) + .addContainerGap(47, Short.MAX_VALUE)) + ); + jPanel3Layout.setVerticalGroup( + jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addContainerGap() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jComboBoxDestination, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jDateChooser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jComboBoxTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(18, 18, 18) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(jPanel3Layout.createSequentialGroup() + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jRadioButtonReturn1)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(jPanel3Layout.createSequentialGroup() + .addComponent(jRadioButtonSingle1) + .addGap(45, 45, 45)) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jRadioButtonFirstClass1) + .addComponent(jRadioButtonEconomy1))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextFieldPassenger1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + jPanel4.setBackground(new java.awt.Color(153, 153, 153)); + jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3)); + + jLabel16.setFont(new java.awt.Font("Times New Roman", 1, 20)); // NOI18N + jLabel16.setText("Total"); + + jLabel17.setFont(new java.awt.Font("Times New Roman", 1, 20)); // NOI18N + jLabel17.setText("Sub Total "); + + jLabel18.setFont(new java.awt.Font("Times New Roman", 1, 20)); // NOI18N + jLabel18.setText("Tax "); + + jTextFieldTax.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldTax.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldTaxActionPerformed(evt); + } + }); + + jTextFieldTotal.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldTotal.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldTotalActionPerformed(evt); + } + }); + + jTextFieldSubTotal.setBackground(new java.awt.Color(204, 204, 204)); + jTextFieldSubTotal.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jTextFieldSubTotalActionPerformed(evt); + } + }); + + javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); + jPanel4.setLayout(jPanel4Layout); + jPanel4Layout.setHorizontalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addGap(49, 49, 49) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jTextFieldTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() + .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jTextFieldTax, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() + .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(jTextFieldSubTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGap(68, 68, 68)) + ); + jPanel4Layout.setVerticalGroup( + jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel4Layout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextFieldTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jTextFieldTax, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jTextFieldSubTotal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(64, 64, 64)) + ); + + jButtonTotal.setBackground(new java.awt.Color(0, 255, 0)); + jButtonTotal.setFont(new java.awt.Font("Times New Roman", 1, 22)); // NOI18N + jButtonTotal.setText("Submit"); + jButtonTotal.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + jButtonTotalActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(223, 223, 223) + .addComponent(jButtonTotal) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(30, 30, 30) + .addComponent(jButtonTotal) + .addGap(29, 29, 29) + .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGap(0, 80, Short.MAX_VALUE)) + ); + + pack(); + }// </editor-fold>//GEN-END:initComponents + + private void jRadioButtonFirstClass1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonFirstClass1ActionPerformed + // TODO add your handling code here + if(jRadioButtonFirstClass1.isSelected()){ + jRadioButtonEconomy1.setSelected(false); + } + }//GEN-LAST:event_jRadioButtonFirstClass1ActionPerformed + + private void jRadioButtonEconomy1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonEconomy1ActionPerformed + // TODO add your handling code here: + if(jRadioButtonEconomy1.isSelected()){ + jRadioButtonFirstClass1.setSelected(false); + } + }//GEN-LAST:event_jRadioButtonEconomy1ActionPerformed + + private void jTextFieldTaxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldTaxActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldTaxActionPerformed + + private void jTextFieldTotalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldTotalActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldTotalActionPerformed + + private void jTextFieldSubTotalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldSubTotalActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldSubTotalActionPerformed + + private void jTextFieldFormActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldFormActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldFormActionPerformed + + private void jTextFieldToActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldToActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldToActionPerformed + + private void jTextFieldDate2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldDate2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldDate2ActionPerformed + + private void jTextFieldTime2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldTime2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldTime2ActionPerformed + + private void jTextFieldClassActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldClassActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldClassActionPerformed + + private void jTextFieldTicketTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldTicketTypeActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldTicketTypeActionPerformed + + private void jTextFieldPassengers2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldPassengers2ActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldPassengers2ActionPerformed + + private void jTextFieldPriceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTextFieldPriceActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jTextFieldPriceActionPerformed + + private void jButtonTotalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonTotalActionPerformed + // TODO add your handling code here: + int fare=200; + int Tax = 15; + int miles = 0; + int Tfare =0; + int Dtax=0; + int SubTotal = 0; + + if(jComboBoxDestination.getSelectedItem().equals("Kabankalan") && jRadioButtonFirstClass1.isSelected()&& + jRadioButtonSingle1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) ) ){ + + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Kabankalan"); + jTextFieldClass.setText("First Class"); + jTextFieldTicketType.setText("One Way"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 6; + Tfare= (miles*fare)+500; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + + } + else if(jComboBoxDestination.getSelectedItem().equals("Kabankalan") && jRadioButtonEconomy1.isSelected()&& + jRadioButtonSingle1.isSelected() && (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Kabankalan"); + jTextFieldClass.setText("Economy"); + jTextFieldTicketType.setText("One Way"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 6; + Tfare= miles*fare; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Kabankalan") && jRadioButtonFirstClass1.isSelected()&& + jRadioButtonReturn1.isSelected() && (!(jTextFieldPassenger1.getText()== null)) ){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Kabankalan"); + jTextFieldClass.setText("First Class"); + jTextFieldTicketType.setText("Round Trip"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + miles = 6; + Tfare= (miles*fare*2)+500; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Kabankalan") && jRadioButtonEconomy1.isSelected()&& + jRadioButtonReturn1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Kabankalan"); + jTextFieldClass.setText("Economy"); + jTextFieldTicketType.setText("Round Trip"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 6; + Tfare= miles*fare*2; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else if(jComboBoxTime.getSelectedItem().equals("Select Time")){ + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Himamaylan")&& jRadioButtonEconomy1.isSelected()&& + jRadioButtonSingle1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Himamaylan"); + jTextFieldClass.setText("Economy"); + jTextFieldTicketType.setText("One Way"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + miles = 4; + Tfare= miles*fare; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Himamaylan") && jRadioButtonFirstClass1.isSelected() && + jRadioButtonSingle1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) ) ){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Himamaylan"); + jTextFieldClass.setText("First Class"); + jTextFieldTicketType.setText("One Way"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + miles = 4; + Tfare= (miles*fare)+500; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else{ + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Himamaylan")&& jRadioButtonEconomy1.isSelected()&& + jRadioButtonReturn1.isSelected() && (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Himamaylan"); + jTextFieldClass.setText("Economy"); + jTextFieldTicketType.setText("Round Trip"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalabagan"); + + miles = 4; + Tfare= miles*fare*2; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Himamaylan") && jRadioButtonFirstClass1.isSelected() && + jRadioButtonReturn1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) ) ){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Himamaylan"); + jTextFieldClass.setText("First Class"); + jTextFieldTicketType.setText("Round Trip"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + + miles = 4; + Tfare= (miles*fare*2)+500; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Bacolod") && jRadioButtonEconomy1.isSelected() + && jRadioButtonReturn1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Bacolod"); + jTextFieldClass.setText("Economy"); + jTextFieldTicketType.setText("Round Trip"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 5; + Tfare= miles*fare*2; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Bacolod") && jRadioButtonFirstClass1.isSelected() + && jRadioButtonReturn1.isSelected() && (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Bacolod"); + jTextFieldClass.setText("First Class"); + jTextFieldTicketType.setText("Round Trip"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 5; + Tfare= (miles*fare*2)+500; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Bacolod") && jRadioButtonEconomy1.isSelected() + && jRadioButtonSingle1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Bacolod"); + jTextFieldClass.setText("Economy"); + jTextFieldTicketType.setText("One Way"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 5; + Tfare= miles*fare; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Bacolod") && jRadioButtonFirstClass1.isSelected() + && jRadioButtonSingle1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) ) ){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Bacolod"); + jTextFieldClass.setText("First Class"); + jTextFieldTicketType.setText("One Way"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 5; + Tfare= (miles*fare)+500; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Hinigaran")&& jRadioButtonEconomy1.isSelected() + && jRadioButtonSingle1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Hinigaran"); + jTextFieldClass.setText("Economy"); + jTextFieldTicketType.setText("One Way"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 7; + Tfare= miles*fare; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Hinigaran") && jRadioButtonFirstClass1.isSelected() + && jRadioButtonReturn1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) ) ){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Hinigaran"); + jTextFieldClass.setText("First Class"); + jTextFieldTicketType.setText("Round Trip"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 7; + Tfare= (miles*fare*2)+500; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*(Pass); + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Hinigaran")&& jRadioButtonEconomy1.isSelected() + && jRadioButtonReturn1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Hinigaran"); + jTextFieldClass.setText("Economy"); + jTextFieldTicketType.setText("Round Trip"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 7; + Tfare= miles*fare*2; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Hinigaran") && jRadioButtonFirstClass1.isSelected() + && jRadioButtonSingle1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) ) ){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Hinigaran"); + jTextFieldClass.setText("First Class"); + jTextFieldTicketType.setText("One Way"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 7; + Tfare= (miles*fare)+500; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*(Pass); + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Isabela")&& jRadioButtonEconomy1.isSelected() + && jRadioButtonSingle1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Isabela"); + jTextFieldClass.setText("Economy"); + jTextFieldTicketType.setText("One Way"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalabagan"); + + miles = 9; + Tfare= miles*fare; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Isabela") && jRadioButtonFirstClass1.isSelected() + && jRadioButtonSingle1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) ) ){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Isabela"); + jTextFieldClass.setText("First Class"); + jTextFieldTicketType.setText("One Way"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 9; + Tfare= (miles*fare)+500; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if(jComboBoxDestination.getSelectedItem().equals("Isabela")&& jRadioButtonEconomy1.isSelected() + && jRadioButtonReturn1.isSelected()&& (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Isabela"); + jTextFieldClass.setText("Economy"); + jTextFieldTicketType.setText("Round Trip"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 9; + Tfare= miles*fare*2; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + + } + else if(jComboBoxDestination.getSelectedItem().equals("Isabela") && jRadioButtonFirstClass1.isSelected() + && jRadioButtonReturn1.isSelected() && (!(jTextFieldPassenger1.getText()== null) )){ + int Pass = Integer.parseInt(jTextFieldPassenger1.getText()); + + jTextFieldPassengers2.setText(jTextFieldPassenger1.getText()); + jTextFieldTo.setText("Isabela"); + jTextFieldClass.setText("First Class"); + jTextFieldTicketType.setText("Round Trip"); + jTextFieldDate2.setText(jDateChooser.getDate().toString()); + jTextFieldForm.setText("Binalbagan"); + + miles = 9; + Tfare= (miles*fare*2)+500; + Dtax = (Tax*Tfare)/100; + SubTotal = (Dtax + Tfare)*Pass; + String Totalfare= String.format("%d",Tfare); + String DisplayTax = String.format("%d",Dtax); + String Stotal = String.format("%d",SubTotal); + jTextFieldTotal.setText(Totalfare); + jTextFieldTax.setText(DisplayTax); + jTextFieldSubTotal.setText(Stotal); + jTextFieldPrice.setText(Stotal); + jTextFieldTicketType.setText("Round Trip"); + if(jComboBoxTime.getSelectedItem().equals("11:30")){ + jTextFieldTime2.setText("11:30"); + }else if(jComboBoxTime.getSelectedItem().equals("12:30")){ + jTextFieldTime2.setText("12:30"); + } + else if(jComboBoxTime.getSelectedItem().equals("1:30")){ + jTextFieldTime2.setText("1:30"); + }else if(jComboBoxTime.getSelectedItem().equals("2:30")){jTextFieldTime2.setText("2:30");} + else { + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + } + else if((!jRadioButtonSingle1.isSelected() && !jRadioButtonReturn1.isSelected()) || + (!jRadioButtonFirstClass1.isSelected()&& !jRadioButtonEconomy1.isSelected()) || + jComboBoxDestination.getSelectedItem().equals("Select Destination")|| jTextFieldPassenger1.getText()== "" ){ + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + + + else{ + jTextFieldTo.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldSubTotal.setText(null); + jTextFieldPrice.setText(null); + jTextFieldForm.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldTicketType.setText(null); + } + }//GEN-LAST:event_jButtonTotalActionPerformed + + private void jComboBoxDestinationActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxDestinationActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jComboBoxDestinationActionPerformed + + private void jButtonExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonExitActionPerformed + // TODO add your handling code here: + }//GEN-LAST:event_jButtonExitActionPerformed + + private void jButtonExitMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButtonExitMouseExited + // TODO add your handling code here: + }//GEN-LAST:event_jButtonExitMouseExited + + private void jButtonExitMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButtonExitMouseClicked + // TODO add your handling code here: + System.exit(0); + }//GEN-LAST:event_jButtonExitMouseClicked + + private void jButtonResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonResetActionPerformed + // TODO add your handling code here: + jDateChooser.setCalendar(null); + jComboBoxTime.setSelectedIndex(0); + jComboBoxDestination.setSelectedIndex(0); + jTextFieldSubTotal.setText(null); + jTextFieldPassenger1.setText(null); + jTextFieldTotal.setText(null); + jTextFieldTax.setText(null); + jTextFieldTotal.setText(null); + jTextFieldForm.setText(null); + jTextFieldTo.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTime2.setText(null); + jTextFieldDate2.setText(null); + jTextFieldTicketType.setText(null); + jTextFieldClass.setText(null); + jTextFieldPassengers2.setText(null); + jTextFieldPrice.setText(null); + jRadioButtonReturn1.setSelected(false); + jRadioButtonSingle1.setSelected(false); + jRadioButtonFirstClass1.setSelected(false); + jRadioButtonEconomy1.setSelected(false); + + }//GEN-LAST:event_jButtonResetActionPerformed + + private void jRadioButtonSingle1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonSingle1ActionPerformed + // TODO add your handling code here: + if(jRadioButtonSingle1.isSelected()){ + jRadioButtonReturn1.setSelected(false);} + }//GEN-LAST:event_jRadioButtonSingle1ActionPerformed + + private void jRadioButtonReturn1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonReturn1ActionPerformed + // TODO add your handling code here: + if(jRadioButtonReturn1.isSelected()){ + jRadioButtonSingle1.setSelected(false); + } + }//GEN-LAST:event_jRadioButtonReturn1ActionPerformed + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException ex) { + java.util.logging.Logger.getLogger(BusTicketing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (InstantiationException ex) { + java.util.logging.Logger.getLogger(BusTicketing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (IllegalAccessException ex) { + java.util.logging.Logger.getLogger(BusTicketing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } catch (javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(BusTicketing.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + //</editor-fold> + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + new BusTicketing().setVisible(true); + } + }); + } + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.ButtonGroup buttonGroup1; + private javax.swing.JButton jButtonExit; + private javax.swing.JButton jButtonReset; + private javax.swing.JButton jButtonTotal; + private javax.swing.JComboBox<String> jComboBoxDestination; + private javax.swing.JComboBox<String> jComboBoxTime; + private com.toedter.calendar.JDateChooser jDateChooser; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel10; + private javax.swing.JLabel jLabel11; + private javax.swing.JLabel jLabel12; + private javax.swing.JLabel jLabel13; + private javax.swing.JLabel jLabel14; + private javax.swing.JLabel jLabel15; + private javax.swing.JLabel jLabel16; + private javax.swing.JLabel jLabel17; + private javax.swing.JLabel jLabel18; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel4; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel6; + private javax.swing.JLabel jLabel7; + private javax.swing.JLabel jLabel8; + private javax.swing.JLabel jLabel9; + private javax.swing.JPanel jPanel1; + private javax.swing.JPanel jPanel2; + private javax.swing.JPanel jPanel3; + private javax.swing.JPanel jPanel4; + private javax.swing.JRadioButton jRadioButtonEconomy1; + private javax.swing.JRadioButton jRadioButtonFirstClass1; + private javax.swing.JRadioButton jRadioButtonReturn1; + private javax.swing.JRadioButton jRadioButtonSingle1; + private javax.swing.JTextField jTextFieldClass; + private javax.swing.JTextField jTextFieldDate2; + private javax.swing.JTextField jTextFieldForm; + private javax.swing.JTextField jTextFieldPassenger1; + private javax.swing.JTextField jTextFieldPassengers2; + private javax.swing.JTextField jTextFieldPrice; + private javax.swing.JTextField jTextFieldSubTotal; + private javax.swing.JTextField jTextFieldTax; + private javax.swing.JTextField jTextFieldTicketType; + private javax.swing.JTextField jTextFieldTime2; + private javax.swing.JTextField jTextFieldTo; + private javax.swing.JTextField jTextFieldTotal; + // End of variables declaration//GEN-END:variables +} diff --git a/stock-algorithm-js-sandbox/README.md b/stock-algorithm-js-sandbox/README.md new file mode 100644 index 00000000..98d150d1 --- /dev/null +++ b/stock-algorithm-js-sandbox/README.md @@ -0,0 +1,12 @@ +# Stock Algorithm JS Sandbox + +To host the website, serve the files in the root project directory, like so: +``` +# You can pick python, apache, or anything really +python3.7 http.server 8080 # Use python 3.7 as this version fixes the socket issue with chrome +``` +If you have any really cool algorithms, I encourage you to open an issue and post it there. + +The website's CSS making your eyeballs bleed? Open a pull request and comment how lazy I am on styling the website properly while sharing your awesome CSS! + +Have fun!<br> diff --git a/stock-algorithm-js-sandbox/getStockData.js b/stock-algorithm-js-sandbox/getStockData.js new file mode 100644 index 00000000..c979ba1a --- /dev/null +++ b/stock-algorithm-js-sandbox/getStockData.js @@ -0,0 +1,35 @@ +async function getData(stockSymbol, limit){ + if(!stockSymbol){ + alert('Please enter in a value'); + return; + } + + var flag = true; + if(!limit){ + flag = false; + } + var rawData = await (await window.fetch('https://www.alphavantage.co/query?function=TIME_SERIES_DAILY_ADJUSTED&outputsize=full&symbol='+encodeURIComponent(stockSymbol)+'&apikey=VFKNX13I1KQF3WRZ')).json(); + + var errMsg = rawData['Error Message']; + if(errMsg){ + if(errMsg.includes('Invalid API call')){ + alert('Stock symbol not found'); + }else if(errMsg.includes('if you would like to target a higher API call frequency')){ + alert('Oops, looks like you spammed too much. Wait a couple minutes before trying again'); + }else{ + alert('Weird error from alpha vantage:'+errMsg); + } + return; + } + + var labels = []; + var prices = []; + var count = 0; + for(var label in rawData['Time Series (Daily)']){ + if(flag && count >= limit) break; + labels.push(label); + prices.push(parseFloat(rawData['Time Series (Daily)'][label]['4. close'])); + count++; + } + return [labels.reverse(), prices.reverse()]; +} \ No newline at end of file diff --git a/stock-algorithm-js-sandbox/index.html b/stock-algorithm-js-sandbox/index.html new file mode 100644 index 00000000..cba745d1 --- /dev/null +++ b/stock-algorithm-js-sandbox/index.html @@ -0,0 +1,70 @@ +<html> + <head> + <script src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script> + <script src="https://cdn.jsdelivr.net/npm/ace-builds@1.4.8/src-min-noconflict/ace.js"></script> + + <script src="showChart.js"></script> + <script src="getStockData.js"></script> + <script src="main.js"></script> + <link rel='stylesheet' type='text/css' href='main.css'> + <title>Stock Algorithm JS Sandbox</title> + </head> + <body style="margin: 0;"> + <div id="header-wrapper"> + <h2>Stock Algorithm JS Sandbox</h2> + </div> + <div id='result-wrapper'> + <canvas id="chart"></canvas> + </div> + <div id='setting-wrapper'> + <div id='stock-selection'> + <input id='stock-symbol-input' type='text' placeholder='Stock symbol'><br> + <input id='limit-input' type='text' placeholder='Data limit (leave blank for all)'> + <button onclick='getDataClick(document.getElementById("stock-symbol-input").value, document.getElementById("limit-input").value)'>Get Data</button><br> + </div> + <div id='stats-wrapper'> + <span class='info-before'>Amount of money earned:</span> <span class='info-after'></span><br> + <span class='info-before'>Amount of buy decisions:</span> <span class='info-after'></span><br> + <span class='info-before'>Amount of sell decisions:</span> <span class='info-after'></span><br> + <span class='info-before'>Amount of cheating sells:</span> <span class='info-after'></span><br> + <span class='info-before'>Amount of stock left:</span> <span class='info-after'></span><br><br> + <button onclick='run()'>Run simulation</button><button onclick='if(window.confirm("Are you sure you want to clear everything?")){window.localStorage.removeItem("savedProgram");window.location.reload()}'>Clear saved program and reload</button> + </div> +<div id='main-code'>/* +This is the space that you need to program in javascript, to create your own stock algorithm. +There should be a "main" function, so that parameters can be passed in. +Also, the main function should return either true for buy, false for sell, and undefined (no return) for no action. +Like so: +this.main = function(previousData, amountOfStock){ + // Code here + // Something magical happens + return true; // true for buy, false for sell, undefined for no action +} +The amount of previous data can also be set using: +this.previousDataAmt = 10; // Default 10 +Note that previousData will always have a length of previousDataAmt, which means it will start at previousDataAmt from the beginning + +FINAL NOTE: A cheater would be like this.main=function(){return false} and get huge profits. Well... not happening here. +If the program tries to sell, but doesn't have any stock to sell, it will do nothing. + +Good luck +Simon Cheng +*/ +this.previousDataAmt = 10; +this.main = function(previousData, amountOfStock){ + +};</div> + </div> + <script> + if(window.localStorage.getItem('savedProgram')){ + document.getElementById('main-code').innerHTML = window.localStorage.getItem('savedProgram'); + } + window.editor = ace.edit("main-code"); + window.editor.setTheme("ace/theme/dawn"); + window.editor.session.setMode("ace/mode/javascript"); + window.editor.session.on('change', function(){ + window.localStorage.setItem('savedProgram', window.editor.session.getValue()); + }); + </script> + </body> +</html> \ No newline at end of file diff --git a/stock-algorithm-js-sandbox/main.css b/stock-algorithm-js-sandbox/main.css new file mode 100644 index 00000000..feadfaba --- /dev/null +++ b/stock-algorithm-js-sandbox/main.css @@ -0,0 +1,43 @@ +#header-wrapper{ + text-align: center; + height: 40px; +} +#header-wrapper h2{ + margin: 0; +} +#header-wrapper h4{ + margin: 0; +} + +#result-wrapper{ + width: 50%; + height: calc(100% - 50px); + margin-top: 10px; + + float: left; +} +#setting-wrapper{ + width: 50%; + height: calc(100% - 50px); + margin-top: 10px; + + float: left; +} + +#stock-selection{ + height: 50px; + width: 100%; +} +#stats-wrapper{ + height: 145px; + width: 100%; +} +#main-code{ + height: calc(100% - 50px - 145px); + width: 100%; +} + +.info-before{ + display: inline-block; + width: 175px; +} \ No newline at end of file diff --git a/stock-algorithm-js-sandbox/main.js b/stock-algorithm-js-sandbox/main.js new file mode 100644 index 00000000..1ad8cf7b --- /dev/null +++ b/stock-algorithm-js-sandbox/main.js @@ -0,0 +1,78 @@ +async function getDataClick(...args){ + var stockData = await getData(...args); + if(stockData){ + window.labels = stockData[0]; + window.stockPrices = stockData[1]; + generateChart(document.getElementById('chart'), window.labels, window.stockPrices, [], []); + } +} +function run(){ + if(!window.stockPrices){ + alert('That chart to the left is just for show. Now get some data!'); + return; + } + + var userProgram = window.editor.session.getValue(); + try{ + eval(userProgram); + }catch(e){ + console.error(e); + alert('An error occurred while running your script. Check the console for more details.\n'+e); + return; + } + if(!this.previousDataAmt){ + this.previousDataAmt = 10; + } + if(this.previousDataAmt >= window.stockPrices.length){ + alert('previousDataAmt is greater or equal to the amount of stock prices. Adjust to a lower value'); + return; + } + + var wallet = 0; + var buyDecisionCount = 0; + var sellDecisionCount = 0; + var numberOfCheatingSells = 0; + var stocks = 0; + + var buyPosition = []; + var sellPosition = []; + for(var count = this.previousDataAmt; count < window.stockPrices.length; count++){ + try{ + var result = this.main(window.stockPrices.slice(count-this.previousDataAmt, count), stocks); + if(result === true){ + buyDecisionCount += 1; + stocks += 1; + wallet -= window.stockPrices[count]; + + buyPosition.push(window.labels[count]); + }else if(result === false){ + if(stocks <= 0){ + numberOfCheatingSells += 1; + }else{ + sellDecisionCount += 1; + stocks -= 1; + wallet += window.stockPrices[count]; + + sellPosition.push(window.labels[count]); + } + }else if(result === undefined){ + // Do nothing + }else{ + alert('Your main function returned something other than a boolean or "undefined"!'); + return; + } + }catch(e){ + console.error(e); + alert('An error occurred while running your script. Check the console for more details.\n'+e); + return; + } + } + + generateChart(document.getElementById('chart'), window.labels, window.stockPrices, buyPosition, sellPosition); + + document.getElementsByClassName('info-after')[0].innerHTML = wallet.toFixed(2); + document.getElementsByClassName('info-after')[1].innerHTML = buyDecisionCount; + document.getElementsByClassName('info-after')[2].innerHTML = sellDecisionCount; + document.getElementsByClassName('info-after')[3].innerHTML = numberOfCheatingSells; + document.getElementsByClassName('info-after')[4].innerHTML = stocks; +} \ No newline at end of file diff --git a/stock-algorithm-js-sandbox/showChart.js b/stock-algorithm-js-sandbox/showChart.js new file mode 100644 index 00000000..ba2352dd --- /dev/null +++ b/stock-algorithm-js-sandbox/showChart.js @@ -0,0 +1,72 @@ +/** + * Arguments: + * canvas: element of canvas + * labels: [January, feburary, ....] or [1,2,3,4] + * stockData: [1,5,2,1,0,4,2,23] + * buyDecision: The x positions of buying [January, feburary, 20, December] + * sellDecision: Same thing above but for buying + * + * Note: stockData.length MUST equal labels.length +*/ +function generateChart(canvas, labels, stockData, buyDecision, sellDecision){ + function gen(decisions){ + var data = []; + for(var eachLabel of decisions){ + data.push({ + x: eachLabel, + y: stockData[labels.indexOf(eachLabel)], + r: 5 + }); + } + return data; + } + if(window.chartInstance){ + window.chartInstance.destroy(); + } + window.chartInstance = new Chart(canvas.getContext('2d'), { + type: 'line', + data: { + labels, + datasets: [{ + label: 'Stock data', + borderColor: 'rgb(0,0,0)', + data: stockData, + lineTension: 0, + fill: false, + radius: 0, + borderWidth: 1 + },{ + label: 'Buy decision', + borderColor: 'rgb(255,0,0)', + data: gen(buyDecision), + fill: false, + type: 'bubble', + backgroundColor: 'rgb(255,0,0)', + pointStyle: 'triangle', + rotation: 0 + },{ + label: 'Sell decision', + borderColor: 'rgb(0,0,255)', + data: gen(sellDecision), + fill: false, + type: 'bubble', + backgroundColor: 'rgb(0,0,255)', + pointStyle: 'triangle', + rotation: 180 + }] + }, + options: { + title: { + display: true, + text: 'Results' + }, + maintainAspectRatio: false + } + }); +} +window.onload = function(){ + var chartDom = document.getElementById('chart'); + + // Dummy data for show + window.mainChart = generateChart(chartDom, [1,2,3,4,5], [20, 60, 50, 99, 100], [2,3], [5]); +}; \ No newline at end of file diff --git a/stockPortfolioTracker.java b/stockPortfolioTracker.java new file mode 100644 index 00000000..488b73cf --- /dev/null +++ b/stockPortfolioTracker.java @@ -0,0 +1,92 @@ +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +class Stock { + private String symbol; + private String name; + private double price; + private int quantity; + + public Stock(String symbol, String name, double price, int quantity) { + this.symbol = symbol; + this.name = name; + this.price = price; + this.quantity = quantity; + } + + public double getValue() { + return price * quantity; + } + + public String getSymbol() { + return symbol; + } + + public String getName() { + return name; + } + + public double getPrice() { + return price; + } + + public int getQuantity() { + return quantity; + } +} + +public class StockPortfolioTracker { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + List<Stock> portfolio = new ArrayList<>(); + + while (true) { + System.out.println("Stock Portfolio Tracker Menu:"); + System.out.println("1. Add Stock"); + System.out.println("2. View Portfolio"); + System.out.println("3. Exit"); + System.out.print("Select an option (1/2/3): "); + + int option = scanner.nextInt(); + + switch (option) { + case 1: + scanner.nextLine(); + System.out.print("Enter stock symbol: "); + String symbol = scanner.nextLine(); + System.out.print("Enter stock name: "); + String name = scanner.nextLine(); + System.out.print("Enter stock price: $"); + double price = scanner.nextDouble(); + System.out.print("Enter quantity: "); + int quantity = scanner.nextInt(); + + portfolio.add(new Stock(symbol, name, price, quantity)); + System.out.println("Stock added successfully."); + break; + case 2: + if (portfolio.isEmpty()) { + System.out.println("Your portfolio is empty."); + } else { + System.out.println("Stock Portfolio:"); + for (Stock stock : portfolio) { + System.out.println("Symbol: " + stock.getSymbol()); + System.out.println("Name: " + stock.getName()); + System.out.println("Price: $" + stock.getPrice()); + System.out.println("Quantity: " + stock.getQuantity()); + System.out.println("Value: $" + stock.getValue()); + System.out.println(); + } + } + break; + case 3: + System.out.println("Exiting the Stock Portfolio Tracker."); + scanner.close(); + System.exit(0); + default: + System.out.println("Invalid option. Please select 1, 2, or 3."); + } + } + } +} diff --git a/stock_management.java b/stock_management.java new file mode 100644 index 00000000..c6c4802a --- /dev/null +++ b/stock_management.java @@ -0,0 +1,119 @@ +import java.util.ArrayList; +import java.util.Scanner; + +public class StockManagementSystem { + + public static void main(String[] args) { + Scanner input = new Scanner(System.in); + + // create an empty arraylist to hold the stocks + ArrayList<Stock> stocks = new ArrayList<>(); + + // display the menu and ask for user input + int choice; + do { + System.out.println("1. Add stock"); + System.out.println("2. Remove stock"); + System.out.println("3. View stock"); + System.out.println("4. Exit"); + System.out.print("Enter your choice: "); + choice = input.nextInt(); + + switch (choice) { + case 1: + // ask for stock details + System.out.print("Enter the stock name: "); + String name = input.next(); + System.out.print("Enter the stock quantity: "); + int quantity = input.nextInt(); + System.out.print("Enter the stock price: "); + double price = input.nextDouble(); + + // create a new Stock object and add it to the arraylist + Stock newStock = new Stock(name, quantity, price); + stocks.add(newStock); + + System.out.println("Stock added successfully"); + break; + + case 2: + // ask for the stock name and quantity to remove + System.out.print("Enter the stock name: "); + String stockName = input.next(); + System.out.print("Enter the quantity to remove: "); + int removeQuantity = input.nextInt(); + + // loop through the stocks to find the matching stock + boolean stockFound = false; + for (Stock stock : stocks) { + if (stock.getName().equals(stockName)) { + // if the stock is found, remove the specified quantity + stockFound = true; + stock.removeQuantity(removeQuantity); + System.out.println("Stock removed successfully"); + break; + } + } + if (!stockFound) { + System.out.println("Stock not found"); + } + break; + + case 3: + // display the list of stocks + System.out.println("Current stocks:"); + for (Stock stock : stocks) { + System.out.println(stock.toString()); + } + break; + + case 4: + System.out.println("Exiting the program..."); + break; + + default: + System.out.println("Invalid choice, try again."); + break; + } + + } while (choice != 4); + + input.close(); + } +} + +class Stock { + private String name; + private int quantity; + private double price; + + public Stock(String name, int quantity, double price) { + this.name = name; + this.quantity = quantity; + this.price = price; + } + + public String getName() { + return name; + } + + public int getQuantity() { + return quantity; + } + + public double getPrice() { + return price; + } + + public void removeQuantity(int quantityToRemove) { + if (quantityToRemove <= quantity) { + quantity -= quantityToRemove; + } else { + System.out.println("Not enough quantity to remove"); + } + } + + public String toString() { + return name + ", quantity: " + quantity + ", price: $" + price; + } +} diff --git a/studentGrade3524.java b/studentGrade3524.java new file mode 100644 index 00000000..e5290bce --- /dev/null +++ b/studentGrade3524.java @@ -0,0 +1,43 @@ +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.*; + +public class studentGrade3524 { + public static void main(String[] args) { + System.out.println("2021503524 - Mugundh J B"); + System.out.println("Date: " + LocalDate.now() + " Time: " + LocalTime.now()); + // Create a Scanner to read user input + Scanner in = new Scanner(System.in); + // Prompt the user for the number of subjects + System.out.print("Enter no of subjects: "); + int n = in.nextInt(); + // Consume newline character left in buffer + String buff = in.nextLine(); + // Initialize an array to store marks for each subject + int[] arr = new int[n]; + // Prompt the user to enter marks for each subject and validate input + System.out.println("Enter the marks: "); + for (int i = 0; i < n; i++) { + arr[i] = in.nextInt(); + if (arr[i] < 0 || arr[i] > 100) { + System.out.println("Invalid input! Enter again: "); + arr[i] = in.nextInt(); + } + } + // Determine the grade for each subject based on marks and display it + for (int i = 0; i < n; i++) { + if (arr[i] >= 90 && arr[i] <= 100) + System.out.printf("Grade of subject %d = %s\n", i + 1, "O"); + else if (arr[i] >= 80 && arr[i] <= 89) + System.out.printf("Grade of subject %d = %s\n", i + 1, "A+"); + else if (arr[i] >= 70 && arr[i] <= 79) + System.out.printf("Grade of subject %d = %s\n", i + 1, "A"); + else if (arr[i] >= 60 && arr[i] <= 69) + System.out.printf("Grade of subject %d = %s\n", i + 1, "B+"); + else if (arr[i] >= 50 && arr[i] <= 59) + System.out.printf("Grade of subject %d = %s\n", i + 1, "B"); + else + System.out.printf("Grade of subject %d = %s", i + 1, "U"); + } + } +} diff --git a/style.css b/style.css new file mode 100644 index 00000000..917b8ab9 --- /dev/null +++ b/style.css @@ -0,0 +1,92 @@ +html { + font-family: sans-serif; + } + + body { + width: 300px; + max-width: 750px; + min-width: 480px; + margin: 0 auto; + background-color: #212121; + } + + .lastResult { + color: white; + padding: 7px; + } + + .guesses { + color: white; + padding: 7px; + } + + button { + background-color: #141414; + color: #fff; + width: 250px; + height: 50px; + border-radius: 25px; + font-size: 30px; + border-style: none; + margin-top: 30px; + /* margin-left: 50px; */ + } + + #subt { + background-color: #161616; + color: #ffffff; + width: 200px; + height: 50px; + border-radius: 10px; + font-size: 20px; + border-style: none; + margin-top: 50px; + /* margin-left: 75px; */ + } + + #guessField { + color: #000; + width: 250px; + height: 50px; + font-size: 30px; + border-style: none; + margin-top: 25px; + + /* margin-left: 50px; */ + border: 5px solid #6c6d6d; + text-align: center; + } + + #guess { + font-size: 55px; + /* margin-left: 90px; */ + margin-top: 120px; + color: #fff; + } + + .guesses { + background-color: #7a7a7a; + } + + #wrapper { + box-sizing: border-box; + text-align: center; + width: 450px; + height: 584px; + background-color: #474747; + color: #fff; + font-size: 25px; + } + + h1 { + background-color: #161616; + + color: #fff; + text-align: center; + } + + p { + font-size: 16px; + text-align: center; + } + \ No newline at end of file diff --git a/sum.java b/sum.java new file mode 100644 index 00000000..bae3e609 --- /dev/null +++ b/sum.java @@ -0,0 +1,22 @@ +import java.util.Scanner; + +public class SumNumbers { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + int sum = 0; + + System.out.println("Enter numbers (enter 0 to calculate the sum):"); + + while (true) { + int number = scanner.nextInt(); + if (number == 0) { + break; // Exit the loop if the user enters 0 + } + sum += number; + } + + System.out.println("The sum of the numbers is: " + sum); + + scanner.close(); // Don't forget to close the scanner + } +} \ No newline at end of file diff --git a/swingIpFInder.java b/swingIpFInder.java new file mode 100644 index 00000000..907b528f --- /dev/null +++ b/swingIpFInder.java @@ -0,0 +1,38 @@ +import javax.swing.*; +import java.awt.event.*; +import java.net.*; +public class IPFinder extends JFrame implements ActionListener{ + JLabel l; + JTextField tf; + JButton b; +IPFinder(){ + super("IP Finder Tool - Javatpoint"); + l=new JLabel("Enter URL:"); + l.setBounds(50,70,150,20);; + tf=new JTextField(); + tf.setBounds(50,100,200,20); + + b=new JButton("Find IP"); + b.setBounds(50,150,80,30); + b.addActionListener(this); + add(l); + add(tf); + add(b); + setSize(300,300); + setLayout(null); + setVisible(true); +} +public void actionPerformed(ActionEvent e){ + String url=tf.getText(); + try { + InetAddress ia=InetAddress.getByName(url); + String ip=ia.getHostAddress(); + JOptionPane.showMessageDialog(this,ip); + } catch (UnknownHostException e1) { + JOptionPane.showMessageDialog(this,e1.toString()); + } +} +public static void main(String[] args) { + new IPFinder(); +} +} diff --git a/target/dependency/hamcrest-core-1.3.jar b/target/dependency/hamcrest-core-1.3.jar new file mode 100644 index 00000000..9d5fe16e Binary files /dev/null and b/target/dependency/hamcrest-core-1.3.jar differ diff --git a/target/dependency/json-simple-1.1.1.jar b/target/dependency/json-simple-1.1.1.jar new file mode 100644 index 00000000..dfd5856d Binary files /dev/null and b/target/dependency/json-simple-1.1.1.jar differ diff --git a/target/dependency/junit-4.12.jar b/target/dependency/junit-4.12.jar new file mode 100644 index 00000000..3a7fc266 Binary files /dev/null and b/target/dependency/junit-4.12.jar differ diff --git a/terminal_bar_graph.java b/terminal_bar_graph.java new file mode 100644 index 00000000..ad0e6722 --- /dev/null +++ b/terminal_bar_graph.java @@ -0,0 +1,31 @@ +import java.util.*; +public class terminal_bar_graph +{ + public static void main(String args[]) + { + System.out.println("\u000C"); + Scanner sc=new Scanner(System.in); + System.out.println("Enter 10 numbers: "); + int a[]=new int[10];char b=(char)(9608);char c=(char)(9612); + int d[]=new int[10]; + int e[]=new int[10]; + for(int i=0;i<10;i++) + { + a[i]=sc.nextInt(); + e[i]=a[i]; + d[i]=a[i]%2; + a[i]=a[i]/2; + } + System.out.println("\u000C"); + for(int i=0;i<10;i++) + { + for(int j=0;j<a[i];j++) + { + System.out.print(b); + if(d[i]==1&&j==a[i]-1) + System.out.print(c); + } + System.out.println(e[i]); + } + } +} \ No newline at end of file diff --git a/textEditor.java b/textEditor.java new file mode 100644 index 00000000..c496842f --- /dev/null +++ b/textEditor.java @@ -0,0 +1,201 @@ + import java.awt.*; + import java.awt.event.*; + import java.io.*; + import java.util.*; + //Texteditor class starts here + class Texteditor extends Frame implements ActionListener + { + TextArea ta=new TextArea(); + int i,len1,len,pos1; + String str="",s3="",s2="",s4="",s32="",s6="",s7="",s8="",s9=""; + String months[]={"January","February","March","April","May","June","July","August","September","October","November","December"}; + CheckboxMenuItem chkb=new CheckboxMenuItem("Word Wrap"); + public Texteditor() + { + MenuBar mb=new MenuBar(); + setLayout(new BorderLayout()); + add("Center",ta); + setMenuBar(mb); + Menu m1=new Menu("File"); + Menu m2=new Menu("Edit"); + Menu m3=new Menu("Tools"); + Menu m4=new Menu("Help"); + mb.add(m1); + mb.add(m2); + mb.add(m3); + mb.add(m4); + MenuItem mi1[]={ + new MenuItem("New"),new MenuItem("Open"),new MenuItem("Save") + ,new MenuItem("Save As"),new MenuItem("Page Setup") + ,new MenuItem("Print"),new MenuItem("Exit") + }; + MenuItem mi2[]={new MenuItem("Delete"),new MenuItem("Cut"), + new MenuItem("Copy"),new MenuItem("Paste"),new MenuItem("Find"), + new MenuItem("Find Next"),new MenuItem("Replace"), + new MenuItem("Go To"),new MenuItem("Select All"), + new MenuItem("Time Stamp")}; + MenuItem mi3[]={new MenuItem("Choose Font"),new MenuItem("Compile"), + new MenuItem("Run")}; + MenuItem mi4[]={new MenuItem("Help Topics"), + new MenuItem("About Texteditor")}; + for(int i=0;i<len1;i++ )="" <br=""> { + m1.add(mi1[i]); + mi1[i].addActionListener(this); + } + for(int i=0;i<len1;i++) {="" <br=""> m2.add(mi2[i]); + mi2[i].addActionListener(this); + } + m3.add(chkb); + chkb.addActionListener(this); + for(int i=0;i<len1;i++ )="" <br=""> { + m3.add(mi3[i]); + mi3[i].addActionListener(this); + } + for(int i=0;i<len1;i++) <br=""> { + m4.add(mi4[i]); + mi4[i].addActionListener(this); + } + MyWindowsAdapter mw=new MyWindowsAdapter(this); + addWindowListener(mw); + setSize(500,500); + setTitle("untitled notepad"); + setVisible(true); + } + public void actionPerformed(ActionEvent ae) + { + String arg=(String)ae.getActionCommand(); + if(arg.equals("New")) + { dispose(); + Texteditor t11=new Texteditor(); + t11.setSize(500,500); + t11.setVisible(true); + } + try { + if(arg.equals("Open")) + { + FileDialog fd1=new FileDialog(this,"Select File",FileDialog.LOAD); + fd1.setVisible(true); + String s4=""; + s2=fd1.getFile(); + s3=fd1.getDirectory(); + s32=s3+s2; + File f=new File(s32); + FileInputStream fii=new FileInputStream(f); + len=(int)f.length(); + for(int j=0;j<len1;j++ )="" <br=""> { + char s5=(char)fii.read(); + s4=s4 + s5; + } + ta.setText(s4); + } + } + catch(IOException e) + { + } + try + { + if(arg.equals("Save As")) + { + FileDialog dialog1=new FileDialog(this,"Save As",FileDialog.SAVE); + dialog1.setVisible(true); + s7=dialog1.getDirectory(); + s8=dialog1.getFile(); + s9=s7+s8+".txt"; + s6=ta.getText(); + len1=s6.length(); + byte buf[]=s6.getBytes(); + File f1=new File(s9); + FileOutputStream fobj1=new FileOutputStream(f1); + for(int k=0;k<len1;k++) <br=""> { + fobj1.write(buf[k]); + } + fobj1.close(); + } + this.setTitle(s8 +" Texteditor File"); + } + catch(IOException e){} + if(arg.equals("Exit")) + { + System.exit(0); + } + if(arg.equals("Cut")) + { + str=ta.getSelectedText(); + i=ta.getText().indexOf(str); + ta.replaceRange(" ",i,i+str.length()); + } + if(arg.equals("Copy")) + { + str=ta.getSelectedText(); + } + if(arg.equals("Paste")) + { + pos1=ta.getCaretPosition(); + ta.insert(str,pos1); + } + if(arg.equals("Delete")) + { + String msg=ta.getSelectedText(); + i=ta.getText().indexOf(msg); + ta.replaceRange(" ",i,i+msg.length()); + msg=""; + } + if(arg.equals("Select All")) + { + String strText=ta.getText(); + int strLen=strText.length(); + ta.select(0,strLen); + } + if(arg.equals("Time Stamp")) + { + GregorianCalendar gcalendar=new GregorianCalendar(); + String h=String.valueOf(gcalendar.get(Calendar.HOUR)); + String m=String.valueOf(gcalendar.get(Calendar.MINUTE)); + String s=String.valueOf(gcalendar.get(Calendar.SECOND)); + String date=String.valueOf(gcalendar.get(Calendar.DATE)); + String mon=months[gcalendar.get(Calendar.MONTH)]; + String year=String.valueOf(gcalendar.get(Calendar.YEAR)); + String hms="Time"+" - "+h+":"+m+":"+s+" Date"+" - "+date+" "+mon+" "+year+" "; + int loc=ta.getCaretPosition(); + ta.insert(hms,loc); + } + if(arg.equals("About Texteditor")) + { + AboutDialog d1=new AboutDialog(this,"About Texteditor"); + d1.setVisible(true); + setSize(500,500); + } + }//Action pereformed end + public class MyWindowsAdapter extends WindowAdapter + { + Texteditor tt; + public MyWindowsAdapter(Texteditor ttt) + { + tt=ttt; + } + public void windowClosing(WindowEvent we) + { + tt.dispose(); + } + }//Inner class winadapter end.... + }//End of Texteditor class + public class balls + { public static void main(String args[]) + { + Texteditor to=new Texteditor(); + } + } + class AboutDialog extends Dialog implements ActionListener + { + AboutDialog(Frame parent,String title) + { + super(parent,title,false); + this.setResizable(false); + setLayout(new FlowLayout(FlowLayout.LEFT)); + setSize(500,300); + } + public void actionPerformed(ActionEvent ae) + { + dispose(); + } + } diff --git a/the_metro_app/Graph_M$DijkstraPair.class b/the_metro_app/Graph_M$DijkstraPair.class new file mode 100644 index 00000000..af02520f Binary files /dev/null and b/the_metro_app/Graph_M$DijkstraPair.class differ diff --git a/the_metro_app/Graph_M$Pair.class b/the_metro_app/Graph_M$Pair.class new file mode 100644 index 00000000..1a73cb54 Binary files /dev/null and b/the_metro_app/Graph_M$Pair.class differ diff --git a/the_metro_app/Graph_M$Vertex.class b/the_metro_app/Graph_M$Vertex.class new file mode 100644 index 00000000..b4146705 Binary files /dev/null and b/the_metro_app/Graph_M$Vertex.class differ diff --git a/the_metro_app/Graph_M.class b/the_metro_app/Graph_M.class new file mode 100644 index 00000000..e4542c28 Binary files /dev/null and b/the_metro_app/Graph_M.class differ diff --git a/the_metro_app/Graph_M.java b/the_metro_app/Graph_M.java new file mode 100644 index 00000000..246b482e --- /dev/null +++ b/the_metro_app/Graph_M.java @@ -0,0 +1,704 @@ +import java.util.*; +import java.io.*; + + + public class Graph_M + { + public class Vertex + { + HashMap<String, Integer> nbrs = new HashMap<>(); + } + + static HashMap<String, Vertex> vtces; + + public Graph_M() + { + vtces = new HashMap<>(); + } + + public int numVetex() + { + return this.vtces.size(); + } + + public boolean containsVertex(String vname) + { + return this.vtces.containsKey(vname); + } + + public void addVertex(String vname) + { + Vertex vtx = new Vertex(); + vtces.put(vname, vtx); + } + + public void removeVertex(String vname) + { + Vertex vtx = vtces.get(vname); + ArrayList<String> keys = new ArrayList<>(vtx.nbrs.keySet()); + + for (String key : keys) + { + Vertex nbrVtx = vtces.get(key); + nbrVtx.nbrs.remove(vname); + } + + vtces.remove(vname); + } + + public int numEdges() + { + ArrayList<String> keys = new ArrayList<>(vtces.keySet()); + int count = 0; + + for (String key : keys) + { + Vertex vtx = vtces.get(key); + count = count + vtx.nbrs.size(); + } + + return count / 2; + } + + public boolean containsEdge(String vname1, String vname2) + { + Vertex vtx1 = vtces.get(vname1); + Vertex vtx2 = vtces.get(vname2); + + if (vtx1 == null || vtx2 == null || !vtx1.nbrs.containsKey(vname2)) { + return false; + } + + return true; + } + + public void addEdge(String vname1, String vname2, int value) + { + Vertex vtx1 = vtces.get(vname1); + Vertex vtx2 = vtces.get(vname2); + + if (vtx1 == null || vtx2 == null || vtx1.nbrs.containsKey(vname2)) { + return; + } + + vtx1.nbrs.put(vname2, value); + vtx2.nbrs.put(vname1, value); + } + + public void removeEdge(String vname1, String vname2) + { + Vertex vtx1 = vtces.get(vname1); + Vertex vtx2 = vtces.get(vname2); + + //check if the vertices given or the edge between these vertices exist or not + if (vtx1 == null || vtx2 == null || !vtx1.nbrs.containsKey(vname2)) { + return; + } + + vtx1.nbrs.remove(vname2); + vtx2.nbrs.remove(vname1); + } + + public void display_Map() + { + System.out.println("\t Delhi Metro Map"); + System.out.println("\t------------------"); + System.out.println("----------------------------------------------------\n"); + ArrayList<String> keys = new ArrayList<>(vtces.keySet()); + + for (String key : keys) + { + String str = key + " =>\n"; + Vertex vtx = vtces.get(key); + ArrayList<String> vtxnbrs = new ArrayList<>(vtx.nbrs.keySet()); + + for (String nbr : vtxnbrs) + { + str = str + "\t" + nbr + "\t"; + if (nbr.length()<16) + str = str + "\t"; + if (nbr.length()<8) + str = str + "\t"; + str = str + vtx.nbrs.get(nbr) + "\n"; + } + System.out.println(str); + } + System.out.println("\t------------------"); + System.out.println("---------------------------------------------------\n"); + + } + + public void display_Stations() + { + System.out.println("\n***********************************************************************\n"); + ArrayList<String> keys = new ArrayList<>(vtces.keySet()); + int i=1; + for(String key : keys) + { + System.out.println(i + ". " + key); + i++; + } + System.out.println("\n***********************************************************************\n"); + } + + ///////////////////////////////////////////////////////////////////////////////////////////////////////////// + + public boolean hasPath(String vname1, String vname2, HashMap<String, Boolean> processed) + { + // DIR EDGE + if (containsEdge(vname1, vname2)) { + return true; + } + + //MARK AS DONE + processed.put(vname1, true); + + Vertex vtx = vtces.get(vname1); + ArrayList<String> nbrs = new ArrayList<>(vtx.nbrs.keySet()); + + //TRAVERSE THE NBRS OF THE VERTEX + for (String nbr : nbrs) + { + + if (!processed.containsKey(nbr)) + if (hasPath(nbr, vname2, processed)) + return true; + } + + return false; + } + + + private class DijkstraPair implements Comparable<DijkstraPair> + { + String vname; + String psf; + int cost; + + /* + The compareTo method is defined in Java.lang.Comparable. + Here, we override the method because the conventional compareTo method + is used to compare strings,integers and other primitive data types. But + here in this case, we intend to compare two objects of DijkstraPair class. + */ + + /* + Removing the overriden method gives us this errror: + The type Graph_M.DijkstraPair must implement the inherited abstract method Comparable<Graph_M.DijkstraPair>.compareTo(Graph_M.DijkstraPair) + + This is because DijkstraPair is not an abstract class and implements Comparable interface which has an abstract + method compareTo. In order to make our class concrete(a class which provides implementation for all its methods) + we have to override the method compareTo + */ + @Override + public int compareTo(DijkstraPair o) + { + return o.cost - this.cost; + } + } + + public int dijkstra(String src, String des, boolean nan) + { + int val = 0; + ArrayList<String> ans = new ArrayList<>(); + HashMap<String, DijkstraPair> map = new HashMap<>(); + + Heap<DijkstraPair> heap = new Heap<>(); + + for (String key : vtces.keySet()) + { + DijkstraPair np = new DijkstraPair(); + np.vname = key; + //np.psf = ""; + np.cost = Integer.MAX_VALUE; + + if (key.equals(src)) + { + np.cost = 0; + np.psf = key; + } + + heap.add(np); + map.put(key, np); + } + + //keep removing the pairs while heap is not empty + while (!heap.isEmpty()) + { + DijkstraPair rp = heap.remove(); + + if(rp.vname.equals(des)) + { + val = rp.cost; + break; + } + + map.remove(rp.vname); + + ans.add(rp.vname); + + Vertex v = vtces.get(rp.vname); + for (String nbr : v.nbrs.keySet()) + { + if (map.containsKey(nbr)) + { + int oc = map.get(nbr).cost; + Vertex k = vtces.get(rp.vname); + int nc; + if(nan) + nc = rp.cost + 120 + 40*k.nbrs.get(nbr); + else + nc = rp.cost + k.nbrs.get(nbr); + + if (nc < oc) + { + DijkstraPair gp = map.get(nbr); + gp.psf = rp.psf + nbr; + gp.cost = nc; + + heap.updatePriority(gp); + } + } + } + } + return val; + } + + private class Pair + { + String vname; + String psf; + int min_dis; + int min_time; + } + + public String Get_Minimum_Distance(String src, String dst) + { + int min = Integer.MAX_VALUE; + //int time = 0; + String ans = ""; + HashMap<String, Boolean> processed = new HashMap<>(); + LinkedList<Pair> stack = new LinkedList<>(); + + // create a new pair + Pair sp = new Pair(); + sp.vname = src; + sp.psf = src + " "; + sp.min_dis = 0; + sp.min_time = 0; + + // put the new pair in stack + stack.addFirst(sp); + + // while stack is not empty keep on doing the work + while (!stack.isEmpty()) + { + // remove a pair from stack + Pair rp = stack.removeFirst(); + + if (processed.containsKey(rp.vname)) + { + continue; + } + + // processed put + processed.put(rp.vname, true); + + //if there exists a direct edge b/w removed pair and destination vertex + if (rp.vname.equals(dst)) + { + int temp = rp.min_dis; + if(temp<min) { + ans = rp.psf; + min = temp; + } + continue; + } + + Vertex rpvtx = vtces.get(rp.vname); + ArrayList<String> nbrs = new ArrayList<>(rpvtx.nbrs.keySet()); + + for(String nbr : nbrs) + { + // process only unprocessed nbrs + if (!processed.containsKey(nbr)) { + + // make a new pair of nbr and put in queue + Pair np = new Pair(); + np.vname = nbr; + np.psf = rp.psf + nbr + " "; + np.min_dis = rp.min_dis + rpvtx.nbrs.get(nbr); + //np.min_time = rp.min_time + 120 + 40*rpvtx.nbrs.get(nbr); + stack.addFirst(np); + } + } + } + ans = ans + Integer.toString(min); + return ans; + } + + + public String Get_Minimum_Time(String src, String dst) + { + int min = Integer.MAX_VALUE; + String ans = ""; + HashMap<String, Boolean> processed = new HashMap<>(); + LinkedList<Pair> stack = new LinkedList<>(); + + // create a new pair + Pair sp = new Pair(); + sp.vname = src; + sp.psf = src + " "; + sp.min_dis = 0; + sp.min_time = 0; + + // put the new pair in queue + stack.addFirst(sp); + + // while queue is not empty keep on doing the work + while (!stack.isEmpty()) { + + // remove a pair from queue + Pair rp = stack.removeFirst(); + + if (processed.containsKey(rp.vname)) + { + continue; + } + + // processed put + processed.put(rp.vname, true); + + //if there exists a direct edge b/w removed pair and destination vertex + if (rp.vname.equals(dst)) + { + int temp = rp.min_time; + if(temp<min) { + ans = rp.psf; + min = temp; + } + continue; + } + + Vertex rpvtx = vtces.get(rp.vname); + ArrayList<String> nbrs = new ArrayList<>(rpvtx.nbrs.keySet()); + + for (String nbr : nbrs) + { + // process only unprocessed nbrs + if (!processed.containsKey(nbr)) { + + // make a new pair of nbr and put in queue + Pair np = new Pair(); + np.vname = nbr; + np.psf = rp.psf + nbr + " "; + //np.min_dis = rp.min_dis + rpvtx.nbrs.get(nbr); + np.min_time = rp.min_time + 120 + 40*rpvtx.nbrs.get(nbr); + stack.addFirst(np); + } + } + } + Double minutes = Math.ceil((double)min / 60); + ans = ans + Double.toString(minutes); + return ans; + } + + public ArrayList<String> get_Interchanges(String str) + { + ArrayList<String> arr = new ArrayList<>(); + String res[] = str.split(" "); + arr.add(res[0]); + int count = 0; + for(int i=1;i<res.length-1;i++) + { + int index = res[i].indexOf('~'); + String s = res[i].substring(index+1); + + if(s.length()==2) + { + String prev = res[i-1].substring(res[i-1].indexOf('~')+1); + String next = res[i+1].substring(res[i+1].indexOf('~')+1); + + if(prev.equals(next)) + { + arr.add(res[i]); + } + else + { + arr.add(res[i]+" ==> "+res[i+1]); + i++; + count++; + } + } + else + { + arr.add(res[i]); + } + } + arr.add(Integer.toString(count)); + arr.add(res[res.length-1]); + return arr; + } + + public static void Create_Metro_Map(Graph_M g) + { + g.addVertex("Noida Sector 62~B"); + g.addVertex("Botanical Garden~B"); + g.addVertex("Yamuna Bank~B"); + g.addVertex("Rajiv Chowk~BY"); + g.addVertex("Vaishali~B"); + g.addVertex("Moti Nagar~B"); + g.addVertex("Janak Puri West~BO"); + g.addVertex("Dwarka Sector 21~B"); + g.addVertex("Huda City Center~Y"); + g.addVertex("Saket~Y"); + g.addVertex("Vishwavidyalaya~Y"); + g.addVertex("Chandni Chowk~Y"); + g.addVertex("New Delhi~YO"); + g.addVertex("AIIMS~Y"); + g.addVertex("Shivaji Stadium~O"); + g.addVertex("DDS Campus~O"); + g.addVertex("IGI Airport~O"); + g.addVertex("Rajouri Garden~BP"); + g.addVertex("Netaji Subhash Place~PR"); + g.addVertex("Punjabi Bagh West~P"); + + g.addEdge("Noida Sector 62~B", "Botanical Garden~B", 8); + g.addEdge("Botanical Garden~B", "Yamuna Bank~B", 10); + g.addEdge("Yamuna Bank~B", "Vaishali~B", 8); + g.addEdge("Yamuna Bank~B", "Rajiv Chowk~BY", 6); + g.addEdge("Rajiv Chowk~BY", "Moti Nagar~B", 9); + g.addEdge("Moti Nagar~B", "Janak Puri West~BO", 7); + g.addEdge("Janak Puri West~BO", "Dwarka Sector 21~B", 6); + g.addEdge("Huda City Center~Y", "Saket~Y", 15); + g.addEdge("Saket~Y", "AIIMS~Y", 6); + g.addEdge("AIIMS~Y", "Rajiv Chowk~BY", 7); + g.addEdge("Rajiv Chowk~BY", "New Delhi~YO", 1); + g.addEdge("New Delhi~YO", "Chandni Chowk~Y", 2); + g.addEdge("Chandni Chowk~Y", "Vishwavidyalaya~Y", 5); + g.addEdge("New Delhi~YO", "Shivaji Stadium~O", 2); + g.addEdge("Shivaji Stadium~O", "DDS Campus~O", 7); + g.addEdge("DDS Campus~O", "IGI Airport~O", 8); + g.addEdge("Moti Nagar~B", "Rajouri Garden~BP", 2); + g.addEdge("Punjabi Bagh West~P", "Rajouri Garden~BP", 2); + g.addEdge("Punjabi Bagh West~P", "Netaji Subhash Place~PR", 3); + } + + public static String[] printCodelist() + { + System.out.println("List of station along with their codes:\n"); + ArrayList<String> keys = new ArrayList<>(vtces.keySet()); + int i=1,j=0,m=1; + StringTokenizer stname; + String temp=""; + String codes[] = new String[keys.size()]; + char c; + for(String key : keys) + { + stname = new StringTokenizer(key); + codes[i-1] = ""; + j=0; + while (stname.hasMoreTokens()) + { + temp = stname.nextToken(); + c = temp.charAt(0); + while (c>47 && c<58) + { + codes[i-1]+= c; + j++; + c = temp.charAt(j); + } + if ((c<48 || c>57) && c<123) + codes[i-1]+= c; + } + if (codes[i-1].length() < 2) + codes[i-1]+= Character.toUpperCase(temp.charAt(1)); + + System.out.print(i + ". " + key + "\t"); + if (key.length()<(22-m)) + System.out.print("\t"); + if (key.length()<(14-m)) + System.out.print("\t"); + if (key.length()<(6-m)) + System.out.print("\t"); + System.out.println(codes[i-1]); + i++; + if (i == (int)Math.pow(10,m)) + m++; + } + return codes; + } + + public static void main(String[] args) throws IOException + { + Graph_M g = new Graph_M(); + Create_Metro_Map(g); + + System.out.println("\n\t\t\t****WELCOME TO THE METRO APP*****"); + // System.out.println("\t\t\t\t~~LIST OF ACTIONS~~\n\n"); + // System.out.println("1. LIST ALL THE STATIONS IN THE MAP"); + // System.out.println("2. SHOW THE METRO MAP"); + // System.out.println("3. GET SHORTEST DISTANCE FROM A 'SOURCE' STATION TO 'DESTINATION' STATION"); + // System.out.println("4. GET SHORTEST TIME TO REACH FROM A 'SOURCE' STATION TO 'DESTINATION' STATION"); + // System.out.println("5. GET SHORTEST PATH (DISTANCE WISE) TO REACH FROM A 'SOURCE' STATION TO 'DESTINATION' STATION"); + // System.out.println("6. GET SHORTEST PATH (TIME WISE) TO REACH FROM A 'SOURCE' STATION TO 'DESTINATION' STATION"); + // System.out.print("\nENTER YOUR CHOICE FROM THE ABOVE LIST : "); + BufferedReader inp = new BufferedReader(new InputStreamReader(System.in)); + // int choice = Integer.parseInt(inp.readLine()); + //STARTING SWITCH CASE + while(true) + { + System.out.println("\t\t\t\t~~LIST OF ACTIONS~~\n\n"); + System.out.println("1. LIST ALL THE STATIONS IN THE MAP"); + System.out.println("2. SHOW THE METRO MAP"); + System.out.println("3. GET SHORTEST DISTANCE FROM A 'SOURCE' STATION TO 'DESTINATION' STATION"); + System.out.println("4. GET SHORTEST TIME TO REACH FROM A 'SOURCE' STATION TO 'DESTINATION' STATION"); + System.out.println("5. GET SHORTEST PATH (DISTANCE WISE) TO REACH FROM A 'SOURCE' STATION TO 'DESTINATION' STATION"); + System.out.println("6. GET SHORTEST PATH (TIME WISE) TO REACH FROM A 'SOURCE' STATION TO 'DESTINATION' STATION"); + System.out.println("7. EXIT THE MENU"); + System.out.print("\nENTER YOUR CHOICE FROM THE ABOVE LIST (1 to 7) : "); + int choice = -1; + try { + choice = Integer.parseInt(inp.readLine()); + } catch(Exception e) { + // default will handle + } + System.out.print("\n***********************************************************\n"); + if(choice == 7) + { + System.exit(0); + } + switch(choice) + { + case 1: + g.display_Stations(); + break; + + case 2: + g.display_Map(); + break; + + case 3: + ArrayList<String> keys = new ArrayList<>(vtces.keySet()); + String codes[] = printCodelist(); + System.out.println("\n1. TO ENTER SERIAL NO. OF STATIONS\n2. TO ENTER CODE OF STATIONS\n3. TO ENTER NAME OF STATIONS\n"); + System.out.println("ENTER YOUR CHOICE:"); + int ch = Integer.parseInt(inp.readLine()); + int j; + + String st1 = "", st2 = ""; + System.out.println("ENTER THE SOURCE AND DESTINATION STATIONS"); + if (ch == 1) + { + st1 = keys.get(Integer.parseInt(inp.readLine())-1); + st2 = keys.get(Integer.parseInt(inp.readLine())-1); + } + else if (ch == 2) + { + String a,b; + a = (inp.readLine()).toUpperCase(); + for (j=0;j<keys.size();j++) + if (a.equals(codes[j])) + break; + st1 = keys.get(j); + b = (inp.readLine()).toUpperCase(); + for (j=0;j<keys.size();j++) + if (b.equals(codes[j])) + break; + st2 = keys.get(j); + } + else if (ch == 3) + { + st1 = inp.readLine(); + st2 = inp.readLine(); + } + else + { + System.out.println("Invalid choice"); + System.exit(0); + } + + HashMap<String, Boolean> processed = new HashMap<>(); + if(!g.containsVertex(st1) || !g.containsVertex(st2) || !g.hasPath(st1, st2, processed)) + System.out.println("THE INPUTS ARE INVALID"); + else + System.out.println("SHORTEST DISTANCE FROM "+st1+" TO "+st2+" IS "+g.dijkstra(st1, st2, false)+"KM\n"); + break; + + case 4: + System.out.print("ENTER THE SOURCE STATION: "); + String sat1 = inp.readLine(); + System.out.print("ENTER THE DESTINATION STATION: "); + String sat2 = inp.readLine(); + + HashMap<String, Boolean> processed1= new HashMap<>(); + System.out.println("SHORTEST TIME FROM ("+sat1+") TO ("+sat2+") IS "+g.dijkstra(sat1, sat2, true)/60+" MINUTES\n\n"); + break; + + case 5: + System.out.println("ENTER THE SOURCE AND DESTINATION STATIONS"); + String s1 = inp.readLine(); + String s2 = inp.readLine(); + + HashMap<String, Boolean> processed2 = new HashMap<>(); + if(!g.containsVertex(s1) || !g.containsVertex(s2) || !g.hasPath(s1, s2, processed2)) + System.out.println("THE INPUTS ARE INVALID"); + else + { + ArrayList<String> str = g.get_Interchanges(g.Get_Minimum_Distance(s1, s2)); + int len = str.size(); + System.out.println("SOURCE STATION : " + s1); + System.out.println("SOURCE STATION : " + s2); + System.out.println("DISTANCE : " + str.get(len-1)); + System.out.println("NUMBER OF INTERCHANGES : " + str.get(len-2)); + //System.out.println(str); + System.out.println("~~~~~~~~~~~~~"); + System.out.println("START ==> " + str.get(0)); + for(int i=1; i<len-3; i++) + { + System.out.println(str.get(i)); + } + System.out.print(str.get(len-3) + " ==> END"); + System.out.println("\n~~~~~~~~~~~~~"); + } + break; + + case 6: + System.out.print("ENTER THE SOURCE STATION: "); + String ss1 = inp.readLine(); + System.out.print("ENTER THE DESTINATION STATION: "); + String ss2 = inp.readLine(); + + HashMap<String, Boolean> processed3 = new HashMap<>(); + if(!g.containsVertex(ss1) || !g.containsVertex(ss2) || !g.hasPath(ss1, ss2, processed3)) + System.out.println("THE INPUTS ARE INVALID"); + else + { + ArrayList<String> str = g.get_Interchanges(g.Get_Minimum_Time(ss1, ss2)); + int len = str.size(); + System.out.println("SOURCE STATION : " + ss1); + System.out.println("DESTINATION STATION : " + ss2); + System.out.println("TIME : " + str.get(len-1)+" MINUTES"); + System.out.println("NUMBER OF INTERCHANGES : " + str.get(len-2)); + //System.out.println(str); + System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + System.out.print("START ==> " + str.get(0) + " ==> "); + for(int i=1; i<len-3; i++) + { + System.out.println(str.get(i)); + } + System.out.print(str.get(len-3) + " ==> END"); + System.out.println("\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); + } + break; + default: //If switch expression does not match with any case, + //default statements are executed by the program. + //No break is needed in the default case + System.out.println("Please enter a valid option! "); + System.out.println("The options you can choose are from 1 to 6. "); + + } + } + + } + } diff --git a/the_metro_app/Heap.class b/the_metro_app/Heap.class new file mode 100644 index 00000000..72a96a32 Binary files /dev/null and b/the_metro_app/Heap.class differ diff --git a/the_metro_app/Heap.java b/the_metro_app/Heap.java new file mode 100644 index 00000000..075f5463 --- /dev/null +++ b/the_metro_app/Heap.java @@ -0,0 +1,100 @@ +import java.util.ArrayList; +import java.util.HashMap; + +public class Heap<T extends Comparable<T>> +{ + ArrayList<T> data = new ArrayList<>(); + HashMap<T, Integer> map = new HashMap<>(); + + public void add(T item) + { + data.add(item); + map.put(item, this.data.size() - 1); + upheapify(data.size() - 1); + } + + private void upheapify(int ci) + { + int pi = (ci - 1) / 2; + if (isLarger(data.get(ci), data.get(pi)) > 0) + { + swap(pi, ci); + upheapify(pi); + } + } + + private void swap(int i, int j) + { + T ith = data.get(i); + T jth = data.get(j); + + data.set(i, jth); + data.set(j, ith); + map.put(ith, j); + map.put(jth, i); + } + + public void display() + { + System.out.println(data); + } + + public int size() + { + return this.data.size(); + } + + public boolean isEmpty() + { + return this.size() == 0; + } + + public T remove() + { + swap(0, this.data.size() - 1); + T rv = this.data.remove(this.data.size() - 1); + downheapify(0); + + map.remove(rv); + return rv; + } + + private void downheapify(int pi) + { + int lci = 2 * pi + 1; + int rci = 2 * pi + 2; + int mini = pi; + + if (lci < this.data.size() && isLarger(data.get(lci), data.get(mini)) > 0) + { + mini = lci; + } + + if (rci < this.data.size() && isLarger(data.get(rci), data.get(mini)) > 0) + { + mini = rci; + } + + if (mini != pi) + { + swap(mini, pi); + downheapify(mini); + } + } + + public T get() + { + return this.data.get(0); + } + + public int isLarger(T t, T o) + { + return t.compareTo(o); + } + + public void updatePriority(T pair) + { + int index = map.get(pair); + upheapify(index); + } +} diff --git a/the_metro_app/README.md b/the_metro_app/README.md new file mode 100644 index 00000000..2eac60cc --- /dev/null +++ b/the_metro_app/README.md @@ -0,0 +1,24 @@ +# DELHI METRO RAIL APP + +Please don't get confused, this is NOT an ANDROID Application! + +This is a simple Java program that will take information (name) of the source station and the destination station, of Delhi Metro, from the user and display the fare and shortest metro route to reach the destination. It will also be having a metro map for commuter’s better navigation. + +The idea is implemented using Graph and Heap data structures. +The graph has nodes and edges. Nodes represent a metro station that will be containing certain information regarding that station like its name, its metro corridor, and the lines which it connects. Edges (the connection between two nodes) represent the distance between the two stations and the cost of each edge will be equal to the distance between the two of its connecting stations(nodes). + +By using different algorithms like Dijkstra, breadth-first search, depth-first search, etc, the shortest path between the source station and the destination station is determined, and accordingly, the fare is being calculated on the basis of the total distance between the two stations. Finally, the metro route between the two stations and the total fare is displayed. + +Main.java cointains all the major code and Heap.java contains heap implementation. + + +## REQUIREMENTS + +> The project can run on any online or offline Integrated Development Environment (IDE) like Eclipse, Netbeans, ideone.com, etc. +> You should have at least elementary knowledge of Java Programming language to work on the project. +> Knowledge of data structures like Graph and Heap and Algorithms like Dijkstra, BFS, DFS, etc is appreciated, however, it is not essential. +> And lastly, some understanding of the Collection framework makes it a cakewalk journey. (If you don't know about the Collection framework it is not a problem, you can proceed without it and while working if you feel the need to know you can refer to https://www.geeksforgeeks.org/collections-in-java-2/ ). + + +## That was all... You are all set to work on the project!!!! + diff --git a/the_metro_app/Requirements.md b/the_metro_app/Requirements.md new file mode 100644 index 00000000..415a44d0 --- /dev/null +++ b/the_metro_app/Requirements.md @@ -0,0 +1,39 @@ +# Requirements + +## Java Collection framework + +The Collection in Java is a framework that provides an architecture to store and manipulate the group of objects. + + + +## Collection framework used in this project + +### In Graph_M.java + +* ArrayList +* LinkedList +* Stack +* HashMap + +### In Heap.java + +* HashMap +* ArrayList + + + +## Data Structures +Data structure is a way of organizing data in the computer so that it can be used effectively. +The data structures used in this project are: +* Array +* HashMap +* Linked List +* Heap +* Stack +* Graph + +* The array data structure is implemented using ArrayList class which is a resizable array.It stores data in contiguous memory locations. +* Hashmap data structure is used to store key-value pairs. +* The stack data structure required by the algorithm is implemented using linked list.It follows the principle Last In First Out(LIFO) +* Heap is implemented with the help of ArrayList and HashMap.It is a tree based data structure where all elements of the tree are in a particular order. +* Graph is a complex data structure containing vertices and edges connecting these vertices.This is implemented in the project with the help of ArrayList and HashMap. diff --git a/tik tak toe.java b/tik tak toe.java new file mode 100644 index 00000000..7c4686a5 --- /dev/null +++ b/tik tak toe.java @@ -0,0 +1,173 @@ +// A simple program to demonstrate +// Tic-Tac-Toe Game. +import java.util.*; + +public class GFG { + + static String[] board; + static String turn; + + + // CheckWinner method will + // decide the combination + // of three box given below. + static String checkWinner() + { + for (int a = 0; a < 8; a++) { + String line = null; + + switch (a) { + case 0: + line = board[0] + board[1] + board[2]; + break; + case 1: + line = board[3] + board[4] + board[5]; + break; + case 2: + line = board[6] + board[7] + board[8]; + break; + case 3: + line = board[0] + board[3] + board[6]; + break; + case 4: + line = board[1] + board[4] + board[7]; + break; + case 5: + line = board[2] + board[5] + board[8]; + break; + case 6: + line = board[0] + board[4] + board[8]; + break; + case 7: + line = board[2] + board[4] + board[6]; + break; + } + //For X winner + if (line.equals("XXX")) { + return "X"; + } + + // For O winner + else if (line.equals("OOO")) { + return "O"; + } + } + + for (int a = 0; a < 9; a++) { + if (Arrays.asList(board).contains( + String.valueOf(a + 1))) { + break; + } + else if (a == 8) { + return "draw"; + } + } + + // To enter the X Or O at the exact place on board. + System.out.println( + turn + "'s turn; enter a slot number to place " + + turn + " in:"); + return null; + } + + // To print out the board. + /* |---|---|---| + | 1 | 2 | 3 | + |-----------| + | 4 | 5 | 6 | + |-----------| + | 7 | 8 | 9 | + |---|---|---|*/ + + static void printBoard() + { + System.out.println("|---|---|---|"); + System.out.println("| " + board[0] + " | " + + board[1] + " | " + board[2] + + " |"); + System.out.println("|-----------|"); + System.out.println("| " + board[3] + " | " + + board[4] + " | " + board[5] + + " |"); + System.out.println("|-----------|"); + System.out.println("| " + board[6] + " | " + + board[7] + " | " + board[8] + + " |"); + System.out.println("|---|---|---|"); + } + + public static void main(String[] args) + { + Scanner in = new Scanner(System.in); + board = new String[9]; + turn = "X"; + String winner = null; + + for (int a = 0; a < 9; a++) { + board[a] = String.valueOf(a + 1); + } + + System.out.println("Welcome to 3x3 Tic Tac Toe."); + printBoard(); + + System.out.println( + "X will play first. Enter a slot number to place X in:"); + + while (winner == null) { + int numInput; + + // Exception handling. + // numInput will take input from user like from 1 to 9. + // If it is not in range from 1 to 9. + // then it will show you an error "Invalid input." + try { + numInput = in.nextInt(); + if (!(numInput > 0 && numInput <= 9)) { + System.out.println( + "Invalid input; re-enter slot number:"); + continue; + } + } + catch (InputMismatchException e) { + System.out.println( + "Invalid input; re-enter slot number:"); + continue; + } + + // This game has two player x and O. + // Here is the logic to decide the turn. + if (board[numInput - 1].equals( + String.valueOf(numInput))) { + board[numInput - 1] = turn; + + if (turn.equals("X")) { + turn = "O"; + } + else { + turn = "X"; + } + + printBoard(); + winner = checkWinner(); + } + else { + System.out.println( + "Slot already taken; re-enter slot number:"); + } + } + + // If no one win or lose from both player x and O. + // then here is the logic to print "draw". + if (winner.equalsIgnoreCase("draw")) { + System.out.println( + "It's a draw! Thanks for playing."); + } + + // For winner -to display Congratulations! message. + else { + System.out.println( + "Congratulations! " + winner + + "'s have won! Thanks for playing."); + } + } +} diff --git a/todoapp.java b/todoapp.java new file mode 100644 index 00000000..5014d325 --- /dev/null +++ b/todoapp.java @@ -0,0 +1,85 @@ +import java.util.ArrayList; +import java.util.Scanner; + +class Task { + private String description; + + public Task(String description) { + this.description = description; + } + + public String getDescription() { + return description; + } +} + +class TodoList { + private ArrayList<Task> tasks = new ArrayList<>(); + + public void addTask(String description) { + Task task = new Task(description); + tasks.add(task); + System.out.println("Task added successfully!"); + } + + public void listTasks() { + if (tasks.isEmpty()) { + System.out.println("No tasks found."); + } else { + System.out.println("Task List:"); + for (int i = 0; i < tasks.size(); i++) { + System.out.println((i + 1) + ". " + tasks.get(i).getDescription()); + } + } + } + + public void removeTask(int index) { + if (index >= 0 && index < tasks.size()) { + tasks.remove(index); + System.out.println("Task removed successfully!"); + } else { + System.out.println("Invalid task index."); + } + } +} + +public class TodoApp { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + TodoList todoList = new TodoList(); + + while (true) { + System.out.println("\nTo-Do List Application"); + System.out.println("1. Add Task"); + System.out.println("2. List Tasks"); + System.out.println("3. Remove Task"); + System.out.println("4. Exit"); + System.out.print("Enter your choice: "); + + int choice = scanner.nextInt(); + scanner.nextLine(); // Consume the newline character + + switch (choice) { + case 1: + System.out.print("Enter task description: "); + String description = scanner.nextLine(); + todoList.addTask(description); + break; + case 2: + todoList.listTasks(); + break; + case 3: + System.out.print("Enter the task index to remove: "); + int index = scanner.nextInt(); + todoList.removeTask(index - 1); + break; + case 4: + System.out.println("Exiting the To-Do List Application. Goodbye!"); + scanner.close(); + System.exit(0); + default: + System.out.println("Invalid choice. Please try again."); + } + } + } +} diff --git a/tower_of_hanoi.java b/tower_of_hanoi.java new file mode 100644 index 00000000..b0beeab1 --- /dev/null +++ b/tower_of_hanoi.java @@ -0,0 +1,26 @@ +//plss accept my pr, this cpde is for solving tower of hanoi problem + +class Main { + + public static void main(String[] args) { + hanoi(3, 'A', 'B', 'C'); + } + + private static void hanoi(int n, char rodFrom, char rodMiddle, char rodTo){ + + if(n==1){ + System.out.println("Disk 1 moved from "+rodFrom+" to "+rodTo); + return; + } + + //Move top n-1 disks from A to B using C as middle + hanoi(n-1,rodFrom,rodTo,rodMiddle); + + //Move last disk from A to C + System.out.println("Disk "+n+" moved from "+rodFrom+" to "+rodTo); + + //Move n-1 disks from B to C using A as middle + hanoi(n-1,rodMiddle,rodFrom,rodTo); + + } +} \ No newline at end of file diff --git a/tree.cpp b/tree.cpp new file mode 100644 index 00000000..c4161666 --- /dev/null +++ b/tree.cpp @@ -0,0 +1,74 @@ + +#include <bits/stdc++.h> + +void markParents(BinaryTreeNode<int> *root, unordered_map<BinaryTreeNode<int> *, BinaryTreeNode<int> *> &parent_track, BinaryTreeNode<int> *target) +{ + queue<BinaryTreeNode<int> *> queue; + queue.push(root); + while (!queue.empty()) + { + BinaryTreeNode<int> *current = queue.front(); + queue.pop(); + if (current->left) + { + parent_track[current->left] = current; + queue.push(current->left); + } + if (current->right) + { + parent_track[current->right] = current; + queue.push(current->right); + } + } +} + +vector<BinaryTreeNode<int> *> printNodesAtDistanceK(BinaryTreeNode<int> *root, BinaryTreeNode<int> *target, int k) +{ + unordered_map<BinaryTreeNode<int> *, BinaryTreeNode<int> *> parent_track; + + markParents(root, parent_track, target); + + unordered_map<BinaryTreeNode<int> *, bool> visited; + + queue<BinaryTreeNode<int> *> queue; + queue.push(target); + visited[target] = true; + int curr_level = 0; + + while (!queue.empty()) + { + int size = queue.size(); + + if (curr_level++ == k) + break; + + for (int i = 0; i < size; i++) + { + BinaryTreeNode<int> *current = queue.front(); + queue.pop(); + if (current->left && !visited[current->left]) + { + queue.push(current->left); + visited[current->left] = true; + } + if (current->right && !visited[current->right]) + { + queue.push(current->right); + visited[current->right] = true; + } + if (parent_track[current] && !visited[parent_track[current]]) + { + queue.push(parent_track[current]); + visited[parent_track[current]] = true; + } + } + } + vector<BinaryTreeNode<int> *> result; + while (!queue.empty()) + { + BinaryTreeNode<int> *current = queue.front(); + queue.pop(); + result.push_back(current); + } + return result; +} diff --git a/triangle.java b/triangle.java new file mode 100644 index 00000000..fe1e8669 --- /dev/null +++ b/triangle.java @@ -0,0 +1,35 @@ +// Java Program to print pattern +// Zero-One triangle +import java.util.*; + +public class GeeksForGeeks { + // Function to demonstrate pattern + public static void printPattern(int n) + { + int i, j; + //outer loop to handle number of rows + for (i = 1; i <= n; i++) { + //inner loop to handle number of columns + for (j = 1; j <= i; j++) { + // if the sum of (i+j) is even then print 1 + if ((i + j) % 2 == 0) { + System.out.print(1 + " "); + } + // otherwise print 0 + else { + System.out.print(0 + " "); + } + } + + //printing new line for each row + System.out.println(); + } + } + + // Driver Function + public static void main(String args[]) + { + int n = 6; + printPattern(n); + } +} diff --git a/url.java b/url.java new file mode 100644 index 00000000..6ee0b5e9 --- /dev/null +++ b/url.java @@ -0,0 +1,52 @@ +import java.awt.*; +import java.awt.event.*; +import java.io.InputStream; +import java.net.*; +public class SourceGetter extends Frame implements ActionListener{ + TextField tf; + TextArea ta; + Button b; + Label l; + SourceGetter(){ + super("Source Getter Tool - Javatpoint"); + l=new Label("Enter URL:"); + l.setBounds(50,50,50,20); + + tf=new TextField(); + tf.setBounds(120,50,250,20); + + b=new Button("Get Source Code"); + b.setBounds(120, 100,120,30); + b.addActionListener(this); + + ta=new TextArea(); + ta.setBounds(120,150,250,150); + + add(l);add(tf);add(b);add(ta); + setSize(400,400); + setLayout(null); + setVisible(true); + } + public void actionPerformed(ActionEvent e){ + String s=tf.getText(); + if(s==null){} + else{ + try{ + URL u=new URL(s); + URLConnection uc=u.openConnection(); + + InputStream is=uc.getInputStream(); + int i; + StringBuilder sb=new StringBuilder(); + while((i=is.read())!=-1){ + sb.append((char)i); + } + String source=sb.toString(); + ta.setText(source); + }catch(Exception ex){System.out.println(e);} + } + } + public static void main(String[] args) { + new SourceGetter(); + } +} diff --git a/urlsourcegenerator.java b/urlsourcegenerator.java new file mode 100644 index 00000000..6ee0b5e9 --- /dev/null +++ b/urlsourcegenerator.java @@ -0,0 +1,52 @@ +import java.awt.*; +import java.awt.event.*; +import java.io.InputStream; +import java.net.*; +public class SourceGetter extends Frame implements ActionListener{ + TextField tf; + TextArea ta; + Button b; + Label l; + SourceGetter(){ + super("Source Getter Tool - Javatpoint"); + l=new Label("Enter URL:"); + l.setBounds(50,50,50,20); + + tf=new TextField(); + tf.setBounds(120,50,250,20); + + b=new Button("Get Source Code"); + b.setBounds(120, 100,120,30); + b.addActionListener(this); + + ta=new TextArea(); + ta.setBounds(120,150,250,150); + + add(l);add(tf);add(b);add(ta); + setSize(400,400); + setLayout(null); + setVisible(true); + } + public void actionPerformed(ActionEvent e){ + String s=tf.getText(); + if(s==null){} + else{ + try{ + URL u=new URL(s); + URLConnection uc=u.openConnection(); + + InputStream is=uc.getInputStream(); + int i; + StringBuilder sb=new StringBuilder(); + while((i=is.read())!=-1){ + sb.append((char)i); + } + String source=sb.toString(); + ta.setText(source); + }catch(Exception ex){System.out.println(e);} + } + } + public static void main(String[] args) { + new SourceGetter(); + } +} diff --git a/velocity-calculator/VelocityCalculator.java b/velocity-calculator/VelocityCalculator.java new file mode 100644 index 00000000..377e9a05 --- /dev/null +++ b/velocity-calculator/VelocityCalculator.java @@ -0,0 +1,24 @@ +import java.util.Scanner; + +public class VelocityCalculator { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + + System.out.println("Velocity Calculator"); + System.out.print("Enter initial position (meters): "); + double initialPosition = scanner.nextDouble(); + + System.out.print("Enter final position (meters): "); + double finalPosition = scanner.nextDouble(); + + System.out.print("Enter time taken (seconds): "); + double time = scanner.nextDouble(); + + // Calculate velocity using the formula: velocity = (final position - initial position) / time + double velocity = (finalPosition - initialPosition) / time; + + System.out.println("The velocity is " + velocity + " meters per second."); + + scanner.close(); + } +} diff --git a/water_gun_game/readme.md b/water_gun_game/readme.md new file mode 100644 index 00000000..afdb166b --- /dev/null +++ b/water_gun_game/readme.md @@ -0,0 +1,48 @@ +# Water Gun Game in Java + +A simple text-based two-player water gun game implemented in Java. + +## Game Description + +In this game, two players take turns choosing actions: filling their water guns or shooting each other. The game continues until one of the players runs out of water. + +## Features + +- Two-player game with basic actions: Fill water gun and Shoot. +- Random water shot amounts between 0 and 20. + +## Getting Started + +1. Clone or download the project to your local machine. + +2. Compile and run the game using a Java development environment or command line. + +3. Follow the on-screen instructions to play the game. + +4. Players can choose to "Fill water gun" (action 1) to restore their water or "Shoot" (action 2) to shoot the other player with a random water amount. + +## Sample Gameplay + +```plaintext +Welcome to the Water Gun Game! +Enter Player 1's name: Alice +Enter Player 2's name: Bob + +Alice's water: 100 +Bob's water: 100 +Alice, choose an action (1: Fill water gun, 2: Shoot): 2 +Alice shot Bob with 9 water! + +Alice's water: 100 +Bob's water: 91 +Bob, choose an action (1: Fill water gun, 2: Shoot): 1 +Bob filled their water gun. + +Alice's water: 100 +Bob's water: 100 +Alice, choose an action (1: Fill water gun, 2: Shoot): 2 +Alice shot Bob with 15 water! + +... + +Bob is out of water. Alice wins! diff --git a/water_gun_game/water.java b/water_gun_game/water.java new file mode 100644 index 00000000..52ed7f74 --- /dev/null +++ b/water_gun_game/water.java @@ -0,0 +1,63 @@ +import java.util.Scanner; +import java.util.Random; + +public class WaterGunGame { + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + Random random = new Random(); + + System.out.println("Welcome to the Water Gun Game!"); + System.out.print("Enter Player 1's name: "); + String player1Name = scanner.nextLine(); + System.out.print("Enter Player 2's name: "); + String player2Name = scanner.nextLine(); + + int player1Water = 100; + int player2Water = 100; + boolean isPlayer1Turn = true; + + while (player1Water > 0 && player2Water > 0) { + System.out.println("\n" + player1Name + "'s water: " + player1Water); + System.out.println(player2Name + "'s water: " + player2Water); + + if (isPlayer1Turn) { + System.out.print(player1Name + ", choose an action (1: Fill water gun, 2: Shoot): "); + } else { + System.out.print(player2Name + ", choose an action (1: Fill water gun, 2: Shoot): "); + } + + int action = scanner.nextInt(); + + if (action == 1) { + if (isPlayer1Turn) { + player1Water = 100; + System.out.println(player1Name + " filled their water gun."); + } else { + player2Water = 100; + System.out.println(player2Name + " filled their water gun."); + } + } else if (action == 2) { + int shotAmount = random.nextInt(21); // Randomly shoot between 0 and 20 + if (isPlayer1Turn) { + player2Water -= shotAmount; + System.out.println(player1Name + " shot " + player2Name + " with " + shotAmount + " water!"); + } else { + player1Water -= shotAmount; + System.out.println(player2Name + " shot " + player1Name + " with " + shotAmount + " water!"); + } + } else { + System.out.println("Invalid action. Choose 1 to fill or 2 to shoot."); + } + + isPlayer1Turn = !isPlayer1Turn; + } + + if (player1Water <= 0) { + System.out.println(player1Name + " is out of water. " + player2Name + " wins!"); + } else { + System.out.println(player2Name + " is out of water. " + player1Name + " wins!"); + } + + scanner.close(); + } +} diff --git a/weather.txt b/weather.txt new file mode 100644 index 00000000..8f99dcac --- /dev/null +++ b/weather.txt @@ -0,0 +1,240 @@ +1 1 76.4 0.92 +1 2 77.7 0.93 +1 3 77.7 0.93 +1 4 77.7 0.93 +1 5 77.7 0.93 +1 6 77.7 0.93 +1 7 77.7 0.93 +1 8 77.7 0.93 +1 9 77.7 0.93 +1 10 77.7 0.93 +1 11 77.7 0.93 +1 12 77.7 0.93 +1 13 79.7 0.93 +1 14 77.7 0.93 +1 15 77.7 0.93 +1 16 77.7 0.93 +1 17 77.7 0.93 +1 18 77.7 0.93 +1 19 77.7 0.93 +1 20 77.7 0.93 +1 21 77.7 0.93 +1 22 78.7 0.93 +1 23 77.7 0.93 +1 24 77.7 0.93 +2 1 76.4 0.92 +2 2 77.7 0.93 +2 3 77.7 0.93 +2 4 74.7 0.93 +2 5 77.7 0.93 +2 6 77.7 0.93 +2 7 72.7 0.93 +2 8 77.7 0.93 +2 9 77.7 0.93 +2 10 77.7 0.93 +2 11 77.7 0.93 +2 12 77.7 0.93 +2 13 77.7 0.93 +2 14 77.7 0.93 +2 15 77.7 0.93 +2 16 77.7 0.93 +2 17 77.7 0.93 +2 18 77.7 0.93 +2 19 77.7 0.93 +2 20 77.7 0.93 +2 21 77.7 0.93 +2 22 77.7 0.93 +2 23 77.7 0.93 +2 24 77.7 0.93 +3 1 76.4 0.92 +3 2 77.7 0.93 +3 3 77.7 0.93 +3 4 77.7 0.93 +3 5 77.7 0.93 +3 6 77.7 0.93 +3 7 77.7 0.93 +3 8 77.7 0.93 +3 9 77.7 0.93 +3 10 77.7 0.93 +3 11 77.7 0.93 +3 12 77.7 0.93 +3 13 77.7 0.93 +3 14 77.7 0.93 +3 15 77.7 0.93 +3 16 77.7 0.93 +3 17 77.7 0.93 +3 18 77.7 0.93 +3 19 77.7 0.93 +3 20 77.7 0.93 +3 21 77.7 0.93 +3 22 77.7 0.93 +3 23 77.7 0.93 +3 24 77.7 0.93 +4 1 76.4 0.92 +4 2 77.7 0.93 +4 3 77.7 0.93 +4 4 77.7 0.93 +4 5 77.7 0.93 +4 6 77.7 0.93 +4 7 77.7 0.93 +4 8 77.7 0.93 +4 9 77.7 0.93 +4 10 77.7 0.93 +4 11 77.7 0.93 +4 12 77.7 0.93 +4 13 77.7 0.93 +4 14 77.7 0.93 +4 15 77.7 0.93 +4 16 77.7 0.93 +4 17 77.7 0.93 +4 18 77.7 0.93 +4 19 77.7 0.93 +4 20 77.7 0.93 +4 21 77.7 0.93 +4 22 77.7 0.93 +4 23 77.7 0.93 +4 24 77.7 0.93 +5 1 76.4 0.92 +5 2 77.7 0.93 +5 3 77.7 0.93 +5 4 77.7 0.93 +5 5 77.7 0.93 +5 6 77.7 0.93 +5 7 77.7 0.93 +5 8 77.7 0.93 +5 9 77.7 0.93 +5 10 77.7 0.93 +5 11 77.7 0.93 +5 12 77.7 0.93 +5 13 77.7 0.93 +5 14 77.7 0.93 +5 15 77.7 0.93 +5 16 77.7 0.93 +5 17 77.7 0.93 +5 18 77.7 0.93 +5 19 77.7 0.93 +5 20 77.7 0.93 +5 21 77.7 0.93 +5 22 77.7 0.93 +5 23 77.7 0.93 +5 24 77.7 0.93 +6 1 76.4 0.92 +6 2 77.7 0.93 +6 3 77.7 0.93 +6 4 77.7 0.93 +6 5 77.7 0.93 +6 6 77.7 0.93 +6 7 77.7 0.93 +6 8 77.7 0.93 +6 9 77.7 0.93 +6 10 77.7 0.93 +6 11 77.7 0.93 +6 12 77.7 0.93 +6 13 77.7 0.93 +6 14 77.7 0.93 +6 15 77.7 0.93 +6 16 77.7 0.93 +6 17 77.7 0.93 +6 18 77.7 0.93 +6 19 77.7 0.93 +6 20 77.7 0.93 +6 21 77.7 0.93 +6 22 77.7 0.93 +6 23 77.7 0.93 +6 24 77.7 0.93 +7 1 76.4 0.92 +7 2 77.7 0.93 +7 3 77.7 0.93 +7 4 77.7 0.93 +7 5 77.7 0.93 +7 6 77.7 0.93 +7 7 77.7 0.93 +7 8 77.7 0.93 +7 9 77.7 0.93 +7 10 77.7 0.93 +7 11 77.7 0.93 +7 12 77.7 0.93 +7 13 77.7 0.93 +7 14 77.7 0.93 +7 15 77.7 0.93 +7 16 77.7 0.93 +7 17 77.7 0.93 +7 18 77.7 0.93 +7 19 77.7 0.93 +7 20 77.7 0.93 +7 21 77.7 0.93 +7 22 77.7 0.93 +7 23 77.7 0.93 +7 24 77.7 0.93 +8 1 76.4 0.92 +8 2 77.7 0.93 +8 3 77.7 0.93 +8 4 77.7 0.93 +8 5 77.7 0.93 +8 6 78.7 0.93 +8 7 77.7 0.93 +8 8 77.7 0.93 +8 9 77.7 0.93 +8 10 77.7 0.93 +8 11 77.7 0.93 +8 12 77.7 0.93 +8 13 77.7 0.93 +8 14 77.7 0.93 +8 15 77.7 0.93 +8 16 77.7 0.93 +8 17 77.7 0.93 +8 18 77.7 0.93 +8 19 77.7 0.93 +8 20 77.7 0.93 +8 21 77.7 0.93 +8 22 77.7 0.93 +8 23 77.7 0.93 +8 24 77.7 0.93 +9 1 76.4 0.92 +9 2 77.7 0.93 +9 3 77.7 0.93 +9 4 77.7 0.93 +9 5 77.7 0.93 +9 6 77.7 0.93 +9 7 77.7 0.93 +9 8 77.7 0.93 +9 9 77.7 0.93 +9 10 77.7 0.93 +9 11 77.7 0.93 +9 12 77.7 0.93 +9 13 77.7 0.93 +9 14 77.7 0.93 +9 15 77.7 0.93 +9 16 77.7 0.93 +9 17 77.7 0.93 +9 18 77.7 0.93 +9 19 77.7 0.93 +9 20 77.7 0.93 +9 21 77.7 0.93 +9 22 77.7 0.93 +9 23 77.7 0.93 +9 24 77.7 0.93 +10 1 76.4 0.92 +10 2 77.7 0.93 +10 3 77.7 0.93 +10 4 77.7 0.93 +10 5 77.7 0.93 +10 6 77.7 0.93 +10 7 77.7 0.93 +10 8 77.7 0.93 +10 9 77.7 0.93 +10 10 77.7 0.93 +10 11 77.7 0.93 +10 12 77.7 0.93 +10 13 77.7 0.93 +10 14 77.7 0.93 +10 15 77.7 0.93 +10 16 77.7 0.93 +10 17 77.7 0.93 +10 18 77.7 0.93 +10 19 77.7 0.93 +10 20 77.7 0.93 +10 21 77.7 0.93 +10 22 77.7 0.93 +10 23 97.7 0.71 +10 24 98.7 0.74 \ No newline at end of file diff --git a/wordcounter.java b/wordcounter.java new file mode 100644 index 00000000..004feb8d --- /dev/null +++ b/wordcounter.java @@ -0,0 +1,76 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +class WordCharCount extends JFrame implements ActionListener { + JTextArea textArea; + JButton wordButton, charButton, bgColorButton, textColorButton; + + WordCharCount() { + super("Word Character Counter - JavaTpoint"); + + textArea = new JTextArea(); + textArea.setBounds(50, 50, 300, 200); + + wordButton = createButton("Word", 50, 300, 100, 30); + charButton = createButton("Character", 180, 300, 100, 30); + bgColorButton = createButton("Background Color", 50, 340, 150, 30); + textColorButton = createButton("Text Color", 210, 340, 120, 30); + + addComponents(); + addActionListeners(); + + setSize(400, 400); + setLayout(null); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setVisible(true); + } + + private JButton createButton(String label, int x, int y, int width, int height) { + JButton button = new JButton(label); + button.setBounds(x, y, width, height); + return button; + } + + private void addComponents() { + add(textArea); + add(wordButton); + add(charButton); + add(bgColorButton); + add(textColorButton); + } + + private void addActionListeners() { + wordButton.addActionListener(this); + charButton.addActionListener(this); + bgColorButton.addActionListener(this); + textColorButton.addActionListener(this); + } + + public void actionPerformed(ActionEvent e) { + String text = textArea.getText(); + if (e.getSource() == wordButton) { + String[] words = text.split("\\s"); + showMessage("Total words: " + words.length); + } else if (e.getSource() == charButton) { + showMessage("Total Characters with space: " + text.length()); + } else if (e.getSource() == bgColorButton) { + Color bgColor = JColorChooser.showDialog(this, "Choose Background Color", Color.WHITE); + textArea.setBackground(bgColor); + } else if (e.getSource() == textColorButton) { + Color textColor = JColorChooser.showDialog(this, "Choose Text Color", Color.BLACK); + textArea.setForeground(textColor); + } + } + + private void showMessage(String message) { + JOptionPane.showMessageDialog(this, message); + } +} + +public class CharWordCountTool { + public static void main(String[] args) { + SwingUtilities.invokeLater(WordCharCount::new); + } +} diff --git a/youtube-playlist-length-cal/PlaylistLengthCalculator.java b/youtube-playlist-length-cal/PlaylistLengthCalculator.java new file mode 100644 index 00000000..793d18bf --- /dev/null +++ b/youtube-playlist-length-cal/PlaylistLengthCalculator.java @@ -0,0 +1,25 @@ +public class PlaylistLengthCalculator { + public static void main(String[] args) { + // Define the durations of songs in seconds + int[] videoDuration = {240, 180, 210, 300, 150, 270}; // Example durations in seconds + + // Calculate the total length of the playlist + int totalLengthInSeconds = calculateTotalLength(videoDuration); + + // Convert the total length to hours, minutes, and seconds + int hours = totalLengthInSeconds / 3600; + int minutes = (totalLengthInSeconds % 3600) / 60; + int seconds = totalLengthInSeconds % 60; + + // Display the total length of the playlist + System.out.println("Total Playlist Length: " + hours + " hours, " + minutes + " minutes, " + seconds + " seconds"); + } + + public static int calculateTotalLength(int[] durations) { + int totalDuration = 0; + for (int duration : durations) { + totalDuration += duration; + } + return totalDuration; + } +}