-
Only lambdas can be closures, not named subroutines.
-
The idiomatic way of getting a list’s length is to assign it to a scalar.
my @coolList = (1, 2, 3); my $coolListLength = @coolList;
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
// vanilla JS | |
var event = document.createEvent("UIEvents"); | |
event.initUIEvent("change", true, true); | |
document.querySelector('input[type=file]').dispatchEvent(event); | |
// jQuery | |
$('input[type=file]').trigger('change'); |
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
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="description" content="HTML5 Webpage"> | |
<title>HTML5 Webpage</title> | |
</head> | |
<body> | |
</body> |
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
{ | |
"draw_white_space": "all", | |
"font_size": 9, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"tab_size": 4, | |
"translate_tabs_to_spaces": true, | |
"detect_indentation": 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no"> | |
<title>Tarot.com: Undergoing Maintenance</title> | |
<style type="text/css"> | |
@font-face { | |
font-family: 'Jenna Sue'; | |
font-style: normal; |
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
define([ | |
'jquery', | |
'underscore', | |
'backbone', | |
], function ($, _, Backbone) { | |
'use strict'; | |
var BackToTopView = Backbone.View.extend({ | |
initialize: function (options) { | |
_(this.options).extend(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
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
// CSS "namespacing" | |
namespaceFoo { | |
@at-root { | |
&-bar { | |
content: 'bar'; |
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 class="parent"> | |
parent | |
<div class="child">child</div> | |
<div class="child-foo">child-foo</div> | |
</div> |
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
// ---- | |
// Sass (v3.3.8) | |
// Compass (v1.0.0.alpha.19) | |
// ---- | |
@mixin element-compound($selector) { | |
$elements: a, p, div; | |
@each $el in $elements { | |
@at-root #{$el + $selector} { | |
@extend #{$selector}; |