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
| #! python3 | |
| #this program will calculate the PERM filing window | |
| import datetime, sys | |
| from datetime import datetime | |
| userInput1 = input('Type Date LMT was launched mm-dd-yy: ') | |
| dt_obj1 = datetime.strptime(userInput1, '%m-%d-%y') | |
| dt_str1 = datetime.strftime(dt_obj1, '%y-%m-%d') |
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
| // EXAMINE THE DOCUMENT OBJECT // | |
| // console.dir(document); | |
| // console.log(document.domain); | |
| // console.log(document.URL); | |
| // console.log(document.title); | |
| // //document.title = 123; | |
| // console.log(document.doctype); | |
| // console.log(document.head); | |
| // console.log(document.body); |
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 DeepNestedIterator { | |
| constructor(list) { | |
| }; | |
| // Add additional functions if needed | |
| //TODO: | |
| hasNext() { | |
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 DeepNestedIterator { | |
| constructor(nestedList) { | |
| this.data = [] | |
| // Recursively precomputes all data at | |
| // the moment the class is instantiated | |
| this.flatten(nestedList) | |
| }; | |
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 NestedIterator { | |
| constructor(nestedList) { | |
| this.stack = []; | |
| this.indexStack = []; | |
| this.nextElement = null; | |
| this.stack.push(nestedList[0]); | |
| this.indexStack.push(0); | |
| } |
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 DeeplyNestedIterator { | |
| constructor(nestedList) { | |
| this.gen = this.listGenerator(nestedList); | |
| this.nextVal = this.gen.next(); | |
| } | |
| hasNext() { | |
| return !this.nextVal.done; | |
| } |