This file contains 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
// TODO this will be removed after: https://github.com/angular/angular-cli/issues/8046 | |
const replace = require('replace-in-file'); | |
const filesToFix = [ | |
{ | |
files: 'node_modules/@angular/cli/models/webpack-configs/typescript.js', | |
from: [/\.ts\$/g, /\\.ts\)\$/], | |
to: ['.(ts|tsx)$', '\\.ts|\\.tsx)$'] | |
}, | |
{ |
This file contains 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
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |
This file contains 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
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
This file contains 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
contract Database{ | |
mapping(uint => uint) public _data; | |
mapping(address => bool) _owners; | |
function Database(address[] owners){ //Called once at creation, pass in initial owners | |
for(uint i; i<owners.length; i++){ | |
_owners[owners[i]]=true; | |
} | |
} | |
This file contains 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
/** | |
* Uses canvas.measureText to compute and return the width of the given text of given font in pixels. | |
* | |
* @param {String} text The text to be rendered. | |
* @param {String} font The css font descriptor that text is to be rendered with (e.g. "bold 14px verdana"). | |
* | |
* @see http://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393 | |
*/ | |
function getTextWidth(text, font) { | |
// if given, use cached canvas for better performance |