- Submit: Change what it says
Make a JS File and link it in the header.- Capture the submit event of the login form. [DONE]
- Send the username to the server via ajax POST (you will get an error bc it is a non existent pg) [DONE]
- Login should be hidden before the js loads then the JS will showit [DONE]
- Make a login page handler (tornado) [DONE]
- response: {success: true, message: LOGGED IN} [DONE]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package textgen; | |
| import java.util.AbstractList; | |
| /** A class that implements a doubly linked list | |
| * | |
| * @author UC San Diego Intermediate Programming MOOC team | |
| * | |
| * @param <E> The type of the elements stored in the list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class LoginPageHandler(tornado.web.RequestHandler): | |
| @gen | |
| def post(self): | |
| response = {"success": True, "message": "logged in successfully"} | |
| self.set_header("Content-Type", "application/json") | |
| sleep = yield gen.sleep(5) | |
| sleep.add_done_callback( | |
| self.write(json.dumps(response)) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package testScripts; | |
| public class Tuple<String, Boolean> { | |
| public String letter; | |
| public Boolean vBool; | |
| public Tuple(String letter, Boolean vBool) { | |
| this.letter = letter; | |
| this.vBool = vBool; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Tuple<Letter, VBoolean> { | |
| public Letter letter; | |
| public VBoolean vBool; | |
| public Tuple(Letter l, VBoolean vBool) { | |
| this.letter = l; | |
| this.vBool = vBool; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package testScripts; | |
| public class Main { | |
| public static void main(String[] args) { | |
| MyClass instance = new MyClass("word"); | |
| System.out.println(instance); | |
| /* | |
| Prints: testScripts.MyClass@2a139a55 I want word | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package searchSort; | |
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| public class Airport implements Comparable<Airport> { | |
| private String city; | |
| private String country; | |
| private String code; | |