This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Dataclass { | |
| constructor(props, defaults, required) { | |
| if (props) { | |
| for (const key in props) { | |
| if (Object.hasOwnProperty.call(props, key)) { | |
| this[key] = props[key]; | |
| } | |
| } | |
| } |
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
| var radius = 40; | |
| var circle = new Path.Circle({ | |
| center: new Point(0,0), | |
| radius: radius, | |
| fillColor: 'blue' | |
| }); | |
| var X = view.center.x; | |
| var Y = view.center.y; |
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
| var EventType = { | |
| mouseUp: 1, | |
| mouseDown: 2, | |
| undo: 3, | |
| redo: 4 | |
| } | |
| function Event(type, payload) { | |
| this.type = type; | |
| this.payload = payload; |
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 main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| shorthand() | |
| } |
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 main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| print("Hello, playground") | |
| fmt.Println(sum(1, 2)) | |
| fmt.Println(mul(10, 5)) |