Skip to content

Instantly share code, notes, and snippets.

View rinster's full-sized avatar
🎯
Focusing

Erine Natnat rinster

🎯
Focusing
View GitHub Profile
#! 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')
@rinster
rinster / dom.js
Created December 30, 2022 07:59 — forked from amantheroot/dom.js
JavaScript DOM Manipulation cheat sheet by Traversy Media
// 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);
class DeepNestedIterator {
constructor(list) {
};
// Add additional functions if needed
//TODO:
hasNext() {
class DeepNestedIterator {
constructor(nestedList) {
this.data = []
// Recursively precomputes all data at
// the moment the class is instantiated
this.flatten(nestedList)
};
class NestedIterator {
constructor(nestedList) {
this.stack = [];
this.indexStack = [];
this.nextElement = null;
this.stack.push(nestedList[0]);
this.indexStack.push(0);
}
class DeeplyNestedIterator {
constructor(nestedList) {
this.gen = this.listGenerator(nestedList);
this.nextVal = this.gen.next();
}
hasNext() {
return !this.nextVal.done;
}