├── Algorithms └── Sieve of Eratosthenes.md ├── BFE.dev ├── 0001.implement curry().md └── Promise.all.md ├── CSS-Day └── 0001. Five Pointed Star │ ├── Five Pointed Star │ ├── package.json │ ├── public │ │ └── index.html │ └── src │ │ ├── App.js │ │ ├── index.js │ │ └── styles.css │ └── README.md ├── Interview ├── CS Fundementals.md ├── CSS interview.md ├── HTML Interview.md ├── Interview.md ├── Node Interview.md └── React Interview.md ├── JS-Algo ├── 0001. Two Sum.md ├── 0002. Add Two Numbers.md ├── 0003. Longest Substring Without Repeating Characters.md ├── 0005. Longest Palindromic Substring.md ├── 0006. Zigzag Conversion.md ├── 0007. Reverse Integer.md ├── 0009. Palindrome Number.md ├── 0011. Container With Most Water.md ├── 0012. Integer to Roman.md ├── 0013. Roman to Integer.md ├── 0014. Longest Common Prefix.md ├── 0015. 3Sum.md ├── 0016. 3Sum Closest.md ├── 0017. Letter Combinations of a Phone Number.md ├── 0018. 4Sum.md ├── 0019. Remove Nth Node From End of List.md ├── 0020. Valid Parentheses.md ├── 0021. Merge Two Sorted Lists.md ├── 0022. Generate Parentheses.md ├── 0024. Swap Nodes in Pairs.md ├── 0026. Remove Duplicates from Sorted Array.md ├── 0027. Remove Element.md ├── 0028. Find the Index of the First Occurrence in a String.md ├── 0031. Next Permutation.md ├── 0033. Search in Rotated Sorted Array.md ├── 0034. Find First and Last Position of Element in Sorted Array.md ├── 0035. Search Insert Position.md ├── 0036. Valid Sudoku.md ├── 0038. Count and Say.md ├── 0039. Combination Sum.md ├── 0040. Combination Sum II.md ├── 0042. Trapping Rain Water.md ├── 0043. Multiply Strings.md ├── 0045. Jump Game II.md ├── 0046. Permutations.md ├── 0047. Permutations II.md ├── 0048. Rotate Image.md ├── 0049. Group Anagrams.md ├── 0050. Pow(x, n).md ├── 0054. Spiral Matrix.md ├── 0055. Jump Game.md ├── 0056. Merge Intervals.md ├── 0057. Insert Interval.md ├── 0058. Length of Last Word.md ├── 0059. Spiral Matrix II.md ├── 0061. Rotate List.md ├── 0062. Unique Paths.md ├── 0066. Plus One.md ├── 0075. Sort Colors.md ├── 0083. Remove Duplicates from Sorted List.md ├── 0088. Merge Sorted Array.md ├── 0094. Binary Tree Inorder Traversal.md ├── 01 Matrix.md ├── 0104. Maximum Depth of Binary Tree.md ├── 0108. Convert Sorted Array to Binary Search Tree.md ├── 0110. Balanced Binary Tree.md ├── 0118. Pascal's Triangle.md ├── 0119. Pascal's Triangle II.md ├── 0121. Best Time to Buy and Sell Stock.md ├── 0122. Best Time to Buy and Sell Stock II.md ├── 0125. Valid Palindrome.md ├── 0128. Longest Consecutive Sequence.md ├── 0136. Single Number.md ├── 0160. Intersection of Two Linked Lists.md ├── 0163. Missing Ranges.md ├── 0169. Majority Element.md ├── 0189. Rotate Array.md ├── 0203. Remove Linked List Elements.md ├── 0205. Isomorphic Strings.md ├── 0206. Reverse Linked List.md ├── 0217. Contains Duplicate.md ├── 0219. Contains Duplicate II.md ├── 0225. Implement Stack using Queues.md ├── 0226. Invert Binary Tree.md ├── 0228. Summary Ranges.md ├── 0238. Product of Array Except Self.md ├── 0242. Valid Anagram.md ├── 0243. Shortest Word Distance.md ├── 0252. Meeting Rooms.md ├── 0268. Missing Number.md ├── 0283. Move Zeroes.md ├── 0290. Word Pattern.md ├── 0344. Reverse String.md ├── 0347. Top K Frequent Elements.md ├── 0349. Intersection of Two Arrays.md ├── 0350. Intersection of Two Arrays II.md ├── 0367. Valid Perfect Square.md ├── 0374. Guess Number Higher or Lower.md ├── 0380. Insert Delete GetRandom O(1).md ├── 0392. Is Subsequence.md ├── 0441. Arranging Coins.md ├── 0448. Find All Numbers Disappeared in an Array.md ├── 0496. Next Greater Element I.md ├── 0543. Diameter of Binary Tree.md ├── 0554. Brick Wall.md ├── 0560. Subarray Sum Equals K.md ├── 0605. Can Place Flowers.md ├── 0682. Baseball Game.md ├── 0724. Find Pivot Index.md ├── 0876. Middle of the Linked List.md ├── 0912. Sort an Array.md ├── 0929. Unique Email Addresses.md ├── 1010. Pairs of Songs With Total Durations Divisible by 60.md ├── 1048. Longest String Chain.md ├── 1091. Shortest Path in Binary Matrix.md ├── 1189. Maximum Number of Balloons.md ├── 1207. Unique Number of Occurrences.md ├── 1209. Remove All Adjacent Duplicates in String II.md ├── 1268. Search Suggestions System.md ├── 1299. Replace Elements with Greatest Element on Right Side.md ├── 1930. Unique Length-3 Palindromic Subsequences.md ├── 1984. Minimum Difference Between Highest and Lowest of K Scores.md ├── 2133. Check if Every Row and Column Contains All Numbers.md ├── 234. Palindrome Linked List.md ├── 353.md ├── 71. Simplify Path.md ├── 92. Reverse Linked List II.md ├── 923. 3Sum With Multiplicity.md ├── Accounts Merge.md ├── Add Strings.md ├── Alaaddin Carpet.md ├── Anagram Difference.md ├── Basic Calculator II.md ├── Beginners │ ├── 0001. Sum of positive.md │ ├── 0002. Return Negative.md │ ├── 0003. Opposite number.md │ ├── 0004. Remove First and Last Character.md │ ├── 0005. Reversed String.md │ ├── 0006. String repeat.md │ ├── 0026. Replace Character with "_".md │ ├── 0027. Consecutive Duplicates with Count.md │ ├── 0028. toCamelCase.md │ ├── 0029. Dig pow.md │ ├── 0030. Equal Sides Of An Array.md │ ├── 0031. Match Strings.md │ ├── 07. Find the smallest integer in the array.md │ ├── 08. Square Every Digit.md │ ├── 09. Remove all vowels from string.md │ ├── 10. Highest and Lowest.md │ ├── 11. Descending Order.md │ ├── 12. Mumbling.md │ ├── 13. Get the middle string.md │ ├── 14. Check if a number is square.md │ ├── 15. Isograms.md │ ├── 16. Exes and Ohs.md │ ├── 17. Jaden Casing Strings.md │ ├── 18. Length of the shortest word in a string.md │ ├── 19. Reverse a string from a given index.md │ ├── 20. Credit card mask.md │ ├── 21. Two to one.md │ ├── 22. Categorize New Member.md │ ├── 23. Find the odd int.md │ ├── 24. Sum of Digits.md │ └── 25. Stop gninnipS My sdroW.md ├── Binary Search.md ├── Binary Tree Right Side View.md ├── Binary Tree Vertical Order Traversal.md ├── Buildings With an Ocean View.md ├── Buying Show Tickets.md ├── Combinations.md ├── Count Analogous Array.md ├── Count Binary Substrings.md ├── Count Duplicate Elements.md ├── Counting Analogous Arrays.md ├── Custom Sorted Array.md ├── Decode String.md ├── Design Linked List.md ├── Expressive Words.md ├── Find Duplicate File in System.md ├── Find Peak Element.md ├── First Bad Version.md ├── Fizz Buzz.md ├── Flood Fill.md ├── Fraction to Recurring Decimal.md ├── Game of Life.md ├── Insert Delete GetRandom O(1).md ├── Is this a tree.md ├── K Closest Points to Origin.md ├── Kth Largest Element in an Array.md ├── LRU Cache.md ├── Last and Second Last.md ├── Linked List Cycle II.md ├── Linked List Cycle.md ├── Longest Happy String.md ├── Lowest Common Ancestor of a Binary Tree.md ├── Matrix Summation.md ├── Max Area of Island.md ├── Maximum Subarray.md ├── Meeting Rooms II.md ├── Merge Two Binary Trees.md ├── Minimum Deletions to Make Character Frequencies Unique.md ├── Minimum Knight Moves.md ├── Minimum Moves to Equal Array Elements.md ├── Minimum Number of Steps to Make Two Strings Anagram.md ├── Minimum Remove to Make Valid Parentheses.md ├── Minimum Size Subarray Sum.md ├── Number of Islands.md ├── OA with not answers.md ├── Password Creation.md ├── Populating Next Right Pointers in Each Node.md ├── Range Sum of BST.md ├── Reaching Points.md ├── Recover Binary Search Tree.md ├── Reformat Date.md ├── Reorganize String.md ├── Reverse Words in a String III.md ├── Robot Bounded In Circle.md ├── Rotting Oranges.md ├── Search a 2D Matrix II.md ├── Shortest Word Distance II.md ├── Subdomain Visit Count.md ├── Sum Root to Leaf Numbers.md ├── Sum of Square Numbers.md ├── Time Based Key-Value Store.md ├── Top K Frequent Words.md ├── Two Sum II - Input Array Is Sorted.md ├── Valid Palindrome II.md ├── Validate Binary Search Tree.md ├── Verifying an Alien Dictionary.md ├── Word Break.md ├── Word Search.md └── postorder successor of a node in binary tree.md ├── JS-Core ├── 0001. Array Builtins I.md ├── 0002. Clamp.md ├── 0003. Chunk.md ├── 0004. Compact.md ├── 0005. Difference.md ├── 0006. Drop Right While.md ├── 0007. Drop While.md ├── 0008. Fill.md ├── 0009. Find Index.md ├── 0010. Find Last Index.md ├── 0011. Get.md ├── Concepts │ └── 0001. Promise order.md ├── implement Array.prototype.flat().md ├── implement curry() with placeholder support.md └── quicksort.md ├── JS-Day ├── ASU-unity-system │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── asu_university_horiz_rgb_maroongold_150_4.png │ ├── component-core │ │ ├── README.md │ │ ├── dist │ │ │ ├── 17ce59fb481a096f7ff583865d2a9fcc.svg │ │ │ ├── 3b22bb8cd85d055008c810257fe4dc8e.svg │ │ │ ├── 52c0056002fef402dca5480410f15d49.png │ │ │ ├── 7916f0302fd868f67e85000dc4c23e20.png │ │ │ ├── 9856168affbf73078eb4061f75c200e1.png │ │ │ ├── a74373121002bf12b1129f6f78a3d978.png │ │ │ ├── c3e8161a4cfab94937bff5af32ff6252.png │ │ │ ├── d75cfaba45a3d78ae2024bbb423e6b53.png │ │ │ ├── libCore.d649a6bf797053ea9720.css │ │ │ ├── libCore.min.js │ │ │ └── libCore.min.js.LICENSE.txt │ │ ├── img │ │ │ ├── asu-logo │ │ │ │ ├── arizona-state-university-logo-vertical.png │ │ │ │ ├── arizona-state-university-logo.png │ │ │ │ ├── asu-sunburst-black.png │ │ │ │ ├── asu-sunburst-maroongold.png │ │ │ │ ├── asu-sunburst-white.png │ │ │ │ ├── asu-university-horiz-black.png │ │ │ │ ├── asu-university-horiz-maroongold.png │ │ │ │ ├── asu-university-horiz-white.png │ │ │ │ ├── asu-university-vert-black.png │ │ │ │ ├── asu-university-vert-maroongold.png │ │ │ │ └── asu-university-vert-white.png │ │ │ ├── background-patterns │ │ │ │ ├── MorseCodeBlack.png │ │ │ │ ├── MorseCodeWhite.png │ │ │ │ ├── NetworkBlack.png │ │ │ │ ├── NetworkWhite.png │ │ │ │ ├── TopoPatternBlack.png │ │ │ │ └── TopoPatternWhite.png │ │ │ ├── endorsed-logo │ │ │ │ └── asu_universitytechoffice_horiz_white.png │ │ │ ├── favicon │ │ │ │ ├── apple-touch-icon-114x114.png │ │ │ │ ├── apple-touch-icon-120x120.png │ │ │ │ ├── apple-touch-icon-144x144.png │ │ │ │ ├── apple-touch-icon-152x152.png │ │ │ │ ├── apple-touch-icon-57x57.png │ │ │ │ ├── apple-touch-icon-60x60.png │ │ │ │ ├── apple-touch-icon-72x72.png │ │ │ │ ├── apple-touch-icon-76x76.png │ │ │ │ ├── favicon-128.png │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-196x196.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ ├── favicon-96x96.png │ │ │ │ ├── favicon.ico │ │ │ │ ├── mstile-144x144.png │ │ │ │ ├── mstile-150x150.png │ │ │ │ ├── mstile-310x150.png │ │ │ │ ├── mstile-310x310.png │ │ │ │ └── mstile-70x70.png │ │ │ ├── font-awesome-svg │ │ │ │ ├── search-gray-5.svg │ │ │ │ └── search-gray-6.svg │ │ │ ├── innovation-badge │ │ │ │ ├── on-dark │ │ │ │ │ ├── asu-2020-innovation--badge-horizontal--on-dark.png │ │ │ │ │ ├── asu-2020-innovation--badge-only--on-dark.png │ │ │ │ │ ├── asu-2020-innovation--badge-vertical--on-dark.png │ │ │ │ │ ├── asu-2020-innovation--badge-wide--on-dark.png │ │ │ │ │ └── asu-2020-innovation--horizontal--on-dark.png │ │ │ │ ├── on-gold │ │ │ │ │ ├── asu-2020-innovation--badge-horizontal--on-gold.png │ │ │ │ │ ├── asu-2020-innovation--badge-only--on-gold.png │ │ │ │ │ ├── asu-2020-innovation--badge-vertical--on-gold.png │ │ │ │ │ ├── asu-2020-innovation--badge-wide--on-gold.png │ │ │ │ │ └── asu-2020-innovation--horizontal--on-gold.png │ │ │ │ └── on-white │ │ │ │ │ ├── asu-2020-innovation--badge-horizontal--on-white.png │ │ │ │ │ ├── asu-2020-innovation--badge-only--on-white.png │ │ │ │ │ ├── asu-2020-innovation--badge-vertical--on-white.png │ │ │ │ │ ├── asu-2020-innovation--badge-wide--on-white.png │ │ │ │ │ └── asu-2020-innovation--horizontal--on-white.png │ │ │ └── innovation-lockup │ │ │ │ └── on-gold │ │ │ │ ├── 200420-GlobalFooter-No1InnovationLockup.png │ │ │ │ └── 200420-GlobalFooter-No1InnovationLockup@2x.png │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── setupTests.js │ │ ├── src │ │ │ ├── components │ │ │ │ ├── Button │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.stories.js │ │ │ │ ├── ButtonIconOnly │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.stories.js │ │ │ │ ├── ButtonTag │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.stories.js │ │ │ │ └── index.js │ │ │ └── index.js │ │ ├── vendor │ │ │ └── css │ │ │ │ └── bootstrap-asu.min.module.css │ │ └── webpack │ │ │ ├── webpack.common.js │ │ │ ├── webpack.dev.js │ │ │ └── webpack.prod.js │ ├── component-footer │ │ ├── README.md │ │ ├── dist │ │ │ ├── 1de44be8cfa489b3ec2f124910886a2e.png │ │ │ ├── 870c90607184d2f52ac0f60cef80db23.png │ │ │ ├── Footer.production.js │ │ │ ├── vendor.production.js │ │ │ └── vendor.production.js.LICENSE.txt │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src │ │ │ ├── asuLogo.png │ │ │ ├── endorsedLogo.png │ │ │ ├── index.css │ │ │ ├── index.js │ │ │ ├── index.stories.js │ │ │ └── innovationLogo.png │ │ ├── storybook-static │ │ │ ├── 0.d965be6521baf09751c6.manager.bundle.js │ │ │ ├── 1de44be8cfa489b3ec2f124910886a2e.png │ │ │ ├── 4.1ef728572ee6891ddd0d.manager.bundle.js │ │ │ ├── 4.1ef728572ee6891ddd0d.manager.bundle.js.LICENSE.txt │ │ │ ├── 5.e8095ea79d9b7b6884a2.manager.bundle.js │ │ │ ├── 6.a6a257a5826ab8abf526.manager.bundle.js │ │ │ ├── 6.a6a257a5826ab8abf526.manager.bundle.js.LICENSE.txt │ │ │ ├── 7.4c266a856362f0914433.manager.bundle.js │ │ │ ├── 8.20fcea7ce4fdf70f4482.manager.bundle.js │ │ │ ├── 870c90607184d2f52ac0f60cef80db23.png │ │ │ ├── Footer.production.js │ │ │ ├── ae3a2712e3ec1b4db768ff0d597f3834.png │ │ │ ├── favicon.ico │ │ │ ├── iframe.html │ │ │ ├── index.html │ │ │ ├── main.0591d608b092c035abf1.manager.bundle.js │ │ │ ├── main.c5f7ebb9.iframe.bundle.js │ │ │ ├── runtime~main.61498c4ca5d14a2e7d6e.manager.bundle.js │ │ │ ├── runtime~main.b0af52cf.iframe.bundle.js │ │ │ ├── static │ │ │ │ └── media │ │ │ │ │ ├── asuLogo.ae3a2712.png │ │ │ │ │ ├── endorsedLogo.870c9060.png │ │ │ │ │ └── innovationLogo.1de44be8.png │ │ │ ├── vendor.production.js │ │ │ ├── vendor.production.js.LICENSE.txt │ │ │ ├── vendors~main.59ab0949db707f4436e8.manager.bundle.js │ │ │ ├── vendors~main.59ab0949db707f4436e8.manager.bundle.js.LICENSE.txt │ │ │ ├── vendors~main.91789dbb.iframe.bundle.js │ │ │ ├── vendors~main.91789dbb.iframe.bundle.js.LICENSE.txt │ │ │ └── vendors~main.91789dbb.iframe.bundle.js.map │ │ ├── vendor │ │ │ └── css │ │ │ │ └── bootstrap-asu.min.module.css │ │ └── webpack │ │ │ ├── webpack.common.js │ │ │ ├── webpack.dev.js │ │ │ └── webpack.prod.js │ ├── component-header │ │ ├── README.md │ │ ├── dist │ │ │ ├── assets │ │ │ │ └── img │ │ │ │ │ ├── arizona-state-university-logo-vertical.png │ │ │ │ │ ├── arizona-state-university-logo.png │ │ │ │ │ └── asu-starbucks.png │ │ │ ├── asuHeader.cjs.js │ │ │ ├── asuHeader.cjs.js.LICENSE.txt │ │ │ ├── asuHeader.es.js │ │ │ ├── asuHeader.es.js.LICENSE.txt │ │ │ ├── asuHeader.umd.js │ │ │ ├── asuHeader.umd.js.LICENSE.txt │ │ │ ├── main.d.ts │ │ │ ├── vendor.umd.js │ │ │ └── vendor.umd.js.LICENSE.txt │ │ ├── examples │ │ │ └── global-header.html │ │ └── package.json │ ├── dist │ │ ├── css │ │ │ ├── bootstrap-asu.css │ │ │ ├── bootstrap-asu.min.css │ │ │ └── bootstrap-asu.min.css.map │ │ ├── img │ │ │ ├── asu-logo │ │ │ │ ├── arizona-state-university-logo-vertical.png │ │ │ │ ├── arizona-state-university-logo.png │ │ │ │ ├── asu-sunburst-black.png │ │ │ │ ├── asu-sunburst-maroongold.png │ │ │ │ ├── asu-sunburst-white.png │ │ │ │ ├── asu-university-horiz-black.png │ │ │ │ ├── asu-university-horiz-maroongold.png │ │ │ │ ├── asu-university-horiz-white.png │ │ │ │ ├── asu-university-vert-black.png │ │ │ │ ├── asu-university-vert-maroongold.png │ │ │ │ └── asu-university-vert-white.png │ │ │ ├── background-patterns │ │ │ │ ├── MorseCodeBlack.png │ │ │ │ ├── MorseCodeWhite.png │ │ │ │ ├── NetworkBlack.png │ │ │ │ ├── NetworkWhite.png │ │ │ │ ├── TopoPatternBlack.png │ │ │ │ └── TopoPatternWhite.png │ │ │ ├── endorsed-logo │ │ │ │ └── asu_universitytechoffice_horiz_white.png │ │ │ ├── favicon │ │ │ │ ├── apple-touch-icon-114x114.png │ │ │ │ ├── apple-touch-icon-120x120.png │ │ │ │ ├── apple-touch-icon-144x144.png │ │ │ │ ├── apple-touch-icon-152x152.png │ │ │ │ ├── apple-touch-icon-57x57.png │ │ │ │ ├── apple-touch-icon-60x60.png │ │ │ │ ├── apple-touch-icon-72x72.png │ │ │ │ ├── apple-touch-icon-76x76.png │ │ │ │ ├── favicon-128.png │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-196x196.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ ├── favicon-96x96.png │ │ │ │ ├── favicon.ico │ │ │ │ ├── mstile-144x144.png │ │ │ │ ├── mstile-150x150.png │ │ │ │ ├── mstile-310x150.png │ │ │ │ ├── mstile-310x310.png │ │ │ │ └── mstile-70x70.png │ │ │ ├── font-awesome-svg │ │ │ │ ├── search-gray-5.svg │ │ │ │ └── search-gray-6.svg │ │ │ ├── innovation-badge │ │ │ │ ├── on-dark │ │ │ │ │ ├── asu-2020-innovation--badge-horizontal--on-dark.png │ │ │ │ │ ├── asu-2020-innovation--badge-only--on-dark.png │ │ │ │ │ ├── asu-2020-innovation--badge-vertical--on-dark.png │ │ │ │ │ ├── asu-2020-innovation--badge-wide--on-dark.png │ │ │ │ │ └── asu-2020-innovation--horizontal--on-dark.png │ │ │ │ ├── on-gold │ │ │ │ │ ├── asu-2020-innovation--badge-horizontal--on-gold.png │ │ │ │ │ ├── asu-2020-innovation--badge-only--on-gold.png │ │ │ │ │ ├── asu-2020-innovation--badge-vertical--on-gold.png │ │ │ │ │ ├── asu-2020-innovation--badge-wide--on-gold.png │ │ │ │ │ └── asu-2020-innovation--horizontal--on-gold.png │ │ │ │ └── on-white │ │ │ │ │ ├── asu-2020-innovation--badge-horizontal--on-white.png │ │ │ │ │ ├── asu-2020-innovation--badge-only--on-white.png │ │ │ │ │ ├── asu-2020-innovation--badge-vertical--on-white.png │ │ │ │ │ ├── asu-2020-innovation--badge-wide--on-white.png │ │ │ │ │ └── asu-2020-innovation--horizontal--on-white.png │ │ │ └── innovation-lockup │ │ │ │ └── on-gold │ │ │ │ ├── 200420-GlobalFooter-No1InnovationLockup.png │ │ │ │ └── 200420-GlobalFooter-No1InnovationLockup@2x.png │ │ └── js │ │ │ ├── bootstrap.bundle.js │ │ │ ├── bootstrap.bundle.js.map │ │ │ ├── bootstrap.bundle.min.js │ │ │ ├── bootstrap.bundle.min.js.map │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.js.map │ │ │ ├── bootstrap.min.js │ │ │ └── bootstrap.min.js.map │ ├── divider.png │ ├── docs │ │ ├── AddonDocsExamples.stories.mdx │ │ └── getting-started │ │ │ ├── Intro.stories.mdx │ │ │ └── Quickstart.stories.mdx │ ├── gulpconfig.json │ ├── gulpfile.js │ ├── jest.config.js │ ├── package.json │ └── src │ │ └── js │ │ ├── README.md │ │ ├── global-header.js │ │ └── tabs.js ├── AccordionEffect-mini │ ├── index.html │ ├── script.js │ └── style.css ├── AccordionEffect │ ├── app.js │ ├── index.html │ └── style.css ├── BankistWeb │ └── startFile │ │ ├── img │ │ ├── card-lazy.jpg │ │ ├── card.jpg │ │ ├── digital-lazy.jpg │ │ ├── digital.jpg │ │ ├── grow-lazy.jpg │ │ ├── grow.jpg │ │ ├── hero.png │ │ ├── icon.png │ │ ├── icons.svg │ │ ├── img-1.jpg │ │ ├── img-2.jpg │ │ ├── img-3.jpg │ │ ├── img-4.jpg │ │ ├── logo.png │ │ ├── user-1.jpg │ │ ├── user-2.jpg │ │ └── user-3.jpg │ │ ├── index.html │ │ ├── script.js │ │ └── style.css ├── Consuming Promises │ ├── demo.md │ ├── index.html │ ├── script.js │ └── style.css ├── Dropdown List │ ├── README.md │ ├── hiveCheckbox.css │ ├── hiveCheckbox.js │ ├── hiveCheckboxMobile.css │ └── index.html ├── DrumKit │ ├── index.html │ ├── preview.md │ ├── script.js │ ├── sounds │ │ ├── boom.wav │ │ ├── clap.wav │ │ ├── hihat.wav │ │ ├── kick.wav │ │ ├── openhat.wav │ │ ├── ride.wav │ │ ├── snare.wav │ │ ├── tink.wav │ │ └── tom.wav │ └── style.css ├── LCNote.md ├── Mini Clock │ ├── index.html │ ├── preview.md │ ├── script.js │ └── style.css ├── ModalBox │ ├── app.js │ ├── index.html │ └── style.css ├── NASA Psyche Mission - ASU - Psyche Web-Based Game │ ├── README.md │ ├── assets-src │ │ └── level-1.tmx │ ├── assets │ │ ├── hero │ │ │ ├── bonk.png │ │ │ ├── down.png │ │ │ ├── fall.png │ │ │ ├── idle.png │ │ │ ├── jump.png │ │ │ ├── pivot.png │ │ │ ├── push.png │ │ │ ├── run.png │ │ │ ├── spinjump.png │ │ │ ├── up.png │ │ │ ├── walk.png │ │ │ ├── wall_peek.png │ │ │ └── wall_slide.png │ │ ├── tilemaps │ │ │ └── level-1.json │ │ └── tilesets │ │ │ ├── clouds.png │ │ │ └── world-1.png │ ├── package-lock.json │ ├── package.json │ ├── preview.md │ ├── src │ │ ├── config.js │ │ ├── entities │ │ │ └── Hero.js │ │ ├── index.html │ │ ├── index.js │ │ └── scenes │ │ │ └── Game.js │ ├── typings │ │ └── phaser.d.ts │ └── webpack.config.js ├── Number converter │ ├── App.js │ └── README.md ├── Playing with Variables │ ├── index.html │ ├── preview.md │ ├── script.js │ └── style.css ├── Receive input │ ├── app.js │ └── preview.md ├── Unit 2 - Scope and Functions.md ├── Unit 3 – Function Coding Homework.md ├── Unit 3 – Function.md ├── Unit 4-oop │ └── homework.md ├── Unit 5 - Regex │ └── homework.md ├── Unit 6 - async-and-exception │ └── homework.md └── Unit 7 - Node.js │ └── homework.md ├── README.md ├── React-Day ├── 0001. Accordion Component with Single Panel Open │ ├── README.md │ ├── package.json │ └── src │ │ ├── Accordion.tsx │ │ ├── App.tsx │ │ ├── index.js │ │ └── styles.css ├── 0002. Accordion Component with All Panel Open │ ├── README.md │ ├── package.json │ └── src │ │ ├── Accordion.js │ │ ├── App.js │ │ ├── index.js │ │ └── styles.css ├── 0003. A Color Codes Game.md ├── Beginners │ ├── 1. Bin2Dec-version1 │ │ ├── README.md │ │ ├── package.json │ │ ├── public │ │ │ └── index.html │ │ └── src │ │ │ ├── App.js │ │ │ ├── index.js │ │ │ └── styles.css │ ├── 2. Bin2Dec-version2 │ │ ├── README.md │ │ ├── package.json │ │ ├── public │ │ │ └── index.html │ │ └── src │ │ │ ├── App.js │ │ │ ├── index.js │ │ │ └── styles.css │ ├── 3. Expandable List │ │ ├── README.md │ │ ├── package.json │ │ ├── public │ │ │ └── index.html │ │ └── src │ │ │ ├── App.js │ │ │ ├── activities.json │ │ │ ├── components │ │ │ └── Activity.jsx │ │ │ ├── index.js │ │ │ └── styles.css │ ├── 4. Color Picker │ │ ├── README.md │ │ ├── package.json │ │ ├── public │ │ │ └── index.html │ │ └── src │ │ │ ├── App.js │ │ │ ├── index.js │ │ │ └── styles.css │ └── 5. Use the context hook to display online users │ │ ├── README.md │ │ ├── package.json │ │ ├── public │ │ └── index.html │ │ └── src │ │ ├── App.js │ │ ├── components │ │ └── UserList.jsx │ │ ├── contexts │ │ └── UsersContext.jsx │ │ ├── index.js │ │ └── styles.css └── Intermediate │ ├── 01. crud_table │ ├── README.md │ ├── package.json │ ├── public │ │ └── index.html │ └── src │ │ ├── App.js │ │ ├── components │ │ ├── EditableRow.jsx │ │ └── ReadOnlyRows.jsx │ │ ├── data.json │ │ ├── index.js │ │ └── styles.css │ ├── 02. crud_todo │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── public │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── robots.txt │ └── src │ │ ├── App.css │ │ ├── App.js │ │ ├── components │ │ ├── addTodo.js │ │ ├── filter.js │ │ ├── todo.js │ │ └── todolist.js │ │ ├── index.css │ │ └── index.js │ └── 03. Display a to-do list with togglable subtasks │ ├── README.md │ ├── package.json │ ├── public │ └── index.html │ └── src │ ├── App.js │ ├── components │ ├── CheckList.jsx │ └── DisplaySubtasks.jsx │ ├── index.js │ └── styles.css ├── TS-Day └── Tutorial │ └── Lesson 1 - Variables and Types.md └── Web-Note ├── BFC - Block Formatting Contexts.md ├── Bubbling and Capturing.md ├── Closures.md ├── Controlled Components ├── Expenses.js └── ExpensesFilter.js ├── Execution Context.md ├── Functions & Callbacks.md ├── Promises.md ├── Sorting Algorithms.md ├── Throttling and Debouncing.md └── `this` keyword.md /BFE.dev/0001.implement curry().md: -------------------------------------------------------------------------------- 1 | Screenshot 2023-10-01 at 1 26 45 AM 2 | 3 | 4 | ```js 5 | function curry(func) { 6 | return function curried(...args) { 7 | if (args.length >= func.length) { 8 | return func.apply(this, args); 9 | } 10 | 11 | return curried.bind(this, ...args); 12 | }; 13 | } 14 | 15 | const join = (a, b, c) => { 16 | return `${a}_${b}_${c}`; 17 | }; 18 | 19 | const curriedJoin = curry(join); 20 | 21 | console.log(curriedJoin(1, 2, 3)); // '1_2_3' 22 | console.log(curriedJoin(1)(2, 3)); // '1_2_3' 23 | console.log(curriedJoin(1, 2)(3)); // '1_2_3' 24 | 25 | ``` 26 | -------------------------------------------------------------------------------- /CSS-Day/0001. Five Pointed Star/Five Pointed Star/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react", 3 | "version": "1.0.0", 4 | "description": "React example starter project", 5 | "keywords": ["react", "starter"], 6 | "main": "src/index.js", 7 | "dependencies": { 8 | "react": "18.2.0", 9 | "react-dom": "18.2.0", 10 | "react-scripts": "4.0.0" 11 | }, 12 | "devDependencies": { 13 | "@babel/runtime": "7.13.8", 14 | "typescript": "4.1.3" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test --env=jsdom", 20 | "eject": "react-scripts eject" 21 | }, 22 | "browserslist": [">0.2%", "not dead", "not ie <= 11", "not op_mini all"] 23 | } 24 | -------------------------------------------------------------------------------- /CSS-Day/0001. Five Pointed Star/Five Pointed Star/src/App.js: -------------------------------------------------------------------------------- 1 | import "./styles.css"; 2 | 3 | export default function App() { 4 | return ( 5 |
6 |
7 |
8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /CSS-Day/0001. Five Pointed Star/Five Pointed Star/src/index.js: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | 4 | import App from "./App"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | const root = createRoot(rootElement); 8 | 9 | root.render( 10 | 11 | 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /CSS-Day/0001. Five Pointed Star/README.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-01-15 at 11 01 46 PM 2 | -------------------------------------------------------------------------------- /Interview/CSS interview.md: -------------------------------------------------------------------------------- 1 | ## 1. What's the difference between display none and visibility hidden? 2 | - display:none removes the element from the normal flow of the page, allowing other elements to fill in. 3 | - visibility:hidden leaves the element in the normal flow of the page such that is still occupies space. 4 | 5 | ## 2. What's the difference between inline, inline-block, block 6 | - inline The element doesn’t start on a new line and only occupy just the width it requires. You can’t set the width or height. 7 | - inline-block It’s formatted just like the inline element, where it doesn’t start on a new line. BUT, you can set width and height values. 8 | - block The element will start on a new line and occupy the full width available. And you can set width and height values. 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /JS-Algo/0007. Reverse Integer.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-31 at 11 46 27 2 | 3 | 4 | ```js 5 | /** 6 | * @param {number} x 7 | * @return {number} 8 | */ 9 | var reverse = function(x) { 10 | let num = Math.abs(x).toString().split("").reverse().join(""); 11 | 12 | if(num > Math.pow(2, 31) - 1) return 0; 13 | 14 | return x > 0 ? num : -num; 15 | }; 16 | ``` 17 | -------------------------------------------------------------------------------- /JS-Algo/0009. Palindrome Number.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-31 at 13 05 38 2 | 3 | 4 | **In javascript, checking if a number/string is a palindrome is easy, however...** 5 | **Follow up: Could you solve it without converting the integer to a string?** 6 | 7 | 8 | ```js 9 | /** 10 | * @param {number} x 11 | * @return {boolean} 12 | */ 13 | var isPalindrome = function(x) { 14 | if(x < 0) return false; 15 | let num = x; 16 | let res = 0; 17 | 18 | while(num) { 19 | let last = num % 10; 20 | // take res as of type "string", but it's still a type of number 21 | res = res * 10 + last; 22 | num = Math.floor(num / 10); 23 | } 24 | return x === res 25 | }; 26 | ``` 27 | -------------------------------------------------------------------------------- /JS-Algo/0014. Longest Common Prefix.md: -------------------------------------------------------------------------------- 1 | Write a function to find the longest common prefix string amongst an array of strings. 2 | 3 | If there is no common prefix, return an empty string "". 4 | 5 | 6 | Screen Shot 2021-09-24 at 9 02 44 PM 7 | 8 | 9 | ```JS 10 | /** 11 | * @param {string[]} strs 12 | * @return {string} 13 | */ 14 | var longestCommonPrefix = function(strs) { 15 | for(let i = 0; i < strs[0].length; i++) { 16 | for(let str of strs) { 17 | if(str[i] !== strs[0][i]) return str.slice(0, i); 18 | } 19 | } 20 | return strs[0]; 21 | }; 22 | ``` 23 | -------------------------------------------------------------------------------- /JS-Algo/0019. Remove Nth Node From End of List.md: -------------------------------------------------------------------------------- 1 | Given the **head** of a linked list, remove the **nth** node from the end of the list and return its head. 2 | 3 | Screen Shot 2021-09-13 at 11 21 48 PM 4 | 5 | Screen Shot 2021-09-13 at 11 45 22 PM 6 | 7 | 8 | ```Javascript 9 | var removeNthFromEnd = function(head, n) { 10 | let fast = head, slow = head; 11 | for(let i = 0; i < n; i++) { 12 | fast = fast.next; 13 | } 14 | if(!fast) return head.next; 15 | while(fast.next) { 16 | slow = slow.next; 17 | fast = fast.next; 18 | } 19 | slow.next = slow.next.next; 20 | return head; 21 | }; 22 | ``` 23 | -------------------------------------------------------------------------------- /JS-Algo/0020. Valid Parentheses.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ```JS 5 | /** 6 | * @param {string} s 7 | * @return {boolean} 8 | */ 9 | var isValid = function(s) { 10 | const stack = []; 11 | 12 | for (let i = 0 ; i < s.length ; i++) { 13 | let c = s.charAt(i); 14 | switch(c) { 15 | case '(': stack.push(')'); 16 | break; 17 | case '[': stack.push(']'); 18 | break; 19 | case '{': stack.push('}'); 20 | break; 21 | default: 22 | if (c !== stack.pop()) { 23 | return false; 24 | } 25 | } 26 | } 27 | 28 | return stack.length === 0; 29 | }; 30 | ``` 31 | -------------------------------------------------------------------------------- /JS-Algo/0024. Swap Nodes in Pairs.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-09-05 at 15 38 21 2 | 3 | 4 | ```js 5 | /** 6 | * Definition for singly-linked list. 7 | * function ListNode(val, next) { 8 | * this.val = (val===undefined ? 0 : val) 9 | * this.next = (next===undefined ? null : next) 10 | * } 11 | */ 12 | /** 13 | * @param {ListNode} head 14 | * @return {ListNode} 15 | */ 16 | var swapPairs = function(head) { 17 | if(!head || !head.next) return head; 18 | let n1 = head, n2 = head.next, n3 = head.next.next; 19 | n2.next = n1; 20 | n1.next = swapPairs(n3); 21 | 22 | // n2 becomes the new "head" after swap 23 | return n2 24 | }; 25 | ``` 26 | -------------------------------------------------------------------------------- /JS-Algo/0026. Remove Duplicates from Sorted Array.md: -------------------------------------------------------------------------------- 1 | # Array 2 | Screen Shot 2022-09-05 at 17 51 45 3 | 4 | 5 | ```js 6 | /** 7 | * @param {number[]} nums 8 | * @return {number} 9 | */ 10 | var removeDuplicates = function(nums) { 11 | let i = 0; 12 | for(let j = 1; j < nums.length; j++) { 13 | if(nums[i] !== nums[j]) { 14 | i++; 15 | nums[i] = nums[j]; 16 | } 17 | } 18 | return i + 1 19 | }; 20 | ``` 21 | -------------------------------------------------------------------------------- /JS-Algo/0027. Remove Element.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-09-05 at 18 10 40 2 | Screen Shot 2022-09-05 at 18 10 50 3 | 4 | 5 | ```js 6 | /** 7 | * @param {number[]} nums 8 | * @param {number} val 9 | * @return {number} 10 | */ 11 | var removeElement = function(nums, val) { 12 | let i = 0; 13 | for(let j = 0; j < nums.length; j++) { 14 | if(nums[j] !== val) { 15 | nums[i] = nums[j]; 16 | i++; 17 | } 18 | } 19 | return i; 20 | }; 21 | ``` 22 | -------------------------------------------------------------------------------- /JS-Algo/0035. Search Insert Position.md: -------------------------------------------------------------------------------- 1 | # Binary Search 2 | 3 | 4 | Screen Shot 2022-09-07 at 22 25 56 5 | 6 | 7 | 8 | ```js 9 | /** 10 | * @param {number[]} nums 11 | * @param {number} target 12 | * @return {number} 13 | */ 14 | var searchInsert = function(nums, target) { 15 | let start = 0, end = nums.length - 1; 16 | while(start <= end) { 17 | let mid = Math.floor((start + end) / 2); 18 | if(nums[mid] === target) { 19 | return mid; 20 | } 21 | if(nums[mid] < target) { 22 | start = mid + 1 23 | } else { 24 | end = mid - 1; 25 | } 26 | } 27 | return start 28 | }; 29 | ``` 30 | -------------------------------------------------------------------------------- /JS-Algo/0038. Count and Say.md: -------------------------------------------------------------------------------- 1 | ![Screen Shot 2022-09-10 at 19 09 39](https://user-images.githubusercontent.com/37787994/189508842-a3f83f7e-9105-48a5-aa5c-7c1d38bc947b.png) 2 | ![Screen Shot 2022-09-10 at 19 10 26](https://user-images.githubusercontent.com/37787994/189508866-331ce894-046d-4a84-81dc-e629e961c7f1.png) 3 | 4 | 5 | ```js 6 | /** 7 | * @param {number} n 8 | * @return {string} 9 | */ 10 | var countAndSay = function(n) { 11 | let str = "1"; 12 | for(let i = 1; i < n; i++) { 13 | let strArr = str.split(""); 14 | str = ""; 15 | let count = 1; 16 | 17 | for(let j = 0; j < strArr.length; j++) { 18 | if(strArr[j] !== strArr[j + 1]) { 19 | str += count + strArr[j]; 20 | count = 1 21 | } else { 22 | count++; 23 | } 24 | } 25 | } 26 | return str 27 | }; 28 | ``` 29 | -------------------------------------------------------------------------------- /JS-Algo/0042. Trapping Rain Water.md: -------------------------------------------------------------------------------- 1 | 2 | ### Given *n* non-negative integers representing an elevation map where the width of each bar is *1*, compute how much water it can trap after raining. 3 | 4 | Screen Shot 2021-09-16 at 11 57 41 PM 5 | 6 | 7 | ```Javascript 8 | /** 9 | * @param {number[]} height 10 | * @return {number} 11 | */ 12 | var trap = function(height) { 13 | let lmax = 0, rmax = 0, l = 0, r = height.length - 1; 14 | let res = 0; 15 | 16 | while(l < r) { 17 | lmax = Math.max(lmax, height[l]); 18 | if(height[l] < lmax) { 19 | res += lmax - height[l]; 20 | } 21 | 22 | rmax = Math.max(rmax, height[r]); 23 | if(height[r] < rmax) { 24 | res += rmax - height[r]; 25 | } 26 | 27 | height[l] < height[r] ? l++ : r--; 28 | } 29 | return res; 30 | }; 31 | ``` 32 | -------------------------------------------------------------------------------- /JS-Algo/0043. Multiply Strings.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-09-15 at 20 33 32 2 | 3 | 4 | 5 | 6 | ```js 7 | /** 8 | * @param {string} num1 9 | * @param {string} num2 10 | * @return {string} 11 | */ 12 | var multiply = function(num1, num2) { 13 | if(num1 === "0" || num2 === "0") return "0"; 14 | let m = num1.length, n = num2.length, res = new Array(m + n).fill(0); 15 | 16 | for(let i = m - 1; i >= 0; i--) { 17 | for(let j = n - 1; j >= 0; j--) { 18 | let p1 = i + j, p2 = i + j + 1; 19 | let sum = res[p2] + +num1[i] * +num2[j]; 20 | res[p2] = sum % 10; 21 | res[p1] += Math.floor(sum / 10); 22 | } 23 | } 24 | if(res[0] === 0) res.shift(); 25 | return res.join(""); 26 | }; 27 | ``` 28 | -------------------------------------------------------------------------------- /JS-Algo/0048. Rotate Image.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-22 at 23 23 13 2 | 3 | 4 | ```js 5 | var rotate = function(matrix) { 6 | for(let i=0;i 3 | 4 | 5 | 6 | 7 | 8 | ```js 9 | // T.C. O(logn) 10 | /** 11 | * @param {number} x 12 | * @param {number} n 13 | * @return {number} 14 | */ 15 | var myPow = function(x, n) { 16 | if(n === 0) return 1; 17 | let pow = Math.abs(n); 18 | let res = pow % 2 === 0 ? myPow(x*x, pow / 2) : myPow(x*x, (pow - 1) / 2) * x; 19 | return n < 0 ? 1/res : res; 20 | }; 21 | 22 | /* 23 | x = 2, n = 10 24 | 10 % 2 === 0 => myPow(4, 5) 25 | 26 | x = 4, n = 5 27 | 5 % 2 !== 0 => myPow(16, (5 - 1) / 2 * 4) => myPow(16, 8) 28 | 29 | x = 16, n = 8 30 | 8 % 2 === 0 => myPow(256, 4) 31 | 32 | x = 256, n = 4 33 | 4 % 2 === 0 => myPow() 34 | */ 35 | ``` 36 | -------------------------------------------------------------------------------- /JS-Algo/0055. Jump Game.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-10-09 at 12 22 14 AM 2 | 3 | ```js 4 | /** 5 | * @param {number[]} nums 6 | * @return {boolean} 7 | */ 8 | var canJump = function(nums) { 9 | let furthest = 0; 10 | let currentJumpEnd = 0; 11 | 12 | for(let i = 0; i < nums.length - 1; i++) { 13 | furthest = Math.max(furthest, i + nums[i]); 14 | if(i === currentJumpEnd) { 15 | currentJumpEnd = furthest 16 | } 17 | } 18 | return currentJumpEnd >= nums.length - 1 19 | }; 20 | `` 21 | -------------------------------------------------------------------------------- /JS-Algo/0056. Merge Intervals.md: -------------------------------------------------------------------------------- 1 | 2 | Screen Shot 2022-07-15 at 00 39 17 3 | 4 | 5 | ```js 6 | /** 7 | * @param {number[][]} intervals 8 | * @return {number[][]} 9 | */ 10 | var merge = function(intervals) { 11 | intervals.sort((a, b) => a[0] - b[0]); 12 | let res = []; 13 | let start = intervals[0][0]; 14 | let end = intervals[0][1]; 15 | for(let i = 1; i < intervals.length; i++) { 16 | if(intervals[i][0] <= end) { 17 | end = Math.max(end, intervals[i][1]); 18 | } else { 19 | res.push([start, end]); 20 | start = intervals[i][0]; 21 | end = intervals[i][1]; 22 | } 23 | } 24 | res.push([start, end]); 25 | return res; 26 | }; 27 | ``` 28 | -------------------------------------------------------------------------------- /JS-Algo/0057. Insert Interval.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-10-09 at 11 58 44 PM 2 | 3 | 4 | 5 | 6 | ```js 7 | /** 8 | * @param {number[][]} intervals 9 | * @param {number[]} newInterval 10 | * @return {number[][]} 11 | */ 12 | var insert = function(intervals, newInterval) { 13 | intervals.push(newInterval); 14 | intervals.sort((a, b) => a[0] - b[0]); 15 | let start = intervals[0][0]; 16 | let end = intervals[0][1]; 17 | let res = []; 18 | 19 | for(let i = 1; i < intervals.length; i++) { 20 | if(end >= intervals[i][0]) { 21 | end = Math.max(end, intervals[i][1]); 22 | } else { 23 | res.push([start, end]); 24 | start = intervals[i][0]; 25 | end = intervals[i][1]; 26 | } 27 | } 28 | res.push([start, end]); 29 | return res; 30 | }; 31 | ``` 32 | -------------------------------------------------------------------------------- /JS-Algo/0058. Length of Last Word.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-10-10 at 11 56 28 PM 2 | 3 | 4 | ```js 5 | /** 6 | * @param {string} s 7 | * @return {number} 8 | */ 9 | var lengthOfLastWord = function(s) { 10 | const arr = s.trim().split(' '); 11 | return arr[arr.length - 1].length; 12 | }; 13 | ``` 14 | -------------------------------------------------------------------------------- /JS-Algo/0062. Unique Paths.md: -------------------------------------------------------------------------------- 1 | 2 | Screen Shot 2022-10-29 at 12 36 41 AM 3 | 4 | 5 | ```js 6 | /** 7 | * @param {number} m 8 | * @param {number} n 9 | * @return {number} 10 | */ 11 | var uniquePaths = function(m, n) { 12 | let dp = new Array(n + 1).fill(1); 13 | for(let row = m - 1; row > 0; row--) { 14 | for(let col = n - 1; col > 0; col--) { 15 | // dp[col] is the sum of previous two steps 16 | dp[col] = dp[col] + dp[col + 1]; 17 | } 18 | } 19 | return Math.max(...dp); 20 | }; 21 | ``` 22 | -------------------------------------------------------------------------------- /JS-Algo/0066. Plus One.md: -------------------------------------------------------------------------------- 1 | # Array 2 | 3 | Screen Shot 2022-12-03 at 11 29 43 PM 4 | 5 | ```js 6 | /** 7 | * @param {number[]} digits 8 | * @return {number[]} 9 | */ 10 | var plusOne = function(digits) { 11 | for(let i = digits.length - 1; i >= 0; i--) { 12 | digits[i]++; 13 | if(digits[i] > 9) { 14 | digits[i] = 0; 15 | } else { 16 | return digits; 17 | } 18 | } 19 | digits.unshift(1); 20 | return digits; 21 | }; 22 | ``` 23 | -------------------------------------------------------------------------------- /JS-Algo/0088. Merge Sorted Array.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-02-25 at 11 12 49 AM 2 | 3 | ## Two Pointers 4 | 5 | ```js 6 | /** 7 | * @param {number[]} nums1 8 | * @param {number} m 9 | * @param {number[]} nums2 10 | * @param {number} n 11 | * @return {void} Do not return anything, modify nums1 in-place instead. 12 | */ 13 | var merge = function(nums1, m, nums2, n) { 14 | for(let i = 0; i < n; i++) { 15 | nums1[i + m] = nums2[i]; 16 | } 17 | nusm1 = nums1.sort((a, b) => a - b); 18 | }; 19 | ``` 20 | -------------------------------------------------------------------------------- /JS-Algo/0108. Convert Sorted Array to Binary Search Tree.md: -------------------------------------------------------------------------------- 1 | # BST 2 | 3 | Screen Shot 2022-12-17 at 9 15 28 PM 4 | 5 | ```js 6 | /** 7 | * Definition for a binary tree node. 8 | * function TreeNode(val, left, right) { 9 | * this.val = (val===undefined ? 0 : val) 10 | * this.left = (left===undefined ? null : left) 11 | * this.right = (right===undefined ? null : right) 12 | * } 13 | */ 14 | /** 15 | * @param {number[]} nums 16 | * @return {TreeNode} 17 | */ 18 | var sortedArrayToBST = function(nums) { 19 | if(!nums.length) return null; 20 | 21 | let mid = Math.floor(nums.length / 2); 22 | let root = new TreeNode(nums[mid]); 23 | 24 | root.left = sortedArrayToBST(nums.slice(0, mid)); 25 | root.right = sortedArrayToBST(nums.slice(mid + 1)); 26 | 27 | return root; 28 | }; 29 | ``` 30 | -------------------------------------------------------------------------------- /JS-Algo/0118. Pascal's Triangle.md: -------------------------------------------------------------------------------- 1 | # Array 2 | Screen Shot 2022-12-18 at 4 21 59 PM 3 | 4 | 5 | ```js 6 | /** 7 | * @param {number} numRows 8 | * @return {number[][]} 9 | */ 10 | var generate = function(numRows) { 11 | let stack = []; 12 | for(let i = 0; i < numRows; i++) { 13 | stack[i] = []; 14 | stack[i][0] = 1; 15 | for(let j = 1; j < i; j++) { 16 | stack[i][j] = stack[i - 1][j - 1] + stack[i - 1][j]; 17 | } 18 | stack[i][i] = 1; 19 | } 20 | return stack; 21 | }; 22 | ``` 23 | -------------------------------------------------------------------------------- /JS-Algo/0119. Pascal's Triangle II.md: -------------------------------------------------------------------------------- 1 | # Array 2 | 3 | Screen Shot 2022-12-26 at 1 35 22 AM 4 | 5 | 6 | ```js 7 | /** 8 | * @param {number} rowIndex 9 | * @return {number[]} 10 | */ 11 | var getRow = function(rowIndex) { 12 | let stack = []; 13 | for(let i = 0; i <= rowIndex; i++) { 14 | stack[i] = []; 15 | stack[i][0] = 1; 16 | for(let j = 1; j < i; j++) { 17 | stack[i][j] = stack[i - 1][j - 1] + stack[i - 1][j]; 18 | } 19 | stack[i][i] = 1; 20 | } 21 | return stack[rowIndex]; 22 | }; 23 | ``` 24 | -------------------------------------------------------------------------------- /JS-Algo/0121. Best Time to Buy and Sell Stock.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-12-18 at 4 37 42 PM 2 | 3 | 4 | ```js 5 | /** 6 | * @param {number[]} prices 7 | * @return {number} 8 | */ 9 | var maxProfit = function(prices) { 10 | let max = -Infinity; 11 | let min = Infinity; 12 | 13 | for(let i = 0; i < prices.length; i++) { 14 | min = Math.min(prices[i], min); 15 | // max represents max profit 16 | max = Math.max(max, prices[i] - min); 17 | } 18 | return max; 19 | }; 20 | ``` 21 | -------------------------------------------------------------------------------- /JS-Algo/0122. Best Time to Buy and Sell Stock II.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-06-03 at 2 27 27 AM 2 | 3 | 4 | 5 | ```js 6 | /** 7 | * @param {number[]} prices 8 | * @return {number} 9 | */ 10 | var maxProfit = function(prices) { 11 | let profit = 0; 12 | for(let i = 0; i < prices.length - 1; i++) { 13 | if(prices[i + 1] > prices[i]) { 14 | profit += prices[i + 1] - prices[i]; 15 | } 16 | } 17 | return profit; 18 | }; 19 | ``` 20 | -------------------------------------------------------------------------------- /JS-Algo/0125. Valid Palindrome.md: -------------------------------------------------------------------------------- 1 | # Two Pointer 2 | Screen Shot 2023-02-20 at 11 16 38 AM 3 | 4 | 5 | ```js 6 | /** 7 | * @param {string} s 8 | * @return {boolean} 9 | */ 10 | var isPalindrome = function(s) { 11 | let str = s.replace(/[^0-9a-z]/gi, '').toLowerCase(); 12 | let left = 0, right = str.length - 1; 13 | while(left < right) { 14 | if(str[left] !== str[right]) return false; 15 | left++; 16 | right--; 17 | } 18 | return true; 19 | }; 20 | ``` 21 | -------------------------------------------------------------------------------- /JS-Algo/0128. Longest Consecutive Sequence.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-24 at 15 39 29 2 | 3 | 4 | ```js 5 | /** 6 | * @param {number[]} nums 7 | * @return {number} 8 | */ 9 | var longestConsecutive = function(nums) { 10 | let set = new Set(nums); 11 | let longest = 0; 12 | for(let num of set) { 13 | if(set.has(num - 1)) continue; 14 | let count = 1; 15 | 16 | while(set.has(num + 1)) { 17 | num++; 18 | count++; 19 | } 20 | longest = Math.max(count, longest); 21 | } 22 | return longest 23 | }; 24 | ``` 25 | -------------------------------------------------------------------------------- /JS-Algo/0136. Single Number.md: -------------------------------------------------------------------------------- 1 | # Array 2 | Screen Shot 2022-12-19 at 6 32 56 PM 3 | 4 | ```js 5 | var singleNumber = function (nums) { 6 | let map = new Map(); 7 | for (let i = 0; i < nums.length; i++) { 8 | if (map.has(nums[i])) { 9 | map.set(nums[i], map.get(nums[i]) + 1); 10 | } else { 11 | map.set(nums[i], 1); 12 | } 13 | } 14 | 15 | for (let [key, value] of map) { 16 | if (value === 1) { 17 | return key; 18 | } 19 | } 20 | }; 21 | ``` 22 | -------------------------------------------------------------------------------- /JS-Algo/0163. Missing Ranges.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-12-26 at 11 16 46 PM 2 | 3 | 4 | 5 | ```js 6 | /** 7 | * @param {number[]} nums 8 | * @param {number} lower 9 | * @param {number} upper 10 | * @return {string[]} 11 | */ 12 | var findMissingRanges = function(nums, lower, upper) { 13 | let stack = []; 14 | nums = [lower - 1, ...nums, upper + 1]; 15 | for(let i = 1; i < nums.length; i++) { 16 | let diff = nums[i] - nums[i - 1]; 17 | if(diff === 2) { 18 | stack.push(`${nums[i - 1] + 1}`); 19 | } else if(diff > 2) { 20 | stack.push(`${nums[i - 1] + 1}->${nums[i] - 1}`); 21 | } 22 | } 23 | return stack; 24 | }; 25 | ``` 26 | -------------------------------------------------------------------------------- /JS-Algo/0189. Rotate Array.md: -------------------------------------------------------------------------------- 1 | Screenshot 2024-03-27 at 11 55 18 PM 2 | 3 | 4 | ```js 5 | /** 6 | * @param {number[]} nums 7 | * @param {number} k 8 | * @return {void} Do not return anything, modify nums in-place instead. 9 | */ 10 | var rotate = function(nums, k) { 11 | function swap(i, j) { 12 | while(i < j) { 13 | [nums[i], nums[j]] = [nums[j], nums[i]]; 14 | i++; 15 | j--; 16 | } 17 | } 18 | 19 | k %= nums.length; 20 | // 7 6 5 4 3 2 1 21 | swap(0, nums.length - 1); 22 | // 5 6 7 4 3 2 1 23 | swap(0, k - 1); 24 | // 5 6 7 1 2 3 4 25 | swap(k, nums.length - 1); 26 | }; 27 | ``` 28 | -------------------------------------------------------------------------------- /JS-Algo/0203. Remove Linked List Elements.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-03-05 at 8 00 38 PM 2 | 3 | # LinkedList 4 | 5 | ```js 6 | /** 7 | * Definition for singly-linked list. 8 | * function ListNode(val, next) { 9 | * this.val = (val===undefined ? 0 : val) 10 | * this.next = (next===undefined ? null : next) 11 | * } 12 | */ 13 | /** 14 | * @param {ListNode} head 15 | * @param {number} val 16 | * @return {ListNode} 17 | */ 18 | var removeElements = function(head, val) { 19 | let dummyHead = new ListNode(0); 20 | let curr = dummyHead; 21 | curr.next = head; 22 | 23 | while(curr.next) { 24 | if(curr.next.val === val) { 25 | curr.next = curr.next.next; 26 | } else { 27 | curr = curr.next; 28 | } 29 | } 30 | return dummyHead.next; 31 | }; 32 | ``` 33 | -------------------------------------------------------------------------------- /JS-Algo/0206. Reverse Linked List.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-30 at 15 42 35 2 | 3 | 4 | Time complexity : O(n). Assume that nn is the list's length, the time complexity is O(n)O(n). 5 | 6 | Space complexity : O(1). 7 | ```js 8 | /** 9 | * Definition for singly-linked list. 10 | * function ListNode(val, next) { 11 | * this.val = (val===undefined ? 0 : val) 12 | * this.next = (next===undefined ? null : next) 13 | * } 14 | */ 15 | /** 16 | * @param {ListNode} head 17 | * @return {ListNode} 18 | */ 19 | var reverseList = function(head) { 20 | let [prev, current] = [null, head]; 21 | while(current) { 22 | [current.next, prev, current] = [prev, current, current.next]; 23 | } 24 | return prev; 25 | }; 26 | ``` 27 | -------------------------------------------------------------------------------- /JS-Algo/0228. Summary Ranges.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Screen Shot 2023-01-03 at 10 45 31 PM 4 | 5 | 6 | ```js 7 | /** 8 | * @param {number[]} nums 9 | * @return {string[]} 10 | */ 11 | var summaryRanges = function(nums) { 12 | let stack = []; 13 | let i = 0; 14 | for(let j = 0; j < nums.length; j++) { 15 | if(nums[j] === nums[j + 1] - 1) { 16 | continue; 17 | } else { 18 | if(i === j) { 19 | stack.push(`${nums[i]}`); 20 | } else { 21 | stack.push(`${nums[i]}->${nums[j]}`); 22 | } 23 | i = j + 1; 24 | } 25 | } 26 | return stack; 27 | }; 28 | ``` 29 | -------------------------------------------------------------------------------- /JS-Algo/0242. Valid Anagram.md: -------------------------------------------------------------------------------- 1 | # String 2 | 3 | 4 | 5 | Screen Shot 2023-02-04 at 5 05 34 PM 6 | 7 | 8 | ## Map 9 | T.C O(n) 10 | S.C O(1) 11 | ```js 12 | /** 13 | * @param {string} s 14 | * @param {string} t 15 | * @return {boolean} 16 | */ 17 | var isAnagram = function(s, t) { 18 | let map = new Map(); 19 | for(let i = 0; i < s.length; i++) { 20 | if(map.has(s[i])) { 21 | map.set(s[i], map.get(s[i]) + 1); 22 | } else { 23 | map.set(s[i], 1); 24 | } 25 | } 26 | 27 | for(let j = 0; j < t.length; j++) { 28 | if(map.has(t[j])) { 29 | map.set(t[j], map.get(t[j]) - 1); 30 | } else { 31 | map.set(t[j], 1); 32 | } 33 | } 34 | 35 | for(let [key, value] of map) { 36 | if(value > 0) { 37 | return false; 38 | } 39 | } 40 | 41 | return true; 42 | }; 43 | ``` 44 | -------------------------------------------------------------------------------- /JS-Algo/0243. Shortest Word Distance.md: -------------------------------------------------------------------------------- 1 | # Array 2 | Screen Shot 2023-01-04 at 12 39 50 AM 3 | 4 | ## One pass 5 | 6 | ```js 7 | /** 8 | * @param {string[]} wordsDict 9 | * @param {string} word1 10 | * @param {string} word2 11 | * @return {number} 12 | */ 13 | var shortestDistance = function(wordsDict, word1, word2) { 14 | let ptr = 0; 15 | let i = -1; 16 | let j = -1; 17 | let distance = Infinity; 18 | 19 | while(ptr < wordsDict.length) { 20 | if(wordsDict[ptr] === word1) { 21 | i = ptr; 22 | } else if(wordsDict[ptr] === word2) { 23 | j = ptr; 24 | } 25 | 26 | if(i >= 0 && j >= 0) { 27 | distance = Math.min(distance, Math.abs(i - j)); 28 | } 29 | ptr++; 30 | } 31 | return distance; 32 | }; 33 | ``` 34 | -------------------------------------------------------------------------------- /JS-Algo/0252. Meeting Rooms.md: -------------------------------------------------------------------------------- 1 | # Array 2 | 3 | Screen Shot 2023-01-05 at 12 00 14 AM 4 | 5 | 6 | T.C. O(nlogn) 7 | ```js 8 | /** 9 | * @param {number[][]} intervals 10 | * @return {boolean} 11 | */ 12 | var canAttendMeetings = function(intervals) { 13 | let sorted = intervals.sort((a, b) => a[0] - b[0]); 14 | for(let i = 0; i < intervals.length - 1; i++) { 15 | if(sorted[i][1] > sorted[i + 1][0]) { 16 | return false; 17 | } 18 | } 19 | return true; 20 | }; 21 | ``` 22 | -------------------------------------------------------------------------------- /JS-Algo/0268. Missing Number.md: -------------------------------------------------------------------------------- 1 | # Array 2 | Screen Shot 2023-01-06 at 9 32 51 PM 3 | 4 | T.C. O(n) 5 | 6 | ```js 7 | /** 8 | * @param {number[]} nums 9 | * @return {number} 10 | */ 11 | var missingNumber = function(nums) { 12 | let res = new Array(nums.length + 1).fill(-1); 13 | 14 | for(let num of nums) { 15 | res[num] = num; 16 | } 17 | 18 | return res.indexOf(-1); 19 | }; 20 | ``` 21 | -------------------------------------------------------------------------------- /JS-Algo/0283. Move Zeroes.md: -------------------------------------------------------------------------------- 1 | 2 | Screen Shot 2022-08-30 at 11 45 34 3 | 4 | 5 | **Two Pointers** T.C: O(n) S.C: O(1) 6 | 7 | ```js 8 | /** 9 | * @param {number[]} nums 10 | * @return {void} Do not return anything, modify nums in-place instead. 11 | */ 12 | var moveZeroes = function(nums) { 13 | // first ptr 14 | let ptr = 0; 15 | 16 | for(let i = 0; i < nums.length; i++) { 17 | if(nums[i] !== 0) { 18 | nums[ptr] = nums[i]; 19 | ptr++; 20 | } 21 | } 22 | 23 | for(let i = ptr; i < nums.length; i++) { 24 | nums[i] = 0; 25 | } 26 | return nums 27 | }; 28 | ``` 29 | -------------------------------------------------------------------------------- /JS-Algo/0344. Reverse String.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Screen Shot 2023-02-24 at 6 15 57 PM 4 | 5 | 6 | 7 | ```js 8 | /** 9 | * @param {character[]} s 10 | * @return {void} Do not return anything, modify s in-place instead. 11 | */ 12 | var reverseString = function(s) { 13 | let i = 0, j = s.length - 1; 14 | while(i < j) { 15 | [s[i], s[j]] = [s[j], s[i]]; 16 | i++; 17 | j--; 18 | } 19 | return s; 20 | }; 21 | ``` 22 | -------------------------------------------------------------------------------- /JS-Algo/0347. Top K Frequent Elements.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-09 at 12 56 49 2 | 3 | 4 | ```js 5 | /** 6 | * @param {number[]} nums 7 | * @param {number} k 8 | * @return {number[]} 9 | */ 10 | var topKFrequent = function(nums, k) { 11 | let map = new Map(); 12 | let stack = []; 13 | 14 | for(let num of nums) { 15 | if(map.has(num)) { 16 | map.set(num, map.get(num) + 1); 17 | } else { 18 | map.set(num, 1) 19 | } 20 | } 21 | 22 | let sortedMap = new Map([...map.entries()].sort((a, b) => b[1] - a[1])); 23 | 24 | for(let [key, value] of sortedMap) { 25 | stack.push(key); 26 | } 27 | 28 | return stack.slice(0, k); 29 | }; 30 | ``` 31 | -------------------------------------------------------------------------------- /JS-Algo/0350. Intersection of Two Arrays II.md: -------------------------------------------------------------------------------- 1 | # Array 2 | 3 | Screen Shot 2023-01-06 at 10 28 02 PM 4 | 5 | ## Hashmap 6 | ```js 7 | /** 8 | * @param {number[]} nums1 9 | * @param {number[]} nums2 10 | * @return {number[]} 11 | */ 12 | var intersect = function(nums1, nums2) { 13 | let map = new Map(); 14 | let stack = []; 15 | 16 | for(let i = 0; i < nums1.length; i++) { 17 | if(map.has(nums1[i])) { 18 | map.set(nums1[i], map.get(nums1[i]) + 1); 19 | } else { 20 | map.set(nums1[i], 1); 21 | } 22 | } 23 | 24 | for(let i = 0; i < nums2.length; i++) { 25 | if(map.has(nums2[i]) && map.get(nums2[i]) > 0) { 26 | stack.push(nums2[i]); 27 | map.set(nums2[i], map.get(nums2[i]) - 1); 28 | } 29 | } 30 | return stack; 31 | }; 32 | ``` 33 | -------------------------------------------------------------------------------- /JS-Algo/0367. Valid Perfect Square.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-03-05 at 12 54 32 AM 2 | 3 | ```js 4 | /** 5 | * @param {number} num 6 | * @return {boolean} 7 | */ 8 | var isPerfectSquare = function(num) { 9 | let start = 1, end = num; 10 | while(start <= end) { 11 | let mid = Math.floor((start + end) / 2); 12 | if(mid * mid === num) { 13 | return true; 14 | } else if(mid * mid < num) { 15 | start = mid + 1; 16 | } else { 17 | end = mid - 1; 18 | } 19 | } 20 | return false; 21 | }; 22 | ``` 23 | -------------------------------------------------------------------------------- /JS-Algo/0374. Guess Number Higher or Lower.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-03-03 at 1 37 00 PM 2 | 3 | ```js 4 | /** 5 | * Forward declaration of guess API. 6 | * @param {number} num your guess 7 | * @return -1 if num is higher than the picked number 8 | * 1 if num is lower than the picked number 9 | * otherwise return 0 10 | * var guess = function(num) {} 11 | */ 12 | 13 | /** 14 | * @param {number} n 15 | * @return {number} 16 | */ 17 | var guessNumber = function(n) { 18 | let start = 1, end = n; 19 | while(true) { 20 | let mid = Math.floor((start + end) / 2); 21 | let myGuess = guess(mid); 22 | if(myGuess === 1) { 23 | start = mid + 1; 24 | } else if(myGuess === -1) { 25 | end = mid - 1 26 | } else { 27 | return mid; 28 | } 29 | } 30 | }; 31 | ``` 32 | -------------------------------------------------------------------------------- /JS-Algo/0392. Is Subsequence.md: -------------------------------------------------------------------------------- 1 | # Array 2 | 3 | Screen Shot 2023-01-08 at 6 19 46 PM 4 | 5 | 6 | ```js 7 | /** 8 | * @param {string} s 9 | * @param {string} t 10 | * @return {boolean} 11 | */ 12 | var isSubsequence = function(s, t) { 13 | let ptr = 0; 14 | 15 | for(let i = 0; i < t.length; i++) { 16 | if(s[ptr] === t[i]) { 17 | ptr++; 18 | } 19 | } 20 | return ptr === s.length; 21 | }; 22 | ``` 23 | -------------------------------------------------------------------------------- /JS-Algo/0441. Arranging Coins.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-03-03 at 3 33 53 PM 2 | Screen Shot 2023-03-03 at 3 34 00 PM 3 | 4 | 5 | ```js 6 | /** 7 | * @param {number} n 8 | * @return {number} 9 | */ 10 | var arrangeCoins = function(n) { 11 | let count = 1; 12 | for(let i = 1; i <= n; i++) { 13 | if(n - i > i) { 14 | count++; 15 | n -= i; 16 | } else { 17 | break; 18 | } 19 | } 20 | return count; 21 | }; 22 | ``` 23 | -------------------------------------------------------------------------------- /JS-Algo/0448. Find All Numbers Disappeared in an Array.md: -------------------------------------------------------------------------------- 1 | # Array 2 | 3 | Screen Shot 2023-01-12 at 11 04 48 PM 4 | 5 | 6 | ```js 7 | /** 8 | * @param {number[]} nums 9 | * @return {number[]} 10 | */ 11 | var findDisappearedNumbers = function(nums) { 12 | let res = new Array(nums.length + 1).fill(-1); 13 | let stack = []; 14 | 15 | for(let i = 0; i < nums.length; i++) { 16 | res[nums[i]] = nums[i]; 17 | } 18 | 19 | for(let i = 1; i < res.length; i++) { 20 | if(res[i] === -1) { 21 | stack.push(i); 22 | } 23 | } 24 | return stack; 25 | }; 26 | ``` 27 | -------------------------------------------------------------------------------- /JS-Algo/0554. Brick Wall.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-05-28 at 3 39 33 AM 2 | Screen Shot 2023-05-28 at 3 39 43 AM 3 | 4 | 5 | ```js 6 | /** 7 | * @param {number[][]} wall 8 | * @return {number} 9 | */ 10 | var leastBricks = function(wall) { 11 | let count = 0; 12 | let map = new Map(); 13 | 14 | for(let arr of wall) { 15 | let gap = 0; 16 | for(let i = 0; i < arr.length - 1; i++) { 17 | gap += arr[i]; 18 | if(map.has(gap)) { 19 | map.set(gap, map.get(gap) + 1); 20 | } else { 21 | map.set(gap, 1); 22 | } 23 | count = Math.max(count, map.get(gap)); 24 | } 25 | } 26 | return wall.length - count; 27 | }; 28 | ``` 29 | -------------------------------------------------------------------------------- /JS-Algo/0560. Subarray Sum Equals K.md: -------------------------------------------------------------------------------- 1 | 2 | Screen Shot 2023-06-03 at 3 46 06 PM 3 | 4 | ```Javascript 5 | /** 6 | * @param {number[]} nums 7 | * @param {number} k 8 | * @return {number} 9 | */ 10 | var subarraySum = function(nums, k) { 11 | let map = new Map(); 12 | // We need to set 0 because 0 will be reached everytime since sum - k always becomes 0 13 | map.set(0, 1); 14 | let sum = 0; 15 | let count = 0; 16 | 17 | for(let num of nums) { 18 | sum += num; 19 | if(map.has(sum - k)) { 20 | count += map.get(sum - k); 21 | } 22 | if(map.has(sum)) { 23 | map.set(sum, map.get(sum) + 1); 24 | } else { 25 | map.set(sum, 1); 26 | } 27 | } 28 | return count; 29 | }; 30 | ``` 31 | -------------------------------------------------------------------------------- /JS-Algo/0605. Can Place Flowers.md: -------------------------------------------------------------------------------- 1 | # Array 2 | 3 | Screen Shot 2023-01-10 at 10 00 53 PM 4 | 5 | 6 | ## One pass 7 | ```js 8 | /** 9 | * @param {number[]} flowerbed 10 | * @param {number} n 11 | * @return {boolean} 12 | */ 13 | var canPlaceFlowers = function(flowerbed, n) { 14 | for(let i = 0; i < flowerbed.length && n !== 0; i++) { 15 | if(flowerbed[i] !== 1 && flowerbed[i + 1] !== 1 && flowerbed[i - 1] !== 1) { 16 | i++; 17 | n--; 18 | } 19 | } 20 | return n === 0; 21 | }; 22 | ``` 23 | -------------------------------------------------------------------------------- /JS-Algo/0724. Find Pivot Index.md: -------------------------------------------------------------------------------- 1 | # Array 2 | 3 | Screen Shot 2023-01-11 at 10 25 49 PM 4 | 5 | 6 | ```js 7 | /** 8 | * @param {number[]} nums 9 | * @return {number} 10 | */ 11 | var pivotIndex = function(nums) { 12 | 13 | for(let i = 0; i < nums.length; i++) { 14 | let left = 0, leftSum = 0; 15 | while(left < i) { 16 | leftSum += nums[left]; 17 | left++; 18 | } 19 | 20 | let right = i + 1, rightSum = 0; 21 | 22 | while(right < nums.length) { 23 | rightSum += nums[right]; 24 | right++; 25 | } 26 | 27 | if(leftSum === rightSum) { 28 | return i; 29 | } 30 | } 31 | return -1; 32 | }; 33 | ``` 34 | -------------------------------------------------------------------------------- /JS-Algo/0876. Middle of the Linked List.md: -------------------------------------------------------------------------------- 1 | # Linked List 2 | 3 | Screen Shot 2023-03-06 at 12 35 05 PM 4 | 5 | 6 | Two pointers 7 | T.C O(n) 8 | S.C O(1) 9 | 10 | ```JS 11 | /** 12 | * Definition for singly-linked list. 13 | * function ListNode(val, next) { 14 | * this.val = (val===undefined ? 0 : val) 15 | * this.next = (next===undefined ? null : next) 16 | * } 17 | */ 18 | /** 19 | * @param {ListNode} head 20 | * @return {ListNode} 21 | */ 22 | var middleNode = function(head) { 23 | let slow = head; 24 | let fast = head; 25 | while(fast && fast.next) { 26 | slow = slow.next; 27 | fast = fast.next.next; 28 | } 29 | return slow 30 | }; 31 | ``` 32 | -------------------------------------------------------------------------------- /JS-Algo/0912. Sort an Array.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-05-19 at 12 20 31 AM 2 | 3 | T.C. O(nlogn) 4 | S.C. O(n) 5 | 6 | 7 | ## Merge Sort 8 | ```js 9 | /** 10 | * @param {number[]} nums 11 | * @return {number[]} 12 | */ 13 | var sortArray = function(nums) { 14 | if (nums.length <= 1) return nums; 15 | 16 | let mid = Math.floor(nums.length / 2); 17 | let left = sortArray(nums.slice(0, mid)); 18 | let right = sortArray(nums.slice(mid)); 19 | 20 | return merge(left, right); 21 | }; 22 | 23 | function merge(left, right) { 24 | let result = []; 25 | while (left.length && right.length) { 26 | if (left[0] < right[0]) { 27 | result.push(left.shift()); 28 | } else { 29 | result.push(right.shift()); 30 | } 31 | } 32 | return result.concat(left, right); 33 | } 34 | ``` 35 | -------------------------------------------------------------------------------- /JS-Algo/0929. Unique Email Addresses.md: -------------------------------------------------------------------------------- 1 | # Array 2 | 3 | Screen Shot 2023-01-08 at 8 51 35 PM 4 | 5 | 6 | ```js 7 | /** 8 | * @param {string[]} emails 9 | * @return {number} 10 | */ 11 | var numUniqueEmails = function(emails) { 12 | let set = new Set(); 13 | 14 | emails.map((email) => { 15 | let [local, domain] = email.split("@"); 16 | set.add(`${local.split("+")[0].split(".").join("")}@${domain}`); 17 | }) 18 | 19 | return set.size; 20 | }; 21 | ``` 22 | -------------------------------------------------------------------------------- /JS-Algo/1010. Pairs of Songs With Total Durations Divisible by 60.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-24 at 00 17 51 2 | 3 | 4 | ```js 5 | /** 6 | * @param {number[]} time 7 | * @return {number} 8 | */ 9 | var numPairsDivisibleBy60 = function(time) { 10 | let res = 0; 11 | for(let i = 0; i < time.length; i++) { 12 | for(let j = i + 1; j < time.length; j++) { 13 | if((time[i] + time[j]) % 60 === 0) { 14 | res++; 15 | } 16 | } 17 | } 18 | return res; 19 | }; 20 | ``` 21 | -------------------------------------------------------------------------------- /JS-Algo/1189. Maximum Number of Balloons.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-01-14 at 1 29 07 PM 2 | 3 | 4 | ```js 5 | /** 6 | * @param {string} text 7 | * @return {number} 8 | */ 9 | var maxNumberOfBalloons = function(text) { 10 | let obj = {b: 0, a: 0, l: 0, o: 0, n: 0}; 11 | 12 | for(let n of text) { 13 | obj[n]++; 14 | } 15 | 16 | return Math.floor(Math.min(obj.b, obj.a, obj.l / 2, obj.o / 2, obj.n)); 17 | }; 18 | ``` 19 | -------------------------------------------------------------------------------- /JS-Algo/1207. Unique Number of Occurrences.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-26 at 23 48 26 2 | 3 | 4 | ```js 5 | /** 6 | * @param {number[]} arr 7 | * @return {boolean} 8 | */ 9 | var uniqueOccurrences = function(arr) { 10 | let map = new Map(); 11 | for(let i = 0; i < arr.length; i++) { 12 | if(map.has(arr[i])) { 13 | map.set(arr[i], map.get(arr[i]) + 1); 14 | } else { 15 | map.set(arr[i], 1); 16 | } 17 | } 18 | 19 | let set = new Set(); 20 | for(let [key, value] of map) { 21 | if(set.has(value)) { 22 | return false; 23 | } else { 24 | set.add(value); 25 | } 26 | } 27 | return true; 28 | }; 29 | ``` 30 | -------------------------------------------------------------------------------- /JS-Algo/1930. Unique Length-3 Palindromic Subsequences.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-06-05 at 1 20 27 AM 2 | 3 | 4 | ```js 5 | /** 6 | * @param {string} s 7 | * @return {number} 8 | */ 9 | var countPalindromicSubsequence = function(s) { 10 | let set = new Set(s); 11 | let count = 0; 12 | 13 | for(let c of set) { 14 | let first = s.indexOf(c); 15 | let last = s.lastIndexOf(c); 16 | if(last > first) { 17 | let substring = s.substring(first + 1, last); 18 | let uniqueSet = new Set(substring); 19 | count += uniqueSet.size; 20 | } 21 | } 22 | return count; 23 | }; 24 | ``` 25 | -------------------------------------------------------------------------------- /JS-Algo/1984. Minimum Difference Between Highest and Lowest of K Scores.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2023-02-24 at 5 57 20 PM 2 | 3 | ## Sliding Window 4 | 5 | Time O(N*log(N)) | Space O(1) 6 | 7 | ```js 8 | /** 9 | * @param {number[]} nums 10 | * @param {number} k 11 | * @return {number} 12 | */ 13 | var minimumDifference = function(nums, k) { 14 | if(nums.length < 2) return 0; 15 | nums = nums.sort((a, b) => a - b); 16 | let i = 0, j = k - 1; 17 | let minimum = Infinity; 18 | 19 | while(j < nums.length) { 20 | minimum = Math.min(Math.abs(nums[i] - nums[j]), minimum); 21 | i++; 22 | j++; 23 | } 24 | return minimum; 25 | }; 26 | ``` 27 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0001. Sum of positive.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Screen Shot 2022-04-13 at 14 43 41 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | ```js 37 | function positiveSum(arr) { 38 | return arr.reduce((a,b)=> a + (b > 0 ? b : 0),0); 39 | } 40 | ``` 41 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0002. Return Negative.md: -------------------------------------------------------------------------------- 1 | 2 | Screen Shot 2022-04-13 at 14 54 07 3 | 4 | 5 | ```js 6 | function makeNegative(num) { 7 | return num < 0 ? num : -num; 8 | } 9 | ``` 10 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0003. Opposite number.md: -------------------------------------------------------------------------------- 1 | 2 | Screen Shot 2022-04-13 at 15 03 07 3 | 4 | 5 | 6 | 7 | 8 | ```js 9 | function opposite(number) { 10 | return(-number); 11 | } 12 | ``` 13 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0004. Remove First and Last Character.md: -------------------------------------------------------------------------------- 1 | ### It's pretty straightforward. Your goal is to create a function that removes the first and last characters of a string. You're given one parameter, the original string. You don't have to worry with strings with less than two characters. 2 | 3 | [String.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) 4 | 5 | 6 | ```js 7 | function removeChar(str){ 8 | //You got this! 9 | return str.slice(1, -1); 10 | }; 11 | 12 | ``` 13 | 14 | [String.prototype.substring()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) 15 | 16 | ```js 17 | function removeChar(str){ 18 | return str.substring(1, str.length-1); 19 | }; 20 | ``` 21 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0005. Reversed String.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-04-13 at 15 25 24 2 | 3 | 4 | 5 | ```js 6 | function solution(str){ 7 | return str.split('').reverse().join(''); 8 | } 9 | ``` 10 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0006. String repeat.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-04-13 at 15 29 37 2 | 3 | 4 | 5 | ```js 6 | function repeatStr (n, s) { 7 | return s.repeat(n); 8 | } 9 | ``` 10 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0026. Replace Character with "_".md: -------------------------------------------------------------------------------- 1 | 2 | Given a string and a number n, replace every nth character with '_'. 3 | "foreigner", 2 => "f_r_i_n_r" 4 | "leetcode", 3 => "le_tc_de" 5 | "leetcode", 1 => "________" 6 | 7 | 8 | 9 | ```js 10 | function replaceCharacter(str, num) { 11 | let new_str = str.split(""); // gives array of type string 12 | let n = num; // n = 2 13 | // for loop T.C: O(n) S.C: O(1) 14 | for(let i = 0; i < new_str.length; i++) { 15 | if(i === n - 1) { // i === 1 16 | new_str.splice(i, 1, "_") 17 | n += num; 18 | } 19 | } 20 | return new_str.join("") 21 | } 22 | ``` 23 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0027. Consecutive Duplicates with Count.md: -------------------------------------------------------------------------------- 1 | Given a string s, return a new string where consecutive duplicate characters are replaced with that character, followed by its repetition count. 2 | 3 | Input: “aaabcccdd” 4 | Output: “a3bc3d2” 5 | 6 | Input: "aabbaabb" 7 | Output: "a2b2a2b2" 8 | 9 | Input: "" 10 | Output: "" 11 | 12 | ```js 13 | function consecutiveDuplicate(strs) { 14 | let new_str = strs.split(""); // gives array of type string 15 | let count = 1; 16 | let result = ""; 17 | 18 | for(let i = 0; i < new_str.length; i++) { 19 | if(new_str[i] === new_str[i + 1]) { 20 | count++; 21 | } else { 22 | result += new_str[i] + count; 23 | count = 1; 24 | } 25 | } 26 | return result 27 | } 28 | ``` 29 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0028. toCamelCase.md: -------------------------------------------------------------------------------- 1 | ```js 2 | function toCamelCase(str) { 3 | let strArr = str.split(/[-_]/); 4 | for (let i = 1; i < strArr.length; i++) { 5 | strArr[i] = strArr[i][0].toUpperCase() + strArr[i].substring(1); 6 | } 7 | return strArr.join(""); 8 | } 9 | 10 | console.log(toCamelCase("the_stealth_warrior")); //theStealthWarrior 11 | console.log(toCamelCase("The-Stealth-Warrior")); //TheStealthWarrior 12 | ``` 13 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0029. Dig pow.md: -------------------------------------------------------------------------------- 1 | digPow(89, 1) should return 1 since 8¹ + 9² = 89 = 89 * 1 2 | digPow(92, 1) should return -1 since there is no k such as 9¹ + 2² equals 92 * k 3 | digPow(695, 2) should return 2 since 6² + 9³ + 5⁴= 1390 = 695 * 2 4 | digPow(46288, 3) should return 51 since 4³ + 6⁴+ 2⁵ + 8⁶ + 8⁷ = 2360688 = 46288 * 51 5 | 6 | 7 | ```js 8 | function digPow(n, p) { 9 | // ... 10 | let nArr = n.toString().split(""); 11 | let sum = 0; 12 | for (let i = 0; i < nArr.length; i++) { 13 | sum += Math.pow(+nArr[i], p); 14 | p++; 15 | } 16 | let res = sum / n; 17 | 18 | return Number.isInteger(res) ? res : -1; 19 | } 20 | ``` 21 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/0031. Match Strings.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | console.log(isInDict("*a*")); // true 4 | console.log(isInDict("c*r")); // true 5 | console.log(isInDict("br*")); // false 6 | 7 | ```js 8 | const arr = ["cat", "car", "bar"]; 9 | function isInDict(word) { 10 | for (let i = 0; i < arr.length; i++) { 11 | let currentWord = arr[i]; 12 | if (currentWord.length !== word.length) { 13 | continue; 14 | } 15 | let isMatch = true; 16 | for (let j = 0; j < currentWord.length; j++) { 17 | if (word[j] !== "*" && word[j] !== currentWord[j]) { 18 | isMatch = false; 19 | break; 20 | } 21 | } 22 | if (isMatch) { 23 | return true; 24 | } 25 | } 26 | return false; 27 | } 28 | 29 | console.log(isInDict("*a*")); // true 30 | console.log(isInDict("c*r")); // true 31 | console.log(isInDict("br*")); // false 32 | ``` 33 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/07. Find the smallest integer in the array.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-04-13 at 16 07 57 2 | 3 | 4 | 5 | ```js 6 | class SmallestIntegerFinder { 7 | findSmallestInt(args) { 8 | return Math.min(...args) 9 | } 10 | } 11 | ``` 12 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/08. Square Every Digit.md: -------------------------------------------------------------------------------- 1 | ``` 2 | Welcome. In this kata, you are asked to square every digit of a number and concatenate them. 3 | 4 | For example, if we run 9119 through the function, 811181 will come out, because 92 is 81 and 12 is 1. 5 | 6 | Note: The function accepts an integer and returns an integer 7 | ``` 8 | 9 | 10 | ```js 11 | function squareDigits(num){ 12 | let numLetter = num.toString(); 13 | let suqreNumber = numLetter.split('').map((digit) => digit ** 2); 14 | return +suqreNumber.join('') 15 | } 16 | ``` 17 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/09. Remove all vowels from string.md: -------------------------------------------------------------------------------- 1 | 2 | ``` 3 | Your task is to write a function that takes a string and return a new string with all vowels removed. 4 | 5 | For example, the string "This website is for losers LOL!" would become "Ths wbst s fr lsrs LL!". 6 | 7 | Note: for this kata y isn't considered a vowel. 8 | ``` 9 | 10 | ```js 11 | function disemvowel(str) { 12 | return str.replace(/[aeiou]/gi, ''); 13 | } 14 | ``` 15 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/10. Highest and Lowest.md: -------------------------------------------------------------------------------- 1 | In this little assignment you are given a string of space separated numbers, and have to return the highest and lowest number. 2 | ``` 3 | Examples 4 | highAndLow("1 2 3 4 5"); // return "5 1" 5 | highAndLow("1 2 -3 4 5"); // return "5 -3" 6 | highAndLow("1 9 3 4 -5"); // return "9 -5" 7 | ``` 8 | Notes 9 | - All numbers are valid Int32, no need to validate them. 10 | - There will always be at least one number in the input string. 11 | - Output string must be two numbers separated by a single space, and highest number is first. 12 | 13 | 14 | 15 | ```js 16 | function highAndLow(numbers){ 17 | numbers = numbers.split(' '); 18 | return `${Math.max(...numbers)} ${Math.min(...numbers)}`; 19 | } 20 | ``` 21 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/11. Descending Order.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-05-09 at 21 54 34 2 | 3 | 4 | 5 | ```js 6 | function descendingOrder(n){ 7 | return parseInt(String(n).split('').sort().reverse().join('')) 8 | } 9 | ``` 10 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/12. Mumbling.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-06-29 at 22 18 10 2 | 3 | ```js 4 | const accum = (s) => { 5 | return s 6 | .split("") 7 | .map((c, i) => c.toUpperCase() + c.toLowerCase().repeat(i)) 8 | .join("-"); 9 | }; 10 | 11 | console.log(accum("abcd")); 12 | ``` 13 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/13. Get the middle string.md: -------------------------------------------------------------------------------- 1 | ```js 2 | const getMiddle = (s) => { 3 | if (s.length % 2 === 0) { 4 | return s.substring(s.length / 2 - 1, s.length / 2 + 1); 5 | } else { 6 | return s.substring(s.length / 2, s.length / 2 + 1); 7 | } 8 | }; 9 | 10 | console.log(getMiddle("abbc")); 11 | console.log(getMiddle("abc")); 12 | ``` 13 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/14. Check if a number is square.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-06-29 at 22 27 34 2 | 3 | ```js 4 | const isSquare = (n) => { 5 | return Math.sqrt(n) % 1 === 0; 6 | }; 7 | 8 | ``` 9 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/15. Isograms.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-07-01 at 22 15 35 2 | 3 | 4 | 5 | ```js 6 | function isIsogram(str){ 7 | return new Set(str.toUpperCase()).size == str.length; 8 | } 9 | ``` 10 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/16. Exes and Ohs.md: -------------------------------------------------------------------------------- 1 | ## Check to see if a string has the same amount of 'x's and 'o's. The method must return a boolean and be case insensitive. The string can contain any char. 2 | 3 | Screen Shot 2022-07-15 at 23 26 59 4 | 5 | 6 | 7 | ```js 8 | function XO(str) { 9 | let x = 0; 10 | let o = 0; 11 | for (let i = 0; i < str.length; i++) { 12 | if (str[i].toLowerCase() === "x") { 13 | x++; 14 | } else if (str[i].toLowerCase() === "o") { 15 | o++; 16 | } 17 | } 18 | return x === o; 19 | } 20 | ``` 21 | 22 | ### Short answer 23 | ```js 24 | function XO(str) { 25 | return str.toLowerCase().split('x').length === str.toLowerCase().split('o').length; 26 | } 27 | ``` 28 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/17. Jaden Casing Strings.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-07-18 at 01 43 18 2 | 3 | 4 | ```js 5 | String.prototype.toJadenCase = function () { 6 | return this.split(" ").map((word) => word[0].toUpperCase() + word.slice(1)).join(" "); 7 | }; 8 | ``` 9 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/18. Length of the shortest word in a string.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-07-18 at 02 22 19 2 | 3 | Screen Shot 2022-07-18 at 02 22 28 4 | 5 | ```js 6 | function findShort(s) { 7 | s = s.split(" "); 8 | let res = Infinity; 9 | let count = 0; 10 | for (let i = 0; i < s.length; i++) { 11 | for (let j = 0; j < s[i].length; j++) { 12 | count++; 13 | } 14 | res = Math.min(res, count); 15 | count = 0; 16 | } 17 | return res; 18 | } 19 | ``` 20 | 21 | 22 | 23 | ```js 24 | function findShort(s) { 25 | return Math.min(...s.split(" ").map((s) => s.length)); 26 | } 27 | ``` 28 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/19. Reverse a string from a given index.md: -------------------------------------------------------------------------------- 1 | ```js 2 | // reverse a string from a given index 3 | function reverseString(str, index) { 4 | return str.slice(0, index) + str.slice(index).split("").reverse().join(""); 5 | } 6 | 7 | console.log(reverseString("abcdefg", 2)); 8 | 9 | ``` 10 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/20. Credit card mask.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-03 at 20 46 50 2 | 3 | 4 | 5 | ```js 6 | // return masked string 7 | function maskify(cc) { 8 | cc = cc.split(""); 9 | for(var i = 0; i < cc.length - 4; i++){ 10 | cc[i] = "#"; 11 | } 12 | 13 | cc = cc.join(""); 14 | return cc 15 | } 16 | ``` 17 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/21. Two to one.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-10 at 01 31 08 2 | 3 | 4 | ```js 5 | function longest(s1, s2) { 6 | return Array.from(new Set(s1 + s2)).sort().join(''); 7 | } 8 | ``` 9 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/22. Categorize New Member.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-12 at 01 06 34 2 | 3 | ```js 4 | function openOrSenior(data){ 5 | return data.map(([age, handicap]) => (age >= 55 & handicap > 7) ? "Senior" : "Open"); 6 | } 7 | ``` 8 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/23. Find the odd int.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Screen Shot 2022-08-12 at 23 57 15 4 | 5 | 6 | ```js 7 | 8 | function findOdd(A) { 9 | let map = new Map(); 10 | for (let i = 0; i < A.length; i++) { 11 | if (map.has(A[i])) { 12 | map.set(A[i], map.get(A[i]) + 1); 13 | } else { 14 | map.set(A[i], 1); 15 | } 16 | } 17 | for (let [key, value] of map) { 18 | if (value % 2 !== 0) { 19 | return key; 20 | } 21 | } 22 | } 23 | ``` 24 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/24. Sum of Digits.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-12 at 23 59 27 2 | 3 | 4 | ```js 5 | function digitalRoot(n) { 6 | // ... 7 | while(n > 9) { 8 | n = n.toString().split("").reduce((a, b) => +a + +b); 9 | } 10 | return n; 11 | } 12 | ``` 13 | 14 | 15 | -------------------------------------------------------------------------------- /JS-Algo/Beginners/25. Stop gninnipS My sdroW.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-08-13 at 02 34 51 2 | 3 | 4 | ```js 5 | function spinWords(words){ 6 | return words.split(" ").map((word) => word.length >= 5 ? word.split("").reverse().join("") : word).join(" "); 7 | } 8 | ``` 9 | -------------------------------------------------------------------------------- /JS-Algo/Buildings With an Ocean View.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-01-22 at 23 15 22 2 | 3 | ## O(n) stack solution 4 | 5 | ```js 6 | /** 7 | * @param {number[]} heights 8 | * @return {number[]} 9 | */ 10 | var findBuildings = function(heights) { 11 | let stack = []; 12 | for(let i = 0; i < heights.length; i++) { 13 | // if current building's length 14 | while(stack.length && heights[i] >= heights[stack[stack.length - 1]]) { 15 | stack.pop(); 16 | } 17 | stack.push(i); 18 | } 19 | return stack; 20 | }; 21 | ``` 22 | -------------------------------------------------------------------------------- /JS-Algo/Buying Show Tickets.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-03-08 at 18 27 37 2 | Screen Shot 2022-03-08 at 18 27 44 3 | Screen Shot 2022-03-08 at 18 27 52 4 | Screen Shot 2022-03-08 at 18 27 58 5 | 6 | 7 | 8 | 9 | 10 | 11 | ```js 12 | 13 | function waitingTime(tickets, p) { 14 | // Write your code here 15 | let totalTime = 0; 16 | for(const [pos, ticket] of tickets.entries()) { 17 | totalTime += Math.min(ticket, tickets[p] - (pos > p)); 18 | } 19 | 20 | return totalTime; 21 | } 22 | 23 | 24 | ``` 25 | -------------------------------------------------------------------------------- /JS-Algo/Combinations.md: -------------------------------------------------------------------------------- 1 | Given two integers n and k, return all possible combinations of k numbers out of the range [1, n]. 2 | 3 | You may return the answer in any order. 4 | 5 | Screen Shot 2021-11-23 at 21 28 53 6 | 7 | ```js 8 | /** 9 | * @param {number} n 10 | * @param {number} k 11 | * @return {number[][]} 12 | */ 13 | var combine = function(n, k) { 14 | let ans = comb(n, k); 15 | return ans; 16 | }; 17 | 18 | let comb = function(n, k, res = [], curr = [], index = 1) { 19 | if(curr.length === k) { 20 | res.push(curr); 21 | return; 22 | } 23 | else { 24 | while(index <= n) { 25 | comb(n, k, res, [...curr, index], ++index); 26 | } 27 | return res 28 | } 29 | } 30 | ``` 31 | 32 | -------------------------------------------------------------------------------- /JS-Algo/Count Duplicate Elements.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-03-08 at 18 45 31 2 | Screen Shot 2022-03-08 at 18 45 42 3 | 4 | ```js 5 | function countDuplicate(numbers) { 6 | // Write your code here 7 | let counts = {}; 8 | let counter = 0; 9 | numbers.forEach(function(x) { 10 | counts[x] = (counts[x] || 0) + 1; 11 | }); 12 | 13 | for(let key in counts) { 14 | if(counts[key] !== 1) { 15 | counter++; 16 | } 17 | } 18 | 19 | return counter; 20 | 21 | } 22 | 23 | ``` 24 | -------------------------------------------------------------------------------- /JS-Algo/Fizz Buzz.md: -------------------------------------------------------------------------------- 1 | Given an integer n, return a string array answer (1-indexed) where: 2 | 3 | answer[i] == "FizzBuzz" if i is divisible by 3 and 5. 4 | answer[i] == "Fizz" if i is divisible by 3. 5 | answer[i] == "Buzz" if i is divisible by 5. 6 | answer[i] == i (as a string) if none of the above conditions are true. 7 | 8 | Screen Shot 2021-12-16 at 22 15 55 9 | 10 | ```js 11 | var fizzBuzz = function(n) { 12 | const output = []; 13 | 14 | for (let i = 1; i <= n; i++) { 15 | if ( i % 15 === 0 ) { 16 | output.push("FizzBuzz") 17 | } else if ( i % 5 === 0 ) { 18 | output.push("Buzz") 19 | } else if ( i % 3 === 0 ) { 20 | output.push("Fizz") 21 | } else { 22 | output.push(String(i)); 23 | } 24 | } 25 | 26 | return output; 27 | }; 28 | ``` 29 | -------------------------------------------------------------------------------- /JS-Algo/Last and Second Last.md: -------------------------------------------------------------------------------- 1 | #### Given a string, create a new string made up of its last two letters, revered and seperated by a space. 2 | 3 | #### Example, given a word 'bat', return 't a' 4 | 5 | ```JS 6 | let testLetters = 'bat' 7 | 8 | function lastLetters(word) { 9 | let lastTwo= word.slice(-2).split("").reverse().join(" "); 10 | 11 | } 12 | 13 | console.log(lastLetters(testLetters)); 14 | ``` 15 | 16 | [Tiktok] 17 | 18 | 19 | ```js 20 | let word = 'bat'; 21 | 22 | console.log(word.split('').reverse().join(' ').slice(0, 3)) 23 | 24 | ``` 25 | -------------------------------------------------------------------------------- /JS-Algo/Maximum Subarray.md: -------------------------------------------------------------------------------- 1 | #### Given an integer array `nums`, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. 2 | 3 | #### A _subarray_ is a _contiguous_ part of an array. 4 | 5 | Screen Shot 2021-11-01 at 6 44 34 PM 6 | 7 | 8 | Time complexityL O(n) -- Hashmap solution 9 | ```JS 10 | var maxSubArray = function(nums) { 11 | let prev = 0; 12 | let max = -Infinity; 13 | for(let i = 0; i < nums.length; i++) { 14 | prev = Math.max(prev + nums[i], nums[i]);//prev will check if the upcoming number is larger than current number plus itself 15 | max = Math.max(max, prev);// max will always keep the maximum number, because prev may smaller than max 16 | } 17 | return max 18 | }; 19 | ``` 20 | -------------------------------------------------------------------------------- /JS-Algo/Minimum Moves to Equal Array Elements.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-02-11 at 23 11 34 2 | 3 | ```js 4 | /** 5 | * @param {number[]} nums 6 | * @return {number} 7 | */ 8 | var minMoves = function(nums) { 9 | nums.sort((a, b) => a - b); 10 | let count = 0; 11 | for(let i = nums.length - 1; i >= 0; i--) { 12 | count += nums[i] - nums[0]; 13 | } 14 | return count; 15 | }; 16 | ``` 17 | -------------------------------------------------------------------------------- /JS-Algo/Number of Islands.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Screen Shot 2022-01-10 at 22 19 11 6 | 7 | 8 | 9 | ### DFS solution 10 | ```js 11 | /** 12 | * @param {character[][]} grid 13 | * @return {number} 14 | */ 15 | var numIslands = function(grid) { 16 | let count = 0; 17 | for(let i = 0; i < grid.length; i++) { 18 | for(let j = 0; j < grid[i].length; j++) { 19 | if(grid[i][j] === '1') { 20 | count++; 21 | explore(i, j, grid); 22 | } 23 | } 24 | } 25 | return count; 26 | }; 27 | 28 | let explore = function(i, j, grid) { 29 | if(i < 0 || j < 0 || i >= grid.length || j >= grid[i].length || grid[i][j] === '0') { 30 | return; 31 | } 32 | grid[i][j] = '0'; 33 | 34 | explore(i + 1, j, grid); 35 | explore(i - 1, j, grid); 36 | explore(i, j + 1, grid); 37 | explore(i, j - 1, grid); 38 | } 39 | ``` 40 | -------------------------------------------------------------------------------- /JS-Algo/OA with not answers.md: -------------------------------------------------------------------------------- 1 | ![IMG_2356](https://user-images.githubusercontent.com/37787994/152449590-8e88c919-f269-4964-8efe-d01cb87df49f.PNG) 2 | ![IMG_2357](https://user-images.githubusercontent.com/37787994/152449598-f59603c3-2916-4df8-87f7-08c633597380.PNG) 3 | -------------------------------------------------------------------------------- /JS-Algo/Password Creation.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-03-08 at 18 56 51 2 | Screen Shot 2022-03-08 at 18 56 41 3 | 4 | 5 | ```js 6 | function newPassword(a, b) { 7 | // Write your code here 8 | let res = ''; 9 | let count = 0; 10 | let minLength = Math.min(a.length, b.length); 11 | for(let i = 0; i < minLength; i++) { 12 | res += a[i] + b[i]; 13 | count += 1; 14 | } 15 | if(a.length > b.length) { 16 | for(let i = count; i < a.length; i++) { 17 | res += a[i]; 18 | } 19 | } 20 | else { 21 | for(let i = count; i < b.length; i++) { 22 | res += b[i]; 23 | } 24 | } 25 | return res; 26 | } 27 | ``` 28 | -------------------------------------------------------------------------------- /JS-Algo/Reverse Words in a String III.md: -------------------------------------------------------------------------------- 1 | Given a string s, reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order. 2 | 3 | Screen Shot 2021-11-15 at 20 13 46 4 | 5 | ```js 6 | var reverseWords = function(s) { 7 | let res = ''; 8 | let word = ''; 9 | for (let c of s) { 10 | if (c === ' ') { 11 | res += word + c; 12 | word = ''; 13 | } else { 14 | word = c + word; 15 | } 16 | } 17 | return res + word; 18 | }; 19 | ``` 20 | -------------------------------------------------------------------------------- /JS-Algo/Sum of Square Numbers.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2022-02-03 at 23 23 30 2 | 3 | ```js 4 | /** 5 | * @param {number} c 6 | * @return {boolean} 7 | */ 8 | var judgeSquareSum = function(c) { 9 | let l = 0, r = Math.floor(Math.sqrt(c)); 10 | while(l <= r) { 11 | let sum = l ** 2 + r ** 2; 12 | if(sum === c) { 13 | return true; 14 | } 15 | else if(sum < c) { 16 | l++; 17 | } 18 | else { 19 | r--; 20 | } 21 | } 22 | return false 23 | }; 24 | ``` 25 | -------------------------------------------------------------------------------- /JS-Core/Concepts/0001. Promise order.md: -------------------------------------------------------------------------------- 1 | ```js 2 | // This is a JavaScript Quiz from BFE.dev 3 | 4 | console.log(1) 5 | const promise = new Promise((resolve) => { 6 | console.log(2) 7 | resolve() 8 | console.log(3) 9 | }) 10 | 11 | console.log(4) 12 | 13 | promise.then(() => { 14 | console.log(5) 15 | }).then(() => { 16 | console.log(6) 17 | }) 18 | 19 | console.log(7) 20 | 21 | setTimeout(() => { 22 | console.log(8) 23 | }, 10) 24 | 25 | setTimeout(() => { 26 | console.log(9) 27 | }, 0) 28 | ``` 29 | 30 | Screen Shot 2023-04-09 at 12 05 03 PM 31 | 32 | 33 | Screen Shot 2023-04-09 at 12 05 18 PM 34 | -------------------------------------------------------------------------------- /JS-Core/quicksort.md: -------------------------------------------------------------------------------- 1 | ```js 2 | function quickSort(arr, left = 0, right = arr.length - 1) { 3 | if (left < right) { 4 | // 获取基准值的正确位置 5 | const pivotIndex = partition(arr, left, right); 6 | 7 | // 对基准值左侧的部分进行快速排序 8 | quickSort(arr, left, pivotIndex - 1); 9 | 10 | // 对基准值右侧的部分进行快速排序 11 | quickSort(arr, pivotIndex + 1, right); 12 | } 13 | return arr; 14 | } 15 | 16 | function partition(arr, left, right) { 17 | // 选择最右侧的元素作为基准值 18 | const pivot = arr[right]; 19 | // i指向小于基准值的最后一个元素 20 | let i = left - 1; 21 | for (let j = left; j < right; j++) { 22 | // 如果当前元素小于或等于基准值 23 | if (arr[j] <= pivot) { 24 | i++; 25 | // 交换arr[i]和arr[j] 26 | [arr[i], arr[j]] = [arr[j], arr[i]]; 27 | } 28 | } 29 | // 将基准值放到中间,即所有小于基准值的元素之后 30 | [arr[i + 1], arr[right]] = [arr[right], arr[i + 1]]; 31 | // 返回基准值的索引 32 | return i + 1; 33 | } 34 | 35 | ``` 36 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/asu_university_horiz_rgb_maroongold_150_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/asu_university_horiz_rgb_maroongold_150_4.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/README.md: -------------------------------------------------------------------------------- 1 | # `components-core` 2 | 3 | > TODO: description 4 | 5 | ## Usage 6 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/dist/17ce59fb481a096f7ff583865d2a9fcc.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/dist/3b22bb8cd85d055008c810257fe4dc8e.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/dist/52c0056002fef402dca5480410f15d49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/dist/52c0056002fef402dca5480410f15d49.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/dist/7916f0302fd868f67e85000dc4c23e20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/dist/7916f0302fd868f67e85000dc4c23e20.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/dist/9856168affbf73078eb4061f75c200e1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/dist/9856168affbf73078eb4061f75c200e1.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/dist/a74373121002bf12b1129f6f78a3d978.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/dist/a74373121002bf12b1129f6f78a3d978.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/dist/c3e8161a4cfab94937bff5af32ff6252.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/dist/c3e8161a4cfab94937bff5af32ff6252.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/dist/d75cfaba45a3d78ae2024bbb423e6b53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/dist/d75cfaba45a3d78ae2024bbb423e6b53.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/dist/libCore.min.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | Copyright (c) 2018 Jed Watson. 3 | Licensed under the MIT License (MIT), see 4 | http://jedwatson.github.io/classnames 5 | */ 6 | 7 | /*! 8 | * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com 9 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 10 | */ 11 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/arizona-state-university-logo-vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/arizona-state-university-logo-vertical.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/arizona-state-university-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/arizona-state-university-logo.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-sunburst-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-sunburst-black.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-sunburst-maroongold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-sunburst-maroongold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-sunburst-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-sunburst-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-horiz-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-horiz-black.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-horiz-maroongold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-horiz-maroongold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-horiz-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-horiz-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-vert-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-vert-black.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-vert-maroongold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-vert-maroongold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-vert-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/asu-logo/asu-university-vert-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/background-patterns/MorseCodeBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/background-patterns/MorseCodeBlack.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/background-patterns/MorseCodeWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/background-patterns/MorseCodeWhite.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/background-patterns/NetworkBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/background-patterns/NetworkBlack.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/background-patterns/NetworkWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/background-patterns/NetworkWhite.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/background-patterns/TopoPatternBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/background-patterns/TopoPatternBlack.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/background-patterns/TopoPatternWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/background-patterns/TopoPatternWhite.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/endorsed-logo/asu_universitytechoffice_horiz_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/endorsed-logo/asu_universitytechoffice_horiz_white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/favicon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/favicon-128.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/favicon-196x196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/favicon-196x196.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/favicon-96x96.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/favicon.ico -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/mstile-144x144.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/mstile-150x150.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/mstile-310x150.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/mstile-310x310.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/favicon/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/favicon/mstile-70x70.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/font-awesome-svg/search-gray-5.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/font-awesome-svg/search-gray-6.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-dark/asu-2020-innovation--badge-horizontal--on-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-dark/asu-2020-innovation--badge-horizontal--on-dark.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-dark/asu-2020-innovation--badge-only--on-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-dark/asu-2020-innovation--badge-only--on-dark.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-dark/asu-2020-innovation--badge-vertical--on-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-dark/asu-2020-innovation--badge-vertical--on-dark.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-dark/asu-2020-innovation--badge-wide--on-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-dark/asu-2020-innovation--badge-wide--on-dark.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-dark/asu-2020-innovation--horizontal--on-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-dark/asu-2020-innovation--horizontal--on-dark.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-gold/asu-2020-innovation--badge-horizontal--on-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-gold/asu-2020-innovation--badge-horizontal--on-gold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-gold/asu-2020-innovation--badge-only--on-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-gold/asu-2020-innovation--badge-only--on-gold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-gold/asu-2020-innovation--badge-vertical--on-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-gold/asu-2020-innovation--badge-vertical--on-gold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-gold/asu-2020-innovation--badge-wide--on-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-gold/asu-2020-innovation--badge-wide--on-gold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-gold/asu-2020-innovation--horizontal--on-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-gold/asu-2020-innovation--horizontal--on-gold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-white/asu-2020-innovation--badge-horizontal--on-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-white/asu-2020-innovation--badge-horizontal--on-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-white/asu-2020-innovation--badge-only--on-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-white/asu-2020-innovation--badge-only--on-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-white/asu-2020-innovation--badge-vertical--on-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-white/asu-2020-innovation--badge-vertical--on-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-white/asu-2020-innovation--badge-wide--on-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-white/asu-2020-innovation--badge-wide--on-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-white/asu-2020-innovation--horizontal--on-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-badge/on-white/asu-2020-innovation--horizontal--on-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-lockup/on-gold/200420-GlobalFooter-No1InnovationLockup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-lockup/on-gold/200420-GlobalFooter-No1InnovationLockup.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/img/innovation-lockup/on-gold/200420-GlobalFooter-No1InnovationLockup@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-core/img/innovation-lockup/on-gold/200420-GlobalFooter-No1InnovationLockup@2x.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | verbose: true, 3 | setupFilesAfterEnv: ["./setupTests.js"], 4 | transform: { 5 | "^.+\\.js$": "babel-jest", 6 | "^.+\\.css$": "jest-transform-css", 7 | "\\.(jpg|jpeg|png|gif|webp|svg)$": "jest-transform-file", 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/setupTests.js: -------------------------------------------------------------------------------- 1 | import { toMatchImageSnapshot } from 'jest-image-snapshot'; 2 | 3 | expect.extend({ toMatchImageSnapshot }); 4 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/src/components/index.js: -------------------------------------------------------------------------------- 1 | export * from "./Button"; 2 | export * from "./ButtonIconOnly"; 3 | export * from "./ButtonTag"; 4 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/src/index.js: -------------------------------------------------------------------------------- 1 | export * from "./components"; 2 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/webpack/webpack.dev.js: -------------------------------------------------------------------------------- 1 | const { merge } = require("webpack-merge"); 2 | 3 | const { CleanWebpackPlugin } = require("clean-webpack-plugin"); 4 | const DashboardPlugin = require("webpack-dashboard/plugin"); 5 | 6 | const common = require("./webpack.common.js"); 7 | const path = require("path"); 8 | const PROJECT_DIR = path.resolve(__dirname, "../"); 9 | 10 | module.exports = merge(common, { 11 | mode: "development", 12 | devtool: "inline-source-map", 13 | devServer: { 14 | contentBase: path.join(PROJECT_DIR, "dist"), 15 | compress: true, 16 | // historyApiFallback: true, 17 | // hot: true, 18 | }, 19 | plugins: [new CleanWebpackPlugin(), new DashboardPlugin()], 20 | output: { 21 | path: path.resolve(PROJECT_DIR, "dist"), 22 | filename: "[name].dev.js", 23 | // libraryTarget: "umd", 24 | // library: "AsuCookieConsent", 25 | // umdNamedDefine: true, 26 | }, 27 | }); 28 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-core/webpack/webpack.prod.js: -------------------------------------------------------------------------------- 1 | const { merge } = require("webpack-merge"); 2 | const common = require("./webpack.common.js"); 3 | 4 | const path = require("path"); 5 | const PROJECT_DIR = path.resolve(__dirname, "../"); 6 | 7 | module.exports = merge(common, { 8 | mode: "production", 9 | output: { 10 | path: path.resolve(PROJECT_DIR, "dist"), 11 | filename: "[name].min.js", 12 | // libraryTarget: "umd", 13 | // library: "AsuCookieConsent", 14 | // umdNamedDefine: true, 15 | }, 16 | performance: { 17 | hints: "warning", // "error" or false are valid too 18 | maxEntrypointSize: 100000, // in bytes, default 250k 19 | maxAssetSize: 100000, // in bytes 20 | }, 21 | }); 22 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/dist/1de44be8cfa489b3ec2f124910886a2e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/dist/1de44be8cfa489b3ec2f124910886a2e.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/dist/870c90607184d2f52ac0f60cef80db23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/dist/870c90607184d2f52ac0f60cef80db23.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | verbose: true, 3 | setupFilesAfterEnv: ["./setupTests.js"], 4 | transform: { 5 | "^.+\\.js$": "babel-jest", 6 | "^.+\\.css$": "jest-transform-css", 7 | "\\.(jpg|jpeg|png|gif|webp|svg)$": "jest-transform-file", 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/src/asuLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/src/asuLogo.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/src/endorsedLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/src/endorsedLogo.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/src/index.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/src/index.css -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/src/innovationLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/src/innovationLogo.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/1de44be8cfa489b3ec2f124910886a2e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/storybook-static/1de44be8cfa489b3ec2f124910886a2e.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/4.1ef728572ee6891ddd0d.manager.bundle.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * Prism: Lightweight, robust, elegant syntax highlighting 3 | * 4 | * @license MIT 5 | * @author Lea Verou 6 | * @namespace 7 | * @public 8 | */ 9 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/6.a6a257a5826ab8abf526.manager.bundle.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * OverlayScrollbars 3 | * https://github.com/KingSora/OverlayScrollbars 4 | * 5 | * Version: 1.13.0 6 | * 7 | * Copyright KingSora | Rene Haas. 8 | * https://github.com/KingSora 9 | * 10 | * Released under the MIT license. 11 | * Date: 02.08.2020 12 | */ 13 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/870c90607184d2f52ac0f60cef80db23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/storybook-static/870c90607184d2f52ac0f60cef80db23.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/ae3a2712e3ec1b4db768ff0d597f3834.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/storybook-static/ae3a2712e3ec1b4db768ff0d597f3834.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/storybook-static/favicon.ico -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/main.0591d608b092c035abf1.manager.bundle.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[1],{441:function(module,exports,__webpack_require__){__webpack_require__(442),__webpack_require__(597),__webpack_require__(817),__webpack_require__(818),__webpack_require__(820),__webpack_require__(819),module.exports=__webpack_require__(816)},509:function(module,exports){},597:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__(72).c.setConfig({showRoots:!0})},816:function(module,exports,__webpack_require__){"use strict";__webpack_require__(54).addons.setConfig({refs:{}})}},[[441,2,3]]]); -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/static/media/asuLogo.ae3a2712.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/storybook-static/static/media/asuLogo.ae3a2712.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/static/media/endorsedLogo.870c9060.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/storybook-static/static/media/endorsedLogo.870c9060.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/static/media/innovationLogo.1de44be8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-footer/storybook-static/static/media/innovationLogo.1de44be8.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/vendor.production.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /* 2 | object-assign 3 | (c) Sindre Sorhus 4 | @license MIT 5 | */ 6 | 7 | /*! 8 | * Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com 9 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 10 | */ 11 | 12 | /** @license React v16.14.0 13 | * react.production.min.js 14 | * 15 | * Copyright (c) Facebook, Inc. and its affiliates. 16 | * 17 | * This source code is licensed under the MIT license found in the 18 | * LICENSE file in the root directory of this source tree. 19 | */ 20 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/storybook-static/vendors~main.91789dbb.iframe.bundle.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"vendors~main.91789dbb.iframe.bundle.js","sources":[],"mappings":";A","sourceRoot":""} -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-footer/webpack/webpack.dev.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | 3 | const common = require("./webpack.common.js"); 4 | 5 | const PROJECT_DIR = path.resolve(__dirname, "../"); 6 | 7 | // development bundle config 8 | const config = { 9 | ...common, 10 | context: path.join(PROJECT_DIR, "src"), 11 | mode: "development", 12 | 13 | output: { 14 | path: path.resolve(__dirname, "dist"), 15 | filename: "[name].development.js", 16 | }, 17 | }; 18 | 19 | module.exports = config; 20 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-header/dist/assets/img/arizona-state-university-logo-vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-header/dist/assets/img/arizona-state-university-logo-vertical.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-header/dist/assets/img/arizona-state-university-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-header/dist/assets/img/arizona-state-university-logo.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-header/dist/assets/img/asu-starbucks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/component-header/dist/assets/img/asu-starbucks.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-header/dist/asuHeader.cjs.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | 6 | /*! For license information please see libCore.es.js.LICENSE.txt */ 7 | 8 | /** @license React v16.13.1 9 | * react-is.production.min.js 10 | * 11 | * Copyright (c) Facebook, Inc. and its affiliates. 12 | * 13 | * This source code is licensed under the MIT license found in the 14 | * LICENSE file in the root directory of this source tree. 15 | */ 16 | 17 | /** @license React v17.0.2 18 | * react-is.production.min.js 19 | * 20 | * Copyright (c) Facebook, Inc. and its affiliates. 21 | * 22 | * This source code is licensed under the MIT license found in the 23 | * LICENSE file in the root directory of this source tree. 24 | */ 25 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-header/dist/asuHeader.es.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | 6 | /*! For license information please see libCore.es.js.LICENSE.txt */ 7 | 8 | /** @license React v16.13.1 9 | * react-is.production.min.js 10 | * 11 | * Copyright (c) Facebook, Inc. and its affiliates. 12 | * 13 | * This source code is licensed under the MIT license found in the 14 | * LICENSE file in the root directory of this source tree. 15 | */ 16 | 17 | /** @license React v17.0.2 18 | * react-is.production.min.js 19 | * 20 | * Copyright (c) Facebook, Inc. and its affiliates. 21 | * 22 | * This source code is licensed under the MIT license found in the 23 | * LICENSE file in the root directory of this source tree. 24 | */ 25 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-header/dist/asuHeader.umd.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! For license information please see libCore.es.js.LICENSE.txt */ 2 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/component-header/dist/vendor.umd.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | */ 5 | 6 | /** @license React v16.13.1 7 | * react-is.production.min.js 8 | * 9 | * Copyright (c) Facebook, Inc. and its affiliates. 10 | * 11 | * This source code is licensed under the MIT license found in the 12 | * LICENSE file in the root directory of this source tree. 13 | */ 14 | 15 | /** @license React v17.0.2 16 | * react-is.production.min.js 17 | * 18 | * Copyright (c) Facebook, Inc. and its affiliates. 19 | * 20 | * This source code is licensed under the MIT license found in the 21 | * LICENSE file in the root directory of this source tree. 22 | */ 23 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/arizona-state-university-logo-vertical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/arizona-state-university-logo-vertical.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/arizona-state-university-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/arizona-state-university-logo.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/asu-sunburst-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/asu-sunburst-black.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/asu-sunburst-maroongold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/asu-sunburst-maroongold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/asu-sunburst-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/asu-sunburst-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-horiz-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-horiz-black.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-horiz-maroongold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-horiz-maroongold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-horiz-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-horiz-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-vert-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-vert-black.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-vert-maroongold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-vert-maroongold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-vert-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/asu-logo/asu-university-vert-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/background-patterns/MorseCodeBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/background-patterns/MorseCodeBlack.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/background-patterns/MorseCodeWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/background-patterns/MorseCodeWhite.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/background-patterns/NetworkBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/background-patterns/NetworkBlack.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/background-patterns/NetworkWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/background-patterns/NetworkWhite.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/background-patterns/TopoPatternBlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/background-patterns/TopoPatternBlack.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/background-patterns/TopoPatternWhite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/background-patterns/TopoPatternWhite.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/endorsed-logo/asu_universitytechoffice_horiz_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/endorsed-logo/asu_universitytechoffice_horiz_white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-114x114.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-120x120.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-144x144.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-57x57.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-60x60.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-72x72.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-76x76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/apple-touch-icon-76x76.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/favicon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/favicon-128.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/favicon-196x196.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/favicon-196x196.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/favicon-96x96.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/favicon.ico -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/mstile-144x144.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/mstile-150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/mstile-150x150.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/mstile-310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/mstile-310x150.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/mstile-310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/mstile-310x310.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/favicon/mstile-70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/favicon/mstile-70x70.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/font-awesome-svg/search-gray-5.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/font-awesome-svg/search-gray-6.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-dark/asu-2020-innovation--badge-horizontal--on-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-dark/asu-2020-innovation--badge-horizontal--on-dark.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-dark/asu-2020-innovation--badge-only--on-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-dark/asu-2020-innovation--badge-only--on-dark.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-dark/asu-2020-innovation--badge-vertical--on-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-dark/asu-2020-innovation--badge-vertical--on-dark.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-dark/asu-2020-innovation--badge-wide--on-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-dark/asu-2020-innovation--badge-wide--on-dark.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-dark/asu-2020-innovation--horizontal--on-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-dark/asu-2020-innovation--horizontal--on-dark.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-gold/asu-2020-innovation--badge-horizontal--on-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-gold/asu-2020-innovation--badge-horizontal--on-gold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-gold/asu-2020-innovation--badge-only--on-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-gold/asu-2020-innovation--badge-only--on-gold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-gold/asu-2020-innovation--badge-vertical--on-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-gold/asu-2020-innovation--badge-vertical--on-gold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-gold/asu-2020-innovation--badge-wide--on-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-gold/asu-2020-innovation--badge-wide--on-gold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-gold/asu-2020-innovation--horizontal--on-gold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-gold/asu-2020-innovation--horizontal--on-gold.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-white/asu-2020-innovation--badge-horizontal--on-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-white/asu-2020-innovation--badge-horizontal--on-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-white/asu-2020-innovation--badge-only--on-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-white/asu-2020-innovation--badge-only--on-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-white/asu-2020-innovation--badge-vertical--on-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-white/asu-2020-innovation--badge-vertical--on-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-white/asu-2020-innovation--badge-wide--on-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-white/asu-2020-innovation--badge-wide--on-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-badge/on-white/asu-2020-innovation--horizontal--on-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-badge/on-white/asu-2020-innovation--horizontal--on-white.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-lockup/on-gold/200420-GlobalFooter-No1InnovationLockup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-lockup/on-gold/200420-GlobalFooter-No1InnovationLockup.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/dist/img/innovation-lockup/on-gold/200420-GlobalFooter-No1InnovationLockup@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/dist/img/innovation-lockup/on-gold/200420-GlobalFooter-No1InnovationLockup@2x.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/divider.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/ASU-unity-system/divider.png -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/docs/getting-started/Quickstart.stories.mdx: -------------------------------------------------------------------------------- 1 | import { Meta } from '@storybook/addon-docs/blocks'; 2 | 3 | 4 | 5 | # Getting Started 6 | 7 | ## Local development 8 | 9 | The easiest way to get started is to spin up storybook as a dev environment: 10 | 11 | ```bash 12 | git clone https://github.com/ASU/asu-unity-stack.git # clone the package 13 | cd asu-unity-stack # cd into repo root 14 | yarn install # do this at repo root 15 | yarn build 16 | cd packages/bootstrap4-theme # step into package root 17 | yarn storybook # run storybook 18 | ``` 19 | 20 | See the developer documentation on storybook at https://storybook.js.org/docs/basics/introduction/ 21 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/gulpconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "paths": { 3 | "js": "./src/js", 4 | "css": "./dist/css", 5 | "img": "./dist/img", 6 | "imgsrc": "./src/img", 7 | "sass": "./src/scss", 8 | "node": "../../node_modules", 9 | "dist": "./dist" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: 'jest-puppeteer', 3 | testRegex: './*\\.test\\.js$', 4 | setupFilesAfterEnv: [ 5 | './tests/setupTests.js' 6 | ] 7 | }; 8 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/src/js/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /JS-Day/ASU-unity-system/src/js/tabs.js: -------------------------------------------------------------------------------- 1 | console.log('tabs script'); 2 | -------------------------------------------------------------------------------- /JS-Day/AccordionEffect-mini/script.js: -------------------------------------------------------------------------------- 1 | const itemBoxes = document.querySelectorAll('.accordion-item'); 2 | const itemHeadings = document.querySelectorAll('.accordion-item-heading'); 3 | 4 | 5 | itemHeadings.forEach((itemHeading) => { 6 | itemHeading.addEventListener('click', function() { 7 | let outerBox = this.parentNode.className; 8 | itemBoxes.forEach((itemBox) => { 9 | itemBox.className = 'accordion-item closed' 10 | }) 11 | if(outerBox === 'accordion-item closed') { 12 | this.parentNode.className = 'accordion-item open' 13 | } 14 | }) 15 | }) 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /JS-Day/AccordionEffect-mini/style.css: -------------------------------------------------------------------------------- 1 | 2 | .accordion-item { 3 | width: 300px; 4 | } 5 | 6 | .accordion-item-heading { 7 | cursor: pointer; 8 | margin: 0; 9 | background-color: #dddddd; 10 | width: inherit; 11 | } 12 | .closed .accordion-item-content { 13 | width: inherit; 14 | visibility: hidden; 15 | height: 0; 16 | } 17 | .open .accordion-item-content { 18 | width: inherit; 19 | } 20 | .open .accordion-item-heading { 21 | margin: 0; 22 | } 23 | -------------------------------------------------------------------------------- /JS-Day/AccordionEffect/app.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | const itemBox = document.querySelectorAll('.accordion-item'); 4 | const itemHeading = document.querySelectorAll('.accordion-item-heading'); 5 | 6 | for(let i = 0; i < itemHeading.length; i++) { 7 | itemHeading[i].addEventListener('click', function() { 8 | let outerBox = this.parentNode.className; 9 | for(let i = 0; i < itemBox.length; i++) { 10 | itemBox[i].className = 'accordion-item closed' 11 | } 12 | if(outerBox === 'accordion-item closed') { 13 | this.parentNode.className = 'accordion-item open' 14 | } 15 | }) 16 | } 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /JS-Day/AccordionEffect/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | position: fixed; 3 | display: flex; 4 | flex-direction: column; 5 | align-items: center; 6 | justify-content: center; 7 | margin-top: 20%; 8 | margin-left: 40%; 9 | box-sizing: border-box; 10 | } 11 | 12 | .accordion-item { 13 | margin-bottom: 10px; 14 | } 15 | 16 | .accordion-item-heading { 17 | font-size: 2rem; 18 | cursor: pointer; 19 | margin: 0 0 10px 0; 20 | padding: 10px 20px; 21 | background-color: #dddddd; 22 | color: #000000; 23 | width: 300px; 24 | } 25 | .closed .accordion-item-content { 26 | width: 300px; 27 | visibility: hidden; 28 | height: 0; 29 | } 30 | .open .accordion-item-content { 31 | width: 300px; 32 | padding: 20px; 33 | border: 1px solid #ddd; 34 | } 35 | .open .accordion-item-heading { 36 | margin: 0; 37 | } 38 | -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/card-lazy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/card-lazy.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/card.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/card.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/digital-lazy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/digital-lazy.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/digital.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/digital.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/grow-lazy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/grow-lazy.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/grow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/grow.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/hero.png -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/icon.png -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/img-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/img-1.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/img-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/img-2.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/img-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/img-3.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/img-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/img-4.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/logo.png -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/user-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/user-1.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/user-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/user-2.jpg -------------------------------------------------------------------------------- /JS-Day/BankistWeb/startFile/img/user-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/BankistWeb/startFile/img/user-3.jpg -------------------------------------------------------------------------------- /JS-Day/Consuming Promises/demo.md: -------------------------------------------------------------------------------- 1 | Screen Shot 2021-11-19 at 19 55 47 2 | -------------------------------------------------------------------------------- /JS-Day/Consuming Promises/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Asynchronous JavaScript 10 | 11 | 12 |
13 |
14 |
15 |
16 |
17 | 18 | 19 | -------------------------------------------------------------------------------- /JS-Day/Dropdown List/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /JS-Day/DrumKit/preview.md: -------------------------------------------------------------------------------- 1 | ![drumkit](https://user-images.githubusercontent.com/37787994/134228097-44b1d790-f77c-4788-877f-922e8835ed42.gif) 2 | -------------------------------------------------------------------------------- /JS-Day/DrumKit/script.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | window.addEventListener('keydown', function(e) { 4 | const audio = document.querySelector(`audio[data-key = "${e.keyCode}"]`) 5 | const key = document.querySelector(`.key[data-key='${e.keyCode}']`); 6 | 7 | if(!audio) return; 8 | //without this line, we cannot hit the key over and over again. 9 | //Instead, we have to wait until the audio is over 10 | audio.currentTime = 0; 11 | audio.play(); 12 | key.classList.add('playing'); 13 | 14 | 15 | const keys = document.querySelectorAll('.key'); 16 | keys.forEach((key) => key.addEventListener('transitionend', function(e) { 17 | //we only want to remove the transform effect 18 | if(e.propertyName !== 'transform') return; 19 | 20 | //this is pointing to key because addEventListener is on key 21 | this.classList.remove('playing'); 22 | })) 23 | }) 24 | -------------------------------------------------------------------------------- /JS-Day/DrumKit/sounds/boom.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/DrumKit/sounds/boom.wav -------------------------------------------------------------------------------- /JS-Day/DrumKit/sounds/clap.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/DrumKit/sounds/clap.wav -------------------------------------------------------------------------------- /JS-Day/DrumKit/sounds/hihat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/DrumKit/sounds/hihat.wav -------------------------------------------------------------------------------- /JS-Day/DrumKit/sounds/kick.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/DrumKit/sounds/kick.wav -------------------------------------------------------------------------------- /JS-Day/DrumKit/sounds/openhat.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/DrumKit/sounds/openhat.wav -------------------------------------------------------------------------------- /JS-Day/DrumKit/sounds/ride.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/DrumKit/sounds/ride.wav -------------------------------------------------------------------------------- /JS-Day/DrumKit/sounds/snare.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/DrumKit/sounds/snare.wav -------------------------------------------------------------------------------- /JS-Day/DrumKit/sounds/tink.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/DrumKit/sounds/tink.wav -------------------------------------------------------------------------------- /JS-Day/DrumKit/sounds/tom.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/DrumKit/sounds/tom.wav -------------------------------------------------------------------------------- /JS-Day/DrumKit/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | font-size: 10px; 3 | background: url('background.jpg') bottom center; 4 | background-size: cover; 5 | } 6 | 7 | body,html { 8 | margin: 0; 9 | padding: 0; 10 | font-family: sans-serif; 11 | } 12 | 13 | .keys { 14 | display: flex; 15 | min-height: 100vh; 16 | align-items: center; 17 | justify-content: center; 18 | } 19 | 20 | .key { 21 | border: .4rem solid black; 22 | border-radius: .5rem; 23 | margin: 1rem; 24 | font-size: 1.5rem; 25 | padding: 1rem .5rem; 26 | transition: all .07s ease; 27 | width: 10rem; 28 | text-align: center; 29 | color: white; 30 | background: rgba(0,0,0,0.4); 31 | text-shadow: 0 0 .5rem black; 32 | } 33 | 34 | .playing { 35 | transform: scale(1.1); 36 | border-color: #ffc600; 37 | box-shadow: 0 0 1rem #ffc600; 38 | } 39 | 40 | kbd { 41 | display: block; 42 | font-size: 4rem; 43 | } 44 | 45 | .sound { 46 | font-size: 1.2rem; 47 | text-transform: uppercase; 48 | letter-spacing: .1rem; 49 | color: #ffc600; 50 | } 51 | -------------------------------------------------------------------------------- /JS-Day/Mini Clock/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /JS-Day/Mini Clock/preview.md: -------------------------------------------------------------------------------- 1 | ![jsclock](https://user-images.githubusercontent.com/37787994/134753364-9e5aca13-40c2-4866-9536-27387553a436.gif) 2 | -------------------------------------------------------------------------------- /JS-Day/Mini Clock/script.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | let secondHand = document.querySelector('.second-hand'); 4 | let minHand = document.querySelector('.min-hand'); 5 | let hourHand = document.querySelector('.hour-hand'); 6 | 7 | function setDate() { 8 | const now = new Date(); 9 | //seconds 10 | let seconds = now.getSeconds(); 11 | let secondDegrees = ((seconds / 60) * 360) + 90; 12 | 13 | //minutes 14 | let mins = now.getMinutes(); 15 | let minsDegree = ((mins / 60) * 360) + 90; 16 | 17 | //hours 18 | let hours = now.getHours(); 19 | let hoursDegree = ((hours / 12) * 360) + 90; 20 | 21 | secondHand.style.transform = `rotate(${secondDegrees}deg)` 22 | minHand.style.transform = `rotate(${minsDegree}deg)` 23 | hourHand.style.transform = `rotate(${hoursDegree}deg)` 24 | } 25 | 26 | setInterval(setDate, 2000); 27 | -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/bonk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/bonk.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/down.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/fall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/fall.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/idle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/idle.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/jump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/jump.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/pivot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/pivot.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/push.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/push.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/run.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/spinjump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/spinjump.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/up.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/walk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/walk.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/wall_peek.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/wall_peek.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/wall_slide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/hero/wall_slide.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/tilesets/clouds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/tilesets/clouds.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/tilesets/world-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/assets/tilesets/world-1.png -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/preview.md: -------------------------------------------------------------------------------- 1 | s 2 | -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/src/config.js: -------------------------------------------------------------------------------- 1 | /// 2 | import Phaser from 'phaser'; 3 | 4 | export default { 5 | type: Phaser.AUTO, 6 | parent: 'game', 7 | backgroundColor: '#33A5E7', 8 | scale: { 9 | width: 500, 10 | height: 320, 11 | mode: Phaser.Scale.FIT, 12 | autoCenter: Phaser.Scale.CENTER_BOTH, 13 | }, 14 | render: { 15 | pixelArt: true, 16 | }, 17 | physics: { 18 | default: 'arcade', 19 | arcade: { 20 | gravity: { y: 750 }, 21 | debug: false, 22 | debugShowVelocity: true, 23 | debugShowBody: true, 24 | debugShowStaticBody: true, 25 | } 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Phaser Game 7 | 8 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /JS-Day/NASA Psyche Mission - ASU - Psyche Web-Based Game/src/index.js: -------------------------------------------------------------------------------- 1 | /// 2 | import Phaser from 'phaser'; 3 | import config from './config'; 4 | import GameScene from './scenes/Game'; 5 | 6 | new Phaser.Game(Object.assign(config, { 7 | scene: [GameScene], 8 | })); 9 | -------------------------------------------------------------------------------- /JS-Day/Number converter/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /JS-Day/Playing with Variables/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Scoped CSS Variables and JS 6 | 7 | 8 | 9 |

Update CSS Variables with JS

10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | nice 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /JS-Day/Playing with Variables/preview.md: -------------------------------------------------------------------------------- 1 | ![playingvaria](https://user-images.githubusercontent.com/37787994/135006251-6b4a1d95-9d41-4979-af6a-e8a357c77c8a.gif) 2 | -------------------------------------------------------------------------------- /JS-Day/Playing with Variables/script.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | //select all inputs which are in .controls class 5 | const inputs = document.querySelectorAll('.controls input'); 6 | 7 | function handleUpdate() { 8 | //dataset will push everything that has data 'dash' (data-xxx) on 9 | //that element and put into object for you. 10 | //if we don't put the fallback '', when we reach the attribute 11 | //that has no data-sizing, we will push undefined! 12 | const suffix = this.dataset.sizing || ''; 13 | // console.log(suffix); 14 | // this line will print HTML name attribute for that specific element 15 | // console.log(this.name) 16 | document.documentElement.style.setProperty(`--${this.name}`, this.value + suffix) 17 | 18 | 19 | } 20 | 21 | inputs.forEach((input) => input.addEventListener('change', handleUpdate)); 22 | inputs.forEach((input) => input.addEventListener('mousemove', handleUpdate)); 23 | -------------------------------------------------------------------------------- /JS-Day/Playing with Variables/style.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --base: #ffc600; 3 | --spacing: 10px; 4 | --blur: 10px; 5 | } 6 | 7 | img { 8 | background: var(--base); 9 | padding: var(--spacing); 10 | filter: blur(var(--blur)); 11 | } 12 | 13 | /*Now, changing color for the JS span*/ 14 | .hl { 15 | color: var(--base); 16 | } 17 | 18 | 19 | /* 20 | misc styles, nothing to do with CSS variables 21 | */ 22 | 23 | body { 24 | text-align: center; 25 | background: #193549; 26 | color: white; 27 | font-family: 'helvetica neue', sans-serif; 28 | font-weight: 100; 29 | font-size: 50px; 30 | } 31 | 32 | .controls { 33 | margin-bottom: 50px; 34 | } 35 | 36 | input { 37 | width: 100px; 38 | } 39 | -------------------------------------------------------------------------------- /JS-Day/Receive input/preview.md: -------------------------------------------------------------------------------- 1 | 2 | ![Jan-07-2022 23-14-23](https://user-images.githubusercontent.com/37787994/148633992-ccb4e930-0a70-4b38-aa55-7420859ac182.gif) 3 | 4 | 5 | Screen Shot 2022-01-07 at 23 19 39 6 | 7 | [Code](https://github.com/cheatsheet1999/FrontEndCollection/blob/main/JS-Day/Receive%20input/app.js) 8 | -------------------------------------------------------------------------------- /JS-Day/Unit 3 – Function.md: -------------------------------------------------------------------------------- 1 | sds 2 | -------------------------------------------------------------------------------- /JS-Day/Unit 7 - Node.js/homework.md: -------------------------------------------------------------------------------- 1 | ``` 2 | const http = require('http') 3 | 4 | function parsetime (time) { 5 | return { 6 | hour: time.getHours(), 7 | minute: time.getMinutes(), 8 | second: time.getSeconds() 9 | } 10 | } 11 | 12 | function unixtime (time) { 13 | return { unixtime: time.getTime() } 14 | } 15 | 16 | const server = http.createServer(function (req, res) { 17 | const parsedUrl = new URL(req.url, 'http://example.com') 18 | const time = new Date(parsedUrl.searchParams.get('iso')) 19 | let result 20 | 21 | if (/^\/api\/parsetime/.test(req.url)) { 22 | result = parsetime(time) 23 | } else if (/^\/api\/unixtime/.test(req.url)) { 24 | result = unixtime(time) 25 | } 26 | 27 | if (result) { 28 | res.writeHead(200, { 'Content-Type': 'application/json' }) 29 | res.end(JSON.stringify(result)) 30 | } else { 31 | res.writeHead(404) 32 | res.end() 33 | } 34 | }) 35 | server.listen(Number(process.argv[2])) 36 | ``` 37 | -------------------------------------------------------------------------------- /React-Day/0001. Accordion Component with Single Panel Open/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /React-Day/0001. Accordion Component with Single Panel Open/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "accordion", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "main": "src/index.js", 7 | "dependencies": { 8 | "react": "16.12.0", 9 | "react-dom": "16.12.0", 10 | "react-scripts": "3.0.1" 11 | }, 12 | "devDependencies": { 13 | "typescript": "3.8.3" 14 | }, 15 | "scripts": { 16 | "start": "react-scripts start", 17 | "build": "react-scripts build", 18 | "test": "react-scripts test --env=jsdom", 19 | "eject": "react-scripts eject" 20 | }, 21 | "browserslist": [ 22 | ">0.2%", 23 | "not dead", 24 | "not ie <= 11", 25 | "not op_mini all" 26 | ] 27 | } -------------------------------------------------------------------------------- /React-Day/0001. Accordion Component with Single Panel Open/src/Accordion.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import { IAccordionData } from "../App"; 3 | import "../styles.css"; 4 | 5 | interface IAccordionProps { 6 | data: IAccordionData[]; 7 | } 8 | 9 | export default function Accordion({ data }: IAccordionProps) { 10 | const [openPanelIndex, setOpenPanelIndex] = useState(null); 11 | 12 | function togglePanel(index: number) { 13 | setOpenPanelIndex(openPanelIndex === index ? null : index); 14 | } 15 | 16 | return ( 17 |
18 | {data.map((item, index) => ( 19 |
20 |
togglePanel(index)}>{item.heading}
21 | {openPanelIndex === index &&
{item.content}
} 22 |
23 | ))} 24 |
25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /React-Day/0001. Accordion Component with Single Panel Open/src/App.tsx: -------------------------------------------------------------------------------- 1 | import Accordion from "./component/Accordion"; 2 | import "./styles.css"; 3 | 4 | export interface IAccordionData { 5 | heading: string; 6 | content: string; 7 | } 8 | 9 | export default function App() { 10 | const data: IAccordionData[] = [ 11 | { heading: "Heading 1", content: "Content 1" }, 12 | { heading: "Heading 2", content: "Content 2" }, 13 | { heading: "Heading 3", content: "Content 3" }, 14 | { heading: "Heading 4", content: "Content 4" }, 15 | ]; 16 | return ( 17 |
18 | 19 |
20 | ); 21 | } 22 | -------------------------------------------------------------------------------- /React-Day/0001. Accordion Component with Single Panel Open/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | 4 | import App from "./App"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | ReactDOM.render( 8 | 9 |

Accordion Example

10 |
11 | 12 |
, 13 | rootElement 14 | ); 15 | -------------------------------------------------------------------------------- /React-Day/0001. Accordion Component with Single Panel Open/src/styles.css: -------------------------------------------------------------------------------- 1 | .App { 2 | font-family: sans-serif; 3 | } 4 | 5 | .header { 6 | cursor: pointer; 7 | padding: 15px; 8 | background-color: skyblue; 9 | } 10 | 11 | .content { 12 | border: solid 1px skyblue; 13 | padding: 15px; 14 | } 15 | 16 | .panel { 17 | padding-bottom: 10px; 18 | } 19 | -------------------------------------------------------------------------------- /React-Day/0002. Accordion Component with All Panel Open/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /React-Day/0002. Accordion Component with All Panel Open/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "accordion", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "main": "src/index.js", 7 | "dependencies": { 8 | "react": "16.12.0", 9 | "react-dom": "16.12.0", 10 | "react-scripts": "3.0.1" 11 | }, 12 | "devDependencies": { 13 | "typescript": "3.8.3" 14 | }, 15 | "scripts": { 16 | "start": "react-scripts start", 17 | "build": "react-scripts build", 18 | "test": "react-scripts test --env=jsdom", 19 | "eject": "react-scripts eject" 20 | }, 21 | "browserslist": [ 22 | ">0.2%", 23 | "not dead", 24 | "not ie <= 11", 25 | "not op_mini all" 26 | ] 27 | } -------------------------------------------------------------------------------- /React-Day/0002. Accordion Component with All Panel Open/src/Accordion.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import "./styles.css"; 3 | 4 | function Accordion(props) { 5 | const [panelOpenState, setPanelState] = useState([]); 6 | 7 | const togglePanel = (index) => { 8 | setPanelState({ 9 | ...panelOpenState, 10 | [index]: !panelOpenState[index] 11 | }); 12 | }; 13 | 14 | return ( 15 | 16 | {props.data.map((collapsible, index) => { 17 | return ( 18 |
19 |
togglePanel(index)}> 20 | {collapsible.heading} 21 |
22 | {panelOpenState[index] === true && ( 23 |
{collapsible.content}
24 | )} 25 |
26 | ); 27 | })} 28 |
29 | ); 30 | } 31 | 32 | export default Accordion; 33 | -------------------------------------------------------------------------------- /React-Day/0002. Accordion Component with All Panel Open/src/App.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Accordion from "./Accordion"; 3 | 4 | const data = [ 5 | { heading: "Heading 1", content: "Content of first Panel" }, 6 | { heading: "Heading 2", content: "Content of first Pane2" }, 7 | { heading: "Heading 3", content: "Content of first Pane3" }, 8 | { heading: "Heading 4", content: "Content of first Pane4" }, 9 | { heading: "Heading 5", content: "Content of first Pane5" } 10 | ]; 11 | 12 | export default function App() { 13 | return ( 14 |
15 | 16 |
17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /React-Day/0002. Accordion Component with All Panel Open/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | 4 | import App from "./App"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | ReactDOM.render( 8 | 9 |

Accordion Example

10 |
11 | 12 |
, 13 | rootElement 14 | ); 15 | -------------------------------------------------------------------------------- /React-Day/0002. Accordion Component with All Panel Open/src/styles.css: -------------------------------------------------------------------------------- 1 | .App { 2 | font-family: sans-serif; 3 | } 4 | 5 | .header { 6 | cursor: pointer; 7 | padding: 15px; 8 | background-color: skyblue; 9 | } 10 | 11 | .content { 12 | border: solid 1px skyblue; 13 | padding: 15px; 14 | } 15 | 16 | .panel { 17 | padding-bottom: 10px; 18 | } 19 | -------------------------------------------------------------------------------- /React-Day/Beginners/1. Bin2Dec-version1/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Demo 3 | 4 | https://codesandbox.io/s/bin2dec-version1-j2h94t 5 | -------------------------------------------------------------------------------- /React-Day/Beginners/1. Bin2Dec-version1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bin2dec-version1", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "main": "src/index.js", 7 | "dependencies": { 8 | "react": "18.2.0", 9 | "react-dom": "18.2.0", 10 | "react-scripts": "4.0.0" 11 | }, 12 | "devDependencies": { 13 | "@babel/runtime": "7.13.8", 14 | "typescript": "4.1.3" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test --env=jsdom", 20 | "eject": "react-scripts eject" 21 | }, 22 | "browserslist": [ 23 | ">0.2%", 24 | "not dead", 25 | "not ie <= 11", 26 | "not op_mini all" 27 | ] 28 | } -------------------------------------------------------------------------------- /React-Day/Beginners/1. Bin2Dec-version1/src/index.js: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | 4 | import App from "./App"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | const root = createRoot(rootElement); 8 | 9 | root.render( 10 |
11 | 12 |
13 | ); 14 | -------------------------------------------------------------------------------- /React-Day/Beginners/1. Bin2Dec-version1/src/styles.css: -------------------------------------------------------------------------------- 1 | .App { 2 | font-family: sans-serif; 3 | text-align: center; 4 | } 5 | -------------------------------------------------------------------------------- /React-Day/Beginners/2. Bin2Dec-version2/README.md: -------------------------------------------------------------------------------- 1 | ## DEMO 2 | 3 | https://codesandbox.io/s/bin2dec-version2-smpsu6?file=/src/App.js:0-1301 4 | -------------------------------------------------------------------------------- /React-Day/Beginners/2. Bin2Dec-version2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bin2dec-version1", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "main": "src/index.js", 7 | "dependencies": { 8 | "react": "18.2.0", 9 | "react-dom": "18.2.0", 10 | "react-scripts": "4.0.0" 11 | }, 12 | "devDependencies": { 13 | "@babel/runtime": "7.13.8", 14 | "typescript": "4.1.3" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test --env=jsdom", 20 | "eject": "react-scripts eject" 21 | }, 22 | "browserslist": [ 23 | ">0.2%", 24 | "not dead", 25 | "not ie <= 11", 26 | "not op_mini all" 27 | ] 28 | } -------------------------------------------------------------------------------- /React-Day/Beginners/2. Bin2Dec-version2/src/index.js: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | 4 | import App from "./App"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | const root = createRoot(rootElement); 8 | 9 | root.render( 10 |
11 | 12 |
13 | ); 14 | -------------------------------------------------------------------------------- /React-Day/Beginners/2. Bin2Dec-version2/src/styles.css: -------------------------------------------------------------------------------- 1 | .App { 2 | font-family: sans-serif; 3 | text-align: center; 4 | } 5 | -------------------------------------------------------------------------------- /React-Day/Beginners/3. Expandable List/README.md: -------------------------------------------------------------------------------- 1 | ![Expandable_list](https://user-images.githubusercontent.com/37787994/188385327-9ccac2db-6ee9-40c1-ae0e-d465cf310a07.gif) 2 | -------------------------------------------------------------------------------- /React-Day/Beginners/3. Expandable List/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fetch-and-display-an-expandable-list-of-activities", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "main": "src/index.js", 7 | "dependencies": { 8 | "react": "18.2.0", 9 | "react-dom": "18.2.0", 10 | "react-scripts": "4.0.0", 11 | "styled-components": "5.3.5" 12 | }, 13 | "devDependencies": { 14 | "@babel/runtime": "7.13.8", 15 | "typescript": "4.1.3" 16 | }, 17 | "scripts": { 18 | "start": "react-scripts start", 19 | "build": "react-scripts build", 20 | "test": "react-scripts test --env=jsdom", 21 | "eject": "react-scripts eject" 22 | }, 23 | "browserslist": [ 24 | ">0.2%", 25 | "not dead", 26 | "not ie <= 11", 27 | "not op_mini all" 28 | ] 29 | } -------------------------------------------------------------------------------- /React-Day/Beginners/3. Expandable List/src/App.js: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import acts from "./activities.json"; 3 | import Activity from "./components/Activity"; 4 | 5 | const App = () => { 6 | const [activities, setActivities] = useState([]); 7 | 8 | const generateActivities = () => { 9 | let idx = Math.floor(Math.random() * acts.activities.length) + 1; 10 | setActivities([...activities, acts.activities[idx]]); 11 | 12 | console.log(idx); 13 | }; 14 | 15 | return ( 16 | <> 17 | 18 | 19 | {activities.map((activity, index) => ( 20 |
21 | 22 |
23 | ))} 24 | 25 | ); 26 | }; 27 | 28 | export default App; 29 | -------------------------------------------------------------------------------- /React-Day/Beginners/3. Expandable List/src/components/Activity.jsx: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | 3 | const Activity = ({ activity }) => { 4 | const [showDetails, setShowDetails] = useState(false); 5 | 6 | return ( 7 |
8 | 11 | {activity.activity} 12 | 13 | {showDetails && ( 14 | <> 15 |

type: {activity.type}

16 |

participants: {activity.participants}

17 |

price: {activity.price}

18 |

key: {activity.key}

19 |

accessibility: {activity.accessibility}

20 | 21 | )} 22 |
23 | ); 24 | }; 25 | 26 | export default Activity; 27 | -------------------------------------------------------------------------------- /React-Day/Beginners/3. Expandable List/src/index.js: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | 4 | import App from "./App"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | const root = createRoot(rootElement); 8 | 9 | root.render( 10 | 11 | 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /React-Day/Beginners/3. Expandable List/src/styles.css: -------------------------------------------------------------------------------- 1 | .App { 2 | font-family: sans-serif; 3 | text-align: center; 4 | } 5 | -------------------------------------------------------------------------------- /React-Day/Beginners/4. Color Picker/README.md: -------------------------------------------------------------------------------- 1 | ![color-picker](https://user-images.githubusercontent.com/37787994/188385836-794016c9-f866-4051-9e89-b3b37b41bfbd.gif) 2 | -------------------------------------------------------------------------------- /React-Day/Beginners/4. Color Picker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yuelin-colorpicker", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "main": "src/index.js", 7 | "dependencies": { 8 | "react": "18.0.0", 9 | "react-dom": "18.0.0", 10 | "react-scripts": "4.0.0" 11 | }, 12 | "devDependencies": { 13 | "@babel/runtime": "7.13.8", 14 | "typescript": "4.1.3" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test --env=jsdom", 20 | "eject": "react-scripts eject" 21 | }, 22 | "browserslist": [ 23 | ">0.2%", 24 | "not dead", 25 | "not ie <= 11", 26 | "not op_mini all" 27 | ] 28 | } -------------------------------------------------------------------------------- /React-Day/Beginners/4. Color Picker/src/index.js: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | 4 | import App from "./App"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | const root = createRoot(rootElement); 8 | 9 | root.render( 10 | 11 | 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /React-Day/Beginners/4. Color Picker/src/styles.css: -------------------------------------------------------------------------------- 1 | .container_boxes { 2 | display: flex; 3 | justify-content: space-evenly; 4 | flex-wrap: wrap; 5 | } 6 | .selectors { 7 | text-align: center; 8 | } 9 | .boxes { 10 | display: flex; 11 | flex-direction: column; 12 | border: 1px solid grey; 13 | width: 200px; 14 | height: 100px; 15 | } 16 | 17 | input { 18 | height: 20px; 19 | width: 100px; 20 | } 21 | -------------------------------------------------------------------------------- /React-Day/Beginners/5. Use the context hook to display online users/README.md: -------------------------------------------------------------------------------- 1 | ![offline-online-demo](https://user-images.githubusercontent.com/37787994/188537620-8259ebc7-a4a7-4271-ae9a-f15ff5f1f22c.gif) 2 | -------------------------------------------------------------------------------- /React-Day/Beginners/5. Use the context hook to display online users/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "use-the-context-hook-to-display-online-users", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "main": "src/index.js", 7 | "dependencies": { 8 | "react": "18.2.0", 9 | "react-dom": "18.2.0", 10 | "react-scripts": "4.0.0" 11 | }, 12 | "devDependencies": { 13 | "@babel/runtime": "7.13.8", 14 | "typescript": "4.1.3" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test --env=jsdom", 20 | "eject": "react-scripts eject" 21 | }, 22 | "browserslist": [ 23 | ">0.2%", 24 | "not dead", 25 | "not ie <= 11", 26 | "not op_mini all" 27 | ] 28 | } -------------------------------------------------------------------------------- /React-Day/Beginners/5. Use the context hook to display online users/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { useContext, useEffect, useState } from "react"; 2 | import UserList from "./components/UserList"; 3 | import UsersContext from "./contexts/UsersContext"; 4 | 5 | function App() { 6 | const [userState, setUserState] = useState({ 7 | Bob: true, 8 | Gary: true, 9 | Jessica: true, 10 | Sam: true, 11 | Eric: true, 12 | }); 13 | 14 | // YOUR CODE HERE 15 | 16 | return ( 17 | 18 | 19 | 20 | ) 21 | } 22 | 23 | 24 | export default App; -------------------------------------------------------------------------------- /React-Day/Beginners/5. Use the context hook to display online users/src/contexts/UsersContext.jsx: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | 3 | const UsersContext = createContext(); 4 | 5 | export default UsersContext; -------------------------------------------------------------------------------- /React-Day/Beginners/5. Use the context hook to display online users/src/index.js: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | 4 | import App from "./App"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | const root = createRoot(rootElement); 8 | 9 | root.render( 10 | 11 | 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /React-Day/Beginners/5. Use the context hook to display online users/src/styles.css: -------------------------------------------------------------------------------- 1 | .App { 2 | font-family: sans-serif; 3 | text-align: center; 4 | } 5 | -------------------------------------------------------------------------------- /React-Day/Intermediate/01. crud_table/README.md: -------------------------------------------------------------------------------- 1 | ![crud-table](https://user-images.githubusercontent.com/37787994/188299808-6dff25a5-b0a1-4434-bb18-e095b7c4d6fd.gif) 2 | -------------------------------------------------------------------------------- /React-Day/Intermediate/01. crud_table/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "crud-table", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "main": "src/index.js", 7 | "dependencies": { 8 | "nanoid": "4.0.0", 9 | "react": "18.2.0", 10 | "react-dom": "18.2.0", 11 | "react-scripts": "4.0.0" 12 | }, 13 | "devDependencies": { 14 | "@babel/runtime": "7.13.8", 15 | "typescript": "4.1.3" 16 | }, 17 | "scripts": { 18 | "start": "react-scripts start", 19 | "build": "react-scripts build", 20 | "test": "react-scripts test --env=jsdom", 21 | "eject": "react-scripts eject" 22 | }, 23 | "browserslist": [ 24 | ">0.2%", 25 | "not dead", 26 | "not ie <= 11", 27 | "not op_mini all" 28 | ] 29 | } -------------------------------------------------------------------------------- /React-Day/Intermediate/01. crud_table/src/components/ReadOnlyRows.jsx: -------------------------------------------------------------------------------- 1 | const ReadOnlyRows = ({ contact, handleDelete, handleEditClick }) => { 2 | return ( 3 | 4 | {contact.fullName} 5 | {contact.address} 6 | {contact.phoneNumber} 7 | {contact.email} 8 | 9 | 12 | 15 | 16 | 17 | ); 18 | }; 19 | 20 | export default ReadOnlyRows; 21 | -------------------------------------------------------------------------------- /React-Day/Intermediate/01. crud_table/src/data.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "fullName": "Jenny Chan", 5 | "address": "3 waterfoot road", 6 | "phoneNumber": "333-962-7516", 7 | "email": "jenny.chan@email.com" 8 | }, 9 | { 10 | "id": 2, 11 | "fullName": "Jessica warren", 12 | "address": "4 tall town", 13 | "phoneNumber": "011-211-7516", 14 | "email": "jessica.warren@email.com" 15 | }, 16 | { 17 | "id": 3, 18 | "fullName": "Tony Frank", 19 | "address": "11 lesly road", 20 | "phoneNumber": "788-962-7516", 21 | "email": "tony.frank@email.com" 22 | }, 23 | { 24 | "id": 4, 25 | "fullName": "Jeremy Clark", 26 | "address": "333 miltown manor", 27 | "phoneNumber": "011-962-111", 28 | "email": "jeremy.clark@email.com" 29 | }, 30 | { 31 | "id": 5, 32 | "fullName": "Raymond Edwards", 33 | "address": "99 blue acres", 34 | "phoneNumber": "3231-962-7516", 35 | "email": "raymon.edwards@email.com" 36 | } 37 | ] -------------------------------------------------------------------------------- /React-Day/Intermediate/01. crud_table/src/index.js: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | 4 | import App from "./App"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | const root = createRoot(rootElement); 8 | 9 | root.render( 10 | 11 | 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /React-Day/Intermediate/01. crud_table/src/styles.css: -------------------------------------------------------------------------------- 1 | .app-container { 2 | display: flex; 3 | flex-direction: column; 4 | gap: 10px; 5 | padding: 1rem; 6 | } 7 | 8 | table { 9 | border-collapse: collapse; 10 | width: 100%; 11 | } 12 | 13 | th, 14 | td { 15 | border: 1px solid #ffffff; 16 | text-align: left; 17 | padding: 8px; 18 | font-size: 32px; 19 | } 20 | 21 | th { 22 | background-color: rgb(117, 201, 250); 23 | } 24 | 25 | td { 26 | background-color: rgb(205, 235, 253); 27 | } 28 | 29 | form { 30 | display: flex; 31 | gap: 5px; 32 | } 33 | 34 | form td:last-child { 35 | display: flex; 36 | justify-content: space-evenly; 37 | } 38 | 39 | form * { 40 | font-size: 28px; 41 | } 42 | -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/README.md: -------------------------------------------------------------------------------- 1 | ![crud_todo](https://user-images.githubusercontent.com/37787994/188299885-c9cd64ec-9be2-4023-8e88-af7c4ea06fc1.gif) 2 | -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/React-Day/Intermediate/02. crud_todo/public/favicon.ico -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/React-Day/Intermediate/02. crud_todo/public/logo192.png -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cheatsheet1999/FrontEndCollection/bf42ce3703304abc1c3cffcdf35211563ec1ff7b/React-Day/Intermediate/02. crud_todo/public/logo512.png -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | @keyframes App-logo-spin { 27 | from { 28 | transform: rotate(0deg); 29 | } 30 | to { 31 | transform: rotate(360deg); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/src/components/addTodo.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | 3 | const AddTodo = (props) => { 4 | const [input, setInput] = useState(""); 5 | const { addTodo } = props; 6 | 7 | const handleInput = (e) => { 8 | setInput(e.target.value); 9 | }; 10 | 11 | const handleSubmit = (e) => { 12 | e.preventDefault(); 13 | if (input !== "") { 14 | addTodo(input); 15 | setInput(""); 16 | } 17 | }; 18 | 19 | return ( 20 |
21 |
22 | 23 | 24 |
25 |
26 | ); 27 | }; 28 | 29 | export default AddTodo; 30 | -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/src/components/filter.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const Filter = (props) => { 4 | const { filter, handleFilter } = props; 5 | 6 | return ( 7 |

8 | Show: 9 | {filter === "all" ? ( 10 | All 11 | ) : ( 12 | 13 | )} 14 | 15 | {filter === "active" ? ( 16 | Active 17 | ) : ( 18 | 19 | )} 20 | 21 | {filter === "completed" ? ( 22 | Completed 23 | ) : ( 24 | 25 | )} 26 |

27 | ); 28 | }; 29 | 30 | export default Filter; 31 | -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/src/components/todo.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | const Todo = (props) => { 4 | const { todo, onClick } = props; 5 | return ( 6 |
  • 10 | {todo.text} 11 |
  • 12 | ); 13 | }; 14 | 15 | export default Todo; 16 | -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/src/components/todolist.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Todo from "./todo"; 3 | 4 | const Todolist = (props) => { 5 | const { todos, filter, handleToggle } = props; 6 | 7 | let all_todos; 8 | if (filter === "all") { 9 | all_todos = todos; 10 | } else if (filter === "active") { 11 | all_todos = todos.filter((todo) => !todo.completed); 12 | } else if (filter === "completed") { 13 | all_todos = todos.filter((todo) => todo.completed); 14 | } else { 15 | all_todos = todos; 16 | } 17 | 18 | return ( 19 |
      20 | {all_todos.map((todo) => ( 21 | handleToggle(todo.id)} /> 22 | ))} 23 |
    24 | ); 25 | }; 26 | 27 | export default Todolist; 28 | -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", 5 | "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", 6 | sans-serif; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | code { 12 | font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", 13 | monospace; 14 | } 15 | -------------------------------------------------------------------------------- /React-Day/Intermediate/02. crud_todo/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | 10 | -------------------------------------------------------------------------------- /React-Day/Intermediate/03. Display a to-do list with togglable subtasks/README.md: -------------------------------------------------------------------------------- 1 | ![Sep-05-2022 23-23-33](https://user-images.githubusercontent.com/37787994/188561610-fb262bb6-550e-4db3-85cc-fd98480a035d.gif) 2 | -------------------------------------------------------------------------------- /React-Day/Intermediate/03. Display a to-do list with togglable subtasks/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "display-a-to-do-list-with-togglable-subtasks", 3 | "version": "1.0.0", 4 | "description": "", 5 | "keywords": [], 6 | "main": "src/index.js", 7 | "dependencies": { 8 | "react": "18.2.0", 9 | "react-dom": "18.2.0", 10 | "react-scripts": "4.0.0" 11 | }, 12 | "devDependencies": { 13 | "@babel/runtime": "7.13.8", 14 | "typescript": "4.1.3" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test --env=jsdom", 20 | "eject": "react-scripts eject" 21 | }, 22 | "browserslist": [ 23 | ">0.2%", 24 | "not dead", 25 | "not ie <= 11", 26 | "not op_mini all" 27 | ] 28 | } -------------------------------------------------------------------------------- /React-Day/Intermediate/03. Display a to-do list with togglable subtasks/src/App.js: -------------------------------------------------------------------------------- 1 | import CheckList from "./components/CheckList"; 2 | 3 | export default function App() { 4 | const INITIAL_LIST = { 5 | "Organize closet": [ 6 | { "Donate old clothes and shoes": false }, 7 | { "Buy new shelf": false }, 8 | { "Put in shelf by color": false } 9 | ], 10 | "Finish homework": [ 11 | { "Finish math homework": false }, 12 | { "Finish science homework": false }, 13 | { "Finish Reactjs homework": false } 14 | ], 15 | "Achieve nirvana": [ 16 | { "Meditate a little": false }, 17 | { "Gain some wisdom": false } 18 | ] 19 | }; 20 | 21 | return ( 22 |
    23 | 24 |
    25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /React-Day/Intermediate/03. Display a to-do list with togglable subtasks/src/index.js: -------------------------------------------------------------------------------- 1 | import { StrictMode } from "react"; 2 | import { createRoot } from "react-dom/client"; 3 | 4 | import App from "./App"; 5 | 6 | const rootElement = document.getElementById("root"); 7 | const root = createRoot(rootElement); 8 | 9 | root.render( 10 | 11 | 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /React-Day/Intermediate/03. Display a to-do list with togglable subtasks/src/styles.css: -------------------------------------------------------------------------------- 1 | .App { 2 | font-family: sans-serif; 3 | text-align: center; 4 | } 5 | -------------------------------------------------------------------------------- /Web-Note/Execution Context.md: -------------------------------------------------------------------------------- 1 | ## Thread of Executions 2 | 3 | Screen Shot 2021-12-19 at 12 28 17 4 | 5 | As we know, inputNumber is **parameter**, and 3 is ***argument*** 6 | 7 | ![IMG_0907](https://user-images.githubusercontent.com/37787994/146833714-f6f466ba-45a7-4d3c-8ce2-8de3ea0f468a.jpg) 8 | 9 | 10 | We only have **One** threads of execution, that means we only do **One** thing at a time 11 | 12 | 13 | 14 | ## Callstack: 15 | 16 | As soon as we hit return, current callstack poped out. 17 | 18 | **There is always a global() function on the bottom of the callstack** 19 | ![IMG_0908](https://user-images.githubusercontent.com/37787994/146833726-4ba757a4-bf8d-409d-b877-f30f20dba154.jpg) 20 | -------------------------------------------------------------------------------- /Web-Note/Sorting Algorithms.md: -------------------------------------------------------------------------------- 1 | ![Slide1](https://user-images.githubusercontent.com/37787994/236990298-cd9ab7b8-7be7-469c-9fcb-c688485fc84b.png) 2 | -------------------------------------------------------------------------------- /Web-Note/Throttling and Debouncing.md: -------------------------------------------------------------------------------- 1 | Throttling will delay executing a function. It will reduce the notifications of an event that fires multiple times. 2 | 3 | Debouncing will bunch a series of sequential calls to a function into a single call to that function. It ensures that one notification is made for an event that fires multiple times. 4 | 5 | [Visualization](http://demo.nimius.net/debounce_throttle/) 6 | Screen Shot 2022-01-30 at 16 50 31 7 | 8 | 9 | --------------------------------------------------------------------------------