From b4d9c797d15822bf677a9411325ea762294d2241 Mon Sep 17 00:00:00 2001 From: SinusFox <61253950+SinusFox@users.noreply.github.com> Date: Wed, 9 Oct 2024 21:36:31 +0200 Subject: [PATCH 1/5] Updating license and Fixing minor issues (#23) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial Push Inititial project state * Static demo version * static demo site - added variables a * first_implementation * Updated UI, Improved Style to be more "Reactly", added Functionality * add parsing functions * change folder * Import/Export Prototype * Adding "reactjs-popup" to package,json * Adding GLPK source * Rough implementation of solver + example * Show solution in output * example 2 + popup lib * removing import button This feature won't be needed in this state of the project and might come back later. Right now it serves no functional purpose. * Removing "Popout" button This feature won't be needed in this state of the project and might come back later. Right now it serves no functional purpose. * Updating Logs Now the site displays all logs created with customLog(STRING). Logs can be cleared with customLogClear(); * Adding walltime Can be called using: Start: function walltimeStart() { returns Date.now(); Stop: function walltimeStopAndPrint(startpoint: number) { Add startpoint as argument. It prints the elapsed time using customLog() * Adding duals ouput * Adding glpk.js package required dependency * adding LP format export and fixing a few errors * fixing further errors * adding automatic build * Moving files to correct folders * Update nextjs.yml * Updating README and .gitignore README: - added installation instructions - added troubleshooting gitignore: - skipping Writerside and .idea folders * Update LICENCE.txt We are required to use the same license. See https://github.com/hgourvest/node-glpk/blob/master/LICENSE * Updating icon * Adding RegEx input checks and updating text box explanations * Update README.md Updating license info Signed-off-by: SinusFox <61253950+SinusFox@users.noreply.github.com> * Deleting license to recreate proper license * Update layout.tsx fixing typo Signed-off-by: SinusFox <61253950+SinusFox@users.noreply.github.com> * Fixing word issue English has some false friends... like the German "Enter" is actually return in English. * Updatint License * Fixing design issue and updating license link * Fixing typo in log --------- Signed-off-by: SinusFox <61253950+SinusFox@users.noreply.github.com> Co-authored-by: moebiusl Co-authored-by: Marcel Pöppe --- LICENSE.md | 362 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 +- src/app/scripts.ts | 2 +- 3 files changed, 365 insertions(+), 3 deletions(-) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..be2cc4d --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,362 @@ +Mozilla Public License, version 2.0 + +1. Definitions + +1.1. "Contributor" + + means each individual or legal entity that creates, contributes to the + creation of, or owns Covered Software. + +1.2. "Contributor Version" + + means the combination of the Contributions of others (if any) used by a + Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + + means Source Code Form to which the initial Contributor has attached the + notice in Exhibit A, the Executable Form of such Source Code Form, and + Modifications of such Source Code Form, in each case including portions + thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + a. that the initial Contributor has attached the notice described in + Exhibit B to the Covered Software; or + + b. that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the terms of + a Secondary License. + +1.6. "Executable Form" + + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + + means a work that combines Covered Software with other material, in a + separate file or files, that is not Covered Software. + +1.8. "License" + + means this document. + +1.9. "Licensable" + + means having the right to grant, to the maximum extent possible, whether + at the time of the initial grant or subsequently, any and all of the + rights conveyed by this License. + +1.10. "Modifications" + + means any of the following: + + a. any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered Software; or + + b. any new file in Source Code Form that contains any Covered Software. + +1.11. "Patent Claims" of a Contributor + + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the License, + by the making, using, selling, offering for sale, having made, import, + or transfer of either its Contributions or its Contributor Version. + +1.12. "Secondary License" + + means either the GNU General Public License, Version 2.0, the GNU Lesser + General Public License, Version 2.1, the GNU Affero General Public + License, Version 3.0, or any later versions of those licenses. + +1.13. "Source Code Form" + + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that controls, is + controlled by, or is under common control with You. For purposes of this + definition, "control" means (a) the power, direct or indirect, to cause + the direction or management of such entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent (50%) of the + outstanding shares or beneficial ownership of such entity. + + +2. License Grants and Conditions + +2.1. Grants + + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + + a. under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + + b. under Patent Claims of such Contributor to make, use, sell, offer for + sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + +2.3. Limitations on Grant Scope + + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + + a. for any code that a Contributor has removed from Covered Software; or + + b. for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + + c. under Patent Claims infringed by Covered Software in the absence of + its Contributions. + + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + +2.5. Representation + + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights to + grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + +2.7. Conditions + + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in + Section 2.1. + + +3. Responsibilities + +3.1. Distribution of Source Form + + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + +3.2. Distribution of Executable Form + + If You distribute Covered Software in Executable Form then: + + a. such Covered Software must also be made available in Source Code Form, + as described in Section 3.1, and You must inform recipients of the + Executable Form how they can obtain a copy of such Source Code Form by + reasonable means in a timely manner, at a charge no more than the cost + of distribution to the recipient; and + + b. You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter the + recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + +3.4. Notices + + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, or + limitations of liability) contained within the Source Code Form of the + Covered Software, except that You may alter any license notices to the + extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + + If it is impossible for You to comply with any of the terms of this License + with respect to some or all of the Covered Software due to statute, + judicial order, or regulation then You must: (a) comply with the terms of + this License to the maximum extent possible; and (b) describe the + limitations and the code they affect. Such description must be placed in a + text file included with all distributions of the Covered Software under + this License. Except to the extent prohibited by statute or regulation, + such description must be sufficiently detailed for a recipient of ordinary + skill to be able to understand it. + +5. Termination + +5.1. The rights granted under this License will terminate automatically if You + fail to comply with any of its terms. However, if You become compliant, + then the rights granted under this License from a particular Contributor + are reinstated (a) provisionally, unless and until such Contributor + explicitly and finally terminates Your grants, and (b) on an ongoing + basis, if such Contributor fails to notify You of the non-compliance by + some reasonable means prior to 60 days after You have come back into + compliance. Moreover, Your grants from a particular Contributor are + reinstated on an ongoing basis if such Contributor notifies You of the + non-compliance by some reasonable means, this is the first time You have + received notice of non-compliance with this License from such + Contributor, and You become compliant prior to 30 days after Your receipt + of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user + license agreements (excluding distributors and resellers) which have been + validly granted by You or Your distributors under this License prior to + termination shall survive termination. + +6. Disclaimer of Warranty + + Covered Software is provided under this License on an "as is" basis, + without warranty of any kind, either expressed, implied, or statutory, + including, without limitation, warranties that the Covered Software is free + of defects, merchantable, fit for a particular purpose or non-infringing. + The entire risk as to the quality and performance of the Covered Software + is with You. Should any Covered Software prove defective in any respect, + You (not any Contributor) assume the cost of any necessary servicing, + repair, or correction. This disclaimer of warranty constitutes an essential + part of this License. No use of any Covered Software is authorized under + this License except under this disclaimer. + +7. Limitation of Liability + + Under no circumstances and under no legal theory, whether tort (including + negligence), contract, or otherwise, shall any Contributor, or anyone who + distributes Covered Software as permitted above, be liable to You for any + direct, indirect, special, incidental, or consequential damages of any + character including, without limitation, damages for lost profits, loss of + goodwill, work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses, even if such party shall have been + informed of the possibility of such damages. This limitation of liability + shall not apply to liability for death or personal injury resulting from + such party's negligence to the extent applicable law prohibits such + limitation. Some jurisdictions do not allow the exclusion or limitation of + incidental or consequential damages, so this exclusion and limitation may + not apply to You. + +8. Litigation + + Any litigation relating to this License may be brought only in the courts + of a jurisdiction where the defendant maintains its principal place of + business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. Nothing + in this Section shall prevent a party's ability to bring cross-claims or + counter-claims. + +9. Miscellaneous + + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides that + the language of a contract shall be construed against the drafter shall not + be used to construe this License against a Contributor. + + +10. Versions of the License + +10.1. New Versions + + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + +10.2. Effect of New Versions + + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + +10.3. Modified Versions + + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses If You choose to distribute Source Code Form that is + Incompatible With Secondary Licenses under the terms of this version of + the License, the notice described in Exhibit B of this License must be + attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the + terms of the Mozilla Public License, v. + 2.0. If a copy of the MPL was not + distributed with this file, You can + obtain one at + http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, +then You may include the notice in a location (such as a LICENSE file in a +relevant directory) where a recipient would be likely to look for such a +notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice + + This Source Code Form is "Incompatible + With Secondary Licenses", as defined by + the Mozilla Public License, v. 2.0. diff --git a/README.md b/README.md index ba850d4..d2c45c9 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ ToDo 4. Push your branch: `git push origin featurename` 5. Create a pull request # Licence -For further information, please check out the [LICENSE](https://github.com/Spaceholder-Programming/Operations-Research-Tool/blob/main/LICENCE.txt). -======= + +For further information, please check out the [LICENSE](https://github.com/Spaceholder-Programming/Operations-Research-Tool/blob/main/LICENCE.md). # Contact If you have the desire to contact the team behind this project, use the contact details on our GitHub accounts: + [bRNS98](https://github.com/bRNS98) diff --git a/src/app/scripts.ts b/src/app/scripts.ts index eb20879..161b551 100644 --- a/src/app/scripts.ts +++ b/src/app/scripts.ts @@ -47,7 +47,7 @@ function walltimeStart() { } function isInputValidRegex(obj: string | undefined, subj: string | undefined, bounds: string | undefined, vars: string | undefined): boolean { - customLog("Staring input checks..."); + customLog("Starting input checks..."); // standard case: input is undefined - invalid if (obj === undefined || obj === null || subj === undefined || subj === null || bounds === undefined || bounds === null || vars === undefined || vars === null) { -- 2.52.0 From cc0715b6adf663d9d39afb60741585530a5745a5 Mon Sep 17 00:00:00 2001 From: SinusFox <61253950+SinusFox@users.noreply.github.com> Date: Fri, 11 Oct 2024 09:30:11 +0200 Subject: [PATCH 2/5] Adding language switching and minimize button (#25) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Initial Push Inititial project state * Static demo version * static demo site - added variables a * first_implementation * Updated UI, Improved Style to be more "Reactly", added Functionality * add parsing functions * change folder * Import/Export Prototype * Adding "reactjs-popup" to package,json * Adding GLPK source * Rough implementation of solver + example * Show solution in output * example 2 + popup lib * removing import button This feature won't be needed in this state of the project and might come back later. Right now it serves no functional purpose. * Removing "Popout" button This feature won't be needed in this state of the project and might come back later. Right now it serves no functional purpose. * Updating Logs Now the site displays all logs created with customLog(STRING). Logs can be cleared with customLogClear(); * Adding walltime Can be called using: Start: function walltimeStart() { returns Date.now(); Stop: function walltimeStopAndPrint(startpoint: number) { Add startpoint as argument. It prints the elapsed time using customLog() * Adding duals ouput * Adding glpk.js package required dependency * adding LP format export and fixing a few errors * fixing further errors * adding automatic build * Moving files to correct folders * Update nextjs.yml * Updating README and .gitignore README: - added installation instructions - added troubleshooting gitignore: - skipping Writerside and .idea folders * Update LICENCE.txt We are required to use the same license. See https://github.com/hgourvest/node-glpk/blob/master/LICENSE * Updating icon * Adding RegEx input checks and updating text box explanations * Update README.md Updating license info Signed-off-by: SinusFox <61253950+SinusFox@users.noreply.github.com> * Deleting license to recreate proper license * Update layout.tsx fixing typo Signed-off-by: SinusFox <61253950+SinusFox@users.noreply.github.com> * Fixing word issue English has some false friends... like the German "Enter" is actually return in English. * Updatint License * Fixing design issue and updating license link * Fixing typo in log * Fixing white mode * adding translations 1/2 UI Translations Coming in 2/2: Output translations * adding output translations * adding minimize button --------- Signed-off-by: SinusFox <61253950+SinusFox@users.noreply.github.com> Co-authored-by: moebiusl Co-authored-by: Marcel Pöppe --- package-lock.json | 290 +++++++++++++++++++++++++++++++++++++++++++- package.json | 5 + src/app/globals.css | 20 ++- src/app/lang.ts | 204 +++++++++++++++++++++++++++++++ src/app/layout.tsx | 6 +- src/app/page.tsx | 76 +++++++----- src/app/scripts.ts | 149 ++++++++++++++--------- 7 files changed, 656 insertions(+), 94 deletions(-) create mode 100644 src/app/lang.ts diff --git a/package-lock.json b/package-lock.json index 5500511..817ba8a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,14 @@ "version": "0.1.0", "dependencies": { "glpk.js": "^4.0.2", + "i18n": "^0.15.1", + "i18next": "^23.15.2", + "i18next-browser-languagedetector": "^8.0.0", "next": "14.2.11", + "next-i18next": "^15.3.1", "react": "^18", "react-dom": "^18", + "react-i18next": "^15.0.2", "react-popup": "^0.11.2", "reactjs-popup": "^2.0.6" }, @@ -39,6 +44,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@babel/runtime": { + "version": "7.25.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz", + "integrity": "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==", + "license": "MIT", + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -237,6 +254,50 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@messageformat/core": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@messageformat/core/-/core-3.4.0.tgz", + "integrity": "sha512-NgCFubFFIdMWJGN5WuQhHCNmzk7QgiVfrViFxcS99j7F5dDS5EP6raR54I+2ydhe4+5/XTn/YIEppFaqqVWHsw==", + "license": "MIT", + "dependencies": { + "@messageformat/date-skeleton": "^1.0.0", + "@messageformat/number-skeleton": "^1.0.0", + "@messageformat/parser": "^5.1.0", + "@messageformat/runtime": "^3.0.1", + "make-plural": "^7.0.0", + "safe-identifier": "^0.4.1" + } + }, + "node_modules/@messageformat/date-skeleton": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@messageformat/date-skeleton/-/date-skeleton-1.1.0.tgz", + "integrity": "sha512-rmGAfB1tIPER+gh3p/RgA+PVeRE/gxuQ2w4snFWPF5xtb5mbWR7Cbw7wCOftcUypbD6HVoxrVdyyghPm3WzP5A==", + "license": "MIT" + }, + "node_modules/@messageformat/number-skeleton": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@messageformat/number-skeleton/-/number-skeleton-1.2.0.tgz", + "integrity": "sha512-xsgwcL7J7WhlHJ3RNbaVgssaIwcEyFkBqxHdcdaiJzwTZAWEOD8BuUFxnxV9k5S0qHN3v/KzUpq0IUpjH1seRg==", + "license": "MIT" + }, + "node_modules/@messageformat/parser": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@messageformat/parser/-/parser-5.1.0.tgz", + "integrity": "sha512-jKlkls3Gewgw6qMjKZ9SFfHUpdzEVdovKFtW1qRhJ3WI4FW5R/NnGDqr8SDGz+krWDO3ki94boMmQvGke1HwUQ==", + "license": "MIT", + "dependencies": { + "moo": "^0.5.1" + } + }, + "node_modules/@messageformat/runtime": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@messageformat/runtime/-/runtime-3.0.1.tgz", + "integrity": "sha512-6RU5ol2lDtO8bD9Yxe6CZkl0DArdv0qkuoZC+ZwowU+cdRlVE1157wjCmlA5Rsf1Xc/brACnsZa5PZpEDfTFFg==", + "license": "MIT", + "dependencies": { + "make-plural": "^7.0.0" + } + }, "node_modules/@next/env": { "version": "14.2.11", "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.11.tgz", @@ -486,6 +547,16 @@ "tslib": "^2.4.0" } }, + "node_modules/@types/hoist-non-react-statics": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", + "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", + "license": "MIT", + "dependencies": { + "@types/react": "*", + "hoist-non-react-statics": "^3.3.0" + } + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -514,14 +585,12 @@ "version": "15.7.12", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.12.tgz", "integrity": "sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==", - "dev": true, "license": "MIT" }, "node_modules/@types/react": { "version": "18.3.5", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.5.tgz", "integrity": "sha512-WeqMfGJLGuLCqHGYRGHxnKrXcTitc6L/nBUWfWPcTarG3t9PsquqUMuVeXZeca+mglY4Vo5GZjCi0A3Or2lnxA==", - "dev": true, "license": "MIT", "dependencies": { "@types/prop-types": "*", @@ -1118,6 +1187,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/boolean": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/boolean/-/boolean-3.2.0.tgz", + "integrity": "sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==", + "license": "MIT" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1311,6 +1386,17 @@ "dev": true, "license": "MIT" }, + "node_modules/core-js": { + "version": "3.38.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.38.1.tgz", + "integrity": "sha512-OP35aUorbU3Zvlx7pjsFdu1rGNnD4pgw/CWoYzRY3t2EzoVT7shKHY1dlAy3f41cGIO7ZDPQimhGFTlEYkG/Hw==", + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -1343,7 +1429,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true, "license": "MIT" }, "node_modules/damerau-levenshtein": { @@ -1411,7 +1496,6 @@ "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -2268,6 +2352,18 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-printf": { + "version": "1.6.9", + "resolved": "https://registry.npmjs.org/fast-printf/-/fast-printf-1.6.9.tgz", + "integrity": "sha512-FChq8hbz65WMj4rstcQsFB0O7Cy++nmbNfLYnD9cYv2cRn8EG6k/MGn9kO/tjO66t09DLDugj3yL+V2o6Qftrg==", + "license": "BSD-3-Clause", + "dependencies": { + "boolean": "^3.1.4" + }, + "engines": { + "node": ">=10.0" + } + }, "node_modules/fastq": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", @@ -2721,6 +2817,82 @@ "node": ">= 0.4" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/html-parse-stringify": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz", + "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==", + "license": "MIT", + "dependencies": { + "void-elements": "3.1.0" + } + }, + "node_modules/i18n": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/i18n/-/i18n-0.15.1.tgz", + "integrity": "sha512-yue187t8MqUPMHdKjiZGrX+L+xcUsDClGO0Cz4loaKUOK9WrGw5pgan4bv130utOwX7fHE9w2iUeHFalVQWkXA==", + "license": "MIT", + "dependencies": { + "@messageformat/core": "^3.0.0", + "debug": "^4.3.3", + "fast-printf": "^1.6.9", + "make-plural": "^7.0.0", + "math-interval-parser": "^2.0.1", + "mustache": "^4.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/mashpie" + } + }, + "node_modules/i18next": { + "version": "23.15.2", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.15.2.tgz", + "integrity": "sha512-zcPSWzCvw6uKnuYHIqs4W7hTuB9e3AFcSdZgvCWoPXIZsBjBd4djN2/2uOHIB+1DFFkQnMBXvhNg7J3WyCuywQ==", + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.2" + } + }, + "node_modules/i18next-browser-languagedetector": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/i18next-browser-languagedetector/-/i18next-browser-languagedetector-8.0.0.tgz", + "integrity": "sha512-zhXdJXTTCoG39QsrOCiOabnWj2jecouOqbchu3EfhtSHxIB5Uugnm9JaizenOy39h7ne3+fLikIjeW88+rgszw==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.2" + } + }, + "node_modules/i18next-fs-backend": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/i18next-fs-backend/-/i18next-fs-backend-2.3.2.tgz", + "integrity": "sha512-LIwUlkqDZnUI8lnUxBnEj8K/FrHQTT/Sc+1rvDm9E8YvvY5YxzoEAASNx+W5M9DfD5s77lI5vSAFWeTp26B/3Q==", + "license": "MIT" + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -3451,6 +3623,21 @@ "dev": true, "license": "ISC" }, + "node_modules/make-plural": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-7.4.0.tgz", + "integrity": "sha512-4/gC9KVNTV6pvYg2gFeQYTW3mWaoJt7WZE5vrp1KnQDgW92JtYZnzmZT81oj/dUTqAIu0ufI2x3dkgu3bB1tYg==", + "license": "Unicode-DFS-2016" + }, + "node_modules/math-interval-parser": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/math-interval-parser/-/math-interval-parser-2.0.1.tgz", + "integrity": "sha512-VmlAmb0UJwlvMyx8iPhXUDnVW1F9IrGEd9CIOmv+XL8AErCUUuozoDMrgImvnYt2A+53qVX/tPW6YJurMKYsvA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3508,13 +3695,27 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/moo": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/moo/-/moo-0.5.2.tgz", + "integrity": "sha512-iSAJLHYKnX41mKcJKjqvnAN9sf0LMDTXDEvFv+ffuRR9a1MIuXLjMNL6EsnDHSkKLTWNqQQ5uo61P4EbU4NU+Q==", + "license": "BSD-3-Clause" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, "license": "MIT" }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "license": "MIT", + "bin": { + "mustache": "bin/mustache" + } + }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", @@ -3602,6 +3803,42 @@ } } }, + "node_modules/next-i18next": { + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/next-i18next/-/next-i18next-15.3.1.tgz", + "integrity": "sha512-+pa2pZJb7B6k5PKW3TLVMmAodqkNaOBWVYlpWX56mgcEJz0UMW+MKSdKM9Z72CHp6Bp48g7OWwDnLqxXNp/84w==", + "funding": [ + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + }, + { + "type": "individual", + "url": "https://locize.com" + } + ], + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.23.2", + "@types/hoist-non-react-statics": "^3.3.4", + "core-js": "^3", + "hoist-non-react-statics": "^3.3.2", + "i18next-fs-backend": "^2.3.2" + }, + "engines": { + "node": ">=14" + }, + "peerDependencies": { + "i18next": ">= 23.7.13", + "next": ">= 12.0.0", + "react": ">= 17.0.2", + "react-i18next": ">= 13.5.0" + } + }, "node_modules/next/node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", @@ -4217,6 +4454,28 @@ "react": "^18.3.1" } }, + "node_modules/react-i18next": { + "version": "15.0.2", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-15.0.2.tgz", + "integrity": "sha512-z0W3/RES9Idv3MmJUcf0mDNeeMOUXe+xoL0kPfQPbDoZHmni/XsIoq5zgT2MCFUiau283GuBUK578uD/mkAbLQ==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.25.0", + "html-parse-stringify": "^3.0.1" + }, + "peerDependencies": { + "i18next": ">= 23.2.3", + "react": ">= 16.8.0" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + } + }, "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -4295,6 +4554,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "license": "MIT" + }, "node_modules/regexp.prototype.flags": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", @@ -4445,6 +4710,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-identifier": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/safe-identifier/-/safe-identifier-0.4.2.tgz", + "integrity": "sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==", + "license": "ISC" + }, "node_modules/safe-regex-test": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", @@ -5194,6 +5465,15 @@ "dev": true, "license": "MIT" }, + "node_modules/void-elements": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz", + "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index 0c68bcc..91e47ad 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,14 @@ }, "dependencies": { "glpk.js": "^4.0.2", + "i18n": "^0.15.1", + "i18next": "^23.15.2", + "i18next-browser-languagedetector": "^8.0.0", "next": "14.2.11", + "next-i18next": "^15.3.1", "react": "^18", "react-dom": "^18", + "react-i18next": "^15.0.2", "react-popup": "^0.11.2", "reactjs-popup": "^2.0.6" }, diff --git a/src/app/globals.css b/src/app/globals.css index dc0cd35..e778b90 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -3,8 +3,8 @@ @tailwind utilities; :root { - --background: #ffffff; - --foreground: #171717; + --background: #171717; + --foreground: #ffffff; } @media (prefers-color-scheme: dark) { @@ -157,4 +157,18 @@ body { .popup-overlay { background: rgba(0, 0, 0, 0.5); -} \ No newline at end of file +} + +.dropdown-custom { + width: 20%; + background-color: black; + color: white; + border: none; + padding: 10px; + font-size: 16px; + cursor: pointer; +} + +.dropdown-custom:hover { + background-color: #444; +} diff --git a/src/app/lang.ts b/src/app/lang.ts new file mode 100644 index 0000000..4b1f2d1 --- /dev/null +++ b/src/app/lang.ts @@ -0,0 +1,204 @@ +export default function text(lang: string, input: string): string { + // German translation + if (lang === "ger") { + switch (input) { + case "header_title": + return "OR-Tool"; + case "header_subtitle": + return "von Spaceholder Programming"; + case "boxObjTitle": + return "Ziel"; + case "boxObjDesc": + return "Geben Sie Ihr Ziel hier ein. Es ist nur ein Ziel erlaubt. Verwenden Sie eine Zeile dafür (kein 'Enter'!). Erlaubte Symbole sind 0-9, a-z, A-Z und <>=.\nBeispiel:\nx + y\n-786433 x1 + 655361 x2"; + case "boxSubjTitle": + return "Nebenbedingungen"; + case "boxSubjDesc": + return "Geben Sie Ihre Nebenbedingungen hier ein. Eine pro Zeile (mit der 'Enter'-Taste trennen). Erlaubte Symbole sind 0-9, a-z, A-Z und <>=.\nBeispiel:\n+1 x + 2 y <= 15\n524321 x14 + 524305 x15 <= 4194303.5"; + case "boxBoundsTitle": + return "Grenzen"; + case "boxBoundsDesc": + return "Geben Sie Ihre Grenzen hier ein. Eine pro Zeile (mit der 'Enter'-Taste trennen). Erlaubte Symbole sind 0-9, a-z, A-Z und <>=.\nBeispiel:\nx >= 0\nx > 0\n0 <= x1 <= 1"; + case "boxVarsTitle": + return "Variablen"; + case "boxVarsDesc": + return "Listen Sie alle Ihre Variablen auf. Eine pro Zeile (mit der 'Enter'-Taste trennen). Erlaubte Symbole sind a-z, A-Z.\nBeispiel:\nx\ny"; + case "boxExportLP": + return "Als LP exportieren"; + case "boxOut": + return "Geben Sie ein Problem ein und drücken Sie eine Aktionstaste, um die Ausgabe anzuzeigen..."; + case "buttonCalc": + return "Berechnen"; + case "etime": + return "Berechnungsdauer"; + case "seconds": + return "Sekunden"; + case "err_invalidInput": + return "Fehler: Ungültige Eingabe in"; + case "err_nullInput": + return "Fehler: NULL- oder undefinierte Eingabe in"; + case "err_invalidInput": + return "Fehler: Ungültige Eingabe oder fehlendes Zeichen in"; + case "input_checks_successful": + return "Alle Eingabeprüfungen erfolgreich."; + case "input_checks_start": + return "Starte Eingabeprüfungen..."; + case "obj_box": + return "Zielfeld"; + case "subj_box": + return "Bedingungsfeld"; + case "bounds_box": + return "Grenzenfeld"; + case "vars_box": + return "Variablenfeld"; + case "err_emptyBox": + return "Fehler: Leeres Textfeld."; + case "calculating": + return "Berechne..."; + case "maximize": + return "Maximieren"; + case "minimize": + return "Minimieren"; + case "run_optimization": + return "Optimierung mit Eingaben wird ausgeführt"; + case "startProblemSetup": + return "Starte Problemerstellung..."; + case "succProblemSetup": + return "Problem erstellt."; + case "startScaling": + return "Skalieren des Problems..."; + case "succScaling": + return "Skalierung erfolgreich."; + case "startOptimizationSimplex": + return "Starte Simplex-Optimierung..."; + case "succOptimizationSimplex": + return "Simplex-Optimierung abgeschlossen."; + case "startOptimizationInteger": + return "Starte Ganzzahloptimierung..."; + case "succOptimizationInteger": + return "Ganzzahloptimierung abgeschlossen."; + case "finalObjValue": + return "Endgültiger Zielfunktionswert"; + case "varsValues": + return "Wert jeder Variable"; + case "dualValues": + return "Dualwerte der Einschränkungen"; + case "downloadPrepFileString": + return "Dateiinhalt wird vorbereitet..."; + case "downloadPrepFile": + return "Datei wird vorbereitet..."; + case "downloadStart": + return "Download wird gestartet."; + case "downloadPrep": + return "Download wird vorbereitet..."; + case "downloadFetchInput": + return "Eingaben werden geladen..."; + case "importing": + return "Importiere..."; + default: + return input; + } + + } + + // English translation + if (lang === "eng") { + switch (input) { + case "header_title": + return "OR-Tool"; + case "header_subtitle": + return "by Spaceholder Programming"; + case "boxObjTitle": + return "Objective"; + case "boxObjDesc": + return "Insert your objective here. One objective is allowed. Use one line for it (no \"return\"!) Allowed symbols are 0-9, a-z, A-Z and <>=.\nExample:\nx + y\n-786433 x1 + 655361 x2"; + case "boxSubjTitle": + return "Subject"; + case "boxSubjDesc": + return "Insert your subject here. One per line (divide by 'return' button). Allowed symbols are 0-9, a-z, A-Z and <>=.\nExample:\n+1 x + 2 y <= 15\n524321 x14 + 524305 x15 <= 4194303.5"; + case "boxBoundsTitle": + return "Bounds"; + case "boxBoundsDesc": + return "Insert your bounds here. One per line (divide by 'return' button). Allowed symbols are 0-9, a-z, A-Z and <>=.\nExample:\nx >= 0\nx > 0\n0 <= x1 <= 1"; + case "boxVarsTitle": + return "Variables"; + case "boxVarsDesc": + return "List all your variables. One per line (divide by 'return' button). Allowed symbols are a-z, A-Z.\nExample:\nx\ny"; + case "boxExportLP": + return "Export as LP"; + case "boxOut": + return "Input a problem and an action button to display output..."; + case "buttonCalc": + return "Calculate"; + case "etime": + return "Elapsed time"; + case "seconds": + return "seconds"; + case "err_invalidInput": + return "Error: Invalid input in"; + case "err_nullInput": + return "Error: NULL or undefined input in"; + case "err_invalidInput": + return "Error: Invalid input or missing character in"; + case "input_checks_successful": + return "All input checks successful." + case "input_checks_start": + return "Starting input checks..."; + case "obj_box": + return "object box"; + case "subj_box": + return "subject box"; + case "bounds_box": + return "bounds box"; + case "vars_box": + return "variables box"; + case "err_emptyBox": + return "Error: Empty text box."; + case "calculating": + return "Calculating..."; + case "maximize": + return "Maximize"; + case "minimize": + return "Minimize"; + case "run_optimization": + return "Running optimization with input"; + case "startProblemSetup": + return "Starting problem setup..."; + case "succProblemSetup": + return "Problem created."; + case "startScaling": + return "Scaling problem..."; + case "succScaling": + return "Scaling successful."; + case "startOptimizationSimplex": + return "Starting simplex optimization..."; + case "succOptimizationSimplex": + return "Simplex optimization complete."; + case "startOptimizationInteger": + return "Starting integer optimization..."; + case "succOptimizationInteger": + return "Integer optimization complete."; + case "finalObjValue": + return "Final objective value"; + case "varsValues": + return "Value of each variable"; + case "dualValues": + return "Dual values of constraints"; + case "downloadPrepFileString": + return "Preparing file content string..."; + case "downloadPrepFile": + return "Preparing file..."; + case "downloadStart": + return "Starting download."; + case "downloadPrep": + return "Preparing download..."; + case "downloadFetchInput": + return "Fetching input..."; + case "importing": + return "Importing..."; + default: + return input; + } + } + + return "Error: Translation Module - Language Not Known."; +} diff --git a/src/app/layout.tsx b/src/app/layout.tsx index db2d1f3..6f3f03b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -45,7 +45,7 @@ export default function RootLayout({ width={16} height={16} /> - Go to our docs + Docs - See the source code + Source Code - Powered by GLPK + GLPK diff --git a/src/app/page.tsx b/src/app/page.tsx index dda578a..3375c12 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,58 +1,80 @@ 'use client' +import React, { useState } from 'react'; import { Box, Button, Output } from "./modules"; -import { calculate_click, downloadLP, import_click } from "./scripts" +import { calculate_clickMaximize, calculate_clickMinimize, downloadLP, import_click } from "./scripts" +import text from "./lang" export default function Home() { + const [language, setLanguage] = useState('eng'); + const tr_hTitle = text(language, 'header_title'); + const tr_hSubtitle = text(language, 'header_subtitle'); + const tr_boxObjTitle = text(language, 'boxObjTitle'); + const tr_boxObjDesc = text(language, "boxObjDesc"); + const tr_boxSubjTitle = text(language, 'boxSubjTitle'); + const tr_boxSubjDesc = text(language, "boxSubjDesc"); + const tr_boxBoundsTitle = text(language, 'boxBoundsTitle'); + const tr_boxBoundsDesc = text(language, "boxBoundsDesc"); + const tr_boxVarsTitle = text(language, 'boxVarsTitle'); + const tr_boxVarsDesc = text(language, "boxVarsDesc"); + const tr_boxOut = text(language, "boxOut"); + const tr_boxExportLP = text(language, "boxExportLP"); + const tr_calc_max = text(language, "maximize"); + const tr_calc_min = text(language, "minimize"); + + const handleLanguageChange = (event: React.ChangeEvent) => { + setLanguage(event.target.value); + }; + return ( <>
- Operations Research Tool + {tr_hTitle}

- by Spaceholder Programming - + {tr_hSubtitle} +

+
=.\nExample:\nx + y\n-786433 x1 + 655361 x2"} - id="objective"/> + title={tr_boxObjTitle} + placeholder={tr_boxObjDesc} + id="objective" /> =.\nExample:\n+1 x + 2 y <= 15\n524321 x14 + 524305 x15 <= 4194303.5"} - id="subject"/> + title={tr_boxSubjTitle} + placeholder={tr_boxSubjDesc} + id="subject" /> =.\nExample:\nx >= 0\nx > 0\n0 <= x1 <= 1"} - id="bounds"/> + title={tr_boxBoundsTitle} + placeholder={tr_boxBoundsDesc} + id="bounds" />