text
stringlengths
3
1.05M
'use strict'; const puppeteer = require('puppeteer'); const fs = require('fs'); process.env.output = './output'; const outputDir = process.env.output; if (!fs.existsSync(outputDir)) { fs.mkdirSync(outputDir); } (async() => { const browser = await puppeteer.launch({ executablePath: 'google-chrome-stable', args: [ '--no-sandbox', '--disable-setuid-sandbox', '--start-maximized', '--disable-device-emulation', '--disable-cpu-throttling', '--disable-network-throttling' ], ignoreHTTPSErrors: true, headless: false }); const pages = await browser.pages(); const page = pages[0]; // Set Page Viewport Size await page._client.send('Emulation.clearDeviceMetricsOverride'); await page.setViewport({ width: 1920, height: 1080, deviceScaleFactor: 1 }); // Get the "viewport" of the page, as reported by the page. const dimensions = await page.evaluate(() => { return { width: document.documentElement.clientWidth, height: document.documentElement.clientHeight, deviceScaleFactor: window.devicePixelRatio }; }); console.log('Window - Dimensions:', dimensions); try { await require('./src/scenario_01')(page); } catch (error) { console.error(error); } await browser.close(); })();
const router = require('express').Router(); const { Post } = require('../models/'); const withAuth = require('../utils/auth'); router.get('/', withAuth, async (req, res) => { try { // store the results of the db query in a variable called postData. should use something that "finds all" from the Post model. may need a where clause! const postData = await Post.findAll({ where: { user_id: req.session.userId } }); // this sanitizes the data we just got from the db above (you have to create the above) const posts = postData.map((post) => post.get({ plain: true })); // fill in the view to be rendered res.render('all-posts-admin', { // this is how we specify a different layout other than main! no change needed layout: 'dashboard', // coming from line 10 above, no change needed posts, }); } catch (err) { res.redirect('login'); } }); router.get('/new', withAuth, (req, res) => { // what view should we send the client when they want to create a new-post? (change this next line) res.render('new-post', { // again, rendering with a different layout than main! no change needed layout: 'dashboard', }); }); router.get('/edit/:id', withAuth, async (req, res) => { try { // what should we pass here? we need to get some data passed via the request body const postData = await Post.findByPk(req.params.id); if (postData) { // serializing the data const post = postData.get({ plain: true }); // which view should we render if we want to edit a post? res.render('edit-post', { layout: 'dashboard', post, }); } else { res.status(404).end(); } } catch (err) { res.redirect('login'); } }); module.exports = router;
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution(object): def kthSmallest(self, root, k): """ :type root: TreeNode :type k: int :rtype: int """ stack = [] while True: while root: stack.append(root) root = root.left root = stack.pop() k -= 1 if not k: return root.val root = root.right class Solution(object): def kthSmallest(self, root, k): """ :type root: TreeNode :type k: int :rtype: int """ stack, result = list(), list() while stack or root: if root: stack.append(root) root = root.left else: root = stack.pop() result.append(root.val) if len(result) == k: return result[k-1] root = root.right
'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } function getVF(n, opt_precision) { var v = opt_precision; if (undefined === v) { v = Math.min(getDecimals(n), 3); } var base = Math.pow(10, v); var f = ((n * base) | 0) % base; return {v: v, f: f}; } $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "a.m.", "p.m." ], "DAY": [ "zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag" ], "ERANAMES": [ "voor Christus", "na Christus" ], "ERAS": [ "v.Chr.", "n.Chr." ], "FIRSTDAYOFWEEK": 0, "MONTH": [ "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december" ], "SHORTDAY": [ "zo", "ma", "di", "wo", "do", "vr", "za" ], "SHORTMONTH": [ "jan.", "feb.", "mrt.", "apr.", "mei", "jun.", "jul.", "aug.", "sep.", "okt.", "nov.", "dec." ], "STANDALONEMONTH": [ "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december" ], "WEEKENDRANGE": [ 5, 6 ], "fullDate": "EEEE d MMMM y", "longDate": "d MMMM y", "medium": "d MMM y HH:mm:ss", "mediumDate": "d MMM y", "mediumTime": "HH:mm:ss", "short": "dd-MM-yy HH:mm", "shortDate": "dd-MM-yy", "shortTime": "HH:mm" }, "NUMBER_FORMATS": { "CURRENCY_SYM": "NAf.", "DECIMAL_SEP": ",", "GROUP_SEP": ".", "PATTERNS": [ { "gSize": 3, "lgSize": 3, "maxFrac": 3, "minFrac": 0, "minInt": 1, "negPre": "-", "negSuf": "", "posPre": "", "posSuf": "" }, { "gSize": 3, "lgSize": 3, "maxFrac": 2, "minFrac": 2, "minInt": 1, "negPre": "\u00a4\u00a0-", "negSuf": "", "posPre": "\u00a4\u00a0", "posSuf": "" } ] }, "id": "nl-sx", "localeID": "nl_SX", "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;} }); }]);
import sys import time ## TODO: we must change all index inside stco (or co64) header at moov ## new_index = current_index + moov_size // because only 'moov' moved before mdat ## https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html def read_header(data, start = 0): if len(data) < 8 : return 0, "" size = int.from_bytes(data[start:start+4], "big") htype = data[start+4:start+8] return size, htype def move_moov_to_start(in_file, out_file): out_f = open(out_file, "wb") with open(in_file, "rb") as in_f: # Process ftyp b8 = in_f.read(8) size, m_type = read_header(b8) if m_type != b'ftyp': print(f"Invalid ftyp in {in_file}") return print("Write ftyp to out_file") out_f.write(b8) out_f.write(in_f.read(size-8)) # Search moov while True: b8 = in_f.read(8) if len(b8) != 8: break size, m_type = read_header(b8) if m_type == b'moov': break in_f.read(size - 8) print(f"jump from {m_type}") if m_type == b'moov': print("Write moov to out_file") out_f.write(b8) out_f.write(in_f.read(size-8)) else: print(f"Not found moov box") return # Write all box to out_file except 'ftyp' and 'moov' with open(in_file, "rb") as in_f: while True: b8 = in_f.read(8) if len(b8) != 8: break size, m_type = read_header(b8) if m_type != b'ftyp' and m_type != b'moov' and m_type != b'free': print(f"Write {m_type} to out_file") out_f.write(b8) out_f.write(in_f.read(size-8)) else: in_f.read(size-8) if len(sys.argv) != 3: print(f"Usage: {sys.argv[0]} <in_file> <out_file>") sys.exit(0) in_file = sys.argv[1] out_file = sys.argv[2] move_moov_to_start(in_file, out_file) ''' private function _swapIndex() { $moovSize = $this->_moovBytes->bytesAvailable(); $moovAType = ''; $moovASize = 0; $offsetCount = 0; $compressionCheck = $this->_moovBytes->readBytes(12, 4); if ($compressionCheck == Atom::CMOV_ATOM) { throw new Exception('compressed MP4/QT-file can\'t do this file: '.$file); } // begin of metadata $metaDataOffsets = array(); $metaDataStrings = array(); $metaDataCurrentLevel = 0; $moovStartOffset = 12; for ($i = $moovStartOffset; $i < $moovSize - $moovStartOffset; $i++) { $moovAType = $this->_moovBytes->readUTFBytes($i, 4); if (Atom::isValidAtom($moovAType)) { $moovASize = $this->_moovBytes->readUnsignedInt($i - 4); if (($moovASize > 8) && ($moovASize + $i < ($moovSize - $moovStartOffset))) { try { $containerLength = 0; $containerString = $moovAType; for ($mi = count($metaDataOffsets) - 1; $mi > - 1; $mi--) { $containerLength = $metaDataOffsets[$mi]; if ($i - $moovStartOffset < $containerLength && $i - $moovStartOffset + $moovASize > $containerLength) { throw new Exception('bad atom nested size'); } if ($i - $moovStartOffset == $containerLength) { array_pop($metaDataOffsets); array_pop($metaDataStrings); } else { $containerString = $metaDataStrings[$mi].".".$containerString; } } if (($i - $moovStartOffset) <= $containerLength) { array_push($metaDataOffsets, ($i - $moovStartOffset + $moovASize)); array_push($metaDataStrings, $moovAType); } if ($moovAType != Atom::STCO_ATOM && $moovAType != Atom::CO64_ATOM) { $i += 4; } elseif ($moovAType == Atom::URL_ATOM || $moovAType == Atom::XML_ATOM) { $i += $moovASize - 4; } } catch(Exception $e) { echo 'EXCEPTION: '.$e->getMessage(); } } } if ($moovAType == Atom::STCO_ATOM) { $moovASize = $this->_moovBytes->readUnsignedInt($i - 4); if ($i + $moovASize - $moovStartOffset > $moovSize) { throw new Exception('bad atom size'); return; } $offsetCount = $this->_moovBytes->readUnsignedInt($i + 8); for ($j = 0; $j < $offsetCount; $j++) { $position = ($i + 12 + $j * 4); $currentOffset = $this->_moovBytes->readUnsignedInt($position); // cause of mooving the moov-atom right before the rest of data // (behind ftyp) the new offset is caluclated: // current-offset + size of moov atom (box) = new offset $currentOffset += $moovSize; $this->_moovBytes->writeBytes(Transform::toUInt32BE($currentOffset), $position + 1); } $i += $moovASize - 4; } else if ($moovAType == Atom::CO64_ATOM) { $moovASize = $this->_moovBytes->readUnsignedInt($i - 4); if ($i + $moovASize - $moovStartOffset > $moovSize) { throw new Exception('bad atom size'); return; } $offsetCount = $this->_moovBytes->readDouble($i + 8); for ($j2 = 0; $j2 < $offsetCount; $j2++) { $position = ($i + 12 + $j * 8); $currentOffset = $this->_moovBytes->readUnsignedInt($position); // cause of mooving the moov-atom right before the rest of data // (behind ftyp) the new offset is caluclated: // current-offset + size of moov atom (box) = new offset $currentOffset += $moovSize; // TODO implement! //$this->_moovBytes->writeBytes(Transform::toUInt64BE($currentOffset), $position+1); } $i += $moovASize - 4; } } return true; } '''
#! /usr/bin/python # -*- encoding: utf-8 -*-
#!/usr/bin/env python2 # Copyright 2013-present Barefoot Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # # Antonin Bas ([email protected]) # # import argparse import cmd from collections import Counter import os import sys import struct import json from functools import wraps import bmpy_utils as utils from bm_runtime.standard import Standard from bm_runtime.standard.ttypes import * try: from bm_runtime.simple_pre import SimplePre except: pass try: from bm_runtime.simple_pre_lag import SimplePreLAG except: pass def enum(type_name, *sequential, **named): enums = dict(zip(sequential, range(len(sequential))), **named) reverse = dict((value, key) for key, value in enums.iteritems()) @staticmethod def to_str(x): return reverse[x] enums['to_str'] = to_str @staticmethod def from_str(x): return enums[x] enums['from_str'] = from_str return type(type_name, (), enums) PreType = enum('PreType', 'None', 'SimplePre', 'SimplePreLAG') MeterType = enum('MeterType', 'packets', 'bytes') TableType = enum('TableType', 'simple', 'indirect', 'indirect_ws') ResType = enum('ResType', 'table', 'action_prof', 'action', 'meter_array', 'counter_array', 'register_array') def bytes_to_string(byte_array): form = 'B' * len(byte_array) return struct.pack(form, *byte_array) def table_error_name(x): return TableOperationErrorCode._VALUES_TO_NAMES[x] def get_parser(): class ActionToPreType(argparse.Action): def __init__(self, option_strings, dest, nargs=None, **kwargs): if nargs is not None: raise ValueError("nargs not allowed") super(ActionToPreType, self).__init__(option_strings, dest, **kwargs) def __call__(self, parser, namespace, values, option_string=None): assert(type(values) is str) setattr(namespace, self.dest, PreType.from_str(values)) parser = argparse.ArgumentParser(description='BM runtime CLI') # One port == one device !!!! This is not a multidevice CLI parser.add_argument('--thrift-port', help='Thrift server port for table updates', type=int, action="store", default=9090) parser.add_argument('--thrift-ip', help='Thrift IP address for table updates', type=str, action="store", default='localhost') parser.add_argument('--json', help='JSON description of P4 program', type=str, action="store", required=False) parser.add_argument('--pre', help='Packet Replication Engine used by target', type=str, choices=['None', 'SimplePre', 'SimplePreLAG'], default=PreType.SimplePre, action=ActionToPreType) return parser TABLES = {} ACTION_PROFS = {} ACTIONS = {} METER_ARRAYS = {} COUNTER_ARRAYS = {} REGISTER_ARRAYS = {} CUSTOM_CRC_CALCS = {} # maps (object type, unique suffix) to object SUFFIX_LOOKUP_MAP = {} class MatchType: EXACT = 0 LPM = 1 TERNARY = 2 VALID = 3 RANGE = 4 @staticmethod def to_str(x): return {0: "exact", 1: "lpm", 2: "ternary", 3: "valid", 4: "range"}[x] @staticmethod def from_str(x): return {"exact": 0, "lpm": 1, "ternary": 2, "valid": 3, "range": 4}[x] class Table: def __init__(self, name, id_): self.name = name self.id_ = id_ self.match_type_ = None self.actions = {} self.key = [] self.default_action = None self.type_ = None self.support_timeout = False self.action_prof = None TABLES[name] = self def num_key_fields(self): return len(self.key) def key_str(self): return ",\t".join([name + "(" + MatchType.to_str(t) + ", " + str(bw) + ")" for name, t, bw in self.key]) def table_str(self): ap_str = "implementation={}".format( "None" if not self.action_prof else self.action_prof.name) return "{0:30} [{1}, mk={2}]".format(self.name, ap_str, self.key_str()) def get_action(self, action_name): key = ResType.action, action_name action = SUFFIX_LOOKUP_MAP.get(key, None) if action is None or action.name not in self.actions: return None return action class ActionProf: def __init__(self, name, id_): self.name = name self.id_ = id_ self.with_selection = False self.actions = {} self.ref_cnt = 0 ACTION_PROFS[name] = self def action_prof_str(self): return "{0:30} [{1}]".format(self.name, self.with_selection) def get_action(self, action_name): key = ResType.action, action_name action = SUFFIX_LOOKUP_MAP.get(key, None) if action is None or action.name not in self.actions: return None return action class Action: def __init__(self, name, id_): self.name = name self.id_ = id_ self.runtime_data = [] ACTIONS[name] = self def num_params(self): return len(self.runtime_data) def runtime_data_str(self): return ",\t".join([name + "(" + str(bw) + ")" for name, bw in self.runtime_data]) def action_str(self): return "{0:30} [{1}]".format(self.name, self.runtime_data_str()) class MeterArray: def __init__(self, name, id_): self.name = name self.id_ = id_ self.type_ = None self.is_direct = None self.size = None self.binding = None self.rate_count = None METER_ARRAYS[name] = self def meter_str(self): return "{0:30} [{1}, {2}]".format(self.name, self.size, MeterType.to_str(self.type_)) class CounterArray: def __init__(self, name, id_): self.name = name self.id_ = id_ self.is_direct = None self.size = None self.binding = None COUNTER_ARRAYS[name] = self def counter_str(self): return "{0:30} [{1}]".format(self.name, self.size) class RegisterArray: def __init__(self, name, id_): self.name = name self.id_ = id_ self.width = None self.size = None REGISTER_ARRAYS[name] = self def register_str(self): return "{0:30} [{1}]".format(self.name, self.size) def reset_config(): TABLES.clear() ACTION_PROFS.clear() ACTIONS.clear() METER_ARRAYS.clear() COUNTER_ARRAYS.clear() REGISTER_ARRAYS.clear() CUSTOM_CRC_CALCS.clear() SUFFIX_LOOKUP_MAP.clear() def load_json_str(json_str): def get_header_type(header_name, j_headers): for h in j_headers: if h["name"] == header_name: return h["header_type"] assert(0) def get_field_bitwidth(header_type, field_name, j_header_types): for h in j_header_types: if h["name"] != header_type: continue for t in h["fields"]: # t can have a third element (field signedness) f, bw = t[0], t[1] if f == field_name: return bw assert(0) reset_config() json_ = json.loads(json_str) def get_json_key(key): return json_.get(key, []) for j_action in get_json_key("actions"): action = Action(j_action["name"], j_action["id"]) for j_param in j_action["runtime_data"]: action.runtime_data += [(j_param["name"], j_param["bitwidth"])] for j_pipeline in get_json_key("pipelines"): if "action_profiles" in j_pipeline: # new JSON format for j_aprof in j_pipeline["action_profiles"]: action_prof = ActionProf(j_aprof["name"], j_aprof["id"]) action_prof.with_selection = "selector" in j_aprof for j_table in j_pipeline["tables"]: table = Table(j_table["name"], j_table["id"]) table.match_type = MatchType.from_str(j_table["match_type"]) table.type_ = TableType.from_str(j_table["type"]) table.support_timeout = j_table["support_timeout"] for action in j_table["actions"]: table.actions[action] = ACTIONS[action] if table.type_ in {TableType.indirect, TableType.indirect_ws}: if "action_profile" in j_table: action_prof = ACTION_PROFS[j_table["action_profile"]] else: # for backward compatibility assert("act_prof_name" in j_table) action_prof = ActionProf(j_table["act_prof_name"], table.id_) action_prof.with_selection = "selector" in j_table action_prof.actions.update(table.actions) action_prof.ref_cnt += 1 table.action_prof = action_prof for j_key in j_table["key"]: target = j_key["target"] match_type = MatchType.from_str(j_key["match_type"]) if match_type == MatchType.VALID: field_name = target + "_valid" bitwidth = 1 elif target[1] == "$valid$": field_name = target[0] + "_valid" bitwidth = 1 else: field_name = ".".join(target) header_type = get_header_type(target[0], json_["headers"]) bitwidth = get_field_bitwidth(header_type, target[1], json_["header_types"]) table.key += [(field_name, match_type, bitwidth)] for j_meter in get_json_key("meter_arrays"): meter_array = MeterArray(j_meter["name"], j_meter["id"]) if "is_direct" in j_meter and j_meter["is_direct"]: meter_array.is_direct = True meter_array.binding = j_meter["binding"] else: meter_array.is_direct = False meter_array.size = j_meter["size"] meter_array.type_ = MeterType.from_str(j_meter["type"]) meter_array.rate_count = j_meter["rate_count"] for j_counter in get_json_key("counter_arrays"): counter_array = CounterArray(j_counter["name"], j_counter["id"]) counter_array.is_direct = j_counter["is_direct"] if counter_array.is_direct: counter_array.binding = j_counter["binding"] else: counter_array.size = j_counter["size"] for j_register in get_json_key("register_arrays"): register_array = RegisterArray(j_register["name"], j_register["id"]) register_array.size = j_register["size"] register_array.width = j_register["bitwidth"] for j_calc in get_json_key("calculations"): calc_name = j_calc["name"] if j_calc["algo"] == "crc16_custom": CUSTOM_CRC_CALCS[calc_name] = 16 elif j_calc["algo"] == "crc32_custom": CUSTOM_CRC_CALCS[calc_name] = 32 # Builds a dictionary mapping (object type, unique suffix) to the object # (Table, Action, etc...). In P4_16 the object name is the fully-qualified # name, which can be quite long, which is why we accept unique suffixes as # valid identifiers. # Auto-complete does not support suffixes, only the fully-qualified names, # but that can be changed in the future if needed. suffix_count = Counter() for res_type, res_dict in [ (ResType.table, TABLES), (ResType.action_prof, ACTION_PROFS), (ResType.action, ACTIONS), (ResType.meter_array, METER_ARRAYS), (ResType.counter_array, COUNTER_ARRAYS), (ResType.register_array, REGISTER_ARRAYS)]: for name, res in res_dict.items(): suffix = None for s in reversed(name.split('.')): suffix = s if suffix is None else s + '.' + suffix key = (res_type, suffix) SUFFIX_LOOKUP_MAP[key] = res suffix_count[key] += 1 for key, c in suffix_count.items(): if c > 1: del SUFFIX_LOOKUP_MAP[key] class UIn_Error(Exception): def __init__(self, info=""): self.info = info def __str__(self): return self.info class UIn_ResourceError(UIn_Error): def __init__(self, res_type, name): self.res_type = res_type self.name = name def __str__(self): return "Invalid %s name (%s)" % (self.res_type, self.name) class UIn_MatchKeyError(UIn_Error): def __init__(self, info=""): self.info = info def __str__(self): return self.info class UIn_RuntimeDataError(UIn_Error): def __init__(self, info=""): self.info = info def __str__(self): return self.info class CLI_FormatExploreError(Exception): def __init__(self): pass class UIn_BadParamError(UIn_Error): def __init__(self, info=""): self.info = info def __str__(self): return self.info class UIn_BadIPv4Error(UIn_Error): def __init__(self): pass class UIn_BadIPv6Error(UIn_Error): def __init__(self): pass class UIn_BadMacError(UIn_Error): def __init__(self): pass def ipv4Addr_to_bytes(addr): if not '.' in addr: raise CLI_FormatExploreError() s = addr.split('.') if len(s) != 4: raise UIn_BadIPv4Error() try: return [int(b) for b in s] except: raise UIn_BadIPv4Error() def macAddr_to_bytes(addr): if not ':' in addr: raise CLI_FormatExploreError() s = addr.split(':') if len(s) != 6: raise UIn_BadMacError() try: return [int(b, 16) for b in s] except: raise UIn_BadMacError() def ipv6Addr_to_bytes(addr): from ipaddr import IPv6Address if not ':' in addr: raise CLI_FormatExploreError() try: ip = IPv6Address(addr) except: raise UIn_BadIPv6Error() try: return [ord(b) for b in ip.packed] except: raise UIn_BadIPv6Error() def int_to_bytes(i, num): byte_array = [] while i > 0: byte_array.append(i % 256) i = i / 256 num -= 1 if num < 0: raise UIn_BadParamError("Parameter is too large") while num > 0: byte_array.append(0) num -= 1 byte_array.reverse() return byte_array def parse_param(input_str, bitwidth): if bitwidth == 32: try: return ipv4Addr_to_bytes(input_str) except CLI_FormatExploreError: pass except UIn_BadIPv4Error: raise UIn_BadParamError("Invalid IPv4 address") elif bitwidth == 48: try: return macAddr_to_bytes(input_str) except CLI_FormatExploreError: pass except UIn_BadMacError: raise UIn_BadParamError("Invalid MAC address") elif bitwidth == 128: try: return ipv6Addr_to_bytes(input_str) except CLI_FormatExploreError: pass except UIn_BadIPv6Error: raise UIn_BadParamError("Invalid IPv6 address") try: input_ = int(input_str, 0) except: raise UIn_BadParamError( "Invalid input, could not cast to integer, try in hex with 0x prefix" ) try: return int_to_bytes(input_, (bitwidth + 7) / 8) except UIn_BadParamError: raise def parse_runtime_data(action, params): def parse_param_(field, bw): try: return parse_param(field, bw) except UIn_BadParamError as e: raise UIn_RuntimeDataError( "Error while parsing %s - %s" % (field, e) ) bitwidths = [bw for( _, bw) in action.runtime_data] byte_array = [] for input_str, bitwidth in zip(params, bitwidths): byte_array += [bytes_to_string(parse_param_(input_str, bitwidth))] return byte_array _match_types_mapping = { MatchType.EXACT : BmMatchParamType.EXACT, MatchType.LPM : BmMatchParamType.LPM, MatchType.TERNARY : BmMatchParamType.TERNARY, MatchType.VALID : BmMatchParamType.VALID, MatchType.RANGE : BmMatchParamType.RANGE, } def parse_match_key(table, key_fields): def parse_param_(field, bw): try: return parse_param(field, bw) except UIn_BadParamError as e: raise UIn_MatchKeyError( "Error while parsing %s - %s" % (field, e) ) params = [] match_types = [t for (_, t, _) in table.key] bitwidths = [bw for (_, _, bw) in table.key] for idx, field in enumerate(key_fields): param_type = _match_types_mapping[match_types[idx]] bw = bitwidths[idx] if param_type == BmMatchParamType.EXACT: key = bytes_to_string(parse_param_(field, bw)) param = BmMatchParam(type = param_type, exact = BmMatchParamExact(key)) elif param_type == BmMatchParamType.LPM: try: prefix, length = field.split("/") except ValueError: raise UIn_MatchKeyError( "Invalid LPM value {}, use '/' to separate prefix " "and length".format(field)) key = bytes_to_string(parse_param_(prefix, bw)) param = BmMatchParam(type = param_type, lpm = BmMatchParamLPM(key, int(length))) elif param_type == BmMatchParamType.TERNARY: try: key, mask = field.split("&&&") except ValueError: raise UIn_MatchKeyError( "Invalid ternary value {}, use '&&&' to separate key and " "mask".format(field)) key = bytes_to_string(parse_param_(key, bw)) mask = bytes_to_string(parse_param_(mask, bw)) if len(mask) != len(key): raise UIn_MatchKeyError( "Key and mask have different lengths in expression %s" % field ) param = BmMatchParam(type = param_type, ternary = BmMatchParamTernary(key, mask)) elif param_type == BmMatchParamType.VALID: key = bool(int(field)) param = BmMatchParam(type = param_type, valid = BmMatchParamValid(key)) elif param_type == BmMatchParamType.RANGE: try: start, end = field.split("->") except ValueError: raise UIn_MatchKeyError( "Invalid range value {}, use '->' to separate range start " "and range end".format(field)) start = bytes_to_string(parse_param_(start, bw)) end = bytes_to_string(parse_param_(end, bw)) if len(start) != len(end): raise UIn_MatchKeyError( "start and end have different lengths in expression %s" % field ) if start > end: raise UIn_MatchKeyError( "start is less than end in expression %s" % field ) param = BmMatchParam(type = param_type, range = BmMatchParamRange(start, end)) else: assert(0) params.append(param) return params def printable_byte_str(s): return ":".join("{:02x}".format(ord(c)) for c in s) def BmMatchParam_to_str(self): return BmMatchParamType._VALUES_TO_NAMES[self.type] + "-" +\ (self.exact.to_str() if self.exact else "") +\ (self.lpm.to_str() if self.lpm else "") +\ (self.ternary.to_str() if self.ternary else "") +\ (self.valid.to_str() if self.valid else "") +\ (self.range.to_str() if self.range else "") def BmMatchParamExact_to_str(self): return printable_byte_str(self.key) def BmMatchParamLPM_to_str(self): return printable_byte_str(self.key) + "/" + str(self.prefix_length) def BmMatchParamTernary_to_str(self): return printable_byte_str(self.key) + " &&& " + printable_byte_str(self.mask) def BmMatchParamValid_to_str(self): return "" def BmMatchParamRange_to_str(self): return printable_byte_str(self.start) + " -> " + printable_byte_str(self.end_) BmMatchParam.to_str = BmMatchParam_to_str BmMatchParamExact.to_str = BmMatchParamExact_to_str BmMatchParamLPM.to_str = BmMatchParamLPM_to_str BmMatchParamTernary.to_str = BmMatchParamTernary_to_str BmMatchParamValid.to_str = BmMatchParamValid_to_str BmMatchParamRange.to_str = BmMatchParamRange_to_str # services is [(service_name, client_class), ...] def thrift_connect(thrift_ip, thrift_port, services): return utils.thrift_connect(thrift_ip, thrift_port, services) def handle_bad_input(f): @wraps(f) def handle(*args, **kwargs): try: return f(*args, **kwargs) except UIn_MatchKeyError as e: print "Invalid match key:", e except UIn_RuntimeDataError as e: print "Invalid runtime data:", e except UIn_Error as e: print "Error:", e except InvalidTableOperation as e: error = TableOperationErrorCode._VALUES_TO_NAMES[e.code] print "Invalid table operation (%s)" % error except InvalidCounterOperation as e: error = CounterOperationErrorCode._VALUES_TO_NAMES[e.code] print "Invalid counter operation (%s)" % error except InvalidMeterOperation as e: error = MeterOperationErrorCode._VALUES_TO_NAMES[e.code] print "Invalid meter operation (%s)" % error except InvalidRegisterOperation as e: error = RegisterOperationErrorCode._VALUES_TO_NAMES[e.code] print "Invalid register operation (%s)" % error except InvalidLearnOperation as e: error = LearnOperationErrorCode._VALUES_TO_NAMES[e.code] print "Invalid learn operation (%s)" % error except InvalidSwapOperation as e: error = SwapOperationErrorCode._VALUES_TO_NAMES[e.code] print "Invalid swap operation (%s)" % error except InvalidDevMgrOperation as e: error = DevMgrErrorCode._VALUES_TO_NAMES[e.code] print "Invalid device manager operation (%s)" % error except InvalidCrcOperation as e: error = CrcErrorCode._VALUES_TO_NAMES[e.code] print "Invalid crc operation (%s)" % error return handle def handle_bad_input_mc(f): @wraps(f) def handle(*args, **kwargs): pre_type = args[0].pre_type if pre_type == PreType.None: return handle_bad_input(f)(*args, **kwargs) EType = { PreType.SimplePre : SimplePre.InvalidMcOperation, PreType.SimplePreLAG : SimplePreLAG.InvalidMcOperation }[pre_type] Codes = { PreType.SimplePre : SimplePre.McOperationErrorCode, PreType.SimplePreLAG : SimplePreLAG.McOperationErrorCode }[pre_type] try: return handle_bad_input(f)(*args, **kwargs) except EType as e: error = Codes._VALUES_TO_NAMES[e.code] print "Invalid PRE operation (%s)" % error return handle def deprecated_act_prof(substitute, with_selection=False, strictly_deprecated=True): # need two levels here because our decorator takes arguments def deprecated_act_prof_(f): # not sure if this is the right place for it, if I want it to play nice # with @wraps if strictly_deprecated: f.__doc__ = "[DEPRECATED!] " + f.__doc__ f.__doc__ += "\nUse '{}' instead".format(substitute) @wraps(f) def wrapper(obj, line): substitute_fn = getattr(obj, "do_" + substitute) args = line.split() obj.at_least_n_args(args, 1) table_name = args[0] table = obj.get_res("table", table_name, ResType.table) if with_selection: obj.check_indirect_ws(table) else: obj.check_indirect(table) assert(table.action_prof is not None) assert(table.action_prof.ref_cnt > 0) if strictly_deprecated and table.action_prof.ref_cnt > 1: raise UIn_Error( "Legacy command does not work with shared action profiles") args[0] = table.action_prof.name if strictly_deprecated: # writing to stderr in case someone is parsing stdout sys.stderr.write( "This is a deprecated command, use '{}' instead\n".format( substitute)) return substitute_fn(" ".join(args)) # we add the handle_bad_input decorator "programatically" return handle_bad_input(wrapper) return deprecated_act_prof_ # thrift does not support unsigned integers def hex_to_i16(h): x = int(h, 0) if (x > 0xFFFF): raise UIn_Error("Integer cannot fit within 16 bits") if (x > 0x7FFF): x-= 0x10000 return x def i16_to_hex(h): x = int(h) if (x & 0x8000): x+= 0x10000 return x def hex_to_i32(h): x = int(h, 0) if (x > 0xFFFFFFFF): raise UIn_Error("Integer cannot fit within 32 bits") if (x > 0x7FFFFFFF): x-= 0x100000000 return x def i32_to_hex(h): x = int(h) if (x & 0x80000000): x+= 0x100000000 return x def parse_bool(s): if s == "true" or s == "True": return True if s == "false" or s == "False": return False try: s = int(s, 0) return bool(s) except: pass raise UIn_Error("Invalid bool parameter") class RuntimeAPI(cmd.Cmd): prompt = 'RuntimeCmd: ' intro = "Control utility for runtime P4 table manipulation" @staticmethod def get_thrift_services(pre_type): services = [("standard", Standard.Client)] if pre_type == PreType.SimplePre: services += [("simple_pre", SimplePre.Client)] elif pre_type == PreType.SimplePreLAG: services += [("simple_pre_lag", SimplePreLAG.Client)] else: services += [(None, None)] return services def __init__(self, pre_type, standard_client, mc_client=None): cmd.Cmd.__init__(self) self.client = standard_client self.mc_client = mc_client self.pre_type = pre_type def do_greet(self, line): print "hello" def do_EOF(self, line): print return True def do_shell(self, line): "Run a shell command" output = os.popen(line).read() print output def get_res(self, type_name, name, res_type): key = res_type, name if key not in SUFFIX_LOOKUP_MAP: raise UIn_ResourceError(type_name, name) return SUFFIX_LOOKUP_MAP[key] def at_least_n_args(self, args, n): if len(args) < n: raise UIn_Error("Insufficient number of args") def exactly_n_args(self, args, n): if len(args) != n: raise UIn_Error( "Wrong number of args, expected %d but got %d" % (n, len(args)) ) def _complete_res(self, array, text): res = sorted(array.keys()) if not text: return res return [r for r in res if r.startswith(text)] @handle_bad_input def do_show_tables(self, line): "List tables defined in the P4 program: show_tables" self.exactly_n_args(line.split(), 0) for table_name in sorted(TABLES): print TABLES[table_name].table_str() @handle_bad_input def do_show_actions(self, line): "List actions defined in the P4 program: show_actions" self.exactly_n_args(line.split(), 0) for action_name in sorted(ACTIONS): print ACTIONS[action_name].action_str() def _complete_tables(self, text): return self._complete_res(TABLES, text) def _complete_act_profs(self, text): return self._complete_res(ACTION_PROFS, text) @handle_bad_input def do_table_show_actions(self, line): "List one table's actions as per the P4 program: table_show_actions <table_name>" args = line.split() self.exactly_n_args(args, 1) table_name = args[0] table = self.get_res("table", table_name, ResType.table) for action_name in sorted(table.actions): print ACTIONS[action_name].action_str() def complete_table_show_actions(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_table_info(self, line): "Show info about a table: table_info <table_name>" args = line.split() self.exactly_n_args(args, 1) table_name = args[0] table = self.get_res("table", table_name, ResType.table) print table.table_str() print "*" * 80 for action_name in sorted(table.actions): print ACTIONS[action_name].action_str() def complete_table_info(self, text, line, start_index, end_index): return self._complete_tables(text) # used for tables but also for action profiles def _complete_actions(self, text, table_name = None, res = TABLES): if not table_name: actions = sorted(ACTIONS.keys()) elif table_name not in res: return [] actions = sorted(res[table_name].actions.keys()) if not text: return actions return [a for a in actions if a.startswith(text)] def _complete_table_and_action(self, text, line): tables = sorted(TABLES.keys()) args = line.split() args_cnt = len(args) if args_cnt == 1 and not text: return self._complete_tables(text) if args_cnt == 2 and text: return self._complete_tables(text) table_name = args[1] if args_cnt == 2 and not text: return self._complete_actions(text, table_name) if args_cnt == 3 and text: return self._complete_actions(text, table_name) return [] def _complete_act_prof_and_action(self, text, line): act_profs = sorted(ACTION_PROFS.keys()) args = line.split() args_cnt = len(args) if args_cnt == 1 and not text: return self._complete_act_profs(text) if args_cnt == 2 and text: return self._complete_act_profs(text) act_prof_name = args[1] if args_cnt == 2 and not text: return self._complete_actions(text, act_prof_name, ACTION_PROFS) if args_cnt == 3 and text: return self._complete_actions(text, act_prof_name, ACTION_PROFS) return [] # for debugging def print_set_default(self, table_name, action_name, runtime_data): print "Setting default action of", table_name print "{0:20} {1}".format("action:", action_name) print "{0:20} {1}".format( "runtime data:", "\t".join(printable_byte_str(d) for d in runtime_data) ) @handle_bad_input def do_table_set_default(self, line): "Set default action for a match table: table_set_default <table name> <action name> <action parameters>" args = line.split() self.at_least_n_args(args, 2) table_name, action_name = args[0], args[1] table = self.get_res("table", table_name, ResType.table) action = table.get_action(action_name) if action is None: raise UIn_Error( "Table %s has no action %s" % (table_name, action_name) ) if len(args[2:]) != action.num_params(): raise UIn_Error( "Action %s needs %d parameters" % (action_name, action.num_params()) ) runtime_data = parse_runtime_data(action, args[2:]) self.print_set_default(table_name, action_name, runtime_data) self.client.bm_mt_set_default_action(0, table.name, action.name, runtime_data) def complete_table_set_default(self, text, line, start_index, end_index): return self._complete_table_and_action(text, line) @handle_bad_input def do_table_reset_default(self, line): "Reset default entry for a match table: table_reset_default <table name>" args = line.split() self.exactly_n_args(args, 1) table_name = args[0] table = self.get_res("table", table_name, ResType.table) self.client.bm_mt_reset_default_entry(0, table.name) def complete_table_reset_default(self, text, line, start_index, end_index): return self._complete_tables(text) def parse_runtime_data(self, action, action_params): if len(action_params) != action.num_params(): raise UIn_Error( "Action %s needs %d parameters" % (action.name, action.num_params()) ) return parse_runtime_data(action, action_params) # for debugging def print_table_add(self, match_key, action_name, runtime_data): print "{0:20} {1}".format( "match key:", "\t".join(d.to_str() for d in match_key) ) print "{0:20} {1}".format("action:", action_name) print "{0:20} {1}".format( "runtime data:", "\t".join(printable_byte_str(d) for d in runtime_data) ) @handle_bad_input def do_table_num_entries(self, line): "Return the number of entries in a match table (direct or indirect): table_num_entries <table name>" args = line.split() self.exactly_n_args(args, 1) table_name = args[0] table = self.get_res("table", table_name, ResType.table) print self.client.bm_mt_get_num_entries(0, table.name) def complete_table_num_entries(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_table_clear(self, line): "Clear all entries in a match table (direct or indirect), but not the default entry: table_clear <table name>" args = line.split() self.exactly_n_args(args, 1) table_name = args[0] table = self.get_res("table", table_name, ResType.table) self.client.bm_mt_clear_entries(0, table.name, False) def complete_table_clear(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_table_add(self, line): "Add entry to a match table: table_add <table name> <action name> <match fields> => <action parameters> [priority]" args = line.split() self.at_least_n_args(args, 3) table_name, action_name = args[0], args[1] table = self.get_res("table", table_name, ResType.table) action = table.get_action(action_name) if action is None: raise UIn_Error( "Table %s has no action %s" % (table_name, action_name) ) if table.match_type in {MatchType.TERNARY, MatchType.RANGE}: try: priority = int(args.pop(-1)) except: raise UIn_Error( "Table is ternary, but could not extract a valid priority from args" ) else: priority = 0 for idx, input_ in enumerate(args[2:]): if input_ == "=>": break idx += 2 match_key = args[2:idx] action_params = args[idx+1:] if len(match_key) != table.num_key_fields(): raise UIn_Error( "Table %s needs %d key fields" % (table_name, table.num_key_fields()) ) runtime_data = self.parse_runtime_data(action, action_params) match_key = parse_match_key(table, match_key) print "Adding entry to", MatchType.to_str(table.match_type), "match table", table_name # disable, maybe a verbose CLI option? self.print_table_add(match_key, action_name, runtime_data) entry_handle = self.client.bm_mt_add_entry( 0, table.name, match_key, action.name, runtime_data, BmAddEntryOptions(priority = priority) ) print "Entry has been added with handle", entry_handle def complete_table_add(self, text, line, start_index, end_index): return self._complete_table_and_action(text, line) @handle_bad_input def do_table_set_timeout(self, line): "Set a timeout in ms for a given entry; the table has to support timeouts: table_set_timeout <table_name> <entry handle> <timeout (ms)>" args = line.split() self.exactly_n_args(args, 3) table_name = args[0] table = self.get_res("table", table_name, ResType.table) if not table.support_timeout: raise UIn_Error( "Table {} does not support entry timeouts".format(table_name)) try: entry_handle = int(args[1]) except: raise UIn_Error("Bad format for entry handle") try: timeout_ms = int(args[2]) except: raise UIn_Error("Bad format for timeout") print "Setting a", timeout_ms, "ms timeout for entry", entry_handle self.client.bm_mt_set_entry_ttl(0, table.name, entry_handle, timeout_ms) def complete_table_set_timeout(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_table_modify(self, line): "Add entry to a match table: table_modify <table name> <action name> <entry handle> [action parameters]" args = line.split() self.at_least_n_args(args, 3) table_name, action_name = args[0], args[1] table = self.get_res("table", table_name, ResType.table) action = table.get_action(action_name) if action is None: raise UIn_Error( "Table %s has no action %s" % (table_name, action_name) ) try: entry_handle = int(args[2]) except: raise UIn_Error("Bad format for entry handle") action_params = args[3:] if args[3] == "=>": # be more tolerant action_params = args[4:] runtime_data = self.parse_runtime_data(action, action_params) print "Modifying entry", entry_handle, "for", MatchType.to_str(table.match_type), "match table", table_name entry_handle = self.client.bm_mt_modify_entry( 0, table.name, entry_handle, action.name, runtime_data ) def complete_table_modify(self, text, line, start_index, end_index): return self._complete_table_and_action(text, line) @handle_bad_input def do_table_delete(self, line): "Delete entry from a match table: table_delete <table name> <entry handle>" args = line.split() self.exactly_n_args(args, 2) table_name = args[0] table = self.get_res("table", table_name, ResType.table) try: entry_handle = int(args[1]) except: raise UIn_Error("Bad format for entry handle") print "Deleting entry", entry_handle, "from", table_name self.client.bm_mt_delete_entry(0, table.name, entry_handle) def complete_table_delete(self, text, line, start_index, end_index): return self._complete_tables(text) def check_indirect(self, table): if table.type_ not in {TableType.indirect, TableType.indirect_ws}: raise UIn_Error("Cannot run this command on non-indirect table") def check_indirect_ws(self, table): if table.type_ != TableType.indirect_ws: raise UIn_Error( "Cannot run this command on non-indirect table,"\ " or on indirect table with no selector") def check_act_prof_ws(self, act_prof): if not act_prof.with_selection: raise UIn_Error( "Cannot run this command on an action profile without selector") @handle_bad_input def do_act_prof_create_member(self, line): "Add a member to an action profile: act_prof_create_member <action profile name> <action_name> [action parameters]" args = line.split() self.at_least_n_args(args, 2) act_prof_name, action_name = args[0], args[1] act_prof = self.get_res("action profile", act_prof_name, ResType.action_prof) action = act_prof.get_action(action_name) if action is None: raise UIn_Error("Action profile '{}' has no action '{}'".format( act_prof_name, action_name)) action_params = args[2:] runtime_data = self.parse_runtime_data(action, action_params) mbr_handle = self.client.bm_mt_act_prof_add_member( 0, act_prof.name, action.name, runtime_data) print "Member has been created with handle", mbr_handle def complete_act_prof_create_member(self, text, line, start_index, end_index): return self._complete_act_prof_and_action(text, line) @deprecated_act_prof("act_prof_create_member") def do_table_indirect_create_member(self, line): "Add a member to an indirect match table: table_indirect_create_member <table name> <action_name> [action parameters]" pass def complete_table_indirect_create_member(self, text, line, start_index, end_index): return self._complete_table_and_action(text, line) @handle_bad_input def do_act_prof_delete_member(self, line): "Delete a member in an action profile: act_prof_delete_member <action profile name> <member handle>" args = line.split() self.exactly_n_args(args, 2) act_prof_name, action_name = args[0], args[1] act_prof = self.get_res("action profile", act_prof_name, ResType.action_prof) try: mbr_handle = int(args[1]) except: raise UIn_Error("Bad format for member handle") self.client.bm_mt_act_prof_delete_member(0, act_prof.name, mbr_handle) def complete_act_prof_delete_member(self, text, line, start_index, end_index): return self._complete_act_profs(text) @deprecated_act_prof("act_prof_delete_member") def do_table_indirect_delete_member(self, line): "Delete a member in an indirect match table: table_indirect_delete_member <table name> <member handle>" pass def complete_table_indirect_delete_member(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_act_prof_modify_member(self, line): "Modify member in an action profile: act_prof_modify_member <action profile name> <action_name> <member_handle> [action parameters]" args = line.split() self.at_least_n_args(args, 3) act_prof_name, action_name = args[0], args[1] act_prof = self.get_res("action profile", act_prof_name, ResType.action_prof) action = act_prof.get_action(action_name) if action is None: raise UIn_Error("Action profile '{}' has no action '{}'".format( act_prof_name, action_name)) try: mbr_handle = int(args[2]) except: raise UIn_Error("Bad format for member handle") action_params = args[3:] if args[3] == "=>": # be more tolerant action_params = args[4:] runtime_data = self.parse_runtime_data(action, action_params) mbr_handle = self.client.bm_mt_act_prof_modify_member( 0, act_prof.name, mbr_handle, action.name, runtime_data) def complete_act_prof_modify_member(self, text, line, start_index, end_index): return self._complete_act_prof_and_action(text, line) @deprecated_act_prof("act_prof_modify_member") def do_table_indirect_modify_member(self, line): "Modify member in an indirect match table: table_indirect_modify_member <table name> <action_name> <member_handle> [action parameters]" pass def complete_table_indirect_modify_member(self, text, line, start_index, end_index): return self._complete_table_and_action(text, line) def indirect_add_common(self, line, ws=False): args = line.split() self.at_least_n_args(args, 2) table_name = args[0] table = self.get_res("table", table_name, ResType.table) if ws: self.check_indirect_ws(table) else: self.check_indirect(table) if table.match_type in {MatchType.TERNARY, MatchType.RANGE}: try: priority = int(args.pop(-1)) except: raise UIn_Error( "Table is ternary, but could not extract a valid priority from args" ) else: priority = 0 for idx, input_ in enumerate(args[1:]): if input_ == "=>": break idx += 1 match_key = args[1:idx] if len(args) != (idx + 2): raise UIn_Error("Invalid arguments, could not find handle") handle = args[idx+1] try: handle = int(handle) except: raise UIn_Error("Bad format for handle") match_key = parse_match_key(table, match_key) print "Adding entry to indirect match table", table.name return table.name, match_key, handle, BmAddEntryOptions(priority = priority) @handle_bad_input def do_table_indirect_add(self, line): "Add entry to an indirect match table: table_indirect_add <table name> <match fields> => <member handle> [priority]" table_name, match_key, handle, options = self.indirect_add_common(line) entry_handle = self.client.bm_mt_indirect_add_entry( 0, table_name, match_key, handle, options ) print "Entry has been added with handle", entry_handle def complete_table_indirect_add(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_table_indirect_add_with_group(self, line): "Add entry to an indirect match table: table_indirect_add <table name> <match fields> => <group handle> [priority]" table_name, match_key, handle, options = self.indirect_add_common(line, ws=True) entry_handle = self.client.bm_mt_indirect_ws_add_entry( 0, table_name, match_key, handle, options ) print "Entry has been added with handle", entry_handle def complete_table_indirect_add_with_group(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_table_indirect_delete(self, line): "Delete entry from an indirect match table: table_indirect_delete <table name> <entry handle>" args = line.split() self.exactly_n_args(args, 2) table_name = args[0] table = self.get_res("table", table_name, ResType.table) self.check_indirect(table) try: entry_handle = int(args[1]) except: raise UIn_Error("Bad format for entry handle") print "Deleting entry", entry_handle, "from", table_name self.client.bm_mt_indirect_delete_entry(0, table.name, entry_handle) def complete_table_indirect_delete(self, text, line, start_index, end_index): return self._complete_tables(text) def indirect_set_default_common(self, line, ws=False): args = line.split() self.exactly_n_args(args, 2) table_name = args[0] table = self.get_res("table", table_name, ResType.table) if ws: self.check_indirect_ws(table) else: self.check_indirect(table) try: handle = int(args[1]) except: raise UIn_Error("Bad format for handle") return table.name, handle @handle_bad_input def do_table_indirect_set_default(self, line): "Set default member for indirect match table: table_indirect_set_default <table name> <member handle>" table_name, handle = self.indirect_set_default_common(line) self.client.bm_mt_indirect_set_default_member(0, table_name, handle) def complete_table_indirect_set_default(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_table_indirect_set_default_with_group(self, line): "Set default group for indirect match table: table_indirect_set_default <table name> <group handle>" table_name, handle = self.indirect_set_default_common(line, ws=True) self.client.bm_mt_indirect_ws_set_default_group(0, table_name, handle) def complete_table_indirect_set_default_with_group(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_table_indirect_reset_default(self, line): "Reset default entry for indirect match table: table_indirect_reset_default <table name>" args = line.split() self.exactly_n_args(args, 1) table_name = args[0] table = self.get_res("table", table_name, ResType.table) self.client.bm_mt_indirect_reset_default_entry(0, table.name) def complete_table_indirect_reset_default(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_act_prof_create_group(self, line): "Add a group to an action pofile: act_prof_create_group <action profile name>" args = line.split() self.exactly_n_args(args, 1) act_prof_name = args[0] act_prof = self.get_res("action profile", act_prof_name, ResType.action_prof) self.check_act_prof_ws(act_prof) grp_handle = self.client.bm_mt_act_prof_create_group(0, act_prof.name) print "Group has been created with handle", grp_handle def complete_act_prof_create_group(self, text, line, start_index, end_index): return self._complete_act_profs(text) @deprecated_act_prof("act_prof_create_group", with_selection=True) def do_table_indirect_create_group(self, line): "Add a group to an indirect match table: table_indirect_create_group <table name>" pass def complete_table_indirect_create_group(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_act_prof_delete_group(self, line): "Delete a group from an action profile: act_prof_delete_group <action profile name> <group handle>" args = line.split() self.exactly_n_args(args, 2) act_prof_name = args[0] act_prof = self.get_res("action profile", act_prof_name, ResType.action_prof) self.check_act_prof_ws(act_prof) try: grp_handle = int(args[1]) except: raise UIn_Error("Bad format for group handle") self.client.bm_mt_act_prof_delete_group(0, act_prof.name, grp_handle) def complete_act_prof_delete_group(self, text, line, start_index, end_index): return self._complete_act_profs(text) @deprecated_act_prof("act_prof_delete_group", with_selection=True) def do_table_indirect_delete_group(self, line): "Delete a group: table_indirect_delete_group <table name> <group handle>" pass def complete_table_indirect_delete_group(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_act_prof_add_member_to_group(self, line): "Add member to group in an action profile: act_prof_add_member_to_group <action profile name> <member handle> <group handle>" args = line.split() self.exactly_n_args(args, 3) act_prof_name = args[0] act_prof = self.get_res("action profile", act_prof_name, ResType.action_prof) self.check_act_prof_ws(act_prof) try: mbr_handle = int(args[1]) except: raise UIn_Error("Bad format for member handle") try: grp_handle = int(args[2]) except: raise UIn_Error("Bad format for group handle") self.client.bm_mt_act_prof_add_member_to_group( 0, act_prof.name, mbr_handle, grp_handle) def complete_act_prof_add_member_to_group(self, text, line, start_index, end_index): return self._complete_act_profs(text) @deprecated_act_prof("act_prof_add_member_to_group", with_selection=True) def do_table_indirect_add_member_to_group(self, line): "Add member to group: table_indirect_add_member_to_group <table name> <member handle> <group handle>" pass def complete_table_indirect_add_member_to_group(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_act_prof_remove_member_from_group(self, line): "Remove member from group in action profile: act_prof_remove_member_from_group <action profile name> <member handle> <group handle>" args = line.split() self.exactly_n_args(args, 3) act_prof_name = args[0] act_prof = self.get_res("action profile", act_prof_name, ResType.action_prof) self.check_act_prof_ws(act_prof) try: mbr_handle = int(args[1]) except: raise UIn_Error("Bad format for member handle") try: grp_handle = int(args[2]) except: raise UIn_Error("Bad format for group handle") self.client.bm_mt_act_prof_remove_member_from_group( 0, act_prof.name, mbr_handle, grp_handle) def complete_act_prof_remove_member_from_group(self, text, line, start_index, end_index): return self._complete_act_profs(text) @deprecated_act_prof("act_prof_remove_member_from_group", with_selection=True) def do_table_indirect_remove_member_from_group(self, line): "Remove member from group: table_indirect_remove_member_from_group <table name> <member handle> <group handle>" pass def complete_table_indirect_remove_member_from_group(self, text, line, start_index, end_index): return self._complete_tables(text) def check_has_pre(self): if self.pre_type == PreType.None: raise UIn_Error( "Cannot execute this command without packet replication engine" ) def get_mgrp(self, s): try: return int(s) except: raise UIn_Error("Bad format for multicast group id") @handle_bad_input_mc def do_mc_mgrp_create(self, line): "Create multicast group: mc_mgrp_create <group id>" self.check_has_pre() args = line.split() self.exactly_n_args(args, 1) mgrp = self.get_mgrp(args[0]) print "Creating multicast group", mgrp mgrp_hdl = self.mc_client.bm_mc_mgrp_create(0, mgrp) assert(mgrp == mgrp_hdl) @handle_bad_input_mc def do_mc_mgrp_destroy(self, line): "Destroy multicast group: mc_mgrp_destroy <group id>" self.check_has_pre() args = line.split() self.exactly_n_args(args, 1) mgrp = self.get_mgrp(args[0]) print "Destroying multicast group", mgrp self.mc_client.bm_mc_mgrp_destroy(0, mgrp) def ports_to_port_map_str(self, ports, description="port"): last_port_num = 0 port_map_str = "" ports_int = [] for port_num_str in ports: try: port_num = int(port_num_str) except: raise UIn_Error("'%s' is not a valid %s number" "" % (port_num_str, description)) if port_num < 0: raise UIn_Error("'%s' is not a valid %s number" "" % (port_num_str, description)) ports_int.append(port_num) ports_int.sort() for port_num in ports_int: if port_num == (last_port_num - 1): raise UIn_Error("Found duplicate %s number '%s'" "" % (description, port_num)) port_map_str += "0" * (port_num - last_port_num) + "1" last_port_num = port_num + 1 return port_map_str[::-1] def parse_ports_and_lags(self, args): ports = [] i = 1 while (i < len(args) and args[i] != '|'): ports.append(args[i]) i += 1 port_map_str = self.ports_to_port_map_str(ports) if self.pre_type == PreType.SimplePreLAG: i += 1 lags = [] if i == len(args) else args[i:] lag_map_str = self.ports_to_port_map_str(lags, description="lag") else: lag_map_str = None return port_map_str, lag_map_str @handle_bad_input_mc def do_mc_node_create(self, line): "Create multicast node: mc_node_create <rid> <space-separated port list> [ | <space-separated lag list> ]" self.check_has_pre() args = line.split() self.at_least_n_args(args, 1) try: rid = int(args[0]) except: raise UIn_Error("Bad format for rid") port_map_str, lag_map_str = self.parse_ports_and_lags(args) if self.pre_type == PreType.SimplePre: print "Creating node with rid", rid, "and with port map", port_map_str l1_hdl = self.mc_client.bm_mc_node_create(0, rid, port_map_str) else: print "Creating node with rid", rid, ", port map", port_map_str, "and lag map", lag_map_str l1_hdl = self.mc_client.bm_mc_node_create(0, rid, port_map_str, lag_map_str) print "node was created with handle", l1_hdl def get_node_handle(self, s): try: return int(s) except: raise UIn_Error("Bad format for node handle") @handle_bad_input_mc def do_mc_node_update(self, line): "Update multicast node: mc_node_update <node handle> <space-separated port list> [ | <space-separated lag list> ]" self.check_has_pre() args = line.split() self.at_least_n_args(args, 2) l1_hdl = self.get_node_handle(args[0]) port_map_str, lag_map_str = self.parse_ports_and_lags(args) if self.pre_type == PreType.SimplePre: print "Updating node", l1_hdl, "with port map", port_map_str self.mc_client.bm_mc_node_update(0, l1_hdl, port_map_str) else: print "Updating node", l1_hdl, "with port map", port_map_str, "and lag map", lag_map_str self.mc_client.bm_mc_node_update(0, l1_hdl, port_map_str, lag_map_str) @handle_bad_input_mc def do_mc_node_associate(self, line): "Associate node to multicast group: mc_node_associate <group handle> <node handle>" self.check_has_pre() args = line.split() self.exactly_n_args(args, 2) mgrp = self.get_mgrp(args[0]) l1_hdl = self.get_node_handle(args[1]) print "Associating node", l1_hdl, "to multicast group", mgrp self.mc_client.bm_mc_node_associate(0, mgrp, l1_hdl) @handle_bad_input_mc def do_mc_node_dissociate(self, line): "Dissociate node from multicast group: mc_node_associate <group handle> <node handle>" self.check_has_pre() args = line.split() self.exactly_n_args(args, 2) mgrp = self.get_mgrp(args[0]) l1_hdl = self.get_node_handle(args[1]) print "Dissociating node", l1_hdl, "from multicast group", mgrp self.mc_client.bm_mc_node_dissociate(0, mgrp, l1_hdl) @handle_bad_input_mc def do_mc_node_destroy(self, line): "Destroy multicast node: mc_node_destroy <node handle>" self.check_has_pre() args = line.split() self.exactly_n_args(args, 1) l1_hdl = int(line.split()[0]) print "Destroying node", l1_hdl self.mc_client.bm_mc_node_destroy(0, l1_hdl) @handle_bad_input_mc def do_mc_set_lag_membership(self, line): "Set lag membership of port list: mc_set_lag_membership <lag index> <space-separated port list>" self.check_has_pre() if self.pre_type != PreType.SimplePreLAG: raise UIn_Error( "Cannot execute this command with this type of PRE,"\ " SimplePreLAG is required" ) args = line.split() self.at_least_n_args(args, 2) try: lag_index = int(args[0]) except: raise UIn_Error("Bad format for lag index") port_map_str = self.ports_to_port_map_str(args[1:], description="lag") print "Setting lag membership:", lag_index, "<-", port_map_str self.mc_client.bm_mc_set_lag_membership(0, lag_index, port_map_str) @handle_bad_input_mc def do_mc_dump(self, line): "Dump entries in multicast engine" self.check_has_pre() json_dump = self.mc_client.bm_mc_get_entries(0) try: mc_json = json.loads(json_dump) except: print "Exception when retrieving MC entries" return l1_handles = {} for h in mc_json["l1_handles"]: l1_handles[h["handle"]] = (h["rid"], h["l2_handle"]) l2_handles = {} for h in mc_json["l2_handles"]: l2_handles[h["handle"]] = (h["ports"], h["lags"]) print "==========" print "MC ENTRIES" for mgrp in mc_json["mgrps"]: print "**********" mgid = mgrp["id"] print "mgrp({})".format(mgid) for L1h in mgrp["l1_handles"]: rid, L2h = l1_handles[L1h] print " -> (L1h={}, rid={})".format(L1h, rid), ports, lags = l2_handles[L2h] print "-> (ports=[{}], lags=[{}])".format( ", ".join([str(p) for p in ports]), ", ".join([str(l) for l in lags])) print "==========" print "LAGS" if "lags" in mc_json: for lag in mc_json["lags"]: print "lag({})".format(lag["id"]), print "-> ports=[{}]".format(", ".join([str(p) for p in ports])) else: print "None for this PRE type" print "==========" @handle_bad_input def do_load_new_config_file(self, line): "Load new json config: load_new_config_file <path to .json file>" args = line.split() self.exactly_n_args(args, 1) filename = args[0] if not os.path.isfile(filename): raise UIn_Error("Not a valid filename") print "Loading new Json config" with open(filename, 'r') as f: json_str = f.read() try: json.loads(json_str) except: raise UIn_Error("Not a valid JSON file") self.client.bm_load_new_config(json_str) load_json_str(json_str) @handle_bad_input def do_swap_configs(self, line): "Swap the 2 existing configs, need to have called load_new_config_file before" print "Swapping configs" self.client.bm_swap_configs() @handle_bad_input def do_meter_array_set_rates(self, line): "Configure rates for an entire meter array: meter_array_set_rates <name> <rate_1>:<burst_1> <rate_2>:<burst_2> ..." args = line.split() self.at_least_n_args(args, 1) meter_name = args[0] meter = self.get_res("meter", meter_name, ResType.meter_array) rates = args[1:] if len(rates) != meter.rate_count: raise UIn_Error( "Invalid number of rates, expected %d but got %d"\ % (meter.rate_count, len(rates)) ) new_rates = [] for rate in rates: try: r, b = rate.split(':') r = float(r) b = int(b) new_rates.append(BmMeterRateConfig(r, b)) except: raise UIn_Error("Error while parsing rates") self.client.bm_meter_array_set_rates(0, meter.name, new_rates) def complete_meter_array_set_rates(self, text, line, start_index, end_index): return self._complete_meters(text) @handle_bad_input def do_meter_set_rates(self, line): "Configure rates for a meter: meter_set_rates <name> <index> <rate_1>:<burst_1> <rate_2>:<burst_2> ...\nRate uses units/microsecond and burst uses units where units is bytes or packets" args = line.split() self.at_least_n_args(args, 2) meter_name = args[0] meter = self.get_res("meter", meter_name, ResType.meter_array) try: index = int(args[1]) except: raise UIn_Error("Bad format for index") rates = args[2:] if len(rates) != meter.rate_count: raise UIn_Error( "Invalid number of rates, expected %d but got %d"\ % (meter.rate_count, len(rates)) ) new_rates = [] for rate in rates: try: r, b = rate.split(':') r = float(r) b = int(b) new_rates.append(BmMeterRateConfig(r, b)) except: raise UIn_Error("Error while parsing rates") if meter.is_direct: table_name = meter.binding self.client.bm_mt_set_meter_rates(0, table_name, index, new_rates) else: self.client.bm_meter_set_rates(0, meter.name, index, new_rates) def complete_meter_set_rates(self, text, line, start_index, end_index): return self._complete_meters(text) @handle_bad_input def do_meter_get_rates(self, line): "Retrieve rates for a meter: meter_get_rates <name> <index>" args = line.split() self.exactly_n_args(args, 2) meter_name = args[0] meter = self.get_res("meter", meter_name, ResType.meter_array) try: index = int(args[1]) except: raise UIn_Error("Bad format for index") # meter.rate_count if meter.is_direct: table_name = meter.binding rates = self.client.bm_mt_get_meter_rates(0, table_name, index) else: rates = self.client.bm_meter_get_rates(0, meter.name, index) if len(rates) != meter.rate_count: print "WARNING: expected", meter.rate_count, "rates", print "but only received", len(rates) for idx, rate in enumerate(rates): print "{}: info rate = {}, burst size = {}".format( idx, rate.units_per_micros, rate.burst_size) def complete_meter_get_rates(self, text, line, start_index, end_index): return self._complete_meters(text) def _complete_meters(self, text): return self._complete_res(METER_ARRAYS, text) @handle_bad_input def do_counter_read(self, line): "Read counter value: counter_read <name> <index>" args = line.split() self.exactly_n_args(args, 2) counter_name = args[0] counter = self.get_res("counter", counter_name, ResType.counter_array) index = args[1] try: index = int(index) except: raise UIn_Error("Bad format for index") if counter.is_direct: table_name = counter.binding print "this is the direct counter for table", table_name # index = index & 0xffffffff value = self.client.bm_mt_read_counter(0, table_name, index) else: value = self.client.bm_counter_read(0, counter.name, index) print "%s[%d]= " % (counter_name, index), value def complete_counter_read(self, text, line, start_index, end_index): return self._complete_counters(text) @handle_bad_input def do_counter_write(self, line): "Write counter value: counter_write <name> <index> <packets> <bytes>" args = line.split() self.exactly_n_args(args, 4) counter_name = args[0] counter = self.get_res("counter", counter_name, ResType.counter_array) index = args[1] pkts = args[2] byts = args[3] try: index = int(index) except: raise UIn_Error("Bad format for index") try: pkts = int(pkts) except: raise UIn_Error("Bad format for packets") try: byts = int(byts) except: raise UIn_Error("Bad format for bytes") if counter.is_direct: table_name = counter.binding print "writing to direct counter for table", table_name value = self.client.bm_mt_write_counter(0, table_name, index, BmCounterValue(packets=pkts, bytes = byts)) else: self.client.bm_counter_write(0, counter_name, index, BmCounterValue(packets=pkts, bytes = byts)) print "%s[%d] has been updated" % (counter_name, index) def complete_counter_write(self, text, line, start_index, end_index): return self._complete_counters(text) @handle_bad_input def do_counter_reset(self, line): "Reset counter: counter_reset <name>" args = line.split() self.exactly_n_args(args, 1) counter_name = args[0] counter = self.get_res("counter", counter_name, ResType.counter_array) if counter.is_direct: table_name = counter.binding print "this is the direct counter for table", table_name value = self.client.bm_mt_reset_counters(0, table_name) else: value = self.client.bm_counter_reset_all(0, counter.name) def complete_counter_reset(self, text, line, start_index, end_index): return self._complete_counters(text) def _complete_counters(self, text): return self._complete_res(COUNTER_ARRAYS, text) @handle_bad_input def do_register_read(self, line): "Read register value: register_read <name> [index]" args = line.split() self.at_least_n_args(args, 1) register_name = args[0] register = self.get_res("register", register_name, ResType.register_array) if len(args) > 1: self.exactly_n_args(args, 2) index = args[1] try: index = int(index) except: raise UIn_Error("Bad format for index") value = self.client.bm_register_read(0, register.name, index) print "{}[{}]=".format(register_name, index), value else: sys.stderr.write("register index omitted, reading entire array\n") entries = self.client.bm_register_read_all(0, register.name) print "{}=".format(register_name), ", ".join( [str(e) for e in entries]) def complete_register_read(self, text, line, start_index, end_index): return self._complete_registers(text) @handle_bad_input def do_register_write(self, line): "Write register value: register_write <name> <index> <value>" args = line.split() self.exactly_n_args(args, 3) register_name = args[0] register = self.get_res("register", register_name, ResType.register_array) index = args[1] try: index = int(index) except: raise UIn_Error("Bad format for index") value = args[2] try: value = int(value) except: raise UIn_Error("Bad format for value, must be an integer") self.client.bm_register_write(0, register.name, index, value) def complete_register_write(self, text, line, start_index, end_index): return self._complete_registers(text) @handle_bad_input def do_register_reset(self, line): "Reset all the cells in the register array to 0: register_reset <name>" args = line.split() self.exactly_n_args(args, 1) register_name = args[0] register = self.get_res("register", register_name, ResType.register_array) self.client.bm_register_reset(0, register.name) def complete_register_reset(self, text, line, start_index, end_index): return self._complete_registers(text) def _complete_registers(self, text): return self._complete_res(REGISTER_ARRAYS, text) def dump_action_and_data(self, action_name, action_data): def hexstr(v): return "".join("{:02x}".format(ord(c)) for c in v) print "Action entry: {} - {}".format( action_name, ", ".join([hexstr(a) for a in action_data])) def dump_action_entry(self, a_entry): if a_entry.action_type == BmActionEntryType.NONE: print "EMPTY" elif a_entry.action_type == BmActionEntryType.ACTION_DATA: self.dump_action_and_data(a_entry.action_name, a_entry.action_data) elif a_entry.action_type == BmActionEntryType.MBR_HANDLE: print "Index: member({})".format(a_entry.mbr_handle) elif a_entry.action_type == BmActionEntryType.GRP_HANDLE: print "Index: group({})".format(a_entry.grp_handle) def dump_one_member(self, member): print "Dumping member {}".format(member.mbr_handle) self.dump_action_and_data(member.action_name, member.action_data) def dump_members(self, members): for m in members: print "**********" self.dump_one_member(m) def dump_one_group(self, group): print "Dumping group {}".format(group.grp_handle) print "Members: [{}]".format(", ".join( [str(h) for h in group.mbr_handles])) def dump_groups(self, groups): for g in groups: print "**********" self.dump_one_group(g) def dump_one_entry(self, table, entry): if table.key: out_name_w = max(20, max([len(t[0]) for t in table.key])) def hexstr(v): return "".join("{:02x}".format(ord(c)) for c in v) def dump_exact(p): return hexstr(p.exact.key) def dump_lpm(p): return "{}/{}".format(hexstr(p.lpm.key), p.lpm.prefix_length) def dump_ternary(p): return "{} &&& {}".format(hexstr(p.ternary.key), hexstr(p.ternary.mask)) def dump_range(p): return "{} -> {}".format(hexstr(p.range.start), hexstr(p.range.end_)) def dump_valid(p): return "01" if p.valid.key else "00" pdumpers = {"exact": dump_exact, "lpm": dump_lpm, "ternary": dump_ternary, "valid": dump_valid, "range": dump_range} print "Dumping entry {}".format(hex(entry.entry_handle)) print "Match key:" for p, k in zip(entry.match_key, table.key): assert(k[1] == p.type) pdumper = pdumpers[MatchType.to_str(p.type)] print "* {0:{w}}: {1:10}{2}".format( k[0], MatchType.to_str(p.type).upper(), pdumper(p), w=out_name_w) if entry.options.priority >= 0: print "Priority: {}".format(entry.options.priority) self.dump_action_entry(entry.action_entry) if entry.life is not None: print "Life: {}ms since hit, timeout is {}ms".format( entry.life.time_since_hit_ms, entry.life.timeout_ms) @handle_bad_input def do_table_dump_entry(self, line): "Display some information about a table entry: table_dump_entry <table name> <entry handle>" args = line.split() self.exactly_n_args(args, 2) table_name = args[0] table = self.get_res("table", table_name, ResType.table) try: entry_handle = int(args[1]) except: raise UIn_Error("Bad format for entry handle") entry = self.client.bm_mt_get_entry(0, table.name, entry_handle) self.dump_one_entry(table, entry) def complete_table_dump_entry(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_act_prof_dump_member(self, line): "Display some information about a member: act_prof_dump_member <action profile name> <member handle>" args = line.split() self.exactly_n_args(args, 2) act_prof_name = args[0] act_prof = self.get_res("action profile", act_prof_name, ResType.action_prof) try: mbr_handle = int(args[1]) except: raise UIn_Error("Bad format for member handle") member = self.client.bm_mt_act_prof_get_member( 0, act_prof.name, mbr_handle) self.dump_one_member(member) def complete_act_prof_dump_member(self, text, line, start_index, end_index): return self._complete_act_profs(text) # notice the strictly_deprecated=False; I don't consider this command to be # strictly deprecated because it can be convenient and does not modify the # action profile so won't create problems @deprecated_act_prof("act_prof_dump_member", with_selection=False, strictly_deprecated=False) def do_table_dump_member(self, line): "Display some information about a member: table_dump_member <table name> <member handle>" pass def complete_table_dump_member(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_act_prof_dump_group(self, line): "Display some information about a group: table_dump_group <action profile name> <group handle>" args = line.split() self.exactly_n_args(args, 2) act_prof_name = args[0] act_prof = self.get_res("action profile", act_prof_name, ResType.action_prof) try: grp_handle = int(args[1]) except: raise UIn_Error("Bad format for group handle") group = self.client.bm_mt_act_prof_get_group( 0, act_prof.name, grp_handle) self.dump_one_group(group) def complete_act_prof_dump_group(self, text, line, start_index, end_index): return self._complete_act_profs(text) @deprecated_act_prof("act_prof_dump_group", with_selection=False, strictly_deprecated=False) def do_table_dump_group(self, line): "Display some information about a group: table_dump_group <table name> <group handle>" pass def complete_table_dump_group(self, text, line, start_index, end_index): return self._complete_tables(text) def _dump_act_prof(self, act_prof): act_prof_name = act_prof.name members = self.client.bm_mt_act_prof_get_members(0, act_prof.name) print "==========" print "MEMBERS" self.dump_members(members) if act_prof.with_selection: groups = self.client.bm_mt_act_prof_get_groups(0, act_prof.name) print "==========" print "GROUPS" self.dump_groups(groups) @handle_bad_input def do_act_prof_dump(self, line): "Display entries in an action profile: act_prof_dump <action profile name>" args = line.split() self.exactly_n_args(args, 1) act_prof_name = args[0] act_prof = self.get_res("action profile", act_prof_name, ResType.action_prof) self._dump_act_prof(act_prof) def complete_act_prof_dump(self, text, line, start_index, end_index): return self._complete_act_profs(text) @handle_bad_input def do_table_dump(self, line): "Display entries in a match-table: table_dump <table name>" args = line.split() self.exactly_n_args(args, 1) table_name = args[0] table = self.get_res("table", table_name, ResType.table) entries = self.client.bm_mt_get_entries(0, table.name) print "==========" print "TABLE ENTRIES" for e in entries: print "**********" self.dump_one_entry(table, e) if table.type_ == TableType.indirect or\ table.type_ == TableType.indirect_ws: assert(table.action_prof is not None) self._dump_act_prof(table.action_prof) # default entry default_entry = self.client.bm_mt_get_default_entry(0, table.name) print "==========" print "Dumping default entry" self.dump_action_entry(default_entry) print "==========" def complete_table_dump(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_table_dump_entry_from_key(self, line): "Display some information about a table entry: table_dump_entry_from_key <table name> <match fields> [priority]" args = line.split() self.at_least_n_args(args, 1) table_name = args[0] table = self.get_res("table", table_name, ResType.table) if table.match_type in {MatchType.TERNARY, MatchType.RANGE}: try: priority = int(args.pop(-1)) except: raise UIn_Error( "Table is ternary, but could not extract a valid priority from args" ) else: priority = 0 match_key = args[1:] if len(match_key) != table.num_key_fields(): raise UIn_Error( "Table %s needs %d key fields" % (table_name, table.num_key_fields()) ) match_key = parse_match_key(table, match_key) entry = self.client.bm_mt_get_entry_from_key( 0, table.name, match_key, BmAddEntryOptions(priority = priority)) self.dump_one_entry(table, entry) def complete_table_dump_entry_from_key(self, text, line, start_index, end_index): return self._complete_tables(text) @handle_bad_input def do_port_add(self, line): "Add a port to the switch (behavior depends on device manager used): port_add <iface_name> <port_num> [pcap_path]" args = line.split() self.at_least_n_args(args, 2) iface_name = args[0] try: port_num = int(args[1]) except: raise UIn_Error("Bad format for port_num, must be an integer") pcap_path = "" if len(args) > 2: pcap_path = args[2] self.client.bm_dev_mgr_add_port(iface_name, port_num, pcap_path) @handle_bad_input def do_port_remove(self, line): "Removes a port from the switch (behavior depends on device manager used): port_remove <port_num>" args = line.split() self.exactly_n_args(args, 1) try: port_num = int(args[0]) except: raise UIn_Error("Bad format for port_num, must be an integer") self.client.bm_dev_mgr_remove_port(port_num) @handle_bad_input def do_show_ports(self, line): "Shows the ports connected to the switch: show_ports" self.exactly_n_args(line.split(), 0) ports = self.client.bm_dev_mgr_show_ports() print "{:^10}{:^20}{:^10}{}".format( "port #", "iface name", "status", "extra info") print "=" * 50 for port_info in ports: status = "UP" if port_info.is_up else "DOWN" extra_info = "; ".join( [k + "=" + v for k, v in port_info.extra.items()]) print "{:^10}{:^20}{:^10}{}".format( port_info.port_num, port_info.iface_name, status, extra_info) @handle_bad_input def do_switch_info(self, line): "Show some basic info about the switch: switch_info" self.exactly_n_args(line.split(), 0) info = self.client.bm_mgmt_get_info() attributes = [t[2] for t in info.thrift_spec[1:]] out_attr_w = 5 + max(len(a) for a in attributes) for a in attributes: print "{:{w}}: {}".format(a, getattr(info, a), w=out_attr_w) @handle_bad_input def do_reset_state(self, line): "Reset all state in the switch (table entries, registers, ...), but P4 config is preserved: reset_state" self.exactly_n_args(line.split(), 0) self.client.bm_reset_state() @handle_bad_input def do_write_config_to_file(self, line): "Retrieves the JSON config currently used by the switch and dumps it to user-specified file" args = line.split() self.exactly_n_args(args, 1) filename = args[0] json_cfg = self.client.bm_get_config() with open(filename, 'w') as f: f.write(json_cfg) @handle_bad_input def do_serialize_state(self, line): "Serialize the switch state and dumps it to user-specified file" args = line.split() self.exactly_n_args(args, 1) filename = args[0] state = self.client.bm_serialize_state() with open(filename, 'w') as f: f.write(state) def set_crc_parameters_common(self, line, crc_width=16): conversion_fn = {16: hex_to_i16, 32: hex_to_i32}[crc_width] config_type = {16: BmCrc16Config, 32: BmCrc32Config}[crc_width] thrift_fn = {16: self.client.bm_set_crc16_custom_parameters, 32: self.client.bm_set_crc32_custom_parameters}[crc_width] args = line.split() self.exactly_n_args(args, 6) name = args[0] if name not in CUSTOM_CRC_CALCS or CUSTOM_CRC_CALCS[name] != crc_width: raise UIn_ResourceError("crc{}_custom".format(crc_width), name) config_args = [conversion_fn(a) for a in args[1:4]] config_args += [parse_bool(a) for a in args[4:6]] crc_config = config_type(*config_args) thrift_fn(0, name, crc_config) def _complete_crc(self, text, crc_width=16): crcs = sorted( [c for c, w in CUSTOM_CRC_CALCS.items() if w == crc_width]) if not text: return crcs return [c for c in crcs if c.startswith(text)] @handle_bad_input def do_set_crc16_parameters(self, line): "Change the parameters for a custom crc16 hash: set_crc16_parameters <name> <polynomial> <initial remainder> <final xor value> <reflect data?> <reflect remainder?>" self.set_crc_parameters_common(line, 16) def complete_set_crc16_parameters(self, text, line, start_index, end_index): return self._complete_crc(text, 16) @handle_bad_input def do_set_crc32_parameters(self, line): "Change the parameters for a custom crc32 hash: set_crc32_parameters <name> <polynomial> <initial remainder> <final xor value> <reflect data?> <reflect remainder?>" self.set_crc_parameters_common(line, 32) def complete_set_crc32_parameters(self, text, line, start_index, end_index): return self._complete_crc(text, 32) def load_json_config(standard_client=None, json_path=None): load_json_str(utils.get_json_config(standard_client, json_path)) def main(): args = get_parser().parse_args() standard_client, mc_client = thrift_connect( args.thrift_ip, args.thrift_port, RuntimeAPI.get_thrift_services(args.pre) ) load_json_config(standard_client, args.json) RuntimeAPI(args.pre, standard_client, mc_client).cmdloop() if __name__ == '__main__': main()
export const TOGGLE_DEVICE = 'TOGGLE_DEVICE' export const TOGGLE_PAGE = 'TOGGLE_PAGE' export const TOGGLE_SIDEBAR = 'TOGGLE_SIDEBAR' export const CHANGE_MENU_LABEL = 'CHANGE_MENU_LABEL' export const SWITCH_EFFECT = 'SWITCH_EFFECT' export const TOGGLE_LANG = 'TOGGLE_LANG'
//3、接收 this.onmessage = function(ev){ //console.log(ev.data); //4、处理 let sum = ev.data.n1 + ev.data.n2; //5、返回 this.postMessage(sum); };
import socket import asyncio import time import random import json import boto3 import botocore from botocore.config import Config from walkoff_app_sdk.app_base import AppBase class AWSS3(AppBase): __version__ = "1.0.0" app_name = "AWS S3" def __init__(self, redis, logger, console_logger=None): """ Each app should have this __init__ to set up Redis and logging. :param redis: :param logger: :param console_logger: """ super().__init__(redis, logger, console_logger) def auth_s3(self, access_key, secret_key, region): my_config = Config( region_name = region, signature_version = "s3v4", retries = { 'max_attempts': 10, 'mode': 'standard' }, ) self.s3 = boto3.resource( 's3', config=my_config, aws_access_key_id=access_key, aws_secret_access_key=secret_key, ) return self.s3 def list_buckets(self, access_key, secret_key, region): self.s3 = self.auth_s3(access_key, secret_key, region) client = self.s3.meta.client try: newlist = client.list_buckets() return newlist except botocore.exceptions.ClientError as e: return "Error: %s" % e def create_bucket(self, access_key, secret_key, region, bucket_name, access_type): self.s3 = self.auth_s3(access_key, secret_key, region) client = self.s3.meta.client try: creation = client.create_bucket( Bucket=bucket_name, ACL=access_type, CreateBucketConfiguration={ 'LocationConstraint': region }, ) return creation except botocore.exceptions.ClientError as e: return "Error: %s" % e def block_ip_access(self, access_key, secret_key, region, bucket_name, ip): self.s3 = self.auth_s3(access_key, secret_key, region) client = self.s3.meta.client ip_policy = { 'Effect': 'Deny', "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::%s/*" % bucket_name, "arn:aws:s3:::%s" % bucket_name ], "Condition": { "IpAddress": { "aws:SourceIp": [ ip, ] } } } json_policy = {} try: result = client.get_bucket_policy(Bucket=bucket_name) try: policy = result["Policy"] print(policy) if ip in policy: return "IP %s is already in this policy" % ip json_policy = json.loads(policy) try: json_policy["Statement"].append(ip_policy) except KeyError: json_policy["Statement"] = [ip_policy] except KeyError as e: return "Couldn't find key: %s" % e except botocore.exceptions.ClientError: # FIXME: If here, create new policy json_policy = { 'Version': '2012-10-17', 'Statement': [ip_policy] } #new_policy = json.loads(bucket_policy) bucket_policy = json.dumps(json_policy) print(bucket_policy) print() try: putaction = client.put_bucket_policy(Bucket=bucket_name, Policy=bucket_policy) except botocore.exceptions.ClientError as e: return "Failed setting policy: %s" % e print(putaction) return "Successfully blocked IP %s" % ip def bucket_request_payment(self, access_key, secret_key, region, bucket_name): self.s3 = self.auth_s3(access_key, secret_key, region) client = self.s3.meta.client try: return client.get_bucket_request_payment(Bucket=bucket_name) except botocore.exceptions.ClientError as e: return "Error: %s" % e def bucket_replication(self, access_key, secret_key, region, bucket_name): self.s3 = self.auth_s3(access_key, secret_key, region) client = self.s3.meta.client try: return client.get_bucket_replication(Bucket=bucket_name) except botocore.exceptions.ClientError as e: return "Error: %s" % e def bucket_policy_status(self, access_key, secret_key, region, bucket_name): self.s3 = self.auth_s3(access_key, secret_key, region) client = self.s3.meta.client try: return client.get_bucket_policy_status(Bucket=bucket_name) except botocore.exceptions.ClientError as e: return "Error: %s" % e def bucket_logging(self, access_key, secret_key, region, bucket_name): self.s3 = self.auth_s3(access_key, secret_key, region) client = self.s3.meta.client try: return client.get_bucket_logging(Bucket=bucket_name) except botocore.exceptions.ClientError as e: return "Error: %s" % e def upload_file_to_bucket(self, access_key, secret_key, region, bucket_name, bucket_path, file_id): self.s3 = self.auth_s3(access_key, secret_key, region) client = self.s3.meta.client found_file = self.get_file(file_id) print(found_file) s3_response = client.put_object(Bucket=bucket_name, Key=bucket_path, Body=found_file["data"]) #s3_response = client.upload_file('LOCAL PATH', bucket_name, bucket_path) return s3_response def delete_file_from_bucket(self, access_key, secret_key, region, bucket_name, bucket_path): self.s3 = self.auth_s3(access_key, secret_key, region) client = self.s3.meta.client s3_response = client.delete_object(Bucket=bucket_name, Key=bucket_path) return s3_response def download_file_from_bucket(self, access_key, secret_key, region, bucket_name, filename): self.s3 = self.auth_s3(access_key, secret_key, region) client = self.s3.meta.client s3_response_object = client.get_object(Bucket=bucket_name, Key=filename) object_content = s3_response_object['Body'].read() filedata = { "data": object_content, "filename": filename, } ret = self.set_files(filedata) if isinstance(ret, list): if len(ret) == 1: return { "success": True, "file_id": ret[0], "filename": filename, "length": len(object_content), } return { "success": False, "reason": "Bad return from file upload: %s" % ret } if __name__ == "__main__": AWSS3.run()
import React from "react"; import { useState, useEffect } from "react"; import PublicSplit from "./Workout/PublicSplit"; import "./Workout/ListSplits.css" import { SplitButton } from "react-bootstrap"; import compare from "../utils/compare" export default function ListSplits() { const [splits, setSplits] = useState([]); useEffect(() => { fetch(`/splits/public`) .then((res) => res.json()) .then((splits) => setSplits(splits)); }, []); splits.sort(compare) console.log(splits) return ( <div className="splitList"> {splits.map((split) => { return <PublicSplit className="split" split={split} user={split.googleId} />; })} </div> ); }
import React from 'react' import './Home.css' function Home() { return ( <div className="home" style={{color:'aliceblue'}}> {/* MyPal. A step away from all your pals. */} </div> ) } export default Home
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers import React from 'react'; import PropTypes from 'prop-types'; const ExternalIDs = (props) => { let nodes = null; if (props.externalIds) { nodes = props.externalIds.map((id, i) => ( <li key={i}>{id.label_desc}: {id.record_id}</li> ), this); } const idList = ( <ul className="externalIds"> {nodes} </ul> ); return ( <div> <h6 className="category">External Identifiers</h6> {idList} </div> ); }; ExternalIDs.propTypes = { externalIds: PropTypes.array, }; export default ExternalIDs;
import React, { Component } from 'react' import { connect } from 'react-redux' import { withRouter } from 'react-router-dom' import { Button, TextField, FormControl, withStyles, FormGroup, InputLabel, NativeSelect } from '@material-ui/core' import { Save } from '@material-ui/icons' import { repositoryActions } from '../../redux/actions' import { ifNotEmpty } from '../../utils/UtilityFunctions' class EditRepository extends Component { constructor(props) { super(props) this.state = { params: {}, } } componentWillMount() { if (!this.props.loadedRepository) { this.loadRepository() } } loadRepository = () => { const { dispatch, match } = this.props const repositoryId = match.params.id dispatch(repositoryActions.findById(repositoryId)) dispatch(repositoryActions.getConnectionParams(repositoryId)) } handleChange = (name) => (event) => { this.setState({ params: { ...this.state.params, [name]: event.target.value } }) } handleSubmit = (event) => { event.preventDefault() const { dispatch, match } = this.props const repositoryId = match.params.id dispatch(repositoryActions.updateConnectionParams(repositoryId, this.state.params)) } render() { const { loadedRepository, connectionParams, loadedConnectionParams, repository } = this.props if (!loadedRepository) { return null } if (!loadedConnectionParams) { return null } const dynamicForm = connectionParams.map(param => { let input = null if (param.type === 'boolean') { if (repository.connectionParams.length > 0) { input = ( <div> <InputLabel htmlFor={`__${param.name}`}>{param.label}</InputLabel> <NativeSelect onChange={this.handleChange(param.name)} inputProps={{ id: `__${param.name}` }} defaultValue={repository .connectionParams .find(x => x.name === param.name) .value } > <option>Selecciona</option> <option value="true">Si</option> <option value="false">No</option> </NativeSelect> </div>) } else { input = ( <div> <InputLabel htmlFor={`__${param.name}`}>{param.label}</InputLabel> <NativeSelect onChange={this.handleChange(param.name)} inputProps={{ id: `__${param.name}` }} > <option>Selecciona</option> <option value="true">Si</option> <option value="false">No</option> </NativeSelect> </div>) } } else if (repository.connectionParams.length > 0) { input = ( <TextField label={param.label} type={param.type} onChange={this.handleChange(param.name)} defaultValue={ifNotEmpty(repository.connectionParams, repository .connectionParams .find(x => x.name === param.name) .value)} />) } else { input = ( <TextField label={param.label} type={param.type} onChange={this.handleChange(param.name)} />) } return ( <FormGroup key={param.name}> <FormControl> {input} </FormControl> </FormGroup > ) }) return ( <form autoComplete="off" className="mddv-form"> {dynamicForm} <FormGroup> <FormControl> <br /> <Button size="small" variant="raised" onClick={this.handleSubmit} color="primary"> Actualizar Parámetros de Conexión <Save className="icon-button" /> </Button> </FormControl> </FormGroup> </form> ) } } const mapStateToProps = state => { const { loading, loadedRepository, loadedConnectionParams, connectionParams, repository } = state.repositoryReducer return { loading, loadedRepository, loadedConnectionParams, connectionParams, repository } } export default withStyles(null)(withRouter(connect(mapStateToProps)(EditRepository)))
/*! * CanJS - 2.3.28 * http://canjs.com/ * Copyright (c) 2016 Bitovi * Thu, 08 Dec 2016 20:53:50 GMT * Licensed MIT */ /*[email protected]#view/callbacks/callbacks*/ steal('can/util', 'can/view', function (can) { var attr = can.view.attr = function (attributeName, attrHandler) { if (attrHandler) { if (typeof attributeName === 'string') { attributes[attributeName] = attrHandler; } else { regExpAttributes.push({ match: attributeName, handler: attrHandler }); } } else { var cb = attributes[attributeName]; if (!cb) { for (var i = 0, len = regExpAttributes.length; i < len; i++) { var attrMatcher = regExpAttributes[i]; if (attrMatcher.match.test(attributeName)) { cb = attrMatcher.handler; break; } } } return cb; } }; var attributes = {}, regExpAttributes = [], automaticCustomElementCharacters = /[-\:]/; var tag = can.view.tag = function (tagName, tagHandler) { if (tagHandler) { if (typeof tags[tagName.toLowerCase()] !== 'undefined') { can.dev.warn('Custom tag: ' + tagName.toLowerCase() + ' is already defined'); } if (!automaticCustomElementCharacters.test(tagName) && tagName !== 'content') { can.dev.warn('Custom tag: ' + tagName.toLowerCase() + ' is missing a hyphen'); } if (can.global.html5) { can.global.html5.elements += ' ' + tagName; can.global.html5.shivDocument(); } tags[tagName.toLowerCase()] = tagHandler; } else { var cb = tags[tagName.toLowerCase()]; if (!cb && automaticCustomElementCharacters.test(tagName)) { cb = function () { }; } return cb; } }; var tags = {}; can.view.callbacks = { _tags: tags, _attributes: attributes, _regExpAttributes: regExpAttributes, tag: tag, attr: attr, tagHandler: function (el, tagName, tagData) { var helperTagCallback = tagData.options.get('tags.' + tagName, { proxyMethods: false }), tagCallback = helperTagCallback || tags[tagName]; var scope = tagData.scope, res; if (tagCallback) { res = can.__notObserve(tagCallback)(el, tagData); } else { res = scope; } if (!tagCallback) { can.dev.warn('can/view/scanner.js: No custom element found for ' + tagName); } if (res && tagData.subtemplate) { if (scope !== res) { scope = scope.add(res); } var result = tagData.subtemplate(scope, tagData.options); var frag = typeof result === 'string' ? can.view.frag(result) : result; can.appendChild(el, frag); } } }; return can.view.callbacks; });
""" Kubernetes cluster manager module that provides functionality to schedule jobs as well as manage their state in the cluster. """ import shlex from kubernetes import client as k_client from kubernetes import config as k_config from kubernetes.client.rest import ApiException from .abstractmgr import AbstractManager, ManagerException class KubernetesManager(AbstractManager): def __init__(self, config_dict=None): super().__init__(config_dict) k_config.load_incluster_config() self.kube_client = k_client.CoreV1Api() self.kube_v1_batch_client = k_client.BatchV1Api() def schedule_job(self, image, command, name, resources_dict, mountdir=None): """ Schedule a new job and return the job object. """ job_instance = self.create_job(image, command, name, resources_dict, mountdir) job = self.submit_job(job_instance) return job def get_job(self, name): """ Get a previously scheduled job object. """ job_namespace = self.config.get('JOB_NAMESPACE') try: job = self.kube_v1_batch_client.read_namespaced_job(name, job_namespace) except ApiException as e: status_code = 503 if e.status == 500 else e.status raise ManagerException(str(e), status_code=status_code) return job def get_job_logs(self, job): """ Get the logs string from a previously scheduled job object. """ # TODO: Think of a better way to abstract out logs in case of multiple pods running parallelly logs = '' pods = self.get_job_pods(job.metadata.name) for pod_item in pods.items: pod_name = pod_item.metadata.name logs += self.get_pod_log(pod_name) return logs def get_job_info(self, job): """ Get the job's info dictionary for a previously scheduled job object. """ info = super().get_job_info(job) status = 'notstarted' message = 'task not available yet' conditions = job.status.conditions failed = job.status.failed succeeded = job.status.succeeded completion_time = job.status.completion_time if not (conditions is None and failed is None and succeeded is None): if conditions: for condition in conditions: if condition.type == 'Failed' and condition.status == 'True': message = condition.message status = 'finishedWithError' break if status == 'notstarted': if completion_time and succeeded: message = 'finished' status = 'finishedSuccessfully' elif job.status.active: message = 'running' status = 'started' else: message = 'inactive' status = 'undefined' info['name'] = job.metadata.name info['image'] = job.spec.template.spec.containers[0].image info['cmd'] = ' '.join(job.spec.template.spec.containers[0].command) if completion_time is not None: info['timestamp'] = completion_time.isoformat() info['message'] = message info['status'] = status return info def remove_job(self, job): """ Remove a previously scheduled job. """ job_namespace = self.config.get('JOB_NAMESPACE') body = k_client.V1DeleteOptions(propagation_policy='Background') self.kube_v1_batch_client.delete_namespaced_job(job.metadata.name, body=body, namespace=job_namespace) def create_job(self, image, command, name, resources_dict, mountdir=None): """ Create and return a new job instance. """ number_of_workers = resources_dict.get('number_of_workers') cpu_limit = str(resources_dict.get('cpu_limit')) + 'm' memory_limit = str(resources_dict.get('memory_limit')) + 'Mi' gpu_limit = resources_dict.get('gpu_limit') # configure pod's containers requests = {'memory': '150Mi', 'cpu': '250m'} limits = {'memory': memory_limit, 'cpu': cpu_limit} env = [] if gpu_limit > 0: # ref: https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/ limits['nvidia.com/gpu'] = gpu_limit env = [k_client.V1EnvVar(name='NVIDIA_VISIBLE_DEVICES', value='all'), k_client.V1EnvVar(name='NVIDIA_DRIVER_CAPABILITIES', value='compute,utility'), k_client.V1EnvVar(name='NVIDIA_REQUIRE_CUDA', value='cuda>=9.0')], container = k_client.V1Container( name=name, image=image, env=env, command=shlex.split(command), security_context=k_client.V1SecurityContext( allow_privilege_escalation=False, capabilities=k_client.V1Capabilities(drop=['ALL']) ), resources=k_client.V1ResourceRequirements(limits=limits, requests=requests), volume_mounts=[k_client.V1VolumeMount(mount_path='/share', name='storebase')] ) # configure pod template's spec storage_type = self.config.get('STORAGE_TYPE') if storage_type == 'host': volume = k_client.V1Volume( name='storebase', host_path=k_client.V1HostPathVolumeSource(path=mountdir) ) else: volume = k_client.V1Volume( name='storebase', nfs=k_client.V1NFSVolumeSource(server=self.config.get('NFS_SERVER'), path=mountdir) ) template = k_client.V1PodTemplateSpec( spec=k_client.V1PodSpec(restart_policy='Never', containers=[container], volumes=[volume]) ) # configure job's spec spec = k_client.V1JobSpec( parallelism=number_of_workers, completions=number_of_workers, backoff_limit=1, ttl_seconds_after_finished=86400, # 24h active_deadline_seconds=43200, # 12h template=template ) # instantiate the job object job = k_client.V1Job( api_version='batch/v1', kind='Job', metadata=k_client.V1ObjectMeta(name=name), spec=spec) return job def submit_job(self, job): """ Submit a new job and return the job object. """ job_namespace = self.config.get('JOB_NAMESPACE') try: job = self.kube_v1_batch_client.create_namespaced_job(body=job, namespace=job_namespace) except ApiException as e: status_code = 503 if e.status == 500 else e.status raise ManagerException(str(e), status_code=status_code) return job def get_job_pods(self, name): """ Returns all the pods created as part of job. """ job_namespace = self.config.get('JOB_NAMESPACE') return self.kube_client.list_namespaced_pod(job_namespace, label_selector='job-name='+name) def get_pod_log(self, name, container_name=None): """ Get a pod log """ job_namespace = self.config.get('JOB_NAMESPACE') try: if container_name: log = self.kube_client.read_namespaced_pod_log(name=name, namespace=job_namespace, container=container_name) else: log = self.kube_client.read_namespaced_pod_log(name=name, namespace=job_namespace) except ApiException: log = '' return log def get_pod_status(self, name): """ Get a pod's status """ job_namespace = self.config.get('JOB_NAMESPACE') status = self.kube_client.read_namespaced_pod_status(name=name, namespace=job_namespace) return status
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'justify', 'ru', { block: 'По ширине', center: 'По центру', left: 'По левому краю', right: 'По правому краю' });
import React, {Component} from 'react' import {connect} from 'react-redux' import {withRouter, Route, Switch} from 'react-router-dom' import PropTypes from 'prop-types' import {Login, Signup, UserHome} from './components' import {me} from './store' import Meals from './components/Menu' import SingleMeal from './components/SingleMeal' import Cart from './components/Cart' import AdminAccount from './components/AdminAccount' import AccountDetails from './components/AccountDetails' import OrderSubmitted from './components/OrderSubmitted' import AddedToCart from './components/AddedToCart' /** * COMPONENT */ class Routes extends Component { componentDidMount() { this.props.loadInitialData() } render() { const {isLoggedIn} = this.props return ( <Switch> {/* Routes placed here are available to all visitors */} <Route path="/singlemenu/:query" component={SingleMeal} /> <Route path="/menu/:query" component={Meals} /> <Route path="/login" component={Login} /> <Route path="/signup" component={Signup} /> {isLoggedIn && ( <Switch> {/* Routes placed here are only available after logging in */} <Route path="/adminAccount" component={AdminAccount} /> <Route path="/home" component={UserHome} /> <Route path="/cart" component={Cart} /> <Route path="/orderSubmitted" component={OrderSubmitted} /> <Route path="/addedToCart" component={AddedToCart} /> <Route path="/accountDetails" component={AccountDetails} /> </Switch> )} {/* Displays our Login component as a fallback */} <Route component={Login} /> </Switch> ) } } /** * CONTAINER */ const mapState = state => { return { // Being 'logged in' for our purposes will be defined has having a state.user that has a truthy id. // Otherwise, state.user will be an empty object, and state.user.id will be falsey isLoggedIn: !!state.userAuth.id } } const mapDispatch = dispatch => { return { loadInitialData() { dispatch(me()) } } } // The `withRouter` wrapper makes sure that updates are not blocked // when the url changes export default withRouter(connect(mapState, mapDispatch)(Routes)) /** * PROP TYPES */ Routes.propTypes = { loadInitialData: PropTypes.func.isRequired, isLoggedIn: PropTypes.bool.isRequired }
'use strict' /** @type {import('@adonisjs/lucid/src/Schema')} */ const Schema = use('Schema') class OrderStatusSchema extends Schema { up () { this.create('order_statuses', (table) => { table.increments() table.integer('status_id') table.string('name') table.timestamps() }) } down () { this.drop('order_statuses') } } module.exports = OrderStatusSchema
const express = require('express'); const router = require('express').Router(); const app = express(); const cors = require("cors"); const PORT = process.env.PORT || 5000; const connectDB = require('./config/db'); app.use( cors({ origin: "http://localhost:3000", // <-- location of the react app were connecting to credentials: true, }) ); //connect to database connectDB(); app.use(express.urlencoded({extended:true})); app.use(express.json()) app.use('/users', require('./routes/users')); app.use('/movies', require('./routes/movies')); if (process.env.NODE_ENV === "production") { app.use(express.static("client/build")) } app.listen(PORT, ()=>{ console.log(`Server started at port ${PORT}`); })
import MultiHistory from './stats/MultiHistory'; import { lerp } from './math'; export default class QueueSimulator { constructor(now, modelFactory, solverFactory, visFactories) { this.now = () => now() * 0.001; this.modelFactory = modelFactory; this.solverFactory = solverFactory; this.visFactories = visFactories; this.frameRate = 30; this.tickRate = 60; this.tickOverload = 20; this.timer = null; this.reset(); } reset() { this.model = this.modelFactory(); this.solver = this.solverFactory(); if (this.visFactories) this.renderers = this.visFactories(); else this.renderers = []; this.tick = 0; this.startTime = null; this.pauseTime = null; this.lastTickTime = null; this.lastFrameTime = null; this.lastRenderedTick = 0; this.currentTickRate = 0.0; this.currentFrameRate = 0.0; this.histories = new MultiHistory(300); this.solver.initialize(this.model, this.histories); } setFrameRate(frameRate) { this.frameRate = frameRate; if (this.timer) { this.setInterval(); } } setTickRate(tickRate) { this.tickRate = tickRate; if (this.timer) { this.setInterval(); } } step() { if (this.pauseTime) return; const elapsedRealTime = this.now() - this.startTime; this.stepSim(elapsedRealTime); if (this.model.time < this.model.endTime) { this.stepVis(elapsedRealTime); } else { this.calcFrameRate(elapsedRealTime); this.pause(); this.render(); } } stepSim(elapsedRealTime) { let nTicksDue; if (this.lastTickTime !== null) nTicksDue = (elapsedRealTime - this.lastTickTime) * this.tickRate; else nTicksDue = 1.0; nTicksDue += 0.05; // Force slow-running simulation to draw occasionally. const maxTicksPerFrame = (this.tickRate / this.frameRate) * this.tickOverload; if (maxTicksPerFrame >= 1 && nTicksDue > maxTicksPerFrame) nTicksDue = maxTicksPerFrame; if (nTicksDue < 1.0) return; for (let i = 0; i < nTicksDue; i++) { this.stepSimSingle(); if (this.model.time >= this.model.endTime) { break; } } this.lastTickTime = elapsedRealTime; } stepSimSingle() { this.tick += 1; this.model = this.solver.step(this.model, this.histories, this.tick); } stepVis(elapsedRealTime) { let nFramesDue; if (this.lastFrameTime !== null) nFramesDue = (elapsedRealTime - this.lastFrameTime) * this.frameRate; else nFramesDue = 1.0; nFramesDue += 0.05; if (nFramesDue < 1.0) return; this.calcFrameRate(elapsedRealTime); this.render(); } calcFrameRate(elapsedRealTime) { let timeSinceLastFrame = elapsedRealTime; if (this.lastFrameTime) timeSinceLastFrame -= this.lastFrameTime; const currentFrameRate = 1.0 / timeSinceLastFrame; this.currentFrameRate = lerp(this.currentFrameRate, currentFrameRate, 1 / currentFrameRate); this.lastFrameTime = elapsedRealTime; const elapsedTicks = this.tick - this.lastRenderedTick; this.currentTickRate = elapsedTicks / timeSinceLastFrame; this.lastRenderedTick = this.tick; } render() { this.renderers.forEach(function(renderer) { renderer.draw( this.model, this.histories, this.currentFrameRate, this.currentTickRate); }, this); } start() { if (this.pauseTime) { this.startTime = this.now() - (this.pauseTime - this.startTime); this.pauseTime = null; } else { this.startTime = this.now(); } this.setInterval(); } setInterval() { if (this.timer) { window.clearInterval(this.timer); this.timer = null; } const rate = this.frameRate; this.timer = window.setInterval(this.step.bind(this), 1000 / rate); } pause() { this.pauseTime = this.now(); } togglePause() { if (this.pauseTime || !this.startTime) this.start(); else this.pause(); } stop() { if (this.timer) window.clearInterval(this.timer); this.timer = null; this.startTime = null; this.pauseTime = null; } }
import { login, logout, getInfo } from '@/api/user' import { getToken, setToken, removeToken } from '@/utils/auth' import { resetRouter } from '@/router' const getDefaultState = () => { return { token: getToken(), name: '', avatar: '' } } const state = getDefaultState() const mutations = { RESET_STATE: (state) => { Object.assign(state, getDefaultState()) }, SET_TOKEN: (state, token) => { state.token = token }, SET_NAME: (state, name) => { state.name = name }, SET_AVATAR: (state, avatar) => { state.avatar = avatar } } const actions = { // user login login ({ commit }, userInfo) { const { username, password } = userInfo return new Promise((resolve, reject) => { login({ username: username.trim(), password: password }).then(response => { const { data } = response commit('SET_TOKEN', data.token) setToken(data.token) resolve() }).catch(error => { reject(error) }) }) }, // get user info getInfo ({ commit, state }) { return new Promise((resolve, reject) => { getInfo(state.token).then(response => { const { data } = response if (!data) { reject('Verification failed, please Login again.') } const { name, avatar } = data commit('SET_NAME', name) commit('SET_AVATAR', avatar) resolve(data) }).catch(error => { reject(error) }) }) }, // user logout logout ({ commit, state }) { return new Promise((resolve, reject) => { logout(state.token).then(() => { removeToken() // must remove token first resetRouter() commit('RESET_STATE') resolve() }).catch(error => { reject(error) }) }) }, // remove token resetToken ({ commit }) { return new Promise(resolve => { removeToken() // must remove token first commit('RESET_STATE') resolve() }) } } export default { namespaced: true, state, mutations, actions }
import React from 'react'; import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware } from 'redux'; import { BrowserRouter, Route } from 'react-router-dom'; import App from './components/app'; import reducers from './reducers'; const createStoreWithMiddleware = applyMiddleware()(createStore); class Hello extends React.Component { render() { return <div>Hello!</div> } } class Goodbye extends React.Component { render() { return <div>Goodbye!</div> } } ReactDOM.render( <Provider store={createStoreWithMiddleware(reducers)}> <BrowserRouter> <div> <Route path="/hello" component={Hello} /> <Route path="/goodbye" component={Goodbye} /> </div> </BrowserRouter> </Provider> , document.querySelector('.container'));
import { createAction } from "redux-actions"; export const fetchFilmsInitialRequested = createAction("@FILMS/FETCH_FILMS_INITIAL_REQUESTED"); export const fetchFilmsInitialSucceed = createAction( "@FILMS/FETCH_FILMS_INITIAL_SUCCEED", payload => payload ); export const fetchFilmsInitialFailed = createAction( "@FILMS/FETCH_FILMS_INITIAL_FAILED", payload => payload ); export const fetchFilmsNextRequested = createAction("@FILMS/FETCH_FILMS_NEXT_REQUESTED"); export const fetchFilmsNextSucceed = createAction( "@FILMS/FETCH_FILMS_NEXT_SUCCEED", payload => payload ); export const fetchFilmsNextFailed = createAction( "@FILMS/FETCH_FILMS_NEXT_FAILED", payload => payload ); export const fetchFilmByIdRequested = createAction( "@FILMS/FETCH_FILM_BY_ID_REQUESTED", payload => payload ); export const fetchFilmByIdSucceed = createAction( "@FILMS/FETCH_FILM_BY_ID_SUCCEED", payload => payload ); export const fetchFilmByIdFailed = createAction( "@FILMS/FETCH_FILM_BY_ID_FAILED", payload => payload ); export const updateFilmRatingRequested = createAction( "@FILMS/UPDATES_FILM_RATING_REQUESTED", payload => payload ); export const updateFilmRatingSucceed = createAction("@FILMS/UPDATES_FILM_RATING_SUCCEED"); export const updateFilmRatingFailed = createAction( "@FILMS/UPDATES_FILM_RATING_FAILED", payload => payload ); export const setFilmsSearchQuery = createAction( "@FILMS/SET_FILMS_SEARCH_QUERY", payload => payload );
from keras.engine.topology import Layer import keras.backend as K if K.backend() == 'tensorflow': import tensorflow as tf class RoiPoolingConv(Layer): ''' ROI pooling layer for 2D inputs. See Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition, K. He, X. Zhang, S. Ren, J. Sun # Arguments pool_size: int Size of pooling region to use. pool_size = 7 will result in a 7x7 region. num_rois: number of regions of interest to be used # Input shape list of two 4D tensors [X_img,X_roi] with shape: X_img: `(1, channels, rows, cols)` if dim_ordering='th' or 4D tensor with shape: `(1, rows, cols, channels)` if dim_ordering='tf'. X_roi: `(1,num_rois,4)` list of rois, with ordering (x,y,w,h) # Output shape 3D tensor with shape: `(1, num_rois, channels, pool_size, pool_size)` ''' def __init__(self, pool_size, num_rois, **kwargs): self.pool_size = pool_size self.num_rois = num_rois super(RoiPoolingConv, self).__init__(**kwargs) def build(self, input_shape): self.nb_channels = input_shape[0][3] def compute_output_shape(self, input_shape): return None, self.num_rois, self.pool_size, self.pool_size, self.nb_channels def call(self, x, mask=None): assert(len(x) == 2) img = x[0] rois = x[1] input_shape = K.shape(img) outputs = [] for roi_idx in range(self.num_rois): x = rois[0, roi_idx, 0] y = rois[0, roi_idx, 1] w = rois[0, roi_idx, 2] h = rois[0, roi_idx, 3] row_length = w / float(self.pool_size) col_length = h / float(self.pool_size) num_pool_regions = self.pool_size #NOTE: the RoiPooling implementation differs between theano and tensorflow due to the lack of a resize op # in theano. The theano implementation is much less efficient and leads to long compile times x = K.cast(x, 'int32') y = K.cast(y, 'int32') w = K.cast(w, 'int32') h = K.cast(h, 'int32') rs = tf.image.resize(img[:, y:y+h, x:x+w, :], (self.pool_size, self.pool_size)) outputs.append(rs) final_output = K.concatenate(outputs, axis=0) final_output = K.reshape(final_output, (1, self.num_rois, self.pool_size, self.pool_size, self.nb_channels)) final_output = K.permute_dimensions(final_output, (0, 1, 2, 3, 4)) return final_output
module.exports = { presets: ['@babel/env', '@babel/typescript'], plugins: [ '@babel/plugin-proposal-numeric-separator', '@babel/proposal-class-properties', '@babel/proposal-object-rest-spread', ], };
/*! * Lansare * * Eric Mann <[email protected]> * * MIT License. */ 'use strict'; var Dispatcher = function() { /** * Stub out the notify interface. * * @param {Object} config */ this.notify = function( config ) { config = config.config; throw 'Subclasses must implement the notify() method.'; }; }; // Export the module module.exports = Dispatcher;
module.exports = { "testnet": { "NetworkName": "Ethereum", "ChainId": 5, "RPC": "https://goerli.infura.io/v3/70645f042c3a409599c60f96f6dd9fbc", "Explorer": "https://goerli.etherscan.io", "Contracts": { "BytesLib": "0xde5807d201788dB32C38a6CE0F11d31b1aeB822a", "Common": "0x84Dc17F28658Bc74125C7E82299992429ED34c12", "ECVerify": "0xccd1d8d16F462f9d281024CBD3eF52BADB10131C", "Merkle": "0xCD87Be2Df3de01EA23666c97104613ec252300E8", "MerklePatriciaProof": "0x3a0Db8fa2805DEcd49cCAa839DaC15455498EDE2", "PriorityQueue": "0xD26361204b8e4a4bb16668bfE7A1b9106AD17140", "RLPEncode": "0xDE0D18799a20f29d9618f8DDbf4c2b029FAdc491", "RLPReader": "0xA5e463c187E53da5b193E2beBca702e9fEeA3738", "SafeMath": "0x1bEb355BE0577E61870C4c57DAaa6e2129dd0604", "Governance": "0x03Ac67D03A06571A059F20425FFD1BEa300d98C2", "GovernanceProxy": "0xAcdEADEE4c054A86F5b1e8705126b30Ec999899B", "Registry": "0xeE11713Fe713b2BfF2942452517483654078154D", "RootChain": "0xCe29AEdCdBeef0b05066316013253beACa7A6268", "RootChainProxy": "0x2890bA17EfE978480615e330ecB65333b880928e", "ValidatorShareFactory": "0xCf7725ACCE2B0a61CD8F908B96E6e853d9E56cBE", "StakingInfo": "0x318EeD65F064904Bc6E0e3842940c5972BC8E38f", "StakingNFT": "0x940690A7a2F5e09250a806589C1C874707cf0895", "StakeManager": "0xbc4E8bb919b1Faed1E4519EcfA71b3c98740d89B", "StakeManagerProxy": "0x4864d89DCE4e24b2eDF64735E014a7E4154bfA7A", "SlashingManager": "0x93D8f8A1A88498b258ceb69dD82311962374269C", "ValidatorShare": "0xcF6e5b6D5cF2eFB4EddC13D956b531dDEDc96123", "StateSender": "0xEAa852323826C71cd7920C3b4c007184234c3945", "DepositManager": "0x20339c5Ea91D680E681B9374Fc0a558D5b96a026", "DepositManagerProxy": "0x7850ec290A2e2F40B82Ed962eaf30591bb5f5C96", "WithdrawManager": "0x82A0Aafac8D34645f2c681a88b2874aeC8ac5d61", "ExitNFT": "0xE2Ab047326B38e4DDb6791551e8d593D30E02724", "WithdrawManagerProxy": "0x2923C8dD6Cdf6b2507ef91de74F1d5E0F11Eac53", "ERC20Predicate": "0x033a0A06dc6e78a518003C81B64f9CA80A55cb06", "ERC721Predicate": "0xDbBffd69Ef9F34bA8Fb8722157A51a4733992B35", "Tokens": { "MaticToken": "0x499d11E0b6eAC7c0593d8Fb292DCBbF815Fb29Ae", "TestToken": "0x3f152B63Ec5CA5831061B2DccFb29a874C317502", "RootERC721": "0xfA08B72137eF907dEB3F202a60EfBc610D2f224b", "MaticWeth": "0x60D4dB9b534EF9260a88b0BED6c486fe13E604Fc" } } }, "mainnet": { "NetworkName": "Ethereum", "ChainId": 1, "DaggerEndpoint": "wss://mainnet.dagger.matic.network", "WatcherAPI": "https://staking.api.matic.network/api/v1", "StakingAPI": "https://staking.api.matic.network/api/v1", "Explorer": "https://etherscan.io", "Contracts": { "BytesLib": "0x1d21fACFC8CaD068eF0cbc87FdaCdFb20D7e2417", "Common": "0x31851aAf1FA4cC6632f45570c2086aDcF8B7BD75", "ECVerify": "0x71d91a8988D81617be53427126ee62471321b7DF", "Merkle": "0x8b90C7633F1f751E19E76433990B1663c625B258", "MerklePatriciaProof": "0x8E51a119E892D3fb324C0410F11f39F61dec9DC8", "PriorityQueue": "0x61AdDcD534Bdc1721c91740Cf711dBEcE936053e", "RLPEncode": "0x021c2Bf4d2941cE3D593e07317EC355937bae495", "RLPReader": "0xD75f1d6A8A7Dc558A65c2f30eBF876DdbeE035a2", "SafeMath": "0x96D358795782a73d90F2ed2d505aB235D197ca05", "Governance": "0x98165b71cdDea047C0A49413350C40571195fd07", "GovernanceProxy": "0x6e7a5820baD6cebA8Ef5ea69c0C92EbbDAc9CE48", "Registry": "0x33a02E6cC863D393d6Bf231B697b82F6e499cA71", "RootChain": "0x5A09cD4601b66bc107D377AB81E0dbb5dFABaA84", "RootChainProxy": "0x86E4Dc95c7FBdBf52e33D563BbDB00823894C287", "ValidatorShareFactory": "0xc4FA447A0e77Eff9717b09C057B40570813bb642", "StakingInfo": "0xa59C847Bd5aC0172Ff4FE912C5d29E5A71A7512B", "StakingNFT": "0x47Cbe25BbDB40a774cC37E1dA92d10C2C7Ec897F", "StakeManager": "0xf66F01Bc2d3e83312e26244550537Fe2d2995FeE", "StakeManagerProxy": "0x5e3Ef299fDDf15eAa0432E6e66473ace8c13D908", "SlashingManager": "0x01F645DcD6C796F6BC6C982159B32fAaaebdC96A", "ValidatorShare": "0x2dCaD61350EC531910Da683d396d92e3aE5E5C8d", "StateSender": "0x28e4F3a7f651294B9564800b2D01f35189A5bFbE", "DepositManager": "0xd505C3822C787D51d5C2B1ae9aDB943B2304eB23", "DepositManagerProxy": "0x401F6c983eA34274ec46f84D70b31C151321188b", "WithdrawManager": "0xa0CAaefd809b946De6de929545Ea55f0267aF84b", "ExitNFT": "0xDF74156420Bd57ab387B195ed81EcA36F9fABAca", "WithdrawManagerProxy": "0x2A88696e0fFA76bAA1338F2C74497cC013495922", "ERC20Predicate": "0x886e02327cAd4E1E29688C7Db0c9d28879ac44Da", "ERC721Predicate": "0xe4924d8708D6646C0A6B2985DCFe2855211f4ddD", "Tokens": { "MaticToken": "0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0", "TestToken": "0x3db715989dA05C1D17441683B5b41d4510512722", "RootERC721": "0x96CDDF45C0Cd9a59876A2a29029d7c54f6e54AD3", "MaticWeth": "0xa45b966996374E9e65ab991C6FE4Bfce3a56DDe8" } } } };
import test from 'tape'; test('A sample test', assert => { const actual = true; const expected = true; const msg = `This is a sample test for about, will always pass!`; assert.equal(actual, expected, msg); assert.end(); });
from __future__ import annotations import os from typing import TYPE_CHECKING, Optional from ..components import InputText as InputTextComponent from ..enums import ComponentType, InputTextStyle from ..utils import MISSING __all__ = ("InputText",) if TYPE_CHECKING: from ..types.components import InputText as InputTextComponentPayload class InputText: """Represents a UI text input field. Parameters ---------- style: :class:`discord.InputTextStyle` The style of the input text field. custom_id: Optional[:class:`str`] The ID of the input text field that gets received during an interaction. label: Optional[:class:`str`] The label for the input text field, if any. placeholder: Optional[:class:`str`] The placeholder text that is shown if nothing is selected, if any. min_length: Optional[:class:`int`] The minimum number of characters that must be entered. Defaults to 0. max_length: Optional[:class:`int`] The maximum number of characters that can be entered. required: Optional[:class:`bool`] Whether the input text field is required or not. Defaults to `True`. value: Optional[:class:`str`] Pre-fills the input text field with this value. row: Optional[:class:`int`] The relative row this button belongs to. A Discord component can only have 5 rows. By default, items are arranged automatically into those 5 rows. If you'd like to control the relative positioning of the row then passing an index is advised. For example, row=1 will show up before row=2. Defaults to ``None``, which is automatic ordering. The row number must be between 0 and 4 (i.e. zero indexed). """ def __init__( self, *, style: InputTextStyle = InputTextStyle.short, custom_id: str = MISSING, label: Optional[str] = None, placeholder: Optional[str] = None, min_length: Optional[int] = None, max_length: Optional[int] = None, required: Optional[bool] = True, value: Optional[str] = None, row: Optional[int] = None, ): super().__init__() custom_id = os.urandom(16).hex() if custom_id is MISSING else custom_id self._underlying = InputTextComponent._raw_construct( type=ComponentType.input_text, style=style, custom_id=custom_id, label=label, placeholder=placeholder, min_length=min_length, max_length=max_length, required=required, value=value, ) self._input_value = None self.row = row self._rendered_row: Optional[int] = None @property def type(self) -> ComponentType: return self._underlying.type @property def style(self) -> InputTextStyle: """:class:`discord.InputTextStyle`: The style of the input text field.""" return self._underlying.style @style.setter def style(self, value: InputTextStyle): if not isinstance(value, InputTextStyle): raise TypeError( f"style must be of type InputTextStyle not {value.__class__}" ) self._underlying.style = value @property def custom_id(self) -> str: """:class:`str`: The ID of the input text field that gets received during an interaction.""" return self._underlying.custom_id @custom_id.setter def custom_id(self, value: str): if not isinstance(value, str): raise TypeError(f"custom_id must be None or str not {value.__class__}") self._underlying.custom_id = value @property def label(self) -> str: """:class:`str`: The label of the input text field.""" return self._underlying.label @label.setter def label(self, value: str): if not isinstance(value, str): raise TypeError(f"label should be None or str not {value.__class__}") self._underlying.label = value @property def placeholder(self) -> Optional[str]: """Optional[:class:`str`]: The placeholder text that is shown before anything is entered, if any.""" return self._underlying.placeholder @placeholder.setter def placeholder(self, value: Optional[str]): if value and not isinstance(value, str): raise TypeError(f"placeholder must be None or str not {value.__class__}") # type: ignore self._underlying.placeholder = value @property def min_length(self) -> Optional[int]: """Optional[:class:`int`]: The minimum number of characters that must be entered. Defaults to `0`.""" return self._underlying.min_length @min_length.setter def min_length(self, value: Optional[int]): if value and not isinstance(value, int): raise TypeError(f"min_length must be None or int not {value.__class__}") # type: ignore self._underlying.min_length = value @property def max_length(self) -> Optional[int]: """Optional[:class:`int`]: The maximum number of characters that can be entered.""" return self._underlying.max_length @max_length.setter def max_length(self, value: Optional[int]): if value and not isinstance(value, int): raise TypeError(f"min_length must be None or int not {value.__class__}") # type: ignore self._underlying.max_length = value @property def required(self) -> Optional[bool]: """Optional[:class:`bool`]: Whether the input text field is required or not. Defaults to `True`.""" return self._underlying.required @required.setter def required(self, value: Optional[bool]): if not isinstance(value, bool): raise TypeError(f"required must be bool not {value.__class__}") # type: ignore self._underlying.required = bool(value) @property def value(self) -> Optional[str]: """Optional[:class:`str`]: The value entered in the text field.""" return self._input_value or self._underlying.value @value.setter def value(self, value: Optional[str]): if value and not isinstance(value, str): raise TypeError(f"value must be None or str not {value.__class__}") # type: ignore self._underlying.value = value @property def width(self) -> int: return 5 def to_component_dict(self) -> InputTextComponentPayload: return self._underlying.to_dict() def refresh_state(self, data) -> None: self._input_value = data["value"]
from unittest import TestCase from cStringIO import StringIO import json class TestDump(TestCase): def test_dump(self): sio = StringIO() json.dump({}, sio) self.assertEquals(sio.getvalue(), '{}') def test_dumps(self): self.assertEquals(json.dumps({}), '{}')
/*jshint node:true */ 'use strict'; module.exports = function (grunt) { //Load all .js tasks definitions at tasks folder grunt.loadTasks('./tasks'); require('load-grunt-tasks')(grunt); require('time-grunt')(grunt); grunt.loadNpmTasks('grunt-browser-sync'); grunt.loadNpmTasks('grunt-contrib-copy'); var options = { appName: require('./package.json').name, // Project settings paths: { // Configurable paths app: 'app', dist: '../node-server/dist', server: 'server', doc: 'doc' }, ports: { app: '9000', dist: '9100', doc: '9200', test: '9300' }, scripts: [ 'app.js', 'states/*.js', 'components/**/*-module.js', 'components/**/*.js', '!components/**/*.spec.js' ], css: [ 'styles/**/*.css' ], copy: { dev: { files: [{ cwd: 'app/components', src: '**/*.js', dest: '../node-server/dist/components/', expand: true, filter: 'isFile', }] } } }; // Load grunt configurations automatically at config folder var configs = require('load-grunt-configs')(grunt, options); // Define the configuration for all the tasks grunt.initConfig(configs); grunt.registerTask('default', [ 'server' ]); };
(function () { 'use strict'; angular .module('thinkster.routes') .config(config); config.$inject = ['$routeProvider']; /** * @name config * @desc Define valid application routes */ function config($routeProvider) { $routeProvider.when('/login', { controller: 'LoginController', controllerAs: 'vm', templateUrl: '/static/templates/authentication/login.html' }); } })();
class Stone{ constructor(x, y, w, h){ let options = { restitution: 0.8 }; this.body = Bodies.rectangle(x, y, w, h, options); this.w = w; this.h = h; World.add(world, this.body); } show(){ var pos = this.body.position; var angle = this.body.angle; push(); translate(pos.x, pos.y); pop(); } }
import stylesDictionary from "../dictionaries/styles"; import aliasesDictionary from "../dictionaries/aliases"; import { hasConstant } from "../utils"; import { DEFAULT_SEPARATOR } from "../constants"; export let separator = DEFAULT_SEPARATOR; export const hasPath = style => style.indexOf(separator) !== -1; const getValueFromParts = (parts, getConstant) => { // value is always located in the last part let value = parts[parts.length - 1]; if (hasConstant(value)) { value = getConstant(value); } else { value = aliasesDictionary[value] || value; } return parseFloat(value) || value; }; const getKeyFromParts = parts => { let current = stylesDictionary; for (let x = 0; x < parts.length - 1; x += 1) { let part = parts[x]; part = aliasesDictionary[part] || part; current = current[part]; if (current === undefined) { if (process.env.NODE_ENV !== "production") { console.warn( `useStyles Invalid-Style-Key: "${part}" is not a valid key for styles. You are seeing this warning because you are in development mode. In a production build there will be no warning.` ); } return; } } return current.__propName; }; // PRECONDITION: at least one key-value pair exists in the path export default (path, getConstant) => { const parts = path.split(separator); const key = getKeyFromParts(parts); const value = getValueFromParts(parts, getConstant); return Object.assign(Object.create(null), { [key]: value }); }; export const setSeparator = newSeparator => { separator = newSeparator; };
if (true) console.log('vai ser executado'); if (false) console.log('não vai ser executado'); console.log('Fim');
import React from "react"; const config = { ROMS: { owlia: { name: "The Legends of Owlia", url: "https://cdn.jsdelivr.net/gh/bfirsh/jsnes-roms@master/owlia.nes" }, nomolos: { name: "Nomolos: Storming the Catsle", url: "https://cdn.jsdelivr.net/gh/bfirsh/jsnes-roms@master/nomolos.nes" }, croom: { name: "Concentration Room", url: "https://cdn.jsdelivr.net/gh/bfirsh/jsnes-roms@master/croom/croom.nes" }, lj65: { name: "LJ65", url: "https://cdn.jsdelivr.net/gh/bfirsh/jsnes-roms@master/lj65/lj65.nes" }, mario: { name: "Mario", url: "https://raw.githubusercontent.com/thanhtung249/demo/master/Super%20Mario%20Bros.%20(World).nes" }, TenYardFight: { name: "10-Yard Fight", url: "https://github.com/dientu4nut/NES/blob/master/10-Yard%20Fight%20(U)%20.nes" }, 1942: { name: "1942", url: "https://github.com/dientu4nut/NES/blob/master/1942%20(JU).nes" }, TheBattleofMidway: { name: "1943 - The Battle of Midway", url: "https://github.com/dientu4nut/NES/blob/master/1943%20-%20The%20Battle%20of%20Midway%20(U)%20.nes" }, BattlesofWorldRunnerThe: { name: "3-D Battles of World Runner The", url: "https://github.com/dientu4nut/NES/blob/master/3-D%20Battles%20of%20World%20Runner%20The%20(U)%20.nes" }, 720: { name: "720", url: "https://github.com/dientu4nut/NES/blob/master/720%20(U)%20.nes" }, EightEyes: { name: "8 Eyes", url: "https://github.com/dientu4nut/NES/blob/master/8%20Eyes%20(U)%20.nes" }, AbadoxTheDeadlyInnerWar: { name: "Abadox - The Deadly Inner War", url: "https://github.com/dientu4nut/NES/blob/master/Abadox%20-%20The%20Deadly%20Inner%20War%20(U)%20.nes" }, Action52ActiveEnterprises: { name: "Action 52 (Active Enterprises)", url: "https://github.com/dientu4nut/NES/blob/master/Action%2052%20(Active%20Enterprises).nes" }, AddamsFamilyThe: { name: "Addams Family The", url: "https://github.com/dientu4nut/NES/blob/master/Addams%20Family%20The%20(U)%20.nes" }, AddamsFamilyThePugsleysScavengerHunt: { name: "Addams Family The - Pugsley s Scavenger Hunt", url: "https://github.com/dientu4nut/NES/blob/master/Addams%20Family%20The%20-%20Pugsley%20s%20Scavenger%20Hunt%20(U)%20.nes" }, AdvancedDungeonsDragonsDragonStrike: { name: "Advanced Dungeons & Dragons - Dragon Strike", url: "https://github.com/dientu4nut/NES/blob/master/Advanced%20Dungeons%20%26%20Dragons%20-%20Dragon%20Strike%20(U)%20.nes" }, AdvancedDungeonsDragonsHeroesoftheLance: { name: "Advanced Dungeons & Dragons - Heroes of the Lance", url: "https://github.com/dientu4nut/NES/blob/master/Advanced%20Dungeons%20%26%20Dragons%20-%20Heroes%20of%20the%20Lance%20(U)%20.nes" }, AdvancedDungeonsDragonsHillsfar: { name: "Advanced Dungeons & Dragons - Hillsfar", url: "https://github.com/dientu4nut/NES/blob/master/Advanced%20Dungeons%20%26%20Dragons%20-%20Hillsfar%20(U)%20.nes" }, AdvancedDungeonsDragonsPoolofRadiance: { name: "Advanced Dungeons & Dragons - Pool of Radiance", url: "https://github.com/dientu4nut/NES/blob/master/Advanced%20Dungeons%20%26%20Dragons%20-%20Pool%20of%20Radiance%20(U)%20.nes" }, AdventuresintheMagicKingdom: { name: "Adventures in the Magic Kingdom", url: "https://github.com/dientu4nut/NES/blob/master/Adventures%20in%20the%20Magic%20Kingdom%20(U)%20.nes" }, AdventuresofBayouBillyThe: { name: "Adventures of Bayou Billy The", url: "https://github.com/dientu4nut/NES/blob/master/Adventures%20of%20Bayou%20Billy%20The%20(U)%20.nes" }, AdventuresofDinoRikiThe: { name: "Adventures of Dino Riki The", url: "https://github.com/dientu4nut/NES/blob/master/Adventures%20of%20Dino%20Riki%20The%20(U)%20.nes" }, AdventuresofGilligansIslandThe: { name: "Adventures of Gilligan s Island The", url: "https://github.com/dientu4nut/NES/blob/master/Adventures%20of%20Gilligan%20s%20Island%20The%20(U)%20.nes" }, AdventuresofLolo: { name: "Adventures of Lolo", url: "https://github.com/dientu4nut/NES/blob/master/Adventures%20of%20Lolo%20(U)%20.nes" }, AdventuresofLolo2: { name: "Adventures of Lolo 2", url: "https://github.com/dientu4nut/NES/blob/master/Adventures%20of%20Lolo%202%20(U)%20.nes" }, AdventuresofLolo3: { name: "Adventures of Lolo 3", url: "https://github.com/dientu4nut/NES/blob/master/Adventures%20of%20Lolo%203%20(U)%20.nes" }, AdventuresofRadGravityThe: { name: "Adventures of Rad Gravity The", url: "https://github.com/dientu4nut/NES/blob/master/Adventures%20of%20Rad%20Gravity%20The%20(U)%20.nes" }, AdventuresofRockyandBullwinkleandFriendsThe: { name: "Adventures of Rocky and Bullwinkle and Friends The", url: "https://github.com/dientu4nut/NES/blob/master/Adventures%20of%20Rocky%20and%20Bullwinkle%20and%20Friends%20The%20(U)%20.nes" }, AdventuresofTomSawyer: { name: "Adventures of Tom Sawyer", url: "https://github.com/dientu4nut/NES/blob/master/Adventures%20of%20Tom%20Sawyer%20(U)%20.nes" }, AirFortress: { name: "Air Fortress", url: "https://github.com/dientu4nut/NES/blob/master/Air%20Fortress%20(U)%20.nes" }, Airwolf: { name: "Airwolf", url: "https://github.com/dientu4nut/NES/blob/master/Airwolf%20(U)%20.nes" }, AlUnserJrTurboRacing: { name: "Al Unser Jr. Turbo Racing", url: "https://github.com/dientu4nut/NES/blob/master/Al%20Unser%20Jr.%20Turbo%20Racing%20(U)%20.nes" }, Aladdin: { name: "Aladdin ", url: "https://github.com/dientu4nut/NES/blob/master/Aladdin%20(E)%20.nes" }, AlfredChicken: { name: "Alfred Chicken", url: "https://github.com/dientu4nut/NES/blob/master/Alfred%20Chicken%20(U)%20.nes" }, Alien3: { name: "Alien 3", url: "https://github.com/dientu4nut/NES/blob/master/Alien%203%20(U)%20.nes" }, AllProBasketball: { name: "All-Pro Basketball", url: "https://github.com/dientu4nut/NES/blob/master/All-Pro%20Basketball%20(U)%20.nes" }, AlphaMission: { name: "Alpha Mission", url: "https://github.com/dientu4nut/NES/blob/master/Alpha%20Mission%20(U)%20.nes" }, Amagon: { name: "Amagon", url: "https://github.com/dientu4nut/NES/blob/master/Amagon%20(U)%20.nes" }, AmericanGladiators: { name: "American Gladiators", url: "https://github.com/dientu4nut/NES/blob/master/American%20Gladiators%20(U)%20.nes" }, Anticipation: { name: "Anticipation", url: "https://github.com/dientu4nut/NES/blob/master/Anticipation%20(U)%20.nes" }, ArchRivalsABasketbrawl: { name: "Arch Rivals - A Basketbrawl ", url: "https://github.com/dientu4nut/NES/blob/master/Arch%20Rivals%20-%20A%20Basketbrawl%20%20(U)%20.nes" }, Archon: { name: "Archon", url: "https://github.com/dientu4nut/NES/blob/master/Archon%20(U)%20.nes" }, Arkanoid: { name: "Arkanoid", url: "https://github.com/dientu4nut/NES/blob/master/Arkanoid%20(U)%20.nes" }, ArkistasRing: { name: "Arkista s Ring", url: "https://github.com/dientu4nut/NES/blob/master/Arkista%20s%20Ring%20(U)%20.nes" }, Asterix: { name: "Asterix ", url: "https://github.com/dientu4nut/NES/blob/master/Asterix%20(E)%20.nes" }, Astyanax: { name: "Astyanax", url: "https://github.com/dientu4nut/NES/blob/master/Astyanax%20(U)%20.nes" }, Athena: { name: "Athena", url: "https://github.com/dientu4nut/NES/blob/master/Athena%20(U)%20.nes" }, AthleticWorld: { name: "Athletic World", url: "https://github.com/dientu4nut/NES/blob/master/Athletic%20World%20(U)%20.nes" }, AttackoftheKillerTomatoes: { name: "Attack of the Killer Tomatoes", url: "https://github.com/dientu4nut/NES/blob/master/Attack%20of%20the%20Killer%20Tomatoes%20(U)%20.nes" }, AussieRulesFootyA: { name: "Aussie Rules Footy (A) ", url: "https://github.com/dientu4nut/NES/blob/master/Aussie%20Rules%20Footy%20(A)%20.nes" }, BacktotheFuture: { name: "Back to the Future", url: "https://github.com/dientu4nut/NES/blob/master/Back%20to%20the%20Future%20(U)%20.nes" }, BacktotheFuturePartIIIII: { name: "Back to the Future Part II & III", url: "https://github.com/dientu4nut/NES/blob/master/Back%20to%20the%20Future%20Part%20II%20%26%20III%20(U)%20.nes" }, BadDudes: { name: "Bad Dudes", url: "https://github.com/dientu4nut/NES/blob/master/Bad%20Dudes%20(U)%20.nes" }, BadNewsBaseball: { name: "Bad News Baseball", url: "https://github.com/dientu4nut/NES/blob/master/Bad%20News%20Baseball%20(U)%20.nes" }, BadStreetBrawler: { name: "Bad Street Brawler", url: "https://github.com/dientu4nut/NES/blob/master/Bad%20Street%20Brawler%20(U)%20.nes" }, BalloonFight: { name: "Balloon Fight", url: "https://github.com/dientu4nut/NES/blob/master/Balloon%20Fight%20(U)%20.nes" }, BandaiGolfChallengePebbleBeach: { name: "Bandai Golf - Challenge Pebble Beach", url: "https://github.com/dientu4nut/NES/blob/master/Bandai%20Golf%20-%20Challenge%20Pebble%20Beach%20(U)%20.nes" }, BanditKingsofAncientChina: { name: "Bandit Kings of Ancient China", url: "https://github.com/dientu4nut/NES/blob/master/Bandit%20Kings%20of%20Ancient%20China%20(U)%20.nes" }, BardsTaleTheTalesoftheUnknown: { name: "Bard s Tale The - Tales of the Unknown", url: "https://github.com/dientu4nut/NES/blob/master/Bard%20s%20Tale%20The%20-%20Tales%20of%20the%20Unknown%20(U)%20.nes" }, BarkerBillsTrickShooting: { name: "Barker Bill s Trick Shooting", url: "https://github.com/dientu4nut/NES/blob/master/Barker%20Bill%20s%20Trick%20Shooting%20(U)%20.nes" }, BaseWars: { name: "Base Wars", url: "https://github.com/dientu4nut/NES/blob/master/Base%20Wars%20(U)%20.nes" }, Baseball: { name: "Baseball", url: "https://github.com/dientu4nut/NES/blob/master/Baseball%20(U)%20.nes" }, BaseballSimulator1000: { name: "Baseball Simulator 1.000", url: "https://github.com/dientu4nut/NES/blob/master/Baseball%20Simulator%201.000%20(U)%20.nes" }, BaseballStars: { name: "Baseball Stars", url: "https://github.com/dientu4nut/NES/blob/master/Baseball%20Stars%20(U)%20.nes" }, BaseballStarsII: { name: "Baseball Stars II", url: "https://github.com/dientu4nut/NES/blob/master/Baseball%20Stars%20II%20(U)%20.nes" }, BasesLoaded3: { name: "Bases Loaded 3", url: "https://github.com/dientu4nut/NES/blob/master/Bases%20Loaded%203%20(U)%20.nes" }, BasesLoaded4: { name: "Bases Loaded 4", url: "https://github.com/dientu4nut/NES/blob/master/Bases%20Loaded%204%20(U)%20.nes" }, BasesLoadedII: { name: "Bases Loaded II", url: "https://github.com/dientu4nut/NES/blob/master/Bases%20Loaded%20II%20(U)%20.nes" }, Batman: { name: "Batman", url: "https://github.com/dientu4nut/NES/blob/master/Batman%20(U)%20.nes" }, BatmanReturnoftheJoker: { name: "Batman - Return of the Joker", url: "https://github.com/dientu4nut/NES/blob/master/Batman%20-%20Return%20of%20the%20Joker%20(U)%20.nes" }, BatmanReturns: { name: "Batman Returns", url: "https://github.com/dientu4nut/NES/blob/master/Batman%20Returns%20(U)%20.nes" }, BattleChess: { name: "Battle Chess", url: "https://github.com/dientu4nut/NES/blob/master/Battle%20Chess%20(U)%20.nes" }, BattleTank: { name: "Battle Tank", url: "https://github.com/dientu4nut/NES/blob/master/Battle%20Tank%20(U)%20.nes" }, BattleofOlympusThe: { name: "Battle of Olympus The", url: "https://github.com/dientu4nut/NES/blob/master/Battle%20of%20Olympus%20The%20(U)%20.nes" }, Battleship: { name: "Battleship", url: "https://github.com/dientu4nut/NES/blob/master/Battleship%20(U)%20.nes" }, BattletoadsDoubleDragonTheUltimateTeam: { name: "Battletoads & Double Dragon - The Ultimate Team", url: "https://github.com/dientu4nut/NES/blob/master/Battletoads%20%26%20Double%20Dragon%20-%20The%20Ultimate%20Team%20(U)%20.nes" }, Battletoads: { name: "Battletoads", url: "https://github.com/dientu4nut/NES/blob/master/Battletoads%20(U)%20.nes" }, BeautyandtheBeast: { name: "Beauty and the Beast ", url: "https://github.com/dientu4nut/NES/blob/master/Beauty%20and%20the%20Beast%20(E)%20.nes" }, Beetlejuice: { name: "Beetlejuice", url: "https://github.com/dientu4nut/NES/blob/master/Beetlejuice%20(U)%20.nes" }, BestoftheBestChampionshipKarate: { name: "Best of the Best - Championship Karate", url: "https://github.com/dientu4nut/NES/blob/master/Best%20of%20the%20Best%20-%20Championship%20Karate%20(U)%20.nes" }, BigBirdsHideSpeak: { name: "Big Bird s Hide & Speak", url: "https://github.com/dientu4nut/NES/blob/master/Big%20Bird%20s%20Hide%20%26%20Speak%20(U)%20.nes" }, Bigfoot: { name: "Bigfoot", url: "https://github.com/dientu4nut/NES/blob/master/Bigfoot%20(U)%20.nes" }, BillTedsExcellentVideoGameAdventure: { name: "Bill & Ted s Excellent Video Game Adventure", url: "https://github.com/dientu4nut/NES/blob/master/Bill%20%26%20Ted%20s%20Excellent%20Video%20Game%20Adventure%20(U)%20.nes" }, BillElliottsNASCARChallenge: { name: "Bill Elliott s NASCAR Challenge", url: "https://github.com/dientu4nut/NES/blob/master/Bill%20Elliott%20s%20NASCAR%20Challenge%20(U)%20.nes" }, BionicCommando: { name: "Bionic Commando", url: "https://github.com/dientu4nut/NES/blob/master/Bionic%20Commando%20(U)%20.nes" }, BlackBassUSAThe: { name: "Black Bass USA The", url: "https://github.com/dientu4nut/NES/blob/master/Black%20Bass%20USA%20The%20(U)%20.nes" }, BladesofSteel: { name: "Blades of Steel", url: "https://github.com/dientu4nut/NES/blob/master/Blades%20of%20Steel%20(U)%20.nes" }, BlasterMaster: { name: "Blaster Master", url: "https://github.com/dientu4nut/NES/blob/master/Blaster%20Master%20(U)%20.nes" }, BlueMarlinThe: { name: "Blue Marlin The", url: "https://github.com/dientu4nut/NES/blob/master/Blue%20Marlin%20The%20(U)%20.nes" }, BluesBrothersThe: { name: "Blues Brothers The", url: "https://github.com/dientu4nut/NES/blob/master/Blues%20Brothers%20The%20(U)%20.nes" }, BoJacksonBaseball: { name: "Bo Jackson Baseball", url: "https://github.com/dientu4nut/NES/blob/master/Bo%20Jackson%20Baseball%20(U)%20.nes" }, Bomberman: { name: "Bomberman", url: "https://github.com/dientu4nut/NES/blob/master/Bomberman%20(U)%20.nes" }, BombermanII: { name: "Bomberman II", url: "https://github.com/dientu4nut/NES/blob/master/Bomberman%20II%20(U)%20.nes" }, BonksAdventure: { name: "Bonk s Adventure", url: "https://github.com/dientu4nut/NES/blob/master/Bonk%20s%20Adventure%20(U)%20.nes" }, BoulderDash: { name: "Boulder Dash", url: "https://github.com/dientu4nut/NES/blob/master/Boulder%20Dash%20(U)%20.nes" }, BoyandHisBlobATroubleonBlobolonia: { name: "Boy and His Blob A - Trouble on Blobolonia", url: "https://github.com/dientu4nut/NES/blob/master/Boy%20and%20His%20Blob%20A%20-%20Trouble%20on%20Blobolonia%20(U)%20.nes" }, BramStokersDracula: { name: "Bram Stoker s Dracula", url: "https://github.com/dientu4nut/NES/blob/master/Bram%20Stoker%20s%20Dracula%20(U)%20.nes" }, BreakTimeTheNationalPoolTour: { name: "Break Time - The National Pool Tour", url: "https://github.com/dientu4nut/NES/blob/master/Break%20Time%20-%20The%20National%20Pool%20Tour%20(U)%20.nes" }, BreakThru: { name: "BreakThru", url: "https://github.com/dientu4nut/NES/blob/master/BreakThru%20(U)%20.nes" }, BubbleBobble: { name: "Bubble Bobble", url: "https://github.com/dientu4nut/NES/blob/master/Bubble%20Bobble%20(U)%20.nes" }, BubbleBobblePart2: { name: "Bubble Bobble Part 2", url: "https://github.com/dientu4nut/NES/blob/master/Bubble%20Bobble%20Part%202%20(U)%20.nes" }, BuckyOHare: { name: "Bucky O Hare", url: "https://github.com/dientu4nut/NES/blob/master/Bucky%20O%20Hare%20(U)%20.nes" }, BugsBunnyBirthdayBlowoutThe: { name: "Bugs Bunny Birthday Blowout The", url: "https://github.com/dientu4nut/NES/blob/master/Bugs%20Bunny%20Birthday%20Blowout%20The%20(U)%20.nes" }, BugsBunnyCrazyCastleThe: { name: "Bugs Bunny Crazy Castle The", url: "https://github.com/dientu4nut/NES/blob/master/Bugs%20Bunny%20Crazy%20Castle%20The%20(U)%20.nes" }, BumpnJump: { name: "Bump n Jump", url: "https://github.com/dientu4nut/NES/blob/master/Bump%20n%20Jump%20(U)%20.nes" }, BuraiFighter: { name: "Burai Fighter", url: "https://github.com/dientu4nut/NES/blob/master/Burai%20Fighter%20(U)%20.nes" }, BurgerTime: { name: "BurgerTime", url: "https://github.com/dientu4nut/NES/blob/master/BurgerTime%20(U)%20.nes" }, Cabal: { name: "Cabal", url: "https://github.com/dientu4nut/NES/blob/master/Cabal%20(U)%20.nes" }, CaesarsPalace: { name: "Caesars Palace", url: "https://github.com/dientu4nut/NES/blob/master/Caesars%20Palace%20(U)%20.nes" }, CaliforniaGames: { name: "California Games", url: "https://github.com/dientu4nut/NES/blob/master/California%20Games%20(U)%20.nes" }, CaptainAmericaandTheAvengers: { name: "Captain America and The Avengers", url: "https://github.com/dientu4nut/NES/blob/master/Captain%20America%20and%20The%20Avengers%20(U)%20.nes" }, CaptainPlanetandThePlaneteers: { name: "Captain Planet and The Planeteers", url: "https://github.com/dientu4nut/NES/blob/master/Captain%20Planet%20and%20The%20Planeteers%20(U)%20.nes" }, CasinoKid: { name: "Casino Kid", url: "https://github.com/dientu4nut/NES/blob/master/Casino%20Kid%20(U)%20.nes" }, CasinoKid2: { name: "Casino Kid 2", url: "https://github.com/dientu4nut/NES/blob/master/Casino%20Kid%202%20(U)%20.nes" }, Castelian: { name: "Castelian", url: "https://github.com/dientu4nut/NES/blob/master/Castelian%20(U)%20.nes" }, CastleofDragon: { name: "Castle of Dragon", url: "https://github.com/dientu4nut/NES/blob/master/Castle%20of%20Dragon%20(U)%20.nes" }, Castlequest: { name: "Castlequest", url: "https://github.com/dientu4nut/NES/blob/master/Castlequest%20(U)%20.nes" }, CastlevaniaU: { name: "Castlevania (U)", url: "https://github.com/dientu4nut/NES/blob/master/Castlevania%20(U).nes" }, CastlevaniaIISimonsQuest: { name: "Castlevania II - Simon s Quest", url: "https://github.com/dientu4nut/NES/blob/master/Castlevania%20II%20-%20Simon%20s%20Quest%20(U)%20.nes" }, CastlevaniaIIIDraculasCurse: { name: "Castlevania III - Dracula s Curse", url: "https://github.com/dientu4nut/NES/blob/master/Castlevania%20III%20-%20Dracula%20s%20Curse%20(U)%20.nes" }, CavemanGames: { name: "Caveman Games", url: "https://github.com/dientu4nut/NES/blob/master/Caveman%20Games%20(U)%20.nes" }, ChampionshipBowling: { name: "Championship Bowling", url: "https://github.com/dientu4nut/NES/blob/master/Championship%20Bowling%20(U)%20.nes" }, ChampionshipPool: { name: "Championship Pool", url: "https://github.com/dientu4nut/NES/blob/master/Championship%20Pool%20(U)%20.nes" }, ChampionshipRally: { name: "Championship Rally ", url: "https://github.com/dientu4nut/NES/blob/master/Championship%20Rally%20(E)%20.nes" }, CheetahMenIIActiveEnterprises: { name: "Cheetah Men II (Active Enterprises)", url: "https://github.com/dientu4nut/NES/blob/master/Cheetah%20Men%20II%20(Active%20Enterprises).nes" }, ChipnDaleRescueRangers: { name: "Chip n Dale Rescue Rangers", url: "https://github.com/dientu4nut/NES/blob/master/Chip%20%20n%20Dale%20Rescue%20Rangers%20(U)%20.nes" }, ChipnDaleRescueRangers2: { name: "Chip n Dale Rescue Rangers 2", url: "https://github.com/dientu4nut/NES/blob/master/Chip%20%20n%20Dale%20Rescue%20Rangers%202%20(U)%20.nes" }, ChubbyCherub: { name: "Chubby Cherub", url: "https://github.com/dientu4nut/NES/blob/master/Chubby%20Cherub%20(U)%20.nes" }, CircusCaper: { name: "Circus Caper", url: "https://github.com/dientu4nut/NES/blob/master/Circus%20Caper%20(U)%20.nes" }, CircusCharlieJ: { name: "Circus Charlie (J)", url: "https://github.com/dientu4nut/NES/blob/master/Circus%20Charlie%20(J).nes" }, CityConnection: { name: "City Connection", url: "https://github.com/dientu4nut/NES/blob/master/City%20Connection%20(U)%20.nes" }, ClassicConcentration: { name: "Classic Concentration", url: "https://github.com/dientu4nut/NES/blob/master/Classic%20Concentration%20(U)%20.nes" }, Cliffhanger: { name: "Cliffhanger", url: "https://github.com/dientu4nut/NES/blob/master/Cliffhanger%20(U)%20.nes" }, CobraCommand: { name: "Cobra Command", url: "https://github.com/dientu4nut/NES/blob/master/Cobra%20Command%20(U)%20.nes" }, CobraTriangle: { name: "Cobra Triangle", url: "https://github.com/dientu4nut/NES/blob/master/Cobra%20Triangle%20(U)%20.nes" }, CodeNameViper: { name: "Code Name - Viper", url: "https://github.com/dientu4nut/NES/blob/master/Code%20Name%20-%20Viper%20(U)%20.nes" }, ColorADinosaur: { name: "Color A Dinosaur", url: "https://github.com/dientu4nut/NES/blob/master/Color%20A%20Dinosaur%20(U)%20.nes" }, Commando: { name: "Commando", url: "https://github.com/dientu4nut/NES/blob/master/Commando%20(U)%20.nes" }, ConanTheMysteriesofTime: { name: "Conan - The Mysteries of Time", url: "https://github.com/dientu4nut/NES/blob/master/Conan%20-%20The%20Mysteries%20of%20Time%20(U)%20.nes" }, Conflict: { name: "Conflict", url: "https://github.com/dientu4nut/NES/blob/master/Conflict%20(U)%20.nes" }, ConquestoftheCrystalPalace: { name: "Conquest of the Crystal Palace", url: "https://github.com/dientu4nut/NES/blob/master/Conquest%20of%20the%20Crystal%20Palace%20(U)%20.nes" }, ContraJEnglishPatched: { name: "Contra (J-English Patched)", url: "https://github.com/dientu4nut/NES/blob/master/Contra%20(J-English%20Patched).nes" }, Contra: { name: "Contra", url: "https://github.com/dientu4nut/NES/blob/master/Contra%20(U)%20.nes" }, ContraForce: { name: "Contra Force", url: "https://github.com/dientu4nut/NES/blob/master/Contra%20Force%20(U)%20.nes" }, CoolWorld: { name: "Cool World", url: "https://github.com/dientu4nut/NES/blob/master/Cool%20World%20(U)%20.nes" }, CowboyKid: { name: "Cowboy Kid", url: "https://github.com/dientu4nut/NES/blob/master/Cowboy%20Kid%20(U)%20.nes" }, Crackoutp: { name: "Crackout [ p]", url: "https://github.com/dientu4nut/NES/blob/master/Crackout%20(E)%20%5B%20p%5D.nes" }, CrashntheBoysStreetChallenge: { name: "Crash n the Boys - Street Challenge", url: "https://github.com/dientu4nut/NES/blob/master/Crash%20%20n%20the%20Boys%20-%20Street%20Challenge%20(U)%20.nes" }, Crystalis: { name: "Crystalis", url: "https://github.com/dientu4nut/NES/blob/master/Crystalis%20(U)%20.nes" }, Cyberball: { name: "Cyberball", url: "https://github.com/dientu4nut/NES/blob/master/Cyberball%20(U)%20.nes" }, CybernoidTheFightingMachine: { name: "Cybernoid - The Fighting Machine", url: "https://github.com/dientu4nut/NES/blob/master/Cybernoid%20-%20The%20Fighting%20Machine%20(U)%20.nes" }, DanceAerobics: { name: "Dance Aerobics", url: "https://github.com/dientu4nut/NES/blob/master/Dance%20Aerobics%20(U)%20.nes" }, DannySullivansIndyHeat: { name: "Danny Sullivan s Indy Heat", url: "https://github.com/dientu4nut/NES/blob/master/Danny%20Sullivan%20s%20Indy%20Heat%20(U)%20.nes" }, Darkman: { name: "Darkman", url: "https://github.com/dientu4nut/NES/blob/master/Darkman%20(U)%20.nes" }, DarkwingDuck: { name: "Darkwing Duck", url: "https://github.com/dientu4nut/NES/blob/master/Darkwing%20Duck%20(U)%20.nes" }, DashGalaxyintheAlienAsylum: { name: "Dash Galaxy in the Alien Asylum", url: "https://github.com/dientu4nut/NES/blob/master/Dash%20Galaxy%20in%20the%20Alien%20Asylum%20(U)%20.nes" }, DayDreaminDavey: { name: "Day Dreamin Davey", url: "https://github.com/dientu4nut/NES/blob/master/Day%20Dreamin%20%20Davey%20(U)%20.nes" }, DaysofThunder: { name: "Days of Thunder", url: "https://github.com/dientu4nut/NES/blob/master/Days%20of%20Thunder%20(U)%20.nes" }, DeadlyTowers: { name: "Deadly Towers", url: "https://github.com/dientu4nut/NES/blob/master/Deadly%20Towers%20(U)%20.nes" }, DefenderII: { name: "Defender II", url: "https://github.com/dientu4nut/NES/blob/master/Defender%20II%20(U)%20.nes" }, DefenderoftheCrown: { name: "Defender of the Crown", url: "https://github.com/dientu4nut/NES/blob/master/Defender%20of%20the%20Crown%20(U)%20.nes" }, DefendersofDynatronCity: { name: "Defenders of Dynatron City", url: "https://github.com/dientu4nut/NES/blob/master/Defenders%20of%20Dynatron%20City%20(U)%20.nes" }, DejaVu: { name: "Deja Vu", url: "https://github.com/dientu4nut/NES/blob/master/Deja%20Vu%20(U)%20.nes" }, DemonSword: { name: "Demon Sword", url: "https://github.com/dientu4nut/NES/blob/master/Demon%20Sword%20(U)%20.nes" }, DesertCommander: { name: "Desert Commander", url: "https://github.com/dientu4nut/NES/blob/master/Desert%20Commander%20(U)%20.nes" }, DestinationEarthstar: { name: "Destination Earthstar", url: "https://github.com/dientu4nut/NES/blob/master/Destination%20Earthstar%20(U)%20.nes" }, DestinyofanEmperor: { name: "Destiny of an Emperor", url: "https://github.com/dientu4nut/NES/blob/master/Destiny%20of%20an%20Emperor%20(U)%20.nes" }, DevilWorld: { name: "Devil World ", url: "https://github.com/dientu4nut/NES/blob/master/Devil%20World%20(E)%20.nes" }, DickTracy: { name: "Dick Tracy", url: "https://github.com/dientu4nut/NES/blob/master/Dick%20Tracy%20(U)%20.nes" }, DieHard: { name: "Die Hard", url: "https://github.com/dientu4nut/NES/blob/master/Die%20Hard%20(U)%20.nes" }, DigDugIITroubleinParadise: { name: "Dig Dug II - Trouble in Paradise", url: "https://github.com/dientu4nut/NES/blob/master/Dig%20Dug%20II%20-%20Trouble%20in%20Paradise%20(U)%20.nes" }, DiggerTheLegendoftheLostCity: { name: "Digger - The Legend of the Lost City", url: "https://github.com/dientu4nut/NES/blob/master/Digger%20-%20The%20Legend%20of%20the%20Lost%20City%20(U)%20.nes" }, DirtyHarryTheWarAgainstDrugs: { name: "Dirty Harry - The War Against Drugs", url: "https://github.com/dientu4nut/NES/blob/master/Dirty%20Harry%20-%20The%20War%20Against%20Drugs%20(U)%20.nes" }, DonkeyKong3: { name: "Donkey Kong 3", url: "https://github.com/dientu4nut/NES/blob/master/Donkey%20Kong%203%20(U)%20.nes" }, DonkeyKongClassics: { name: "Donkey Kong Classics", url: "https://github.com/dientu4nut/NES/blob/master/Donkey%20Kong%20Classics%20(U)%20.nes" }, DonkeyKongJrMath: { name: "Donkey Kong Jr. Math", url: "https://github.com/dientu4nut/NES/blob/master/Donkey%20Kong%20Jr.%20Math%20(U)%20.nes" }, DoubleDare: { name: "Double Dare", url: "https://github.com/dientu4nut/NES/blob/master/Double%20Dare%20(U)%20.nes" }, DoubleDragon: { name: "Double Dragon", url: "https://github.com/dientu4nut/NES/blob/master/Double%20Dragon%20(U)%20.nes" }, DoubleDragonIIITheSacredStones: { name: "Double Dragon III - The Sacred Stones", url: "https://github.com/dientu4nut/NES/blob/master/Double%20Dragon%20III%20-%20The%20Sacred%20Stones%20(U)%20.nes" }, DrChaos: { name: "Dr. Chaos", url: "https://github.com/dientu4nut/NES/blob/master/Dr.%20Chaos%20(U)%20.nes" }, DrJekyllandMrHyde: { name: "Dr. Jekyll and Mr. Hyde", url: "https://github.com/dientu4nut/NES/blob/master/Dr.%20Jekyll%20and%20Mr.%20Hyde%20(U)%20.nes" }, DrMario: { name: "Dr. Mario [!]", url: "https://github.com/dientu4nut/NES/blob/master/Dr.%20Mario%20(E)%20%5B!%5D.nes" }, DragonFighter: { name: "Dragon Fighter", url: "https://github.com/dientu4nut/NES/blob/master/Dragon%20Fighter%20(U)%20.nes" }, DragonPower: { name: "Dragon Power", url: "https://github.com/dientu4nut/NES/blob/master/Dragon%20Power%20(U)%20.nes" }, DragonSpiritTheNewLegend: { name: "Dragon Spirit - The New Legend", url: "https://github.com/dientu4nut/NES/blob/master/Dragon%20Spirit%20-%20The%20New%20Legend%20(U)%20.nes" }, DragonWarriorII: { name: "Dragon Warrior II", url: "https://github.com/dientu4nut/NES/blob/master/Dragon%20Warrior%20II%20(U)%20.nes" }, DragonWarriorIII: { name: "Dragon Warrior III", url: "https://github.com/dientu4nut/NES/blob/master/Dragon%20Warrior%20III%20(U)%20.nes" }, DragonWarriorIV: { name: "Dragon Warrior IV", url: "https://github.com/dientu4nut/NES/blob/master/Dragon%20Warrior%20IV%20(U)%20.nes" }, DragonsLair: { name: "Dragon s Lair", url: "https://github.com/dientu4nut/NES/blob/master/Dragon%20s%20Lair%20(U)%20.nes" }, DropZone: { name: "Drop Zone", url: "https://github.com/dientu4nut/NES/blob/master/Drop%20Zone%20(E).nes" }, DuckTales: { name: "Duck Tales", url: "https://github.com/dientu4nut/NES/blob/master/Duck%20Tales%20(U)%20.nes" }, DuckTales2: { name: "Duck Tales 2", url: "https://github.com/dientu4nut/NES/blob/master/Duck%20Tales%202%20(U)%20.nes" }, DungeonMagicSwordoftheElements: { name: "Dungeon Magic - Sword of the Elements", url: "https://github.com/dientu4nut/NES/blob/master/Dungeon%20Magic%20-%20Sword%20of%20the%20Elements%20(U)%20.nes" }, DustyDiamondsAllStarSoftball: { name: "Dusty Diamond s All-Star Softball", url: "https://github.com/dientu4nut/NES/blob/master/Dusty%20Diamond%20s%20All-Star%20Softball%20(U)%20.nes" }, DynowarzTheDestructionofSpondylus: { name: "Dynowarz - The Destruction of Spondylus", url: "https://github.com/dientu4nut/NES/blob/master/Dynowarz%20-%20The%20Destruction%20of%20Spondylus%20(U)%20.nes" }, ElevatorAction: { name: "Elevator Action", url: "https://github.com/dientu4nut/NES/blob/master/Elevator%20Action%20(U)%20.nes" }, EliminatorBoatDuel: { name: "Eliminator Boat Duel", url: "https://github.com/dientu4nut/NES/blob/master/Eliminator%20Boat%20Duel%20(U)%20.nes" }, Elite: { name: "Elite ", url: "https://github.com/dientu4nut/NES/blob/master/Elite%20(E)%20.nes" }, Excitebike: { name: "Excitebike", url: "https://github.com/dientu4nut/NES/blob/master/Excitebike%20(E).nes" }, F117AStealthFighter: { name: "F-117A Stealth Fighter", url: "https://github.com/dientu4nut/NES/blob/master/F-117A%20Stealth%20Fighter%20(U)%20.nes" }, F15StrikeEagle: { name: "F-15 Strike Eagle", url: "https://github.com/dientu4nut/NES/blob/master/F-15%20Strike%20Eagle%20(U)%20.nes" }, FamilyFeud: { name: "Family Feud", url: "https://github.com/dientu4nut/NES/blob/master/Family%20Feud%20(U)%20.nes" }, FariaAWorldofMysteryDanger: { name: "Faria - A World of Mystery & Danger ", url: "https://github.com/dientu4nut/NES/blob/master/Faria%20-%20A%20World%20of%20Mystery%20%26%20Danger%20%20(U)%20.nes" }, FelixtheCat: { name: "Felix the Cat", url: "https://github.com/dientu4nut/NES/blob/master/Felix%20the%20Cat%20(U)%20.nes" }, FerrariGrandPrixChallenge: { name: "Ferrari - Grand Prix Challenge", url: "https://github.com/dientu4nut/NES/blob/master/Ferrari%20-%20Grand%20Prix%20Challenge%20(U)%20.nes" }, FestersQuest: { name: "Fester s Quest", url: "https://github.com/dientu4nut/NES/blob/master/Fester%20s%20Quest%20(U)%20.nes" }, FinalFantasy: { name: "Final Fantasy", url: "https://github.com/dientu4nut/NES/blob/master/Final%20Fantasy%20(U)%20.nes" }, FirenIce: { name: "Fire n Ice", url: "https://github.com/dientu4nut/NES/blob/master/Fire%20%20n%20Ice%20(U)%20.nes" }, FirehouseRescue: { name: "Firehouse Rescue", url: "https://github.com/dientu4nut/NES/blob/master/Firehouse%20Rescue%20(U)%20.nes" }, FistoftheNorthStar: { name: "Fist of the North Star", url: "https://github.com/dientu4nut/NES/blob/master/Fist%20of%20the%20North%20Star%20(U)%20.nes" }, FlightoftheIntruder: { name: "Flight of the Intruder", url: "https://github.com/dientu4nut/NES/blob/master/Flight%20of%20the%20Intruder%20(U)%20.nes" }, FlintstonesTheTheRescueofDinoHoppy: { name: "Flintstones The - The Rescue of Dino & Hoppy", url: "https://github.com/dientu4nut/NES/blob/master/Flintstones%20The%20-%20The%20Rescue%20of%20Dino%20%26%20Hoppy%20(U)%20.nes" }, FlintstonesTheTheSurpriseatDinosaurPeak: { name: "Flintstones The - The Surprise at Dinosaur Peak ", url: "https://github.com/dientu4nut/NES/blob/master/Flintstones%20The%20-%20The%20Surprise%20at%20Dinosaur%20Peak%20%20(U)%20.nes" }, FlyingDragonTheSecretScroll: { name: "Flying Dragon - The Secret Scroll", url: "https://github.com/dientu4nut/NES/blob/master/Flying%20Dragon%20-%20The%20Secret%20Scroll%20(U)%20.nes" }, FlyingWarriors: { name: "Flying Warriors", url: "https://github.com/dientu4nut/NES/blob/master/Flying%20Warriors%20(U)%20.nes" }, Formula1Sensation: { name: "Formula 1 Sensation ", url: "https://github.com/dientu4nut/NES/blob/master/Formula%201%20Sensation%20(E)%20.nes" }, FormulaOneBuiltToWin: { name: "Formula One - Built To Win", url: "https://github.com/dientu4nut/NES/blob/master/Formula%20One%20-%20Built%20To%20Win%20(U)%20.nes" }, FrankensteinTheMonsterReturns: { name: "Frankenstein - The Monster Returns", url: "https://github.com/dientu4nut/NES/blob/master/Frankenstein%20-%20The%20Monster%20Returns%20(U)%20.nes" }, FreedomForce: { name: "Freedom Force", url: "https://github.com/dientu4nut/NES/blob/master/Freedom%20Force%20(U)%20.nes" }, Fridaythe13th: { name: "Friday the 13th", url: "https://github.com/dientu4nut/NES/blob/master/Friday%20the%2013th%20(U)%20.nes" }, FunHouse: { name: "Fun House", url: "https://github.com/dientu4nut/NES/blob/master/Fun%20House%20(U)%20.nes" }, GIJoe: { name: "G.I. Joe", url: "https://github.com/dientu4nut/NES/blob/master/G.I.%20Joe%20(U)%20.nes" }, GIJoeTheAtlantisFactor: { name: "G.I. Joe - The Atlantis Factor", url: "https://github.com/dientu4nut/NES/blob/master/G.I.%20Joe%20-%20The%20Atlantis%20Factor%20(U)%20.nes" }, Galaxy5000: { name: "Galaxy 5000", url: "https://github.com/dientu4nut/NES/blob/master/Galaxy%205000%20(U)%20.nes" }, Gauntlet: { name: "Gauntlet", url: "https://github.com/dientu4nut/NES/blob/master/Gauntlet%20(U)%20.nes" }, GauntletII: { name: "Gauntlet II", url: "https://github.com/dientu4nut/NES/blob/master/Gauntlet%20II%20(U)%20.nes" }, Gemfire: { name: "Gemfire", url: "https://github.com/dientu4nut/NES/blob/master/Gemfire%20(U)%20.nes" }, GenghisKhan: { name: "Genghis Khan", url: "https://github.com/dientu4nut/NES/blob/master/Genghis%20Khan%20(U)%20.nes" }, GeorgeForemansKOBoxing: { name: "George Foreman s KO Boxing", url: "https://github.com/dientu4nut/NES/blob/master/George%20Foreman%20s%20KO%20Boxing%20(U)%20.nes" }, Ghostbusters: { name: "Ghostbusters", url: "https://github.com/dientu4nut/NES/blob/master/Ghostbusters%20(U)%20.nes" }, GhostbustersII: { name: "Ghostbusters II", url: "https://github.com/dientu4nut/NES/blob/master/Ghostbusters%20II%20(U)%20.nes" }, GhostsNGoblins: { name: "Ghosts N Goblins", url: "https://github.com/dientu4nut/NES/blob/master/Ghosts%20%20N%20Goblins%20(U)%20.nes" }, GhoulSchool: { name: "Ghoul School", url: "https://github.com/dientu4nut/NES/blob/master/Ghoul%20School%20(U)%20.nes" }, Goal: { name: "Goal ", url: "https://github.com/dientu4nut/NES/blob/master/Goal%20%20(U)%20.nes" }, GoalTwo: { name: "Goal Two", url: "https://github.com/dientu4nut/NES/blob/master/Goal%20%20Two%20(U)%20.nes" }, GodzillaMonsterofMonsters: { name: "Godzilla - Monster of Monsters ", url: "https://github.com/dientu4nut/NES/blob/master/Godzilla%20-%20Monster%20of%20Monsters%20%20(U)%20.nes" }, Godzilla2WaroftheMonsters: { name: "Godzilla 2 - War of the Monsters", url: "https://github.com/dientu4nut/NES/blob/master/Godzilla%202%20-%20War%20of%20the%20Monsters%20(U)%20.nes" }, GoldMedalChallenge92: { name: "Gold Medal Challenge 92", url: "https://github.com/dientu4nut/NES/blob/master/Gold%20Medal%20Challenge%20%2092%20(U)%20.nes" }, Golf: { name: "Golf", url: "https://github.com/dientu4nut/NES/blob/master/Golf%20(U)%20.nes" }, GolfGrandSlam: { name: "Golf Grand Slam", url: "https://github.com/dientu4nut/NES/blob/master/Golf%20Grand%20Slam%20(U)%20.nes" }, Golgo13TopSecretEpisode: { name: "Golgo 13 - Top Secret Episode", url: "https://github.com/dientu4nut/NES/blob/master/Golgo%2013%20-%20Top%20Secret%20Episode%20(U)%20.nes" }, GooniesIIThe: { name: "Goonies II The", url: "https://github.com/dientu4nut/NES/blob/master/Goonies%20II%20The%20(U)%20.nes" }, GotchaTheSport: { name: "Gotcha - The Sport ", url: "https://github.com/dientu4nut/NES/blob/master/Gotcha%20%20-%20The%20Sport%20%20(U)%20.nes" }, Gradius: { name: "Gradius", url: "https://github.com/dientu4nut/NES/blob/master/Gradius%20(U)%20.nes" }, GreatWaldoSearchThe: { name: "Great Waldo Search The", url: "https://github.com/dientu4nut/NES/blob/master/Great%20Waldo%20Search%20The%20(U)%20.nes" }, GregNormansGolfPower: { name: "Greg Norman s Golf Power", url: "https://github.com/dientu4nut/NES/blob/master/Greg%20Norman%20s%20Golf%20Power%20(U)%20.nes" }, Gremlins2TheNewBatch: { name: "Gremlins 2 - The New Batch", url: "https://github.com/dientu4nut/NES/blob/master/Gremlins%202%20-%20The%20New%20Batch%20(U)%20.nes" }, GuardianLegendThe: { name: "Guardian Legend The", url: "https://github.com/dientu4nut/NES/blob/master/Guardian%20Legend%20The%20(U)%20.nes" }, GuerrillaWar: { name: "Guerrilla War", url: "https://github.com/dientu4nut/NES/blob/master/Guerrilla%20War%20(U)%20.nes" }, Gumshoe: { name: "Gumshoe", url: "https://github.com/dientu4nut/NES/blob/master/Gumshoe%20(U)%20.nes" }, GunNac: { name: "Gun-Nac", url: "https://github.com/dientu4nut/NES/blob/master/Gun-Nac%20(U)%20.nes" }, GunSmoke: { name: "Gun.Smoke", url: "https://github.com/dientu4nut/NES/blob/master/Gun.Smoke%20(U)%20.nes" }, Gyruss: { name: "Gyruss", url: "https://github.com/dientu4nut/NES/blob/master/Gyruss%20(U)%20.nes" }, HammerinHarry: { name: "Hammerin Harry ", url: "https://github.com/dientu4nut/NES/blob/master/Hammerin%20%20Harry%20(E)%20.nes" }, HarlemGlobetrotters: { name: "Harlem Globetrotters", url: "https://github.com/dientu4nut/NES/blob/master/Harlem%20Globetrotters%20(U)%20.nes" }, Hatris: { name: "Hatris", url: "https://github.com/dientu4nut/NES/blob/master/Hatris%20(U)%20.nes" }, HeavyBarrel: { name: "Heavy Barrel", url: "https://github.com/dientu4nut/NES/blob/master/Heavy%20Barrel%20(U)%20.nes" }, HeavyShreddin: { name: "Heavy Shreddin ", url: "https://github.com/dientu4nut/NES/blob/master/Heavy%20Shreddin%20%20(U)%20.nes" }, HighSpeed: { name: "High Speed", url: "https://github.com/dientu4nut/NES/blob/master/High%20Speed%20(U)%20.nes" }, HollywoodSquares: { name: "Hollywood Squares", url: "https://github.com/dientu4nut/NES/blob/master/Hollywood%20Squares%20(U)%20.nes" }, HomeAlone2LostinNewYork: { name: "Home Alone 2 - Lost in New York", url: "https://github.com/dientu4nut/NES/blob/master/Home%20Alone%202%20-%20Lost%20in%20New%20York%20(U)%20.nes" }, Hook: { name: "Hook", url: "https://github.com/dientu4nut/NES/blob/master/Hook%20(U)%20.nes" }, Hoops: { name: "Hoops", url: "https://github.com/dientu4nut/NES/blob/master/Hoops%20(U)%20.nes" }, HudsonHawk: { name: "Hudson Hawk", url: "https://github.com/dientu4nut/NES/blob/master/Hudson%20Hawk%20(U)%20.nes" }, HudsonsAdventureIsland: { name: "Hudson s Adventure Island", url: "https://github.com/dientu4nut/NES/blob/master/Hudson%20s%20Adventure%20Island%20(U)%20.nes" }, HudsonsAdventureIslandII: { name: "Hudson s Adventure Island II", url: "https://github.com/dientu4nut/NES/blob/master/Hudson%20s%20Adventure%20Island%20II%20(U)%20.nes" }, HudsonsAdventureIslandIII: { name: "Hudson s Adventure Island III", url: "https://github.com/dientu4nut/NES/blob/master/Hudson%20s%20Adventure%20Island%20III%20(U)%20.nes" }, Hydlide: { name: "Hydlide", url: "https://github.com/dientu4nut/NES/blob/master/Hydlide%20(U)%20.nes" }, ICanRemember: { name: "I Can Remember", url: "https://github.com/dientu4nut/NES/blob/master/I%20Can%20Remember%20(U)%20.nes" }, IceClimber: { name: "Ice Climber", url: "https://github.com/dientu4nut/NES/blob/master/Ice%20Climber%20(U)%20.nes" }, IceHockey: { name: "Ice Hockey", url: "https://github.com/dientu4nut/NES/blob/master/Ice%20Hockey%20(U)%20.nes" }, IkariIIITheRescue: { name: "Ikari III - The Rescue", url: "https://github.com/dientu4nut/NES/blob/master/Ikari%20III%20-%20The%20Rescue%20(U)%20.nes" }, IkariWarriorsIIVictoryRoad: { name: "Ikari Warriors II - Victory Road", url: "https://github.com/dientu4nut/NES/blob/master/Ikari%20Warriors%20II%20-%20Victory%20Road%20(U)%20.nes" }, ImageFight: { name: "Image Fight", url: "https://github.com/dientu4nut/NES/blob/master/Image%20Fight%20(U)%20.nes" }, ImmortalThe: { name: "Immortal The", url: "https://github.com/dientu4nut/NES/blob/master/Immortal%20The%20(U)%20.nes" }, ImpossibleMissionII: { name: "Impossible Mission II", url: "https://github.com/dientu4nut/NES/blob/master/Impossible%20Mission%20II%20(U)%20.nes" }, IncredibleCrashDummiesThe: { name: "Incredible Crash Dummies The", url: "https://github.com/dientu4nut/NES/blob/master/Incredible%20Crash%20Dummies%20The%20(U)%20.nes" }, IndianaJonesandtheLastCrusadeTaito: { name: "Indiana Jones and the Last Crusade(Taito) ", url: "https://github.com/dientu4nut/NES/blob/master/Indiana%20Jones%20and%20the%20Last%20Crusade%20(U)%20(Taito)%20.nes" }, IndianaJonesandtheLastCrusadeUBISoft: { name: "Indiana Jones and the Last Crusade(UBI Soft) ", url: "https://github.com/dientu4nut/NES/blob/master/Indiana%20Jones%20and%20the%20Last%20Crusade%20(U)%20(UBI%20Soft)%20.nes" }, Infiltrator: { name: "Infiltrator", url: "https://github.com/dientu4nut/NES/blob/master/Infiltrator%20(U)%20.nes" }, InternationalCricket: { name: "International Cricket ", url: "https://github.com/dientu4nut/NES/blob/master/International%20Cricket%20(E)%20.nes" }, IronTankTheInvasionofNormandy: { name: "Iron Tank - The Invasion of Normandy", url: "https://github.com/dientu4nut/NES/blob/master/Iron%20Tank%20-%20The%20Invasion%20of%20Normandy%20(U)%20.nes" }, IronswordWizardsWarriorsII: { name: "Ironsword - Wizards & Warriors II", url: "https://github.com/dientu4nut/NES/blob/master/Ironsword%20-%20Wizards%20%26%20Warriors%20II%20(U)%20.nes" }, IsolatedWarrior: { name: "Isolated Warrior", url: "https://github.com/dientu4nut/NES/blob/master/Isolated%20Warrior%20(U)%20.nes" }, IvanIronmanStewartsSuperOffRoad: { name: "Ivan Ironman Stewart s Super Off-Road", url: "https://github.com/dientu4nut/NES/blob/master/Ivan%20Ironman%20Stewart%20s%20Super%20Off-Road%20(U)%20.nes" }, JackNicklausGreatest18HolesofMajorChampionshipGolf: { name: "Jack Nicklaus Greatest 18 Holes of Major Championship Golf", url: "https://github.com/dientu4nut/NES/blob/master/Jack%20Nicklaus%20%20Greatest%2018%20Holes%20of%20Major%20Championship%20Golf%20(U)%20.nes" }, Jackal: { name: "Jackal", url: "https://github.com/dientu4nut/NES/blob/master/Jackal%20(U)%20.nes" }, JackieChansActionKungFu: { name: "Jackie Chan s Action Kung Fu", url: "https://github.com/dientu4nut/NES/blob/master/Jackie%20Chan%20s%20Action%20Kung%20Fu%20(U)%20.nes" }, JamesBondJr: { name: "James Bond Jr", url: "https://github.com/dientu4nut/NES/blob/master/James%20Bond%20Jr%20(U)%20.nes" }, Jaws: { name: "Jaws", url: "https://github.com/dientu4nut/NES/blob/master/Jaws%20(U)%20.nes" }, Jeopardy25thAnniversaryEdition: { name: "Jeopardy 25th Anniversary Edition", url: "https://github.com/dientu4nut/NES/blob/master/Jeopardy%20%2025th%20Anniversary%20Edition%20(U)%20.nes" }, JeopardyJuniorEdition: { name: "Jeopardy Junior Edition", url: "https://github.com/dientu4nut/NES/blob/master/Jeopardy%20%20Junior%20Edition%20(U)%20.nes" }, JetsonsTheCogswellsCaper: { name: "Jetsons The - Cogswell s Caper ", url: "https://github.com/dientu4nut/NES/blob/master/Jetsons%20The%20-%20Cogswell%20s%20Caper%20%20(U)%20.nes" }, JimHensonsMuppetAdventureChaosattheCarnival: { name: "Jim Henson s Muppet Adventure - Chaos at the Carnival", url: "https://github.com/dientu4nut/NES/blob/master/Jim%20Henson%20s%20Muppet%20Adventure%20-%20Chaos%20at%20the%20Carnival%20(U)%20.nes" }, JimmyConnorsTennis: { name: "Jimmy Connor s Tennis", url: "https://github.com/dientu4nut/NES/blob/master/Jimmy%20Connor%20s%20Tennis%20(U)%20.nes" }, JoeMacCavemanNinja: { name: "Joe & Mac - Caveman Ninja", url: "https://github.com/dientu4nut/NES/blob/master/Joe%20%26%20Mac%20-%20Caveman%20Ninja%20(U)%20.nes" }, JohnElwaysQuarterback: { name: "John Elway s Quarterback", url: "https://github.com/dientu4nut/NES/blob/master/John%20Elway%20s%20Quarterback%20(U)%20.nes" }, JordanVsBirdOneOnOne: { name: "Jordan Vs Bird - One On One", url: "https://github.com/dientu4nut/NES/blob/master/Jordan%20Vs%20Bird%20-%20One%20On%20One%20(U)%20.nes" }, JourneytoSilius: { name: "Journey to Silius", url: "https://github.com/dientu4nut/NES/blob/master/Journey%20to%20Silius%20(U)%20.nes" }, Joust: { name: "Joust", url: "https://github.com/dientu4nut/NES/blob/master/Joust%20(U)%20.nes" }, JungleBookThe: { name: "Jungle Book The", url: "https://github.com/dientu4nut/NES/blob/master/Jungle%20Book%20The%20(U)%20.nes" }, JurassicPark: { name: "Jurassic Park", url: "https://github.com/dientu4nut/NES/blob/master/Jurassic%20Park%20(U)%20.nes" }, KabukiQuantumFighter: { name: "Kabuki - Quantum Fighter", url: "https://github.com/dientu4nut/NES/blob/master/Kabuki%20-%20Quantum%20Fighter%20(U)%20.nes" }, KarateChamp: { name: "Karate Champ", url: "https://github.com/dientu4nut/NES/blob/master/Karate%20Champ%20(U)%20.nes" }, KarateKidThe: { name: "Karate Kid The", url: "https://github.com/dientu4nut/NES/blob/master/Karate%20Kid%20The%20(U)%20.nes" }, Karnov: { name: "Karnov", url: "https://github.com/dientu4nut/NES/blob/master/Karnov%20(U)%20.nes" }, KickMaster: { name: "Kick Master", url: "https://github.com/dientu4nut/NES/blob/master/Kick%20Master%20(U)%20.nes" }, KickOff: { name: "Kick Off ", url: "https://github.com/dientu4nut/NES/blob/master/Kick%20Off%20(E)%20.nes" }, KickleCubicle: { name: "Kickle Cubicle", url: "https://github.com/dientu4nut/NES/blob/master/Kickle%20Cubicle%20(U)%20.nes" }, KidKlown: { name: "Kid Klown", url: "https://github.com/dientu4nut/NES/blob/master/Kid%20Klown%20(U)%20.nes" }, KidKoolandtheQuestforthe7WonderHerbs: { name: "Kid Kool and the Quest for the 7 Wonder Herbs", url: "https://github.com/dientu4nut/NES/blob/master/Kid%20Kool%20and%20the%20Quest%20for%20the%207%20Wonder%20Herbs%20(U)%20.nes" }, KingsKnight: { name: "King s Knight", url: "https://github.com/dientu4nut/NES/blob/master/King%20s%20Knight%20(U)%20.nes" }, KingsQuestV: { name: "King s Quest V", url: "https://github.com/dientu4nut/NES/blob/master/King%20s%20Quest%20V%20(U)%20.nes" }, KingsoftheBeach: { name: "Kings of the Beach", url: "https://github.com/dientu4nut/NES/blob/master/Kings%20of%20the%20Beach%20(U)%20.nes" }, KiwiKrazeABirdBrainedAdventure: { name: "Kiwi Kraze - A Bird-Brained Adventure ", url: "https://github.com/dientu4nut/NES/blob/master/Kiwi%20Kraze%20-%20A%20Bird-Brained%20Adventure%20%20(U)%20.nes" }, KlashBall: { name: "Klash Ball", url: "https://github.com/dientu4nut/NES/blob/master/Klash%20Ball%20(U)%20.nes" }, KnightRider: { name: "Knight Rider", url: "https://github.com/dientu4nut/NES/blob/master/Knight%20Rider%20(U)%20.nes" }, KonamiHyperSoccer: { name: "Konami Hyper Soccer ", url: "https://github.com/dientu4nut/NES/blob/master/Konami%20Hyper%20Soccer%20(E)%20.nes" }, KrionConquestThe: { name: "Krion Conquest The", url: "https://github.com/dientu4nut/NES/blob/master/Krion%20Conquest%20The%20(U)%20.nes" }, KrustysFunHouse: { name: "Krusty s Fun House", url: "https://github.com/dientu4nut/NES/blob/master/Krusty%20s%20Fun%20House%20(U)%20.nes" }, KungFu: { name: "Kung Fu", url: "https://github.com/dientu4nut/NES/blob/master/Kung%20Fu%20(U)%20.nes" }, KungFuHeroes: { name: "Kung-Fu Heroes", url: "https://github.com/dientu4nut/NES/blob/master/Kung-Fu%20Heroes%20(U)%20.nes" }, LEmpereur: { name: "L Empereur", url: "https://github.com/dientu4nut/NES/blob/master/L%20Empereur%20(U)%20.nes" }, LaserInvasion: { name: "Laser Invasion", url: "https://github.com/dientu4nut/NES/blob/master/Laser%20Invasion%20(U)%20.nes" }, LastActionHero: { name: "Last Action Hero", url: "https://github.com/dientu4nut/NES/blob/master/Last%20Action%20Hero%20(U)%20.nes" }, LastNinjaThe: { name: "Last Ninja The", url: "https://github.com/dientu4nut/NES/blob/master/Last%20Ninja%20The%20(U)%20.nes" }, LastStarfighterThe: { name: "Last Starfighter The", url: "https://github.com/dientu4nut/NES/blob/master/Last%20Starfighter%20The%20(U)%20.nes" }, LeeTrevinosFightingGolf: { name: "Lee Trevino s Fighting Golf", url: "https://github.com/dientu4nut/NES/blob/master/Lee%20Trevino%20s%20Fighting%20Golf%20(U)%20.nes" }, LegacyoftheWizard: { name: "Legacy of the Wizard", url: "https://github.com/dientu4nut/NES/blob/master/Legacy%20of%20the%20Wizard%20(U)%20.nes" }, LegendofKageThe: { name: "Legend of Kage The", url: "https://github.com/dientu4nut/NES/blob/master/Legend%20of%20Kage%20The%20(U)%20.nes" }, LegendofPrinceValiantThe: { name: "Legend of Prince Valiant The ", url: "https://github.com/dientu4nut/NES/blob/master/Legend%20of%20Prince%20Valiant%20The%20(E)%20.nes" }, LegendofZeldaTheGC: { name: "Legend of Zelda, The (GC)", url: "https://github.com/dientu4nut/NES/blob/master/Legend%20of%20Zelda%2C%20The%20(GC).nes" }, LegendoftheGhostLion: { name: "Legend of the Ghost Lion", url: "https://github.com/dientu4nut/NES/blob/master/Legend%20of%20the%20Ghost%20Lion%20(U)%20.nes" }, LegendaryWings: { name: "Legendary Wings", url: "https://github.com/dientu4nut/NES/blob/master/Legendary%20Wings%20(U)%20.nes" }, LegendsoftheDiamondTheBaseballChampionshipGame: { name: "Legends of the Diamond - The Baseball Championship Game", url: "https://github.com/dientu4nut/NES/blob/master/Legends%20of%20the%20Diamond%20-%20The%20Baseball%20Championship%20Game%20(U)%20.nes" }, Lemmings: { name: "Lemmings", url: "https://github.com/dientu4nut/NES/blob/master/Lemmings%20(U)%20.nes" }, LethalWeapon: { name: "Lethal Weapon", url: "https://github.com/dientu4nut/NES/blob/master/Lethal%20Weapon%20(U)%20.nes" }, LifeForce: { name: "Life Force", url: "https://github.com/dientu4nut/NES/blob/master/Life%20Force%20(U)%20.nes" }, LionKingThe: { name: "Lion King The ", url: "https://github.com/dientu4nut/NES/blob/master/Lion%20King%20The%20(E)%20.nes" }, LittleLeagueBaseballChampionshipSeries: { name: "Little League Baseball - Championship Series", url: "https://github.com/dientu4nut/NES/blob/master/Little%20League%20Baseball%20-%20Championship%20Series%20(U)%20.nes" }, LittleMermaidThe: { name: "Little Mermaid The", url: "https://github.com/dientu4nut/NES/blob/master/Little%20Mermaid%20The%20(U)%20.nes" }, LittleNemoTheDreamMaster: { name: "Little Nemo - The Dream Master", url: "https://github.com/dientu4nut/NES/blob/master/Little%20Nemo%20-%20The%20Dream%20Master%20(U)%20.nes" }, LittleNinjaBrothers: { name: "Little Ninja Brothers", url: "https://github.com/dientu4nut/NES/blob/master/Little%20Ninja%20Brothers%20(U)%20.nes" }, LittleSamson: { name: "Little Samson", url: "https://github.com/dientu4nut/NES/blob/master/Little%20Samson%20(U)%20.nes" }, LodeRunner: { name: "Lode Runner", url: "https://github.com/dientu4nut/NES/blob/master/Lode%20Runner%20(U)%20.nes" }, LoneRangerThe: { name: "Lone Ranger The", url: "https://github.com/dientu4nut/NES/blob/master/Lone%20Ranger%20The%20(U)%20.nes" }, Loopz: { name: "Loopz", url: "https://github.com/dientu4nut/NES/blob/master/Loopz%20(U)%20.nes" }, LowGManTheLowGravityMan: { name: "Low G Man - The Low Gravity Man", url: "https://github.com/dientu4nut/NES/blob/master/Low%20G%20Man%20-%20The%20Low%20Gravity%20Man%20(U)%20.nes" }, LunarPool: { name: "Lunar Pool", url: "https://github.com/dientu4nut/NES/blob/master/Lunar%20Pool%20(U)%20.nes" }, MCKids: { name: "M.C Kids", url: "https://github.com/dientu4nut/NES/blob/master/M.C%20Kids%20(U)%20.nes" }, MULE: { name: "M.U.L.E.", url: "https://github.com/dientu4nut/NES/blob/master/M.U.L.E.%20(U)%20.nes" }, MUSCLE: { name: "M.U.S.C.L.E.", url: "https://github.com/dientu4nut/NES/blob/master/M.U.S.C.L.E.%20(U)%20.nes" }, MadMax: { name: "Mad Max", url: "https://github.com/dientu4nut/NES/blob/master/Mad%20Max%20(U)%20.nes" }, MafatConspiracyGolgo13: { name: "Mafat Conspiracy - Golgo 13", url: "https://github.com/dientu4nut/NES/blob/master/Mafat%20Conspiracy%20-%20Golgo%2013%20(U)%20.nes" }, MagicDarts: { name: "Magic Darts", url: "https://github.com/dientu4nut/NES/blob/master/Magic%20Darts%20(U)%20.nes" }, MagicJohnsonsFastBreak: { name: "Magic Johnson s Fast Break", url: "https://github.com/dientu4nut/NES/blob/master/Magic%20Johnson%20s%20Fast%20Break%20(U)%20.nes" }, MagicofScheherazadeThe: { name: "Magic of Scheherazade The", url: "https://github.com/dientu4nut/NES/blob/master/Magic%20of%20Scheherazade%20The%20(U)%20.nes" }, Magician: { name: "Magician", url: "https://github.com/dientu4nut/NES/blob/master/Magician%20(U)%20.nes" }, Magmax: { name: "Magmax", url: "https://github.com/dientu4nut/NES/blob/master/Magmax%20(U)%20.nes" }, ManiacMansion: { name: "Maniac Mansion", url: "https://github.com/dientu4nut/NES/blob/master/Maniac%20Mansion%20(U)%20.nes" }, MappyLand: { name: "Mappy-Land", url: "https://github.com/dientu4nut/NES/blob/master/Mappy-Land%20(U)%20.nes" }, MarbleMadness: { name: "Marble Madness", url: "https://github.com/dientu4nut/NES/blob/master/Marble%20Madness%20(U)%20.nes" }, MarioYoshi: { name: "Mario & Yoshi [!]", url: "https://github.com/dientu4nut/NES/blob/master/Mario%20%26%20Yoshi%20(E)%20%5B!%5D.nes" }, MarioBros: { name: "Mario Bros. [!]", url: "https://github.com/dientu4nut/NES/blob/master/Mario%20Bros.%20(E)%20%5B!%5D.nes" }, MarioBrosClassic: { name: "Mario Bros. Classic [!]", url: "https://github.com/dientu4nut/NES/blob/master/Mario%20Bros.%20Classic%20(E)%20%5B!%5D.nes" }, MarioisMissing: { name: "Mario is Missing ", url: "https://github.com/dientu4nut/NES/blob/master/Mario%20is%20Missing%20%20(U)%20.nes" }, MariosTimeMachine: { name: "Mario s Time Machine ", url: "https://github.com/dientu4nut/NES/blob/master/Mario%20s%20Time%20Machine%20%20(U)%20.nes" }, MechanizedAttack: { name: "Mechanized Attack", url: "https://github.com/dientu4nut/NES/blob/master/Mechanized%20Attack%20(U)%20.nes" }, Megaman: { name: "Megaman", url: "https://github.com/dientu4nut/NES/blob/master/Megaman%20(U)%20.nes" }, MegamanII: { name: "Megaman II", url: "https://github.com/dientu4nut/NES/blob/master/Megaman%20II%20(U)%20.nes" }, MegamanIII: { name: "Megaman III", url: "https://github.com/dientu4nut/NES/blob/master/Megaman%20III%20(U)%20.nes" }, MegamanV: { name: "Megaman V", url: "https://github.com/dientu4nut/NES/blob/master/Megaman%20V%20(U)%20.nes" }, MegamanVI: { name: "Megaman VI", url: "https://github.com/dientu4nut/NES/blob/master/Megaman%20VI%20(U)%20.nes" }, MendelPalace: { name: "Mendel Palace", url: "https://github.com/dientu4nut/NES/blob/master/Mendel%20Palace%20(U)%20.nes" }, MetalGear: { name: "Metal Gear", url: "https://github.com/dientu4nut/NES/blob/master/Metal%20Gear%20(U)%20.nes" }, MetalMechManMachine: { name: "Metal Mech - Man & Machine", url: "https://github.com/dientu4nut/NES/blob/master/Metal%20Mech%20-%20Man%20%26%20Machine%20(U)%20.nes" }, MetalStorm: { name: "Metal Storm", url: "https://github.com/dientu4nut/NES/blob/master/Metal%20Storm%20(U)%20.nes" }, MichaelAndrettisWorldGrandPrix: { name: "Michael Andretti s World Grand Prix", url: "https://github.com/dientu4nut/NES/blob/master/Michael%20Andretti%20s%20World%20Grand%20Prix%20(U)%20.nes" }, MickeyMousecapade: { name: "Mickey Mousecapade", url: "https://github.com/dientu4nut/NES/blob/master/Mickey%20Mousecapade%20(U)%20.nes" }, MickeysAdventuresinNumberland: { name: "Mickey s Adventures in Numberland", url: "https://github.com/dientu4nut/NES/blob/master/Mickey%20s%20Adventures%20in%20Numberland%20(U)%20.nes" }, MickeysSafariinLetterland: { name: "Mickey s Safari in Letterland", url: "https://github.com/dientu4nut/NES/blob/master/Mickey%20s%20Safari%20in%20Letterland%20(U)%20.nes" }, MightandMagic: { name: "Might and Magic", url: "https://github.com/dientu4nut/NES/blob/master/Might%20and%20Magic%20(U)%20.nes" }, MightyBombJack: { name: "Mighty Bomb Jack", url: "https://github.com/dientu4nut/NES/blob/master/Mighty%20Bomb%20Jack%20(U)%20.nes" }, MightyFinalFight: { name: "Mighty Final Fight", url: "https://github.com/dientu4nut/NES/blob/master/Mighty%20Final%20Fight%20(U)%20.nes" }, Millipede: { name: "Millipede", url: "https://github.com/dientu4nut/NES/blob/master/Millipede%20(U)%20.nes" }, MilonsSecretCastle: { name: "Milon s Secret Castle", url: "https://github.com/dientu4nut/NES/blob/master/Milon%20s%20Secret%20Castle%20(U)%20.nes" }, MiraclePianoTeachingSystemThe: { name: "Miracle Piano Teaching System The", url: "https://github.com/dientu4nut/NES/blob/master/Miracle%20Piano%20Teaching%20System%20The%20(U)%20.nes" }, MissionImpossible: { name: "Mission - Impossible", url: "https://github.com/dientu4nut/NES/blob/master/Mission%20-%20Impossible%20(U)%20.nes" }, Monopoly: { name: "Monopoly", url: "https://github.com/dientu4nut/NES/blob/master/Monopoly%20(U)%20.nes" }, MonsterInMyPocket: { name: "Monster In My Pocket", url: "https://github.com/dientu4nut/NES/blob/master/Monster%20In%20My%20Pocket%20(U)%20.nes" }, MonsterParty: { name: "Monster Party", url: "https://github.com/dientu4nut/NES/blob/master/Monster%20Party%20(U)%20.nes" }, MonsterTruckRally: { name: "Monster Truck Rally", url: "https://github.com/dientu4nut/NES/blob/master/Monster%20Truck%20Rally%20(U)%20.nes" }, MotorCityPatrol: { name: "Motor City Patrol", url: "https://github.com/dientu4nut/NES/blob/master/Motor%20City%20Patrol%20(U)%20.nes" }, MrGimmick: { name: "Mr. Gimmick ", url: "https://github.com/dientu4nut/NES/blob/master/Mr.%20Gimmick%20(E)%20.nes" }, MsPacMan: { name: "Ms. Pac-Man", url: "https://github.com/dientu4nut/NES/blob/master/Ms.%20Pac-Man%20(U)%20.nes" }, MutantVirusThe: { name: "Mutant Virus The", url: "https://github.com/dientu4nut/NES/blob/master/Mutant%20Virus%20The%20(U)%20.nes" }, MysteryQuest: { name: "Mystery Quest", url: "https://github.com/dientu4nut/NES/blob/master/Mystery%20Quest%20(U)%20.nes" }, NARC: { name: "NARC", url: "https://github.com/dientu4nut/NES/blob/master/NARC%20(U)%20.nes" }, NESOpenTournamentGolf: { name: "NES Open Tournament Golf", url: "https://github.com/dientu4nut/NES/blob/master/NES%20Open%20Tournament%20Golf%20(U)%20.nes" }, NESPlayActionFootball: { name: "NES Play Action Football", url: "https://github.com/dientu4nut/NES/blob/master/NES%20Play%20Action%20Football%20(U)%20.nes" }, NFLFootball: { name: "NFL Football", url: "https://github.com/dientu4nut/NES/blob/master/NFL%20Football%20(U)%20.nes" }, NTF2SystemCartU: { name: "NTF2 System Cart (U)", url: "https://github.com/dientu4nut/NES/blob/master/NTF2%20System%20Cart%20(U).nes" }, NewGhostbustersII: { name: "New Ghostbusters II ", url: "https://github.com/dientu4nut/NES/blob/master/New%20Ghostbusters%20II%20(E)%20.nes" }, NigelMansellsWorldChampionshipChallenge: { name: "Nigel Mansell s World Championship Challenge", url: "https://github.com/dientu4nut/NES/blob/master/Nigel%20Mansell%20s%20World%20Championship%20Challenge%20(U)%20.nes" }, NightmareonElmStreetA: { name: "Nightmare on Elm Street A", url: "https://github.com/dientu4nut/NES/blob/master/Nightmare%20on%20Elm%20Street%20A%20(U)%20.nes" }, Nightshade: { name: "Nightshade", url: "https://github.com/dientu4nut/NES/blob/master/Nightshade%20(U)%20.nes" }, NinjaCrusaders: { name: "Ninja Crusaders", url: "https://github.com/dientu4nut/NES/blob/master/Ninja%20Crusaders%20(U)%20.nes" }, NinjaGaiden: { name: "Ninja Gaiden", url: "https://github.com/dientu4nut/NES/blob/master/Ninja%20Gaiden%20(U)%20.nes" }, NinjaGaidenIITheDarkSwordofChaos: { name: "Ninja Gaiden II - The Dark Sword of Chaos", url: "https://github.com/dientu4nut/NES/blob/master/Ninja%20Gaiden%20II%20-%20The%20Dark%20Sword%20of%20Chaos%20(U)%20.nes" }, NinjaGaidenIIITheAncientShipofDoom: { name: "Ninja Gaiden III - The Ancient Ship of Doom", url: "https://github.com/dientu4nut/NES/blob/master/Ninja%20Gaiden%20III%20-%20The%20Ancient%20Ship%20of%20Doom%20(U)%20.nes" }, NinjaKid: { name: "Ninja Kid", url: "https://github.com/dientu4nut/NES/blob/master/Ninja%20Kid%20(U)%20.nes" }, NintendoWorldChampionships1990: { name: "Nintendo World Championships 1990", url: "https://github.com/dientu4nut/NES/blob/master/Nintendo%20World%20Championships%201990%20(U)%20.nes" }, NintendoWorldCup: { name: "Nintendo World Cup", url: "https://github.com/dientu4nut/NES/blob/master/Nintendo%20World%20Cup%20(U)%20.nes" }, NoahsArk: { name: "Noah s Ark ", url: "https://github.com/dientu4nut/NES/blob/master/Noah%20s%20Ark%20(E)%20.nes" }, NobunagasAmbition: { name: "Nobunaga s Ambition", url: "https://github.com/dientu4nut/NES/blob/master/Nobunaga%20s%20Ambition%20(U)%20.nes" }, NobunagasAmbition2: { name: "Nobunaga s Ambition 2", url: "https://github.com/dientu4nut/NES/blob/master/Nobunaga%20s%20Ambition%202%20(U)%20.nes" }, NorthSouth: { name: "North & South", url: "https://github.com/dientu4nut/NES/blob/master/North%20%26%20South%20(U)%20.nes" }, OperationWolf: { name: "Operation Wolf", url: "https://github.com/dientu4nut/NES/blob/master/Operation%20Wolf%20(U)%20.nes" }, Orb3D: { name: "Orb 3D", url: "https://github.com/dientu4nut/NES/blob/master/Orb%203D%20(U)%20.nes" }, Othello: { name: "Othello", url: "https://github.com/dientu4nut/NES/blob/master/Othello%20(U)%20.nes" }, OverHorizon: { name: "Over Horizon ", url: "https://github.com/dientu4nut/NES/blob/master/Over%20Horizon%20(E)%20.nes" }, Overlord: { name: "Overlord", url: "https://github.com/dientu4nut/NES/blob/master/Overlord%20(U)%20.nes" }, POWPrisonersofWar: { name: "P.O.W. - Prisoners of War", url: "https://github.com/dientu4nut/NES/blob/master/P.O.W.%20-%20Prisoners%20of%20War%20(U)%20.nes" }, PacManNamco: { name: "Pac-Man(Namco) ", url: "https://github.com/dientu4nut/NES/blob/master/Pac-Man%20(U)%20(Namco)%20.nes" }, PacManTengen: { name: "Pac-Man(Tengen) ", url: "https://github.com/dientu4nut/NES/blob/master/Pac-Man%20(U)%20(Tengen)%20.nes" }, Palamedes: { name: "Palamedes", url: "https://github.com/dientu4nut/NES/blob/master/Palamedes%20(U)%20.nes" }, PanicRestaurant: { name: "Panic Restaurant", url: "https://github.com/dientu4nut/NES/blob/master/Panic%20Restaurant%20(U)%20.nes" }, Paperboy: { name: "Paperboy", url: "https://github.com/dientu4nut/NES/blob/master/Paperboy%20(U)%20.nes" }, Paperboy2: { name: "Paperboy 2", url: "https://github.com/dientu4nut/NES/blob/master/Paperboy%202%20(U)%20.nes" }, ParasolStarsTheStoryofBubbleBobble3: { name: "Parasol Stars - The Story of Bubble Bobble 3 ", url: "https://github.com/dientu4nut/NES/blob/master/Parasol%20Stars%20-%20The%20Story%20of%20Bubble%20Bobble%203%20(E)%20.nes" }, Parodius: { name: "Parodius ", url: "https://github.com/dientu4nut/NES/blob/master/Parodius%20(E)%20.nes" }, PerfectFit: { name: "Perfect Fit", url: "https://github.com/dientu4nut/NES/blob/master/Perfect%20Fit%20(U)%20.nes" }, PeterPanThePirates: { name: "Peter Pan & The Pirates", url: "https://github.com/dientu4nut/NES/blob/master/Peter%20Pan%20%26%20The%20Pirates%20(U)%20.nes" }, PhantomFighter: { name: "Phantom Fighter", url: "https://github.com/dientu4nut/NES/blob/master/Phantom%20Fighter%20(U)%20.nes" }, Pictionary: { name: "Pictionary", url: "https://github.com/dientu4nut/NES/blob/master/Pictionary%20(U)%20.nes" }, PinBot: { name: "Pin Bot", url: "https://github.com/dientu4nut/NES/blob/master/Pin%20Bot%20(U)%20.nes" }, PinballQuest: { name: "Pinball Quest", url: "https://github.com/dientu4nut/NES/blob/master/Pinball%20Quest%20(U)%20.nes" }, PipeDream: { name: "Pipe Dream", url: "https://github.com/dientu4nut/NES/blob/master/Pipe%20Dream%20(U)%20.nes" }, Pirates: { name: "Pirates ", url: "https://github.com/dientu4nut/NES/blob/master/Pirates%20%20(U)%20.nes" }, PowerBlade: { name: "Power Blade", url: "https://github.com/dientu4nut/NES/blob/master/Power%20Blade%20(U)%20.nes" }, PowerBlade2: { name: "Power Blade 2", url: "https://github.com/dientu4nut/NES/blob/master/Power%20Blade%202%20(U)%20.nes" }, PowerPunch2: { name: "Power Punch 2", url: "https://github.com/dientu4nut/NES/blob/master/Power%20Punch%202%20(U)%20.nes" }, Predator: { name: "Predator", url: "https://github.com/dientu4nut/NES/blob/master/Predator%20(U)%20.nes" }, PrinceofPersia: { name: "Prince of Persia", url: "https://github.com/dientu4nut/NES/blob/master/Prince%20of%20Persia%20(U)%20.nes" }, PrincessTomatoinSaladKingdom: { name: "Princess Tomato in Salad Kingdom", url: "https://github.com/dientu4nut/NES/blob/master/Princess%20Tomato%20in%20Salad%20Kingdom%20(U)%20.nes" }, ProSportHockey: { name: "Pro Sport Hockey", url: "https://github.com/dientu4nut/NES/blob/master/Pro%20Sport%20Hockey%20(U)%20.nes" }, PunchOut: { name: "Punch-Out ", url: "https://github.com/dientu4nut/NES/blob/master/Punch-Out%20%20%20(U)%20.nes" }, PunisherThe: { name: "Punisher The", url: "https://github.com/dientu4nut/NES/blob/master/Punisher%20The%20(U)%20.nes" }, PussnBootsPerosGreatAdventure: { name: "Puss n Boots - Pero s Great Adventure", url: "https://github.com/dientu4nut/NES/blob/master/Puss%20%20n%20Boots%20-%20Pero%20s%20Great%20Adventure%20(U)%20.nes" }, Puzznic: { name: "Puzznic", url: "https://github.com/dientu4nut/NES/blob/master/Puzznic%20(U)%20.nes" }, Qbert: { name: "Q-bert", url: "https://github.com/dientu4nut/NES/blob/master/Q-bert%20(U)%20.nes" }, Qix: { name: "Qix", url: "https://github.com/dientu4nut/NES/blob/master/Qix%20(U)%20.nes" }, RBIBaseball: { name: "R.B.I. Baseball", url: "https://github.com/dientu4nut/NES/blob/master/R.B.I.%20Baseball%20(U)%20.nes" }, RCProAmII: { name: "R.C. Pro-Am II", url: "https://github.com/dientu4nut/NES/blob/master/R.C.%20Pro-Am%20II%20(U)%20.nes" }, READMEmd: { name: "README.md", url: "https://github.com/dientu4nut/NES/blob/master/README.md" }, RaceAmerica: { name: "Race America", url: "https://github.com/dientu4nut/NES/blob/master/Race%20America%20(U)%20.nes" }, RacermateChallengerIIV602002U: { name: "Racermate Challenger II V6.02.002 (U)", url: "https://github.com/dientu4nut/NES/blob/master/Racermate%20Challenger%20II%20V6.02.002%20(U).nes" }, RacketAttack: { name: "Racket Attack", url: "https://github.com/dientu4nut/NES/blob/master/Racket%20Attack%20(U)%20.nes" }, RacketsRivals: { name: "Rackets & Rivals ", url: "https://github.com/dientu4nut/NES/blob/master/Rackets%20%26%20Rivals%20(E)%20.nes" }, RadRacer: { name: "Rad Racer", url: "https://github.com/dientu4nut/NES/blob/master/Rad%20Racer%20(U)%20.nes" }, RadRacer2: { name: "Rad Racer 2", url: "https://github.com/dientu4nut/NES/blob/master/Rad%20Racer%202%20(U)%20.nes" }, RaidonBungelingBay: { name: "Raid on Bungeling Bay", url: "https://github.com/dientu4nut/NES/blob/master/Raid%20on%20Bungeling%20Bay%20(U)%20.nes" }, RainbowIslandsTheStoryofBubbleBobble2: { name: "Rainbow Islands - The Story of Bubble Bobble 2", url: "https://github.com/dientu4nut/NES/blob/master/Rainbow%20Islands%20-%20The%20Story%20of%20Bubble%20Bobble%202%20(U)%20.nes" }, RallyBike: { name: "Rally Bike", url: "https://github.com/dientu4nut/NES/blob/master/Rally%20Bike%20(U)%20.nes" }, Rampage: { name: "Rampage", url: "https://github.com/dientu4nut/NES/blob/master/Rampage%20(U)%20.nes" }, Rampart: { name: "Rampart", url: "https://github.com/dientu4nut/NES/blob/master/Rampart%20(U)%20.nes" }, RemoteControl: { name: "Remote Control", url: "https://github.com/dientu4nut/NES/blob/master/Remote%20Control%20(U)%20.nes" }, RenStimpyShowThe: { name: "Ren & Stimpy Show The", url: "https://github.com/dientu4nut/NES/blob/master/Ren%20%26%20Stimpy%20Show%20The%20(U)%20.nes" }, Renegade: { name: "Renegade", url: "https://github.com/dientu4nut/NES/blob/master/Renegade%20(U)%20.nes" }, RescueTheEmbassyMission: { name: "Rescue - The Embassy Mission", url: "https://github.com/dientu4nut/NES/blob/master/Rescue%20-%20The%20Embassy%20Mission%20(U)%20.nes" }, RingKing: { name: "Ring King", url: "https://github.com/dientu4nut/NES/blob/master/Ring%20King%20(U)%20.nes" }, RiverCityRansom: { name: "River City Ransom", url: "https://github.com/dientu4nut/NES/blob/master/River%20City%20Ransom%20(U)%20.nes" }, RoadFighter: { name: "Road Fighter ", url: "https://github.com/dientu4nut/NES/blob/master/Road%20Fighter%20(E)%20.nes" }, RoadBlasters: { name: "RoadBlasters", url: "https://github.com/dientu4nut/NES/blob/master/RoadBlasters%20(U)%20.nes" }, RoboWarrior: { name: "Robo Warrior", url: "https://github.com/dientu4nut/NES/blob/master/Robo%20Warrior%20(U)%20.nes" }, RoboCop: { name: "RoboCop", url: "https://github.com/dientu4nut/NES/blob/master/RoboCop%20(U)%20.nes" }, RoboCop3: { name: "RoboCop 3", url: "https://github.com/dientu4nut/NES/blob/master/RoboCop%203%20(U)%20.nes" }, RocknBall: { name: "Rock n Ball", url: "https://github.com/dientu4nut/NES/blob/master/Rock%20%20n%20%20Ball%20(U)%20.nes" }, RocketRanger: { name: "Rocket Ranger", url: "https://github.com/dientu4nut/NES/blob/master/Rocket%20Ranger%20(U)%20.nes" }, RocketeerThe: { name: "Rocketeer The", url: "https://github.com/dientu4nut/NES/blob/master/Rocketeer%20The%20(U)%20.nes" }, RockinKats: { name: "Rockin Kats", url: "https://github.com/dientu4nut/NES/blob/master/Rockin%20%20Kats%20(U)%20.nes" }, RodLand: { name: "Rod Land ", url: "https://github.com/dientu4nut/NES/blob/master/Rod%20Land%20(E)%20.nes" }, RogerClemensMVPBaseball: { name: "Roger Clemens MVP Baseball", url: "https://github.com/dientu4nut/NES/blob/master/Roger%20Clemens%20%20MVP%20Baseball%20(U)%20.nes" }, Rollerball: { name: "Rollerball", url: "https://github.com/dientu4nut/NES/blob/master/Rollerball%20(U)%20.nes" }, RollerbladeRacer: { name: "Rollerblade Racer", url: "https://github.com/dientu4nut/NES/blob/master/Rollerblade%20Racer%20(U)%20.nes" }, Rollergames: { name: "Rollergames", url: "https://github.com/dientu4nut/NES/blob/master/Rollergames%20(U)%20.nes" }, RomanceofTheThreeKingdoms: { name: "Romance of The Three Kingdoms", url: "https://github.com/dientu4nut/NES/blob/master/Romance%20of%20The%20Three%20Kingdoms%20(U)%20.nes" }, RomanceofTheThreeKingdomsII: { name: "Romance of The Three Kingdoms II", url: "https://github.com/dientu4nut/NES/blob/master/Romance%20of%20The%20Three%20Kingdoms%20II%20(U)%20.nes" }, Roundball2on2Challenge: { name: "Roundball - 2-on-2 Challenge", url: "https://github.com/dientu4nut/NES/blob/master/Roundball%20-%202-on-2%20Challenge%20(U)%20.nes" }, SamuraiSpiritsRexSoftFullversionU: { name: "Samurai Spirits (Rex Soft) (Full version) [U]", url: "https://github.com/dientu4nut/NES/blob/master/Samurai%20Spirits%20(Rex%20Soft)%20(Full%20version)%20%5BU%5D.nes" }, ScarabeusSample: { name: "Scarabeus(Sample)", url: "https://github.com/dientu4nut/NES/blob/master/Scarabeus%20(U)%20(Sample).nes" }, SectionZ: { name: "Section Z", url: "https://github.com/dientu4nut/NES/blob/master/Section%20Z%20(U)%20.nes" }, Seicross: { name: "Seicross", url: "https://github.com/dientu4nut/NES/blob/master/Seicross%20(U)%20.nes" }, SesameStreet123: { name: "Sesame Street 123", url: "https://github.com/dientu4nut/NES/blob/master/Sesame%20Street%20123%20(U)%20.nes" }, SesameStreet123ABC: { name: "Sesame Street 123 - ABC", url: "https://github.com/dientu4nut/NES/blob/master/Sesame%20Street%20123%20-%20ABC%20(U)%20.nes" }, SesameStreetABC: { name: "Sesame Street ABC", url: "https://github.com/dientu4nut/NES/blob/master/Sesame%20Street%20ABC%20(U)%20.nes" }, SesameStreetCountdown: { name: "Sesame Street Countdown", url: "https://github.com/dientu4nut/NES/blob/master/Sesame%20Street%20Countdown%20(U)%20.nes" }, ShadowoftheNinja: { name: "Shadow of the Ninja", url: "https://github.com/dientu4nut/NES/blob/master/Shadow%20of%20the%20Ninja%20(U)%20.nes" }, Shadowgate: { name: "Shadowgate", url: "https://github.com/dientu4nut/NES/blob/master/Shadowgate%20(U)%20.nes" }, Shatterhand: { name: "Shatterhand", url: "https://github.com/dientu4nut/NES/blob/master/Shatterhand%20(U)%20.nes" }, ShingenTheRuler: { name: "Shingen The Ruler", url: "https://github.com/dientu4nut/NES/blob/master/Shingen%20The%20Ruler%20(U)%20.nes" }, ShootingRange: { name: "Shooting Range", url: "https://github.com/dientu4nut/NES/blob/master/Shooting%20Range%20(U)%20.nes" }, ShortOrderEggsplode: { name: "Short Order - Eggsplode", url: "https://github.com/dientu4nut/NES/blob/master/Short%20Order%20-%20Eggsplode%20(U)%20.nes" }, SidePocket: { name: "Side Pocket", url: "https://github.com/dientu4nut/NES/blob/master/Side%20Pocket%20(U)%20.nes" }, Silkworm: { name: "Silkworm", url: "https://github.com/dientu4nut/NES/blob/master/Silkworm%20(U)%20.nes" }, SilverSurfer: { name: "Silver Surfer", url: "https://github.com/dientu4nut/NES/blob/master/Silver%20Surfer%20(U)%20.nes" }, SimpsonsBartvstheSpaceMutants: { name: "Simpsons - Bart vs. the Space Mutants", url: "https://github.com/dientu4nut/NES/blob/master/Simpsons%20-%20Bart%20vs.%20the%20Space%20Mutants.nes" }, SimpsonsTheBartVstheWorld: { name: "Simpsons The - Bart Vs. the World", url: "https://github.com/dientu4nut/NES/blob/master/Simpsons%20The%20-%20Bart%20Vs.%20the%20World%20(U)%20.nes" }, SimpsonsTheBartmanMeetsRadioactiveMan: { name: "Simpsons The - Bartman Meets Radioactive Man", url: "https://github.com/dientu4nut/NES/blob/master/Simpsons%20The%20-%20Bartman%20Meets%20Radioactive%20Man%20(U)%20.nes" }, SkateorDie: { name: "Skate or Die ", url: "https://github.com/dientu4nut/NES/blob/master/Skate%20or%20Die%20%20(U)%20.nes" }, SkateorDie2TheSearchforDoubleTrouble: { name: "Skate or Die 2 - The Search for Double Trouble", url: "https://github.com/dientu4nut/NES/blob/master/Skate%20or%20Die%202%20-%20The%20Search%20for%20Double%20Trouble%20(U)%20.nes" }, SkiorDie: { name: "Ski or Die", url: "https://github.com/dientu4nut/NES/blob/master/Ski%20or%20Die%20(U)%20.nes" }, SkyKid: { name: "Sky Kid", url: "https://github.com/dientu4nut/NES/blob/master/Sky%20Kid%20(U)%20.nes" }, SkyShark: { name: "Sky Shark", url: "https://github.com/dientu4nut/NES/blob/master/Sky%20Shark%20(U)%20.nes" }, Slalom: { name: "Slalom", url: "https://github.com/dientu4nut/NES/blob/master/Slalom%20(U)%20.nes" }, SmashTV: { name: "Smash T.V.", url: "https://github.com/dientu4nut/NES/blob/master/Smash%20T.V.%20(U)%20.nes" }, SnakeRattleNRoll: { name: "Snake Rattle N Roll", url: "https://github.com/dientu4nut/NES/blob/master/Snake%20Rattle%20N%20Roll%20(U)%20.nes" }, SnakesRevenge: { name: "Snake s Revenge", url: "https://github.com/dientu4nut/NES/blob/master/Snake%20s%20Revenge%20(U)%20.nes" }, SnoopysSillySportsSpectacular: { name: "Snoopy s Silly Sports Spectacular", url: "https://github.com/dientu4nut/NES/blob/master/Snoopy%20s%20Silly%20Sports%20Spectacular%20(U)%20.nes" }, SnowBrothers: { name: "Snow Brothers", url: "https://github.com/dientu4nut/NES/blob/master/Snow%20Brothers%20(U)%20.nes" }, SolarJetmanHuntfortheGoldenWarpship: { name: "Solar Jetman - Hunt for the Golden Warpship", url: "https://github.com/dientu4nut/NES/blob/master/Solar%20Jetman%20-%20Hunt%20for%20the%20Golden%20Warpship%20(U)%20.nes" }, SolomonsKey: { name: "Solomon s Key", url: "https://github.com/dientu4nut/NES/blob/master/Solomon%20s%20Key%20(U)%20.nes" }, SolsticeTheQuestfortheStaffofDemnos: { name: "Solstice - The Quest for the Staff of Demnos", url: "https://github.com/dientu4nut/NES/blob/master/Solstice%20-%20The%20Quest%20for%20the%20Staff%20of%20Demnos%20(U)%20.nes" }, SpaceShuttleProject: { name: "Space Shuttle Project", url: "https://github.com/dientu4nut/NES/blob/master/Space%20Shuttle%20Project%20(U)%20.nes" }, Spelunker: { name: "Spelunker", url: "https://github.com/dientu4nut/NES/blob/master/Spelunker%20(U)%20.nes" }, SpiderManReturnoftheSinisterSix: { name: "Spider-Man - Return of the Sinister Six", url: "https://github.com/dientu4nut/NES/blob/master/Spider-Man%20-%20Return%20of%20the%20Sinister%20Six%20(U)%20.nes" }, Spot: { name: "Spot", url: "https://github.com/dientu4nut/NES/blob/master/Spot%20(U)%20.nes" }, SpyHunter: { name: "Spy Hunter", url: "https://github.com/dientu4nut/NES/blob/master/Spy%20Hunter%20(U)%20.nes" }, SpyVsSpy: { name: "Spy Vs Spy", url: "https://github.com/dientu4nut/NES/blob/master/Spy%20Vs%20Spy%20(U)%20.nes" }, Sqoon: { name: "Sqoon", url: "https://github.com/dientu4nut/NES/blob/master/Sqoon%20(U)%20.nes" }, StadiumEvents: { name: "Stadium Events", url: "https://github.com/dientu4nut/NES/blob/master/Stadium%20Events%20(U)%20.nes" }, StanleyTheSearchforDrLivingston: { name: "Stanley - The Search for Dr. Livingston", url: "https://github.com/dientu4nut/NES/blob/master/Stanley%20-%20The%20Search%20for%20Dr.%20Livingston%20(U)%20.nes" }, StarForce: { name: "Star Force", url: "https://github.com/dientu4nut/NES/blob/master/Star%20Force%20(U)%20.nes" }, StarSoldier: { name: "Star Soldier", url: "https://github.com/dientu4nut/NES/blob/master/Star%20Soldier%20(U)%20.nes" }, StarTrek25thAnniversary: { name: "Star Trek - 25th Anniversary", url: "https://github.com/dientu4nut/NES/blob/master/Star%20Trek%20-%2025th%20Anniversary%20(U)%20.nes" }, StarTrekTheNextGeneration: { name: "Star Trek - The Next Generation", url: "https://github.com/dientu4nut/NES/blob/master/Star%20Trek%20-%20The%20Next%20Generation%20(U)%20.nes" }, StarVoyager: { name: "Star Voyager", url: "https://github.com/dientu4nut/NES/blob/master/Star%20Voyager%20(U)%20.nes" }, StarWars: { name: "Star Wars", url: "https://github.com/dientu4nut/NES/blob/master/Star%20Wars%20(U)%20.nes" }, StarWarsTheEmpireStrikesBack: { name: "Star Wars - The Empire Strikes Back", url: "https://github.com/dientu4nut/NES/blob/master/Star%20Wars%20-%20The%20Empire%20Strikes%20Back%20(U)%20.nes" }, StarshipHector: { name: "Starship Hector", url: "https://github.com/dientu4nut/NES/blob/master/Starship%20Hector%20(U)%20.nes" }, Startropics: { name: "Startropics", url: "https://github.com/dientu4nut/NES/blob/master/Startropics%20(U)%20.nes" }, StealthATF: { name: "Stealth ATF", url: "https://github.com/dientu4nut/NES/blob/master/Stealth%20ATF%20(U)%20.nes" }, Stinger: { name: "Stinger", url: "https://github.com/dientu4nut/NES/blob/master/Stinger%20(U)%20.nes" }, StreetCop: { name: "Street Cop", url: "https://github.com/dientu4nut/NES/blob/master/Street%20Cop%20(U)%20.nes" }, StreetFighter2010TheFinalFight: { name: "Street Fighter 2010 - The Final Fight", url: "https://github.com/dientu4nut/NES/blob/master/Street%20Fighter%202010%20-%20The%20Final%20Fight%20(U)%20.nes" }, Strider: { name: "Strider", url: "https://github.com/dientu4nut/NES/blob/master/Strider%20(U)%20.nes" }, SummerCarnival92ReccaU: { name: "Summer Carnival 92 - Recca (U)", url: "https://github.com/dientu4nut/NES/blob/master/Summer%20Carnival%20%2092%20-%20Recca%20(U).nes" }, SuperC: { name: "Super C", url: "https://github.com/dientu4nut/NES/blob/master/Super%20C%20(U)%20.nes" }, SuperCars: { name: "Super Cars", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Cars%20(U)%20.nes" }, SuperDodgeBall: { name: "Super Dodge Ball", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Dodge%20Ball%20(U)%20.nes" }, SuperGloveBall: { name: "Super Glove Ball", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Glove%20Ball%20(U)%20.nes" }, SuperJeopardy: { name: "Super Jeopardy ", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Jeopardy%20%20(U)%20.nes" }, SuperMarioBrosDuckHunt: { name: "Super Mario Bros. + Duck Hunt", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Mario%20Bros.%20%2B%20Duck%20Hunt%20(U)%20.nes" }, SuperMarioBros2: { name: "Super Mario Bros. 2 [!]", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Mario%20Bros.%202%20(E)%20%5B!%5D.nes" }, SuperMarioBros3: { name: "Super Mario Bros. 3 [!]", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Mario%20Bros.%203%20(E)%20%5B!%5D.nes" }, SuperPitfall: { name: "Super Pitfall", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Pitfall%20(U)%20.nes" }, SuperSpikeVBall: { name: "Super Spike V Ball", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Spike%20V%20Ball%20(U)%20.nes" }, SuperSpikeVBallNintendoWorldCup: { name: "Super Spike V Ball + Nintendo World Cup", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Spike%20V%20Ball%20%2B%20Nintendo%20World%20Cup%20(U)%20.nes" }, SuperSpyHunter: { name: "Super Spy Hunter", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Spy%20Hunter%20(U)%20.nes" }, SuperTeamGames: { name: "Super Team Games", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Team%20Games%20(U)%20.nes" }, SuperTurrican: { name: "Super Turrican ", url: "https://github.com/dientu4nut/NES/blob/master/Super%20Turrican%20(E)%20.nes" }, Superman: { name: "Superman", url: "https://github.com/dientu4nut/NES/blob/master/Superman%20(U)%20.nes" }, SwampThing: { name: "Swamp Thing", url: "https://github.com/dientu4nut/NES/blob/master/Swamp%20Thing%20(U)%20.nes" }, SwordMaster: { name: "Sword Master", url: "https://github.com/dientu4nut/NES/blob/master/Sword%20Master%20(U)%20.nes" }, SwordsandSerpents: { name: "Swords and Serpents", url: "https://github.com/dientu4nut/NES/blob/master/Swords%20and%20Serpents%20(U)%20.nes" }, TagTeamWrestling: { name: "Tag Team Wrestling", url: "https://github.com/dientu4nut/NES/blob/master/Tag%20Team%20Wrestling%20(U)%20.nes" }, TaleSpin: { name: "TaleSpin", url: "https://github.com/dientu4nut/NES/blob/master/TaleSpin%20(U)%20.nes" }, TargetRenegade: { name: "Target - Renegade", url: "https://github.com/dientu4nut/NES/blob/master/Target%20-%20Renegade%20(U)%20.nes" }, TecmoBaseball: { name: "Tecmo Baseball", url: "https://github.com/dientu4nut/NES/blob/master/Tecmo%20Baseball%20(U)%20.nes" }, TecmoCupSoccerGame: { name: "Tecmo Cup - Soccer Game", url: "https://github.com/dientu4nut/NES/blob/master/Tecmo%20Cup%20-%20Soccer%20Game%20(U)%20.nes" }, TecmoSuperBowl: { name: "Tecmo Super Bowl", url: "https://github.com/dientu4nut/NES/blob/master/Tecmo%20Super%20Bowl%20(U)%20.nes" }, TecmoWorldWrestling: { name: "Tecmo World Wrestling", url: "https://github.com/dientu4nut/NES/blob/master/Tecmo%20World%20Wrestling%20(U)%20.nes" }, TeenageMutantNinjaTurtles: { name: "Teenage Mutant Ninja Turtles", url: "https://github.com/dientu4nut/NES/blob/master/Teenage%20Mutant%20Ninja%20Turtles%20(U)%20.nes" }, TeenageMutantNinjaTurtlesTournamentFighters: { name: "Teenage Mutant Ninja Turtles - Tournament Fighters", url: "https://github.com/dientu4nut/NES/blob/master/Teenage%20Mutant%20Ninja%20Turtles%20-%20Tournament%20Fighters%20(U)%20.nes" }, TeenageMutantNinjaTurtlesIITheArcadeGame: { name: "Teenage Mutant Ninja Turtles II - The Arcade Game", url: "https://github.com/dientu4nut/NES/blob/master/Teenage%20Mutant%20Ninja%20Turtles%20II%20-%20The%20Arcade%20Game%20(U)%20.nes" }, TeenageMutantNinjaTurtlesIIITheManhattanProject: { name: "Teenage Mutant Ninja Turtles III - The Manhattan Project", url: "https://github.com/dientu4nut/NES/blob/master/Teenage%20Mutant%20Ninja%20Turtles%20III%20-%20The%20Manhattan%20Project%20(U)%20.nes" }, Terminator2JudgmentDay: { name: "Terminator 2 - Judgment Day", url: "https://github.com/dientu4nut/NES/blob/master/Terminator%202%20-%20Judgment%20Day%20(U)%20.nes" }, TerminatorThe: { name: "Terminator The", url: "https://github.com/dientu4nut/NES/blob/master/Terminator%20The%20(U)%20.nes" }, TerraCresta: { name: "Terra Cresta", url: "https://github.com/dientu4nut/NES/blob/master/Terra%20Cresta%20(U)%20.nes" }, Tetris: { name: "Tetris", url: "https://github.com/dientu4nut/NES/blob/master/Tetris%20(U)%20.nes" }, Tetris2: { name: "Tetris 2", url: "https://github.com/dientu4nut/NES/blob/master/Tetris%202%20(U)%20.nes" }, TetrisFamily12in1GS2013U: { name: "Tetris Family 12-in-1 (GS-2013) [U]", url: "https://github.com/dientu4nut/NES/blob/master/Tetris%20Family%2012-in-1%20(GS-2013)%20%5BU%5D.nes" }, TetrisFamily6in1GS2004U: { name: "Tetris Family 6-in-1 (GS-2004) [U]", url: "https://github.com/dientu4nut/NES/blob/master/Tetris%20Family%206-in-1%20(GS-2004)%20%5BU%5D.nes" }, ThreeStooges: { name: "Three Stooges", url: "https://github.com/dientu4nut/NES/blob/master/Three%20Stooges%20(U)%20.nes" }, ThunderLightning: { name: "Thunder & Lightning", url: "https://github.com/dientu4nut/NES/blob/master/Thunder%20%26%20Lightning%20(U)%20.nes" }, Thunderbirds: { name: "Thunderbirds", url: "https://github.com/dientu4nut/NES/blob/master/Thunderbirds%20(U)%20.nes" }, Thundercade: { name: "Thundercade", url: "https://github.com/dientu4nut/NES/blob/master/Thundercade%20(U)%20.nes" }, TigerHeli: { name: "Tiger-Heli", url: "https://github.com/dientu4nut/NES/blob/master/Tiger-Heli%20(U)%20.nes" }, TimeLord: { name: "Time Lord", url: "https://github.com/dientu4nut/NES/blob/master/Time%20Lord%20(U)%20.nes" }, TimesofLore: { name: "Times of Lore", url: "https://github.com/dientu4nut/NES/blob/master/Times%20of%20Lore%20(U)%20.nes" }, TinyToonAdventures: { name: "Tiny Toon Adventures", url: "https://github.com/dientu4nut/NES/blob/master/Tiny%20Toon%20Adventures%20(U)%20.nes" }, TinyToonAdventures2TroubleinWackyland: { name: "Tiny Toon Adventures 2 - Trouble in Wackyland", url: "https://github.com/dientu4nut/NES/blob/master/Tiny%20Toon%20Adventures%202%20-%20Trouble%20in%20Wackyland%20(U)%20.nes" }, TinyToonAdventuresCartoonWorkshop: { name: "Tiny Toon Adventures Cartoon Workshop", url: "https://github.com/dientu4nut/NES/blob/master/Tiny%20Toon%20Adventures%20Cartoon%20Workshop%20(U)%20.nes" }, ToTheEarth: { name: "To The Earth", url: "https://github.com/dientu4nut/NES/blob/master/To%20The%20Earth%20(U)%20.nes" }, Toki: { name: "Toki", url: "https://github.com/dientu4nut/NES/blob/master/Toki%20(U)%20.nes" }, TomJerry: { name: "Tom & Jerry", url: "https://github.com/dientu4nut/NES/blob/master/Tom%20%26%20Jerry%20(U)%20.nes" }, TombsTreasure: { name: "Tombs & Treasure", url: "https://github.com/dientu4nut/NES/blob/master/Tombs%20%26%20Treasure%20(U)%20.nes" }, TopGunTheSecondMission: { name: "Top Gun - The Second Mission", url: "https://github.com/dientu4nut/NES/blob/master/Top%20Gun%20-%20The%20Second%20Mission%20(U)%20.nes" }, TopPlayersTennisFeaturingChrisEvertIvanLendl: { name: "Top Players Tennis - Featuring Chris Evert & Ivan Lendl", url: "https://github.com/dientu4nut/NES/blob/master/Top%20Players%20%20Tennis%20-%20Featuring%20Chris%20Evert%20%26%20Ivan%20Lendl%20(U)%20.nes" }, TotalRecall: { name: "Total Recall", url: "https://github.com/dientu4nut/NES/blob/master/Total%20Recall%20(U)%20.nes" }, TotallyRad: { name: "Totally Rad", url: "https://github.com/dientu4nut/NES/blob/master/Totally%20Rad%20(U)%20.nes" }, TouchDownFever: { name: "Touch Down Fever", url: "https://github.com/dientu4nut/NES/blob/master/Touch%20Down%20Fever%20(U)%20.nes" }, ToxicCrusaders: { name: "Toxic Crusaders", url: "https://github.com/dientu4nut/NES/blob/master/Toxic%20Crusaders%20(U)%20.nes" }, TrackField: { name: "Track & Field", url: "https://github.com/dientu4nut/NES/blob/master/Track%20%26%20Field%20(U)%20.nes" }, TreasureMaster: { name: "Treasure Master", url: "https://github.com/dientu4nut/NES/blob/master/Treasure%20Master%20(U)%20.nes" }, Trog: { name: "Trog", url: "https://github.com/dientu4nut/NES/blob/master/Trog%20(U)%20.nes" }, Trojan: { name: "Trojan", url: "https://github.com/dientu4nut/NES/blob/master/Trojan%20(U)%20.nes" }, TrollsinCrazylandThe: { name: "Trolls in Crazyland The", url: "https://github.com/dientu4nut/NES/blob/master/Trolls%20in%20Crazyland%20The%20(E).nes" }, TwinCobra: { name: "Twin Cobra", url: "https://github.com/dientu4nut/NES/blob/master/Twin%20Cobra%20(U)%20.nes" }, TwinEagleRevengeJoesBrother: { name: "Twin Eagle - Revenge Joe s Brother", url: "https://github.com/dientu4nut/NES/blob/master/Twin%20Eagle%20-%20Revenge%20Joe%20s%20Brother%20(U)%20.nes" }, UfouriaTheSaga: { name: "U-four-ia - The Saga ", url: "https://github.com/dientu4nut/NES/blob/master/U-four-ia%20-%20The%20Saga%20(E)%20.nes" }, UltimaExodus: { name: "Ultima - Exodus", url: "https://github.com/dientu4nut/NES/blob/master/Ultima%20-%20Exodus%20(U)%20.nes" }, UltimaQuestoftheAvatar: { name: "Ultima - Quest of the Avatar", url: "https://github.com/dientu4nut/NES/blob/master/Ultima%20-%20Quest%20of%20the%20Avatar%20(U)%20.nes" }, UltimaWarriorsofDestiny: { name: "Ultima - Warriors of Destiny", url: "https://github.com/dientu4nut/NES/blob/master/Ultima%20-%20Warriors%20of%20Destiny%20(U)%20.nes" }, UltimateAirCombat: { name: "Ultimate Air Combat", url: "https://github.com/dientu4nut/NES/blob/master/Ultimate%20Air%20Combat%20(U)%20.nes" }, UltimateBasketball: { name: "Ultimate Basketball", url: "https://github.com/dientu4nut/NES/blob/master/Ultimate%20Basketball%20(U)%20.nes" }, UncannyXMenThe: { name: "Uncanny X-Men The", url: "https://github.com/dientu4nut/NES/blob/master/Uncanny%20X-Men%20The%20(U)%20.nes" }, UnchartedWaters: { name: "Uncharted Waters", url: "https://github.com/dientu4nut/NES/blob/master/Uncharted%20Waters%20(U)%20.nes" }, Uninvited: { name: "Uninvited", url: "https://github.com/dientu4nut/NES/blob/master/Uninvited%20(U)%20.nes" }, VegasDream: { name: "Vegas Dream", url: "https://github.com/dientu4nut/NES/blob/master/Vegas%20Dream%20(U)%20.nes" }, ViceProjectDoom: { name: "Vice - Project Doom", url: "https://github.com/dientu4nut/NES/blob/master/Vice%20-%20Project%20Doom%20(U)%20.nes" }, Videomation: { name: "Videomation", url: "https://github.com/dientu4nut/NES/blob/master/Videomation%20(U)%20.nes" }, WCWWorldChampionshipWrestling: { name: "WCW World Championship Wrestling", url: "https://github.com/dientu4nut/NES/blob/master/WCW%20World%20Championship%20Wrestling%20(U)%20.nes" }, WURMJourneytotheCenteroftheEarth: { name: "WURM - Journey to the Center of the Earth", url: "https://github.com/dientu4nut/NES/blob/master/WURM%20-%20Journey%20to%20the%20Center%20of%20the%20Earth%20(U)%20.nes" }, WWFKingoftheRing: { name: "WWF King of the Ring", url: "https://github.com/dientu4nut/NES/blob/master/WWF%20King%20of%20the%20Ring%20(U)%20.nes" }, WWFWrestleMania: { name: "WWF WrestleMania", url: "https://github.com/dientu4nut/NES/blob/master/WWF%20WrestleMania%20(U)%20.nes" }, WWFWrestleManiaSteelCageChallenge: { name: "WWF WrestleMania - Steel Cage Challenge", url: "https://github.com/dientu4nut/NES/blob/master/WWF%20WrestleMania%20-%20Steel%20Cage%20Challenge%20(U)%20.nes" }, WWFWrestleManiaChallenge: { name: "WWF WrestleMania Challenge", url: "https://github.com/dientu4nut/NES/blob/master/WWF%20WrestleMania%20Challenge%20(U)%20.nes" }, WackyRaces: { name: "Wacky Races", url: "https://github.com/dientu4nut/NES/blob/master/Wacky%20Races%20(U)%20.nes" }, WallStreetKid: { name: "Wall Street Kid", url: "https://github.com/dientu4nut/NES/blob/master/Wall%20Street%20Kid%20(U)%20.nes" }, WariosWoods: { name: "Wario s Woods", url: "https://github.com/dientu4nut/NES/blob/master/Wario%20s%20Woods%20(U)%20.nes" }, WayneGretzkyHockey: { name: "Wayne Gretzky Hockey", url: "https://github.com/dientu4nut/NES/blob/master/Wayne%20Gretzky%20Hockey%20(U)%20.nes" }, WaynesWorld: { name: "Wayne s World", url: "https://github.com/dientu4nut/NES/blob/master/Wayne%20s%20World%20(U)%20.nes" }, WerewolfTheLastWarrior: { name: "Werewolf - The Last Warrior", url: "https://github.com/dientu4nut/NES/blob/master/Werewolf%20-%20The%20Last%20Warrior%20(U)%20.nes" }, WheelofFortuneStarringVannaWhite: { name: "Wheel of Fortune - Starring Vanna White", url: "https://github.com/dientu4nut/NES/blob/master/Wheel%20of%20Fortune%20-%20Starring%20Vanna%20White%20(U)%20.nes" }, WheelofFortuneFamilyEdition: { name: "Wheel of Fortune Family Edition", url: "https://github.com/dientu4nut/NES/blob/master/Wheel%20of%20Fortune%20Family%20Edition%20(U)%20.nes" }, WheelofFortuneJuniorEdition: { name: "Wheel of Fortune Junior Edition", url: "https://github.com/dientu4nut/NES/blob/master/Wheel%20of%20Fortune%20Junior%20Edition%20(U)%20.nes" }, WhereinTimeisCarmenSandiego: { name: "Where in Time is Carmen Sandiego", url: "https://github.com/dientu4nut/NES/blob/master/Where%20in%20Time%20is%20Carmen%20Sandiego%20(U)%20.nes" }, WheresWaldo: { name: "Where s Waldo", url: "https://github.com/dientu4nut/NES/blob/master/Where%20s%20Waldo%20(U)%20.nes" }, WhoFramedRogerRabbit: { name: "Who Framed Roger Rabbit", url: "https://github.com/dientu4nut/NES/blob/master/Who%20Framed%20Roger%20Rabbit%20(U)%20.nes" }, WhompEm: { name: "Whomp Em", url: "https://github.com/dientu4nut/NES/blob/master/Whomp%20Em%20(U)%20.nes" }, Widget: { name: "Widget", url: "https://github.com/dientu4nut/NES/blob/master/Widget%20(U)%20.nes" }, Willow: { name: "Willow", url: "https://github.com/dientu4nut/NES/blob/master/Willow%20(U)%20.nes" }, WinLoseorDraw: { name: "Win Lose or Draw", url: "https://github.com/dientu4nut/NES/blob/master/Win%20Lose%20or%20Draw%20(U)%20.nes" }, WizardryProvingGroundsoftheMadOverlord: { name: "Wizardry - Proving Grounds of the Mad Overlord", url: "https://github.com/dientu4nut/NES/blob/master/Wizardry%20-%20Proving%20Grounds%20of%20the%20Mad%20Overlord%20(U)%20.nes" }, WizardryTheKnightofDiamonds: { name: "Wizardry - The Knight of Diamonds", url: "https://github.com/dientu4nut/NES/blob/master/Wizardry%20-%20The%20Knight%20of%20Diamonds%20(U)%20.nes" }, WizardsWarriorsIIIKurosVisionsofPower: { name: "Wizards & Warriors III - Kuros - Visions of Power", url: "https://github.com/dientu4nut/NES/blob/master/Wizards%20%26%20Warriors%20III%20-%20Kuros%20-%20Visions%20of%20Power%20(U)%20.nes" }, Wolverine: { name: "Wolverine", url: "https://github.com/dientu4nut/NES/blob/master/Wolverine%20(U)%20.nes" }, WorldChamp: { name: "World Champ", url: "https://github.com/dientu4nut/NES/blob/master/World%20Champ%20(U)%20.nes" }, WorldGames: { name: "World Games", url: "https://github.com/dientu4nut/NES/blob/master/World%20Games%20(U)%20.nes" }, Xenophobe: { name: "Xenophobe", url: "https://github.com/dientu4nut/NES/blob/master/Xenophobe%20(U)%20.nes" }, Xevious: { name: "Xevious", url: "https://github.com/dientu4nut/NES/blob/master/Xevious%20(U)%20.nes" }, Xexyz: { name: "Xexyz", url: "https://github.com/dientu4nut/NES/blob/master/Xexyz%20(U)%20.nes" }, YoNoid: { name: "Yo Noid", url: "https://github.com/dientu4nut/NES/blob/master/Yo%20%20Noid%20(U)%20.nes" }, Yoshi: { name: "Yoshi", url: "https://github.com/dientu4nut/NES/blob/master/Yoshi%20(U)%20.nes" }, YoshisCookie: { name: "Yoshi s Cookie", url: "https://github.com/dientu4nut/NES/blob/master/Yoshi%20s%20Cookie%20(U)%20.nes" }, YoungIndianaJonesChroniclesThe: { name: "Young Indiana Jones Chronicles The", url: "https://github.com/dientu4nut/NES/blob/master/Young%20Indiana%20Jones%20Chronicles%20The%20(U)%20.nes" }, Zanac: { name: "Zanac", url: "https://github.com/dientu4nut/NES/blob/master/Zanac%20(U)%20.nes" }, ZeldaIITheAdventureofLink: { name: "Zelda II - The Adventure of Link", url: "https://github.com/dientu4nut/NES/blob/master/Zelda%20II%20-%20The%20Adventure%20of%20Link%20(U)%20.nes" }, ZenIntergalacticNinja: { name: "Zen - Intergalactic Ninja", url: "https://github.com/dientu4nut/NES/blob/master/Zen%20-%20Intergalactic%20Ninja%20(U)%20.nes" }, ZombieNation: { name: "Zombie Nation", url: "https://github.com/dientu4nut/NES/blob/master/Zombie%20Nation%20(U)%20.nes" } }, }; export default config;
const HelpStrategy = require('../../../lib/strategy/HelpStrategy'); const expect = require('chai').expect; describe('Testsuite HelpStrategy', () => { it('Testcase - isValid', () => { let strategy = new HelpStrategy(); expect(strategy.isValid()).to.be.true; }); it('Testcase - isJSONOutput', () => { let strategy = new HelpStrategy(); expect(strategy.isJSONOutput()).to.be.false; }); it('Testcase - execute', async () => { let strategy = new HelpStrategy(); let response = await strategy.execute(); expect(response).to.match(/Executes a cli job against IBM Db2 Warehouse on Cloud REST API/i); }); });
$(document).ready(function () { $(document).keydown(function (event) { if (event.ctrlKey === true && (event.which === '61' || event.which === '107' || event.which === '173' || event.which === '109' || event.which === '187' || event.which === '189')) { event.preventDefault(); // 107 Num Key + //109 Num Key - //173 Min Key hyphen/underscor Hey // 61 Plus key +/= } }); $(window).bind('mousewheel DOMMouseScroll', function (event) { if (event.ctrlKey === true) { event.preventDefault(); } }); });
# Generated by Django 2.2.6 on 2019-10-20 23:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scraper', '0002_auto_20191017_1646'), ] operations = [ migrations.AlterField( model_name='post', name='type', field=models.CharField(choices=[('ETP', 'ELTIEMPO'), ('EPS', 'ELPAIS'), ('NYT', 'NYT'), ('TWP', 'TWP')], max_length=3), ), ]
# Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import import os from digits.utils import subclass, override from digits.status import Status from digits.pretrained_model.tasks import UploadPretrainedModelTask @subclass class CaffeUploadTask(UploadPretrainedModelTask): def __init__(self, **kwargs): super(CaffeUploadTask, self).__init__(**kwargs) @override def name(self): return 'Upload Pretrained Caffe Model' @override def get_model_def_path(self): """ Get path to model definition """ return os.path.join(self.job_dir, "original.prototxt") @override def get_weights_path(self): """ Get path to model weights """ return os.path.join(self.job_dir, "model.caffemodel") @override def __setstate__(self, state): super(CaffeUploadTask, self).__setstate__(state) @override def run(self, resources): self.move_file(self.weights_path, "model.caffemodel") self.move_file(self.model_def_path, "original.prototxt") if self.labels_path is not None: self.move_file(self.labels_path, "labels.txt") tmp_dir = os.path.dirname(self.weights_path) python_layer_file_name = 'digits_python_layers.py' if os.path.exists(os.path.join(tmp_dir, python_layer_file_name)): self.move_file(os.path.join(tmp_dir, python_layer_file_name), python_layer_file_name) elif os.path.exists(os.path.join(tmp_dir, python_layer_file_name + 'c')): self.move_file(os.path.join(tmp_dir, python_layer_file_name + 'c'), python_layer_file_name + 'c') self.status = Status.DONE
export const CodeDecoratorStyles = { keyword: { //import 关键字 style:{ color: '#008dff' } }, plain: { //react style:{ color: '#008dff' } }, punctuation: {//{} , style:{ color: '#999' } }, string: { style:{ color: '#0b8235' } }, operator: {//= style:{ color: '#008dff' } }, number: { style:{ color: '#008dff' } }, function: { style:{ color: '#008dff' } }, "function-variable": { style:{ color: '#008dff' } }, constant: {//常数 style:{ color: '#008dff' } }, tag: { //style margin style:{ color: '#f81d22' } }, "attr-name": { //style style:{ color: '#008dff' } }, script: {//margin style:{ color: '#008dff' } }, "script-punctuation": {//"=" style:{ color: '#008dff' } }, "language-javascript": { //margin style:{ color: '#008dff' } }, "class-name": {//className style:{ color: '#008dff' } }, "attr-value": {//primary style:{ color: '#008dff' } }, }
import kfp import logging import multiprocessing import uuid import datetime import os from typing import Dict, List def my_config_init(self, host="http://localhost", api_key=None, api_key_prefix=None, username=None, password=None, discard_unknown_keys=False, ): """Constructor """ self.host = host """Default Base url """ self.temp_folder_path = None """Temp file folder for downloading files """ # Authentication Settings self.api_key = {} if api_key: self.api_key = api_key """dict to store API key(s) """ self.api_key_prefix = {} if api_key_prefix: self.api_key_prefix = api_key_prefix """dict to store API prefix (e.g. Bearer) """ self.refresh_api_key_hook = None """function hook to refresh API key if expired """ self.username = username """Username for HTTP basic authentication """ self.password = password """Password for HTTP basic authentication """ self.discard_unknown_keys = discard_unknown_keys self.logger = {} """Logging Settings """ self.logger["package_logger"] = logging.getLogger("kfp_server_api") self.logger["urllib3_logger"] = logging.getLogger("urllib3") self.logger_format = '%(asctime)s %(levelname)s %(message)s' """Log format """ self.logger_stream_handler = None """Log stream handler """ self.logger_file_handler = None """Log file handler """ self.logger_file = None """Debug file location """ self.debug = False """Debug switch """ self.verify_ssl = False """SSL/TLS verification Set this to false to skip verifying SSL certificate when calling API from https server. """ self.ssl_ca_cert = None """Set this to customize the certificate file to verify the peer. """ self.cert_file = None """client certificate file """ self.key_file = None """client key file """ self.assert_hostname = None """Set this to True/False to enable/disable SSL hostname verification. """ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 """urllib3 connection pool's maximum number of connections saved per pool. urllib3 uses 1 connection as default value, but this is not the best value when you are making a lot of possibly parallel requests to the same host, which is often the case here. cpu_count * 5 is used as default value to increase performance. """ self.proxy = None """Proxy URL """ self.proxy_headers = None """Proxy headers """ self.safe_chars_for_path_param = '' """Safe chars for path_param """ self.retries = None """Adding retries to override urllib3 default value 3 """ # Disable client side validation self.client_side_validation = True import splogger import warnings from kfp_server_api.configuration import Configuration from kubernetes.client.models.v1_volume import V1Volume from kubernetes.client.models.v1_affinity import V1Affinity from kubernetes.client.models.v1_node_affinity import V1NodeAffinity from kubernetes.client.models.v1_node_selector import V1NodeSelector from kubernetes.client.models.v1_node_selector_requirement import V1NodeSelectorRequirement from kubernetes.client.models.v1_node_selector_term import V1NodeSelectorTerm from kubernetes.client.models.v1_host_path_volume_source import V1HostPathVolumeSource from kubernetes.client.models.v1_empty_dir_volume_source import V1EmptyDirVolumeSource import uuid Configuration.__init__ = my_config_init # HELPERS class DVICContainerOperation: """ Wrapper for a container operation on the Kubeflow DVIC image: the docker image to execute args: arguments passed to the image at execution time file_outputs: Dict[str:str] of output files to go to the ARTIFACTS """ def __init__(self, image : str, *args : List[str], name : str = "unnamed-operation", file_outputs : Dict[str,str] = None): # file_outputs={"hello_output": "/out"} # See https://www.kubeflow.org/docs/pipelines/sdk/pipelines-metrics/ for metrics self.image = image self.args = args self.name = name self.file_outputs = file_outputs if file_outputs else {} self.node = None self.ngpu = None self.volumes = [] self.after = [] if DVICPipelineWrapper.current_pipeline: DVICPipelineWrapper.current_pipeline += self def __call__(self): """ To be called in a pipeline """ # Add shm self.volumes.append({'/dev/shm': V1Volume(name="dshm", empty_dir=V1EmptyDirVolumeSource(medium='Memory'))}) self.op = kfp.dsl.ContainerOp(self.name, self.image, arguments=self.args, file_outputs = self.file_outputs) if self.node: self.op.add_affinity(V1Affinity(node_affinity=V1NodeAffinity(required_during_scheduling_ignored_during_execution=V1NodeSelector(node_selector_terms=[V1NodeSelectorTerm(match_expressions=[V1NodeSelectorRequirement(key='kubernetes.io/hostname', operator='In', values=[self.node])])])))) if self.ngpu: self.op.set_gpu_limit(self.ngpu) if len(self.volumes) > 0: for vol in self.volumes: self.op.add_pvolumes(vol) def _apply_order(self): if len(self.after) > 0: for e in self.after: self.op.after(e.op) def __or__(self, other): other.after.append(self) return other def select_node(self, name="dgx.dvic.devinci.fr"): """ Force execution on a specific node, the dgx by default """ self.node = name return self def tensorboard(self, path): self.mount_host_path("/logs", os.path.join(path, self.name)) return self def file_output(self, name, in_container): self.file_outputs[name] = in_container return self def gpu(self, request=1): """ Requested number of GPUs """ self.ngpu = request return self def mount_host_path(self, container_path, host_path, name=None): """ Mount the host_path path in the container at container_path """ if not name: name = str(uuid.uuid4()) if name == 'dshm' or container_path == '/dev/shm': raise ConfigError("SHM is present by default and does not need supplementary configuration.") self.volumes.append({container_path: V1Volume(name=name, host_path=V1HostPathVolumeSource(host_path))}) return self class DVICPipelineWrapper: current_pipeline = None def __init__(self, name, description, run_name = None, exp = None, namespace="dvic-kf"): self.name = name self.description = description self.namepsace = namespace self.elems = [] self.exp = name if not exp else exp self.func = None self.res = None self.run_name = run_name if run_name else f'{self.name} {str(datetime.datetime.now())}' def set_exp(self, exp): self.exp = exp return self def __enter__(self): splogger.fine("Building pipeline") DVICPipelineWrapper.current_pipeline = self return self def __exit__(self, ex, exc , texc): pass def __iadd__(self, elem: DVICContainerOperation): self.elems.append(elem) return self def set_func(self, func): @kfp.dsl.pipeline( name=self.name, description=self.description ) def _wrapper(): func() self.func = _wrapper def _generic_pipeline(self): @kfp.dsl.pipeline( name=self.name, description=self.description ) def _wrapper(): for operation in self.elems: operation() for operation in self.elems: operation._apply_order() return _wrapper def wait(self): if not self.res: return self self.res.wait_for_run_completion() def __call__(self, **kwargs): """ Run the pipeline """ splogger.fine(f'Starting pipeline {self.name}') warnings.filterwarnings("ignore") c = kfp.Client("https://kubflow.dvic.devinci.fr/pipeline") self.res = c.create_run_from_pipeline_func(self.func if self.func != None else self._generic_pipeline(), kwargs, self.run_name, self.name, namespace=self.namepsace) splogger.success(f'Pipeline started', strong=True) splogger.success(f'Pipeline URL: https://kubflow.dvic.devinci.fr/_/pipeline/#/experiments/details/{self.res.run_id}') return self def noop(name): return DVICContainerOperation("busybox", "/bin/sh", "-c", "echo no operation", name=name)
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * Get the opposite placement variation of the given one * @param {?} variation * @return {?} */ export function getOppositeVariation(variation) { if (variation === 'right') { return 'left'; } else if (variation === 'left') { return 'right'; } return variation; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0T3Bwb3NpdGVWYXJpYXRpb24uanMiLCJzb3VyY2VSb290Ijoibmc6Ly9hbmd1bGFyLWJvb3RzdHJhcC1tZC8iLCJzb3VyY2VzIjpbImxpYi9mcmVlL3V0aWxzL3Bvc2l0aW9uaW5nL3V0aWxzL2dldE9wcG9zaXRlVmFyaWF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUdBLE1BQU0sVUFBVSxvQkFBb0IsQ0FBQyxTQUFpQjtJQUNwRCxJQUFJLFNBQVMsS0FBSyxPQUFPLEVBQUU7UUFDekIsT0FBTyxNQUFNLENBQUM7S0FDZjtTQUFNLElBQUksU0FBUyxLQUFLLE1BQU0sRUFBRTtRQUMvQixPQUFPLE9BQU8sQ0FBQztLQUNoQjtJQUVELE9BQU8sU0FBUyxDQUFDO0FBQ25CLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdldCB0aGUgb3Bwb3NpdGUgcGxhY2VtZW50IHZhcmlhdGlvbiBvZiB0aGUgZ2l2ZW4gb25lXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRPcHBvc2l0ZVZhcmlhdGlvbih2YXJpYXRpb246IHN0cmluZykge1xuICBpZiAodmFyaWF0aW9uID09PSAncmlnaHQnKSB7XG4gICAgcmV0dXJuICdsZWZ0JztcbiAgfSBlbHNlIGlmICh2YXJpYXRpb24gPT09ICdsZWZ0Jykge1xuICAgIHJldHVybiAncmlnaHQnO1xuICB9XG5cbiAgcmV0dXJuIHZhcmlhdGlvbjtcbn1cbiJdfQ==
import sinon from "sinon"; import { getJSONWithValidBody, makeActionTypes, makeApiAction, makeFailureActionType } from "./makeApiAction"; import { RSAA, ApiError } from "redux-api-middleware"; const getTestResponse = (extra = {}, contentType = null) => ({ headers: { "Content-Type": contentType ?? "application/json", get: function (key) { return this[key]; }, }, json: () => ({ key1: "value1", key2: "value2" }), text: () => '{"key1": "value1", "key2": "value2"}', status: 200, statusText: "a status text", message: "a Message", ...extra, }); describe("makeActionTypes", () => { it("returns an array with three action types in the form used by RSAAs", () => expect(makeActionTypes, "when called with", ["ACTION_NAME"], "to satisfy", [ "ACTION_NAME_REQUEST", "ACTION_NAME_SUCCESS", "ACTION_NAME_FAILURE", ])); }); describe("makeFailureActionType", () => { it("returns a failure action type with a payload override", () => expect(makeFailureActionType, "when called with", ["ACTION_NAME_FAILURE"], "to satisfy", { type: "ACTION_NAME_FAILURE", payload: expect.it("to be a function"), })); it("handles failure payload function", async () => { const actionType = makeFailureActionType("ACTION_NAME_FAILURE"); const testResponse = getTestResponse(); const apiError = new ApiError(testResponse.status, testResponse.statusText, testResponse.json()); const result = await actionType.payload("ACTION_NAME_FAILURE", {}, testResponse); expect(result, "to equal", apiError); }); }); describe("getJSONWithValidBody", () => { it("return a resolved promise by default when called with basic response", async () => { const result = await getJSONWithValidBody(getTestResponse()); expect(result, "to equal", { key1: "value1", key2: "value2" }); }); it("return a resolved promise by default when called with 404 response, a body and another content type", async () => { const result = await getJSONWithValidBody(getTestResponse({ status: 404 }, "fakeContentType")); expect(result, "to be", undefined); }); it("return a resolved promise by default when called with 404 response and a body", async () => { const result = await getJSONWithValidBody(getTestResponse({ status: 404 })); expect(result, "to equal", { key1: "value1", key2: "value2" }); }); it("return a resolved promise by default when called with 404 response and null body", async () => { const result = await getJSONWithValidBody(getTestResponse({ status: 404, text: () => null })); expect(result, "to equal", null); }); it("return a resolved promise by default when called with 404 response and undefined body", async () => { const result = await getJSONWithValidBody(getTestResponse({ status: 404, text: () => undefined })); expect(result, "to equal", undefined); }); it("return a resolved promise by default when called with 404 response and empty body", async () => { const result = await getJSONWithValidBody(getTestResponse({ status: 404, text: () => "" })); expect(result, "to equal", ""); }); }); describe("makeApiActions", () => { it("creates a basic RSAA", () => expect(makeApiAction, "when called with", ["TEST_ACTION", "/mock/endpoint"], "to equal", { [RSAA]: { types: makeActionTypes("TEST_ACTION"), endpoint: "/mock/endpoint", method: "GET", }, })); it("handles POST and bodies", () => expect( makeApiAction, "when called with", ["TEST_ACTION", "/mock/endpoint", "POST", { body: { test: true, someText: "This is a text value" } }], "to equal", { [RSAA]: { types: makeActionTypes("TEST_ACTION"), endpoint: "/mock/endpoint", method: "POST", body: '{"test":true,"someText":"This is a text value"}', }, }, )); it("handles headers and credentials", () => expect( makeApiAction, "when called with", [ "TEST_ACTION", "/mock/endpoint", "GET", { headers: { "Content-Type": "application/json" }, credentials: "include", }, ], "to equal", { [RSAA]: { types: makeActionTypes("TEST_ACTION"), endpoint: "/mock/endpoint", method: "GET", headers: { "Content-Type": "application/json" }, credentials: "include", }, }, )); it("handles options and bailout", () => { let bailout = sinon.spy().named("bailout"); return expect( makeApiAction, "when called with", ["TEST_ACTION", "/mock/endpoint", "GET", { options: { redirect: "follow" }, bailout }], "to equal", { [RSAA]: { types: makeActionTypes("TEST_ACTION"), endpoint: "/mock/endpoint", method: "GET", options: { redirect: "follow" }, bailout, }, }, ).then(() => expect(bailout, "was not called")); }); it("handles action metadata", () => expect( makeApiAction, "when called with", ["TEST_ACTION", "/mock/endpoint", "GET", { meta: { test: true } }], "to equal", { [RSAA]: { types: [ { type: "TEST_ACTION_REQUEST", meta: { test: true } }, { type: "TEST_ACTION_SUCCESS", meta: { test: true } }, { type: "TEST_ACTION_FAILURE", meta: { test: true } }, ], endpoint: "/mock/endpoint", method: "GET", }, }, )); });
"""Download API integration tests.""" import filecmp import os import platform import sys import tempfile import responses import siaskynet as skynet SKYLINK = "XABvi7JtJbQSMAcDwnUnmp2FKDPjg8_tTTFP4BwMSxVdEg" client = skynet.SkynetClient() @responses.activate def test_download_file(): """Test downloading a file to a temporary location.""" # This test fails on CI for Windows so skip it. if platform.system() == "Windows" and 'CI' in os.environ: return src_file = "./testdata/file1" # download a file responses.add( responses.GET, 'https://siasky.net/'+SKYLINK, "test\n", status=200 ) dst_file = tempfile.NamedTemporaryFile().name print("Downloading to "+dst_file) client.download_file(dst_file, SKYLINK) if not filecmp.cmp(src_file, dst_file): sys.exit("ERROR: Downloaded file at "+dst_file + " did not equal uploaded file "+src_file) print("File download successful") assert len(responses.calls) == 1
// flow-typed signature: efaf800dde9f76a4bafd8c265d6eeb47 // flow-typed version: <<STUB>>/electrode-csrf-jwt_v^1.0.0 /** * This is an autogenerated libdef stub for: * * 'electrode-csrf-jwt' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share your work with the * community by sending a pull request to: * https://github.com/flowtype/flow-typed */ declare module 'electrode-csrf-jwt' { declare module.exports: any; } /** * We include stubs for each file inside this npm package in case you need to * require those files directly. Feel free to delete any files that aren't * needed. */ declare module 'electrode-csrf-jwt/lib/constants' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/csrf-express' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/csrf-hapi' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/csrf-koa' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/csrf' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/errors' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/get-id-generators' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/hash-token-engine' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/index' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/jwt-token-engine' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/make-cookie-config' { declare module.exports: any; } declare module 'electrode-csrf-jwt/lib/simple-id-generator' { declare module.exports: any; } // Filename aliases declare module 'electrode-csrf-jwt/lib/constants.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/constants'>; } declare module 'electrode-csrf-jwt/lib/csrf-express.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/csrf-express'>; } declare module 'electrode-csrf-jwt/lib/csrf-hapi.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/csrf-hapi'>; } declare module 'electrode-csrf-jwt/lib/csrf-koa.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/csrf-koa'>; } declare module 'electrode-csrf-jwt/lib/csrf.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/csrf'>; } declare module 'electrode-csrf-jwt/lib/errors.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/errors'>; } declare module 'electrode-csrf-jwt/lib/get-id-generators.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/get-id-generators'>; } declare module 'electrode-csrf-jwt/lib/hash-token-engine.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/hash-token-engine'>; } declare module 'electrode-csrf-jwt/lib/index.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/index'>; } declare module 'electrode-csrf-jwt/lib/jwt-token-engine.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/jwt-token-engine'>; } declare module 'electrode-csrf-jwt/lib/make-cookie-config.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/make-cookie-config'>; } declare module 'electrode-csrf-jwt/lib/simple-id-generator.js' { declare module.exports: $Exports<'electrode-csrf-jwt/lib/simple-id-generator'>; }
import{h,e as extractClass,b as tag,W as WeElement,f as require$$0,g as commonjsGlobal,t as tw,s as sheet}from"./vendor.ee3ef776.js";import"./admin-docs.6268a56a.js";import"./code-demo.034d456f.js";import{M as Masonry}from"./masonry.3490a527.js";import"./___vite-browser-external_commonjs-proxy.6f9fb8ed.js"; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var extendStatics$2=function(n,e){return(extendStatics$2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t])})(n,e)};function __extends$2(n,e){function t(){this.constructor=n}extendStatics$2(n,e),n.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}var __assign$1=function(){return(__assign$1=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}).apply(this,arguments)};function __decorate$2(n,e,t,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(r=n[c])&&(a=(i<3?r(a):i>3?r(e,t,a):r(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a}var css$2=":host {\n display: inline-block; }\n\n:host([block]) {\n display: block; }\n\n.o-card {\n display: flex;\n flex-direction: column;\n margin: 10px;\n width: 300px;\n border: 1px solid #EFEFEF; }\n\n.o-card-medium {\n display: flex;\n flex-direction: column;\n margin: 10px;\n width: 265px;\n border: 1px solid #EFEFEF; }\n\n.o-card-small {\n display: flex;\n flex-direction: column;\n margin: 10px;\n width: 230px;\n border: 1px solid #EFEFEF; }\n\n.o-card-header {\n min-height: 48px;\n padding: 0 24px;\n border-bottom: 1px solid #EFEFEF;\n border-radius: 2px 2px 0 0; }\n\n.o-card-header-medium {\n min-height: 42px;\n padding: 0 18px;\n border-bottom: 1px solid #EFEFEF;\n border-radius: 2px 2px 0 0; }\n\n.o-card-header-small {\n min-height: 36px;\n padding: 0 12px;\n border-bottom: 1px solid #EFEFEF;\n border-radius: 2px 2px 0 0; }\n\n.o-card-title {\n float: left;\n padding: 16px 0;\n font-weight: 500;\n font-size: 18px; }\n\n.o-card-extra {\n float: right;\n margin-left: auto;\n padding: 16px 0;\n font-weight: 500;\n font-size: 14px;\n cursor: pointer; }\n\n.o-card-title-medium {\n float: left;\n padding: 10px 0;\n font-weight: 500;\n font-size: 17px; }\n\n.o-card-extra-medium {\n float: right;\n margin-left: auto;\n padding: 10px 0;\n font-weight: 500;\n font-size: 14px;\n cursor: pointer; }\n\n.o-card-title-small {\n float: left;\n padding: 10px 0;\n font-weight: 500;\n font-size: 16px; }\n\n.o-card-extra-small {\n float: right;\n margin-left: auto;\n padding: 10px 0;\n font-weight: 500;\n font-size: 14px;\n cursor: pointer; }\n\n.o-card-body {\n margin: 12px 24px;\n font-weight: 200;\n font-size: 14px;\n line-height: 1.6; }\n\n.o-card-body-medium {\n margin: 11px 22px;\n font-weight: 200;\n font-size: 13px;\n line-height: 1.4; }\n\n.o-card-body-small {\n margin: 10px 20px;\n font-weight: 200;\n font-size: 12px;\n line-height: 1.2; }\n\n.o-card-footer {\n height: 56px;\n display: flex;\n justify-content: center;\n background-color: #fff; }\n\n.item.selected {\n color: #07c160; }\n\n.item {\n flex: 1;\n color: rgba(0, 0, 0, 0.54);\n padding: 6px 12px 8px;\n transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, padding-top 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; }\n\nbutton {\n appearance: none;\n -webkit-appearance: none;\n position: relative;\n cursor: pointer;\n outline: none;\n border-top: 1px solid #EFEFEF;\n border-right: 1px solid #EFEFEF;\n border-left: none;\n border-bottom: none;\n background-color: #fff; }\n\nbutton:hover {\n appearance: none;\n -webkit-appearance: none;\n position: relative;\n cursor: pointer;\n outline: none;\n border-top: 1px solid #EFEFEF;\n border-right: 1px solid #EFEFEF;\n border-left: none;\n border-bottom: none;\n background-color: #EFEFEF; }\n\n.icon {\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: block;\n margin: 0 auto;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased; }\n\n.icon:hover {\n font-weight: normal;\n font-style: normal;\n font-size: 24px;\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: block;\n margin: 0 auto;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n color: #07C160;\n -webkit-font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased; }\n";!function(n){function e(){var e=null!==n&&n.apply(this,arguments)||this;return e.css=css$2,e.clickHandler=function(n){e.fire("change",n),e.update(!0)},e.handleMousemove=function(n){if("always"!==n){n&&function(){switch(e.props.size){case"large":e.css=css$2+".o-card:hover {\n display: flex;\n flex-direction: column;\n margin: 10px;\n width: 300px;\n box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;\n transition: all .3s;\n z-index: 1;\n }";break;case"medium":e.css=css$2+".o-card-medium:hover {\n display: flex;\n flex-direction: column;\n margin: 10px;\n width: 265px;\n box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;\n transition: all .3s;\n z-index: 1;\n }";break;case"small":e.css=css$2+".o-card-small:hover {\n display: flex;\n flex-direction: column;\n margin: 10px;\n width: 230px;\n box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;\n transition: all .3s;\n z-index: 1;\n }";break;default:e.css=css$2+".o-card:hover {\n display: flex;\n flex-direction: column;\n margin: 10px;\n width: 300px;\n box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;\n transition: all .3s;\n z-index: 1;\n }"}}()}else e.css=css$2+".o-card {\n display: flex;\n flex-direction: column;\n margin: 10px;\n width: 300px;\n box-shadow: 0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017;\n transition: all .3s;\n z-index: 1;\n }"},e}__extends$2(e,n),e.prototype.render=function(n){var e,t,o,r,i,a=this;return h("div",__assign$1({},extractClass(n,"o-card",((e={})["o-card-"+n.size]=n.size,e)),{onMousemove:this.handleMousemove(n.hoverable)}),h("slot",{name:"cover"},h("div",__assign$1({},extractClass(n,"o-card-header",((t={})["o-card-header-"+n.size]=n.size,t))),h("div",__assign$1({},extractClass(n,"o-card-title",((o={})["o-card-title-"+n.size]=n.size,o))),n.title),h("div",__assign$1({},extractClass(n,"o-card-extra",((r={})["o-card-extra-"+n.size]=n.size,r))),h("slot",{name:"extra"})))),h("div",__assign$1({},extractClass(n,"o-card-body",((i={})["o-card-body-"+n.size]=n.size,i))),h("slot",null)),n.actions?h("div",{class:"o-card-footer"},n.actions.map((function(n,e){return a._iconTag="o-icon-"+n.icon,h("button",{onClick:function(e){a.clickHandler(n)},className:"item"},h(a._iconTag,{class:"icon"}))}))):null)},e.defaultProps={title:"",hoverable:"",extra:""},e.propTypes={title:String,hoverable:String,extra:String,actions:Array,size:String},e=__decorate$2([tag("o-card")],e)}(WeElement); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var extendStatics$1=function(n,e){return(extendStatics$1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var t in e)e.hasOwnProperty(t)&&(n[t]=e[t])})(n,e)};function __extends$1(n,e){function t(){this.constructor=n}extendStatics$1(n,e),n.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}var __assign=function(){return(__assign=Object.assign||function(n){for(var e,t=1,o=arguments.length;t<o;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}).apply(this,arguments)};function __decorate$1(n,e,t,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(r=n[c])&&(a=(i<3?r(a):i>3?r(e,t,a):r(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a}var css$1=":host {\n display: inline-block; }\n\n* {\n box-sizing: border-box; }\n\n.o-link {\n display: inline-flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n vertical-align: middle;\n position: relative;\n text-decoration: none;\n outline: none;\n cursor: pointer;\n padding: 0;\n font-size: 14px;\n font-weight: 500;\n border-bottom: 1px solid transparent; }\n\n.o-link:hover {\n color: #07c160;\n color: var(--o-primary, #07c160); }\n\n.o-link.is-underline:hover {\n border-bottom: 1px solid #07c160;\n border-bottom: 1px solid var(--o-primary, #07c160); }\n\n.o-link:active {\n color: #059048;\n color: var(--o-primary-active, #059048); }\n\n.o-link-primary {\n color: #07c160;\n color: var(--o-primary, #07c160); }\n\n.o-link-primary:hover {\n color: rgba(7, 193, 96, 0.618);\n color: var(--o-primary-fade-little, rgba(7, 193, 96, 0.618)); }\n\n.o-link-primary:active {\n color: #059048;\n color: var(--o-primary-active, #059048); }\n\n.o-link-primary.is-underline:hover {\n border-bottom: 1px solid rgba(7, 193, 96, 0.618);\n border-bottom: 1px solid var(--o-primary-fade-little, rgba(7, 193, 96, 0.618)); }\n\n.o-link-danger {\n color: #fa5151;\n color: var(--o-danger, #fa5151); }\n\n.o-link-danger:hover {\n color: rgba(250, 81, 81, 0.618);\n color: var(--o-danger-fade-little, rgba(250, 81, 81, 0.618)); }\n\n.o-link-danger:active {\n color: #f91f1f;\n color: var(--o-danger-active, #f91f1f); }\n\n.o-link-danger.is-underline:hover {\n border-bottom: 1px solid rgba(250, 81, 81, 0.618);\n border-bottom: 1px solid var(--o-danger-fade-little, rgba(250, 81, 81, 0.618)); }\n\n.o-link.is-disabled,\n.o-link.is-disabled:focus,\n.o-link.is-disabled:hover {\n color: #c0c4cc;\n cursor: not-allowed;\n text-decoration: none;\n border-bottom: 1px solid transparent; }\n";!function(n){function e(){return null!==n&&n.apply(this,arguments)||this}__extends$1(e,n),e.prototype.render=function(n){var e;return h("a",__assign({disabled:n.disabled,href:n.href,target:n.target},extractClass(n,"o-link",((e={})["o-link-"+n.type]=n.type,e["o-link-"+n.size]=n.size,e["is-underline"]=n.underline,e["is-disabled"]=n.disabled,e))),h("span",null,h("slot",null)))},e.css=css$1,e.defaultProps={underline:!0,disabled:!1},e.propTypes={type:String,disabled:Boolean,underline:Boolean,href:String,target:String},e=__decorate$1([tag("o-link")],e)}(WeElement); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var extendStatics=function(n,e){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,e){n.__proto__=e}||function(n,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])})(n,e)};function __extends(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=n}extendStatics(n,e),n.prototype=null===e?Object.create(e):(t.prototype=e.prototype,new t)}function __decorate(n,e,t,o){var r,i=arguments.length,a=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,t):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(n,e,t,o);else for(var c=n.length-1;c>=0;c--)(r=n[c])&&(a=(i<3?r(a):i>3?r(e,t,a):r(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a}var css="/**\n * omiu tip css based on element ui css\n * Licensed under the MIT License\n * https://github.com/ElemeFE/element/blob/dev/LICENSE\n *\n * modified by dntzhang\n */\n:host {\n display: inline-block; }\n\nimg {\n width: 100%;\n height: 100%; }\n\n.placeholder,\n.error {\n width: 100%;\n height: 100%;\n display: block;\n text-align: center;\n font-size: 0.875em;\n color: #bdc5d4;\n background-color: #f5f7fa; }\n";!function(n){function e(){var e=null!==n&&n.apply(this,arguments)||this;return e.loaded=!1,e.loadError=!1,e.onLoad=function(){e.loaded=!0,e.update()},e.onError=function(){e.loaded=!1,e.loadError=!0,e.update()},e}__extends(e,n),e.prototype.installed=function(){var n=this.getBoundingClientRect().height+"px";this.error&&(this.error.style.lineHeight=n),this.placeholder&&(this.placeholder.style.lineHeight=n)},e.prototype.updated=function(){var n=this.getBoundingClientRect().height+"px";this.error&&(this.error.style.lineHeight=n),this.placeholder&&(this.placeholder.style.lineHeight=n)},e.prototype.render=function(n){var e=this;return h(h.f,null,h("img",{onload:this.onLoad,onerror:this.onError,src:n.src,style:{objectFit:n.fit,display:this.loaded?"block":"none"}}),this.loadError&&h("slot",{ref:function(n){return e.error=n},class:"error",name:"error"},n.errorMsg),!this.loadError&&h("slot",{name:"placeholder",style:{display:this.loaded?"none":"block "},ref:function(n){return e.placeholder=n},class:"placeholder"}))},e.css=css,e.defaultProps={errorMsg:"加载失败"},e.propTypes={src:String,fit:String,errorMsg:String},e=__decorate([tag("o-image")],e)}(WeElement);var addAPhotoRounded={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(n){var e={};function t(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:o})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)t.d(o,r,function(e){return n[e]}.bind(null,r));return o},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s="./esm/add-a-photo-rounded.js")}({"./esm/add-a-photo-rounded.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h(omi_1.h.f, null, omi_1.h("path", {\n d: "M3 8c0 .55.45 1 1 1s1-.45 1-1V6h2c.55 0 1-.45 1-1s-.45-1-1-1H5V2c0-.55-.45-1-1-1s-1 .45-1 1v2H1c-.55 0-1 .45-1 1s.45 1 1 1h2v2z"\n}), omi_1.h("circle", {\n cx: "13",\n cy: "14",\n r: "3"\n}), omi_1.h("path", {\n d: "M21 6h-3.17l-1.24-1.35c-.37-.41-.91-.65-1.47-.65h-6.4c.17.3.28.63.28 1 0 1.1-.9 2-2 2H6v1c0 1.1-.9 2-2 2-.37 0-.7-.11-1-.28V20c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-8 13c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"\n})), \'AddAPhotoRounded\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/add-a-photo-rounded.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(addAPhotoRounded);var addCommentRounded={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(n){var e={};function t(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:o})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)t.d(o,r,function(e){return n[e]}.bind(null,r));return o},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s="./esm/add-comment-rounded.js")}({"./esm/add-comment-rounded.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h("path", {\n d: "M22 4c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4V4zm-6 7h-3v3c0 .55-.45 1-1 1s-1-.45-1-1v-3H8c-.55 0-1-.45-1-1s.45-1 1-1h3V6c0-.55.45-1 1-1s1 .45 1 1v3h3c.55 0 1 .45 1 1s-.45 1-1 1z"\n}), \'AddCommentRounded\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/add-comment-rounded.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(addCommentRounded);var addIcCallRounded={exports:{}};(function(module,exports){var factory;factory=function(__WEBPACK_EXTERNAL_MODULE_omi__){return function(n){var e={};function t(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return n[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=n,t.c=e,t.d=function(n,e,o){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:o})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var r in n)t.d(o,r,function(e){return n[e]}.bind(null,r));return o},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s="./esm/add-ic-call-rounded.js")}({"./esm/add-ic-call-rounded.js":function(module,exports,__webpack_require__){eval('\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar createSvgIcon_1 = __webpack_require__(/*! ./utils/createSvgIcon */ "./esm/utils/createSvgIcon.js");\nexports.default = createSvgIcon_1.default(omi_1.h("path", {\n d: "M14 8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h2c.55 0 1-.45 1-1s-.45-1-1-1h-2V4c0-.55-.45-1-1-1s-1 .45-1 1v2h-2c-.55 0-1 .45-1 1s.45 1 1 1zm5.21 7.27l-2.54-.29c-.61-.07-1.21.14-1.64.57l-1.84 1.84c-2.83-1.44-5.15-3.75-6.59-6.59l1.85-1.85c.43-.43.64-1.04.57-1.64l-.29-2.52c-.11-1.01-.97-1.78-1.98-1.78H5.02c-1.13 0-2.07.94-2 2.07.53 8.54 7.36 15.36 15.89 15.89 1.13.07 2.07-.87 2.07-2v-1.73c.01-1-.76-1.86-1.77-1.97z"\n}), \'AddIcCallRounded\');\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/add-ic-call-rounded.js?')},"./esm/utils/createSvgIcon.js":function(module,exports,__webpack_require__){eval('\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, "__esModule", { value: true });\nvar omi_1 = __webpack_require__(/*! omi */ "omi");\nvar hyphenateRE = /\\B([A-Z])/g;\nvar hyphenate = function (str) {\n return str.replace(hyphenateRE, \'-$1\').toLowerCase();\n};\nfunction createSvgIcon(path, displayName) {\n omi_1.define(hyphenate(\'OIcon\' + displayName), function (_) {\n return omi_1.h(\'svg\', __assign({ viewBox: "0 0 24 24", title: displayName }, _.props), path);\n }, {\n css: ":host {\\n fill: currentColor;\\n width: 1em;\\n height: 1em;\\n display: inline-block;\\n vertical-align: -0.125em;\\n transition: fill 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\\n flex-shrink: 0;\\n user-select: none;\\n}"\n });\n}\nexports.default = createSvgIcon;\n\n\n//# sourceURL=webpack://%5Bname%5D/./esm/utils/createSvgIcon.js?')},omi:function(module,exports){eval("module.exports = __WEBPACK_EXTERNAL_MODULE_omi__;\n\n//# sourceURL=webpack://%5Bname%5D/external_%7B%22commonjs%22:%22omi%22,%22commonjs2%22:%22omi%22,%22amd%22:%22omi%22,%22root%22:%22Omi%22%7D?")}}).default},module.exports=factory(require$$0)})(addIcCallRounded);var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__decorateClass=(n,e,t,o)=>{for(var r,i=o>1?void 0:o?__getOwnPropDesc(e,t):e,a=n.length-1;a>=0;a--)(r=n[a])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&__defProp(e,t,i),i};const tagName="card-component";let card_component_default=class extends WeElement{constructor(){super(...arguments),this.mdA='\n ```html\n // hoverable设置阴影,always总是显示|true鼠标悬浮时|false从不显示\n <o-card hoverable="always">\n \x3c!-- slot="cover" 若不填充内容,则header栏不显示。-简单卡片 --\x3e\n <div slot="cover">\n </div>\n <p>Simple Card</p>\n <p>Card content</p>\n <p>Card content</p>\n </o-card>\n ```\n ',this.mdB='\n ```html\n <o-card title="Default size card" hoverable="always">\n <o-link\n underline=\'0\'\n type="primary"\n target="_blank"\n href="https://tencent.github.io/omi/"\n slot="extra">\n More\n </o-link>\n <p>Card content</p>\n <p>Card content</p>\n <p>Card content</p>\n </o-card>\n ```\n ',this.mdC='\n ```html\n <o-card \n title="Action card" \n size="medium" \n id="myActionA" \n hoverable="always"\n actions={\n [{icon: \'add-a-photo-rounded\'},\n {icon: \'add-ic-call-rounded\'},\n {icon: \'add-comment-rounded\'}]}>\n <o-link\n underline=\'0\'\n type="primary"\n target="_blank"\n href="https://tencent.github.io/omi/"\n slot="extra">\n More\n </o-link>\n <p>Card content</p>\n <p>Card content</p>\n <p>Card content</p>\n </o-card>\n\n <o-card\n title="DNT\'s card"\n id="myActionB"\n actions={[{icon: \'add-ic-call-rounded\'}]}\n hoverable="true">\n <o-avatar slot="extra">DNT</o-avatar>\n <p>Tel:</p>\n <p>Company:</p>\n <p>...</p>\n </o-card>\n ```\n ',this.mdD='\n ```html\n <o-card \n size="large" \n id="myActionC" \n actions={\n [{icon: \'add-ic-call-rounded\'},\n {icon: \'add-comment-rounded\'}]}\n hoverable="true">\n <o-image\n slot="cover"\n src="https://cdc-old-dcloud-migrate-1258344706.cos.ap-guangzhou.myqcloud.com/data2/material/thumb/1/1190188000/VCG41N1127233809.jpg/thumb">\n </o-image>\n <div style="display: flex; justify-content: space-around; margin: 10px 0px">\n <o-avatar style="margin: auto 0px;"\n src="https://wx.gtimg.com/resource/feuploader/202108/fb85c997c6476acd7a1441043fdda775_204x204.png">\n </o-avatar>\n <div>\n <p style="font-weight: 600; font-size: 1.2em;">Card title</p>\n <p>This is the description</p>\n </div>\n </div>\n </o-card>\n\n <o-card hoverable="true">\n <o-image\n slot="cover"\n src="https://cdc-old-dcloud-migrate-1258344706.cos.ap-guangzhou.myqcloud.com/data2/material/thumb/1/1199435000/VCG211199435578.jpg/thumb">\n </o-image>\n <p style="font-weight: 500>OMI Card</p>\n <p><o-link \n underline=\'0\' \n type="primary" \n target="_blank" \n href="https://tencent.github.io/omi/" \n slot="extra">\n Welcome to OMI\n </o-link></p>\n </o-card>\n ```\n '}installed(){new Masonry(this.grid,{})}render(){const n=tw`px-2 w-full md:w-6/12`;return h("div",{class:tw`px-4`},h("div",{ref:n=>this.grid=n},h("div",{class:tw`${n}`},h("code-demo",{title:"简单卡片",describe:"只包含内容区域",code:this.mdA},h("div",{slot:"demo",class:tw`px-5 py-5`},h("o-card",{title:"Simple Card",hoverable:"always"},h("div",{slot:"cover"}),h("p",null,"Simple Card"),h("p",null,"Card content"),h("p",null,"Card content"))))),h("div",{class:tw`${n}`},h("code-demo",{title:"典型卡片",describe:"包含标题、内容、操作区域(extra)",code:this.mdB},h("div",{slot:"demo",class:tw`px-5 py-5`},h("o-card",{title:"Default size card",hoverable:"always"},h("o-link",{underline:"0",type:"primary",target:"_blank",href:"https://tencent.github.io/omi/",slot:"extra"},"More"),h("p",null,"Card content"),h("p",null,"Card content"),h("p",null,"Card content"))))),h("div",{class:tw`${n}`},h("code-demo",{title:"功能卡片",describe:"支持底部栏添加触发事件(o-icon)",code:this.mdC},h("div",{slot:"demo",class:tw`px-5 py-5`},h("o-card",{title:"Action card",hoverable:"always",size:"medium",id:"myActionA",actions:[{icon:"add-a-photo-rounded"},{icon:"add-ic-call-rounded"},{icon:"add-comment-rounded"}]},h("o-link",{underline:"0",type:"primary",target:"_blank",href:"https://tencent.github.io/omi/",slot:"extra"},"More"),h("p",null,"Card content"),h("p",null,"Card content"),h("p",null,"Card content")),h("o-card",{title:"DNT's card",id:"myActionB",actions:[{icon:"add-ic-call-rounded"}],hoverable:"true"},h("o-avatar",{slot:"extra"},"DNT"),h("p",null,"Tel:"),h("p",null,"Company:"),h("p",null,"..."))))),h("div",{class:tw`${n}`},h("code-demo",{title:"相册卡片",describe:"支持封面、头像、标题和描述信息的卡片",code:this.mdD},h("div",{slot:"demo",class:tw`px-5 py-5`},h("o-card",{title:"Action card",size:"large",id:"myActionC",actions:[{icon:"add-ic-call-rounded"},{icon:"add-comment-rounded"}],hoverable:"true"},h("o-image",{slot:"cover",src:"https://cdc-old-dcloud-migrate-1258344706.cos.ap-guangzhou.myqcloud.com/data2/material/thumb/1/1190188000/VCG41N1127233809.jpg/thumb"}),h("div",{style:"display: flex; justify-content: space-around; margin: 10px 0px"},h("o-avatar",{style:"margin: auto 0px;",src:"https://wx.gtimg.com/resource/feuploader/202108/fb85c997c6476acd7a1441043fdda775_204x204.png"}),h("div",null,h("p",{style:"font-weight: 600; font-size: 1.2em;"},"Card title"),h("p",null,"This is the description")))),h("o-card",{hoverable:"true"},h("o-image",{slot:"cover",src:"https://cdc-old-dcloud-migrate-1258344706.cos.ap-guangzhou.myqcloud.com/data2/material/thumb/1/1199435000/VCG211199435578.jpg/thumb"}),h("p",null,"OMI Card"),h("p",null,h("o-link",{underline:"0",type:"primary",target:"_blank",href:"https://tencent.github.io/omi/",slot:"extra"},"Welcome to OMI"))))))))}};card_component_default.css=sheet.target,card_component_default=__decorateClass([tag(tagName)],card_component_default);export{card_component_default as default};
import config from 'config'; import { omit } from 'lodash'; import Stripe from 'stripe'; import ExpenseStatus from '../../constants/expense_status'; import ExpenseType from '../../constants/expense_type'; import emailLib from '../../lib/email'; import logger from '../../lib/logger'; import { convertToStripeAmount } from '../../lib/stripe'; import models from '../../models'; import { getOrCreateVendor, getVirtualCardForTransaction, persistTransaction } from '../utils'; const providerName = 'stripe'; export const assignCardToCollective = async (cardNumber, expireDate, cvv, name, collectiveId, host, userId) => { const connectedAccount = await host.getAccountForPaymentProvider(providerName); const stripe = getStripeClient(host.slug, connectedAccount.token); const list = await stripe.issuing.cards.list({ last4: cardNumber.slice(-4) }); const cards = list.data; let matchingCard; for (const card of cards) { const stripeCard = await stripe.issuing.cards.retrieve(card.id, { expand: ['number', 'cvc'] }); if ( stripeCard.number === cardNumber && stripeCard.cvc === cvv && stripeCard['exp_month'] === parseInt(expireDate.slice(0, 2)) && stripeCard['exp_year'] === parseInt(expireDate.slice(-4)) ) { matchingCard = stripeCard; break; } } if (!matchingCard) { throw new Error('Could not find a Stripe Card matching the submitted card'); } return createCard(matchingCard, name, collectiveId, host.id, userId); }; export const createVirtualCard = async (host, collective, userId, name, monthlyLimit) => { const connectedAccount = await host.getAccountForPaymentProvider(providerName); const stripe = getStripeClient(host.slug, connectedAccount.token); const cardholders = await stripe.issuing.cardholders.list(); if (cardholders.data.length === 0) { throw new Error(`No cardholder for account ${host.slug}`); } const issuingCard = await stripe.issuing.cards.create({ cardholder: cardholders.data[0].id, currency: host.currency.toLowerCase(), type: 'virtual', status: 'active', // eslint-disable-next-line camelcase spending_controls: { // eslint-disable-next-line camelcase spending_limits: [ { amount: monthlyLimit, interval: 'monthly', }, ], }, metadata: { collective: collective.slug, }, }); const stripeCard = await stripe.issuing.cards.retrieve(issuingCard.id, { expand: ['number', 'cvc'] }); return createCard(stripeCard, name, collective.id, host.id, userId); }; export const updateVirtualCardMonthlyLimit = async (virtualCard, monthlyLimit) => { const host = virtualCard.host; const connectedAccount = await host.getAccountForPaymentProvider(providerName); const stripe = getStripeClient(host.slug, connectedAccount.token); return stripe.issuing.cards.update(virtualCard.id, { // eslint-disable-next-line camelcase spending_controls: { // eslint-disable-next-line camelcase spending_limits: [ { amount: monthlyLimit, interval: 'monthly', }, ], }, }); }; export const deleteCard = async virtualCard => { const host = await models.Collective.findByPk(virtualCard.HostCollectiveId); const connectedAccount = await host.getAccountForPaymentProvider(providerName); const stripe = getStripeClient(host.slug, connectedAccount.token); return stripe.issuing.cards.update(virtualCard.id, { status: 'canceled', }); }; export const processAuthorization = async (stripeAuthorization, stripeEvent) => { const virtualCard = await getVirtualCardForTransaction(stripeAuthorization.card.id); if (!virtualCard) { logger.error(`Stripe: could not find virtual card ${stripeAuthorization.card.id}`, stripeEvent); return; } const host = virtualCard.host; await checkStripeEvent(host, stripeEvent); const existingExpense = await models.Expense.findOne({ where: { VirtualCardId: virtualCard.id, data: { authorizationId: stripeAuthorization.id }, }, }); if (existingExpense) { logger.warn(`Virtual Card authorization already reconciled, ignoring it: ${stripeAuthorization.id}`); return; } const currency = stripeAuthorization.pending_request.currency.toUpperCase(); const amount = convertToStripeAmount(currency, Math.abs(stripeAuthorization.pending_request.amount)); const collective = virtualCard.collective; const balance = await collective.getBalanceWithBlockedFundsAmount({ currency }); const connectedAccount = await host.getAccountForPaymentProvider(providerName); const stripe = getStripeClient(host.slug, connectedAccount.token); if (balance.value >= amount) { await stripe.issuing.authorizations.approve(stripeAuthorization.id); } else { await stripe.issuing.authorizations.decline(stripeAuthorization.id, { // eslint-disable-next-line camelcase metadata: { oc_decline_code: 'collective_balance' }, }); throw new Error('Balance not sufficient'); } const vendor = await getOrCreateVendor( stripeAuthorization['merchant_data']['network_id'], stripeAuthorization['merchant_data']['name'], ); const UserId = virtualCard.UserId; const description = `Virtual Card charge: ${vendor.name}`; const incurredAt = new Date(stripeAuthorization.created * 1000); let expense; try { expense = await models.Expense.create({ UserId, CollectiveId: collective.id, FromCollectiveId: vendor.id, currency, amount, description, VirtualCardId: virtualCard.id, lastEditedById: UserId, status: ExpenseStatus.PROCESSING, type: ExpenseType.CHARGE, incurredAt, data: { authorizationId: stripeAuthorization.id }, }); await models.ExpenseItem.create({ ExpenseId: expense.id, incurredAt, CreatedByUserId: UserId, amount, }); } catch (error) { if (expense) { await models.ExpenseItem.destroy({ where: { ExpenseId: expense.id } }); await expense.destroy(); } throw error; } return expense; }; export const processDeclinedAuthorization = async (stripeAuthorization, stripeEvent) => { const virtualCard = await getVirtualCardForTransaction(stripeAuthorization.card.id); if (!virtualCard) { logger.error(`Stripe: could not find virtual card ${stripeAuthorization.card.id}`, stripeEvent); return; } const host = virtualCard.host; await checkStripeEvent(host, stripeEvent); const reason = stripeAuthorization.metadata.oc_decline_code ? stripeAuthorization.metadata.oc_decline_code : stripeAuthorization.request_history[0].reason; return emailLib.send('authorization.declined', virtualCard.user.email, { reason, cardName: virtualCard.name }); }; export const processTransaction = async (stripeTransaction, stripeEvent) => { const virtualCard = await getVirtualCardForTransaction(stripeTransaction.card); if (!virtualCard) { logger.error(`Stripe: could not find virtual card ${stripeTransaction.card.id}`, stripeEvent); return; } if (stripeEvent) { await checkStripeEvent(virtualCard.host, stripeEvent); } const currency = stripeTransaction.currency.toUpperCase(); const amount = convertToStripeAmount(currency, stripeTransaction.amount); const isRefund = stripeTransaction.type === 'refund'; return persistTransaction(virtualCard, { id: stripeTransaction.id, amount, currency, vendorProviderId: stripeTransaction['merchant_data']['network_id'], vendorName: stripeTransaction['merchant_data']['name'], incurredAt: new Date(stripeTransaction.created * 1000), isRefund, fromAuthorizationId: stripeTransaction.authorization, }); }; const createCard = (stripeCard, name, collectiveId, hostId, userId) => { const cardData = { id: stripeCard.id, name, last4: stripeCard.last4, privateData: { cardNumber: stripeCard.number, expireDate: `${stripeCard['exp_month']}/${stripeCard['exp_year']}`, cvv: stripeCard.cvc, }, data: omit(stripeCard, ['number', 'cvc', 'exp_year', 'exp_month']), CollectiveId: collectiveId, HostCollectiveId: hostId, UserId: userId, provider: 'STRIPE', spendingLimitAmount: stripeCard['spending_controls']['spending_limits'][0]['amount'], spendingLimitInterval: stripeCard['spending_controls']['spending_limits'][0]['interval'].toUpperCase(), currency: stripeCard.currency.toUpperCase(), }; return models.VirtualCard.create(cardData); }; const checkStripeEvent = async (host, stripeEvent) => { const connectedAccount = await host.getAccountForPaymentProvider(providerName); const stripe = getStripeClient(host.slug, connectedAccount.token); try { stripe.webhooks.constructEvent( stripeEvent.rawBody, stripeEvent.signature, connectedAccount.data.stripeEndpointSecret, ); } catch { throw new Error('Source of event not recognized'); } }; const getStripeClient = (slug, token) => { const secretKey = slug === 'opencollective' ? config.stripe.secret : token; return Stripe(secretKey); };
import React, { Component, Fragment, useState, useEffect } from 'react'; import Users from './Users'; import ErrorBoundary from './ErrorBoundary'; import classes from './UserFinder.module.css'; const DUMMY_USERS = [ { id: 'u1', name: 'Max' }, { id: 'u2', name: 'Manuel' }, { id: 'u3', name: 'Julie' }, ]; // const UserFinder = () => { // const [filteredUsers, setFilteredUsers] = useState(DUMMY_USERS); // const [searchTerm, setSearchTerm] = useState(''); // useEffect(() => { // setFilteredUsers( // DUMMY_USERS.filter((user) => user.name.includes(searchTerm)) // ); // }, [searchTerm]); // const searchChangeHandler = (event) => { // setSearchTerm(event.target.value); // }; // return ( // <Fragment> // <div className={ classes.finder }> // <input type='search' onChange={searchChangeHandler} /> // </div> // <Users users={filteredUsers} /> // </Fragment> // ); // }; class UserFinder extends Component { constructor() { super(); this.state = { filteredUsers: [], searchTerm: '' }; } componentDidMount() { console.log('componentDidMount called...'); this.setState({ filteredUsers: DUMMY_USERS }); } // Using the `componentDidUpdate()` lifecycle hook method // to update the `filteredUsers` state whenever the `searchTerm` // state is updated. The `componentDidUpdate()` lifecycle hook method // receives the `prevProps` and `prevState` as arguments so that // we can compare the previous values on either the `props` or `state` // to their current values thus preventing infinite loops. These checks // are equivalent to the dependency array we pass to the `useEffect()` // hook in functional components componentDidUpdate(prevProps, prevState) { console.log('componentDidUpdate called...'); const { searchTerm } = this.state; if (prevState.searchTerm !== searchTerm) { const filteredUsers = DUMMY_USERS.filter(user => user.name.includes(searchTerm)); this.setState({ filteredUsers }); } } searchChangeHandler(event) { this.setState({ searchTerm: event.target.value }); } render() { console.log('render called...'); const { filteredUsers } = this.state; return ( <Fragment> <div className={ classes.finder }> <input type='search' onChange={ this.searchChangeHandler.bind(this) } /> </div> {/* Using the `ErrorBoundary` component to wrap the `Users` component which can throw an error */} <ErrorBoundary> <Users users={ filteredUsers } /> </ErrorBoundary> </Fragment> ); } } export default UserFinder;
export default Vue.component('button-group', { template: ` <div class="button-group"> <slot></slot> </div> `, })
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. 'use strict'; /** @suppress {duplicate} */ var remoting = remoting || {}; /** @constructor */ remoting.MessageWindowOptions = function() { /** @type {string} */ this.title = ''; /** @type {string} */ this.message = ''; /** @type {string} */ this.buttonLabel = ''; /** @type {string} */ this.cancelButtonLabel = ''; /** @type {function(number):void} */ this.onResult = function() {}; /** @type {number} */ this.duration = 0; /** @type {string} */ this.infobox = ''; /** @type {?function():void} */ this.onTimeout = function() {}; /** @type {string} */ this.htmlFile = ''; /** @type {string} */ this.frame = ''; /** @type {number} */ this.minimumWidth = 0; }; /** * Create a new message window. * * @param {remoting.MessageWindowOptions} options Message window create options * @constructor */ remoting.MessageWindow = function(options) { var title = options.title; var message = options.message; var okButtonLabel = options.buttonLabel; var cancelButtonLabel = options.cancelButtonLabel; var onResult = options.onResult; var duration = 0; if (options.duration) { duration = options.duration; } var infobox = ''; if (options.infobox) { infobox = options.infobox; } var onTimeout = options.onTimeout; /** @type {number} */ this.id_ = remoting.messageWindowManager.addMessageWindow(this); /** @type {?function(number):void} */ this.onResult_ = onResult; /** @type {Window} */ this.window_ = null; /** @type {number} */ this.timer_ = 0; /** @type {Array<function():void>} */ this.pendingWindowOperations_ = []; /** * Callback to call when the timeout expires. * @type {?function():void} */ this.onTimeout_ = onTimeout; var message_struct = { command: 'show', id: this.id_, title: title, message: message, infobox: infobox, buttonLabel: okButtonLabel, cancelButtonLabel: cancelButtonLabel, showSpinner: (duration != 0) }; var windowAttributes = { bounds: { width: options.minimumWidth || 400, height: 100, top: undefined, left: undefined }, resizable: false, frame: options.frame || 'chrome' }; /** @type {remoting.MessageWindow} */ var that = this; /** @param {chrome.app.window.AppWindow} appWindow */ var onCreate = function(appWindow) { that.setWindow_(/** @type {Window} */(appWindow.contentWindow)); var onLoad = function() { appWindow.contentWindow.postMessage(message_struct, '*'); }; appWindow.contentWindow.addEventListener('load', onLoad, false); }; var htmlFile = options.htmlFile || 'message_window.html'; chrome.app.window.create( remoting.MessageWindow.htmlFilePrefix + htmlFile, windowAttributes, onCreate); if (duration != 0) { this.timer_ = window.setTimeout(this.onTimeoutHandler_.bind(this), duration); } }; /** * This string is prepended to the htmlFile when message windows are created. * Normally, this should be left empty, but the shared module needs to specify * this so that the shared HTML files can be found when running in the * context of the app stub. * @type {string} */ remoting.MessageWindow.htmlFilePrefix = ""; /** * Called when the timer runs out. This in turn calls the window's * timeout handler (if any). */ remoting.MessageWindow.prototype.onTimeoutHandler_ = function() { this.close(); if (this.onTimeout_) { this.onTimeout_(); } }; /** * Update the message being shown in the window. This should only be called * after the window has been shown. * * @param {string} message The message. */ remoting.MessageWindow.prototype.updateMessage = function(message) { if (!this.window_) { this.pendingWindowOperations_.push(this.updateMessage.bind(this, message)); return; } var message_struct = { command: 'update_message', message: message }; this.window_.postMessage(message_struct, '*'); }; /** * Close the message box and unregister it with the window manager. */ remoting.MessageWindow.prototype.close = function() { if (!this.window_) { this.pendingWindowOperations_.push(this.close.bind(this)); return; } if (this.timer_) { window.clearTimeout(this.timer_); } this.timer_ = 0; // Unregister the window with the window manager. // After this call, events sent to this window will no longer trigger the // onResult callback. remoting.messageWindowManager.deleteMessageWindow(this.id_); this.window_.close(); this.window_ = null; }; /** * Dispatch a message box result to the registered callback. * * @param {number} result The dialog result. */ remoting.MessageWindow.prototype.handleResult = function(result) { if (this.onResult_) { this.onResult_(result); } } /** * Set the window handle and run any pending operations that require it. * * @param {Window} window * @private */ remoting.MessageWindow.prototype.setWindow_ = function(window) { console.assert(this.window_ == null, 'Duplicate call to setWindow_().'); this.window_ = window; for (var i = 0; i < this.pendingWindowOperations_.length; ++i) { var pendingOperation = this.pendingWindowOperations_[i]; pendingOperation(); } this.pendingWindowOperations_ = []; }; /** * Static method to create and show a confirm message box. * * @param {string} title The title of the message box. * @param {string} message The message. * @param {string} okButtonLabel The text for the primary button. * @param {string} cancelButtonLabel The text for the secondary button. * @param {function(number):void} onResult The callback to invoke when the * user closes the message window. * @return {remoting.MessageWindow} */ remoting.MessageWindow.showConfirmWindow = function( title, message, okButtonLabel, cancelButtonLabel, onResult) { var options = /** @type {remoting.MessageWindowOptions} */ ({ title: title, message: message, buttonLabel: okButtonLabel, cancelButtonLabel: cancelButtonLabel, onResult: onResult }); return new remoting.MessageWindow(options); }; /** * Static method to create and show a simple message box. * * @param {string} title The title of the message box. * @param {string} message The message. * @param {string} buttonLabel The text for the primary button. * @param {function(number):void} onResult The callback to invoke when the * user closes the message window. * @return {remoting.MessageWindow} */ remoting.MessageWindow.showMessageWindow = function( title, message, buttonLabel, onResult) { var options = /** @type {remoting.MessageWindowOptions} */ ({ title: title, message: message, buttonLabel: buttonLabel, onResult: onResult }); return new remoting.MessageWindow(options); }; /** * Static method to create and show an error message box with an "OK" button. * The app will close when the user dismisses the message window. * * @param {string} title The title of the message box. * @param {string} message The message. * @return {remoting.MessageWindow} */ remoting.MessageWindow.showErrorMessage = function(title, message) { var options = /** @type {remoting.MessageWindowOptions} */ ({ title: title, message: message, buttonLabel: chrome.i18n.getMessage(/*i18n-content*/'OK'), onResult: remoting.MessageWindow.quitApp }); return new remoting.MessageWindow(options); }; /** * Cancel the current connection and close all app windows. * * @param {number} result The dialog result. */ remoting.MessageWindow.quitApp = function(result) { remoting.messageWindowManager.closeAllMessageWindows(); window.close(); };
#!/usr/bin/env python # -*- coding:utf-8 -*- # @File: uuv.py """ 综合管理操作类预置库 """ from envlib.env.envlogging import logger from envlib.env.globals import current_app as app from envlib.env.globals import g from envlib.env.helpers import GetKeysMixin from envlib.util import Md5 from resources.data import SMB_SHARE_PATH, TAG_LIST __all__ = ['Uuv', ] class Uuv(GetKeysMixin): """综合管理操作类""" def __init__(self): pass @classmethod def query_uuv_department_by_rest(cls, check=False, **kwargs): """传入params,查询部门信息 查询结果绑定到 当前运行的Env实例关联的上下文环境信息AppCtxGlobals实例的代理 ``g`` 下:: key='uuv_department_list', value=查询接口返回值,部门信息 Args: check (bool): 接口返回状态码校验,默认不校验 **kwargs: 可选字典项 Returns: rest接口返回值,部门信息 """ params = {"path": True, "type": 1} params.update(**kwargs) res = app.send_by_rest('/api/demo@get', params=params, check=check) app.bind_to_g(key='uuv_department_list', value=res[0].get('child'), lock=False) return res[0].get('child') @classmethod def query_department_index_via_dep_name(cls, dep_name="api"): """传入部门名,查询部门org_index Args: dep_name (str): 部门名称 Returns: 部门org_index """ cls.query_uuv_department_by_rest() dep_info = g.getk('uuv_department_list').extracting('org_index', filter={'org_name': dep_name}) return dep_info @classmethod def query_department_info_via_dep_name(cls, dep_name="api", info=('org_index',)): """传入部门名及可选参数,查询部门info Args: dep_name (str): 部门名称 info (tuple): 部门信息元组,例如 ('org_index',) Returns: 部门info """ cls.query_uuv_department_by_rest() logger.info(f"查询组织 {dep_name} 的 {info} 信息") dep_info = g.getk('uuv_department_list').extracting(*info, filter={'org_name': dep_name}) return dep_info @classmethod def add_uuv_department_by_rest_via_json(cls, json, check=False): """传入json,添加部门信息 Args: json (any): json数据结构 check (bool): 接口返回状态码校验,默认不校验 Returns: rest接口返回值 """ res = app.send_by_rest('/api/demo@post', json=json, check=check) cls.query_uuv_department_by_rest() return res @classmethod def import_uuv_department_by_rest_via_smb(cls, data, headers, check=False): """读取 env.ini指定share_path ``\\\\1.1.1.1\\info\\auto\\`` 下的 ``部门导入模板.xlsx`` 导入部门信息 Args: data (any): 接口data数据结构 headers (dict): rest请求headers check (bool): 接口返回状态码校验,默认不校验 Returns: rest接口返回值 """ res = app.send_by_rest('/api/demo@post', data=data, headers=headers, check=check) cls.query_uuv_department_by_rest() return res @classmethod def add_uuv_department_by_rest_via_dep_name(cls, dep_name): """传入部门名称,添加部门信息 Args: dep_name(str): 组织名称,约定只用数字、字母、中划线 Returns: rest接口返回值 """ _department_list = cls.query_uuv_department_by_rest() _exist_department_list = [dept for dept in _department_list if dept.get('org_name') == dep_name] if not _exist_department_list: # 未添加 _json = { "parent_id": 1, "org_parent_index": "1", "org_name": dep_name, "org_index": Md5.md5_str(dep_name), "type": "1" } cls.add_uuv_department_by_rest_via_json(json=_json) else: logger.warning(f'所添加的部门 "{dep_name}" 重复,将跳过') return cls.query_uuv_department_by_rest() @classmethod def batch_add_uuv_department_from_env_ini(cls): """批量从env的配置文件中,添加tag_list下的部门信息 Returns: rest接口返回值 """ for org_name in TAG_LIST: cls.add_uuv_department_by_rest_via_dep_name(dep_name=org_name) @classmethod def import_uuv_department_from_excel(cls): """读取 env.ini指定share_path ``\\\\1.1.1.1\\info\\auto\\`` 下的 ``部门导入模板.xlsx`` 导入部门信息 Returns: rest接口返回值 """ # 查询部门 _department_list = cls.query_uuv_department_by_rest() _exist_department_list = [dept for dept in _department_list if dept.get('org_name') == 'common'] if not _exist_department_list: # 未导入部门 _department_xlsx_file = '部门导入模板.xlsx' _department_xlsx_file_path = SMB_SHARE_PATH + _department_xlsx_file data, headers = app.smb_upload_excel(file_name=_department_xlsx_file_path) cls.import_uuv_department_by_rest_via_smb(data=data, headers=headers) @classmethod def query_uuv_organization_by_rest(cls, check=False, **kwargs): """查询组织list 查询结果绑定到 当前运行的Env实例关联的上下文环境信息AppCtxGlobals实例的代理 ``g`` 下:: key='uuv_organization_list', value=查询接口返回值,组织信息 Args: check (bool): 接口返回状态码校验,默认不校验 **kwargs: 可选字典项 Returns: rest接口返回值,组织信息 """ params = {'type': 0, 'page_index': 1, 'page_size': 200} params.update(**kwargs) res = app.send_by_rest('/api/demo@get', params=params, check=check) app.bind_to_g(key='uuv_organization_list', value=res.get('data'), lock=False) return res.get('data') @classmethod def query_organization_index_via_org_name(cls, org_name="本域"): """传入组织名,查询组织id Args: org_name (str): 组织名 Returns: 组织index值 """ cls.query_uuv_organization_by_rest() org_index = g.getk('uuv_organization_list').extracting('org_index', filter={'org_name': org_name}) return org_index @classmethod def query_organization_info_via_org_name(cls, org_name="本域", info=('org_index',)): """传入组织名及可选参数,查询组织info Args: org_name (str): 组织名 info (tuple): 组织信息元组,例如 ('org_index',) Returns: org_info """ cls.query_uuv_organization_by_rest() logger.info(f"查询组织 {org_name} 的 {info} 信息") org_info = g.getk('uuv_organization_list').extracting(*info, filter={'org_name': org_name}) return org_info @classmethod def add_uuv_organization_by_rest_via_json(cls, json, check=False): """添加组织 Args: json (any): json数据结构 check (bool): 接口返回状态码校验,默认不校验 Returns: rest接口返回值 """ res = app.send_by_rest('/api/demo@post', json=json, check=check) cls.query_uuv_organization_by_rest() return res @classmethod def import_uuv_organization_via_smb(cls, data, headers, check=False): """读取 env.ini指定share_path ``\\\\1.1.1.1\\info\\auto\\`` 下的 ``组织表.xlsx`` 导入组织信息 Args: data (any): 接口data数据结构 headers (dict): rest请求headers check (bool): 接口返回状态码校验,默认不校验 Returns: rest接口返回值 """ res = app.send_by_rest('/api/demo@post', data=data, headers=headers, check=check) cls.query_uuv_organization_by_rest() return res @classmethod def add_uuv_organization_via_org_name(cls, org_name): """添加组织信息 Args: org_name(str): 组织名称 Returns: None or rest接口返回值 """ _organization_list = cls.query_uuv_organization_by_rest() _exist_organization_list = [org for org in _organization_list if org.get('org_name') == org_name] if not _exist_organization_list: # 未导入组织 # 未添加 _json = { "type": "0", "parent_id": 2, "org_name": org_name, "region_code": "500100", "description": "", "street": "", "is_region": False } cls.add_uuv_organization_by_rest_via_json(json=_json) else: logger.warning(f'所添加的组织 "{org_name}" 重复,将跳过') @classmethod def batch_add_uuv_organization_from_env_ini(cls): """批量从env的配置文件中,添加tag_list下的组织信息,并绑定到 ``common`` tag下 Returns: rest接口返回值 """ for org_name in TAG_LIST: cls.add_uuv_organization_via_org_name(org_name=org_name) @classmethod def import_uuv_organization_from_excel(cls): """读取 env.ini指定share_path ``\\\\1.1.1.1\\info\\auto\\`` 下的 ``组织表.xlsx`` 导入组织信息 Returns: rest接口返回值 """ # 查询组织 _organization_list = cls.query_uuv_organization_by_rest() _exist_organization_list = [org for org in _organization_list if org.get('org_name') == 'common'] if not _exist_organization_list: # 未导入组织 _organization_xlsx_file = '组织表.xlsx' _organization_xlsx_file_path = SMB_SHARE_PATH + _organization_xlsx_file data, headers = app.smb_upload_excel(file_name=_organization_xlsx_file_path) cls.import_uuv_organization_via_smb(data=data, headers=headers) if __name__ == '__main__': pass
define(['modules/proposal/visit_list', 'templates/types/saxs/proposal/visitlinks.html'], function(VisitList, visitlinks) { return VisitList.extend({ linksTemplate: visitlinks, clickable: true, }) })
/* * * * * * * * * * * * * * * * * * * * * * * * * This logs every MIDI event to the console * * * * * * * * * * * * * * * * * * * * * * * * */ function HandleMIDI(event) { event.trace(); }
/* Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.lang['mk']={"wsc":{"btnIgnore":"Ignore","btnIgnoreAll":"Ignore All","btnReplace":"Replace","btnReplaceAll":"Replace All","btnUndo":"Undo","changeTo":"Change to","errorLoading":"Error loading application service host: %s.","ieSpellDownload":"Spell checker not installed. Do you want to download it now?","manyChanges":"Spell check complete: %1 words changed","noChanges":"Spell check complete: No words changed","noMispell":"Spell check complete: No misspellings found","noSuggestions":"- No suggestions -","notAvailable":"Sorry, but service is unavailable now.","notInDic":"Not in dictionary","oneChange":"Spell check complete: One word changed","progress":"Spell check in progress...","title":"Spell Check","toolbar":"Check Spelling"},"scayt":{"about":"About SCAYT","aboutTab":"About","addWord":"Add Word","allCaps":"Ignore All-Caps Words","dic_create":"Create","dic_delete":"Delete","dic_field_name":"Dictionary name","dic_info":"Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.","dic_rename":"Rename","dic_restore":"Restore","dictionariesTab":"Dictionaries","disable":"Disable SCAYT","emptyDic":"Dictionary name should not be empty.","enable":"Enable SCAYT","ignore":"Ignore","ignoreAll":"Ignore All","ignoreDomainNames":"Ignore Domain Names","langs":"Languages","languagesTab":"Languages","mixedCase":"Ignore Words with Mixed Case","mixedWithDigits":"Ignore Words with Numbers","moreSuggestions":"More suggestions","opera_title":"Not supported by Opera","options":"Options","optionsTab":"Options","title":"Spell Check As You Type","toggle":"Toggle SCAYT","noSuggestions":"No suggestion"},"undo":{"redo":"Redo","undo":"Undo"},"toolbar":{"toolbarCollapse":"Collapse Toolbar","toolbarExpand":"Expand Toolbar","toolbarGroups":{"document":"Document","clipboard":"Clipboard/Undo","editing":"Editing","forms":"Forms","basicstyles":"Basic Styles","paragraph":"Paragraph","links":"Links","insert":"Insert","styles":"Styles","colors":"Colors","tools":"Tools"},"toolbars":"Editor toolbars"},"templates":{"button":"Templates","emptyListMsg":"(No templates defined)","insertOption":"Replace actual contents","options":"Template Options","selectPromptMsg":"Please select the template to open in the editor","title":"Content Templates"},"table":{"border":"Border size","caption":"Caption","cell":{"menu":"Cell","insertBefore":"Insert Cell Before","insertAfter":"Insert Cell After","deleteCell":"Delete Cells","merge":"Merge Cells","mergeRight":"Merge Right","mergeDown":"Merge Down","splitHorizontal":"Split Cell Horizontally","splitVertical":"Split Cell Vertically","title":"Cell Properties","cellType":"Cell Type","rowSpan":"Rows Span","colSpan":"Columns Span","wordWrap":"Word Wrap","hAlign":"Horizontal Alignment","vAlign":"Vertical Alignment","alignBaseline":"Baseline","bgColor":"Background Color","borderColor":"Border Color","data":"Data","header":"Header","yes":"Yes","no":"No","invalidWidth":"Cell width must be a number.","invalidHeight":"Cell height must be a number.","invalidRowSpan":"Rows span must be a whole number.","invalidColSpan":"Columns span must be a whole number.","chooseColor":"Choose"},"cellPad":"Cell padding","cellSpace":"Cell spacing","column":{"menu":"Column","insertBefore":"Insert Column Before","insertAfter":"Insert Column After","deleteColumn":"Delete Columns"},"columns":"Columns","deleteTable":"Delete Table","headers":"Headers","headersBoth":"Both","headersColumn":"First column","headersNone":"None","headersRow":"First Row","invalidBorder":"Border size must be a number.","invalidCellPadding":"Cell padding must be a positive number.","invalidCellSpacing":"Cell spacing must be a positive number.","invalidCols":"Number of columns must be a number greater than 0.","invalidHeight":"Table height must be a number.","invalidRows":"Number of rows must be a number greater than 0.","invalidWidth":"Table width must be a number.","menu":"Table Properties","row":{"menu":"Row","insertBefore":"Insert Row Before","insertAfter":"Insert Row After","deleteRow":"Delete Rows"},"rows":"Rows","summary":"Summary","title":"Table Properties","toolbar":"Table","widthPc":"percent","widthPx":"pixels","widthUnit":"width unit"},"stylescombo":{"label":"Styles","panelTitle":"Formatting Styles","panelTitle1":"Block Styles","panelTitle2":"Inline Styles","panelTitle3":"Object Styles"},"specialchar":{"options":"Special Character Options","title":"Select Special Character","toolbar":"Insert Special Character"},"sourcearea":{"toolbar":"Source"},"smiley":{"options":"Smiley Options","title":"Insert a Smiley","toolbar":"Smiley"},"showblocks":{"toolbar":"Show Blocks"},"selectall":{"toolbar":"Select All"},"save":{"toolbar":"Save"},"removeformat":{"toolbar":"Remove Format"},"print":{"toolbar":"Print"},"preview":{"preview":"Preview"},"pastetext":{"button":"Paste as plain text","title":"Paste as Plain Text"},"pastefromword":{"confirmCleanup":"The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?","error":"It was not possible to clean up the pasted data due to an internal error","title":"Paste from Word","toolbar":"Paste from Word"},"pagebreak":{"alt":"Page Break","toolbar":"Insert Page Break for Printing"},"newpage":{"toolbar":"New Page"},"maximize":{"maximize":"Maximize","minimize":"Minimize"},"magicline":{"title":"Insert paragraph here"},"liststyle":{"armenian":"Armenian numbering","bulletedTitle":"Bulleted List Properties","circle":"Circle","decimal":"Decimal (1, 2, 3, etc.)","decimalLeadingZero":"Decimal leading zero (01, 02, 03, etc.)","disc":"Disc","georgian":"Georgian numbering (an, ban, gan, etc.)","lowerAlpha":"Lower Alpha (a, b, c, d, e, etc.)","lowerGreek":"Lower Greek (alpha, beta, gamma, etc.)","lowerRoman":"Lower Roman (i, ii, iii, iv, v, etc.)","none":"None","notset":"<not set>","numberedTitle":"Numbered List Properties","square":"Square","start":"Start","type":"Type","upperAlpha":"Upper Alpha (A, B, C, D, E, etc.)","upperRoman":"Upper Roman (I, II, III, IV, V, etc.)","validateStartNumber":"List start number must be a whole number."},"list":{"bulletedlist":"Insert/Remove Bulleted List","numberedlist":"Insert/Remove Numbered List"},"link":{"acccessKey":"Access Key","advanced":"Advanced","advisoryContentType":"Advisory Content Type","advisoryTitle":"Advisory Title","anchor":{"toolbar":"Anchor","menu":"Edit Anchor","title":"Anchor Properties","name":"Anchor Name","errorName":"Please type the anchor name","remove":"Remove Anchor"},"anchorId":"By Element Id","anchorName":"By Anchor Name","charset":"Linked Resource Charset","cssClasses":"Stylesheet Classes","emailAddress":"E-Mail Address","emailBody":"Message Body","emailSubject":"Message Subject","id":"Id","info":"Link Info","langCode":"Language Code","langDir":"Language Direction","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","menu":"Edit Link","name":"Name","noAnchors":"(No anchors available in the document)","noEmail":"Please type the e-mail address","noUrl":"Please type the link URL","other":"<other>","popupDependent":"Dependent (Netscape)","popupFeatures":"Popup Window Features","popupFullScreen":"Full Screen (IE)","popupLeft":"Left Position","popupLocationBar":"Location Bar","popupMenuBar":"Menu Bar","popupResizable":"Resizable","popupScrollBars":"Scroll Bars","popupStatusBar":"Status Bar","popupToolbar":"Toolbar","popupTop":"Top Position","rel":"Relationship","selectAnchor":"Select an Anchor","styles":"Style","tabIndex":"Tab Index","target":"Target","targetFrame":"<frame>","targetFrameName":"Target Frame Name","targetPopup":"<popup window>","targetPopupName":"Popup Window Name","title":"Link","toAnchor":"Link to anchor in the text","toEmail":"E-mail","toUrl":"URL","toolbar":"Link","type":"Link Type","unlink":"Unlink","upload":"Upload"},"justify":{"block":"Justify","center":"Center","left":"Align Left","right":"Align Right"},"indent":{"indent":"Increase Indent","outdent":"Decrease Indent"},"image":{"alertUrl":"Please type the image URL","alt":"Alternative Text","border":"Border","btnUpload":"Send it to the Server","button2Img":"Do you want to transform the selected image button on a simple image?","hSpace":"HSpace","img2Button":"Do you want to transform the selected image on a image button?","infoTab":"Image Info","linkTab":"Link","lockRatio":"Lock Ratio","menu":"Image Properties","resetSize":"Reset Size","title":"Image Properties","titleButton":"Image Button Properties","upload":"Upload","urlMissing":"Image source URL is missing.","vSpace":"VSpace","validateBorder":"Border must be a whole number.","validateHSpace":"HSpace must be a whole number.","validateVSpace":"VSpace must be a whole number."},"iframe":{"border":"Show frame border","noUrl":"Please type the iframe URL","scrolling":"Enable scrollbars","title":"IFrame Properties","toolbar":"IFrame"},"horizontalrule":{"toolbar":"Insert Horizontal Line"},"forms":{"button":{"title":"Button Properties","text":"Text (Value)","type":"Type","typeBtn":"Button","typeSbm":"Submit","typeRst":"Reset"},"checkboxAndRadio":{"checkboxTitle":"Checkbox Properties","radioTitle":"Radio Button Properties","value":"Value","selected":"Selected"},"form":{"title":"Form Properties","menu":"Form Properties","action":"Action","method":"Method","encoding":"Encoding"},"hidden":{"title":"Hidden Field Properties","name":"Name","value":"Value"},"select":{"title":"Selection Field Properties","selectInfo":"Select Info","opAvail":"Available Options","value":"Value","size":"Size","lines":"lines","chkMulti":"Allow multiple selections","opText":"Text","opValue":"Value","btnAdd":"Add","btnModify":"Modify","btnUp":"Up","btnDown":"Down","btnSetValue":"Set as selected value","btnDelete":"Delete"},"textarea":{"title":"Textarea Properties","cols":"Columns","rows":"Rows"},"textfield":{"title":"Text Field Properties","name":"Name","value":"Value","charWidth":"Character Width","maxChars":"Maximum Characters","type":"Type","typeText":"Text","typePass":"Password","typeEmail":"Email","typeSearch":"Search","typeTel":"Telephone Number","typeUrl":"URL"}},"format":{"label":"Format","panelTitle":"Paragraph Format","tag_address":"Address","tag_div":"Normal (DIV)","tag_h1":"Heading 1","tag_h2":"Heading 2","tag_h3":"Heading 3","tag_h4":"Heading 4","tag_h5":"Heading 5","tag_h6":"Heading 6","tag_p":"Normal","tag_pre":"Formatted"},"font":{"fontSize":{"label":"Size","voiceLabel":"Font Size","panelTitle":"Font Size"},"label":"Font","panelTitle":"Font Name","voiceLabel":"Font"},"flash":{"access":"Script Access","accessAlways":"Always","accessNever":"Never","accessSameDomain":"Same domain","alignAbsBottom":"Abs Bottom","alignAbsMiddle":"Abs Middle","alignBaseline":"Baseline","alignTextTop":"Text Top","bgcolor":"Background color","chkFull":"Allow Fullscreen","chkLoop":"Loop","chkMenu":"Enable Flash Menu","chkPlay":"Auto Play","flashvars":"Variables for Flash","hSpace":"HSpace","properties":"Flash Properties","propertiesTab":"Properties","quality":"Quality","qualityAutoHigh":"Auto High","qualityAutoLow":"Auto Low","qualityBest":"Best","qualityHigh":"High","qualityLow":"Low","qualityMedium":"Medium","scale":"Scale","scaleAll":"Show all","scaleFit":"Exact Fit","scaleNoBorder":"No Border","title":"Flash Properties","vSpace":"VSpace","validateHSpace":"HSpace must be a number.","validateSrc":"URL must not be empty.","validateVSpace":"VSpace must be a number.","windowMode":"Window mode","windowModeOpaque":"Opaque","windowModeTransparent":"Transparent","windowModeWindow":"Window"},"find":{"find":"Find","findOptions":"Find Options","findWhat":"Find what:","matchCase":"Match case","matchCyclic":"Match cyclic","matchWord":"Match whole word","notFoundMsg":"The specified text was not found.","replace":"Replace","replaceAll":"Replace All","replaceSuccessMsg":"%1 occurrence(s) replaced.","replaceWith":"Replace with:","title":"Find and Replace"},"fakeobjects":{"anchor":"Anchor","flash":"Flash Animation","hiddenfield":"Hidden Field","iframe":"IFrame","unknown":"Unknown Object"},"elementspath":{"eleLabel":"Elements path","eleTitle":"%1 element"},"div":{"IdInputLabel":"Id","advisoryTitleInputLabel":"Advisory Title","cssClassInputLabel":"Stylesheet Classes","edit":"Edit Div","inlineStyleInputLabel":"Inline Style","langDirLTRLabel":"Left to Right (LTR)","langDirLabel":"Language Direction","langDirRTLLabel":"Right to Left (RTL)","languageCodeInputLabel":" Language Code","remove":"Remove Div","styleSelectLabel":"Style","title":"Create Div Container","toolbar":"Create Div Container"},"contextmenu":{"options":"Context Menu Options"},"colordialog":{"clear":"Clear","highlight":"Highlight","options":"Color Options","selected":"Selected Color","title":"Select color"},"colorbutton":{"auto":"Automatic","bgColorTitle":"Background Color","colors":{"000":"Black","800000":"Maroon","8B4513":"Saddle Brown","2F4F4F":"Dark Slate Gray","008080":"Teal","000080":"Navy","4B0082":"Indigo","696969":"Dark Gray","B22222":"Fire Brick","A52A2A":"Brown","DAA520":"Golden Rod","006400":"Dark Green","40E0D0":"Turquoise","0000CD":"Medium Blue","800080":"Purple","808080":"Gray","F00":"Red","FF8C00":"Dark Orange","FFD700":"Gold","008000":"Green","0FF":"Cyan","00F":"Blue","EE82EE":"Violet","A9A9A9":"Dim Gray","FFA07A":"Light Salmon","FFA500":"Orange","FFFF00":"Yellow","00FF00":"Lime","AFEEEE":"Pale Turquoise","ADD8E6":"Light Blue","DDA0DD":"Plum","D3D3D3":"Light Grey","FFF0F5":"Lavender Blush","FAEBD7":"Antique White","FFFFE0":"Light Yellow","F0FFF0":"Honeydew","F0FFFF":"Azure","F0F8FF":"Alice Blue","E6E6FA":"Lavender","FFF":"White"},"more":"More Colors...","panelTitle":"Colors","textColorTitle":"Text Color"},"clipboard":{"copy":"Copy","copyError":"Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).","cut":"Cut","cutError":"Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).","paste":"Paste","pasteArea":"Paste Area","pasteMsg":"Please paste inside the following box using the keyboard (<strong>Ctrl/Cmd+V</strong>) and hit OK","securityMsg":"Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.","title":"Paste"},"blockquote":{"toolbar":"Block Quote"},"bidi":{"ltr":"Text direction from left to right","rtl":"Text direction from right to left"},"basicstyles":{"bold":"Bold","italic":"Italic","strike":"Strike Through","subscript":"Subscript","superscript":"Superscript","underline":"Underline"},"about":{"copy":"Copyright &copy; $1. All rights reserved.","dlgTitle":"About CKEditor","help":"Check $1 for help.","moreInfo":"For licensing information please visit our web site:","title":"About CKEditor","userGuide":"CKEditor User's Guide"},"editor":"Rich Text Editor","common":{"editorHelp":"Press ALT 0 for help","browseServer":"Browse Server","url":"URL","protocol":"Protocol","upload":"Upload","uploadSubmit":"Send it to the Server","image":"Image","flash":"Flash","form":"Form","checkbox":"Checkbox","radio":"Radio Button","textField":"Text Field","textarea":"Textarea","hiddenField":"Hidden Field","button":"Button","select":"Selection Field","imageButton":"Image Button","notSet":"<not set>","id":"Id","name":"Name","langDir":"Language Direction","langDirLtr":"Left to Right (LTR)","langDirRtl":"Right to Left (RTL)","langCode":"Language Code","longDescr":"Long Description URL","cssClass":"Stylesheet Classes","advisoryTitle":"Advisory Title","cssStyle":"Style","ok":"OK","cancel":"Cancel","close":"Close","preview":"Preview","resize":"Resize","generalTab":"Општо","advancedTab":"Advanced","validateNumberFailed":"This value is not a number.","confirmNewPage":"Any unsaved changes to this content will be lost. Are you sure you want to load new page?","confirmCancel":"Some of the options have been changed. Are you sure to close the dialog?","options":"Options","target":"Target","targetNew":"New Window (_blank)","targetTop":"Topmost Window (_top)","targetSelf":"Same Window (_self)","targetParent":"Parent Window (_parent)","langDirLTR":"Left to Right (LTR)","langDirRTL":"Right to Left (RTL)","styles":"Style","cssClasses":"Stylesheet Classes","width":"Width","height":"Height","align":"Alignment","alignLeft":"Left","alignRight":"Right","alignCenter":"Center","alignTop":"Top","alignMiddle":"Middle","alignBottom":"Bottom","invalidValue":"Invalid value.","invalidHeight":"Height must be a number.","invalidWidth":"Width must be a number.","invalidCssLength":"Value specified for the \"%1\" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).","invalidHtmlLength":"Value specified for the \"%1\" field must be a positive number with or without a valid HTML measurement unit (px or %).","invalidInlineStyle":"Value specified for the inline style must consist of one or more tuples with the format of \"name : value\", separated by semi-colons.","cssLengthTooltip":"Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).","unavailable":"%1<span class=\"cke_accessibility\">, unavailable</span>"}}
import { __extends } from "tslib"; import { GetSessionTokenRequest, GetSessionTokenResponse } from "../models/models_0"; import { deserializeAws_queryGetSessionTokenCommand, serializeAws_queryGetSessionTokenCommand, } from "../protocols/Aws_query"; import { getSerdePlugin } from "@aws-sdk/middleware-serde"; import { getAwsAuthPlugin } from "@aws-sdk/middleware-signing"; import { Command as $Command } from "@aws-sdk/smithy-client"; /** * <p>Returns a set of temporary credentials for an AWS account or IAM user. The * credentials consist of an access key ID, a secret access key, and a security token. * Typically, you use <code>GetSessionToken</code> if you want to use MFA to protect * programmatic calls to specific AWS API operations like Amazon EC2 <code>StopInstances</code>. * MFA-enabled IAM users would need to call <code>GetSessionToken</code> and submit an MFA * code that is associated with their MFA device. Using the temporary security credentials * that are returned from the call, IAM users can then make programmatic calls to API * operations that require MFA authentication. If you do not supply a correct MFA code, then * the API returns an access denied error. For a comparison of <code>GetSessionToken</code> * with the other API operations that produce temporary credentials, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html">Requesting * Temporary Security Credentials</a> and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison">Comparing the * AWS STS API operations</a> in the <i>IAM User Guide</i>.</p> * <p> * <b>Session Duration</b> * </p> * <p>The <code>GetSessionToken</code> operation must be called by using the long-term AWS * security credentials of the AWS account root user or an IAM user. Credentials that are * created by IAM users are valid for the duration that you specify. This duration can range * from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default * of 43,200 seconds (12 hours). Credentials based on account credentials can range from 900 * seconds (15 minutes) up to 3,600 seconds (1 hour), with a default of 1 hour. </p> * <p> * <b>Permissions</b> * </p> * <p>The temporary security credentials created by <code>GetSessionToken</code> can be used * to make API calls to any AWS service with the following exceptions:</p> * <ul> * <li> * <p>You cannot call any IAM API operations unless MFA authentication information is * included in the request.</p> * </li> * <li> * <p>You cannot call any STS API <i>except</i> * <code>AssumeRole</code> or <code>GetCallerIdentity</code>.</p> * </li> * </ul> * <note> * <p>We recommend that you do not call <code>GetSessionToken</code> with AWS account * root user credentials. Instead, follow our <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users">best practices</a> by * creating one or more IAM users, giving them the necessary permissions, and using IAM * users for everyday interaction with AWS. </p> * </note> * <p>The credentials that are returned by <code>GetSessionToken</code> are based on * permissions associated with the user whose credentials were used to call the operation. If * <code>GetSessionToken</code> is called using AWS account root user credentials, the * temporary credentials have root user permissions. Similarly, if * <code>GetSessionToken</code> is called using the credentials of an IAM user, the * temporary credentials have the same permissions as the IAM user. </p> * <p>For more information about using <code>GetSessionToken</code> to create temporary * credentials, go to <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken">Temporary * Credentials for Users in Untrusted Environments</a> in the * <i>IAM User Guide</i>. </p> */ var GetSessionTokenCommand = /** @class */ (function (_super) { __extends(GetSessionTokenCommand, _super); // Start section: command_properties // End section: command_properties function GetSessionTokenCommand(input) { var _this = // Start section: command_constructor _super.call(this) || this; _this.input = input; return _this; // End section: command_constructor } /** * @internal */ GetSessionTokenCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) { this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); this.middlewareStack.use(getAwsAuthPlugin(configuration)); var stack = clientStack.concat(this.middlewareStack); var logger = configuration.logger; var clientName = "STSClient"; var commandName = "GetSessionTokenCommand"; var handlerExecutionContext = { logger: logger, clientName: clientName, commandName: commandName, inputFilterSensitiveLog: GetSessionTokenRequest.filterSensitiveLog, outputFilterSensitiveLog: GetSessionTokenResponse.filterSensitiveLog, }; var requestHandler = configuration.requestHandler; return stack.resolve(function (request) { return requestHandler.handle(request.request, options || {}); }, handlerExecutionContext); }; GetSessionTokenCommand.prototype.serialize = function (input, context) { return serializeAws_queryGetSessionTokenCommand(input, context); }; GetSessionTokenCommand.prototype.deserialize = function (output, context) { return deserializeAws_queryGetSessionTokenCommand(output, context); }; return GetSessionTokenCommand; }($Command)); export { GetSessionTokenCommand }; //# sourceMappingURL=GetSessionTokenCommand.js.map
// Copyright (C) 2016 the V8 project authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- esid: sec-function-definitions-static-semantics-early-errors es6id: 14.1.2 description: Parameters may not contain a "super" call info: > It is a Syntax Error if FormalParameters Contains SuperProperty is true. negative: SyntaxError ---*/ function f(x = super()) {}
import path from 'path'; import { pitch } from '../src/cjs'; import { getPool } from '../src/workerPools'; jest.mock('../src/workerPools', () => { return { getPool: jest.fn(), }; }); const runGetPoolMock = (error) => { getPool.mockImplementationOnce(() => { return { isAbleToRun: () => true, run: jest.fn((opts, cb) => { cb(error, { fileDependencies: [], contextDependencies: [], result: {}, }); }), }; }); }; const runPitch = (options) => pitch.call( Object.assign( {}, { query: options, loaders: [], rootContext: path.resolve('../'), async: () => (error) => { if (error) { throw error; } }, } ) ); // it('runs pitch successfully when workPool not throw an error', () => { // runGetPoolMock(null); // expect(() => runPitch({})).not.toThrow(); // }); it('runs pitch unsuccessfully when workPool throw an error', () => { runGetPoolMock(new Error('Unexpected Error')); expect(() => runPitch({})).toThrowErrorMatchingSnapshot(); });
import React from 'react' const Footer = () => { return ( <footer style={{ backgroundColor: '#ee6e73', maxHeight: '200px' }} className="p-4" > <div className="container"> <div className="row"> <div className="col"> <h5 className="text-white">MoviesHub</h5> <h4>We rock! Big Time! Check us out! now or never!</h4> </div> <div className="col-4 ml-auto"> <h5 className="text-white m-0">Our associates</h5> <ul className="list-unstyled text-center"> <li> <h5>CodeHub</h5> </li> <li> <h5>FoodHub</h5> </li> </ul> </div> </div> </div> <div className="text-white"> <h4 className="container text-center">© 2018 Copyright HBS</h4> </div> </footer> ) } export default Footer
# (c) @Unknown # Original written by @Unknown edit by @sudo_zeref from telethon import events import asyncio from collections import deque from userbot.events import register @register(outgoing=True, pattern="^.fook$") async def fuck(e): if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"): await e.edit("`\n╱┏━━━┓.. ┏┓╱┏┓╭━━━╮ ╱╱┏┓ `" "`\n╱┃┏━━┛.. ┃┃╱┃┃┃╭━╮┃╱┃┃ `" "`\n╱┃┗━┓╱.. ┃┃╱┃┃┃┃╱┗┛┃┃ `" "`\n╱┃┏━┛╱...┃┃╱┃┃┃┃╱┏┓┃┃ `" "`\n╱┃┃╱.╱.╱ ┃╰━╯┃┃╰━╯┃╱┃┃ `" "`\n╱┗┛╱ ╱ ╱ ╰━━━╯╰━━━╯ ╱╱┗┛ `")
/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Ajax.org B.V. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ***** END LICENSE BLOCK ***** */ __ace_shadowed__.define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var Tokenizer = require("../tokenizer").Tokenizer; var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Range = require("../range").Range; var WorkerClient = require("../worker/worker_client").WorkerClient; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules()); this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function() { this.toggleCommentLines = function(state, doc, startRow, endRow) { var outdent = true; var re = /^(\s*)\/\//; for (var i=startRow; i<= endRow; i++) { if (!re.test(doc.getLine(i))) { outdent = false; break; } } if (outdent) { var deleteRange = new Range(0, 0, 0, 0); for (var i=startRow; i<= endRow; i++) { var line = doc.getLine(i); var m = line.match(re); deleteRange.start.row = i; deleteRange.end.row = i; deleteRange.end.column = m[0].length; doc.replace(deleteRange, m[1]); } } else { doc.indentRows(startRow, endRow, "//"); } }; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.$tokenizer.getLineTokens(line, state); var tokens = tokenizedLine.tokens; var endState = tokenizedLine.state; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start" || state == "regex_allowed") { var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); if (match) { indent += tab; } } else if (state == "doc-start") { if (endState == "start" || state == "regex_allowed") { return ""; } var match = line.match(/^\s*(\/?)\*/); if (match) { if (match[1]) { indent += " "; } indent += "* "; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.createWorker = function(session) { var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); worker.attachToDocument(session.getDocument()); worker.on("jslint", function(results) { session.setAnnotations(results.data); }); worker.on("terminate", function() { session.clearAnnotations(); }); return worker; }; }).call(Mode.prototype); exports.Mode = Mode; }); __ace_shadowed__.define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) { var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var JavaScriptHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors "Namespace|QName|XML|XMLList|" + // E4X "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors "SyntaxError|TypeError|URIError|" + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions "isNaN|parseFloat|parseInt|" + "JSON|Math|" + // Other "this|arguments|prototype|window|document" , // Pseudo "keyword": "const|yield|import|get|set|" + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + "__parent__|__count__|escape|unescape|with|__proto__|" + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", "storage.type": "const|let|var|function", "constant.language": "null|Infinity|NaN|undefined", "support.function": "alert" }, "identifier"); var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield"; var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex "u[0-9a-fA-F]{4}|" + // unicode "[0-2][0-7]{0,2}|" + // oct "3[0-6][0-7]?|" + // oct "37[0-7]?|" + // oct "[4-7][0-7]?|" + //oct ".)"; this.$rules = { "start" : [ { token : "comment", regex : /\/\/.*$/ }, DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment merge : true, regex : /\/\*/, next : "comment" }, { token : "string", regex : "'(?=.)", next : "qstring" }, { token : "string", regex : '"(?=.)', next : "qqstring" }, { token : "constant.numeric", // hex regex : /0[xX][0-9a-fA-F]+\b/ }, { token : "constant.numeric", // float regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : [ "storage.type", "punctuation.operator", "support.function", "punctuation.operator", "entity.name.function", "text","keyword.operator" ], regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "punctuation.operator", "entity.name.function", "text", "keyword.operator", "text", "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", next: "function_arguments" }, { token : [ "storage.type", "text", "entity.name.function", "text", "paren.lparen" ], regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", next: "function_arguments" }, { token : [ "entity.name.function", "text", "punctuation.operator", "text", "storage.type", "text", "paren.lparen" ], regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : [ "text", "text", "storage.type", "text", "paren.lparen" ], regex : "(:)(\\s*)(function)(\\s*)(\\()", next: "function_arguments" }, { token : "constant.language.boolean", regex : /(?:true|false)\b/ }, { token : "keyword", regex : "(?:" + kwBeforeRe + ")\\b", next : "regex_allowed" }, { token : ["punctuation.operator", "support.function"], regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ }, { token : ["punctuation.operator", "support.function.dom"], regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ }, { token : ["punctuation.operator", "support.constant"], regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ }, { token : ["storage.type", "punctuation.operator", "support.function.firebug"], regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ }, { token : keywordMapper, regex : identifierRe }, { token : "keyword.operator", regex : /!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/, next : "regex_allowed" }, { token : "punctuation.operator", regex : /\?|\:|\,|\;|\./, next : "regex_allowed" }, { token : "paren.lparen", regex : /[\[({]/, next : "regex_allowed" }, { token : "paren.rparen", regex : /[\])}]/ }, { token : "keyword.operator", regex : /\/=?/, next : "regex_allowed" }, { token: "comment", regex: /^#!.*$/ }, { token : "text", regex : /\s+/ } ], "regex_allowed": [ DocCommentHighlightRules.getStartRule("doc-start"), { token : "comment", // multi line comment merge : true, regex : "\\/\\*", next : "comment_regex_allowed" }, { token : "comment", regex : "\\/\\/.*$" }, { token: "string.regexp", regex: "\\/", next: "regex", merge: true }, { token : "text", regex : "\\s+" }, { token: "empty", regex: "", next: "start" } ], "regex": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "string.regexp", regex: "/\\w*", next: "start", merge: true }, { token : "invalid", regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ }, { token : "constant.language.escape", regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/ }, { token: "string.regexp", regex: /{|[^{\[\/\\(|)$^+*?]+/, merge: true }, { token: "constant.language.escape", regex: /\[\^?/, next: "regex_character_class", merge: true }, { token: "empty", regex: "", next: "start" } ], "regex_character_class": [ { token: "regexp.keyword.operator", regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" }, { token: "constant.language.escape", regex: "]", next: "regex", merge: true }, { token: "constant.language.escape", regex: "-" }, { token: "string.regexp.charachterclass", regex: /[^\]\-\\]+/, merge: true }, { token: "empty", regex: "", next: "start" } ], "function_arguments": [ { token: "variable.parameter", regex: identifierRe }, { token: "punctuation.operator", regex: "[, ]+", merge: true }, { token: "punctuation.operator", regex: "$", merge: true }, { token: "empty", regex: "", next: "start" } ], "comment_regex_allowed" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", merge : true, next : "regex_allowed" }, { token : "comment", // comment spanning whole line merge : true, regex : ".+" } ], "comment" : [ { token : "comment", // closing comment regex : ".*?\\*\\/", merge : true, next : "start" }, { token : "comment", // comment spanning whole line merge : true, regex : ".+" } ], "qqstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : '[^"\\\\]+', merge : true }, { token : "string", regex : "\\\\$", next : "qqstring", merge : true }, { token : "string", regex : '"|$', next : "start", merge : true } ], "qstring" : [ { token : "constant.language.escape", regex : escapedRe }, { token : "string", regex : "[^'\\\\]+", merge : true }, { token : "string", regex : "\\\\$", next : "qstring", merge : true }, { token : "string", regex : "'|$", next : "start", merge : true } ] }; this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); }; oop.inherits(JavaScriptHighlightRules, TextHighlightRules); exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); __ace_shadowed__.define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) { var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRules = function() { this.$rules = { "start" : [ { token : "comment.doc.tag", regex : "@[\\w\\d_]+" // TODO: fix email addresses }, { token : "comment.doc", merge : true, regex : "\\s+" }, { token : "comment.doc", merge : true, regex : "TODO" }, { token : "comment.doc", merge : true, regex : "[^@\\*]+" }, { token : "comment.doc", merge : true, regex : "." }] }; }; oop.inherits(DocCommentHighlightRules, TextHighlightRules); DocCommentHighlightRules.getStartRule = function(start) { return { token : "comment.doc", // doc comment merge : true, regex : "\\/\\*(?=\\*)", next : start }; }; DocCommentHighlightRules.getEndRule = function (start) { return { token : "comment.doc", // closing comment merge : true, regex : "\\*\\/", next : start }; }; exports.DocCommentHighlightRules = DocCommentHighlightRules; }); __ace_shadowed__.define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) { var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { var match = line.match(/^(\s+)/); if (match) { return match[1]; } return ""; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); __ace_shadowed__.define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) { var oop = require("../../lib/oop"); var Behaviour = require("../behaviour").Behaviour; var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = ["text", "paren.rparen", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = ["text", "paren.rparen", "punctuation.operator", "comment"]; var autoInsertedBrackets = 0; var autoInsertedRow = -1; var autoInsertedLineEnd = ""; var maybeInsertedBrackets = 0; var maybeInsertedRow = -1; var maybeInsertedLineStart = ""; var maybeInsertedLineEnd = ""; var CstyleBehaviour = function () { CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; } iterator.stepForward(); return iterator.getCurrentTokenRow() !== cursor.row || this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); }; CstyleBehaviour.$matchTokenType = function(token, types) { return types.indexOf(token.type || token) > -1; }; CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) autoInsertedBrackets = 0; autoInsertedRow = cursor.row; autoInsertedLineEnd = bracket + line.substr(cursor.column); autoInsertedBrackets++; }; CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (!this.isMaybeInsertedClosing(cursor, line)) maybeInsertedBrackets = 0; maybeInsertedRow = cursor.row; maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; maybeInsertedLineEnd = line.substr(cursor.column); maybeInsertedBrackets++; }; CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { return autoInsertedBrackets > 0 && cursor.row === autoInsertedRow && bracket === autoInsertedLineEnd[0] && line.substr(cursor.column) === autoInsertedLineEnd; }; CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { return maybeInsertedBrackets > 0 && cursor.row === maybeInsertedRow && line.substr(cursor.column) === maybeInsertedLineEnd && line.substr(0, cursor.column) == maybeInsertedLineStart; }; CstyleBehaviour.popAutoInsertedClosing = function() { autoInsertedLineEnd = autoInsertedLineEnd.substr(1); autoInsertedBrackets--; }; CstyleBehaviour.clearMaybeInsertedClosing = function() { maybeInsertedBrackets = 0; maybeInsertedRow = -1; }; this.add("braces", "insertion", function (state, action, editor, session, text) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); if (text == '{') { var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { return { text: '{' + selected + '}', selection: false }; } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { if (/[\]\}\)]/.test(line[cursor.column])) { CstyleBehaviour.recordAutoInsert(editor, session, "}"); return { text: '{}', selection: [1, 1] }; } else { CstyleBehaviour.recordMaybeInsert(editor, session, "{"); return { text: '{', selection: [1, 1] }; } } } else if (text == '}') { var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}') { var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } else if (text == "\n" || text == "\r\n") { var closing = ""; if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { closing = lang.stringRepeat("}", maybeInsertedBrackets); CstyleBehaviour.clearMaybeInsertedClosing(); } var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == '}' || closing !== "") { var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}'); if (!openBracePos) return null; var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); var next_indent = this.$getIndent(line); return { text: '\n' + indent + '\n' + next_indent + closing, selection: [1, indent.length, 1, indent.length] }; } } }); this.add("braces", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '{') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.end.column, range.end.column + 1); if (rightChar == '}') { range.end.column++; return range; } else { maybeInsertedBrackets--; } } }); this.add("parens", "insertion", function (state, action, editor, session, text) { if (text == '(') { var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return { text: '(' + selected + ')', selection: false }; } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, ")"); return { text: '()', selection: [1, 1] }; } } else if (text == ')') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ')') { var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("parens", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '(') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ')') { range.end.column++; return range; } } }); this.add("brackets", "insertion", function (state, action, editor, session, text) { if (text == '[') { var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && editor.getWrapBehavioursEnabled()) { return { text: '[' + selected + ']', selection: false }; } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { CstyleBehaviour.recordAutoInsert(editor, session, "]"); return { text: '[]', selection: [1, 1] }; } } else if (text == ']') { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == ']') { var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { CstyleBehaviour.popAutoInsertedClosing(); return { text: '', selection: [1, 1] }; } } } }); this.add("brackets", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && selected == '[') { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == ']') { range.end.column++; return range; } } }); this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { if (text == '"' || text == "'") { var quote = text; var selection = editor.getSelectionRange(); var selected = session.doc.getTextRange(selection); if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { return { text: quote + selected + quote, selection: false }; } else { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var leftChar = line.substring(cursor.column-1, cursor.column); if (leftChar == '\\') { return null; } var tokens = session.getTokens(selection.start.row); var col = 0, token; var quotepos = -1; // Track whether we're inside an open quote. for (var x = 0; x < tokens.length; x++) { token = tokens[x]; if (token.type == "string") { quotepos = -1; } else if (quotepos < 0) { quotepos = token.value.indexOf(quote); } if ((token.value.length + col) > selection.start.column) { break; } col += tokens[x].value.length; } if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { if (!CstyleBehaviour.isSaneInsertion(editor, session)) return; return { text: quote + quote, selection: [1,1] }; } else if (token && token.type === "string") { var rightChar = line.substring(cursor.column, cursor.column + 1); if (rightChar == quote) { return { text: '', selection: [1, 1] }; } } } } }); this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { var selected = session.doc.getTextRange(range); if (!range.isMultiLine() && (selected == '"' || selected == "'")) { var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); if (rightChar == '"') { range.end.column++; return range; } } }); }; oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); __ace_shadowed__.define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) { var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function() {}; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; this.getFoldWidgetRange = function(session, foldStyle, row) { var line = session.getLine(row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i + match[0].length, 1); } if (foldStyle !== "markbeginend") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; }).call(FoldMode.prototype); });
export const TRIM_NUMBER = 5;
"""Pythonic command-line interface parser that will make you smile. * http://docopt.org * Repository and issue-tracker: https://github.com/docopt/docopt * Licensed under terms of MIT license (see LICENSE-MIT) * Copyright (c) 2013 Vladimir Keleshev, [email protected] """ import sys import re __all__ = ['docopt'] __version__ = '0.6.1' class DocoptLanguageError(Exception): """Error in construction of usage-message by developer.""" class DocoptExit(SystemExit): """Exit in case user invoked program with incorrect arguments.""" usage = '' def __init__(self, message=''): SystemExit.__init__(self, (message + '\n' + self.usage).strip()) class Pattern(object): def __eq__(self, other): return repr(self) == repr(other) def __hash__(self): return hash(repr(self)) def fix(self): self.fix_identities() self.fix_repeating_arguments() return self def fix_identities(self, uniq=None): """Make pattern-tree tips point to same object if they are equal.""" if not hasattr(self, 'children'): return self uniq = list(set(self.flat())) if uniq is None else uniq for i, c in enumerate(self.children): if not hasattr(c, 'children'): assert c in uniq self.children[i] = uniq[uniq.index(c)] else: c.fix_identities(uniq) def fix_repeating_arguments(self): """Fix elements that should accumulate/increment values.""" either = [list(c.children) for c in self.either.children] for case in either: for e in [c for c in case if case.count(c) > 1]: if type(e) is Argument or type(e) is Option and e.argcount: if e.value is None: e.value = [] elif type(e.value) is not list: e.value = e.value.split() if type(e) is Command or type(e) is Option and e.argcount == 0: e.value = 0 return self @property def either(self): """Transform pattern into an equivalent, with only top-level Either.""" # Currently the pattern will not be equivalent, but more "narrow", # although good enough to reason about list arguments. ret = [] groups = [[self]] while groups: children = groups.pop(0) types = [type(c) for c in children] if Either in types: either = [c for c in children if type(c) is Either][0] children.pop(children.index(either)) for c in either.children: groups.append([c] + children) elif Required in types: required = [c for c in children if type(c) is Required][0] children.pop(children.index(required)) groups.append(list(required.children) + children) elif Optional in types: optional = [c for c in children if type(c) is Optional][0] children.pop(children.index(optional)) groups.append(list(optional.children) + children) elif AnyOptions in types: optional = [c for c in children if type(c) is AnyOptions][0] children.pop(children.index(optional)) groups.append(list(optional.children) + children) elif OneOrMore in types: oneormore = [c for c in children if type(c) is OneOrMore][0] children.pop(children.index(oneormore)) groups.append(list(oneormore.children) * 2 + children) else: ret.append(children) return Either(*[Required(*e) for e in ret]) class ChildPattern(Pattern): def __init__(self, name, value=None): self.name = name self.value = value def __repr__(self): return '%s(%r, %r)' % (self.__class__.__name__, self.name, self.value) def flat(self, *types): return [self] if not types or type(self) in types else [] def match(self, left, collected=None): collected = [] if collected is None else collected pos, match = self.single_match(left) if match is None: return False, left, collected left_ = left[:pos] + left[pos + 1:] same_name = [a for a in collected if a.name == self.name] if type(self.value) in (int, list): if type(self.value) is int: increment = 1 else: increment = ([match.value] if type(match.value) is str else match.value) if not same_name: match.value = increment return True, left_, collected + [match] same_name[0].value += increment return True, left_, collected return True, left_, collected + [match] class ParentPattern(Pattern): def __init__(self, *children): self.children = list(children) def __repr__(self): return '%s(%s)' % (self.__class__.__name__, ', '.join(repr(a) for a in self.children)) def flat(self, *types): if type(self) in types: return [self] return sum([c.flat(*types) for c in self.children], []) class Argument(ChildPattern): def single_match(self, left): for n, p in enumerate(left): if type(p) is Argument: return n, Argument(self.name, p.value) return None, None @classmethod def parse(class_, source): name = re.findall('(<\S*?>)', source)[0] value = re.findall('\[default: (.*)\]', source, flags=re.I) return class_(name, value[0] if value else None) class Command(Argument): def __init__(self, name, value=False): self.name = name self.value = value def single_match(self, left): for n, p in enumerate(left): if type(p) is Argument: if p.value == self.name: return n, Command(self.name, True) else: break return None, None class Option(ChildPattern): def __init__(self, short=None, long=None, argcount=0, value=False): assert argcount in (0, 1) self.short, self.long = short, long self.argcount, self.value = argcount, value self.value = None if value is False and argcount else value @classmethod def parse(class_, option_description): short, long, argcount, value = None, None, 0, False options, _, description = option_description.strip().partition(' ') options = options.replace(',', ' ').replace('=', ' ') for s in options.split(): if s.startswith('--'): long = s elif s.startswith('-'): short = s else: argcount = 1 if argcount: matched = re.findall('\[default: (.*)\]', description, flags=re.I) value = matched[0] if matched else None return class_(short, long, argcount, value) def single_match(self, left): for n, p in enumerate(left): if self.name == p.name: return n, p return None, None @property def name(self): return self.long or self.short def __repr__(self): return 'Option(%r, %r, %r, %r)' % (self.short, self.long, self.argcount, self.value) class Required(ParentPattern): def match(self, left, collected=None): collected = [] if collected is None else collected l = left c = collected for p in self.children: matched, l, c = p.match(l, c) if not matched: return False, left, collected return True, l, c class Optional(ParentPattern): def match(self, left, collected=None): collected = [] if collected is None else collected for p in self.children: m, left, collected = p.match(left, collected) return True, left, collected class AnyOptions(Optional): """Marker/placeholder for [options] shortcut.""" class OneOrMore(ParentPattern): def match(self, left, collected=None): assert len(self.children) == 1 collected = [] if collected is None else collected l = left c = collected l_ = None matched = True times = 0 while matched: # could it be that something didn't match but changed l or c? matched, l, c = self.children[0].match(l, c) times += 1 if matched else 0 if l_ == l: break l_ = l if times >= 1: return True, l, c return False, left, collected class Either(ParentPattern): def match(self, left, collected=None): collected = [] if collected is None else collected outcomes = [] for p in self.children: matched, _, _ = outcome = p.match(left, collected) if matched: outcomes.append(outcome) if outcomes: return min(outcomes, key=lambda outcome: len(outcome[1])) return False, left, collected class TokenStream(list): def __init__(self, source, error): self += source.split() if hasattr(source, 'split') else source self.error = error def move(self): return self.pop(0) if len(self) else None def current(self): return self[0] if len(self) else None def parse_long(tokens, options): """long ::= '--' chars [ ( ' ' | '=' ) chars ] ;""" long, eq, value = tokens.move().partition('=') assert long.startswith('--') value = None if eq == value == '' else value similar = [o for o in options if o.long == long] if tokens.error is DocoptExit and similar == []: # if no exact match similar = [o for o in options if o.long and o.long.startswith(long)] if len(similar) > 1: # might be simply specified ambiguously 2+ times? raise tokens.error('%s is not a unique prefix: %s?' % (long, ', '.join(o.long for o in similar))) elif len(similar) < 1: argcount = 1 if eq == '=' else 0 o = Option(None, long, argcount) options.append(o) if tokens.error is DocoptExit: o = Option(None, long, argcount, value if argcount else True) else: o = Option(similar[0].short, similar[0].long, similar[0].argcount, similar[0].value) if o.argcount == 0: if value is not None: raise tokens.error('%s must not have an argument' % o.long) else: if value is None: if tokens.current() is None: raise tokens.error('%s requires argument' % o.long) value = tokens.move() if tokens.error is DocoptExit: o.value = value if value is not None else True return [o] def parse_shorts(tokens, options): """shorts ::= '-' ( chars )* [ [ ' ' ] chars ] ;""" token = tokens.move() assert token.startswith('-') and not token.startswith('--') left = token.lstrip('-') parsed = [] while left != '': short, left = '-' + left[0], left[1:] similar = [o for o in options if o.short == short] if len(similar) > 1: raise tokens.error('%s is specified ambiguously %d times' % (short, len(similar))) elif len(similar) < 1: o = Option(short, None, 0) options.append(o) if tokens.error is DocoptExit: o = Option(short, None, 0, True) else: # why copying is necessary here? o = Option(short, similar[0].long, similar[0].argcount, similar[0].value) value = None if o.argcount != 0: if left == '': if tokens.current() is None: raise tokens.error('%s requires argument' % short) value = tokens.move() else: value = left left = '' if tokens.error is DocoptExit: o.value = value if value is not None else True parsed.append(o) return parsed def parse_pattern(source, options): tokens = TokenStream(re.sub(r'([\[\]\(\)\|]|\.\.\.)', r' \1 ', source), DocoptLanguageError) result = parse_expr(tokens, options) if tokens.current() is not None: raise tokens.error('unexpected ending: %r' % ' '.join(tokens)) return Required(*result) def parse_expr(tokens, options): """expr ::= seq ( '|' seq )* ;""" seq = parse_seq(tokens, options) if tokens.current() != '|': return seq result = [Required(*seq)] if len(seq) > 1 else seq while tokens.current() == '|': tokens.move() seq = parse_seq(tokens, options) result += [Required(*seq)] if len(seq) > 1 else seq return [Either(*result)] if len(result) > 1 else result def parse_seq(tokens, options): """seq ::= ( atom [ '...' ] )* ;""" result = [] while tokens.current() not in [None, ']', ')', '|']: atom = parse_atom(tokens, options) if tokens.current() == '...': atom = [OneOrMore(*atom)] tokens.move() result += atom return result def parse_atom(tokens, options): """atom ::= '(' expr ')' | '[' expr ']' | 'options' | long | shorts | argument | command ; """ token = tokens.current() result = [] if token in '([': tokens.move() matching, pattern = {'(': [')', Required], '[': [']', Optional]}[token] result = pattern(*parse_expr(tokens, options)) if tokens.move() != matching: raise tokens.error("unmatched '%s'" % token) return [result] elif token == 'options': tokens.move() return [AnyOptions()] elif token.startswith('--') and token != '--': return parse_long(tokens, options) elif token.startswith('-') and token not in ('-', '--'): return parse_shorts(tokens, options) elif token.startswith('<') and token.endswith('>') or token.isupper(): return [Argument(tokens.move())] else: return [Command(tokens.move())] def parse_argv(tokens, options, options_first=False): """Parse command-line argument vector. If options_first: argv ::= [ long | shorts ]* [ argument ]* [ '--' [ argument ]* ] ; else: argv ::= [ long | shorts | argument ]* [ '--' [ argument ]* ] ; """ parsed = [] while tokens.current() is not None: if tokens.current() == '--': return parsed + [Argument(None, v) for v in tokens] elif tokens.current().startswith('--'): parsed += parse_long(tokens, options) elif tokens.current().startswith('-') and tokens.current() != '-': parsed += parse_shorts(tokens, options) elif options_first: return parsed + [Argument(None, v) for v in tokens] else: parsed.append(Argument(None, tokens.move())) return parsed def parse_defaults(doc): # in python < 2.7 you can't pass flags=re.MULTILINE split = re.split('\n *(<\S+?>|-\S+?)', doc)[1:] split = [s1 + s2 for s1, s2 in zip(split[::2], split[1::2])] options = [Option.parse(s) for s in split if s.startswith('-')] #arguments = [Argument.parse(s) for s in split if s.startswith('<')] #return options, arguments return options def printable_usage(doc): usage_pattern = re.compile(r'(usage:)', re.IGNORECASE) usage_split = re.split(usage_pattern, doc) if len(usage_split) < 3: raise DocoptLanguageError('"usage:" (case-insensitive) not found.') if len(usage_split) > 3: raise DocoptLanguageError('More than one "usage:" (case-insensitive).') return re.split(r'\n\s*\n', ''.join(usage_split[1:]))[0].strip() def formal_usage(printable_usage): pu = printable_usage.split()[1:] # split and drop "usage:" return '( ' + ' '.join(') | (' if s == pu[0] else s for s in pu[1:]) + ' )' def extras(help, version, options, doc): if help and any((o.name in ('-h', '--help')) and o.value for o in options): print(doc.strip("\n")) sys.exit() if version and any(o.name == '--version' and o.value for o in options): print(version) sys.exit() class Dict(dict): def __repr__(self): return '{%s}' % ',\n '.join('%r: %r' % i for i in sorted(self.items())) def docopt(doc, argv=None, help=True, version=None, options_first=False): """Parse `argv` based on command-line interface described in `doc`. `docopt` creates your command-line interface based on its description that you pass as `doc`. Such description can contain --options, <positional-argument>, commands, which could be [optional], (required), (mutually | exclusive) or repeated... Parameters ---------- doc : str Description of your command-line interface. argv : list of str, optional Argument vector to be parsed. sys.argv[1:] is used if not provided. help : bool (default: True) Set to False to disable automatic help on -h or --help options. version : any object If passed, the object will be printed if --version is in `argv`. options_first : bool (default: False) Set to True to require options precede positional arguments, i.e. to forbid options and positional arguments intermix. Returns ------- args : dict A dictionary, where keys are names of command-line elements such as e.g. "--verbose" and "<path>", and values are the parsed values of those elements. Example ------- >>> from docopt import docopt >>> doc = ''' Usage: my_program tcp <host> <port> [--timeout=<seconds>] my_program serial <port> [--baud=<n>] [--timeout=<seconds>] my_program (-h | --help | --version) Options: -h, --help Show this screen and exit. --baud=<n> Baudrate [default: 9600] ''' >>> argv = ['tcp', '127.0.0.1', '80', '--timeout', '30'] >>> docopt(doc, argv) {'--baud': '9600', '--help': False, '--timeout': '30', '--version': False, '<host>': '127.0.0.1', '<port>': '80', 'serial': False, 'tcp': True} See also -------- * For video introduction see http://docopt.org * Full documentation is available in README.rst as well as online at https://github.com/docopt/docopt#readme """ if argv is None: argv = sys.argv[1:] DocoptExit.usage = printable_usage(doc) options = parse_defaults(doc) pattern = parse_pattern(formal_usage(DocoptExit.usage), options) # [default] syntax for argument is disabled #for a in pattern.flat(Argument): # same_name = [d for d in arguments if d.name == a.name] # if same_name: # a.value = same_name[0].value DocoptExit.usage = doc argv = parse_argv(TokenStream(argv, DocoptExit), list(options), options_first) pattern_options = set(pattern.flat(Option)) for ao in pattern.flat(AnyOptions): doc_options = parse_defaults(doc) ao.children = list(set(doc_options) - pattern_options) #if any_options: # ao.children += [Option(o.short, o.long, o.argcount) # for o in argv if type(o) is Option] extras(help, version, argv, doc) matched, left, collected = pattern.fix().match(argv) if matched and left == []: # better error message if left? return Dict((a.name, a.value) for a in (pattern.flat() + collected)) raise DocoptExit()
const getters = { sidebar: state => state.app.sidebar, size: state => state.app.size, device: state => state.app.device, visitedViews: state => state.tagsView.visitedViews, cachedViews: state => state.tagsView.cachedViews, token: state => state.user.token, avatar: state => state.user.avatar, name: state => state.user.name, introduction: state => state.user.introduction, roles: state => state.user.roles, permission_routes: state => state.permission.routes, permission_addRoutes: state => state.permission.addRoutes, errorLogs: state => state.errorLog.logs, } export default getters
# -*- coding: utf-8 -*- from copy import deepcopy from django.contrib import admin from django.contrib.admin.options import BaseModelAdmin, flatten_fieldsets, InlineModelAdmin from django import forms from modeltranslation import settings as mt_settings from modeltranslation.translator import translator from modeltranslation.utils import ( get_translation_fields, build_css_class, build_localized_fieldname, get_language, get_language_bidi, unique) from modeltranslation.widgets import ClearableWidgetWrapper from django.contrib.contenttypes.admin import GenericTabularInline from django.contrib.contenttypes.admin import GenericStackedInline class TranslationBaseModelAdmin(BaseModelAdmin): _orig_was_required = {} both_empty_values_fields = () def __init__(self, *args, **kwargs): super(TranslationBaseModelAdmin, self).__init__(*args, **kwargs) self.trans_opts = translator.get_options_for_model(self.model) self._patch_prepopulated_fields() def _get_declared_fieldsets(self, request, obj=None): # Take custom modelform fields option into account if not self.fields and hasattr(self.form, '_meta') and self.form._meta.fields: self.fields = self.form._meta.fields if self.fieldsets: return self._patch_fieldsets(self.fieldsets) elif self.fields: return [(None, {'fields': self.replace_orig_field(self.get_fields(request, obj))})] return None def formfield_for_dbfield(self, db_field, request, **kwargs): field = super(TranslationBaseModelAdmin, self).formfield_for_dbfield( db_field, request, **kwargs ) self.patch_translation_field(db_field, field, request, **kwargs) return field def patch_translation_field(self, db_field, field, request, **kwargs): if db_field.name in self.trans_opts.fields: if field.required: field.required = False field.blank = True self._orig_was_required['%s.%s' % (db_field.model._meta, db_field.name)] = True # For every localized field copy the widget from the original field # and add a css class to identify a modeltranslation widget. try: orig_field = db_field.translated_field except AttributeError: pass else: orig_formfield = self.formfield_for_dbfield( orig_field, request, **kwargs ) field.widget = deepcopy(orig_formfield.widget) # if any widget attrs are defined on the form they should be copied try: field.widget = deepcopy(self.form._meta.widgets[orig_field.name]) except (AttributeError, TypeError, KeyError): pass # field.widget = deepcopy(orig_formfield.widget) if orig_field.name in self.both_empty_values_fields: from modeltranslation.forms import NullableField, NullCharField form_class = field.__class__ if issubclass(form_class, NullCharField): # NullableField don't work with NullCharField form_class.__bases__ = tuple( b for b in form_class.__bases__ if b != NullCharField) field.__class__ = type( 'Nullable%s' % form_class.__name__, (NullableField, form_class), {}) if ( ( db_field.empty_value == 'both' or orig_field.name in self.both_empty_values_fields ) and isinstance(field.widget, (forms.TextInput, forms.Textarea)) ): field.widget = ClearableWidgetWrapper(field.widget) css_classes = field.widget.attrs.get('class', '').split(' ') css_classes.append('mt') # Add localized fieldname css class css_classes.append(build_css_class(db_field.name, 'mt-field')) # Add mt-bidi css class if language is bidirectional if(get_language_bidi(db_field.language)): css_classes.append('mt-bidi') if db_field.language == mt_settings.DEFAULT_LANGUAGE: # Add another css class to identify a default modeltranslation widget css_classes.append('mt-default') if (orig_formfield.required or self._orig_was_required.get( '%s.%s' % (orig_field.model._meta, orig_field.name))): # In case the original form field was required, make the # default translation field required instead. orig_formfield.required = False orig_formfield.blank = True field.required = True field.blank = False # Hide clearable widget for required fields if isinstance(field.widget, ClearableWidgetWrapper): field.widget = field.widget.widget field.widget.attrs['class'] = ' '.join(css_classes) def _exclude_original_fields(self, exclude=None): if exclude is None: exclude = tuple() if exclude: exclude_new = tuple(exclude) return exclude_new + tuple(self.trans_opts.fields.keys()) return tuple(self.trans_opts.fields.keys()) def replace_orig_field(self, option): """ Replaces each original field in `option` that is registered for translation by its translation fields. Returns a new list with replaced fields. If `option` contains no registered fields, it is returned unmodified. >>> self = TranslationAdmin() # PyFlakes >>> print(self.trans_opts.fields.keys()) ['title',] >>> get_translation_fields(self.trans_opts.fields.keys()[0]) ['title_de', 'title_en'] >>> self.replace_orig_field(['title', 'url']) ['title_de', 'title_en', 'url'] Note that grouped fields are flattened. We do this because: 1. They are hard to handle in the jquery-ui tabs implementation 2. They don't scale well with more than a few languages 3. It's better than not handling them at all (okay that's weak) >>> self.replace_orig_field((('title', 'url'), 'email', 'text')) ['title_de', 'title_en', 'url_de', 'url_en', 'email_de', 'email_en', 'text'] """ if option: option_new = list(option) for opt in option: if opt in self.trans_opts.fields: index = option_new.index(opt) option_new[index:index + 1] = get_translation_fields(opt) elif isinstance(opt, (tuple, list)) and ( [o for o in opt if o in self.trans_opts.fields]): index = option_new.index(opt) option_new[index:index + 1] = self.replace_orig_field(opt) option = option_new return option def _patch_fieldsets(self, fieldsets): if fieldsets: fieldsets_new = list(fieldsets) for (name, dct) in fieldsets: if 'fields' in dct: dct['fields'] = self.replace_orig_field(dct['fields']) fieldsets = fieldsets_new return fieldsets def _patch_prepopulated_fields(self): def localize(sources, lang): "Append lang suffix (if applicable) to field list" def append_lang(source): if source in self.trans_opts.fields: return build_localized_fieldname(source, lang) return source return tuple(map(append_lang, sources)) prepopulated_fields = {} for dest, sources in self.prepopulated_fields.items(): if dest in self.trans_opts.fields: for lang in mt_settings.AVAILABLE_LANGUAGES: key = build_localized_fieldname(dest, lang) prepopulated_fields[key] = localize(sources, lang) else: lang = mt_settings.PREPOPULATE_LANGUAGE or get_language() prepopulated_fields[dest] = localize(sources, lang) self.prepopulated_fields = prepopulated_fields def _get_form_or_formset(self, request, obj, **kwargs): """ Generic code shared by get_form and get_formset. """ exclude = self.get_exclude(request, obj) if exclude is None: exclude = [] else: exclude = list(exclude) exclude.extend(self.get_readonly_fields(request, obj)) if not exclude and hasattr(self.form, '_meta') and self.form._meta.exclude: # Take the custom ModelForm's Meta.exclude into account only if the # ModelAdmin doesn't define its own. exclude.extend(self.form._meta.exclude) # If exclude is an empty list we pass None to be consistant with the # default on modelform_factory exclude = self.replace_orig_field(exclude) or None exclude = self._exclude_original_fields(exclude) kwargs.update({'exclude': exclude}) return kwargs def _get_fieldsets_pre_form_or_formset(self, request, obj=None): """ Generic get_fieldsets code, shared by TranslationAdmin and TranslationInlineModelAdmin. """ return self._get_declared_fieldsets(request, obj) def _get_fieldsets_post_form_or_formset(self, request, form, obj=None): """ Generic get_fieldsets code, shared by TranslationAdmin and TranslationInlineModelAdmin. """ base_fields = self.replace_orig_field(form.base_fields.keys()) fields = list(base_fields) + list(self.get_readonly_fields(request, obj)) return [(None, {'fields': self.replace_orig_field(fields)})] def get_translation_field_excludes(self, exclude_languages=None): """ Returns a tuple of translation field names to exclude based on `exclude_languages` arg. TODO: Currently unused? """ if exclude_languages is None: exclude_languages = [] excl_languages = [] if exclude_languages: excl_languages = exclude_languages exclude = [] for orig_fieldname, translation_fields in self.trans_opts.fields.items(): for tfield in translation_fields: if tfield.language in excl_languages and tfield not in exclude: exclude.append(tfield) return tuple(exclude) def get_readonly_fields(self, request, obj=None): """ Hook to specify custom readonly fields. """ return self.replace_orig_field(self.readonly_fields) class TranslationAdmin(TranslationBaseModelAdmin, admin.ModelAdmin): # TODO: Consider addition of a setting which allows to override the fallback to True group_fieldsets = False def __init__(self, *args, **kwargs): super(TranslationAdmin, self).__init__(*args, **kwargs) self._patch_list_editable() def _patch_list_editable(self): if self.list_editable: editable_new = list(self.list_editable) display_new = list(self.list_display) for field in self.list_editable: if field in self.trans_opts.fields: index = editable_new.index(field) display_index = display_new.index(field) translation_fields = get_translation_fields(field) editable_new[index:index + 1] = translation_fields display_new[display_index:display_index + 1] = translation_fields self.list_editable = editable_new self.list_display = display_new def _group_fieldsets(self, fieldsets): # Fieldsets are not grouped by default. The function is activated by # setting TranslationAdmin.group_fieldsets to True. If the admin class # already defines a fieldset, we leave it alone and assume the author # has done whatever grouping for translated fields they desire. if self.group_fieldsets is True: flattened_fieldsets = flatten_fieldsets(fieldsets) # Create a fieldset to group each translated field's localized fields fields = sorted((f for f in self.opts.get_fields() if f.concrete)) untranslated_fields = [ f.name for f in fields if ( # Exclude the primary key field f is not self.opts.auto_field and # Exclude non-editable fields f.editable and # Exclude the translation fields not hasattr(f, 'translated_field') and # Honour field arguments. We rely on the fact that the # passed fieldsets argument is already fully filtered # and takes options like exclude into account. f.name in flattened_fieldsets ) ] # TODO: Allow setting a label fieldsets = [('', {'fields': untranslated_fields},)] if untranslated_fields else [] temp_fieldsets = {} for orig_field, trans_fields in self.trans_opts.fields.items(): trans_fieldnames = [f.name for f in sorted(trans_fields, key=lambda x: x.name)] if any(f in trans_fieldnames for f in flattened_fieldsets): # Extract the original field's verbose_name for use as this # fieldset's label - using ugettext_lazy in your model # declaration can make that translatable. label = self.model._meta.get_field(orig_field).verbose_name.capitalize() temp_fieldsets[orig_field] = (label, { 'fields': trans_fieldnames, 'classes': ('mt-fieldset',) }) fields_order = unique(f.translated_field.name for f in self.opts.fields if hasattr(f, 'translated_field') and f.name in flattened_fieldsets) for field_name in fields_order: fieldsets.append(temp_fieldsets.pop(field_name)) assert not temp_fieldsets # cleaned return fieldsets def get_form(self, request, obj=None, **kwargs): kwargs = self._get_form_or_formset(request, obj, **kwargs) return super(TranslationAdmin, self).get_form(request, obj, **kwargs) def get_fieldsets(self, request, obj=None): return self._get_fieldsets_pre_form_or_formset(request, obj) or self._group_fieldsets( self._get_fieldsets_post_form_or_formset( request, self.get_form(request, obj, fields=None), obj)) class TranslationInlineModelAdmin(TranslationBaseModelAdmin, InlineModelAdmin): def get_formset(self, request, obj=None, **kwargs): kwargs = self._get_form_or_formset(request, obj, **kwargs) return super(TranslationInlineModelAdmin, self).get_formset(request, obj, **kwargs) def get_fieldsets(self, request, obj=None): # FIXME: If fieldsets are declared on an inline some kind of ghost # fieldset line with just the original model verbose_name of the model # is displayed above the new fieldsets. declared_fieldsets = self._get_fieldsets_pre_form_or_formset(request, obj) if declared_fieldsets: return declared_fieldsets form = self.get_formset(request, obj, fields=None).form return self._get_fieldsets_post_form_or_formset(request, form, obj) class TranslationTabularInline(TranslationInlineModelAdmin, admin.TabularInline): pass class TranslationStackedInline(TranslationInlineModelAdmin, admin.StackedInline): pass class TranslationGenericTabularInline(TranslationInlineModelAdmin, GenericTabularInline): pass class TranslationGenericStackedInline(TranslationInlineModelAdmin, GenericStackedInline): pass class TabbedDjangoJqueryTranslationAdmin(TranslationAdmin): """ Convenience class which includes the necessary media files for tabbed translation fields. Reuses Django's internal jquery version. """ class Media: js = ( 'admin/js/jquery.init.js', 'modeltranslation/js/force_jquery.js', mt_settings.JQUERY_UI_URL, mt_settings.JQUERY_MB_BROWSER_URL, 'modeltranslation/js/tabbed_translation_fields.js', ) css = { 'all': ('modeltranslation/css/tabbed_translation_fields.css',), } class TabbedExternalJqueryTranslationAdmin(TranslationAdmin): """ Convenience class which includes the necessary media files for tabbed translation fields. Loads recent jquery version from a cdn. """ class Media: js = ( mt_settings.JQUERY_URL, mt_settings.JQUERY_UI_URL, mt_settings.JQUERY_MB_BROWSER_URL, 'modeltranslation/js/tabbed_translation_fields.js', ) css = { 'screen': ('modeltranslation/css/tabbed_translation_fields.css',), } TabbedTranslationAdmin = TabbedDjangoJqueryTranslationAdmin
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var $stringCharAt; var $stringIndexOf; var $stringSubstring; (function() { %CheckIsBootstrapping(); var GlobalRegExp = global.RegExp; var GlobalString = global.String; //------------------------------------------------------------------- function StringConstructor(x) { if (%_ArgumentsLength() == 0) x = ''; if (%_IsConstructCall()) { %_SetValueOf(this, TO_STRING_INLINE(x)); } else { return IS_SYMBOL(x) ? %_CallFunction(x, $symbolToString) : TO_STRING_INLINE(x); } } // ECMA-262 section 15.5.4.2 function StringToString() { if (!IS_STRING(this) && !IS_STRING_WRAPPER(this)) { throw new $TypeError('String.prototype.toString is not generic'); } return %_ValueOf(this); } // ECMA-262 section 15.5.4.3 function StringValueOf() { if (!IS_STRING(this) && !IS_STRING_WRAPPER(this)) { throw new $TypeError('String.prototype.valueOf is not generic'); } return %_ValueOf(this); } // ECMA-262, section 15.5.4.4 function StringCharAtJS(pos) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.charAt"); var result = %_StringCharAt(this, pos); if (%_IsSmi(result)) { result = %_StringCharAt(TO_STRING_INLINE(this), TO_INTEGER(pos)); } return result; } // ECMA-262 section 15.5.4.5 function StringCharCodeAtJS(pos) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.charCodeAt"); var result = %_StringCharCodeAt(this, pos); if (!%_IsSmi(result)) { result = %_StringCharCodeAt(TO_STRING_INLINE(this), TO_INTEGER(pos)); } return result; } // ECMA-262, section 15.5.4.6 function StringConcat(other /* and more */) { // length == 1 CHECK_OBJECT_COERCIBLE(this, "String.prototype.concat"); var len = %_ArgumentsLength(); var this_as_string = TO_STRING_INLINE(this); if (len === 1) { return this_as_string + TO_STRING_INLINE(other); } var parts = new InternalArray(len + 1); parts[0] = this_as_string; for (var i = 0; i < len; i++) { var part = %_Arguments(i); parts[i + 1] = TO_STRING_INLINE(part); } return %StringBuilderConcat(parts, len + 1, ""); } // ECMA-262 section 15.5.4.7 function StringIndexOfJS(pattern /* position */) { // length == 1 CHECK_OBJECT_COERCIBLE(this, "String.prototype.indexOf"); var subject = TO_STRING_INLINE(this); pattern = TO_STRING_INLINE(pattern); var index = 0; if (%_ArgumentsLength() > 1) { index = %_Arguments(1); // position index = TO_INTEGER(index); if (index < 0) index = 0; if (index > subject.length) index = subject.length; } return %StringIndexOf(subject, pattern, index); } // ECMA-262 section 15.5.4.8 function StringLastIndexOfJS(pat /* position */) { // length == 1 CHECK_OBJECT_COERCIBLE(this, "String.prototype.lastIndexOf"); var sub = TO_STRING_INLINE(this); var subLength = sub.length; var pat = TO_STRING_INLINE(pat); var patLength = pat.length; var index = subLength - patLength; if (%_ArgumentsLength() > 1) { var position = ToNumber(%_Arguments(1)); if (!NUMBER_IS_NAN(position)) { position = TO_INTEGER(position); if (position < 0) { position = 0; } if (position + patLength < subLength) { index = position; } } } if (index < 0) { return -1; } return %StringLastIndexOf(sub, pat, index); } // ECMA-262 section 15.5.4.9 // // This function is implementation specific. For now, we do not // do anything locale specific. function StringLocaleCompareJS(other) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.localeCompare"); return %StringLocaleCompare(TO_STRING_INLINE(this), TO_STRING_INLINE(other)); } // ECMA-262 section 15.5.4.10 function StringMatchJS(regexp) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.match"); var subject = TO_STRING_INLINE(this); if (IS_REGEXP(regexp)) { // Emulate RegExp.prototype.exec's side effect in step 5, even though // value is discarded. var lastIndex = regexp.lastIndex; TO_INTEGER_FOR_SIDE_EFFECT(lastIndex); if (!regexp.global) return $regexpExecNoTests(regexp, subject, 0); var result = %StringMatch(subject, regexp, $regexpLastMatchInfo); if (result !== null) $regexpLastMatchInfoOverride = null; regexp.lastIndex = 0; return result; } // Non-regexp argument. regexp = new GlobalRegExp(regexp); return $regexpExecNoTests(regexp, subject, 0); } var NORMALIZATION_FORMS = ['NFC', 'NFD', 'NFKC', 'NFKD']; // ECMA-262 v6, section 21.1.3.12 // // For now we do nothing, as proper normalization requires big tables. // If Intl is enabled, then i18n.js will override it and provide the the // proper functionality. function StringNormalizeJS(form) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.normalize"); var form = form ? TO_STRING_INLINE(form) : 'NFC'; var normalizationForm = NORMALIZATION_FORMS.indexOf(form); if (normalizationForm === -1) { throw new $RangeError('The normalization form should be one of ' + NORMALIZATION_FORMS.join(', ') + '.'); } return %_ValueOf(this); } // This has the same size as the $regexpLastMatchInfo array, and can be used // for functions that expect that structure to be returned. It is used when // the needle is a string rather than a regexp. In this case we can't update // lastMatchArray without erroneously affecting the properties on the global // RegExp object. var reusableMatchInfo = [2, "", "", -1, -1]; // ECMA-262, section 15.5.4.11 function StringReplace(search, replace) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.replace"); var subject = TO_STRING_INLINE(this); // Decision tree for dispatch // .. regexp search // .... string replace // ...... non-global search // ........ empty string replace // ........ non-empty string replace (with $-expansion) // ...... global search // ........ no need to circumvent last match info override // ........ need to circument last match info override // .... function replace // ...... global search // ...... non-global search // .. string search // .... special case that replaces with one single character // ...... function replace // ...... string replace (with $-expansion) if (IS_REGEXP(search)) { // Emulate RegExp.prototype.exec's side effect in step 5, even if // value is discarded. var lastIndex = search.lastIndex; TO_INTEGER_FOR_SIDE_EFFECT(lastIndex); if (!IS_SPEC_FUNCTION(replace)) { replace = TO_STRING_INLINE(replace); if (!search.global) { // Non-global regexp search, string replace. var match = $regexpExec(search, subject, 0); if (match == null) { search.lastIndex = 0 return subject; } if (replace.length == 0) { return %_SubString(subject, 0, match[CAPTURE0]) + %_SubString(subject, match[CAPTURE1], subject.length) } return ExpandReplacement(replace, subject, $regexpLastMatchInfo, %_SubString(subject, 0, match[CAPTURE0])) + %_SubString(subject, match[CAPTURE1], subject.length); } // Global regexp search, string replace. search.lastIndex = 0; if ($regexpLastMatchInfoOverride == null) { return %StringReplaceGlobalRegExpWithString( subject, search, replace, $regexpLastMatchInfo); } else { // We use this hack to detect whether StringReplaceRegExpWithString // found at least one hit. In that case we need to remove any // override. var saved_subject = $regexpLastMatchInfo[LAST_SUBJECT_INDEX]; $regexpLastMatchInfo[LAST_SUBJECT_INDEX] = 0; var answer = %StringReplaceGlobalRegExpWithString( subject, search, replace, $regexpLastMatchInfo); if (%_IsSmi($regexpLastMatchInfo[LAST_SUBJECT_INDEX])) { $regexpLastMatchInfo[LAST_SUBJECT_INDEX] = saved_subject; } else { $regexpLastMatchInfoOverride = null; } return answer; } } if (search.global) { // Global regexp search, function replace. return StringReplaceGlobalRegExpWithFunction(subject, search, replace); } // Non-global regexp search, function replace. return StringReplaceNonGlobalRegExpWithFunction(subject, search, replace); } search = TO_STRING_INLINE(search); if (search.length == 1 && subject.length > 0xFF && IS_STRING(replace) && %StringIndexOf(replace, '$', 0) < 0) { // Searching by traversing a cons string tree and replace with cons of // slices works only when the replaced string is a single character, being // replaced by a simple string and only pays off for long strings. return %StringReplaceOneCharWithString(subject, search, replace); } var start = %StringIndexOf(subject, search, 0); if (start < 0) return subject; var end = start + search.length; var result = %_SubString(subject, 0, start); // Compute the string to replace with. if (IS_SPEC_FUNCTION(replace)) { var receiver = %GetDefaultReceiver(replace); result += %_CallFunction(receiver, search, start, subject, replace); } else { reusableMatchInfo[CAPTURE0] = start; reusableMatchInfo[CAPTURE1] = end; result = ExpandReplacement(TO_STRING_INLINE(replace), subject, reusableMatchInfo, result); } return result + %_SubString(subject, end, subject.length); } // Expand the $-expressions in the string and return a new string with // the result. function ExpandReplacement(string, subject, matchInfo, result) { var length = string.length; var next = %StringIndexOf(string, '$', 0); if (next < 0) { if (length > 0) result += string; return result; } if (next > 0) result += %_SubString(string, 0, next); while (true) { var expansion = '$'; var position = next + 1; if (position < length) { var peek = %_StringCharCodeAt(string, position); if (peek == 36) { // $$ ++position; result += '$'; } else if (peek == 38) { // $& - match ++position; result += %_SubString(subject, matchInfo[CAPTURE0], matchInfo[CAPTURE1]); } else if (peek == 96) { // $` - prefix ++position; result += %_SubString(subject, 0, matchInfo[CAPTURE0]); } else if (peek == 39) { // $' - suffix ++position; result += %_SubString(subject, matchInfo[CAPTURE1], subject.length); } else if (peek >= 48 && peek <= 57) { // Valid indices are $1 .. $9, $01 .. $09 and $10 .. $99 var scaled_index = (peek - 48) << 1; var advance = 1; var number_of_captures = NUMBER_OF_CAPTURES(matchInfo); if (position + 1 < string.length) { var next = %_StringCharCodeAt(string, position + 1); if (next >= 48 && next <= 57) { var new_scaled_index = scaled_index * 10 + ((next - 48) << 1); if (new_scaled_index < number_of_captures) { scaled_index = new_scaled_index; advance = 2; } } } if (scaled_index != 0 && scaled_index < number_of_captures) { var start = matchInfo[CAPTURE(scaled_index)]; if (start >= 0) { result += %_SubString(subject, start, matchInfo[CAPTURE(scaled_index + 1)]); } position += advance; } else { result += '$'; } } else { result += '$'; } } else { result += '$'; } // Go the the next $ in the string. next = %StringIndexOf(string, '$', position); // Return if there are no more $ characters in the string. If we // haven't reached the end, we need to append the suffix. if (next < 0) { if (position < length) { result += %_SubString(string, position, length); } return result; } // Append substring between the previous and the next $ character. if (next > position) { result += %_SubString(string, position, next); } } return result; } // Compute the string of a given regular expression capture. function CaptureString(string, lastCaptureInfo, index) { // Scale the index. var scaled = index << 1; // Compute start and end. var start = lastCaptureInfo[CAPTURE(scaled)]; // If start isn't valid, return undefined. if (start < 0) return; var end = lastCaptureInfo[CAPTURE(scaled + 1)]; return %_SubString(string, start, end); } // TODO(lrn): This array will survive indefinitely if replace is never // called again. However, it will be empty, since the contents are cleared // in the finally block. var reusableReplaceArray = new InternalArray(16); // Helper function for replacing regular expressions with the result of a // function application in String.prototype.replace. function StringReplaceGlobalRegExpWithFunction(subject, regexp, replace) { var resultArray = reusableReplaceArray; if (resultArray) { reusableReplaceArray = null; } else { // Inside a nested replace (replace called from the replacement function // of another replace) or we have failed to set the reusable array // back due to an exception in a replacement function. Create a new // array to use in the future, or until the original is written back. resultArray = new InternalArray(16); } var res = %RegExpExecMultiple(regexp, subject, $regexpLastMatchInfo, resultArray); regexp.lastIndex = 0; if (IS_NULL(res)) { // No matches at all. reusableReplaceArray = resultArray; return subject; } var len = res.length; if (NUMBER_OF_CAPTURES($regexpLastMatchInfo) == 2) { // If the number of captures is two then there are no explicit captures in // the regexp, just the implicit capture that captures the whole match. In // this case we can simplify quite a bit and end up with something faster. // The builder will consist of some integers that indicate slices of the // input string and some replacements that were returned from the replace // function. var match_start = 0; var override = new InternalPackedArray(null, 0, subject); var receiver = %GetDefaultReceiver(replace); for (var i = 0; i < len; i++) { var elem = res[i]; if (%_IsSmi(elem)) { // Integers represent slices of the original string. Use these to // get the offsets we need for the override array (so things like // RegExp.leftContext work during the callback function. if (elem > 0) { match_start = (elem >> 11) + (elem & 0x7ff); } else { match_start = res[++i] - elem; } } else { override[0] = elem; override[1] = match_start; $regexpLastMatchInfoOverride = override; var func_result = %_CallFunction(receiver, elem, match_start, subject, replace); // Overwrite the i'th element in the results with the string we got // back from the callback function. res[i] = TO_STRING_INLINE(func_result); match_start += elem.length; } } } else { var receiver = %GetDefaultReceiver(replace); for (var i = 0; i < len; i++) { var elem = res[i]; if (!%_IsSmi(elem)) { // elem must be an Array. // Use the apply argument as backing for global RegExp properties. $regexpLastMatchInfoOverride = elem; var func_result = %Apply(replace, receiver, elem, 0, elem.length); // Overwrite the i'th element in the results with the string we got // back from the callback function. res[i] = TO_STRING_INLINE(func_result); } } } var result = %StringBuilderConcat(res, res.length, subject); resultArray.length = 0; reusableReplaceArray = resultArray; return result; } function StringReplaceNonGlobalRegExpWithFunction(subject, regexp, replace) { var matchInfo = $regexpExec(regexp, subject, 0); if (IS_NULL(matchInfo)) { regexp.lastIndex = 0; return subject; } var index = matchInfo[CAPTURE0]; var result = %_SubString(subject, 0, index); var endOfMatch = matchInfo[CAPTURE1]; // Compute the parameter list consisting of the match, captures, index, // and subject for the replace function invocation. // The number of captures plus one for the match. var m = NUMBER_OF_CAPTURES(matchInfo) >> 1; var replacement; var receiver = %GetDefaultReceiver(replace); if (m == 1) { // No captures, only the match, which is always valid. var s = %_SubString(subject, index, endOfMatch); // Don't call directly to avoid exposing the built-in global object. replacement = %_CallFunction(receiver, s, index, subject, replace); } else { var parameters = new InternalArray(m + 2); for (var j = 0; j < m; j++) { parameters[j] = CaptureString(subject, matchInfo, j); } parameters[j] = index; parameters[j + 1] = subject; replacement = %Apply(replace, receiver, parameters, 0, j + 2); } result += replacement; // The add method converts to string if necessary. // Can't use matchInfo any more from here, since the function could // overwrite it. return result + %_SubString(subject, endOfMatch, subject.length); } // ECMA-262 section 15.5.4.12 function StringSearch(re) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.search"); var regexp; if (IS_STRING(re)) { regexp = %_GetFromCache(STRING_TO_REGEXP_CACHE_ID, re); } else if (IS_REGEXP(re)) { regexp = re; } else { regexp = new GlobalRegExp(re); } var match = $regexpExec(regexp, TO_STRING_INLINE(this), 0); if (match) { return match[CAPTURE0]; } return -1; } // ECMA-262 section 15.5.4.13 function StringSlice(start, end) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.slice"); var s = TO_STRING_INLINE(this); var s_len = s.length; var start_i = TO_INTEGER(start); var end_i = s_len; if (!IS_UNDEFINED(end)) { end_i = TO_INTEGER(end); } if (start_i < 0) { start_i += s_len; if (start_i < 0) { start_i = 0; } } else { if (start_i > s_len) { return ''; } } if (end_i < 0) { end_i += s_len; if (end_i < 0) { return ''; } } else { if (end_i > s_len) { end_i = s_len; } } if (end_i <= start_i) { return ''; } return %_SubString(s, start_i, end_i); } // ECMA-262 section 15.5.4.14 function StringSplitJS(separator, limit) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.split"); var subject = TO_STRING_INLINE(this); limit = (IS_UNDEFINED(limit)) ? 0xffffffff : TO_UINT32(limit); var length = subject.length; if (!IS_REGEXP(separator)) { var separator_string = TO_STRING_INLINE(separator); if (limit === 0) return []; // ECMA-262 says that if separator is undefined, the result should // be an array of size 1 containing the entire string. if (IS_UNDEFINED(separator)) return [subject]; var separator_length = separator_string.length; // If the separator string is empty then return the elements in the subject. if (separator_length === 0) return %StringToArray(subject, limit); var result = %StringSplit(subject, separator_string, limit); return result; } if (limit === 0) return []; // Separator is a regular expression. return StringSplitOnRegExp(subject, separator, limit, length); } function StringSplitOnRegExp(subject, separator, limit, length) { if (length === 0) { if ($regexpExec(separator, subject, 0, 0) != null) { return []; } return [subject]; } var currentIndex = 0; var startIndex = 0; var startMatch = 0; var result = new InternalArray(); outer_loop: while (true) { if (startIndex === length) { result[result.length] = %_SubString(subject, currentIndex, length); break; } var matchInfo = $regexpExec(separator, subject, startIndex); if (matchInfo == null || length === (startMatch = matchInfo[CAPTURE0])) { result[result.length] = %_SubString(subject, currentIndex, length); break; } var endIndex = matchInfo[CAPTURE1]; // We ignore a zero-length match at the currentIndex. if (startIndex === endIndex && endIndex === currentIndex) { startIndex++; continue; } result[result.length] = %_SubString(subject, currentIndex, startMatch); if (result.length === limit) break; var matchinfo_len = NUMBER_OF_CAPTURES(matchInfo) + REGEXP_FIRST_CAPTURE; for (var i = REGEXP_FIRST_CAPTURE + 2; i < matchinfo_len; ) { var start = matchInfo[i++]; var end = matchInfo[i++]; if (end != -1) { result[result.length] = %_SubString(subject, start, end); } else { result[result.length] = UNDEFINED; } if (result.length === limit) break outer_loop; } startIndex = currentIndex = endIndex; } var array_result = []; %MoveArrayContents(result, array_result); return array_result; } // ECMA-262 section 15.5.4.15 function StringSubstring(start, end) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.subString"); var s = TO_STRING_INLINE(this); var s_len = s.length; var start_i = TO_INTEGER(start); if (start_i < 0) { start_i = 0; } else if (start_i > s_len) { start_i = s_len; } var end_i = s_len; if (!IS_UNDEFINED(end)) { end_i = TO_INTEGER(end); if (end_i > s_len) { end_i = s_len; } else { if (end_i < 0) end_i = 0; if (start_i > end_i) { var tmp = end_i; end_i = start_i; start_i = tmp; } } } return %_SubString(s, start_i, end_i); } // ES6 draft, revision 26 (2014-07-18), section B.2.3.1 function StringSubstr(start, n) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.substr"); var s = TO_STRING_INLINE(this); var len; // Correct n: If not given, set to string length; if explicitly // set to undefined, zero, or negative, returns empty string. if (IS_UNDEFINED(n)) { len = s.length; } else { len = TO_INTEGER(n); if (len <= 0) return ''; } // Correct start: If not given (or undefined), set to zero; otherwise // convert to integer and handle negative case. if (IS_UNDEFINED(start)) { start = 0; } else { start = TO_INTEGER(start); // If positive, and greater than or equal to the string length, // return empty string. if (start >= s.length) return ''; // If negative and absolute value is larger than the string length, // use zero. if (start < 0) { start += s.length; if (start < 0) start = 0; } } var end = start + len; if (end > s.length) end = s.length; return %_SubString(s, start, end); } // ECMA-262, 15.5.4.16 function StringToLowerCaseJS() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.toLowerCase"); return %StringToLowerCase(TO_STRING_INLINE(this)); } // ECMA-262, 15.5.4.17 function StringToLocaleLowerCase() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.toLocaleLowerCase"); return %StringToLowerCase(TO_STRING_INLINE(this)); } // ECMA-262, 15.5.4.18 function StringToUpperCaseJS() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.toUpperCase"); return %StringToUpperCase(TO_STRING_INLINE(this)); } // ECMA-262, 15.5.4.19 function StringToLocaleUpperCase() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.toLocaleUpperCase"); return %StringToUpperCase(TO_STRING_INLINE(this)); } // ES5, 15.5.4.20 function StringTrimJS() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.trim"); return %StringTrim(TO_STRING_INLINE(this), true, true); } function StringTrimLeft() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.trimLeft"); return %StringTrim(TO_STRING_INLINE(this), true, false); } function StringTrimRight() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.trimRight"); return %StringTrim(TO_STRING_INLINE(this), false, true); } // ECMA-262, section 15.5.3.2 function StringFromCharCode(code) { var n = %_ArgumentsLength(); if (n == 1) { if (!%_IsSmi(code)) code = ToNumber(code); return %_StringCharFromCode(code & 0xffff); } var one_byte = %NewString(n, NEW_ONE_BYTE_STRING); var i; for (i = 0; i < n; i++) { var code = %_Arguments(i); if (!%_IsSmi(code)) code = ToNumber(code) & 0xffff; if (code < 0) code = code & 0xffff; if (code > 0xff) break; %_OneByteSeqStringSetChar(i, code, one_byte); } if (i == n) return one_byte; one_byte = %TruncateString(one_byte, i); var two_byte = %NewString(n - i, NEW_TWO_BYTE_STRING); for (var j = 0; i < n; i++, j++) { var code = %_Arguments(i); if (!%_IsSmi(code)) code = ToNumber(code) & 0xffff; %_TwoByteSeqStringSetChar(j, code, two_byte); } return one_byte + two_byte; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.2.1 function HtmlEscape(str) { return TO_STRING_INLINE(str).replace(/"/g, "&quot;"); } // ES6 draft, revision 26 (2014-07-18), section B.2.3.2 function StringAnchor(name) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.anchor"); return "<a name=\"" + HtmlEscape(name) + "\">" + this + "</a>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.3 function StringBig() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.big"); return "<big>" + this + "</big>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.4 function StringBlink() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.blink"); return "<blink>" + this + "</blink>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.5 function StringBold() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.bold"); return "<b>" + this + "</b>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.6 function StringFixed() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.fixed"); return "<tt>" + this + "</tt>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.7 function StringFontcolor(color) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.fontcolor"); return "<font color=\"" + HtmlEscape(color) + "\">" + this + "</font>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.8 function StringFontsize(size) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.fontsize"); return "<font size=\"" + HtmlEscape(size) + "\">" + this + "</font>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.9 function StringItalics() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.italics"); return "<i>" + this + "</i>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.10 function StringLink(s) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.link"); return "<a href=\"" + HtmlEscape(s) + "\">" + this + "</a>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.11 function StringSmall() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.small"); return "<small>" + this + "</small>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.12 function StringStrike() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.strike"); return "<strike>" + this + "</strike>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.13 function StringSub() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.sub"); return "<sub>" + this + "</sub>"; } // ES6 draft, revision 26 (2014-07-18), section B.2.3.14 function StringSup() { CHECK_OBJECT_COERCIBLE(this, "String.prototype.sup"); return "<sup>" + this + "</sup>"; } // ES6 draft 01-20-14, section 21.1.3.13 function StringRepeat(count) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.repeat"); var s = TO_STRING_INLINE(this); var n = ToInteger(count); // The maximum string length is stored in a smi, so a longer repeat // must result in a range error. if (n < 0 || n > %_MaxSmi()) { throw MakeRangeError("invalid_count_value", []); } var r = ""; while (true) { if (n & 1) r += s; n >>= 1; if (n === 0) return r; s += s; } } // ES6 draft 04-05-14, section 21.1.3.18 function StringStartsWith(searchString /* position */) { // length == 1 CHECK_OBJECT_COERCIBLE(this, "String.prototype.startsWith"); var s = TO_STRING_INLINE(this); if (IS_REGEXP(searchString)) { throw MakeTypeError("first_argument_not_regexp", ["String.prototype.startsWith"]); } var ss = TO_STRING_INLINE(searchString); var pos = 0; if (%_ArgumentsLength() > 1) { pos = %_Arguments(1); // position pos = ToInteger(pos); } var s_len = s.length; var start = $min($max(pos, 0), s_len); var ss_len = ss.length; if (ss_len + start > s_len) { return false; } return %StringIndexOf(s, ss, start) === start; } // ES6 draft 04-05-14, section 21.1.3.7 function StringEndsWith(searchString /* position */) { // length == 1 CHECK_OBJECT_COERCIBLE(this, "String.prototype.endsWith"); var s = TO_STRING_INLINE(this); if (IS_REGEXP(searchString)) { throw MakeTypeError("first_argument_not_regexp", ["String.prototype.endsWith"]); } var ss = TO_STRING_INLINE(searchString); var s_len = s.length; var pos = s_len; if (%_ArgumentsLength() > 1) { var arg = %_Arguments(1); // position if (!IS_UNDEFINED(arg)) { pos = ToInteger(arg); } } var end = $min($max(pos, 0), s_len); var ss_len = ss.length; var start = end - ss_len; if (start < 0) { return false; } return %StringLastIndexOf(s, ss, start) === start; } // ES6 draft 04-05-14, section 21.1.3.6 function StringIncludes(searchString /* position */) { // length == 1 CHECK_OBJECT_COERCIBLE(this, "String.prototype.includes"); var s = TO_STRING_INLINE(this); if (IS_REGEXP(searchString)) { throw MakeTypeError("first_argument_not_regexp", ["String.prototype.includes"]); } var ss = TO_STRING_INLINE(searchString); var pos = 0; if (%_ArgumentsLength() > 1) { pos = %_Arguments(1); // position pos = ToInteger(pos); } var s_len = s.length; var start = $min($max(pos, 0), s_len); var ss_len = ss.length; if (ss_len + start > s_len) { return false; } return %StringIndexOf(s, ss, start) !== -1; } // ES6 Draft 05-22-2014, section 21.1.3.3 function StringCodePointAt(pos) { CHECK_OBJECT_COERCIBLE(this, "String.prototype.codePointAt"); var string = TO_STRING_INLINE(this); var size = string.length; pos = TO_INTEGER(pos); if (pos < 0 || pos >= size) { return UNDEFINED; } var first = %_StringCharCodeAt(string, pos); if (first < 0xD800 || first > 0xDBFF || pos + 1 == size) { return first; } var second = %_StringCharCodeAt(string, pos + 1); if (second < 0xDC00 || second > 0xDFFF) { return first; } return (first - 0xD800) * 0x400 + second + 0x2400; } // ES6 Draft 05-22-2014, section 21.1.2.2 function StringFromCodePoint(_) { // length = 1 var code; var length = %_ArgumentsLength(); var index; var result = ""; for (index = 0; index < length; index++) { code = %_Arguments(index); if (!%_IsSmi(code)) { code = ToNumber(code); } if (code < 0 || code > 0x10FFFF || code !== TO_INTEGER(code)) { throw MakeRangeError("invalid_code_point", [code]); } if (code <= 0xFFFF) { result += %_StringCharFromCode(code); } else { code -= 0x10000; result += %_StringCharFromCode((code >>> 10) & 0x3FF | 0xD800); result += %_StringCharFromCode(code & 0x3FF | 0xDC00); } } return result; } // ------------------------------------------------------------------- // String methods related to templates // ES6 Draft 03-17-2015, section 21.1.2.4 function StringRaw(callSite) { // TODO(caitp): Use rest parameters when implemented var numberOfSubstitutions = %_ArgumentsLength(); var cooked = ToObject(callSite); var raw = ToObject(cooked.raw); var literalSegments = ToLength(raw.length); if (literalSegments <= 0) return ""; var result = ToString(raw[0]); for (var i = 1; i < literalSegments; ++i) { if (i < numberOfSubstitutions) { result += ToString(%_Arguments(i)); } result += ToString(raw[i]); } return result; } // ------------------------------------------------------------------- // Set the String function and constructor. %SetCode(GlobalString, StringConstructor); %FunctionSetPrototype(GlobalString, new GlobalString()); // Set up the constructor property on the String prototype object. %AddNamedProperty( GlobalString.prototype, "constructor", GlobalString, DONT_ENUM); // Set up the non-enumerable functions on the String object. InstallFunctions(GlobalString, DONT_ENUM, [ "fromCharCode", StringFromCharCode, "fromCodePoint", StringFromCodePoint, "raw", StringRaw ]); // Set up the non-enumerable functions on the String prototype object. InstallFunctions(GlobalString.prototype, DONT_ENUM, [ "valueOf", StringValueOf, "toString", StringToString, "charAt", StringCharAtJS, "charCodeAt", StringCharCodeAtJS, "codePointAt", StringCodePointAt, "concat", StringConcat, "endsWith", StringEndsWith, "includes", StringIncludes, "indexOf", StringIndexOfJS, "lastIndexOf", StringLastIndexOfJS, "localeCompare", StringLocaleCompareJS, "match", StringMatchJS, "normalize", StringNormalizeJS, "repeat", StringRepeat, "replace", StringReplace, "search", StringSearch, "slice", StringSlice, "split", StringSplitJS, "substring", StringSubstring, "substr", StringSubstr, "startsWith", StringStartsWith, "toLowerCase", StringToLowerCaseJS, "toLocaleLowerCase", StringToLocaleLowerCase, "toUpperCase", StringToUpperCaseJS, "toLocaleUpperCase", StringToLocaleUpperCase, "trim", StringTrimJS, "trimLeft", StringTrimLeft, "trimRight", StringTrimRight, "link", StringLink, "anchor", StringAnchor, "fontcolor", StringFontcolor, "fontsize", StringFontsize, "big", StringBig, "blink", StringBlink, "bold", StringBold, "fixed", StringFixed, "italics", StringItalics, "small", StringSmall, "strike", StringStrike, "sub", StringSub, "sup", StringSup ]); $stringCharAt = StringCharAtJS; $stringIndexOf = StringIndexOfJS; $stringSubstring = StringSubstring; })();
/*! For license information please see editor.main.nls.zh-tw.js.LICENSE.txt */ define("vs/editor/editor.main.nls.zh-tw",{"vs/base/browser/ui/actionbar/actionbar":["{0} ({1})"],"vs/base/browser/ui/aria/aria":["{0} (\u518d\u6b21\u51fa\u73fe)","{0} (\u51fa\u73fe {1} \u6b21)"],"vs/base/browser/ui/findinput/findInput":["\u8f38\u5165"],"vs/base/browser/ui/findinput/findInputCheckboxes":["\u5927\u5c0f\u5beb\u9808\u76f8\u7b26","\u5168\u5b57\u62fc\u5beb\u9808\u76f8\u7b26","\u4f7f\u7528\u898f\u5247\u904b\u7b97\u5f0f"],"vs/base/browser/ui/findinput/replaceInput":["\u8f38\u5165","\u4fdd\u7559\u6848\u4f8b"],"vs/base/browser/ui/inputbox/inputBox":["\u932f\u8aa4: {0}","\u8b66\u544a: {0}","\u8cc7\u8a0a: {0}"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["\u672a\u7e6b\u7d50"],"vs/base/browser/ui/list/listWidget":["{0}\u3002\u8acb\u4f7f\u7528\u5c0e\u89bd\u9375\u4f86\u5c0e\u89bd\u3002"],"vs/base/browser/ui/menu/menu":["{0} ({1})"],"vs/base/browser/ui/tree/abstractTree":["\u6e05\u9664","\u5728\u985e\u578b\u4e0a\u505c\u7528\u7be9\u9078","\u5728\u985e\u578b\u4e0a\u555f\u7528\u7be9\u9078","\u627e\u4e0d\u5230\u4efb\u4f55\u5143\u7d20","{1} \u9805\u5143\u7d20\u4e2d\u6709 {0} \u9805\u76f8\u7b26"],"vs/base/common/keybindingLabels":["Ctrl","Shift","Alt","Windows","Ctrl","Shift","Alt","\u8d85\u7d1a\u9375","Control","Shift","Alt","\u547d\u4ee4","Control","Shift","Alt","Windows","Control","Shift","Alt","\u8d85\u7d1a\u9375"],"vs/base/common/severity":["\u932f\u8aa4","\u8b66\u544a","\u8cc7\u8a0a"],"vs/base/parts/quickopen/browser/quickOpenModel":["{0}\uff0c\u9078\u64c7\u5668","\u9078\u64c7\u5668"],"vs/base/parts/quickopen/browser/quickOpenWidget":["\u5feb\u901f\u9078\u64c7\u5668\u3002\u8f38\u5165\u4ee5\u7e2e\u5c0f\u7d50\u679c\u7bc4\u570d\u3002","\u5feb\u901f\u9078\u64c7\u5668","{0} \u500b\u7d50\u679c"],"vs/editor/browser/controller/coreCommands":["\u5168\u9078(&&S)","\u5fa9\u539f(&&U)","\u53d6\u6d88\u5fa9\u539f(&&R)"],"vs/editor/browser/controller/textAreaHandler":["\u7de8\u8f2f\u5668\u73fe\u5728\u7121\u6cd5\u5b58\u53d6\u3002\u6309Alt+F1\u5c0b\u6c42\u9078\u9805"],"vs/editor/browser/widget/codeEditorWidget":["\u6e38\u6a19\u6578\u5df2\u9650\u5236\u70ba {0} \u500b\u3002"],"vs/editor/browser/widget/diffEditorWidget":["\u56e0\u5176\u4e2d\u4e00\u500b\u6a94\u6848\u904e\u5927\u800c\u7121\u6cd5\u6bd4\u8f03\u3002"],"vs/editor/browser/widget/diffReview":["\u95dc\u9589","\u6c92\u6709\u4efb\u4f55\u884c","1 \u500b\u884c","{0} \u500b\u884c","{1} \u7684 {0} \u4e0d\u540c: \u539f\u59cb\u70ba {2}\uff0c{3}\uff0c\u4fee\u6539\u5f8c\u70ba {4}\uff0c{5}","\u7a7a\u767d","\u539f\u59cb {0},\u4fee\u6539\u5f8c{1}: {2}","+ \u4fee\u6539\u5f8c {0}: {1}","- \u539f\u59cb {0}: {1}","\u79fb\u81f3\u4e0b\u4e00\u500b\u5dee\u7570","\u79fb\u81f3\u4e0a\u4e00\u500b\u5dee\u7570"],"vs/editor/browser/widget/inlineDiffMargin":["\u8907\u88fd\u5df2\u522a\u9664\u7684\u884c","\u8907\u88fd\u5df2\u522a\u9664\u7684\u884c","\u8907\u88fd\u5df2\u522a\u9664\u7684\u884c \uff08{0}\uff09","\u9084\u539f\u6b64\u8b8a\u66f4","\u8907\u88fd\u5df2\u522a\u9664\u7684\u884c \uff08{0}\uff09"],"vs/editor/common/config/commonEditorConfig":["\u7de8\u8f2f\u5668","\u8207 Tab \u76f8\u7b49\u7684\u7a7a\u683c\u6578\u91cf\u3002\u7576 `#editor.detectIndentation#` \u5df2\u958b\u555f\u6642\uff0c\u6703\u6839\u64da\u6a94\u6848\u5167\u5bb9\u8986\u5beb\u6b64\u8a2d\u5b9a\u3002","\u5728\u6309 `Tab` \u6642\u63d2\u5165\u7a7a\u683c\u3002\u7576 `#editor.detectIndentation#` \u958b\u555f\u6642\uff0c\u6703\u6839\u64da\u6a94\u6848\u5167\u5bb9\u8986\u5beb\u6b64\u8a2d\u5b9a\u3002","\u6839\u64da\u6a94\u6848\u5167\u5bb9\uff0c\u63a7\u5236\u7576\u6a94\u6848\u958b\u555f\u6642\uff0c\u662f\u5426\u81ea\u52d5\u5075\u6e2c `#editor.tabSize#` \u548c `#editor.insertSpaces#`\u3002","\u79fb\u9664\u5c3e\u7aef\u81ea\u52d5\u63d2\u5165\u7684\u7a7a\u767d\u5b57\u5143\u3002","\u91dd\u5c0d\u5927\u578b\u6a94\u6848\u505c\u7528\u90e8\u5206\u9ad8\u8a18\u61b6\u9ad4\u9700\u6c42\u529f\u80fd\u7684\u7279\u6b8a\u8655\u7406\u65b9\u5f0f\u3002","\u63a7\u5236\u662f\u5426\u61c9\u6839\u64da\u6587\u4ef6\u4e2d\u7684\u55ae\u5b57\u8a08\u7b97\u81ea\u52d5\u5b8c\u6210\u3002","Controls whether the semanticHighlighting is shown for the languages that support it.","\u5373\u4f7f\u6309\u5169\u4e0b\u5167\u5bb9\u6216\u6309 `Escape`\uff0c\u4ecd\u4fdd\u6301\u7784\u5b54\u7de8\u8f2f\u5668\u958b\u555f\u3002","\u56e0\u6548\u80fd\u7684\u7de3\u6545\uff0c\u4e0d\u6703\u5c07\u8d85\u904e\u6b64\u9ad8\u5ea6\u7684\u884c Token \u5316","\u53d6\u6d88 Diff \u8a08\u7b97\u524d\u7684\u903e\u6642\u9650\u5236 (\u6beb\u79d2)\u3002\u82e5\u7121\u903e\u6642\uff0c\u8acb\u4f7f\u7528 0\u3002","\u63a7\u5236 Diff \u7de8\u8f2f\u5668\u8981\u4e26\u6392\u6216\u5167\u5d4c\u986f\u793a Diff\u3002","\u63a7\u5236 Diff \u7de8\u8f2f\u5668\u662f\u5426\u5c07\u958b\u982d\u6216\u5c3e\u7aef\u7a7a\u767d\u5b57\u5143\u7684\u8b8a\u66f4\u986f\u793a\u70ba Diff\u3002","\u63a7\u5236 Diff \u7de8\u8f2f\u5668\u662f\u5426\u8981\u70ba\u65b0\u589e/\u79fb\u9664\u7684\u8b8a\u66f4\u986f\u793a +/- \u6a19\u8a18\u3002"],"vs/editor/common/config/editorOptions":["\u7de8\u8f2f\u5668\u5c07\u4f7f\u7528\u5e73\u53f0 API \u4ee5\u5075\u6e2c\u87a2\u5e55\u52a9\u8b80\u7a0b\u5f0f\u9644\u52a0\u3002","\u7de8\u8f2f\u5668\u5c07\u6703\u70ba\u87a2\u5e55\u52a9\u8b80\u7a0b\u5f0f\u7684\u4f7f\u7528\u65b9\u5f0f\u6c38\u4e45\u5730\u6700\u4f73\u5316\u3002","\u7de8\u8f2f\u5668\u4e0d\u6703\u70ba\u87a2\u5e55\u52a9\u8b80\u7a0b\u5f0f\u7684\u4f7f\u7528\u65b9\u5f0f\u9032\u884c\u6700\u4f73\u5316\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u65bc\u5df2\u70ba\u87a2\u5e55\u52a9\u8b80\u7a0b\u5f0f\u6700\u4f73\u5316\u7684\u6a21\u5f0f\u4e2d\u57f7\u884c\u3002","\u63a7\u5236\u662f\u5426\u8981\u5728\u8a3b\u89e3\u6642\u63d2\u5165\u7a7a\u767d\u5b57\u5143\u3002","\u63a7\u5236\u8907\u88fd\u6642\u4e0d\u9078\u53d6\u4efb\u4f55\u9805\u76ee\u662f\u5426\u6703\u8907\u88fd\u76ee\u524d\u7a0b\u5f0f\u884c\u3002","\u63a7\u5236 [\u5c0b\u627e\u5c0f\u5de5\u5177] \u4e2d\u7684\u641c\u5c0b\u5b57\u4e32\u662f\u5426\u4f86\u81ea\u7de8\u8f2f\u5668\u9078\u53d6\u9805\u76ee\u3002","\u6c38\u4e0d\u81ea\u52d5\u958b\u555f [\u5728\u9078\u53d6\u7bc4\u570d\u4e2d\u5c0b\u627e] (\u9810\u8a2d)","\u4e00\u5f8b\u81ea\u52d5\u958b\u555f [\u5728\u9078\u53d6\u7bc4\u570d\u4e2d\u5c0b\u627e]","\u9078\u53d6\u591a\u884c\u5167\u5bb9\u6642\uff0c\u81ea\u52d5\u958b\u555f [\u5728\u9078\u53d6\u7bc4\u570d\u4e2d\u5c0b\u627e]\u3002","\u63a7\u5236\u5c0b\u627e\u4f5c\u696d\u8981\u5c0d\u5df2\u9078\u53d6\u6587\u5b57\u6216\u7de8\u8f2f\u5668\u5167\u7684\u6574\u500b\u6a94\u6848\u57f7\u884c\u3002","\u63a7\u5236\u5c0b\u627e\u5c0f\u5de5\u5177\u662f\u5426\u5728 macOS \u4e0a\u8b80\u53d6\u6216\u4fee\u6539\u5171\u7528\u5c0b\u627e\u526a\u8cbc\u7c3f\u3002","\u63a7\u5236\u5c0b\u627e\u5c0f\u5de5\u5177\u662f\u5426\u61c9\u5728\u7de8\u8f2f\u5668\u9802\u7aef\u984d\u5916\u65b0\u589e\u884c\u3002\u82e5\u70ba true\uff0c\u7576\u60a8\u53ef\u770b\u5230\u5c0b\u627e\u5c0f\u5de5\u5177\u6642\uff0c\u60a8\u7684\u6372\u52d5\u7bc4\u570d\u6703\u8d85\u904e\u7b2c\u4e00\u884c\u3002","\u555f\u7528/\u505c\u7528\u9023\u5b57\u5b57\u578b\u3002","\u660e\u78ba font-feature-settings\u3002","\u8a2d\u5b9a\u9023\u5b57\u5b57\u578b\u3002","\u63a7\u5236\u5b57\u578b\u5927\u5c0f (\u4ee5\u50cf\u7d20\u70ba\u55ae\u4f4d)\u3002","\u986f\u793a\u7d50\u679c\u7684\u9810\u89bd\u6aa2\u8996 (\u9810\u8a2d)","\u79fb\u81f3\u4e3b\u8981\u7d50\u679c\u4e26\u986f\u793a\u9810\u89bd\u6aa2\u8996","\u524d\u5f80\u4e3b\u8981\u7d50\u679c\uff0c\u4e26\u5c0d\u5176\u4ed6\u4eba\u555f\u7528\u7121\u9810\u89bd\u700f\u89bd","\u6b64\u8a2d\u5b9a\u5df2\u6dd8\u6c70\uff0c\u8acb\u6539\u7528 'editor.editor.gotoLocation.multipleDefinitions' \u6216 'editor.editor.gotoLocation.multipleImplementations' \u7b49\u55ae\u7368\u8a2d\u5b9a\u3002","\u63a7\u5236 'Go to Definition' \u547d\u4ee4\u5728\u6709\u591a\u500b\u76ee\u6a19\u4f4d\u7f6e\u5b58\u5728\u6642\u7684\u884c\u70ba\u3002","\u63a7\u5236 'Go to Type Definition' \u547d\u4ee4\u5728\u6709\u591a\u500b\u76ee\u6a19\u4f4d\u7f6e\u5b58\u5728\u6642\u7684\u884c\u70ba\u3002","\u63a7\u5236 'Go to Declaration' \u547d\u4ee4\u5728\u6709\u591a\u500b\u76ee\u6a19\u4f4d\u7f6e\u5b58\u5728\u6642\u7684\u884c\u70ba\u3002","\u63a7\u5236 'Go to Implementations' \u547d\u4ee4\u5728\u6709\u591a\u500b\u76ee\u6a19\u4f4d\u7f6e\u5b58\u5728\u6642\u7684\u884c\u70ba\u3002","\u63a7\u5236 'Go to References' \u547d\u4ee4\u5728\u6709\u591a\u500b\u76ee\u6a19\u4f4d\u7f6e\u5b58\u5728\u6642\u7684\u884c\u70ba\u3002","\u7576 'Go to Definition' \u7684\u7d50\u679c\u70ba\u76ee\u524d\u4f4d\u7f6e\u6642\uff0c\u6b63\u5728\u57f7\u884c\u7684\u66ff\u4ee3\u547d\u4ee4\u8b58\u5225\u78bc\u3002","\u7576 'Go to Type Definition' \u7684\u7d50\u679c\u70ba\u76ee\u524d\u4f4d\u7f6e\u6642\uff0c\u6b63\u5728\u57f7\u884c\u7684\u66ff\u4ee3\u547d\u4ee4\u8b58\u5225\u78bc\u3002","\u7576 'Go to Declaration' \u7684\u7d50\u679c\u70ba\u76ee\u524d\u4f4d\u7f6e\u6642\uff0c\u6b63\u5728\u57f7\u884c\u7684\u66ff\u4ee3\u547d\u4ee4\u8b58\u5225\u78bc\u3002","\u7576 'Go to Implementation' \u7684\u7d50\u679c\u70ba\u76ee\u524d\u4f4d\u7f6e\u6642\uff0c\u6b63\u5728\u57f7\u884c\u7684\u66ff\u4ee3\u547d\u4ee4\u8b58\u5225\u78bc\u3002","\u7576 'Go to Reference' \u7684\u7d50\u679c\u70ba\u76ee\u524d\u4f4d\u7f6e\u6642\uff0c\u6b63\u5728\u57f7\u884c\u7684\u66ff\u4ee3\u547d\u4ee4\u8b58\u5225\u78bc\u3002","\u63a7\u5236\u662f\u5426\u986f\u793a\u66ab\u7559\u3002","\u63a7\u5236\u66ab\u7559\u986f\u793a\u7684\u5ef6\u9072\u6642\u9593 (\u4ee5\u6beb\u79d2\u70ba\u55ae\u4f4d)\u3002","\u63a7\u5236\u7576\u6ed1\u9f20\u79fb\u904e\u6642\uff0c\u662f\u5426\u61c9\u4fdd\u6301\u986f\u793a\u66ab\u7559\u3002","\u5728\u7de8\u8f2f\u5668\u4e2d\u555f\u7528\u7a0b\u5f0f\u78bc\u52d5\u4f5c\u71c8\u6ce1\u3002","\u63a7\u5236\u884c\u9ad8\u3002\u4f7f\u7528 0 \u6703\u5f9e\u5b57\u578b\u5927\u5c0f\u8a08\u7b97\u884c\u9ad8\u3002","\u63a7\u5236\u662f\u5426\u6703\u986f\u793a\u7e2e\u5716","\u63a7\u5236\u8981\u5728\u54ea\u7aef\u5448\u73fe\u7e2e\u5716\u3002","\u63a7\u5236\u4f55\u6642\u986f\u793a\u8ff7\u4f60\u5730\u5716\u6ed1\u687f\u3002","\u5728\u8ff7\u4f60\u5730\u5716\u4e2d\u7e6a\u88fd\u7684\u5167\u5bb9\u6bd4\u4f8b\u3002","\u986f\u793a\u884c\u4e2d\u7684\u5be6\u969b\u5b57\u5143\uff0c\u800c\u4e0d\u662f\u8272\u5f69\u5340\u584a\u3002","\u9650\u5236\u7e2e\u5716\u7684\u5bec\u5ea6\uff0c\u6700\u591a\u986f\u793a\u67d0\u500b\u6578\u76ee\u7684\u5217\u3002","\u555f\u7528\u5feb\u986f\uff0c\u5728\u60a8\u9375\u5165\u7684\u540c\u6642\u986f\u793a\u53c3\u6578\u6587\u4ef6\u548c\u985e\u578b\u8cc7\u8a0a\u3002","\u63a7\u5236\u63d0\u793a\u529f\u80fd\u8868\u662f\u5426\u5728\u6e05\u55ae\u7d50\u5c3e\u6642\u5faa\u74b0\u6216\u95dc\u9589\u3002","\u5141\u8a31\u5728\u5b57\u4e32\u5167\u986f\u793a\u5373\u6642\u5efa\u8b70\u3002","\u5141\u8a31\u5728\u8a3b\u89e3\u4e2d\u986f\u793a\u5373\u6642\u5efa\u8b70\u3002","\u5141\u8a31\u5728\u5b57\u4e32\u8207\u8a3b\u89e3\u4ee5\u5916\u4e4b\u8655\u986f\u793a\u5373\u6642\u5efa\u8b70\u3002","\u63a7\u5236\u662f\u5426\u61c9\u5728\u9375\u5165\u6642\u81ea\u52d5\u986f\u793a\u5efa\u8b70\u3002","\u4e0d\u986f\u793a\u884c\u865f\u3002","\u884c\u865f\u4ee5\u7d55\u5c0d\u503c\u986f\u793a\u3002","\u884c\u865f\u4ee5\u76ee\u524d\u6e38\u6a19\u7684\u76f8\u5c0d\u503c\u986f\u793a\u3002","\u6bcf 10 \u884c\u986f\u793a\u884c\u865f\u3002","\u63a7\u5236\u884c\u865f\u7684\u986f\u793a\u3002","\u5728\u67d0\u500b\u6578\u76ee\u7684\u7b49\u5bec\u5b57\u5143\u4e4b\u5f8c\u986f\u793a\u5782\u76f4\u5c3a\u898f\u3002\u5982\u6709\u591a\u500b\u5c3a\u898f\uff0c\u5c31\u6703\u4f7f\u7528\u591a\u500b\u503c\u3002\u82e5\u9663\u5217\u7a7a\u767d\uff0c\u5c31\u4e0d\u6703\u7e6a\u88fd\u4efb\u4f55\u5c3a\u898f\u3002","\u63d2\u5165\u5efa\u8b70\u800c\u4e0d\u8986\u5beb\u6e38\u6a19\u65c1\u7684\u6587\u5b57\u3002","\u63d2\u5165\u5efa\u8b70\u4e26\u8986\u5beb\u6e38\u6a19\u65c1\u7684\u6587\u5b57\u3002","\u63a7\u5236\u662f\u5426\u8981\u5728\u63a5\u53d7\u5b8c\u6210\u6642\u8986\u5beb\u5b57\u7d44\u3002\u8acb\u6ce8\u610f\uff0c\u9019\u53d6\u6c7a\u65bc\u52a0\u5165\u6b64\u529f\u80fd\u7684\u5ef6\u4f38\u6a21\u7d44\u3002","\u63a7\u5236\u63a5\u53d7\u5b8c\u6210\u6642\u7684\u975e\u9810\u671f\u6587\u5b57\u4fee\u6539\u662f\u5426\u61c9\u9192\u76ee\u63d0\u793a\uff0c\u4f8b\u5982: `insertMode` \u70ba `replace` \u4f46\u5b8c\u6210\u53ea\u652f\u63f4 `insert`\u3002","\u63a7\u5236\u5c0d\u65bc\u62da\u932f\u5b57\u662f\u5426\u9032\u884c\u7be9\u9078\u548c\u6392\u5e8f\u5176\u5efa\u8b70","\u63a7\u5236\u6392\u5e8f\u662f\u5426\u6703\u504f\u597d\u6e38\u6a19\u9644\u8fd1\u51fa\u73fe\u7684\u5b57\u7d44\u3002","\u63a7\u5236\u8a18\u9304\u7684\u5efa\u8b70\u9078\u53d6\u9805\u76ee\u662f\u5426\u5728\u591a\u500b\u5de5\u4f5c\u5340\u548c\u8996\u7a97\u9593\u5171\u7528 (\u9700\u8981 `#editor.suggestSelection#`)\u3002","\u63a7\u5236\u7a0b\u5f0f\u78bc\u7247\u6bb5\u555f\u7528\u6642\uff0c\u662f\u5426\u963b\u6b62\u555f\u52d5\u5feb\u901f\u5efa\u8b70\u3002","\u63a7\u5236\u8981\u5728\u5efa\u8b70\u4e2d\u986f\u793a\u6216\u96b1\u85cf\u5716\u793a\u3002","\u63a7\u5236 IntelliSense \u986f\u793a\u6372\u8ef8\u524d\u8981\u986f\u793a\u591a\u5c11\u5efa\u8b70 (\u6700\u591a 15 \u500b)\u3002","\u6b64\u8a2d\u5b9a\u5df2\u6dd8\u6c70\uff0c\u8acb\u6539\u7528 'editor.suggest.showKeywords' \u6216 'editor.suggest.showSnippets' \u7b49\u55ae\u7368\u8a2d\u5b9a\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u65b9\u6cd5\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u51fd\u5f0f\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u5efa\u69cb\u51fd\u5f0f\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u6b04\u4f4d\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u8b8a\u6578\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u985e\u5225\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u7d50\u69cb\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u4ecb\u9762\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u6a21\u7d44\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u5c6c\u6027\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u4e8b\u4ef6\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u904b\u7b97\u5b50\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u55ae\u4f4d\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u503c\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u5e38\u6578\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u5217\u8209\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300cenumMember\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u95dc\u9375\u5b57\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u6587\u5b57\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u8272\u5f69\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u6a94\u6848\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u53c3\u8003\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300ccustomcolor\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u8cc7\u6599\u593e\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300ctypeParameter\u300d\u5efa\u8b70\u3002","\u555f\u7528\u6642\uff0cIntelliSense \u986f\u793a\u300c\u7a0b\u5f0f\u78bc\u7247\u6bb5\u300d\u5efa\u8b70\u3002","\u63a7\u5236\u5efa\u8b70\u5c0f\u5de5\u5177\u5e95\u4e0b\u7684\u72c0\u614b\u5217\u53ef\u898b\u5ea6\u3002","\u63a7\u5236\u662f\u5426\u900f\u904e\u8a8d\u53ef\u5b57\u5143\u63a5\u53d7\u5efa\u8b70\u3002\u4f8b\u5982\u5728 JavaScript \u4e2d\uff0c\u5206\u865f (';') \u53ef\u4ee5\u662f\u63a5\u53d7\u5efa\u8b70\u4e26\u9375\u5165\u8a72\u5b57\u5143\u7684\u8a8d\u53ef\u5b57\u5143\u3002","\u5728\u5efa\u8b70\u9032\u884c\u6587\u5b57\u8b8a\u66f4\u6642\uff0c\u50c5\u900f\u904e `Enter` \u63a5\u53d7\u5efa\u8b70\u3002","\u63a7\u5236\u9664\u4e86 'Tab' \u5916\uff0c\u662f\u5426\u4e5f\u900f\u904e 'Enter' \u63a5\u53d7\u5efa\u8b70\u3002\u9019\u6709\u52a9\u65bc\u907f\u514d\u6df7\u6dc6\u8981\u63d2\u5165\u65b0\u884c\u6216\u63a5\u53d7\u5efa\u8b70\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u4e2d\u87a2\u5e55\u52a9\u8b80\u7a0b\u5f0f\u53ef\u8b80\u51fa\u7684\u884c\u6578\u3002\u8b66\u544a: \u5927\u65bc\u9810\u8a2d\u7684\u6578\u76ee\u6703\u5c0d\u6548\u80fd\u7522\u751f\u5f71\u97ff\u3002","\u7de8\u8f2f\u5668\u5167\u5bb9","\u4f7f\u7528\u8a9e\u8a00\u914d\u7f6e\u78ba\u5b9a\u4f55\u6642\u81ea\u52d5\u95dc\u9589\u62ec\u865f\u3002","\u50c5\u7576\u6e38\u6a19\u4f4d\u65bc\u7a7a\u767d\u7684\u5de6\u5074\u6642\u81ea\u52d5\u95dc\u9589\u62ec\u865f\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u5728\u4f7f\u7528\u8005\u65b0\u589e\u5de6\u62ec\u5f27\u5f8c\uff0c\u81ea\u52d5\u52a0\u4e0a\u53f3\u62ec\u5f27\u3002","\u50c5\u5728\u81ea\u52d5\u63d2\u5165\u53f3\u5f15\u865f\u6216\u62ec\u865f\u6642\uff0c\u624d\u5728\u5176\u4e0a\u65b9\u9375\u5165\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u5728\u53f3\u5f15\u865f\u6216\u62ec\u865f\u4e0a\u9375\u5165\u3002","\u4f7f\u7528\u8a9e\u8a00\u914d\u7f6e\u78ba\u5b9a\u4f55\u6642\u81ea\u52d5\u95dc\u9589\u5f15\u865f\u3002","\u50c5\u7576\u6e38\u6a19\u4f4d\u65bc\u7a7a\u767d\u7684\u5de6\u5074\u6642\u81ea\u52d5\u95dc\u9589\u5f15\u865f\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u5728\u4f7f\u7528\u8005\u65b0\u589e\u958b\u59cb\u5f15\u865f\u5f8c\uff0c\u81ea\u52d5\u52a0\u4e0a\u95dc\u9589\u5f15\u865f\u3002","\u7de8\u8f2f\u5668\u4e0d\u6703\u81ea\u52d5\u63d2\u5165\u7e2e\u6392\u3002","\u7de8\u8f2f\u5668\u6703\u4fdd\u7559\u76ee\u524d\u884c\u7684\u7e2e\u6392\u3002","\u7de8\u8f2f\u5668\u6703\u4fdd\u7559\u76ee\u524d\u884c\u7684\u7e2e\u6392\u4e26\u63a5\u53d7\u8a9e\u8a00\u5b9a\u7fa9\u7684\u62ec\u865f\u3002","\u7de8\u8f2f\u5668\u6703\u76ee\u524d\u884c\u7684\u7e2e\u6392\u3001\u63a5\u53d7\u8a9e\u8a00\u5b9a\u7fa9\u7684\u62ec\u865f\u4e26\u53eb\u7528\u8a9e\u8a00\u5b9a\u7fa9\u7684\u7279\u6b8a onEnterRules\u3002","\u7de8\u8f2f\u5668\u6703\u4fdd\u7559\u76ee\u524d\u884c\u7684\u7e2e\u6392\u3001\u63a5\u53d7\u8a9e\u8a00\u5b9a\u7fa9\u7684\u62ec\u865f\u4e26\u53eb\u7528\u8a9e\u8a00\u5b9a\u7fa9\u7684\u7279\u6b8a onEnterRules \u4e26\u63a5\u53d7\u8a9e\u8a00\u5b9a\u7fa9\u7684 indentationRules\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u5728\u4f7f\u7528\u8005\u9375\u5165\u3001\u8cbc\u4e0a\u3001\u79fb\u52d5\u6216\u7e2e\u6392\u884c\u6642\u81ea\u52d5\u8abf\u6574\u7e2e\u6392\u3002","\u4f7f\u7528\u8a9e\u8a00\u7d44\u614b\u4f86\u6c7a\u5b9a\u4f55\u6642\u81ea\u52d5\u74b0\u7e5e\u9078\u53d6\u9805\u76ee\u3002","\u7528\u5f15\u865f\u62ec\u4f4f\uff0c\u800c\u975e\u4f7f\u7528\u62ec\u5f27\u3002","\u7528\u62ec\u5f27\u62ec\u4f4f\uff0c\u800c\u975e\u4f7f\u7528\u5f15\u865f\u3002 ","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u81ea\u52d5\u74b0\u7e5e\u9078\u53d6\u9805\u76ee\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u986f\u793a codelens\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u8f49\u8b6f\u5167\u5d4c\u8272\u5f69\u88dd\u98fe\u9805\u76ee\u8207\u8272\u5f69\u9078\u64c7\u5668\u3002","\u63a7\u5236\u8a9e\u6cd5\u9192\u76ee\u63d0\u793a\u662f\u5426\u61c9\u8907\u88fd\u5230\u526a\u8cbc\u7c3f\u3002","\u63a7\u5236\u8cc7\u6599\u6307\u6a19\u52d5\u756b\u6a23\u5f0f\u3002","\u63a7\u5236\u662f\u5426\u61c9\u555f\u7528\u5e73\u6ed1\u63d2\u5165\u9ede\u52d5\u756b\u3002 ","\u63a7\u5236\u8cc7\u6599\u6307\u6a19\u6a23\u5f0f\u3002","\u63a7\u5236\u6e38\u6a19\u4e0a\u4e0b\u5468\u570d\u7684\u6700\u5c11\u53ef\u898b\u884c\u6578\u3002\u5728\u67d0\u4e9b\u7de8\u8f2f\u5668\u4e2d\u7a31\u70ba 'scrollOff' \u6216 `scrollOffset`\u3002","\u53ea\u6709\u901a\u904e\u9375\u76e4\u6216 API \u89f8\u767c\u6642\uff0c\u624d\u6703\u65bd\u884c `cursorSurroundingLines`\u3002","\u4e00\u5f8b\u5f37\u5236\u57f7\u884c `cursorSurroundingLines`","\u63a7\u5236\u61c9\u65bd\u884c `cursorSurroundingLines` \u7684\u6642\u6a5f\u3002","\u63a7\u5236\u6e38\u6a19\u5bec\u5ea6\uff0c\u7576 `#editor.cursorStyle#` \u8a2d\u5b9a\u70ba `line` \u6642\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u5141\u8a31\u900f\u904e\u62d6\u653e\u4f86\u79fb\u52d5\u9078\u53d6\u9805\u76ee\u3002","\u6309\u4e0b `Alt` \u6642\u7684\u6372\u52d5\u901f\u5ea6\u4e58\u6578\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u555f\u7528\u7a0b\u5f0f\u78bc\u647a\u758a\u529f\u80fd\u3002","\u63a7\u5236\u647a\u758a\u7bc4\u570d\u7684\u8a08\u7b97\u65b9\u5f0f\u3002[\u81ea\u52d5] \u6703\u5728\u53ef\u884c\u7684\u60c5\u6cc1\u4e0b\u4f7f\u7528\u8a9e\u8a00\u5c08\u5c6c\u7684\u647a\u758a\u7b56\u7565\u3002[\u7e2e\u6392] \u6703\u4f7f\u7528\u4ee5\u7e2e\u6392\u70ba\u57fa\u790e\u7684\u647a\u758a\u7b56\u7565\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u5c07\u6298\u758a\u7684\u7bc4\u570d\u9192\u76ee\u63d0\u793a\u3002","\u63a7\u5236\u5b57\u578b\u5bb6\u65cf\u3002","\u63a7\u5236\u5b57\u578b\u5bec\u5ea6\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u81ea\u52d5\u70ba\u8cbc\u4e0a\u7684\u5167\u5bb9\u8a2d\u5b9a\u683c\u5f0f\u3002\u5fc5\u9808\u6709\u53ef\u7528\u7684\u683c\u5f0f\u5668\uff0c\u800c\u4e14\u683c\u5f0f\u5668\u61c9\u80fd\u5920\u70ba\u6587\u4ef6\u4e2d\u7684\u4e00\u500b\u7bc4\u570d\u8a2d\u5b9a\u683c\u5f0f\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u81ea\u52d5\u5728\u9375\u5165\u5f8c\u8a2d\u5b9a\u884c\u7684\u683c\u5f0f\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u8f49\u8b6f\u5782\u76f4\u5b57\u7b26\u908a\u754c\u3002\u5b57\u7b26\u908a\u754c\u6700\u5e38\u7528\u4f86\u9032\u884c\u5075\u932f\u3002","\u63a7\u5236\u6e38\u6a19\u662f\u5426\u61c9\u96b1\u85cf\u5728\u6982\u89c0\u5c3a\u898f\u4e2d\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u9192\u76ee\u63d0\u793a\u4f7f\u7528\u4e2d\u7684\u7e2e\u6392\u8f14\u52a9\u7dda\u3002","\u63a7\u5236\u5b57\u5143\u9593\u8ddd (\u4ee5\u50cf\u7d20\u70ba\u55ae\u4f4d)","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u5075\u6e2c\u9023\u7d50\u4e26\u4f7f\u5176\u53ef\u4f9b\u9ede\u9078\u3002","\u5c07\u7b26\u5408\u7684\u62ec\u865f\u9192\u76ee\u63d0\u793a\u3002","\u8981\u7528\u65bc\u6ed1\u9f20\u6efe\u8f2a\u6372\u52d5\u4e8b\u4ef6 `deltaX` \u548c `deltaY` \u7684\u4e58\u6578\u3002","\u4f7f\u7528\u6ed1\u9f20\u6efe\u8f2a\u4e26\u6309\u4f4f `Ctrl` \u6642\uff0c\u7e2e\u653e\u7de8\u8f2f\u5668\u7684\u5b57\u578b","\u5728\u591a\u500b\u6e38\u6a19\u91cd\u758a\u6642\u5c07\u5176\u5408\u4f75\u3002","\u5c0d\u61c9Windows\u548cLinux\u7684'Control'\u8207\u5c0d\u61c9 macOS \u7684'Command'\u3002","\u5c0d\u61c9Windows\u548cLinux\u7684'Alt'\u8207\u5c0d\u61c9macOS\u7684'Option'\u3002","\u7528\u65bc\u5728\u6ed1\u9f20\u65b0\u589e\u591a\u500b\u6e38\u6a19\u7684\u4e58\u6578\u3002\u300c\u79fb\u81f3\u5b9a\u7fa9\u300d\u548c\u300c\u958b\u555f\u9023\u7d50\u300d\u6ed1\u9f20\u624b\u52e2\u6703\u52a0\u4ee5\u9069\u61c9\uff0c\u4ee5\u907f\u514d\u8207\u591a\u500b\u6e38\u6a19\u7684\u4e58\u6578\u76f8\u885d\u7a81\u3002[\u6df1\u5165\u4e86\u89e3](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier)\u3002","\u6bcf\u500b\u6e38\u6a19\u90fd\u6703\u8cbc\u4e0a\u4e00\u884c\u6587\u5b57\u3002","\u6bcf\u500b\u6e38\u6a19\u90fd\u6703\u8cbc\u4e0a\u5168\u6587\u3002","\u7576\u5df2\u8cbc\u4e0a\u6587\u5b57\u7684\u884c\u6578\u8207\u6e38\u6a19\u6578\u76f8\u7b26\u6642\u63a7\u5236\u8cbc\u4e0a\u529f\u80fd\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u9192\u76ee\u986f\u793a\u51fa\u73fe\u7684\u8a9e\u610f\u7b26\u865f\u3002","\u63a7\u5236\u662f\u5426\u61c9\u5728\u6982\u89c0\u5c3a\u898f\u5468\u570d\u7e6a\u88fd\u6846\u7dda\u3002","\u958b\u555f\u9810\u89bd\u6642\u805a\u7126\u6a39\u72c0","\u958b\u555f\u6642\u805a\u7126\u7de8\u8f2f\u5668","\u63a7\u5236\u8981\u805a\u7126\u5167\u5d4c\u7de8\u8f2f\u5668\u6216\u9810\u89bd\u5c0f\u5de5\u5177\u4e2d\u7684\u6a39\u7cfb\u3002","\u63a7\u5236\u5728\u5feb\u901f\u5efa\u8b70\u986f\u793a\u5f8c\u7684\u5ef6\u9072 (\u4ee5\u6beb\u79d2\u70ba\u55ae\u4f4d)\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u986f\u793a\u63a7\u5236\u5b57\u5143\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u986f\u793a\u7e2e\u6392\u8f14\u52a9\u7dda\u3002","\u5728\u6a94\u6848\u7d50\u5c3e\u70ba\u65b0\u884c\u6642\uff0c\u5448\u73fe\u6700\u5f8c\u4e00\u884c\u7684\u865f\u78bc\u3002","\u9192\u76ee\u63d0\u793a\u88dd\u8a02\u908a\u548c\u76ee\u524d\u7684\u884c\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u5982\u4f55\u986f\u793a\u76ee\u524d\u884c\u7684\u9192\u76ee\u63d0\u793a\u3002","Render whitespace characters except for single spaces between words.","\u53ea\u8f49\u8b6f\u6240\u9078\u6587\u5b57\u7684\u7a7a\u767d\u5b57\u5143\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u61c9\u5982\u4f55\u8f49\u8b6f\u7a7a\u767d\u5b57\u5143\u3002","\u63a7\u5236\u9078\u53d6\u7bc4\u570d\u662f\u5426\u6709\u5713\u89d2","\u63a7\u5236\u7de8\u8f2f\u5668\u6c34\u5e73\u6372\u52d5\u7684\u984d\u5916\u5b57\u5143\u6578\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u6372\u52d5\u5230\u6700\u5f8c\u4e00\u884c\u4e4b\u5916\u3002","\u63a7\u5236\u662f\u5426\u652f\u63f4 Linux \u4e3b\u8981\u526a\u8cbc\u7c3f\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u61c9\u9192\u76ee\u63d0\u793a\u8207\u9078\u53d6\u9805\u76ee\u985e\u4f3c\u7684\u76f8\u7b26\u9805\u76ee\u3002","\u81ea\u52d5\u96b1\u85cf\u647a\u758a\u63a7\u5236\u5411","\u63a7\u5236\u672a\u4f7f\u7528\u7a0b\u5f0f\u78bc\u7684\u6de1\u51fa\u3002","\u5c07\u7a0b\u5f0f\u78bc\u7247\u6bb5\u5efa\u8b70\u986f\u793a\u65bc\u5176\u4ed6\u5efa\u8b70\u7684\u9802\u7aef\u3002","\u5c07\u7a0b\u5f0f\u78bc\u7247\u6bb5\u5efa\u8b70\u986f\u793a\u65bc\u5176\u4ed6\u5efa\u8b70\u7684\u4e0b\u65b9\u3002","\u5c07\u7a0b\u5f0f\u78bc\u7247\u6bb5\u5efa\u8b70\u8207\u5176\u4ed6\u5efa\u8b70\u4e00\u540c\u986f\u793a\u3002","\u4e0d\u986f\u793a\u7a0b\u5f0f\u78bc\u7247\u6bb5\u5efa\u8b70\u3002","\u63a7\u5236\u7a0b\u5f0f\u78bc\u7247\u6bb5\u662f\u5426\u96a8\u5176\u4ed6\u5efa\u8b70\u986f\u793a\uff0c\u4ee5\u53ca\u5176\u6392\u5e8f\u65b9\u5f0f\u3002","\u63a7\u5236\u7de8\u8f2f\u5668\u662f\u5426\u6703\u4f7f\u7528\u52d5\u756b\u6372\u52d5","\u5efa\u8b70\u5c0f\u5de5\u5177\u7684\u5b57\u578b\u5927\u5c0f\u3002\u7576\u8a2d\u5b9a\u70ba `0` \u6642\uff0c\u5247\u4f7f\u7528 `#editor.fontSize#` \u503c.","\u5efa\u8b70\u5c0f\u5de5\u5177\u7684\u884c\u9ad8\u3002\u7576\u8a2d\u5b9a\u70ba `0` \u6642\uff0c\u5247\u4f7f\u7528 `#editor.lineHeight#` \u503c.","\u63a7\u5236\u5efa\u8b70\u662f\u5426\u61c9\u5728\u9375\u5165\u89f8\u767c\u5b57\u5143\u6642\u81ea\u52d5\u986f\u793a\u3002","\u4e00\u5f8b\u9078\u53d6\u7b2c\u4e00\u500b\u5efa\u8b70\u3002","\u9664\u975e\u9032\u4e00\u6b65\u9375\u5165\u9078\u53d6\u4e86\u5efa\u8b70\uff0c\u5426\u5247\u9078\u53d6\u6700\u8fd1\u7684\u5efa\u8b70\uff0c\u4f8b\u5982 `console.| -> console.log`\uff0c\u539f\u56e0\u662f\u6700\u8fd1\u5b8c\u6210\u4e86 `log`\u3002","\u6839\u64da\u5148\u524d\u5df2\u5b8c\u6210\u8a72\u5efa\u8b70\u7684\u524d\u7f6e\u8a5e\u9078\u53d6\u5efa\u8b70\uff0c\u4f8b\u5982 `co -> console` \u548c `con -> const`\u3002","\u63a7\u5236\u5728\u986f\u793a\u5efa\u8b70\u6e05\u55ae\u6642\u5982\u4f55\u9810\u5148\u9078\u53d6\u5efa\u8b70\u3002","\u6309 Tab \u6642\uff0cTab \u5b8c\u6210\u6703\u63d2\u5165\u6700\u7b26\u5408\u7684\u5efa\u8b70\u3002","\u505c\u7528 tab \u9375\u81ea\u52d5\u5b8c\u6210\u3002","\u5728\u7a0b\u5f0f\u78bc\u7247\u6bb5\u7684\u9996\u78bc\u76f8\u7b26\u6642\u4f7f\u7528 Tab \u5b8c\u6210\u3002\u672a\u555f\u7528 'quickSuggestions' \u6642\u6548\u679c\u6700\u4f73\u3002","\u555f\u7528 tab \u9375\u81ea\u52d5\u5b8c\u6210\u3002","\u63d2\u5165\u548c\u522a\u9664\u63a5\u5728\u5b9a\u4f4d\u505c\u99d0\u9ede\u5f8c\u7684\u7a7a\u767d\u5b57\u5143\u3002","\u5728\u57f7\u884c\u6587\u5b57\u76f8\u95dc\u5c0e\u89bd\u6216\u4f5c\u696d\u6642\u8981\u7528\u4f5c\u6587\u5b57\u5206\u9694\u7b26\u865f\u7684\u5b57\u5143","\u4e00\u5f8b\u4e0d\u63db\u884c\u3002","\u4f9d\u6aa2\u8996\u5340\u5bec\u5ea6\u63db\u884c\u3002","\u65bc '#editor.wordWrapColumn#' \u63db\u884c\u3002","\u7576\u6aa2\u8996\u5340\u7e2e\u81f3\u6700\u5c0f\u4e26\u8a2d\u5b9a '#editor.wordWrapColumn#' \u6642\u63db\u884c\u3002","\u63a7\u5236\u5982\u4f55\u63db\u884c\u3002","\u7576 `#editor.wordWrap#` \u70ba `wordWrapColumn` \u6216 `bounded` \u6642\uff0c\u63a7\u5236\u7de8\u8f2f\u5668\u4e2d\u7684\u8cc7\u6599\u884c\u63db\u884c\u3002","\u7121\u7e2e\u6392\u3002\u63db\u884c\u5f9e\u7b2c 1 \u5217\u958b\u59cb\u3002","\u63db\u884c\u7684\u7e2e\u6392\u6703\u8207\u7236\u884c\u76f8\u540c\u3002","\u63db\u884c\u7684\u7e2e\u6392\u70ba\u7236\u884c +1\u3002","\u63db\u884c\u7e2e\u6392\u70ba\u7236\u884c +2\u3002","\u63a7\u5236\u63db\u884c\u7684\u7e2e\u6392\u3002","\u5047\u8a2d\u6240\u6709\u5b57\u5143\u7684\u5bec\u5ea6\u5747\u76f8\u540c\u3002\u9019\u662f\u4e00\u7a2e\u5feb\u901f\u7684\u6f14\u7b97\u6cd5\uff0c\u9069\u7528\u65bc\u7b49\u5bec\u5b57\u578b\uff0c\u4ee5\u53ca\u5b57\u7b26\u5bec\u5ea6\u76f8\u540c\u7684\u90e8\u5206\u6307\u4ee4\u78bc (\u4f8b\u5982\u62c9\u4e01\u6587\u5b57\u5143)\u3002","\u5c07\u5916\u570d\u9ede\u8a08\u7b97\u59d4\u6d3e\u7d66\u700f\u89bd\u5668\u3002\u9019\u662f\u7de9\u6162\u7684\u6f14\u7b97\u6cd5\uff0c\u5982\u679c\u6a94\u6848\u8f03\u5927\u53ef\u80fd\u6703\u5c0e\u81f4\u51cd\u7d50\uff0c\u4f46\u5728\u6240\u6709\u60c5\u6cc1\u4e0b\u90fd\u6b63\u5e38\u904b\u4f5c\u3002","\u63a7\u5236\u8a08\u7b97\u5916\u570d\u9ede\u7684\u6f14\u7b97\u6cd5\u3002"],"vs/editor/common/modes/modesRegistry":["\u7d14\u6587\u5b57"],"vs/editor/common/standaloneStrings":["\u7121\u9078\u53d6\u9805\u76ee","\u7b2c {0} \u884c\uff0c\u7b2c {1} \u6b04 (\u5df2\u9078\u53d6 {2})","\u7b2c {0} \u884c\uff0c\u7b2c {1} \u6b04","{0} \u500b\u9078\u53d6\u9805\u76ee (\u5df2\u9078\u53d6 {1} \u500b\u5b57\u5143)","{0} \u500b\u9078\u53d6\u9805\u76ee","\u7acb\u5373\u5c07\u8a2d\u5b9a `accessibilitySupport` \u8b8a\u66f4\u70ba 'on\u2019\u3002","\u7acb\u5373\u958b\u555f\u7de8\u8f2f\u5668\u5354\u52a9\u5de5\u5177\u6587\u4ef6\u9801\u9762\u3002","\u5728 Diff \u7de8\u8f2f\u5668\u7684\u552f\u8b80\u7a97\u683c\u4e2d\u3002","\u5728 Diff \u7de8\u8f2f\u5668\u7684\u7a97\u683c\u4e2d\u3002","\u5728\u552f\u8b80\u7a0b\u5f0f\u78bc\u7de8\u8f2f\u5668\u4e2d","\u5728\u7a0b\u5f0f\u78bc\u7de8\u8f2f\u5668\u4e2d","\u82e5\u8981\u70ba\u7de8\u8f2f\u5668\u9032\u884c\u6700\u80fd\u642d\u914d\u87a2\u5e55\u52a9\u8b80\u7a0b\u5f0f\u4f7f\u7528\u7684\u8a2d\u5b9a\uff0c\u8acb\u7acb\u5373\u6309 Command+E\u3002","\u82e5\u8981\u5c07\u7de8\u8f2f\u5668\u8a2d\u5b9a\u70ba\u91dd\u5c0d\u642d\u914d\u87a2\u5e55\u52a9\u8b80\u7a0b\u5f0f\u4f7f\u7528\u6700\u4f73\u5316\uff0c\u8acb\u7acb\u5373\u6309 Control+E\u3002","\u7de8\u8f2f\u5668\u5df2\u8a2d\u5b9a\u70ba\u91dd\u5c0d\u642d\u914d\u87a2\u5e55\u52a9\u8b80\u7a0b\u5f0f\u4f7f\u7528\u6700\u4f73\u5316\u3002","\u5df2\u5c07\u6b64\u7de8\u8f2f\u5668\u8a2d\u5b9a\u70ba\u6c38\u9060\u4e0d\u91dd\u5c0d\u642d\u914d\u87a2\u5e55\u52a9\u8b80\u7a0b\u5f0f\u4f7f\u7528\u6700\u4f73\u5316\uff0c\u4f46\u76ee\u524d\u4e0d\u662f\u6b64\u60c5\u6cc1\u3002","\u5728\u76ee\u524d\u7684\u7de8\u8f2f\u5668\u4e2d\u6309 Tab \u9375\u6703\u5c07\u7126\u9ede\u79fb\u81f3\u4e0b\u4e00\u500b\u53ef\u8a2d\u5b9a\u7126\u9ede\u7684\u5143\u7d20\u3002\u6309 {0} \u53ef\u5207\u63db\u6b64\u884c\u70ba\u3002","\u5728\u76ee\u524d\u7684\u7de8\u8f2f\u5668\u4e2d\u6309 Tab \u9375\u6703\u5c07\u7126\u9ede\u79fb\u81f3\u4e0b\u4e00\u500b\u53ef\u8a2d\u5b9a\u7126\u9ede\u7684\u5143\u7d20\u3002\u547d\u4ee4 {0} \u76ee\u524d\u7121\u6cd5\u7531\u6309\u9375\u7e6b\u7d50\u95dc\u4fc2\u89f8\u767c\u3002","\u5728\u76ee\u524d\u7684\u7de8\u8f2f\u5668\u4e2d\u6309 Tab \u9375\u6703\u63d2\u5165\u5b9a\u4f4d\u5b57\u5143\u3002\u6309 {0} \u53ef\u5207\u63db\u6b64\u884c\u70ba\u3002","\u5728\u76ee\u524d\u7684\u7de8\u8f2f\u5668\u4e2d\u6309 Tab \u9375\u6703\u63d2\u5165\u5b9a\u4f4d\u5b57\u5143\u3002\u547d\u4ee4 {0} \u76ee\u524d\u7121\u6cd5\u7531\u6309\u9375\u7e6b\u7d50\u95dc\u4fc2\u89f8\u767c\u3002","\u7acb\u5373\u6309 Command+H\uff0c\u4ee5\u958b\u555f\u63d0\u4f9b\u7de8\u8f2f\u5668\u5354\u52a9\u5de5\u5177\u76f8\u95dc\u8a73\u7d30\u8cc7\u8a0a\u7684\u700f\u89bd\u5668\u8996\u7a97\u3002","\u7acb\u5373\u6309 Control+H\uff0c\u4ee5\u958b\u555f\u63d0\u4f9b\u7de8\u8f2f\u5668\u5354\u52a9\u5de5\u5177\u76f8\u95dc\u8a73\u7d30\u8cc7\u8a0a\u7684\u700f\u89bd\u5668\u8996\u7a97\u3002","\u60a8\u53ef\u4ee5\u6309 Esc \u9375\u6216 Shift+Esc \u9375\u4f86\u89e3\u9664\u6b64\u5de5\u5177\u63d0\u793a\u4e26\u8fd4\u56de\u7de8\u8f2f\u5668\u3002","\u986f\u793a\u5354\u52a9\u5de5\u5177\u8aaa\u660e","\u958b\u767c\u4eba\u54e1: \u6aa2\u67e5\u6b0a\u6756","\u79fb\u81f3\u884c {0} \u548c\u5b57\u5143 {1}","\u79fb\u81f3\u7b2c {0} \u884c","\u8f38\u5165\u4ecb\u65bc 1 \u5230 {0} \u4e4b\u9593\u8981\u700f\u89bd\u7684\u884c\u865f","\u9375\u5165 1 \u5230 {0} \u4e4b\u9593\u7684\u5b57\u5143\uff0c\u4ee5\u700f\u89bd\u81f3","\u76ee\u524d\u884c\u865f: {0}\u3002\u524d\u5f80\u7b2c {1} \u884c\u3002","\u4f9d\u5e8f\u9375\u5165\u884c\u865f\u3001\u9078\u7528\u5192\u865f\u8207\u5b57\u5143\u865f\u78bc\u4ee5\u700f\u89bd\u81f3","\u79fb\u81f3\u884c...","{0}\u3001{1}\u3001\u547d\u4ee4","{0}\uff0c\u547d\u4ee4","\u9375\u5165\u8981\u57f7\u884c\u4e4b\u52d5\u4f5c\u7684\u540d\u7a31","\u547d\u4ee4\u9078\u64c7\u5340","{0}\uff0c\u7b26\u865f","\u9375\u5165\u8981\u700f\u89bd\u4e4b\u76ee\u6a19\u8b58\u5225\u78bc\u7684\u540d\u7a31","\u79fb\u81f3\u7b26\u865f...","\u7b26\u865f ({0})","\u6a21\u7d44 ({0})","\u985e\u5225 ({0})","\u4ecb\u9762 ({0})","\u65b9\u6cd5 ({0})","\u51fd\u5f0f ({0})","\u5c6c\u6027 ({0})","\u8b8a\u6578 ({0})","\u8b8a\u6578 ({0})","\u5efa\u69cb\u51fd\u5f0f ({0})","\u547c\u53eb ({0})","\u7de8\u8f2f\u5668\u5167\u5bb9","\u6309 Ctrl+F1 \u53ef\u53d6\u5f97\u5354\u52a9\u5de5\u5177\u9078\u9805\u3002","\u6309 Alt+F1 \u53ef\u53d6\u5f97\u5354\u52a9\u5de5\u5177\u9078\u9805\u3002","\u5207\u63db\u9ad8\u5c0d\u6bd4\u4f48\u666f\u4e3b\u984c","\u5df2\u5728 {1} \u6a94\u6848\u4e2d\u9032\u884c {0} \u9805\u7de8\u8f2f"],"vs/editor/common/view/editorColorRegistry":["\u76ee\u524d\u6e38\u6a19\u4f4d\u7f6e\u884c\u7684\u53cd\u767d\u986f\u793a\u80cc\u666f\u8272\u5f69\u3002","\u76ee\u524d\u6e38\u6a19\u4f4d\u7f6e\u884c\u4e4b\u5468\u570d\u6846\u7dda\u7684\u80cc\u666f\u8272\u5f69\u3002","\u9192\u76ee\u63d0\u793a\u7bc4\u570d\u7684\u80cc\u666f\u8272\u5f69\uff0c\u4f8b\u5982\u5feb\u901f\u958b\u555f\u4e26\u5c0b\u627e\u529f\u80fd\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u53cd\u767d\u986f\u793a\u7bc4\u570d\u5468\u570d\u908a\u6846\u7684\u80cc\u666f\u984f\u8272\u3002","\u9192\u76ee\u63d0\u793a\u7b26\u865f\u7684\u80cc\u666f\u8272\u5f69\uff0c\u76f8\u4f3c\u65bc\u524d\u5f80\u4e0b\u4e00\u500b\u5b9a\u7fa9\u6216\u524d\u5f80\u4e0b\u4e00\u500b/\u4e0a\u4e00\u500b\u7b26\u865f\u3002\u8272\u5f69\u5fc5\u9808\u900f\u660e\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u9192\u76ee\u63d0\u793a\u5468\u570d\u7684\u908a\u754c\u80cc\u666f\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u6e38\u6a19\u7684\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u6e38\u6a19\u7684\u80cc\u666f\u8272\u5f69\u3002\u5141\u8a31\u81ea\u8a02\u5340\u584a\u6e38\u6a19\u91cd\u758a\u7684\u5b57\u5143\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u4e2d\u7a7a\u767d\u5b57\u5143\u7684\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u7e2e\u6392\u8f14\u52a9\u7dda\u7684\u8272\u5f69\u3002","\u4f7f\u7528\u4e2d\u7de8\u8f2f\u5668\u7e2e\u6392\u8f14\u52a9\u7dda\u7684\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u884c\u865f\u7684\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u4f7f\u7528\u4e2d\u884c\u865f\u7684\u8272\u5f69 ","Id \u5df2\u53d6\u4ee3\u3002\u8acb\u6539\u7528 'editorLineNumber.activeForeground' \u3002","\u7de8\u8f2f\u5668\u4f7f\u7528\u4e2d\u884c\u865f\u7684\u8272\u5f69 ","\u7de8\u8f2f\u5668\u5c3a\u898f\u7684\u8272\u5f69","\u7de8\u8f2f\u5668\u7a0b\u5f0f\u78bc\u6ffe\u93e1\u7684\u524d\u666f\u8272\u5f69","\u6210\u5c0d\u62ec\u865f\u80cc\u666f\u8272\u5f69","\u6210\u5c0d\u62ec\u865f\u908a\u6846\u8272\u5f69","\u9810\u89bd\u6aa2\u8996\u7de8\u8f2f\u5668\u5c3a\u898f\u7684\u908a\u6846\u8272\u5f69.","\u7de8\u8f2f\u5668\u908a\u6846\u7684\u80cc\u666f\u984f\u8272,\u5305\u542b\u884c\u865f\u8207\u5b57\u5f62\u5716\u793a\u7684\u908a\u6846.","\u7de8\u8f2f\u5668\u4e2d\u4e0d\u5fc5\u8981 (\u672a\u4f7f\u7528) \u539f\u59cb\u7a0b\u5f0f\u78bc\u7684\u6846\u7dda\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u4e2d\u4e0d\u5fc5\u8981 (\u672a\u4f7f\u7528) \u539f\u59cb\u7a0b\u5f0f\u78bc\u7684\u4e0d\u900f\u660e\u5ea6\u3002\u4f8b\u5982 \"#000000c0\u201d \u6703\u4ee5 75% \u7684\u4e0d\u900f\u660e\u5ea6\u8f49\u8b6f\u7a0b\u5f0f\u78bc\u3002\u91dd\u5c0d\u9ad8\u5c0d\u6bd4\u4e3b\u984c\uff0c\u4f7f\u7528 'editorUnnecessaryCode.border' \u4e3b\u984c\u8272\u5f69\u53ef\u70ba\u4e0d\u5fc5\u8981\u7684\u7a0b\u5f0f\u78bc\u52a0\u4e0a\u5e95\u7dda\uff0c\u800c\u4e0d\u662f\u5c07\u5176\u8b8a\u6de1\u3002","\u932f\u8aa4\u7684\u6982\u89c0\u5c3a\u898f\u6a19\u8a18\u8272\u5f69\u3002","\u8b66\u793a\u7684\u6982\u89c0\u5c3a\u898f\u6a19\u8a18\u8272\u5f69\u3002","\u8cc7\u8a0a\u7684\u6982\u89c0\u5c3a\u898f\u6a19\u8a18\u8272\u5f69\u3002"],"vs/editor/contrib/bracketMatching/bracketMatching":["\u6210\u5c0d\u62ec\u5f27\u7684\u6982\u89c0\u5c3a\u898f\u6a19\u8a18\u8272\u5f69\u3002","\u79fb\u81f3\u65b9\u62ec\u5f27","\u9078\u53d6\u81f3\u62ec\u5f27","\u524d\u5f80\u62ec\u5f27(&&B)"],"vs/editor/contrib/caretOperations/caretOperations":["\u5c07\u63d2\u5165\u9ede\u5de6\u79fb","\u5c07\u63d2\u5165\u9ede\u53f3\u79fb"],"vs/editor/contrib/caretOperations/transpose":["\u8abf\u63db\u5b57\u6bcd"],"vs/editor/contrib/clipboard/clipboard":["\u526a\u4e0b","\u526a\u4e0b(&&T)","\u8907\u88fd","\u8907\u88fd(&&C)","\u8cbc\u4e0a","\u8cbc\u4e0a(&&P)","\u96a8\u8a9e\u6cd5\u9192\u76ee\u63d0\u793a\u8907\u88fd"],"vs/editor/contrib/codeAction/codeActionCommands":["\u8981\u57f7\u884c\u7a0b\u5f0f\u78bc\u52d5\u4f5c\u7684\u7a2e\u985e\u3002","\u63a7\u5236\u8981\u5957\u7528\u50b3\u56de\u52d5\u4f5c\u7684\u6642\u6a5f\u3002","\u4e00\u5f8b\u5957\u7528\u7b2c\u4e00\u500b\u50b3\u56de\u7684\u7a0b\u5f0f\u78bc\u52d5\u4f5c\u3002","\u5982\u679c\u50b3\u56de\u7684\u7a0b\u5f0f\u78bc\u52d5\u4f5c\u662f\u552f\u4e00\u52d5\u4f5c\uff0c\u5247\u52a0\u4ee5\u5957\u7528\u3002","\u4e0d\u8981\u5957\u7528\u50b3\u56de\u7684\u7a0b\u5f0f\u78bc\u52d5\u4f5c\u3002","\u63a7\u5236\u662f\u5426\u50c5\u61c9\u50b3\u56de\u504f\u597d\u7684\u7a0b\u5f0f\u78bc\u52d5\u4f5c\u3002","\u5957\u7528\u7a0b\u5f0f\u78bc\u52d5\u4f5c\u6642\u767c\u751f\u672a\u77e5\u7684\u932f\u8aa4","\u5feb\u901f\u4fee\u5fa9...","\u6c92\u6709\u53ef\u7528\u7684\u7a0b\u5f0f\u78bc\u64cd\u4f5c",'\u6c92\u6709 "{0}" \u7684\u504f\u597d\u7a0b\u5f0f\u78bc\u52d5\u4f5c','\u6c92\u6709 "{0}" \u53ef\u7528\u7684\u7a0b\u5f0f\u78bc\u52d5\u4f5c',"\u6c92\u6709\u53ef\u7528\u7684\u504f\u597d\u7a0b\u5f0f\u78bc\u52d5\u4f5c","\u6c92\u6709\u53ef\u7528\u7684\u7a0b\u5f0f\u78bc\u64cd\u4f5c","\u91cd\u69cb...","\u6c92\u6709\u9069\u7528\u65bc '{0}' \u7684\u504f\u597d\u91cd\u69cb\u3002",'\u6c92\u6709\u53ef\u7528\u7684 "{0}" \u91cd\u69cb',"\u6c92\u6709\u53ef\u7528\u7684\u504f\u597d\u91cd\u69cb","\u6c92\u6709\u53ef\u7528\u7684\u91cd\u69cb","\u4f86\u6e90\u52d5\u4f5c...","\u6c92\u6709\u9069\u7528\u65bc '{0}' \u7684\u504f\u597d\u4f86\u6e90\u52d5\u4f5c",'\u6c92\u6709 "{0}" \u53ef\u7528\u7684\u4f86\u6e90\u52d5\u4f5c',"\u6c92\u6709\u53ef\u7528\u7684\u504f\u597d\u4f86\u6e90\u52d5\u4f5c","\u6c92\u6709\u53ef\u7528\u7684\u4f86\u6e90\u52d5\u4f5c","\u7d44\u7e54\u532f\u5165","\u6c92\u6709\u4efb\u4f55\u53ef\u7528\u7684\u7d44\u7e54\u532f\u5165\u52d5\u4f5c","\u5168\u90e8\u4fee\u6b63","\u6c92\u6709\u5168\u90e8\u4fee\u6b63\u52d5\u4f5c\u53ef\u7528","\u81ea\u52d5\u4fee\u6b63...","\u6c92\u6709\u53ef\u7528\u7684\u81ea\u52d5\u4fee\u6b63"],"vs/editor/contrib/codeAction/lightBulbWidget":["\u986f\u793a\u4fee\u6b63\u7a0b\u5f0f\u3002\u504f\u597d\u7684\u4fee\u6b63\u7a0b\u5f0f\u53ef\u7528 ({0})","\u986f\u793a\u4fee\u6b63 ({0})","\u986f\u793a\u4fee\u6b63"],"vs/editor/contrib/comment/comment":["\u5207\u63db\u884c\u8a3b\u89e3","\u5207\u63db\u884c\u8a3b\u89e3(&&T)","\u52a0\u5165\u884c\u8a3b\u89e3","\u79fb\u9664\u884c\u8a3b\u89e3","\u5207\u63db\u5340\u584a\u8a3b\u89e3","\u5207\u63db\u5340\u584a\u8a3b\u89e3(&&B)"],"vs/editor/contrib/contextmenu/contextmenu":["\u986f\u793a\u7de8\u8f2f\u5668\u5167\u5bb9\u529f\u80fd\u8868"],"vs/editor/contrib/cursorUndo/cursorUndo":["\u6e38\u6a19\u5fa9\u539f","\u6e38\u6a19\u91cd\u505a"],"vs/editor/contrib/documentSymbols/outlineTree":["\u9663\u5217\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u5e03\u6797\u503c\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u985e\u5225\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u8272\u5f69\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u5e38\u6578\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u5efa\u69cb\u51fd\u5f0f\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u5217\u8209\u503c\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u5217\u8209\u503c\u6210\u54e1\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u4e8b\u4ef6\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u6b04\u4f4d\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u6a94\u6848\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u8cc7\u6599\u593e\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u51fd\u5f0f\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u4ecb\u9762\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u7d22\u5f15\u9375\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u95dc\u9375\u5b57\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u65b9\u6cd5\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u6a21\u7d44\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u547d\u540d\u7a7a\u9593\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","Null \u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u6578\u5b57\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u7269\u4ef6\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u904b\u7b97\u5b50\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u5957\u4ef6\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u5c6c\u6027\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u53c3\u8003\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u7a0b\u5f0f\u78bc\u7247\u6bb5\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u5b57\u4e32\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u7d50\u69cb\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u6587\u5b57\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u578b\u5225\u53c3\u6578\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u55ae\u4f4d\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002","\u8b8a\u6578\u7b26\u865f\u7684\u524d\u666f\u8272\u5f69\u3002\u9019\u4e9b\u7b26\u865f\u6703\u51fa\u73fe\u5728\u5927\u7db1\u3001\u968e\u5c64\u9023\u7d50\u548c\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u3002"],"vs/editor/contrib/find/findController":["\u5c0b\u627e","\u5c0b\u627e(&&F)","\u5c0b\u627e\u9078\u53d6\u9805\u76ee","\u5c0b\u627e\u4e0b\u4e00\u500b","\u5c0b\u627e\u4e0b\u4e00\u500b","\u5c0b\u627e\u4e0a\u4e00\u500b","\u5c0b\u627e\u4e0a\u4e00\u500b","\u5c0b\u627e\u4e0b\u4e00\u500b\u9078\u53d6\u9805\u76ee","\u5c0b\u627e\u4e0a\u4e00\u500b\u9078\u53d6\u9805\u76ee","\u53d6\u4ee3","\u53d6\u4ee3(&&R)"],"vs/editor/contrib/find/findWidget":["\u5c0b\u627e","\u5c0b\u627e","\u4e0a\u4e00\u500b\u7b26\u5408\u9805\u76ee","\u4e0b\u4e00\u500b\u7b26\u5408\u9805\u76ee","\u5728\u9078\u53d6\u7bc4\u570d\u4e2d\u5c0b\u627e","\u95dc\u9589","\u53d6\u4ee3","\u53d6\u4ee3","\u53d6\u4ee3","\u5168\u90e8\u53d6\u4ee3","\u5207\u63db\u53d6\u4ee3\u6a21\u5f0f","\u50c5\u53cd\u767d\u986f\u793a\u524d {0} \u7b46\u7d50\u679c\uff0c\u4f46\u6240\u6709\u5c0b\u627e\u4f5c\u696d\u6703\u5728\u5b8c\u6574\u6587\u5b57\u4e0a\u57f7\u884c\u3002","{1} \u7684 {0}","\u67e5\u7121\u7d50\u679c","\u627e\u5230 {0}","\u5df2\u627e\u5230 {1} \u7684 {0}","\u65bc {2} \u627e\u5230 {1} \u7684 {0}","\u5df2\u627e\u5230 {1} \u7684 {0}","Ctrl+Enter \u73fe\u5728\u6703\u63d2\u5165\u5206\u884c\u7b26\u865f\uff0c\u800c\u4e0d\u6703\u5168\u90e8\u53d6\u4ee3\u3002\u60a8\u53ef\u4ee5\u4fee\u6539 editor.action.replaceAll \u7684\u6309\u9375\u7e6b\u7d50\u95dc\u4fc2\uff0c\u4ee5\u8986\u5beb\u6b64\u884c\u70ba\u3002"],"vs/editor/contrib/folding/folding":["\u5c55\u958b","\u4ee5\u905e\u8ff4\u65b9\u5f0f\u5c55\u958b","\u647a\u758a","\u5207\u63db\u647a\u758a","\u4ee5\u905e\u8ff4\u65b9\u5f0f\u647a\u758a","\u647a\u758a\u5168\u90e8\u5340\u584a\u8a3b\u89e3","\u647a\u758a\u6240\u6709\u5340\u57df","\u5c55\u958b\u6240\u6709\u5340\u57df","\u5168\u90e8\u647a\u758a","\u5168\u90e8\u5c55\u958b","\u647a\u758a\u5c64\u7d1a {0}","\u7de8\u8f2f\u5668\u9078\u53d6\u7bc4\u570d\u7684\u8272\u5f69\u3002"],"vs/editor/contrib/fontZoom/fontZoom":["\u7de8\u8f2f\u5668\u5b57\u9ad4\u653e\u5927","\u7de8\u8f2f\u5668\u5b57\u578b\u7e2e\u5c0f","\u7de8\u8f2f\u5668\u5b57\u9ad4\u91cd\u8a2d\u7e2e\u653e"],"vs/editor/contrib/format/format":["\u5728\u884c {0} \u7de8\u8f2f\u4e86 1 \u9805\u683c\u5f0f","\u5728\u884c {1} \u7de8\u8f2f\u4e86 {0} \u9805\u683c\u5f0f","\u5728\u884c {0} \u8207\u884c {1} \u4e4b\u9593\u7de8\u8f2f\u4e86 1 \u9805\u683c\u5f0f","\u5728\u884c {1} \u8207\u884c {2} \u4e4b\u9593\u7de8\u8f2f\u4e86 {0} \u9805\u683c\u5f0f"],"vs/editor/contrib/format/formatActions":["\u683c\u5f0f\u5316\u6587\u4ef6","\u683c\u5f0f\u5316\u9078\u53d6\u7bc4\u570d"],"vs/editor/contrib/gotoError/gotoError":["\u79fb\u81f3\u4e0b\u4e00\u500b\u554f\u984c (\u932f\u8aa4, \u8b66\u544a, \u8cc7\u8a0a)","\u79fb\u81f3\u4e0a\u4e00\u500b\u554f\u984c (\u932f\u8aa4, \u8b66\u544a, \u8cc7\u8a0a)","\u79fb\u81f3\u6a94\u6848\u88e1\u9762\u7684\u4e0b\u4e00\u500b\u554f\u984c (\u932f\u8aa4, \u8b66\u544a, \u8cc7\u8a0a)","\u79fb\u81f3\u6a94\u6848\u88e1\u9762\u7684\u4e0a\u4e00\u500b\u554f\u984c (\u932f\u8aa4, \u8b66\u544a, \u8cc7\u8a0a)","\u4e0b\u4e00\u500b\u554f\u984c(&&P)","\u524d\u4e00\u500b\u554f\u984c(&&P)"],"vs/editor/contrib/gotoError/gotoErrorWidget":["{0} \u500b\u554f\u984c (\u5171 {1} \u500b)","{0} \u500b\u554f\u984c (\u5171 {1} \u500b)","\u7de8\u8f2f\u5668\u6a19\u8a18\u5c0e\u89bd\u5c0f\u5de5\u5177\u932f\u8aa4\u7684\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u6a19\u8a18\u5c0e\u89bd\u5c0f\u5de5\u5177\u8b66\u544a\u7684\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u6a19\u8a18\u5c0e\u89bd\u5c0f\u5de5\u5177\u8cc7\u8a0a\u7684\u8272\u5f69","\u7de8\u8f2f\u5668\u6a19\u8a18\u5c0e\u89bd\u5c0f\u5de5\u5177\u7684\u80cc\u666f\u3002"],"vs/editor/contrib/gotoSymbol/goToCommands":["\u67e5\u770b","\u5b9a\u7fa9","\u627e\u4e0d\u5230 '{0}' \u7684\u5b9a\u7fa9","\u627e\u4e0d\u5230\u4efb\u4f55\u5b9a\u7fa9","\u79fb\u81f3\u5b9a\u7fa9","\u79fb\u81f3\u5b9a\u7fa9(&&D)","\u5728\u4e00\u5074\u958b\u555f\u5b9a\u7fa9","\u9810\u89bd\u5b9a\u7fa9","\u5ba3\u544a","\u627e\u4e0d\u5230 '{0}' \u7684\u5ba3\u544a ","\u627e\u4e0d\u5230\u4efb\u4f55\u5ba3\u544a","\u79fb\u81f3\u5ba3\u544a","\u524d\u5f80\u5ba3\u544a(&&D)","\u627e\u4e0d\u5230 '{0}' \u7684\u5ba3\u544a ","\u627e\u4e0d\u5230\u4efb\u4f55\u5ba3\u544a","\u9810\u89bd\u5ba3\u544a","\u985e\u578b\u5b9a\u7fa9","\u627e\u4e0d\u5230 '{0}' \u7684\u4efb\u4f55\u985e\u578b\u5b9a\u7fa9","\u627e\u4e0d\u5230\u4efb\u4f55\u985e\u578b\u5b9a\u7fa9","\u79fb\u81f3\u985e\u578b\u5b9a\u7fa9","\u524d\u5f80\u985e\u578b\u5b9a\u7fa9(&&T)","\u9810\u89bd\u985e\u578b\u5b9a\u7fa9","\u5be6\u4f5c","\u627e\u4e0d\u5230 '{0}' \u7684\u4efb\u4f55\u5be6\u4f5c","\u627e\u4e0d\u5230\u4efb\u4f55\u5be6\u4f5c","\u524d\u5f80\u5be6\u4f5c","\u524d\u5f80\u5be6\u4f5c(&&I)","\u67e5\u770b\u5be6\u4f5c",'\u672a\u627e\u5230 "{0}" \u7684\u53c3\u8003',"\u672a\u627e\u5230\u53c3\u8003","\u524d\u5f80\u53c3\u8003","\u524d\u5f80\u53c3\u8003(&&R)","\u53c3\u8003","\u9810\u89bd\u53c3\u8003","\u53c3\u8003","\u79fb\u81f3\u4efb\u4f55\u7b26\u865f","\u4f4d\u7f6e",'"{0}" \u7121\u7d50\u679c',"\u53c3\u8003"],"vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition":["\u6309\u4e00\u4e0b\u4ee5\u986f\u793a {0} \u9805\u5b9a\u7fa9\u3002"],"vs/editor/contrib/gotoSymbol/peek/referencesController":["\u6b63\u5728\u8f09\u5165...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/peek/referencesTree":["\u7121\u6cd5\u89e3\u6790\u6a94\u6848\u3002","{0} \u500b\u53c3\u8003","{0} \u500b\u53c3\u8003"],"vs/editor/contrib/gotoSymbol/peek/referencesWidget":["\u7121\u6cd5\u9810\u89bd","\u53c3\u8003","\u67e5\u7121\u7d50\u679c","\u53c3\u8003"],"vs/editor/contrib/gotoSymbol/referencesModel":["\u500b\u7b26\u865f\u4f4d\u65bc {0} \u4e2d\u7684\u7b2c {1} \u884c\u7b2c {2} \u6b04","1 \u500b\u7b26\u865f\u4f4d\u65bc {0}, \u5b8c\u6574\u8def\u5f91 {1}","{0} \u500b\u7b26\u865f\u4f4d\u65bc {1}, \u5b8c\u6574\u8def\u5f91 {2}","\u627e\u4e0d\u5230\u7d50\u679c","\u5728 {0} \u4e2d\u627e\u5230 1 \u500b\u7b26\u865f","\u5728 {1} \u4e2d\u627e\u5230 {0} \u500b\u7b26\u865f","\u5728 {1} \u500b\u6a94\u6848\u4e2d\u627e\u5230 {0} \u500b\u7b26\u865f"],"vs/editor/contrib/gotoSymbol/symbolNavigation":["{1} \u7684\u7b26\u865f {0}\uff0c{2} \u70ba\u4e0b\u4e00\u500b","{1} \u7684\u7b26\u865f {0}"],"vs/editor/contrib/hover/hover":["\u52d5\u614b\u986f\u793a","\u986f\u793a\u5b9a\u7fa9\u9810\u89bd\u61f8\u505c"],"vs/editor/contrib/hover/modesContentHover":["\u6b63\u5728\u8f09\u5165...","\u7784\u5b54\u554f\u984c","\u6b63\u5728\u6aa2\u67e5\u5feb\u901f\u4fee\u6b63...","\u6c92\u6709\u53ef\u7528\u7684\u5feb\u901f\u4fee\u6b63","\u5feb\u901f\u4fee\u5fa9..."],"vs/editor/contrib/inPlaceReplace/inPlaceReplace":["\u4ee5\u4e0a\u4e00\u500b\u503c\u53d6\u4ee3","\u4ee5\u4e0b\u4e00\u500b\u503c\u53d6\u4ee3"],"vs/editor/contrib/linesOperations/linesOperations":["\u5c07\u884c\u5411\u4e0a\u8907\u88fd","\u5c07\u884c\u5411\u4e0a\u8907\u88fd(&&C)","\u5c07\u884c\u5411\u4e0b\u8907\u88fd","\u5c07\u884c\u5411\u4e0b\u8907\u88fd(&&P)","\u91cd\u8907\u9078\u53d6\u9805\u76ee","\u91cd\u8907\u9078\u53d6\u9805\u76ee(&D)","\u4e0a\u79fb\u4e00\u884c","\u4e0a\u79fb\u4e00\u884c(&&V)","\u4e0b\u79fb\u4e00\u884c","\u4e0b\u79fb\u4e00\u884c(&&L)","\u905e\u589e\u6392\u5e8f\u884c","\u905e\u6e1b\u6392\u5e8f\u884c","\u4fee\u526a\u5c3e\u7aef\u7a7a\u767d","\u522a\u9664\u884c","\u7e2e\u6392\u884c","\u51f8\u6392\u884c","\u5728\u4e0a\u65b9\u63d2\u5165\u884c","\u5728\u4e0b\u65b9\u63d2\u5165\u884c","\u5de6\u908a\u5168\u90e8\u522a\u9664","\u522a\u9664\u6240\u6709\u53f3\u65b9\u9805\u76ee","\u9023\u63a5\u7dda","\u8f49\u7f6e\u6e38\u6a19\u5468\u570d\u7684\u5b57\u5143\u6578","\u8f49\u63db\u5230\u5927\u5beb","\u8f49\u63db\u5230\u5c0f\u5beb","\u8f49\u63db\u70ba\u5b57\u9996\u5927\u5beb"],"vs/editor/contrib/links/links":["\u57f7\u884c\u547d\u4ee4","\u8ffd\u8e64\u9023\u7d50","cmd + \u6309\u4e00\u4e0b","ctrl + \u6309\u4e00\u4e0b","\u9078\u9805 + \u6309\u4e00\u4e0b","alt + \u6309\u4e00\u4e0b","\u56e0\u70ba\u6b64\u9023\u7d50\u7684\u683c\u5f0f\u4e0d\u6b63\u78ba\uff0c\u6240\u4ee5\u7121\u6cd5\u958b\u555f: {0}","\u56e0\u70ba\u6b64\u9023\u7d50\u76ee\u6a19\u907a\u5931\uff0c\u6240\u4ee5\u7121\u6cd5\u958b\u555f\u3002","\u958b\u555f\u9023\u7d50"],"vs/editor/contrib/message/messageController":["\u7121\u6cd5\u5728\u552f\u8b80\u7de8\u8f2f\u5668\u4e2d\u7de8\u8f2f"],"vs/editor/contrib/multicursor/multicursor":["\u5728\u4e0a\u65b9\u52a0\u5165\u6e38\u6a19","\u5728\u4e0a\u65b9\u65b0\u589e\u6e38\u6a19(&&A)","\u5728\u4e0b\u65b9\u52a0\u5165\u6e38\u6a19","\u5728\u4e0b\u65b9\u65b0\u589e\u6e38\u6a19(&&D)","\u5728\u884c\u5c3e\u65b0\u589e\u6e38\u6a19","\u5728\u884c\u5c3e\u65b0\u589e\u6e38\u6a19(&&U)","\u5c07\u6e38\u6a19\u65b0\u589e\u5230\u5e95\u90e8 ","\u5c07\u6e38\u6a19\u65b0\u589e\u5230\u9802\u90e8","\u5c07\u9078\u53d6\u9805\u76ee\u52a0\u5165\u4e0b\u4e00\u500b\u627e\u5230\u7684\u76f8\u7b26\u9805","\u65b0\u589e\u4e0b\u4e00\u500b\u9805\u76ee(&&N)","\u5c07\u9078\u53d6\u9805\u76ee\u52a0\u5165\u524d\u4e00\u500b\u627e\u5230\u7684\u76f8\u7b26\u9805\u4e2d","\u65b0\u589e\u4e0a\u4e00\u500b\u9805\u76ee(&&R)","\u5c07\u6700\u5f8c\u4e00\u500b\u9078\u64c7\u9805\u76ee\u79fb\u81f3\u4e0b\u4e00\u500b\u627e\u5230\u7684\u76f8\u7b26\u9805","\u5c07\u6700\u5f8c\u4e00\u500b\u9078\u64c7\u9805\u76ee\u79fb\u81f3\u524d\u4e00\u500b\u627e\u5230\u7684\u76f8\u7b26\u9805","\u9078\u53d6\u6240\u6709\u627e\u5230\u7684\u76f8\u7b26\u9805\u76ee","\u9078\u53d6\u6240\u6709\u9805\u76ee(&&O)","\u8b8a\u66f4\u6240\u6709\u767c\u751f\u6b21\u6578"],"vs/editor/contrib/parameterHints/parameterHints":["\u89f8\u767c\u53c3\u6578\u63d0\u793a"],"vs/editor/contrib/parameterHints/parameterHintsWidget":["{0}\uff0c\u63d0\u793a"],"vs/editor/contrib/peekView/peekView":["\u95dc\u9589","\u9810\u89bd\u6aa2\u8996\u6a19\u984c\u5340\u57df\u7684\u80cc\u666f\u8272\u5f69\u3002","\u9810\u89bd\u6aa2\u8996\u6a19\u984c\u7684\u8272\u5f69\u3002","\u9810\u89bd\u6aa2\u8996\u6a19\u984c\u8cc7\u8a0a\u7684\u8272\u5f69\u3002","\u9810\u89bd\u6aa2\u8996\u4e4b\u6846\u7dda\u8207\u7bad\u982d\u7684\u8272\u5f69\u3002","\u9810\u89bd\u6aa2\u8996\u4e2d\u7d50\u679c\u6e05\u55ae\u7684\u80cc\u666f\u8272\u5f69\u3002","\u9810\u89bd\u6aa2\u8996\u7d50\u679c\u5217\u8868\u4e2d\u884c\u7bc0\u9ede\u7684\u524d\u666f\u8272\u5f69","\u9810\u89bd\u6aa2\u8996\u7d50\u679c\u5217\u8868\u4e2d\u6a94\u6848\u7bc0\u9ede\u7684\u524d\u666f\u8272\u5f69","\u5728\u9810\u89bd\u6aa2\u8996\u4e4b\u7d50\u679c\u6e05\u55ae\u4e2d\u9078\u53d6\u9805\u76ee\u6642\u7684\u80cc\u666f\u8272\u5f69\u3002","\u5728\u9810\u89bd\u6aa2\u8996\u4e4b\u7d50\u679c\u6e05\u55ae\u4e2d\u9078\u53d6\u9805\u76ee\u6642\u7684\u524d\u666f\u8272\u5f69\u3002","\u9810\u89bd\u6aa2\u8996\u7de8\u8f2f\u5668\u7684\u80cc\u666f\u8272\u5f69\u3002","\u9810\u89bd\u6aa2\u8996\u7de8\u8f2f\u5668\u908a\u6846(\u542b\u884c\u865f\u6216\u5b57\u5f62\u5716\u793a)\u7684\u80cc\u666f\u8272\u5f69\u3002","\u5728\u9810\u89bd\u6aa2\u8996\u7de8\u8f2f\u5668\u4e2d\u6bd4\u5c0d\u6642\u7684\u53cd\u767d\u986f\u793a\u8272\u5f69\u3002","\u9810\u89bd\u6aa2\u8996\u7de8\u8f2f\u5668\u4e2d\u6bd4\u5c0d\u6642\u7684\u53cd\u767d\u986f\u793a\u8272\u5f69\u3002","\u5728\u9810\u89bd\u6aa2\u8996\u7de8\u8f2f\u5668\u4e2d\u6bd4\u5c0d\u6642\u7684\u53cd\u767d\u986f\u793a\u908a\u754c\u3002"],"vs/editor/contrib/rename/rename":["\u6c92\u6709\u7d50\u679c\u3002","\u89e3\u6790\u91cd\u65b0\u547d\u540d\u4f4d\u7f6e\u6642\u767c\u751f\u672a\u77e5\u7684\u932f\u8aa4","\u6b63\u5728\u91cd\u65b0\u547d\u540d '{0}'","\u5df2\u6210\u529f\u5c07 '{0}' \u91cd\u65b0\u547d\u540d\u70ba '{1}'\u3002\u6458\u8981: {2}","\u91cd\u547d\u540d\u7121\u6cd5\u5957\u7528\u7de8\u8f2f","\u91cd\u65b0\u547d\u540d\u7121\u6cd5\u8a08\u7b97\u7de8\u8f2f","\u91cd\u65b0\u547d\u540d\u7b26\u865f","\u555f\u7528/\u505c\u7528\u91cd\u65b0\u547d\u540d\u524d\u5148\u9810\u89bd\u8b8a\u66f4\u7684\u529f\u80fd"],"vs/editor/contrib/rename/renameInputField":["\u70ba\u8f38\u5165\u91cd\u65b0\u547d\u540d\u3002\u8acb\u9375\u5165\u65b0\u540d\u7a31\uff0c\u7136\u5f8c\u6309 Enter \u4ee5\u8a8d\u53ef\u3002","{0} \u4ee5\u91cd\u65b0\u547d\u540d\uff0c{1} \u4ee5\u9810\u89bd"],"vs/editor/contrib/smartSelect/smartSelect":["\u5c55\u958b\u9078\u53d6\u9805\u76ee","\u5c55\u958b\u9078\u53d6\u7bc4\u570d(&&E)","\u7e2e\u5c0f\u9078\u53d6\u9805\u76ee","\u58d3\u7e2e\u9078\u53d6\u7bc4\u570d(&&S)"],"vs/editor/contrib/snippet/snippetVariables":["\u661f\u671f\u5929","\u661f\u671f\u4e00","\u661f\u671f\u4e8c","\u661f\u671f\u4e09","\u661f\u671f\u56db","\u661f\u671f\u4e94","\u661f\u671f\u516d","\u9031\u65e5","\u9031\u4e00","\u9031\u4e8c","\u9031\u4e09","\u9031\u56db","\u9031\u4e94","\u9031\u516d","\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708","1\u6708","2\u6708","3 \u6708","4\u6708","\u4e94\u6708","6\u6708","7 \u6708","8 \u6708","9 \u6708","10 \u6708","11 \u6708","12 \u6708"],"vs/editor/contrib/suggest/suggestController":["\u63a5\u53d7 \u2018{0}\u2019 \u9032\u884c\u4e86\u5176\u4ed6 {1} \u9805\u7de8\u8f2f","\u89f8\u767c\u5efa\u8b70"],"vs/editor/contrib/suggest/suggestWidget":["\u5efa\u8b70\u5c0f\u5de5\u5177\u7684\u80cc\u666f\u8272\u5f69\u3002","\u5efa\u8b70\u5c0f\u5de5\u5177\u7684\u908a\u754c\u8272\u5f69\u3002","\u5efa\u8b70\u5c0f\u5de5\u5177\u7684\u524d\u666f\u8272\u5f69\u3002","\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u6240\u9078\u9805\u76ee\u7684\u80cc\u666f\u8272\u5f69\u3002","\u5efa\u8b70\u5c0f\u5de5\u5177\u4e2d\u76f8\u7b26\u9192\u76ee\u63d0\u793a\u7684\u8272\u5f69\u3002","\u9032\u4e00\u6b65\u4e86\u89e3...{0}","\u7c21\u6613\u8aaa\u660e...{0}","\u6b63\u5728\u8f09\u5165...","\u6b63\u5728\u8f09\u5165...","\u7121\u5efa\u8b70\u3002","{0} \u4ee5\u53d6\u5f97\u8f03\u5c11...","{0} \u4ee5\u7372\u5f97\u66f4\u591a...","\u9805\u76ee {0}\uff0c\u6587\u4ef6: {1}","{0} \u4ee5\u63d2\u5165\uff0c{1} \u4ee5\u53d6\u4ee3","{0} \u4ee5\u53d6\u4ee3\uff0c{1} \u4ee5\u63d2\u5165","{0} \u4ee5\u63a5\u53d7"],"vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode":["\u5207\u63db TAB \u9375\u79fb\u52d5\u7126\u9ede","\u6309 Tab \u73fe\u5728\u6703\u5c07\u7126\u9ede\u79fb\u81f3\u4e0b\u4e00\u500b\u53ef\u8a2d\u5b9a\u7126\u9ede\u7684\u5143\u7d20\u3002","\u6309 Tab \u73fe\u5728\u6703\u63d2\u5165\u5b9a\u4f4d\u5b57\u5143\u3002"],"vs/editor/contrib/tokenization/tokenization":["\u958b\u767c\u4eba\u54e1: \u5f37\u5236\u91cd\u65b0\u7f6e\u653e"],"vs/editor/contrib/wordHighlighter/wordHighlighter":["\u8b80\u53d6\u6b0a\u9650\u671f\u9593 (\u5982\u8b80\u53d6\u8b8a\u6578) \u7b26\u865f\u7684\u80cc\u666f\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u5beb\u5165\u6b0a\u9650\u671f\u9593 (\u5982\u5beb\u5165\u8b8a\u6578) \u7b26\u865f\u7684\u80cc\u666f\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u8b80\u53d6\u5b58\u53d6\u671f\u9593 (\u4f8b\u5982\u8b80\u53d6\u8b8a\u6578\u6642) \u7b26\u865f\u7684\u908a\u6846\u984f\u8272\u3002","\u5beb\u5165\u5b58\u53d6\u671f\u9593 (\u4f8b\u5982\u5beb\u5165\u8b8a\u6578\u6642) \u7b26\u865f\u7684\u908a\u6846\u984f\u8272\u3002 ","\u7b26\u865f\u9192\u76ee\u63d0\u793a\u7684\u6982\u89c0\u5c3a\u898f\u6a19\u8a18\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u5beb\u5165\u6b0a\u9650\u7b26\u865f\u9192\u76ee\u63d0\u793a\u7684\u6982\u89c0\u5c3a\u898f\u6a19\u8a18\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u79fb\u81f3\u4e0b\u4e00\u500b\u53cd\u767d\u7b26\u865f","\u79fb\u81f3\u4e0a\u4e00\u500b\u53cd\u767d\u7b26\u865f","\u89f8\u767c\u7b26\u865f\u53cd\u767d\u986f\u793a"],"vs/platform/configuration/common/configurationRegistry":["\u9810\u8a2d\u7d44\u614b\u8986\u5beb","\u8a2d\u5b9a\u8981\u91dd\u5c0d\u8a9e\u8a00\u8986\u5beb\u7684\u7de8\u8f2f\u5668\u8a2d\u5b9a\u3002","\u9019\u500b\u8a2d\u5b9a\u4e0d\u652f\u63f4\u4ee5\u8a9e\u8a00\u70ba\u6839\u64da\u7684\u7d44\u614b\u3002","\u7121\u6cd5\u8a3b\u518a '{0}'\u3002\u9019\u7b26\u5408\u7528\u65bc\u63cf\u8ff0\u8a9e\u8a00\u5c08\u7528\u7de8\u8f2f\u5668\u8a2d\u5b9a\u7684\u5c6c\u6027\u6a21\u5f0f '\\\\[.*\\\\]$'\u3002\u8acb\u4f7f\u7528 'configurationDefaults' \u8ca2\u737b\u3002","\u7121\u6cd5\u8a3b\u518a '{0}'\u3002\u6b64\u5c6c\u6027\u5df2\u7d93\u8a3b\u518a\u3002"],"vs/platform/keybinding/common/abstractKeybindingService":["\u5df2\u6309\u4e0b ({0})\u3002\u8acb\u7b49\u5f85\u7b2c\u4e8c\u500b\u5957\u7d22\u9375...","\u6309\u9375\u7d44\u5408 ({0}, {1}) \u4e0d\u662f\u547d\u4ee4\u3002"],"vs/platform/list/browser/listService":["\u5de5\u4f5c\u53f0","\u5c0d\u61c9Windows\u548cLinux\u7684'Control'\u8207\u5c0d\u61c9 macOS \u7684'Command'\u3002","\u5c0d\u61c9Windows\u548cLinux\u7684'Alt'\u8207\u5c0d\u61c9macOS\u7684'Option'\u3002","\u900f\u904e\u6ed1\u9f20\u591a\u9078\uff0c\u7528\u65bc\u5728\u6a39\u72c0\u76ee\u9304\u8207\u6e05\u55ae\u4e2d\u65b0\u589e\u9805\u76ee\u7684\u8f14\u52a9\u6309\u9375 (\u4f8b\u5982\u5728\u7e3d\u7ba1\u4e2d\u958b\u555f\u7de8\u8f2f\u5668 \u53ca SCM \u6aa2\u8996)\u3002'\u5728\u5074\u908a\u958b\u555f' \u6ed1\u9f20\u624b\u52e2 (\u82e5\u652f\u63f4) \u5c07\u6703\u9069\u61c9\u4ee5\u907f\u514d\u548c\u591a\u9078\u8f14\u52a9\u6309\u9375\u885d\u7a81\u3002","\u63a7\u5236\u5982\u4f55\u4f7f\u7528\u6ed1\u9f20\u5728\u6a39\u72c0\u76ee\u9304\u8207\u6e05\u55ae\u4e2d\u958b\u555f\u9805\u76ee (\u82e5\u6709\u652f\u63f4)\u3002\u5c0d\u65bc\u6a39\u72c0\u76ee\u9304\u4e2d\u5177\u5b50\u7cfb\u7684\u7236\u7cfb\u800c\u8a00\uff0c\u6b64\u8a2d\u5b9a\u6703\u63a7\u5236\u61c9\u4ee5\u6ed1\u9f20\u6309\u4e00\u4e0b\u6216\u6309\u5169\u4e0b\u5c55\u958b\u7236\u7cfb\u3002\u6ce8\u610f\uff0c\u67d0\u4e9b\u6a39\u72c0\u76ee\u9304\u6216\u6e05\u55ae\u82e5\u4e0d\u9069\u7528\u6b64\u8a2d\u5b9a\u5247\u6703\u4e88\u4ee5\u5ffd\u7565\u3002","\u63a7\u5236\u5728\u5de5\u4f5c\u53f0\u4e2d\uff0c\u6e05\u55ae\u548c\u6a39\u72c0\u7d50\u69cb\u662f\u5426\u652f\u63f4\u6c34\u5e73\u6372\u52d5\u3002","\u63a7\u5236\u662f\u5426\u652f\u63f4\u5de5\u4f5c\u53f0\u4e2d\u7684\u6c34\u5e73\u6efe\u52d5\u3002","\u5df2\u6dd8\u6c70\u6b64\u8a2d\u5b9a\uff0c\u8acb\u6539\u7528 \u2018{0}\u2019\u3002","\u63a7\u5236\u6a39\u72c0\u7d50\u69cb\u7e2e\u6392 (\u50cf\u7d20)\u3002","\u63a7\u5236\u6a39\u7cfb\u662f\u5426\u61c9\u8f49\u8b6f\u7e2e\u6392\u8f14\u52a9\u7dda\u3002","\u6bd4\u5c0d\u6309\u9375\u8f38\u5165\u7684\u7c21\u6613\u6309\u9375\u700f\u89bd\u7126\u9ede\u5143\u7d20\u3002\u50c5\u6bd4\u5c0d\u524d\u7f6e\u8a5e\u3002","\u9192\u76ee\u63d0\u793a\u9375\u76e4\u700f\u89bd\u6703\u9192\u76ee\u63d0\u793a\u7b26\u5408\u9375\u76e4\u8f38\u5165\u7684\u5143\u7d20\u3002\u9032\u4e00\u6b65\u5411\u4e0a\u6216\u5411\u4e0b\u700f\u89bd\u53ea\u6703\u5468\u904a\u9192\u76ee\u63d0\u793a\u7684\u5143\u7d20\u3002","\u7be9\u9078\u9375\u76e4\u700f\u89bd\u6703\u7be9\u6389\u4e26\u96b1\u85cf\u4e0d\u7b26\u5408\u9375\u76e4\u8f38\u5165\u7684\u6240\u6709\u5143\u7d20\u3002","\u63a7\u5236 Workbench \u4e2d\u6e05\u55ae\u548c\u6a39\u72c0\u7d50\u69cb\u7684\u9375\u76e4\u700f\u89bd\u6a23\u5f0f\u3002\u53ef\u4ee5\u662f\u7c21\u6613\u7684\u3001\u9192\u76ee\u63d0\u793a\u548c\u7be9\u9078\u3002","\u63a7\u5236\u662f\u5426\u53ea\u8981\u9375\u5165\u5373\u53ef\u81ea\u52d5\u89f8\u767c\u6e05\u55ae\u548c\u6a39\u72c0\u7d50\u69cb\u4e2d\u7684\u9375\u76e4\u700f\u89bd\u3002\u82e5\u8a2d\u70ba `false`\uff0c\u53ea\u6709\u5728\u57f7\u884c `list.toggleKeyboardNavigation` \u547d\u4ee4\u6642\uff0c\u624d\u6703\u89f8\u767c\u9375\u76e4\u700f\u89bd\uff0c\u60a8\u53ef\u70ba\u5176\u6307\u5b9a\u9375\u76e4\u5feb\u901f\u9375\u3002"],"vs/platform/markers/common/markers":["\u932f\u8aa4","\u8b66\u544a","\u8cc7\u8a0a"],"vs/platform/theme/common/colorRegistry":["\u6574\u9ad4\u7684\u524d\u666f\u8272\u5f69\u3002\u50c5\u7576\u672a\u88ab\u4efb\u4f55\u5143\u4ef6\u8986\u758a\u6642\uff0c\u624d\u6703\u4f7f\u7528\u6b64\u8272\u5f69\u3002","\u6574\u9ad4\u932f\u8aa4\u8a0a\u606f\u7684\u524d\u666f\u8272\u5f69\u3002\u50c5\u7576\u672a\u88ab\u4efb\u4f55\u5143\u4ef6\u8986\u84cb\u6642\uff0c\u624d\u6703\u4f7f\u7528\u6b64\u8272\u5f69\u3002","\u7126\u9ede\u9805\u76ee\u7684\u6574\u9ad4\u6846\u7dda\u8272\u5f69\u3002\u53ea\u5728\u6c92\u6709\u4efb\u4f55\u5143\u4ef6\u8986\u5beb\u6b64\u8272\u5f69\u6642\uff0c\u624d\u6703\u52a0\u4ee5\u4f7f\u7528\u3002","\u9805\u76ee\u5468\u570d\u7684\u984d\u5916\u6846\u7dda\uff0c\u53ef\u5c07\u9805\u76ee\u5f9e\u5176\u4ed6\u9805\u76ee\u4e2d\u5340\u9694\u51fa\u4f86\u4ee5\u63d0\u9ad8\u5c0d\u6bd4\u3002","\u4f7f\u7528\u4e2d\u9805\u76ee\u5468\u570d\u7684\u984d\u5916\u908a\u754c\uff0c\u53ef\u5c07\u9805\u76ee\u5f9e\u5176\u4ed6\u9805\u76ee\u4e2d\u5340\u9694\u51fa\u4f86\u4ee5\u63d0\u9ad8\u5c0d\u6bd4\u3002","\u5167\u6587\u9023\u7d50\u7684\u524d\u666f\u8272\u5f69","\u6587\u5b57\u5340\u584a\u7684\u80cc\u666f\u984f\u8272\u3002","\u5c0f\u5de5\u5177\u7684\u9670\u5f71\u8272\u5f69\uff0c\u4f8b\u5982\u7de8\u8f2f\u5668\u4e2d\u7684\u5c0b\u627e/\u53d6\u4ee3\u3002","\u8f38\u5165\u65b9\u584a\u7684\u80cc\u666f\u3002","\u8f38\u5165\u65b9\u584a\u7684\u524d\u666f\u3002","\u8f38\u5165\u65b9\u584a\u7684\u6846\u7dda\u3002","\u8f38\u5165\u6b04\u4f4d\u4e2d\u53ef\u4f7f\u7528\u4e4b\u9805\u76ee\u7684\u6846\u7dda\u8272\u5f69\u3002","\u5728\u8f38\u5165\u6b04\u4f4d\u4e2d\u6240\u555f\u52d5\u9078\u9805\u7684\u80cc\u666f\u8272\u5f69\u3002","\u8cc7\u8a0a\u56b4\u91cd\u6027\u7684\u8f38\u5165\u9a57\u8b49\u80cc\u666f\u8272\u5f69\u3002","\u8cc7\u8a0a\u56b4\u91cd\u6027\u7684\u8f38\u5165\u9a57\u8b49\u524d\u666f\u8272\u5f69\u3002","\u8cc7\u8a0a\u56b4\u91cd\u6027\u7684\u8f38\u5165\u9a57\u8b49\u908a\u754c\u8272\u5f69\u3002","\u8b66\u544a\u56b4\u91cd\u6027\u7684\u8f38\u5165\u9a57\u8b49\u80cc\u666f\u8272\u5f69\u3002","\u8b66\u544a\u56b4\u91cd\u6027\u7684\u8f38\u5165\u9a57\u8b49\u524d\u666f\u8272\u5f69\u3002","\u8b66\u544a\u56b4\u91cd\u6027\u7684\u8f38\u5165\u9a57\u8b49\u908a\u754c\u8272\u5f69\u3002","\u932f\u8aa4\u56b4\u91cd\u6027\u7684\u8f38\u5165\u9a57\u8b49\u80cc\u666f\u8272\u5f69\u3002","\u932f\u8aa4\u56b4\u91cd\u6027\u7684\u8f38\u5165\u9a57\u8b49\u524d\u666f\u8272\u5f69\u3002","\u932f\u8aa4\u56b4\u91cd\u6027\u7684\u8f38\u5165\u9a57\u8b49\u908a\u754c\u8272\u5f69\u3002","\u4e0b\u62c9\u5f0f\u6e05\u55ae\u7684\u80cc\u666f\u3002","\u4e0b\u62c9\u5f0f\u6e05\u55ae\u7684\u524d\u666f\u3002","\u5206\u7d44\u6a19\u7c64\u7684\u5feb\u901f\u9078\u64c7\u5668\u8272\u5f69\u3002","\u5206\u7d44\u908a\u754c\u7684\u5feb\u901f\u9078\u64c7\u5668\u8272\u5f69\u3002","\u6a19\u8a18\u7684\u80cc\u666f\u984f\u8272\u3002\u6a19\u8a18\u70ba\u5c0f\u578b\u7684\u8a0a\u606f\u6a19\u7c64,\u4f8b\u5982\u641c\u5c0b\u7d50\u679c\u7684\u6578\u91cf\u3002","\u6a19\u8a18\u7684\u524d\u666f\u984f\u8272\u3002\u6a19\u8a18\u70ba\u5c0f\u578b\u7684\u8a0a\u606f\u6a19\u7c64,\u4f8b\u5982\u641c\u5c0b\u7d50\u679c\u7684\u6578\u91cf\u3002","\u6307\u51fa\u5728\u6372\u52d5\u8a72\u6aa2\u8996\u7684\u6372\u8ef8\u9670\u5f71\u3002","\u6372\u8ef8\u6ed1\u687f\u7684\u80cc\u666f\u984f\u8272\u3002","\u52d5\u614b\u986f\u793a\u6642\u6372\u8ef8\u6ed1\u687f\u7684\u80cc\u666f\u984f\u8272\u3002","\u7576\u9ede\u64ca\u6642\u6372\u8ef8\u6ed1\u687f\u7684\u80cc\u666f\u984f\u8272\u3002","\u9577\u6642\u9593\u904b\u884c\u9032\u5ea6\u689d\u7684\u80cc\u666f\u8272\u5f69.","\u7de8\u8f2f\u5668\u5167\u932f\u8aa4\u63d0\u793a\u7dda\u7684\u524d\u666f\u8272\u5f69.","\u7de8\u8f2f\u5668\u4e2d\u932f\u8aa4\u65b9\u584a\u7684\u6846\u7dda\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u5167\u8b66\u544a\u63d0\u793a\u7dda\u7684\u524d\u666f\u8272\u5f69.","\u7de8\u8f2f\u5668\u4e2d\u7684\u8b66\u544a\u65b9\u584a\u6846\u7dda\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u5167\u8cc7\u8a0a\u63d0\u793a\u7dda\u7684\u524d\u666f\u8272\u5f69","\u7de8\u8f2f\u5668\u4e2d\u7684\u8cc7\u8a0a\u65b9\u584a\u6846\u7dda\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u5167\u63d0\u793a\u8a0a\u606f\u7684\u63d0\u793a\u7dda\u524d\u666f\u8272\u5f69","\u7de8\u8f2f\u5668\u4e2d\u7684\u63d0\u793a\u65b9\u584a\u6846\u7dda\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u7684\u80cc\u666f\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u7684\u9810\u8a2d\u524d\u666f\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u5c0f\u5de5\u5177\u7684\u80cc\u666f\u8272\u5f69\uff0c\u4f8b\u5982\u5c0b\u627e/\u53d6\u4ee3\u3002","\u7de8\u8f2f\u5668\u5c0f\u5de5\u5177 (\u4f8b\u5982\u5c0b\u627e/\u53d6\u4ee3) \u7684\u524d\u666f\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u5c0f\u5de5\u5177\u7684\u908a\u754c\u8272\u5f69\u3002\u5c0f\u5de5\u5177\u9078\u64c7\u64c1\u6709\u908a\u754c\u6216\u8272\u5f69\u672a\u88ab\u5c0f\u5de5\u5177\u8986\u5beb\u6642\uff0c\u624d\u6703\u4f7f\u7528\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u5c0f\u5de5\u5177\u4e4b\u8abf\u6574\u5927\u5c0f\u5217\u7684\u908a\u754c\u8272\u5f69\u3002\u53ea\u5728\u5c0f\u5de5\u5177\u9078\u64c7\u5177\u6709\u8abf\u6574\u5927\u5c0f\u908a\u754c\u4e14\u672a\u8986\u5beb\u8a72\u8272\u5f69\u6642\uff0c\u624d\u4f7f\u7528\u8a72\u8272\u5f69\u3002\n","\u7de8\u8f2f\u5668\u9078\u53d6\u7bc4\u570d\u7684\u8272\u5f69\u3002","\u70ba\u9078\u53d6\u7684\u6587\u5b57\u984f\u8272\u9ad8\u5c0d\u6bd4\u5316","\u975e\u4f7f\u7528\u4e2d\u7de8\u8f2f\u5668\u5167\u7684\u9078\u53d6\u9805\u76ee\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u8207\u9078\u53d6\u9805\u76ee\u5167\u5bb9\u76f8\u540c\u4e4b\u5340\u57df\u7684\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u9078\u53d6\u6642\uff0c\u5167\u5bb9\u76f8\u540c\u4e4b\u5340\u57df\u7684\u6846\u7dda\u8272\u5f69\u3002","\u7b26\u5408\u76ee\u524d\u641c\u5c0b\u7684\u8272\u5f69\u3002","\u5176\u4ed6\u641c\u5c0b\u76f8\u7b26\u9805\u76ee\u7684\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u9650\u5236\u641c\u5c0b\u4e4b\u7bc4\u570d\u7684\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u7b26\u5408\u76ee\u524d\u641c\u5c0b\u7684\u6846\u7dda\u8272\u5f69\u3002","\u7b26\u5408\u5176\u4ed6\u641c\u5c0b\u7684\u6846\u7dda\u8272\u5f69\u3002","\u9650\u5236\u641c\u5c0b\u4e4b\u7bc4\u570d\u7684\u6846\u7dda\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u5728\u986f\u793a\u52d5\u614b\u986f\u793a\u7684\u6587\u5b57\u4e0b\u9192\u76ee\u63d0\u793a\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u7de8\u8f2f\u5668\u52d5\u614b\u986f\u793a\u7684\u80cc\u666f\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u52d5\u614b\u986f\u793a\u7684\u524d\u666f\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u52d5\u614b\u986f\u793a\u7684\u6846\u7dda\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u66ab\u7559\u72c0\u614b\u5217\u7684\u80cc\u666f\u8272\u5f69\u3002","\u4f7f\u7528\u4e2d\u4e4b\u9023\u7d50\u7684\u8272\u5f69\u3002","\u7528\u65bc\u71c8\u6ce1\u52d5\u4f5c\u5716\u793a\u7684\u8272\u5f69\u3002","\u7528\u65bc\u71c8\u6ce1\u81ea\u52d5\u4fee\u6b63\u52d5\u4f5c\u5716\u793a\u7684\u8272\u5f69\u3002","\u5df2\u63d2\u5165\u6587\u5b57\u7684\u80cc\u666f\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u5df2\u79fb\u9664\u6587\u5b57\u7684\u80cc\u666f\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u63d2\u5165\u7684\u6587\u5b57\u5916\u6846\u8272\u5f69\u3002","\u79fb\u9664\u7684\u6587\u5b57\u5916\u6846\u8272\u5f69\u3002","\u5169\u500b\u6587\u5b57\u7de8\u8f2f\u5668\u4e4b\u9593\u7684\u6846\u7dda\u8272\u5f69\u3002","\u7576\u6e05\u55ae/\u6a39\u72c0\u70ba\u4f7f\u7528\u4e2d\u72c0\u614b\u6642\uff0c\u7126\u9ede\u9805\u76ee\u7684\u6e05\u55ae/\u6a39\u72c0\u80cc\u666f\u8272\u5f69\u3002\u4f7f\u7528\u4e2d\u7684\u6e05\u55ae/\u6a39\u72c0\u6709\u9375\u76e4\u7126\u9ede\uff0c\u975e\u4f7f\u7528\u4e2d\u8005\u5247\u6c92\u6709\u3002","\u7576\u6e05\u55ae/\u6a39\u72c0\u70ba\u4f7f\u7528\u4e2d\u72c0\u614b\u6642\uff0c\u7126\u9ede\u9805\u76ee\u7684\u6e05\u55ae/\u6a39\u72c0\u524d\u666f\u8272\u5f69\u3002\u4f7f\u7528\u4e2d\u7684\u6e05\u55ae/\u6a39\u72c0\u6709\u9375\u76e4\u7126\u9ede\uff0c\u975e\u4f7f\u7528\u4e2d\u8005\u5247\u6c92\u6709\u3002","\u7576\u6e05\u55ae/\u6a39\u72c0\u70ba\u4f7f\u7528\u4e2d\u72c0\u614b\u6642\uff0c\u6240\u9078\u9805\u76ee\u7684\u6e05\u55ae/\u6a39\u72c0\u80cc\u666f\u8272\u5f69\u3002\u4f7f\u7528\u4e2d\u7684\u6e05\u55ae/\u6a39\u72c0\u6709\u9375\u76e4\u7126\u9ede\uff0c\u975e\u4f7f\u7528\u4e2d\u8005\u5247\u6c92\u6709\u3002","\u7576\u6e05\u55ae/\u6a39\u72c0\u70ba\u4f7f\u7528\u4e2d\u72c0\u614b\u6642\uff0c\u6240\u9078\u9805\u76ee\u7684\u6e05\u55ae/\u6a39\u72c0\u524d\u666f\u8272\u5f69\u3002\u4f7f\u7528\u4e2d\u7684\u6e05\u55ae/\u6a39\u72c0\u6709\u9375\u76e4\u7126\u9ede\uff0c\u975e\u4f7f\u7528\u4e2d\u8005\u5247\u6c92\u6709\u3002","\u7576\u6e05\u55ae/\u6a39\u72c0\u70ba\u975e\u4f7f\u7528\u4e2d\u72c0\u614b\u6642\uff0c\u6240\u9078\u9805\u76ee\u7684\u6e05\u55ae/\u6a39\u72c0\u80cc\u666f\u8272\u5f69\u3002\u4f7f\u7528\u4e2d\u7684\u6e05\u55ae/\u6a39\u72c0\u6709\u9375\u76e4\u7126\u9ede\uff0c\u975e\u4f7f\u7528\u4e2d\u8005\u5247\u6c92\u6709\u3002","\u7576\u6e05\u55ae/\u6a39\u72c0\u70ba\u4f7f\u7528\u4e2d\u72c0\u614b\u6642\uff0c\u6240\u9078\u9805\u76ee\u7684\u6e05\u55ae/\u6a39\u72c0\u524d\u666f\u8272\u5f69\u3002\u4f7f\u7528\u4e2d\u7684\u6e05\u55ae/\u6a39\u72c0\u6709\u9375\u76e4\u7126\u9ede\uff0c\u975e\u4f7f\u7528\u4e2d\u5247\u6c92\u6709\u3002","\u7576\u6e05\u55ae/\u6a39\u72c0\u70ba\u975e\u4f7f\u7528\u4e2d\u72c0\u614b\u6642\uff0c\u7126\u9ede\u9805\u76ee\u7684\u6e05\u55ae/\u6a39\u72c0\u80cc\u666f\u8272\u5f69\u3002\u4f7f\u7528\u4e2d\u7684\u6e05\u55ae/\u6a39\u72c0\u6709\u9375\u76e4\u7126\u9ede\uff0c\u975e\u4f7f\u7528\u4e2d\u8005\u5247\u6c92\u6709\u3002","\u4f7f\u7528\u6ed1\u9f20\u66ab\u7559\u5728\u9805\u76ee\u6642\u7684\u6e05\u55ae/\u6a39\u72c0\u80cc\u666f\u3002","\u6ed1\u9f20\u66ab\u7559\u5728\u9805\u76ee\u6642\u7684\u6e05\u55ae/\u6a39\u72c0\u524d\u666f\u3002","\u4f7f\u7528\u6ed1\u9f20\u56db\u8655\u79fb\u52d5\u9805\u76ee\u6642\u7684\u6e05\u55ae/\u6a39\u72c0\u62d6\u653e\u80cc\u666f\u3002","\u5728\u6e05\u55ae/\u6a39\u72c0\u5167\u641c\u5c0b\u6642\uff0c\u76f8\u7b26\u9192\u76ee\u63d0\u793a\u7684\u6e05\u55ae/\u6a39\u72c0\u524d\u666f\u8272\u5f69\u3002","\u6e05\u55ae\u548c\u6a39\u72c0\u7d50\u69cb\u4e2d\u985e\u578b\u7be9\u9078\u5c0f\u5de5\u5177\u7684\u80cc\u666f\u8272\u5f69\u3002","\u6e05\u55ae\u548c\u6a39\u72c0\u7d50\u69cb\u4e2d\u985e\u578b\u7be9\u9078\u5c0f\u5de5\u5177\u7684\u5927\u7db1\u8272\u5f69\u3002","\u5728\u6c92\u6709\u76f8\u7b26\u9805\u76ee\u6642\uff0c\u6e05\u55ae\u548c\u6a39\u72c0\u7d50\u69cb\u4e2d\u985e\u578b\u7be9\u9078\u5c0f\u5de5\u5177\u7684\u5927\u7db1\u8272\u5f69\u3002","\u7e2e\u6392\u8f14\u52a9\u7dda\u7684\u6a39\u72c0\u7b46\u89f8\u8272\u5f69\u3002","\u529f\u80fd\u8868\u7684\u908a\u6846\u8272\u5f69\u3002","\u529f\u80fd\u8868\u9805\u76ee\u7684\u524d\u666f\u8272\u5f69\u3002","\u529f\u80fd\u8868\u9805\u76ee\u7684\u80cc\u666f\u8272\u5f69\u3002","\u529f\u80fd\u8868\u4e2d\u6240\u9078\u529f\u80fd\u8868\u9805\u76ee\u7684\u524d\u666f\u8272\u5f69\u3002","\u529f\u80fd\u8868\u4e2d\u6240\u9078\u529f\u80fd\u8868\u9805\u76ee\u7684\u80cc\u666f\u8272\u5f69\u3002","\u529f\u80fd\u8868\u4e2d\u6240\u9078\u529f\u80fd\u8868\u9805\u76ee\u7684\u6846\u7dda\u8272\u5f69\u3002","\u529f\u80fd\u8868\u4e2d\u5206\u9694\u7dda\u529f\u80fd\u8868\u9805\u76ee\u7684\u8272\u5f69\u3002","\u7a0b\u5f0f\u78bc\u7247\u6bb5\u5b9a\u4f4d\u505c\u99d0\u9ede\u7684\u53cd\u767d\u986f\u793a\u80cc\u666f\u8272\u5f69\u3002","\u7a0b\u5f0f\u78bc\u7247\u6bb5\u5b9a\u4f4d\u505c\u99d0\u9ede\u7684\u53cd\u767d\u986f\u793a\u908a\u754c\u8272\u5f69\u3002","\u7a0b\u5f0f\u78bc\u7247\u6bb5\u6700\u7d42\u5b9a\u4f4d\u505c\u99d0\u9ede\u7684\u53cd\u767d\u986f\u793a\u80cc\u666f\u8272\u5f69\u3002","\u7a0b\u5f0f\u78bc\u7247\u6bb5\u6700\u7d42\u5b9a\u4f4d\u505c\u99d0\u9ede\u7684\u53cd\u767d\u986f\u793a\u908a\u754c\u8272\u5f69\u3002","\u5c0b\u627e\u76f8\u7b26\u9805\u76ee\u7684\u6982\u89c0\u5c3a\u898f\u6a19\u8a18\u8272\u5f69\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u9078\u53d6\u9805\u76ee\u9192\u76ee\u63d0\u793a\u7684\u6982\u89c0\u5c3a\u898f\u6a19\u8a18\u3002\u5176\u4e0d\u5f97\u70ba\u4e0d\u900f\u660e\u8272\u5f69\uff0c\u4ee5\u514d\u96b1\u85cf\u5e95\u5c64\u88dd\u98fe\u3002","\u7528\u65bc\u5c0b\u627e\u76f8\u7b26\u9805\u76ee\u7684\u7e2e\u5716\u6a19\u8a18\u8272\u5f69\u3002","\u7de8\u8f2f\u5668\u9078\u53d6\u7bc4\u570d\u7684\u8ff7\u4f60\u5730\u5716\u6a19\u8a18\u8272\u5f69\u3002","\u932f\u8aa4\u7684\u7e2e\u5716\u6a19\u8a18\u8272\u5f69\u3002","\u8b66\u544a\u7684\u7e2e\u5716\u6a19\u8a18\u8272\u5f69\u3002","\u7528\u65bc\u554f\u984c\u932f\u8aa4\u5716\u793a\u7684\u8272\u5f69\u3002","\u7528\u65bc\u554f\u984c\u8b66\u544a\u5716\u793a\u7684\u8272\u5f69\u3002","\u7528\u65bc\u554f\u984c\u8cc7\u8a0a\u5716\u793a\u7684\u8272\u5f69\u3002"]});
module.exports = function processPromises() { return Promise.resolve(); }
const path = require("path"); const Router = require("@koa/router"); const dayjs = require("dayjs"); const utc = require("dayjs/plugin/utc"); // dependent on utc plugin const timezone = require("dayjs/plugin/timezone"); const { nanoid } = require("nanoid"); const { QueryTypes } = require("sequelize"); const ROOT = path.resolve(process.cwd(), "./"); const { db } = require(path.resolve(ROOT, "./util/db")); const { logger } = require(path.resolve(ROOT, "./util/logger")); const getClientIP = require(path.resolve(ROOT, "./util/getClientIP")); const todoList = new Router(); // https://dayjs.gitee.io/docs/zh-CN/plugin/timezone dayjs.extend(utc); dayjs.extend(timezone); dayjs.tz.setDefault("Asia/Shanghai"); // 列表查询 todoList.get("/todoList/list", async (ctx, next) => { const reqParams = ctx.query; // https://github.com/demopark/sequelize-docs-Zh-CN/blob/master/core-concepts/getting-started.md#promises-%E5%92%8C-asyncawait const selects = { 0: "SELECT * FROM todolist WHERE is_finished='0' ORDER BY create_time DESC;", 1: "SELECT * FROM todolist WHERE is_finished='1' ORDER BY create_time DESC;", 2: "SELECT * FROM todolist ORDER BY create_time DESC;", }; const filterType = reqParams.filterType || "2"; try { let list = await db.query(selects[filterType], { type: QueryTypes.SELECT, }); list = list.map((item) => ({ ...item, create_time: dayjs(item.create_time) .tz("Asia/Shanghai") .format("YYYY-MM-DD HH:mm:ss"), is_finished: item.is_finished === "0" ? false : true, })); ctx.body = { code: 200, data: list || [], msg: "ok", }; } catch (e) { console.log(e); } await next(); }); // 添加 todoList.post("/todoList/addOne", async (ctx, next) => { const ip = await getClientIP(ctx.req); const { msg, timeStamp } = ctx.request.body; const id = nanoid(); const create_time = dayjs(timeStamp) .tz("Asia/Shanghai") .format("YYYY-MM-DD HH:mm:ss"); try { const sql = `INSERT INTO todolist (id, create_time, is_finished, msg) VALUES('${id}', '${create_time}', '0', '${msg}');`; await db.query(sql); await logger.info(`[${ip}]: ${sql}`); ctx.body = { code: 200, data: { id, create_time, }, msg: "ok", }; } catch (error) { console.log(error); } await next(); }); // 更新 todoList.post("/todoList/update", async (ctx, next) => { const ip = await getClientIP(ctx.req); const { id, is_finished } = ctx.request.body; try { const sql = `UPDATE todolist SET is_finished = '${is_finished}' WHERE id = '${id}';`; await db.query(sql); await logger.info(`[${ip}]: ${sql}`); ctx.body = { code: 200, data: { id, is_finished: is_finished === "1", }, msg: "ok", }; } catch (error) { console.log(error); } await next(); }); // 删除 todoList.post("/todoList/delete", async (ctx, next) => { const ip = await getClientIP(ctx.req); const { id } = ctx.request.body; try { const sql = `DELETE FROM todolist WHERE id = '${id}';`; await db.query(sql); await logger.info(`[${ip}]: ${sql}`); ctx.body = { code: 200, data: { id, }, msg: "ok", }; } catch (error) { console.log(error); } await next(); }); module.exports = todoList;
function OnEnterInGameState() { ptwUI.showInGameUI(); ptwUI.showCurrentQuestion(); //register key functions $('.question-key').on(ptwUI.touchEnd,function (e) { var emptyKeys = $(this).parents(".question").find(".answer-key[data-key='']"); var emptyKeysCount = emptyKeys.length; if (emptyKeysCount > 0) { ptwUI.appendCharactor($(emptyKeys[0]), $(this)); emptyKeysCount = emptyKeysCount - 1; if (emptyKeysCount == 0) { if (controller.isAnswerCorrect()) { controller.processToNextQuestion(); ptwUI.showSuccessUI(); } else { ptwUI.onFailed(); } } } }); $(".answer-key").on(ptwUI.touchEnd,function (e) { var data_key = $(this).attr("data-key"); if (data_key != null && data_key != '') { ptwUI.removeCharactor($(this)); } if ( $(this).hasClass('error') ) { $(this).siblings().attr('class','answer-key'); } }); } function OnExitInGameState() { document.onkeydown = null; document.onkeyup = null; controller.stopGame(); } var InGameState = new State( OnEnterInGameState, OnExitInGameState );
""" WSGI config for TV_shows project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'tv_shows.settings') application = get_wsgi_application()
sap.ui.define([ "sap/ui/core/mvc/Controller", "sap/ui/model/json/JSONModel", "sap/ui/model/Filter", "sap/ui/model/FilterOperator" ], function(Controller, JSONModel, Filter, FilterOperator) { "use strict"; return Controller.extend("sap.ui.demo.todo.controller.App", { onInit: function() { this.aSearchFilters = []; this.aTabFilters = []; }, /** * Adds a new todo item to the bottom of the list. */ addTodo: function() { var oModel = this.getView().getModel(); var aTodos = oModel.getProperty("/todos").map(function (oTodo) { return Object.assign({}, oTodo); }); aTodos.push({ title: oModel.getProperty("/newTodo"), completed: false }); oModel.setProperty("/todos", aTodos); oModel.setProperty("/newTodo", ""); }, /** * Removes all completed items from the todo list. */ clearCompleted: function() { var oModel = this.getView().getModel(); var aTodos = oModel.getProperty("/todos").map(function (oTodo) { return Object.assign({}, oTodo); }); var i = aTodos.length; while (i--) { var oTodo = aTodos[i]; if (oTodo.completed) { aTodos.splice(i, 1); } } oModel.setProperty("/todos", aTodos); }, /** * Updates the number of items not yet completed */ updateItemsLeftCount: function() { var oModel = this.getView().getModel(); var aTodos = oModel.getProperty("/todos") || []; var iItemsLeft = aTodos.filter(function(oTodo) { return oTodo.completed !== true; }).length; oModel.setProperty("/itemsLeftCount", iItemsLeft); }, /** * Trigger search for specific items. The removal of items is disable as long as the search is used. * @param {sap.ui.base.Event} oEvent Input changed event */ onSearch: function(oEvent) { var oModel = this.getView().getModel(); // First reset current filters this.aSearchFilters = []; // add filter for search var sQuery = oEvent.getSource().getValue(); if (sQuery && sQuery.length > 0) { oModel.setProperty("/itemsRemovable", false); var filter = new Filter("title", FilterOperator.Contains, sQuery); this.aSearchFilters.push(filter); } else { oModel.setProperty("/itemsRemovable", true); } this._applyListFilters(); }, onFilter: function(oEvent) { // First reset current filters this.aTabFilters = []; // add filter for search var sFilterKey = oEvent.getParameter("item").getKey(); // eslint-disable-line default-case switch (sFilterKey) { case "active": this.aTabFilters.push(new Filter("completed", FilterOperator.EQ, false)); break; case "completed": this.aTabFilters.push(new Filter("completed", FilterOperator.EQ, true)); break; case "all": default: // Don't use any filter } this._applyListFilters(); }, _applyListFilters: function() { var oList = this.byId("todoList"); var oBinding = oList.getBinding("items"); oBinding.filter(this.aSearchFilters.concat(this.aTabFilters), "todos"); } }); });
const config = require("@ngineer/config-webpack/production"); const {serverRenderer} = require("./lib/server/renderer"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const path = require("path"); const merge = require("webpack-merge"); const {routes} = require("./lib/routes"); module.exports = (env, argv) => merge(config(env, argv), { module: { rules: [ { test: /\.(png|jpe?g)$/i, use: [ { loader: "file-loader" } ] } ] }, resolve: { extensions: [".ts", ".tsx", ".mjs", ".js", ".jsx"] }, plugins: routes.map( ({location: url}) => new HtmlWebpackPlugin({ filename: path.join(url, "index.html").replace(/^\//, ""), templateContent: serverRenderer({url}) }) ) });
# -*- coding: utf-8 -*- # @Time : 2020/11/16 23:41 # @Author : tomtao # @Email : [email protected] # @File : views.py # @Project : db_operation_demo from django.shortcuts import render from django.db import connection def index(request): cursor = connection.cursor() cursor.execute("insert into book(id,name,author) values(null, '三国演义','罗贯中')") cursor.execute("select * from book") rows = cursor.fetchall() for row in rows: print(row) return render(request, 'index.html')
const Handler = require('./Handler'); module.exports = class File extends Handler { get name() { return 'file'; } get message() { return 'logging to a file\n'; } }
const Discord = require("discord.js"); const { MessageEmbed, MessageAttachment } = require("discord.js"); const config = require(`${process.cwd()}/botconfig/config.json`); const canvacord = require("canvacord"); var ee = require(`${process.cwd()}/botconfig/embed.json`); const request = require("request"); const emoji = require(`${process.cwd()}/botconfig/emojis.json`); module.exports = { name: "rainbow", aliases: [""], category: "🕹️ Fun", description: "IMAGE CMD", usage: "rainbow @User", type: "user", options: [ { "User": { name: "which_user", description: "From Which User do you want to get ... ?", required: false } }, //to use in the code: interacton.getUser("ping_a_user") ], run: async (client, interaction, cmduser, es, ls, prefix, player, message) => { if (!client.settings.get(message.guild.id, "FUN")) { return interaction?.reply({ embeds: [new MessageEmbed() .setColor(es.wrongcolor) .setFooter(client.getFooter(es)) .setTitle(client.la[ls].common.disabled.title) .setDescription(require(`${process.cwd()}/handlers/functions`).handlemsg(client.la[ls].common.disabled.description, { prefix: prefix })) ], ephemeral: true }); } await interaction?.deferReply({ephemeral: false}); let user = interaction?.options.getUser("which_user"); if (!user) user = interaction?.member.user; let avatar = user.displayAvatarURL({ dynamic: false, format: "png" }); let image = await canvacord.Canvas.rainbow(avatar); let attachment = await new MessageAttachment(image, "rainbow.png"); interaction?.editReply({ embeds: [new MessageEmbed() .setColor(es.color) .setFooter(client.getFooter(es)) .setImage("attachment://rainbow.png") ], files: [attachment], ephemeral: true }).catch(() => {}) } } /** * @INFO * Bot Coded by TN DEADSHOT#8167 | https://dsc.gg/deadshotgaming * @INFO * Work for DEADSHOT X Development | https://DEADSHOT X.eu * @INFO * Please mention him / DEADSHOT X Development, when using this Code! * @INFO */
for i in range(0, 18): root = 'chap%2.2d' % i s = f'pandoc --atx-headers {root}.tex -t markdown > {root}.md' print(s) s = f'notedown {root}.md > {root}.ipynb' print(s) s = f'python catnote.py header.ipynb {root}.ipynb' print(s) print()
var classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean = [ [ "getCode", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a3acda4197006079f1d51c9220b99c5cf", null ], [ "getEndTime", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a698cf0cbf1144611aba3cc3f0469eef3", null ], [ "getKey", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#ad2d8424b770b483135a25cb99e7fb12e", null ], [ "getLocalKey", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#aaad06a42ee36ed47e69a33cdd5fb8c8f", null ], [ "getMeshId", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a1c3b1d06001b0c08030185d5ff2b7c52", null ], [ "getName", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a86a4e1951746c7ac76a683db88576977", null ], [ "getPassword", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a437d1dae7e21332ce4dd3e3b8c32bb45", null ], [ "getPv", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#af7bd72d4c95bb984b4a2b35119b38047", null ], [ "getResptime", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a90879ebdf258d579a928484194be1bf3", null ], [ "getStartTime", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a848ea758322dcc3e4a2237a9fd3bad53", null ], [ "isShare", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#af87e5ef8a542f861f7390d04d75877ce", null ], [ "isTempShare", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a92ad374398ac1038f91b8f3d7b10614f", null ], [ "setCode", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a79122eef07ff0043cea52cd5a4ac36fd", null ], [ "setEndTime", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a146d4f7cca20365c48e20f96c31482fd", null ], [ "setLocalKey", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#ac70377edcdb3a9f781794795c7d2ea84", null ], [ "setMeshId", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a8a826f87b8efa7ae944a12aa35322e4b", null ], [ "setName", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a986ca60ee168672fa504cfa835e581ca", null ], [ "setPassword", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a2c188ff92ca2c90af1ac5c5b1e2e65e6", null ], [ "setPv", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a37657dc4efdd7b77ed98e69eb976b9a3", null ], [ "setResptime", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#aa026abe891441c78a59088461f8e1ed8", null ], [ "setShare", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a7f2dc5b543f7f8ea27b4adfd09782059", null ], [ "setStartTime", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#ab2b1bd0dc108a491142ccfe994cd0af3", null ], [ "setTempShare", "classcom_1_1tuya_1_1smart_1_1sdk_1_1bean_1_1_blue_mesh_bean.html#a29a16536d30e92e67a709ee8ad5ee414", null ] ];
// Copyright 2015 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. /** * @param {!md.$mdThemingProvider} $mdThemingProvider * @ngInject */ export default function config($mdThemingProvider) { // Create a color palette that uses Kubernetes colors. let kubernetesColorPaletteName = 'kubernetesColorPalette'; let kubernetesAccentPaletteName = 'kubernetesAccentPallete'; let kubernetesColorPalette = $mdThemingProvider.extendPalette('blue', { '500': '326de6', }); // Use the palette as default one. $mdThemingProvider.definePalette(kubernetesColorPaletteName, kubernetesColorPalette); $mdThemingProvider.definePalette(kubernetesAccentPaletteName, kubernetesColorPalette); $mdThemingProvider.theme('default') .primaryPalette(kubernetesColorPaletteName) .accentPalette(kubernetesAccentPaletteName); }
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * External dependencies */ import { fireEvent, screen } from '@testing-library/react'; import { registerElementType } from '@googleforcreators/elements'; import { elementTypes } from '@googleforcreators/element-library'; /** * Internal dependencies */ import PageBackgroundPanel from '../pageBackground'; import { renderPanel } from '../../../shared/test/_utils'; import ConfigContext from '../../../../../app/config/context'; import { StoryContext } from '../../../../../app/story'; import useFFmpeg from '../../../../../app/media/utils/useFFmpeg'; jest.mock('@googleforcreators/design-system', () => ({ ...jest.requireActual('@googleforcreators/design-system'), useSnackbar: jest.fn(() => ({ showSnackbar: jest.fn() })), })); jest.mock('../../../../../app/media/utils/useFFmpeg'); const mockUseFFmpeg = useFFmpeg; function MediaUpload({ render, onSelect }) { const open = () => { const image = { type: 'image', src: 'media1' }; onSelect(image); }; return render(open); } function arrange(selectedElements) { const configValue = { allowedMimeTypes: { audio: ['audio/mpeg', 'audio/aac', 'audio/wav', 'audio/ogg'], image: [ 'image/png', 'image/jpeg', 'image/jpg', 'image/gif', 'image/webp', ], caption: ['text/vtt'], vector: [], video: ['video/mp4', 'video/webm'], }, capabilities: { hasUploadMediaAction: true, }, allowedTranscodableMimeTypes: [], MediaUpload, }; const combineElements = jest.fn(); const storyValue = { state: { currentPage: { backgroundColor: {}, }, }, actions: { clearBackgroundElement: jest.fn(), combineElements, updateCurrentPageProperties: jest.fn(), }, }; const wrapper = ({ children }) => ( <ConfigContext.Provider value={configValue}> <StoryContext.Provider value={storyValue}> {children} </StoryContext.Provider> </ConfigContext.Provider> ); return { ...renderPanel(PageBackgroundPanel, selectedElements, wrapper), combineElements, }; } describe('Panels/PageBackground', () => { beforeAll(() => { elementTypes.forEach(registerElementType); localStorage.setItem( 'web_stories_ui_panel_settings:pageBackground', JSON.stringify({ isCollapsed: false }) ); }); afterAll(() => { localStorage.clear(); }); it('should simulate a click on the replace button', () => { mockUseFFmpeg.mockReturnValue({ isTranscodingEnabled: false }); const backgroundImage = { x: 0, y: 0, width: 1, height: 1, id: '123', isBackground: true, type: 'image', rotationAngle: 0, resource: { id: 'resource/123', src: 'media.jpg', alt: 'Media', }, }; const { combineElements } = arrange([backgroundImage]); const replaceButton = screen.getByRole('button', { name: 'Replace' }); fireEvent.click(replaceButton); expect(combineElements).toHaveBeenCalledTimes(1); expect(combineElements).toHaveBeenCalledWith({ firstElement: expect.any(Object), secondId: '123', }); }); });
# Generated by Django 3.0.4 on 2020-05-27 15:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('products', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='UserProfile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('nickname', models.CharField(max_length=30)), ('division', models.CharField(blank=True, default='Unranked', max_length=12)), ('division_img', models.ImageField(default='UNRANKED.png', upload_to='division_imgs')), ('profile_img', models.ImageField(default='noob.png', upload_to='profile_imgs')), ('stripe_id', models.CharField(blank=True, max_length=200, null=True)), ('product', models.ManyToManyField(blank=True, to='products.Product')), ('user', models.OneToOneField(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = tslib_1.__importStar(require("react")); var styled_icon_1 = require("@styled-icons/styled-icon"); exports.ChevronUp = React.forwardRef(function (props, ref) { var attrs = { "fill": "currentColor", "xmlns": "http://www.w3.org/2000/svg", }; return (React.createElement(styled_icon_1.StyledIconBase, tslib_1.__assign({ iconAttrs: attrs, iconVerticalAlign: "middle", iconViewBox: "0 0 20 20" }, props, { ref: ref }), React.createElement("path", { d: "M15.484 12.452c-.436.446-1.043.481-1.576 0L10 8.705l-3.908 3.747c-.533.481-1.141.446-1.574 0-.436-.445-.408-1.197 0-1.615.406-.418 4.695-4.502 4.695-4.502a1.095 1.095 0 011.576 0s4.287 4.084 4.695 4.502c.409.418.436 1.17 0 1.615z", key: "k0" }))); }); exports.ChevronUp.displayName = 'ChevronUp'; exports.ChevronUpDimensions = { height: 20, width: 20 };
# Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved. # **InsertLicense** code __author__ = 'gchlebus'
'use strict'; const path = require('path'); const _ = require('lodash'); const chalk = require('chalk'); const Promise = require('bluebird'); const ReportBuilderFactory = require('../../report-builder-factory'); const EventSource = require('../event-source'); const utils = require('../../server-utils'); const {findTestResult} = require('./utils'); const {findNode} = require('../../../lib/static/modules/utils'); const reporterHelper = require('../../reporter-helpers'); module.exports = class ToolRunner { static create(paths, tool, configs) { return new this(paths, tool, configs); } constructor(paths, tool, {program: globalOpts, pluginConfig, options: guiOpts}) { this._toolName = globalOpts.name(); this._testFiles = [].concat(paths); this._tool = tool; this._tree = null; this._collection = null; this._globalOpts = globalOpts; this._guiOpts = guiOpts; this._reportPath = pluginConfig.path; this._eventSource = new EventSource(); this._reportBuilder = ReportBuilderFactory.create(this._toolName, tool, pluginConfig); this._reportBuilder.setApiValues(tool.htmlReporter.values); } get config() { return this._tool.config; } get tree() { return this._tree; } initialize() { return this._readTests() .then((collection) => { this._collection = collection; this._handleRunnableCollection(); this._subscribeOnEvents(); }); } _readTests() { const {grep, set: sets, browser: browsers} = this._globalOpts; return this._tool.readTests(this._testFiles, {grep, sets, browsers}); } finalize() { this._reportBuilder.saveDataFileSync(); } addClient(connection) { this._eventSource.addConnection(connection); } sendClientEvent(event, data) { this._eventSource.emit(event, data); } updateReferenceImage(tests) { const reportBuilder = this._reportBuilder; return Promise.map(tests, (test) => { const updateResult = this._prepareUpdateResult(test); const formattedResult = reportBuilder.format(updateResult); return Promise.map(updateResult.imagesInfo, (imageInfo) => { const {stateName} = imageInfo; return reporterHelper.updateReferenceImage(formattedResult, this._reportPath, stateName) .then(() => { const result = _.extend(updateResult, {refImg: imageInfo.expectedImg}); this._emitUpdateReference(result, stateName); }); }).then(() => { reportBuilder.addUpdated(updateResult); return findTestResult(reportBuilder.getSuites(), formattedResult.prepareTestResult()); }); }); } _fillTestsTree() { const {autoRun} = this._guiOpts; this._tree = Object.assign(this._reportBuilder.getResult(), {gui: true, autoRun}); this._tree.suites = this._applyReuseData(this._tree.suites); } _applyReuseData(testSuites) { if (!testSuites) { return; } const reuseData = this._loadReuseData(); if (_.isEmpty(reuseData.suites)) { return testSuites; } return testSuites.map((suite) => applyReuse(reuseData)(suite)); } _loadReuseData() { try { return utils.require(path.resolve(this._reportPath, 'data')); } catch (e) { utils.logger.warn(chalk.yellow(`Nothing to reuse in ${this._reportPath}`)); return {}; } } }; function applyReuse(reuseData) { let isBrowserResultReused = false; const reuseBrowserResult = (suite) => { if (suite.children) { suite.children = suite.children.map(reuseBrowserResult); return isBrowserResultReused ? _.set(suite, 'status', getReuseStatus(reuseData.suites, suite)) : suite; } return _.set(suite, 'browsers', suite.browsers.map((bro) => { const browserResult = getReuseBrowserResult(reuseData.suites, suite.suitePath, bro.name); if (browserResult) { isBrowserResultReused = true; suite.status = getReuseStatus(reuseData.suites, suite); } return _.extend(bro, browserResult); })); }; return reuseBrowserResult; } function getReuseStatus(reuseSuites, {suitePath, status: defaultStatus}) { const reuseNode = findNode(reuseSuites, suitePath); return _.get(reuseNode, 'status', defaultStatus); } function getReuseBrowserResult(reuseSuites, suitePath, browserId) { const reuseNode = findNode(reuseSuites, suitePath); return _.find(_.get(reuseNode, 'browsers'), {name: browserId}); }
import { Store, create } from '../index'; import benchmark from './benchmark'; export default benchmark('Number', function(suite) { suite.add('create(Number)', () => { create(Number); }) suite.add('create(Number, 42)', () => { create(Number, 42); }) suite.add('create(Number).set(42)', () => { create(Number).set(42); }) suite.add('Store(create(Number))', () => { Store(create(Number)); }) suite.add('Store(create(Number, 42))', () => { Store(create(Number, 42)); }) suite.add('Store(create(Number)).set(42)', () => { Store(create(Number)).set(42); }) })
import { createAnimation } from '../../../utils/animation/animation'; import { SwipeToCloseDefaults } from '../gestures/swipe-to-close'; /** * iOS Modal Enter Animation for the Card presentation style */ export const iosEnterAnimation = (baseEl, presentingEl) => { // The top translate Y for the presenting element const backdropAnimation = createAnimation() .addElement(baseEl.querySelector('ion-backdrop')) .fromTo('opacity', 0.01, 'var(--backdrop-opacity)'); const wrapperAnimation = createAnimation() .addElement(baseEl.querySelector('.modal-wrapper')) .beforeStyles({ 'opacity': 1 }) .fromTo('transform', 'translateY(100%)', 'translateY(0%)'); const baseAnimation = createAnimation() .addElement(baseEl) .easing('cubic-bezier(0.32,0.72,0,1)') .duration(500) .beforeAddClass('show-modal') .addAnimation([backdropAnimation, wrapperAnimation]); if (presentingEl) { const modalTransform = (presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined) ? '-10px' : 'max(30px, var(--ion-safe-area-top))'; const bodyEl = document.body; const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE; const finalTransform = `translateY(${modalTransform}) scale(${toPresentingScale})`; const presentingAnimation = createAnimation() .beforeStyles({ 'transform': 'translateY(0)', 'transform-origin': 'top center' }) .afterStyles({ 'transform': finalTransform }) .beforeAddWrite(() => bodyEl.style.setProperty('background-color', 'black')) .addElement(presentingEl) .keyframes([ { offset: 0, transform: 'translateY(0px) scale(1)', borderRadius: '0px' }, { offset: 1, transform: finalTransform, borderRadius: '10px 10px 0 0' } ]); baseAnimation.addAnimation(presentingAnimation); } return baseAnimation; };
const gulp = require('gulp'); const sass = require('gulp-sass'); const browserSync = require('browser-sync'); const useref = require('gulp-useref'); const uglify = require('gulp-uglify'); const gulpIf = require('gulp-if'); const cssnano = require('gulp-cssnano'); const imagemin = require('gulp-imagemin'); const cache = require('gulp-cache'); const del = require('del'); const runSequence = require('run-sequence'); gulp.task('browserSync', function () { browserSync({ server: { baseDir: 'app' } }); }); gulp.task('sass', function () { return gulp.src('app/scss/**/*.scss') .pipe(sass().on('error', sass.logError)) .pipe(gulp.dest('app/css')) .pipe(browserSync.reload({ stream: true })); }); gulp.task('watch', function () { gulp.watch('app/scss/**/*.scss', ['sass']); gulp.watch('app/*.html', browserSync.reload); gulp.watch('app/js/**/*.js', browserSync.reload); }); gulp.task('useref', function () { return gulp.src('app/*.html') .pipe(useref()) .pipe(gulpIf('*.js', uglify())) .pipe(gulpIf('*.css', cssnano())) .pipe(gulp.dest('dist')); }); gulp.task('images', function () { return gulp.src('app/images/**/*.+(png|jpg|jpeg|gif|svg)') .pipe(cache(imagemin({ interlaced: true, }))) .pipe(gulp.dest('dist/images')); }); gulp.task('fonts', function () { return gulp.src('app/fonts/**/*') .pipe(gulp.dest('dist/fonts')); }); gulp.task('clean', function () { return del.sync('dist').then(function (cb) { return cache.clearAll(cb); }); }); gulp.task('clean:dist', function () { return del.sync(['dist/**/*', '!dist/images', '!dist/images/**/*']); }); gulp.task('default', function (callback) { runSequence(['sass', 'browserSync'], 'watch', callback ); }); gulp.task('build', function (callback) { runSequence( 'clean:dist', 'sass', ['useref', 'images', 'fonts'], callback ); });
import {default as Sequelize} from "sequelize"; import {UpgradeFile} from "./UpgradeFile.js"; import {SystemController} from "../System/System.js"; import {$Collection} from "../Database/$Collection.js"; import {$CollectionFieldType} from "../Database/$CollectionFieldType.js"; export class CollectionFile extends UpgradeFile { _log = SystemController.getLogger('CollectionFile'); type = "core_collection"; /** * @param {String} filePath */ constructor(filePath) { super(filePath); } /** * @returns {Promise<*>} */ async bootFile() { let specification = await this._createCollectionSpecificationFromFile(); await SystemController.createCollection(this.json.name, specification); try { let coreCollection = await $Collection.get(this.json.name, "name"); for (let key in this.json) { coreCollection.setValue(key, this.json[key]); } return await coreCollection.save(); } catch (err) { return $Collection.create(this.json); } } /** * @returns {Promise<void>} * @private */ async _createCollectionSpecificationFromFile() { try { let promises = []; for (let fieldName in this.json.fields) { let field = this.json.fields[fieldName]; promises.push((async (field) => { return await this._getInternalFieldType(field) })(field)) } let fieldTypes = await Promise.all(promises); let specification = {}; fieldTypes.forEach((fieldType) => { specification[fieldType.field] = fieldType.type }); return specification; } catch (error) { this._log.error(`Failed to create collection for plugin file: ${this.sourceFilePath}`, error); throw (error); } } /** * @param {Object<String, String>} field * @returns {Promise<{field: *, type: *}>} * @private */ async _getInternalFieldType(field) { let fieldType = await $CollectionFieldType.findOne({ name: field.type }); if (fieldType) { const internalType = fieldType.getValue('internal_type'); return { field: field.name, type: Sequelize[internalType] }; } let defaultTypes = { short_string: 'STRING', true_false: 'BOOLEAN', json: 'JSONB', }; this._log.debug(`Attempting to determine default internal_type for requested type: ${field.type}`); if (field && field.type && Sequelize[defaultTypes[field.type]]) return { field: field.name, type: Sequelize[defaultTypes[field.type]] }; let err = new Error(); this._log.error(`Unable to understand '${field.type}' field type for field: ${field.name}`, err); throw err; } }
notas = sum([float(input('Digite a primeira nota: ')), float(input('Digite a segunda nota: ')), float(input('Digite a terceira nota: ')), float(input('Digite a quarta nota: '))]) media = notas / 4 print(f'A média aritmética é {media}')
import { GALLERY_CONSTS } from 'pro-gallery-lib'; import GalleryDriver from '../drivers/reactDriver'; import { expect } from 'chai'; import { mergeNestedObjects } from 'pro-gallery-lib'; import { images2 } from '../drivers/mocks/items'; import { options, container } from '../drivers/mocks/styles'; describe('options - layoutParams_navigationArrows_container_borderRadius', () => { let driver; let initialProps; beforeEach(() => { driver = new GalleryDriver(); initialProps = { container, items: images2, options, }; }); it('should set arrows border-radius', async () => { initialProps.options = mergeNestedObjects(initialProps.options, { galleryLayout: GALLERY_CONSTS.layout.SLIDESHOW, layoutParams: { navigationArrows: { container: { type: GALLERY_CONSTS.arrowsContainerStyleType.BOX, borderRadius: 10, }, }, }, }); driver.mount.proGallery(initialProps); await driver.update(); const arrow = driver.find.selector('.nav-arrows-container'); expect(arrow.props().style.borderRadius).to.eq('10%'); }); });
function add_action(action_name) { console.log("in add action"); let dropdown_values; if (action_name == "action") { dropdown_values = ["read", "write", "list", "tagging", "permissions-management"] } else { dropdown_values = ["single-actions", "service-read", "service-write", "service-list", "service-tagging", "service-permissions-management"] } const tab_var = action_name; selected_action = document.getElementById(tab_var+'_name').value; arn_name = document.getElementById(tab_var+'_arn').value; table = document.getElementById(tab_var+'_table'); var rowlen = table.rows.length; var row = table.insertRow(rowlen); row.id = tab_var+"_"+rowlen; var n_action = row.insertCell(0); var n_arn = row.insertCell(1); var n_btn = row.insertCell(2); select_tag = document.createElement('select'); select_tag.setAttribute('name',tab_var+'_name_'+rowlen) select_tag.className = 'form-control'; n_arn.innerHTML = '<input type="text" class="form-control" name="'+tab_var+'_arn_'+ rowlen+'" placeholder="arns seperated by comma" value="'+arn_name+'">'; n_btn.innerHTML = '<button id="btn'+ rowlen+'" class="btn btn-outline-danger btn-sm" onclick="remove_row(\''+tab_var+'\','+rowlen +')">Delete</button>'; for(var i =0;i<dropdown_values.length; i++){ var act = document.createElement("option"); var actText = document.createTextNode(dropdown_values[i]); if(dropdown_values[i] == selected_action){ act.selected=true; } act.appendChild(actText); select_tag.appendChild(act); } n_action.appendChild(select_tag); n_action.className = 'dropdown_width'; n_arn.className = 'text_width'; n_btn.className = 'btn_width' document.getElementById(tab_var+'_arn').value=""; document.getElementById(tab_var+'_set_default').selected=true; } function remove_row(table_name, row_index) { document.getElementById(table_name+'_'+row_index).remove(); } function call_api() { var data = $( "form" ).serialize(); $.ajax({ type: "POST", url: '/call_policy', data: data, success: function(response){ document.getElementById('final_json').value = JSON.stringify(response, null, 4); console.log(JSON.stringify(response)); } }); }
'use strict'; var React = require('react'); var mui = require('material-ui'); var SvgIcon = mui.SvgIcon; var createClass = require('create-react-class'); var ImagePanoramaHorizontal = createClass({ displayName: 'ImagePanoramaHorizontal', render: function render() { return React.createElement( SvgIcon, this.props, React.createElement('path', { d: 'M20 6.54v10.91c-2.6-.77-5.28-1.16-8-1.16-2.72 0-5.4.39-8 1.16V6.54c2.6.77 5.28 1.16 8 1.16 2.72.01 5.4-.38 8-1.16M21.43 4c-.1 0-.2.02-.31.06C18.18 5.16 15.09 5.7 12 5.7c-3.09 0-6.18-.55-9.12-1.64-.11-.04-.22-.06-.31-.06-.34 0-.57.23-.57.63v14.75c0 .39.23.62.57.62.1 0 .2-.02.31-.06 2.94-1.1 6.03-1.64 9.12-1.64 3.09 0 6.18.55 9.12 1.64.11.04.21.06.31.06.33 0 .57-.23.57-.63V4.63c0-.4-.24-.63-.57-.63z' }) ); } }); module.exports = ImagePanoramaHorizontal;
import { useKeycloak } from '@react-keycloak/web'; import React from 'react'; import { Navigate } from 'react-router-dom'; export default function PrivateRoute({ children, roles }) { const {keycloak} = useKeycloak(); const isAuthorized = (roles) => { if (keycloak && roles) { return roles.some(r => { const realm = keycloak.hasRealmRole(r); const resource = keycloak.hasResourceRole(r); return realm || resource; }); } return false; } return isAuthorized(roles) ? children : <Navigate to={{ pathname: '/login', }} /> }
// Copyright (c) 2012 Ecma International. All rights reserved. // Ecma International makes this code available under the terms and conditions set // forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the // "Use Terms"). Any redistribution of this code must retain the above // copyright and this notice and otherwise comply with the Use Terms. /*--- es5id: 15.2.3.6-4-302 description: > Object.defineProperty - 'O' is an Arguments object, 'name' is an index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3) includes: - runTestCase.js - accessorPropertyAttributesAreCorrect.js ---*/ function testcase() { return (function () { delete arguments[0]; function getFunc() { return 10; } function setFunc(value) { this.setVerifyHelpProp = value; } Object.defineProperty(arguments, "0", { get: getFunc, set: setFunc, enumerable: false, configurable: false }); return accessorPropertyAttributesAreCorrect(arguments, "0", getFunc, setFunc, "setVerifyHelpProp", false, false); }(0, 1, 2)); } runTestCase(testcase);
import sys """ Waveform transfer main entrance, accepting arguments and transfer all waveform data into GridFS. """ def usage(): print 'python transfer.py [OPTIONS]\n\ \t -h --help\t\t\tPrint this help screen\n\ \t -i --mongodb_host\t\tMongoDB server host (default: localhost)\n\ \t -p --mongodb_port\t\tMongoDB server port (default: 27017)\n\ \t -w --waveform_path\t\tWaveform absolute path\n' def createMongoClient(mongodb_host, mongodb_port): from pymongo import MongoClient try: mongoclient = MongoClient('mongodb://' + mongodb_host + ':' + mongodb_port) mongodb = mongoclient['local'] return mongodb except pymongo.errors.ConnnectionFailure, e: print('Could not connect to MongoDB: %s' % e) sys.exit(2) def main(argv): import getopt try: opts, args = getopt.getopt(argv, "w:i:p:h", ["waveform_path=", \ "mongodb_host=", "mongodb_port=", "help"]) if not opts: usage() sys.exit(2) mongodb_host = '127.0.0.1' mongodb_port = '27017' waveform_path = '' for opt, arg in opts: if opt in ('-w', '--waveform_path'): waveform_path = arg elif opt in ('-i', '--mongodb_host'): mongodb_host = arg elif opt in ('-p', '--mongodb_port'): mongodb_port = arg elif opt in ('-h', '--help'): usage() sys.exit(2) except getopt.GetoptError: usage() sys.exit(2) if '' == waveform_path: usage() sys.exit(2) #init mongodb collection mongodb = createMongoClient(mongodb_host, mongodb_port) try: collection = mongodb['wfdisc'] except errors.CollectionInvalid, e: print('Collection %s is not valid' % e) return #create gridfs file descripter import gridfs fs = gridfs.GridFS(mongodb) from obspy.core import read cursor = collection.find() count = 0 for wf in cursor: if '2011' in wf['dir']: continue name = waveform_path + '/' + wf['dir'] + '/' + wf['dfile'] print(name) traces = read(name) for ts in traces: f = wf['dir'] + '/' + wf['dfile'] + '.' + ts.stats['channel'] print(f) #break with fs.new_file(filename=f, content_type='chunks') as fp: fp.write(ts.data) count += 1 #break print('%d files have been transfered into GridFS' % count) if __name__ == "__main__": main(sys.argv[1:])
import express from 'express'; import mongoose from 'mongoose'; import PostMessage from '../models/postMessage.js'; const router = express.Router(); export const getPosts = async (req, res) => { try { const postMessages = await PostMessage.find(); res.status(200).json(postMessages); } catch (error) { res.status(404).json({ message: error.message }); } } export const getPost = async (req, res) => { const { id } = req.params; try { const post = await PostMessage.findById(id); res.status(200).json(post); } catch (error) { res.status(404).json({ message: error.message }); } } export const createPost = async (req, res) => { const post = req.body; const newPostMessage = new PostMessage({ ...post, creator: req.userId, createdAt: new Date().toISOString()}); try { await newPostMessage.save(); res.status(201).json(newPostMessage ); } catch (error) { res.status(409).json({ message: error.message }); } } export const updatePost = async (req, res) => { const { id } = req.params; const { title, message, creator, selectedFile, tags } = req.body; if (!mongoose.Types.ObjectId.isValid(id)) return res.status(404).send(`No post with id: ${id}`); const updatedPost = { creator, title, message, tags, selectedFile, _id: id }; await PostMessage.findByIdAndUpdate(id, updatedPost, { new: true }); res.json(updatedPost); } export const deletePost = async (req, res) => { const { id } = req.params; if (!mongoose.Types.ObjectId.isValid(id)) return res.status(404).send(`No post with id: ${id}`); await PostMessage.findByIdAndRemove(id); res.json({ message: "Post deleted successfully." }); } export const likePost = async (req, res) => { const { id } = req.params; if(!req.userId) return res.json({ message: 'Unauthenticated' }); if (!mongoose.Types.ObjectId.isValid(id)) return res.status(404).send(`No post with id: ${id}`); const post = await PostMessage.findById(id); const index = post.likes.findIndex((id) => id === String(req.userId)); if(index === -1) { // like the post post.likes.push(req.userId) } else { // dislike a post post.likes = post.likes.filter((id) => id !== String(req.userId)); } const updatedPost = await PostMessage.findByIdAndUpdate(id, post, { new: true }); res.json(updatedPost); } export default router;
/*! * OpenUI5 * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(["sap/m/semantic/SemanticConfiguration","sap/ui/base/ManagedObject","sap/ui/core/Element","sap/ui/thirdparty/jquery"],function(t,e,o,r){"use strict";var n=o.extend("sap.m.semantic.SemanticControl",{metadata:{library:"sap.m",abstract:true,properties:{visible:{type:"boolean",group:"Appearance",defaultValue:true}},aggregations:{_control:{type:"sap.ui.core.Control",multiple:false,visibility:"hidden"}}}});n.prototype.setProperty=function(t,o,r){e.prototype.setProperty.call(this,t,o,true);this._applyProperty(t,o,r);return this};n.prototype.updateAggregation=function(t){this._getControl().updateAggregation(t)};n.prototype.refreshAggregation=function(t){this._getControl().refreshAggregation(t)};n.prototype.setAggregation=function(t,o,r){if(t==="_control"){return e.prototype.setAggregation.call(this,t,o,r)}return this._getControl().setAggregation(t,o,r)};n.prototype.getAggregation=function(t,o){if(t==="_control"){return e.prototype.getAggregation.call(this,t,o)}return this._getControl().getAggregation(t,o)};n.prototype.indexOfAggregation=function(t,e){return this._getControl().indexOfAggregation(t,e)};n.prototype.insertAggregation=function(t,e,o,r){return this._getControl().insertAggregation(t,e,o,r)};n.prototype.addAggregation=function(t,e,o){return this._getControl().addAggregation(t,e,o)};n.prototype.removeAggregation=function(t,e,o){return this._getControl().removeAggregation(t,e,o)};n.prototype.removeAllAggregation=function(t,e){return this._getControl().removeAllAggregation(t,e)};n.prototype.destroyAggregation=function(t,e){return this._getControl().destroyAggregation(t,e)};n.prototype.bindAggregation=function(t,e){return this._getControl().bindAggregation(t,e)};n.prototype.unbindAggregation=function(t,e){return this._getControl().unbindAggregation(t,e)};n.prototype.clone=function(t,e){var r=o.prototype.clone.apply(this,arguments);var n=this._getControl().clone(t,e);r.setAggregation("_control",n);return r};n.prototype.destroy=function(){var t=o.prototype.destroy.apply(this,arguments);if(this.getAggregation("_control")){this.getAggregation("_control").destroy()}return t};n.prototype.getPopupAnchorDomRef=function(){return this._getControl().getDomRef()};n.prototype.getDomRef=function(t){return this._getControl().getDomRef(t)};n.prototype.addEventDelegate=function(t,e){r.each(t,function(o,r){if(typeof r==="function"){var n=function(t){t.srcControl=this;r.call(e,t)}.bind(this);t[o]=n}}.bind(this));this._getControl().addEventDelegate(t,e);return this};n.prototype.removeEventDelegate=function(t){this._getControl().removeEventDelegate(t);return this};n.prototype._getConfiguration=function(){return t.getConfiguration(this.getMetadata().getName())};n.prototype._onPageStateChanged=function(t){this._updateState(t.sId)};n.prototype._updateState=function(t){if(this._getConfiguration()&&this._getControl()){var e=this._getConfiguration().states[t];if(e){this._getControl().applySettings(e)}}};n.prototype._applyProperty=function(t,e,o){var r="set"+this._capitalize(t);this._getControl()[r](e,o)};n.prototype._capitalize=function(t){return t.charAt(0).toUpperCase()+t.slice(1)};return n});
'use strict'; angular.module('inboxApp.version.interpolate-filter', []) .filter('interpolate', ['version', function(version) { return function(text) { return String(text).replace(/\%VERSION\%/mg, version); }; }]);
// @flow // Copyright (c) 2018-present, GM Cruise LLC // // This source code is licensed under the Apache License, Version 2.0, // found in the LICENSE file in the root directory of this source tree. // You may not use this file except in compliance with the License. import * as React from "react"; import type { Cone } from "../types"; import fromGeometry from "../utils/fromGeometry"; import { createInstancedGetChildrenForHitmap } from "../utils/getChildrenForHitmapDefaults"; import withRenderStateOverrides from "../utils/withRenderStateOverrides"; import Command, { type CommonCommandProps } from "./Command"; import { createCylinderGeometry } from "./Cylinders"; const { points, sideFaces, endCapFaces } = createCylinderGeometry(30, true); const cones = withRenderStateOverrides(fromGeometry(points, sideFaces.concat(endCapFaces))); const getChildrenForHitmap = createInstancedGetChildrenForHitmap(1); export default function Cones(props: { ...CommonCommandProps, children: Cone[] }) { return <Command getChildrenForHitmap={getChildrenForHitmap} {...props} reglCommand={cones} />; }