What do you think the following code does?
function fn(msg, time) {
setTimeout(function() {
console.log(msg);
}, time);
}
fn('it works', 1000);
$ vagrant ssh | |
$ mysql -u root -p | |
mysql > CREATE DATABASE magento; | |
mysql > GRANT ALL ON magento.* to magento@localhost IDENTIFIED BY 'magento'; | |
mysql > exit |
Tracing dependencies for: ../common | |
Tracing dependencies for: ../page1 | |
Tracing dependencies for: ../page2 | |
Tracing dependencies for: jquery | |
js/lib/../common.js | |
---------------- |
define(function ( require ) { | |
var $ = require( 'jquery' ), | |
_ = require( 'underscore' ), | |
Backbone = require( 'backbone' ), | |
lib = require( './lib' ), | |
controller = require( './controller/c1' ), | |
model = require( './model/m1' ); | |
//A fabricated API to show interaction of | |
//common and specific pieces. |
Tracing dependencies for: ../common | |
Tracing dependencies for: ../page1 | |
Tracing dependencies for: ../page2 | |
js/lib/../common.js | |
---------------- | |
js/lib/../common.js | |
js/lib/jquery.js |
// View: NewWineView | |
window.WineNewView = Backbone.View.extend({ | |
template: _.template( $('#tpl-wine-new').html() ), | |
events: { | |
'change input': 'wineChange', | |
'click .save': 'wineSave', | |
'click .cancel': 'wineCancel' | |
}, |
What do you think the following code does?
function fn(msg, time) {
setTimeout(function() {
console.log(msg);
}, time);
}
fn('it works', 1000);
// | |
// The code in this file should: | |
// - build a thumbnail container | |
// - populate the container with thumbnails | |
// - when a thumbnail is clicked, the main image should be updated with the appropriate image | |
// | |
// This code should be optional, and initiate itself if included. | |
// | |
(function(){ | |
var thumbContainer = document.createDocumentFragment(); |
(function(\$) { | |
${0:// Stuff to do as soon as the DOM is ready. Use \$() w/o colliding with other libs;} | |
})(jQuery); |
/* | |
Form Elements | |
-- Styled to look like native Safari on OS X. | |
-- Drop-down <select> menus are unaffected. | |
-- Buttons are unaffected. Native OS style. | |
*/ | |
input, | |
button, | |
select, |