Base2Tone motel
A0
A2
A7
B0
B2
B7
C0
C2
C7
D0
D2
D7
HTML
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Demo</title>
<meta name="description" content="Demo">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="/normalize.css">
<link rel="stylesheet" href="/main.css">
CSS
/* comment */
h1 {
font-size: 2em;
margin: 0.67em 0;
}
mark {
background: #ff0;
color: #000;
}
small {
font-size: 80% !important;
}
Sass scss
.visuallyhidden {
// Hide only visually, but have it available for screen readers:
// http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.inner-wrap {
max-width: 50em;
margin: 0 auto;
padding-left: emCalc(24);
padding-right: emCalc(24);
}
@media only screen and (min-width: 550px) {
article {
ul {
list-style: circle;
}
ol {
list-style: decimal;
}
}
.inner-wrap {
padding-left: emCalc(48);
padding-right: emCalc(48);
}
}
Javascript
/*! loadJS: load a JS file asynchronously. [c]2014 @scottjehl, Filament Group, Inc. (Based on http://goo.gl/REQGQ by Paul Irish). Licensed MIT */
(function( w ){
var loadJS = function( src, cb ){
"use strict";
var ref = w.document.getElementsByTagName( "script" )[ 0 ];
var script = w.document.createElement( "script" );
script.src = src;
script.async = true;
ref.parentNode.insertBefore( script, ref );
if (cb && typeof(cb) === "function") {
script.onload = cb;
}
return script;
};
// commonjs
if( typeof module !== "undefined" ){
module.exports = loadJS;
}
else {
w.loadJS = loadJS;
}
}( typeof global !== "undefined" ? global : this )); }
function foo(bar) {
var a = 42,
b = 'Prism';
return a + bar(b);
}
PHP
<?php namespace App\Services;
use App\User;
use Validator;
use Illuminate\Contracts\Auth\Registrar as RegistrarContract;
class Registrar implements RegistrarContract {
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
public function validator(array $data)
Ruby
##
# Array ISO Test
assert('Array', '15.2.12') do
assert_equal(Class, Array.class)
end
assert('Array inclueded modules', '15.2.12.3') do
assert_true(Array.include?(Enumerable))
end
assert('Array.[]', '15.2.12.4.1') do
assert_equal([1, 2, 3], Array.[](1,2,3))
end
Python
class _BaseHTMLProcessor(sgmllib.SGMLParser):
elements_no_end_tag = ['area', 'base', 'basefont', 'br', 'col', 'frame', 'hr',
'img', 'input', 'isindex', 'link', 'meta', 'param']
_r_barebang = re.compile(r'<!((?!DOCTYPE|--|\[))', re.IGNORECASE)
_r_bareamp = re.compile("&(?!#\d ;|#x[0-9a-fA-F] ;|\w ;)")
_r_shorttag = re.compile(r'<([^<\s] ?)\s*/>')
def __init__(self, encoding):
self.encoding = encoding
if _debug: sys.stderr.write('entering BaseHTMLProcessor, encoding=%s\n' % self.encoding)
sgmllib.SGMLParser.__init__(self)