PR/CR:
- Item.
🔬 V&V/Q&A:
- Item.
/** | |
* Checks current URL, executes specified content only on non-"blacklisted" URLs. | |
*/ | |
(function () { | |
if (!/^\/url-segment-here>|^\/another-url-segment-here|^\/as-many-url-segments-as-needed-here/.test(window.location.pathname)) { | |
} | |
})(); |
var solution = function (arr) { | |
"use strict"; | |
// Cache array length | |
var len = arr.length, | |
// Default value for no unique value | |
result = -1; | |
// Iterate over array | |
for(var i=0; i < len; i++) { |
// Creates a "class"(object) with 'helper' array methods | |
var arrayExtender = { | |
// Creates a method that takes an array and an integer as arguments and returns | |
// a new array composed of the bigger number of each of a series of windows on the | |
// array defined by the 'n' parameter | |
// E.g. arrayExtender.winMax([1,4,3,1,5], 2); returns [4, 4, 3, 5], an array composed of | |
// the bigger number of each of the 2 element size ('n') 'windows': [1,4],[4,3],[3,1],[1,5] | |
winMax : function (array, n) { |
// Will traverse a tree passed as an argument. The function will add the number values contained on each node when available. | |
function traverseAndAdd(tree) { | |
// Init var to contain sum of values | |
var sum = 0; | |
// Function will traverse nodes | |
var recursiveCrawl = function (branch) { | |
for (i in branch) { |
/** | |
* Use a lookbehind to make sure we dont accidentaly find ` = ` in the value. | |
* Prefer the likeliness of missing positive, than getting false positives. | |
*/ | |
(?<=[a-zA-Z].)+((\s)=(\s)){1}(?=[a-zA-Z])+ |
{ | |
"remove-empty-rulesets": true, | |
"always-semicolon": true, | |
"color-case": "lower", | |
"block-indent": " ", | |
"color-shorthand": true, | |
"element-case": "lower", | |
"eof-newline": false, | |
"leading-zero": true, | |
"quotes": "double", |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mx="http://schemas.microsoft.com/office/mac/excel/2008/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xm="http://schemas.microsoft.com/office/excel/2006/main"><sheetViews><sheetView workbookViewId="0"/></sheetViews><sheetFormatPr customHeight="1" defaultColWidth="14.43" defaultRowHeight="15.75"/><cols><col customWidth="1" min="1" max="1" width="3.0"/><col customWidth="1" min="2" max="2" width="33.43"/><col customWidth="1" min="3" max="3" width="7.0"/><col customWidth="1" min="4" max="4" width="6.14"/><col customWidth="1" min="5" max="5" width="6.0"/><col customWidth="1" m |
I hereby claim:
To claim this, I am signing this object: