PR/CR:
- Item.
🔬 V&V/Q&A:
- Item.
// 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) { |
/*----------------------------------------------------------------------------- | |
File: square-canvas.jsx | |
Version: 1.0 | |
Author: Juan Garcia | |
Language: JavaScript/ExtendScript | |
-----------------------------------------------------------------------------*/ | |
var inputFolder = Folder.selectDialog("Select a folder"); | |
var fileList = inputFolder.getFiles("*.PNG"); // Define type of file to manipulate |
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++) { |
/** | |
* 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)) { | |
} | |
})(); |