This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Rafeh' | |
| """ | |
| Program: recursive_vs_iterative | |
| Description: This program contains a few common iterative functions and their solutions. More importantly, | |
| it also contains their counter-part recursive functions and their solutions. This is important in visualizing | |
| side by side the differences between iterative implementations and recursive implementations of a given function. | |
| Notice that recursive solutions tend to be more elegant! | |
| Version: 3.4 | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def merge(lhs, rhs): | |
| lhs, rhs = lhs[:], rhs[:] | |
| merged_list = [] | |
| while bool(lhs) and bool(rhs): | |
| if lhs[0] <= rhs[0]: | |
| merged_list.append(lhs.pop(0)) | |
| else: | |
| merged_list.append(rhs.pop(0)) | |
| return merged_list + lhs + rhs |
Forked from Daniel Williams's Pen React JS Weather App.
Forked from Daniel Williams's Pen React JS Weather App.
Forked from Daniel Williams's Pen React JS Weather App.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const React = {}; | |
| /** | |
| * ReactElements are lightweight objects which contain information necessary to | |
| * create the equivalent DOM nodes. All JSX tags are transformed into functions | |
| * that return instances of this class. | |
| * Note that the decision to actual create those nodes and insert them into the | |
| * document hasn't been made yet: it is possible that that might never happen. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Create an event emitter that goes like this | |
| * emitter = new Emitter(); | |
| * | |
| * Allows you to subscribe to some event | |
| * sub1 = emitter.subscribe('function_name', callback1); | |
| * (you can have multiple callbacks to the same event) | |
| * sub2 = emitter.subscribe('function_name', callback2); | |
| * | |
| * You can emit the event you want with this api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created with IntelliJ IDEA. | |
| * User: Gong Li | |
| * Date: 5/26/13 | |
| * Time: 12:23 PM | |
| * Implement a priority queue using a heap | |
| * The heap is implemented using an array indexed from 1 | |
| */ | |
| public class PriorityQueueUsingHeap<T extends Comparable<T>> { | |
| T[] arr; |
See also 📢 Dead simple tweetable JavaScript Emitter pattern module using Map (ES2015) which uses this package.
Browser compatibility (all)
| Chrome* | Edge | FF | IE | Opera | Safari | iOS |
|---|---|---|---|---|---|---|
| 38 | 12 | 13 | -* | 25 | 7.1 | 8 |
Notes:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package src.LinkedList; | |
| public class LinkedList { | |
| public Node head; | |
| public int listCount; | |
| public LinkedList(){ | |
| head = new Node(0); | |
| listCount = 0; | |
| } |
I followed the instructions in this blog post Multiple Fonts: Alternative to Operator Mono in VSCode, but did not see any changes made to VS Code. After digging a bit, I discovered that all the CSS class names had changed. They’re now e.g. .mtk13, .mtk16 { … }.
- Ensure it’s a file URL e.g.
{ "vscode_custom_css.imports": [ "file:///Users/Brian/Desktop/vscode-style.css" ] } - If you move the location of your file and update your user settings with the new location, you will need to disable and enable custom CSS cmd+shift+p.
- Also, anytime you change the style in your custom CSS file, you need to disable, then re-enable the extension.
OlderNewer