text
stringlengths
2
1.04M
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _fs = _interopRequireDefault(require("fs")); var _config = _interopRequireDefault(require("../config")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var _...
'use strict' /* global angular, chrome, moment */ var woodlot = angular.module('woodlot', []) woodlot.controller('PopupCtrl', ['$scope', ($scope) => { $scope.state = { treeActive: false, timeLeft: null, showWoodlot: false } $scope.trees = false $scope.syncTrees = () => { ...
import React, { useState, useEffect } from 'react'; import { Box, Container, makeStyles } from '@material-ui/core'; import Page from 'src/components/Page'; import Results from './Results'; import Toolbar from './Toolbar'; import { useCurrentUser, useResidency } from '../../../../states'; import useAxios from 'axios-ho...
const Promise = require('bluebird'); const validator = require('validator'); const debug = require('ghost-ignition').debug('api:canary:utils:validators:input:invitation'); const i18n = require('../../../../../../shared/i18n'); const errors = require('@tryghost/errors'); module.exports = { acceptInvitation(apiConfi...
import lodashGet from 'lodash/get'; import React, {Component} from 'react'; import {withOnyx} from 'react-native-onyx'; import PropTypes from 'prop-types'; import {View, ScrollView} from 'react-native'; import Str from 'expensify-common/lib/str'; import moment from 'moment-timezone'; import _ from 'underscore'; import ...
'use strict'; var BarracksMessenger = require('../src/index').BarracksMessenger; var fs = require('fs'); var args = {}; process.argv.forEach(function (val, index) { if (index >= 2 && index % 2 === 0) { var argName = val.substr(2); args[argName] = process.argv[index + 1]; } }); var barracksBaseUrl = args...
import React, { Component } from 'react'; import { translate } from 'react-i18next'; import { List } from 'semantic-ui-react'; import ReactJson from 'react-json-view'; class GlobalTransactionMessageErrorRAMUsage extends Component<Props> { render() { const { error, t } = this.props; const col...
import React, { Component } from 'react'; import { ResizeSensor } from 'css-element-queries'; import { Badge, Button, Spin, Popconfirm, Menu, Modal } from 'antd'; import debounce from 'lodash/debounce'; import i18n from 'i18next'; import storage from 'store/storages/localStorage'; import Wireframe from '../wireframe/W...
define(["require", "exports", "./error", "./client"], function (require, exports, error_1, client_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FrontAppError = error_1.FrontAppError; exports.FrontAppClient = client_1.FrontAppClient; });
FullCalendar.globalLocales.push(function () { 'use strict'; var cy = { code: 'cy', week: { dow: 1, // Monday is the first day of the week. doy: 4, // The week that contains Jan 4th is the first week of the year. }, buttonText: { prev: 'Blaenorol', next: 'Nesaf', today:...
/** * Copyright (c) 2017-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails oncall+i18n_fbt_js * @flow strict * @format */ module.exports = { docs: { 'Getting started': [ 'getting_started...
const clean = require("./clean.js"); const Bundler = require("parcel-bundler"); const minify = require('minify'); const fs = require("fs-extra"); const process = require('process'); const bundler = new Bundler("./src/app.js", { minify: false, watch: false, contentHash: false, sourceMaps: false }); const onlyF...
//>>built define( "dojo/cldr/nls/om/number", //begin v1.x content { "currencyFormat": "¤#,##0.00" } //end v1.x content );
const MessageUtils = require('../common/MessageUtils'); test('error message', () => { expect(MessageUtils.getStatusCode('error 401')).toBe('401'); expect(MessageUtils.getStatusCode('error')).toBe('error'); });
import React from 'react' import {Sparklines, SparklinesLine, SparklinesReferenceLine} from 'react-sparklines'; import _ from 'lodash'; function average(data) { return _.round(_.sum(data)/data.length); } export default (props) => { return ( <div> <Sparklines height={120} width={180} data={...
/** * * Worker Model * */ export default class Worker { /** * * Singleton map of all worker functions assigned to queue. * */ static workers = {}; /** * * Assign a worker function to the queue. * * Worker will be called to execute jobs associated with jobName. * * Worker funct...
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(ta...
import { calculateCost } from "../libs/billing-lib"; test("Lowest tier", () => { const storage = 10; const expectedCost = 4000; const cost = calculateCost(storage); expect(cost).toEqual(expectedCost); }); test("Middle tier", () => { const storage = 100; const expectedCost = 20000; const cost = calcul...
var React = require('react'); var request = require('superagent'); var RSVPStore = require('../stores/RSVPStore'); var AttendingApp = React.createClass({ getInitialState: function() { return { isReady: RSVPStore.isLoaded(), attendees: RSVPStore.getAttendees() }; }, componentDidMount: function() { RSVP...
/*! jQuery UI - v1.9.2 - 2017-10-08 * http://jqueryui.com * Copyright jQuery Foundation and other contributors; Licensed MIT */ jQuery(function(t){t.datepicker.regional["cy-GB"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorf...
/* eslint-disable no-param-reassign */ const recursive = (fn, acc, [head, ...tail]) => { if (head === undefined) { return acc } return recursive(fn, fn(acc, head), tail) } // iterable :: ([Number], fn) -> [Number] const imperative = (fn, acc, arr) => { for (let i = 0; i < arr.length; i++) { acc = fn(...
/** * promiseify factory */ /* eslint no-var: off */ var pifyFactory = function (executor) { return function promiseify(m, ctx) { if (typeof m !== 'function') throw new Error(String(m) + ' is not a function') return function () { let args = [].slice.call(arguments) let _ctx = ctx || this // d...
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; //component - CoreUI / CButtonToolbar var CButtonToolbar = ...
var options = { keepHistory: 1000 * 60 * 5, localSearch: true }; var fields = ['name']; ChannelSearch = new SearchSource('channels', fields, options); Template.explore.onRendered(function () { ChannelSearch.search(''); }); Template.explore.helpers({ user: function () { if (Meteor.userId()) {...
function Cell(r, c) { this.c = c; this.r = r; this.walls = [true, true, true, true]; this.visited = false; this.neighbors = []; this.cost = 0; this.show = function(s, c) { // debugger; let w = size; let x = this.c * w; let y = this.r * w; stroke(c); // strokeCap(PROJECT); str...
// Check viewport of container, rahter its tablet or phone function checkSize() { if ($(".responsive-tablet").css("float") == "none" ){ // you're on media query tablet resized viewport } if ($(".responsive-phone").css("float") == "none" ){ // you're on media query phone resized viewport } }; $(d...
import React from 'react'; import { Route, Redirect } from 'react-router-dom'; import PropTypes from "prop-types"; import { Layout } from 'antd'; import { useSelector } from "react-redux"; import { isLoggedIn } from "@ducks/auth"; import Main from '../Main'; import { Navbar, PageFooter } from '@components' const Priv...
// COPYRIGHT © 2020 Esri // // All rights reserved under the copyright laws of the United States // and applicable international laws, treaties, and conventions. // // This material is licensed for use under the Esri Master License // Agreement (MLA), and is bound by the terms of that agreement. // You may redistribute...
var mysql = require('mysql'); var connMySQL = function(){ console.log('conexao com bd estabelecida'); return mysql.createConnection({ host: 'localhost', user: 'root', password : '', database: 'portal_noticias' }); } module.exports = function(){ //console.log('autoload ca...
$(document).ready(function(){ var items = $('#stage li'), itemsByTags = {}; // Looping though all the li items: items.each(function(i){ var elem = $(this), tags = elem.data('tags').split(','); // Adding a data-id attribute. Required by the Quicksan...
import gulp from 'gulp'; import { Server } from 'karma'; import config from './config'; gulp.task('tdd', done => { new Server({ configFile: config.karmaConfigPath }, done).start(); });
/** * playlists api main routes * @param {init} handler to handle the routes * @return {array} the routes for api */ const routes = (handler) => [ { method: 'POST', path: '/collaborations', handler: handler.postCollaborationHandler, options: { auth: 'openmusic_jwt', }, }, { metho...
import PropTypes from 'prop-types'; export const User = PropTypes.shape({ id: PropTypes.string, email: PropTypes.string, name: PropTypes.string.isRequired, avatar: PropTypes.string, }); export const Auth = PropTypes.shape({ user: User, }); export const Location = PropTypes.shape({ id: PropTypes.string, ...
// //client connect to tcp server localhost 8001 // let fs = require('fs') // let jot = require('json-over-tcp') // let co = require('co') // let chokidar = require('chokidar') // let path = require('path') // let cwd = process.cwd() // const PORT = 8001 // const HTTPPORT = 8000 // let http = require('http') // let arg...
import { storiesOf } from '@storybook/vue'; import Button from 'components/Button'; import Demo from 'stories/demo'; import * as SvgIcons from 'stories/svg'; const IconButton = Button.Icon; const ButtonGroup = Button.Group; const ButtonToolbar = Button.Toolbar; const stories = storiesOf('General|Button.Icon', module...
/** * @flow */ 'use strict'; import type { PackageContentType, ReplacementsType } from '../types'; const path = require('path'); const fse = require('fs-extra'); class Package { pkgPath: string; dirPath: string; content: PackageContentType | null; constructor(filePath: string) { this.pkgPath = pat...
/* * Test Steps Explained * ==================== * * Initializing hooks: * * We initialize 3 hooks. For hook2 and hook3 we register a callback for the * "before" and in case of hook3 also for the "after" invocations. * * Enabling hooks initially: * * We only enable hook1 and hook3 initially. * * En...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.statesMatch = exports.State = void 0; const lib_1 = require("./lib"); class State { constructor(stateDef) { this.name = "default"; this.tags = []; const pieces = stateDef.split(/\s+/g); const states ...
d3.json('samples.json').then(function ({ names, metadata, samples }) { names.forEach(name => { d3.select('select').append('option').text(name); }); showCharts(); }); function optionChanged() { showCharts(); }; function showCharts(){ d3.json('samples.json').then(({metadata,samples})=>{ ...
/* Operador Spread - muito utilizado nos frameworks - React | Vue | Angular - usado para complementar alguma coisa, ou seja, já tenho itens e vou adicionar mais. - importante sempre adicionar antes do nome da variavel os 3 pontos ... - muito usado em funções */ // Exemplo em Array let numeros = [1...
import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('delete-button', 'Integration | Component | delete button', { integration: true }); test('it renders', function(assert) { // Set any properties with this.set('myProperty', 'value'); // Handle...
function check(str, bracketsConfig) { let resault = []; let reversBrecket; function reversItem(item){ for(let i=0; i<bracketsConfig.length;i++){ let itemTemp = bracketsConfig[i].indexOf(item); if(itemTemp!=-1){ if(itemTemp==0){ return bracketsConfig[i][1]; } ...
import React from "react" import SocialLinks from "../constants/socialLinks" const Footer = () => { return ( <footer className="footer"> <div> <SocialLinks styleClass="footer-links"> </SocialLinks> <h4>copyright&copy;{new Date().getFullYear()} <span>Iyad Barakat</span> all r...
let _Op = (function(){ 'bpo disable'; return { add(a, b) { if((typeof(a)=='number' && typeof(b)=='number') || (typeof(a)=='bigint' && typeof(b)=='bigint')) return a+b; if(globalThis.pyodide?.isPyProxy){ if(pyodide.isPyProxy(a)){ return a.__add__(b); }else if(pyodide.isPyProxy(b)){ return b.__radd__...
/** * jQuery plugin for Pretty looking right click context menupretty. * * Requires popup.js and popup.css to be included in your page. And jQuery, obviously. * * Usage: * * $('.something').contextPopup({ * title: 'Some title', * items: [ * {label:'My Item', icon:'/some/icon1.png', action:func...
'use strict'; const mongoose = require('mongoose'); const nameValidator = require('../validators/name'); const schema = mongoose.Schema({ owner: { type: String, required: true }, name: { type: String, required: true, validate: nameValidator, trim: true }, shortName: { type: String, required: true }, d...
#! /usr/bin/env node const shell = require('./shellHelpers') const [task] = process.argv.slice(2) const processExit = (err, code) => { if (err) { process.exit(1) } process.exit(code) } const setEnv = (env) => `cross-env NODE_ENV=${env}` // // execute a single shell command // shell.exec('node', fu...
var _ = require('underscore'), React = require('react'), moment = require('moment'); var lastId = 0; function newItem(value) { lastId++; return { key: 'i' + lastId, value: value, picker: null }; } module.exports = { // set default properties getDefaultProps: function() { return { format: 'YYYY-MM-DD', ...
import React from 'react' import * as Tone from 'tone' const BitCrusherInsert = ({recorder, player}) => { const crusher = new Tone.BitCrusher(4).connect(recorder).toDestination(); const bitCrush = (event) => { event.preventDefault() player.connect(crusher) } const noCrush = (event) => { event.pre...
/** * Copyright IBM Corp. 2019, 2020 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. * * Code generated by @carbon/icon-build-helpers. DO NOT EDIT. */ 'use strict'; var Icon = require('../Icon-399ca71f.js'); var React = require...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.zoomInOutline = void 0; var zoomInOutline = { "viewBox": "0 0 24 24", "children": [{ "name": "path", "attribs": { "d": "M13 11h-2v-2c0-.275-.225-.5-.5-.5s-.5.225-.5.5v2h-2c-.275 0-.5.225-.5.5s.225.5.5.5h2v2c0 .275....
export const metadataSelector = state => { return { metadata: state.notebook.get('metadata'), undoSize: state.notebook.get('undoStack').size }; }; export const contentSelector = state => { return { content: state.notebook.get('content').map( num => state.notebook.getIn([...
'use strict'; angular.module('meanbaseApp') .controller('MissingCtrl', function ($scope) { });
import store from './store/index'; import Login from './components/Login.vue'; import Register from './components/Register.vue'; import Upload from './components/Upload.vue'; import Dashboard from './components/Dashboard.vue'; import Uploads from './components/Uploads.vue'; import Logout from './components/Logout.vue'...
import React, { useState, useEffect } from 'react'; import { Feather } from '@expo/vector-icons'; import { useNavigation } from '@react-navigation/native'; import { View, FlatList, Image, Text, TouchableOpacity } from 'react-native'; import api from '../../services/api'; import logoImg from '../../assets/logo.png'; ...
import { Factory, trait } from 'miragejs'; import faker from 'faker'; export default Factory.extend({ title: () => faker.company.catchPhrase(), barcode: () => Math.floor(Math.random() * 9000000000000) + 1000000000000, instanceId: () => faker.random.uuid(), callNumber: () => Math.floor(Math.random() * 90000000)...
const mix = require('laravel-mix'); /* |-------------------------------------------------------------------------- | Mix Asset Management |-------------------------------------------------------------------------- | | Mix provides a clean, fluent API for defining some Webpack build steps | for your Laravel appli...
define([ 'jquery', 'plugins/colorbox/jquery.colorbox', 'css!plugins/colorbox/css/colorbox' ], function($) { return { initialize : function(callback) { $.colorbox.settings.className = 'dcf-main'; $(callback); } }; });
/** * Copyright (c) 2018-2020 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ import { __awaiter, __generator } from "tslib"; import { ModelCrossLinkRestraint } from './format'; import { Bond } from '../../../mol-model/structure'; im...
// ----------------------------------------------------- // // This file is so users can modify how the page acts // without diving to deep in the code. This way we can // also try out or hold custom code for ourselves and // not check it into the repo. // // There is a div id'ed as plane_extension for use with // thi...
/** * @fileoverview Different states for the main UI * @author schnaufer@arizona.edu (Chris Schnaufer) */ /** * The different states */ let states = { main_menu: 1, data_files: 20, workflow_image: 30, algorithm_rgb_plot: 100, } export default states;
// source: trade.proto /** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-p...
exports.up = function (knex) { return knex.schema.createTable("notes", (table) => { table.increments("id"); table.string("details"); table.integer("user_id").unsigned(); table.foreign("user_id").references("users.id"); table.integer("customer_id").unsigned(); table.foreign("customer_id").references("custo...
let createTargetArray = (nums, index) => { let target = [], len = nums.length; for (let i = 0; i < len; i++){ let idx = index[i], value = nums[i], slice = target.splice(idx); // Push and add slice back. target.push(value); target = targe...
'use strict' const fs = require('fs') const got = require('got') const url = 'https://raw.githubusercontent.com/bukinoshita/Names/master/Names/en-male.txt' got(url).then(res => { fs.writeFileSync('male-names.txt', res.body.trim()) }).catch(err => { console.error(err) process.exit(1) // eslint-disable-line unic...
/* Copyright (c) 2014 Damian Kołakowski. All rights reserved. Redistribution and use in source and binary forms are permitted provided that the above copyright notice and this paragraph are duplicated in all such forms and that any documentation, advertising materials, and other materials related to such distribution ...
export default [ 'BTC', 'BTC (SMS-Protected)', 'BTC (Multisig)', 'ETH', 'SWAP', 'HDP', 'USDT', 'MSK', 'RURCASH', 'USDSWIFT', ]
const DrawCard = require('../../drawcard.js'); class KatanaOfFire extends DrawCard { setupCardAbilities(ability) { this.whileAttached({ effect: ability.effects.modifyMilitarySkill(() => this.totalKatanaModifier()) }); } canPlay(context) { if(!this.controller.cardsInPlay...
function typedError(name, defaults) { defaults = defaults || {} var e = function TypedError(message, inner) { if (!(this instanceof TypedError)) { return new TypedError(message, inner); } var err = new Error(); var self = this; var stack Object.defineProperty(this, 'stack', { ...
"use strict"; // Copyright 2012 United States Government, as represented by the Secretary of Defense, Under // Secretary of Defense (Personnel & Readiness). // // 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 o...
/* * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable. */ L.Handler.MarkerDrag = L.Handler.extend({ initialize: function (marker) { this._marker = marker; }, addHooks: function () { var icon = this._marker._icon; if (!this._draggable) { this._draggable = new L.Draggable(...
require("dotenv").config({ path: `.env.${process.env.NODE_ENV}` }) module.exports = { siteMetadata: { title: `LearnCode Online React Project`, description: `A React project that brushes the core concepts of web development`, author: `@gatsbyjs`, }, plugins: [ `gatsby-plugin-react-helmet`, { ...
import React from 'react'; import { useSelector, useDispatch } from 'react-redux'; import { Redirect } from 'react-router-dom'; import Box from '@material-ui/core/Box'; import CircularProgress from '@material-ui/core/CircularProgress'; import Container from '@material-ui/core/Container'; import Typography from '@materi...
export default "M1 7L3 17H5L7 7H5L4 12L3 7H1M12 7V9H11V15H12V17H8V15H9V9H8V7H12M17 7V9H16V15H17V17H13V15H14V9H13V7H17M22 7V9H21V15H22V17H18V15H19V9H18V7H22Z"
define([ 'common/views/visualisations/volumetrics/number' ], function (NumberView) { return NumberView.extend({ valueAttr: 'avgresponse', labelPrefix: 'mean ', formatOptions: { type: 'duration', unit: 's' }, formatValue: function (value) { if (value === null) { retur...
"use strict"; var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard"); var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.PhoneVolumeDimensions = exports.PhoneVolume = void 0; v...
/*! * Bootstrap v4.0.0-beta.2 (https://getbootstrap.com) * Copyright 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ var bootstrap = (function(exports, $) { "use strict"; $ = $ && $.hasOw...
import React, { Fragment } from "react" import Header from "../common/Header" import Footer from "../common/Footer" import speakers from "../../assets/img/speakers.jpg"; import { FacebookShareButton, TwitterShareButton, WhatsappShareButton, FacebookIcon, TwitterIcon, WhatsappIcon, } from "react-share" co...
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o]...
 // variable used for cross site CSOM calls var context; // peoplePicker variable needs to be globally scoped as the generated html contains JS that will call into functions of this class var peoplePicker; var csomPeoplePicker; //Wait for the page to load $(document).ready(function () { //Get the URI decoded Sha...
rs.initiate( { _id: "shard", members: [ { _id : 0, host : "127.0.0.1:27011" } ] } )
import OrchestraRouter from 'OpenOrchestra/Application/Router/OrchestraRouter' import Application from 'OpenOrchestra/Application/Application' import FormBuilder from 'OpenOrchestra/Service/Form/Model/FormBuilder' import Redirections from 'OpenOrchestra/Application/Collection/Redirection/Redi...
/* eslint max-nested-callbacks: ['error', 8] */ /* eslint-env mocha */ 'use strict' const expect = require('chai').expect const runOnAndOff = require('../utils/on-and-off') describe('bootstrap', () => runOnAndOff((thing) => { let ipfs before(() => { ipfs = thing.ipfs }) const defaultList = [ '/ip4/1...
import '@left4code/tw-starter/dist/js/svg-loader' import '@left4code/tw-starter/dist/js/accordion' import '@left4code/tw-starter/dist/js/alert' import '@left4code/tw-starter/dist/js/dropdown' import '@left4code/tw-starter/dist/js/modal' import '@left4code/tw-starter/dist/js/tab'
module.exports = new Date(2009, 8, 20)
/*recursion function (repeatedly calls itself until asked to stop) function recuFunc (param) { recuFunc(param) } function recuFuncOne(param) { recuFunctionTwo(param) } function recuFunctionTwo(param) { recuFuncOne(param) } must have a stopping point otherwise will continue forever which is called base ...
import Position from '../src/position'; describe('Position', () => { test('add', () => { const position1 = new Position(1, 2); const position2 = new Position(2, 3); const sum = position1.add(position2); expect(sum.x).toEqual(3); expect(sum.y).toEqual(5); }); test('mul', () => { const position = new Pos...
export default { init() { // JavaScript to be fired on all pages }, finalize() { // JavaScript to be fired on all pages, after page specific JS is fired }, };
// import Text from '../index'; import expect from 'expect'; // import { shallow } from 'enzyme'; // import React from 'react'; describe('<Text />', () => { it('Expect to have unit tests specified', () => { expect(true).toEqual(false); }); });
import React, {useState} from 'react'; //pass in books from bookshelf function BookForm(props) { const [title, setTitle] = useState(''); const titleChangeHandler = () =>{ console.log(titleChangeHandler); } console.log(title) return ( <form> <div> <label> ...
import { setupTest } from 'ember-qunit'; import { module, test } from 'qunit'; import setupMirage from '../helpers/setup-mirage'; import fetch from 'fetch'; module('Mirage | Categories', function(hooks) { setupTest(hooks); setupMirage(hooks); module('GET /api/v1/categories', function() { test('empty case',...
const isJest = process.env.NODE_ENV === "test"; module.exports = { presets: ["@babel/typescript"], plugins: [ "ts-nameof", "@babel/proposal-class-properties", "@babel/proposal-object-rest-spread", "@babel/proposal-optional-catch-binding", isJest && "@babel/transform-modules-commonjs" ].filter...
function solution(str) { let ret = []; if (str) { for (let i = 0; i < str.length; i++) { ret.push(str[str.length - 1 - i]); } } return ret.join(''); }
/** * Module dependencies. */ var debug = require('debug')('socket.io-parser'); var Emitter = require('component-emitter'); var hasBin = require('has-binary2'); var binary = require('./binary'); var isArray = require('isarray'); var isBuf = require('./is-buffer'); /** * Protocol version. * * @api public */ exp...
import Vue from 'vue'; import VueRouter from 'vue-router'; Vue.use(VueRouter); let myRouter = []; // 用户模块 import user from "./user" user.forEach(function (obj) { myRouter.push(obj); }); // 工资模块 import wage from "./wage" wage.forEach(function (obj) { myRouter.push(obj); }); export default new VueRouter(...
// Generated by CoffeeScript 1.5.0 (function() { var module; module = angular.module('swing.directives.textfield'); module.directive("blurOnEnter", function() { return { restrict: 'A', link: function(scope, element, attrs) { var jqElement; if (attrs.type === 'radio' || attrs.type...
const buttonSearch = document.querySelector('#page-home main a'); const modal = document.querySelector('#modal'); const close = document.querySelector('#modal .header a'); buttonSearch.addEventListener('click', () => { modal.classList.remove('hide'); }) close.addEventListener('click', () => { modal.classList....
"use strict"; console.log("background: LOAD"); chrome.browserAction.onClicked.addListener(function(activeTab){ chrome.tabs.create({ url: chrome.extension.getURL('start.html') }); }); var connections = {}; chrome.runtime.onConnect.addListener(function (port) { console.log("background-script onConnect", port)...
import { configureStore } from '@reduxjs/toolkit'; import { user, message } from './reducers/authReducer'; import { slots } from './reducers/timeSlotReducer'; import { loading } from './reducers/loadingReducer'; const store = configureStore({ reducer: { user, message, slots, loading, }, }); export...
/** * 防抖函数 * @param {Function} fn 函数 * @param {Number} delay 指定时间间隔 * @returns {Function} */ function debounce(fn, delay) { let timer return (...args) => { if (timer) { clearTimeout(timer) } timer = setTimeout(() => { fn.apply(this, args) }, delay) } } export default debounce