duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| #!/bin/bash | |
| # | |
| # Sanitizes all files in the given path | |
| # and makes them lowercase too. | |
| # | |
| # param 1: source directory | |
| # param 2: target directory | |
| shopt -s extglob; |
| <?php | |
| function longest_common_substring($words) | |
| { | |
| $words = array_map('strtolower', array_map('trim', $words)); | |
| $sort_by_strlen = create_function('$a, $b', 'if (strlen($a) == strlen($b)) { return strcmp($a, $b); } return (strlen($a) < strlen($b)) ? -1 : 1;'); | |
| usort($words, $sort_by_strlen); | |
| // We have to assume that each string has something in common with the first | |
| // string (post sort), we just need to figure out what the longest common | |
| // string is. If any string DOES NOT have something in common with the first | |
| // string, return false. |
| // | |
| // Regular Expression for URL validation | |
| // | |
| // Author: Diego Perini | |
| // Updated: 2010/12/05 | |
| // License: MIT | |
| // | |
| // Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
| // | |
| // Permission is hereby granted, free of charge, to any person |
Visit my blog or connect with me on Twitter
git init
or
| // Takes string of Note + Octave | |
| // Example: | |
| // var frequency = getFrequency('C3'); | |
| var getFrequency = function (note) { | |
| var notes = ['A', 'A#', 'B', 'C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#'], | |
| octave, | |
| keyNumber; | |
| if (note.length === 3) { |
jQuery source is now authored using ES6 modules. It's possible to use them directly in the browser without any build process.
To test it locally, first clone the jQuery repository:
git clone [email protected]:jquery/jquery.gitThen, write the following index.html file:
| const { PurgeCSS } = require('purgecss'); | |
| /** | |
| * Remove any CSS not used on the page and inline the remaining CSS in the | |
| * <head>. | |
| * | |
| * @see {@link https://github.com/FullHuman/purgecss} | |
| */ | |
| eleventyConfig.addTransform('purge-and-inline-css', async (content, outputPath) => { | |
| if (process.env.ELEVENTY_ENV !== 'production' || !outputPath.endsWith('.html')) { |
| /* | |
| limitLoop.js - limit the frame-rate when using requestAnimation frame | |
| Released under an MIT license. | |
| When to use it? | |
| ---------------- | |
| A consistent frame-rate can be better than a janky experience only | |
| occasionally hitting 60fps. Use this trick to target a specific frame- | |
| rate (e.g 30fps, 48fps) until browsers better tackle this problem |