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
const gulp = require('gulp'); | |
const less = require('gulp-less'); | |
// Where your Less files are located | |
const srcDir = './src/assets/style/less'; | |
// Where your CSS files will be generated | |
const dstDir = './src/assets/style/css'; | |
gulp.task('less', function() { | |
gulp |
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
ga('send', 'event', 'Category', 'Action'); // Minimal | |
ga('send', 'event', 'Category', 'Action', 'Label', 'Value'); // Full |
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
function print() { | |
const filename = 'ThisIsYourPDFFilename.pdf'; | |
html2canvas(document.querySelector('#nodeToRenderAsPDF')).then(canvas => { | |
let pdf = new jsPDF('p', 'mm', 'a4'); | |
pdf.addImage(canvas.toDataURL('image/png'), 'PNG', 0, 0, 211, 298); | |
pdf.save(filename); | |
}); | |
} |
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
class Pizza { | |
protected Pizza base; | |
Pizza() {} | |
Pizza(Pizza base) { | |
this.base = base; | |
} | |
public int cost() { |
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
import java.util.Observer; | |
import java.util.Observable; | |
class Margherita extends Observable { | |
private boolean isOutOfDate; | |
Margherita() { | |
this.isOutOfDate = false; | |
} | |
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
<div className="content"> | |
{ | |
tabs.map( | |
(tab, index) => <div key={index} className={index === active ? 'shown':'hidden'}> | |
{tab.component} | |
</div> | |
); | |
} | |
</div> |
NewerOlder