/*
Convenience shorthands.
556661
public function exception(\Throwable $throwable)
    {
        try {
            if (@Application::getSettings()->logging->exceptions) {
                $this->error('[EXCEPTION] ' . $throwable . PHP_EOL . $throwable->getTraceAsString());
            }
        } catch (SettingsException $throwable) {
            // No setting present, throwable will not be logged.
        }
    }
1118136
function expandShorthand(shorthand) {
  var removeAbbreviation = function removeAbbreviation(short, abbreviation) {
    return short.split(abbreviation)[1];
  };

  if (shorthand.indexOf('github:') === 0) {
    return 'git@github.com:' + removeAbbreviation(shorthand, 'github:') + '.git';
  }

  if (shorthand.indexOf('bitbucket:') === 0) {
    return 'git@bitbucket.org:' + removeAbbreviation(shorthand, 'bitbucket:') + '.git';
  }

  if (shorthand.indexOf('gitlab:') === 0) {
    return 'git@gitlab.com:' + removeAbbreviation(shorthand, 'gitlab:') + '.git';
  }

  return shorthand;
}
171352
def do_shortcuts(self, _: argparse.Namespace) -> None:
        """"""
        result = "\n".join('%s: %s' % (sc[0], sc[1]) for sc in sorted(self.shortcuts))
        self.poutput("Shortcuts for other commands:\n{}\n".format(result))
810650
function from_shorthand(shorthand_string, slash) {
	if(typeof shorthand_string == 'array'){
		var res = [];
		for(var i = 0; i < shorthand_string.length; i++) {
			res.push(from_shorthand(shorthand_string[i]));
		};
		return res;
	}
	if(__indexOf.call(["NC", "N.C."], shorthand_string) >= 0) {
		return [];
	}

	shorthand_string = shorthand_string.replace('min', 'm');
	shorthand_string = shorthand_string.replace('mi', 'm');
	shorthand_string = shorthand_string.replace('-', 'm');

	shorthand_string = shorthand_string.replace('maj', 'M');
	shorthand_string = shorthand_string.replace('ma', 'M');

	if(!notes.is_valid_note(shorthand_string[0])) {
		throw "NoteFormatError: Unrecognised note '" + shorthand_string[0] + "' in chord '" + shorthand_string + "'";
	}

	name = shorthand_string[0];

	for (_i = 0, _len = shorthand_string.slice(1, shorthand_string.length).length; _i < _len; _i++) {
		n = shorthand_string.slice(1, shorthand_string.length)[_i];
		if (n === '#') {
			name += n;
		} else if (n === 'b') {
			name += n;
		} else {
			break;
		}
	}

	slash_index = -1;
	s = 0;
	rest_of_string = shorthand_string.slice(name.length, shorthand_string.length);
	for (_i = 0, _len = rest_of_string.length; _i < _len; _i++) {
		n = rest_of_string[_i];
		if (n === '/') {
			slash_index = s;
		} else if (n === '|') {
			return from_shorthand(shorthand_string.slice(0, name.length + s), from_shorthand(shorthand_string.slice(name.length + s + 1, shorthand_string.length)));
		}
		s += 1;
	}

	if(slash_index != -1 && !(__indexOf.call(["m/M7", "6/9", "6/7"], rest_of_string) >= 0)) {
		res = shorthand_string.slice(0, name.length + slash_index);
		return from_shorthand(shorthand_string.slice(0, name.length + slash_index), shorthand_string.slice(name.length + slash_index + 1, shorthand_string.length))
	}

	shorthand_start = name.length;

	short_chord = shorthand_string.slice(shorthand_start, shorthand_string.length);
	if(chord_shorthand.hasOwnProperty(short_chord)) {
		res = chord_shorthand[short_chord](name);
		if(slash != null) {
			if(typeof slash == 'string') {
				if(notes.is_valid_note(slash)) {
					res.unshift(slash);
				} else {
					throw "NoteFormatError: Unrecognised note '" + slash + "' in slash chord '" + shorthand_string + "'";
				}
			} else if(typeof slash == 'object') {
				r = slash;
				for (_i = 0, _len = res.length; _i < _len; _i++) {
					n = res[_i];
					if (n !== r[r.length-1]) {
						r.push(n);
					}
				}
				return r;
			}
		}
		return res;
	} else {
		throw "FormatError: Unknown shorthand: " + shorthand_string;
	}
}
831417
public function reverse_left_and_right_4value_radius_shorthands($property, $value) {
		$shorthands = & $this->parser->data['csstidy']['radius_shorthands'];
		if (isset($shorthands[$property])) {
			$v = $this->dissolve_4value_radius_shorthands($property, $value);
			if ($v[$shorthands[$property][0]] !== $v[$shorthands[$property][1]]
			  or $v[$shorthands[$property][2]] !== $v[$shorthands[$property][3]]) {
				$r = array(
					$shorthands[$property][0] => $v[$shorthands[$property][1]],
					$shorthands[$property][1] => $v[$shorthands[$property][0]],
					$shorthands[$property][2] => $v[$shorthands[$property][3]],
					$shorthands[$property][3] => $v[$shorthands[$property][2]],
				);
				$v = $this->merge_4value_radius_shorthands($r);
				if (isset($v[$property])) {
					return $v[$property];
				}
			}
		}
		return $value;
	}
467558
function getShorthandName(fullname, prefix) {
    if (fullname[0] === "@") {
        let matchResult = new RegExp(`^(@[^/]+)/${prefix}$`, "u").exec(fullname);

        if (matchResult) {
            return matchResult[1];
        }

        matchResult = new RegExp(`^(@[^/]+)/${prefix}-(.+)$`, "u").exec(fullname);
        if (matchResult) {
            return `${matchResult[1]}/${matchResult[2]}`;
        }
    } else if (fullname.startsWith(`${prefix}-`)) {
        return fullname.slice(prefix.length + 1);
    }

    return fullname;
}
518476
def _get_shortcut_string(shortcut):
    """"""
    if shortcut is None:
        return ''
    if isinstance(shortcut, (tuple, list)):
        return ', '.join([_get_shortcut_string(s) for s in shortcut])
    if isinstance(shortcut, string_types):
        if hasattr(QKeySequence, shortcut):
            shortcut = QKeySequence(getattr(QKeySequence, shortcut))
        else:
            return shortcut.lower()
    assert isinstance(shortcut, QKeySequence)
    s = shortcut.toString() or ''
    return str(s).lower()
532708
function short(nodes, context, recur, wrap) {
    context.write(WRAPPERS[wrap].left);
    context.indentIn();
    context.write('\n');

    for (var i = 0; i < nodes.length; i++) {
        context.write(context.getIndent());
        recur(nodes[i]);

        if (nodes[i + 1]) {
            context.write(',\n');}}



    context.indentOut();
    context.write('\n', context.getIndent(), WRAPPERS[wrap].right);}
757935
private static String shortCut(String name, int level) {
        String sa[] = name.split(NAME_PART_SEPARATOR);
        if (sa.length < 2) {
            return null;
        }
        S.Buffer sb = S.buffer();
        switch (level) {
            case 0:
                sb.append(".");
                for (String s : sa) {
                    sb.append(s.charAt(0));
                }
                return sb.toString();
            case 1:
                for (String s : sa) {
                    sb.append(s.charAt(0)).append(".");
                }
                sb.deleteCharAt(sb.length() - 1);
                return sb.toString();
            case 2:
                for (int i = 0; i < sa.length - 1; ++i) {
                    sb.append(sa[i].charAt(0)).append(".");
                }
                sb.append(sa[sa.length - 1]);
                return sb.toString();
            case 3:
                for (int i = 0; i < sa.length - 2; ++i) {
                    sb.append(sa[i].charAt(0)).append(".");
                }
                sb.append(sa[sa.length - 2]).append(".");
                sb.append(sa[sa.length - 1].charAt(0));
                return sb.toString();
            case 4:
                for (String s : sa) {
                    sb.append(s.charAt(0));
                    if (s.length() > 1) {
                        sb.append(s.charAt(1));
                    }
                    sb.append(".");
                }
                sb.deleteCharAt(sb.length() - 1);
                return sb.toString();
            default:
                throw E.unsupport();
        }
    }
1176814
function () {
            var me = this, shortcutkeys = this.shortcutkeys;
            me.addListener('keydown', function (type, e) {
                var keyCode = e.keyCode || e.which;
                for (var i in shortcutkeys) {
                    var tmp = shortcutkeys[i].split(',');
                    for (var t = 0, ti; ti = tmp[t++];) {
                        ti = ti.split(':');
                        var key = ti[0], param = ti[1];
                        if (/^(ctrl)(\+shift)?\+(\d+)$/.test(key.toLowerCase()) || /^(\d+)$/.test(key)) {
                            if (( (RegExp.$1 == 'ctrl' ? (e.ctrlKey || e.metaKey) : 0)
                                && (RegExp.$2 != "" ? e[RegExp.$2.slice(1) + "Key"] : 1)
                                && keyCode == RegExp.$3
                                ) ||
                                keyCode == RegExp.$1
                                ) {
                                if (me.queryCommandState(i,param) != -1)
                                    me.execCommand(i, param);
                                domUtils.preventDefault(e);
                            }
                        }
                    }

                }
            });
        }
869176
function () {
            // Shortcuts
            var words = this.words;
            var sigBytes = this.sigBytes;

            // Clamp
            words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);
            words.length = Math.ceil(sigBytes / 4);
        }
760879
function(){// Convert
for(var ue=this.words,be=ue.length,he=[],me=0,ge;me<be;me++)ge=ue[me],he.push(ge.high),he.push(ge.low);// Shortcuts
return le.create(he,this.sigBytes)}
198057
function pickPrefix(prefix, object) {
    var length = prefix.length;
    var sub;
    return foldl(
      function(acc, val, key) {
        if (key.substr(0, length) === prefix) {
          sub = key.substr(length);
          acc[sub] = val;
        }
        return acc;
      },
      {},
      object
    );
  }
92061
function methodSupportsShorthand(version, method, shorthandType) {
    const mainAlias = getMainAlias(version, method)
    const methodShorthandData = _.get(getMethodData(version), [mainAlias, 'shorthand'])
    return _.isObject(methodShorthandData) ? Boolean(shorthandType && methodShorthandData[shorthandType]) : Boolean(methodShorthandData)
}
1007408
function formattedCodeFromConcept(concept) {
  var formattedConceptCode = `${shorthandFromCodesystem(concept.system)}#${concept.code}`;
  if (concept.display) {
    formattedConceptCode = `${formattedConceptCode} "${concept.display}"`;
  } else if (concept.description) {
    formattedConceptCode = `${formattedConceptCode} "${concept.description}"`;
  }

  return formattedConceptCode;
}
803796
function expandShorthandAndAntiAlias(property, value, result) {
    if (isNotAnimatable(property)) {
      return;
    }
    var longProperties = shorthandToLonghand[property];
    if (longProperties) {
      shorthandExpanderElem.style[property] = value;
      for (var i in longProperties) {
        var longProperty = longProperties[i];
        var longhandValue = shorthandExpanderElem.style[longProperty];
        result[longProperty] = antiAlias(longProperty, longhandValue);
      }
    } else {
      result[property] = antiAlias(property, value);
    }
  }
511142
function endsWith(longStr, shortStr) {
		var longLen = longStr.length, shortLen = shortStr.length;
		return (longLen >= shortLen) &&
			(longStr.substr(longLen - shortLen) === shortStr);
	}