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
| interface SvgNineSliceBorderProps { | |
| // Source image URL | |
| imageUrl: string; | |
| // Source image width in pixels | |
| srcWidth: number; | |
| // Source image height in pixels | |
| srcHeight: number; | |
| // Slice markers in source pixels | |
| slices: [number, number, number, number]; | |
| // Border thickness in output units |
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 COLOURS = [ '#60F0C0', '#FF360E', '#F0D442' ]; | |
| var radius = 0; | |
| var demo = Sketch.create({ | |
| container: document.getElementById( 'container' ), | |
| autoclear: false, | |
| setup: function() { |
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 themeA = { name: 'Theme A', caption: { color: 'red' } }; | |
| var themeB = { name: 'Theme B', caption: { color: 'green' } }; | |
| var themeC = { name: 'Theme C', color: 'blue', caption: {} }; | |
| var themeD = { name: 'Theme D' }; | |
| // Test | |
| var a = select( themeA, ['caption.color', 'color'], 'default' ); | |
| var b = select( themeB, ['caption.color', 'color'], 'default' ); | |
| var c = select( themeC, ['caption.color', 'color'], 'default' ); | |
| var d = select( themeD, ['caption.color', 'color'], 'default' ); |
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
| # myscript.py | |
| import subprocess | |
| subprocess.call(['alias', 'my_ls=ls']) | |
| # In the bash shell | |
| $ python myscript.py | |
| # Can I use the my_ls alias here? | |
| $ my_ls |