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
Jakob Nielsen and Robert Miller | |
* https://www.nngroup.com/articles/website-response-times/ | |
* http://yusufarslan.net/sites/yusufarslan.net/files/upload/content/Miller1968.pdf | |
How perceived perf can impact User Engagement | |
* https://www.wsj.com/articles/financial-times-hopes-speedy-new-website-will-boost-subscribers-1475553602 | |
* https://www.doubleclickbygoogle.com/articles/mobile-speed-matters/ | |
* https://digiday.com/media/gq-com-cut-page-load-time-80-percent/ | |
* https://www.soasta.com/blog/introducing-a-new-web-performance-metric-for-media-sites-activity-impact-score/ | |
* https://www.soasta.com/blog/google-mobile-web-performance-study/ |
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
var Build = require("wf-build"); | |
module.exports = { | |
plugins: [ | |
new Build.webpack({ options }) | |
] | |
}; |
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
Given 2 sorted arrays, merge them into one single sorted array and print its elements to standard output. | |
Expected complexity: O(N) | |
Example input: | |
a: 2 3 7 8 8 | |
b: 7 8 13 | |
Example output: | |
2 3 7 7 8 8 8 13 |
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
Given an array containing all numbers from 1 to N with the exception of one print the missing number to the standard output. | |
Example input: | |
array: 5 4 1 2 | |
Example output: | |
3 |
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
VHS.plugin('name_your_plugin', { | |
_initialize: function(){ | |
//method is called when the player is ready and the plugin was registered | |
this._player //player instance | |
this._options //options used to configure the player | |
this._element //jQuery element: video tag or object tag | |
this._data //video data that comes from the internal video/playlist api | |
this._container //player wrapper jquery element | |
}, | |
yourMethod: function(e){ |
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
var Robot = function(robot){ | |
robot.turnLeft(robot.angle % 90); | |
robot.turnGunRight(90); | |
robot.clone(); | |
this.direction = 1; | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(1); | |
if (robot.parentId) { |
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
//FightCode can only understand your robot | |
//if its class is called robotClass | |
var robotClass = function(){ | |
}; | |
robotClass.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(100); | |
robot.rotateCannon(360); |