text
stringlengths
2
1.05M
// @flow import { createEnvironment } from '../index'; const getOperation = (reference: mixed) => { return import(`./src/__generated__/${reference}`); }; module.exports = ({ validMinimalUsage: () => { return createEnvironment({ fetchFn: () => false, }); }, withOperationLoader: () => { retur...
// DO NOT EDIT! This test has been generated by /offscreen-canvas/tools/gentest.py. // OffscreenCanvas test in a worker:2d.fillStyle.parse.css-color-4-hsl-7 // Description: // Note:<p class="notes"> importScripts("/resources/testharness.js"); importScripts("/2dcontext/resources/canvas-tests.js"); var t = async_test("...
/* * WRI Restoration Marketplace API * ### About This API serves the web and mobile apps for WRI's Restoration Marketplace (AKA TerraMatch). ### Authentication & Authorisation JWTs are used for authentication. Upon successful log in a JWT will be provided for you. These expire after 12 hours. A padlock icon next ...
(function( $ ) { 'use strict'; /** * (en)PreferenceService * @ko PreferenceService * @group Service * @name PreferenceService * @class */ pinpointApp.constant('PreferenceServiceConfig', { names: { favorite: "preference.favorite" }, defaults: { callee: 1, caller: 1, period: "5m" }, ...
import CompanyCreateWarehouse from "views/Companies/CompanyCreateWarehouse.jsx"; import CompanyIndex from "views/Companies/CompanyIndex.jsx"; import CompanyWarehouse from "views/Companies/CompanyWarehouse.jsx"; import companyAddProductWarehouse from "views/Companies/companyAddProductWarehouse.jsx"; import CompanyProfi...
/* This matcher makes it easier to write tests against Datadog metrics by providing the `toHaveSentMetrics` matcher. Examples: it('makes sure a metric of a certain type and name was sent', async () => { await expect(async () => { await someCode() }).toHaveSentMetrics({ name: 'jira-integration.my-metric',...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
"use strict"; var path = require("path"); var shell = require('shelljs'); var assert = require('assert'); var helper = require("../helper.js"); var extKey = 'aa39b5490c4a4ed0e56d7ec1232a428f7ad78ebb7347db3fc9875cb10c2bce39bbf8aabacf9e00420afb580b15698c04ce10d659d1972ebc53e76b6bbae0c113bee1e23062800bc830e4c329ca913fefeb...
/** * Service for todo operations. */ 'use strict'; const mongoose = require('mongoose'), TODO = mongoose.model('todos'); /** * Returns an array of todo object matching the search parameters. * * @param {Object} params {Search parameters} */ exports.search = function (params) { const promise = TODO.find...
import defaultStyleOptions from './defaultStyleOptions'; // TODO: [P4] We should add a notice for people who want to use "styleSet" instead of "styleOptions". // "styleSet" is actually CSS stylesheet and it is based on the DOM tree. // DOM tree may change from time to time, thus, maintaining "styleSet" bec...
const Sequelize = require('sequelize'); const sequelize = require('../util/database'); const User = sequelize.define('user', { id: { type: Sequelize.INTEGER, autoIncrement: true, primaryKey: true, allowNull: false, }, name: { type: Sequelize.TEXT, allowNull: false, }, email: { ...
const averageScore = (score1, score2, score3) => (score1 + score2 + score3)/3; function checkWinner (score1, score2) { if (score1 > score2) console.log(`Dolphins won with an average score of ${score1}`); else if (score2 > score1) console.log(`Koalas won with an average score of ${score2}`); else if (score1...
(window.webpackJsonp=window.webpackJsonp||[]).push([[1212],{2507:function(s,t,a){"use strict";a.r(t);var e=a(18),r=Object(e.a)({},(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[a("h1",{attrs:{id:"pilotpi-使用-ubuntu-server-操作系统"}},[a("a...
import Vue from 'vue'; window.vmenu = new Vue({ el: '#menu', data: { activeMenu: [], }, mounted: function () { this.$nextTick(function () { }); } });
import * as utils from 'src/utils'; import { registerBidder } from 'src/adapters/bidderFactory'; import { config } from 'src/config'; import { Renderer } from '../src/Renderer'; function getTopFrame() { try { return window.top === window ? 1 : 0; } catch (e) { return 0; } } function startsWith(str, sear...
// 解法一 function sortColors(nums) { for (let i = 0, N = nums.length; i < N; i++) { for (let j = i + 1; j < N; j++) { nums[i] ^= nums[j] nums[j] ^= nums[i] nums[i] ^= nums[j] } } } // 解法二 function sortColors(nums) { const color = [0, 0, 0] const index = 0 for (let i = 0; i < nums.len...
export const months = [ { value: 'jan', label: 'January', }, { value: 'feb', label: 'February', }, { value: 'mar', label: 'March', }, { value: 'apr', label: 'April', }, { value: 'may', label: 'May', }, { value: 'jun', label: 'June', }, { valu...
import React from "react"; import { Link } from "react-router"; import Rating from "../components/Rating"; // Show products components export default (props) => { let limitTo = props.itemLimit; return ( <div class="article-container"> {props.searchProducts.map((item, i) => { ...
module.exports = { bundledSetState:` key: 'handleDelete', value: function handleDelete(index) { this.setState({ items: this.state.items.filter(function (item, i) { return i !== index; }) }); }, (0, _reactDom.render)(_react2.default.createElement( Frame, null, _react2.default.createElemen...
// Compiled by ClojureScript 1.9.908 {} goog.provide('cljs.spec.alpha'); goog.require('cljs.core'); goog.require('goog.object'); goog.require('cljs.core'); goog.require('clojure.walk'); goog.require('cljs.spec.gen.alpha'); goog.require('clojure.string'); cljs.spec.alpha.MAX_INT = (9007199254740991); /** * A soft limit...
module.exports = CachingRegistryClient var path = require('path') var fs = require('graceful-fs') var url = require('url') var assert = require('assert') var inherits = require('util').inherits var RegistryClient = require('npm-registry-client') var npm = require('../npm.js') var log = require('npmlog') var getCacheS...
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ /* vim: set ts=2 et sw=2 tw=80: */ /************************************************************* * * MathJax/jax/output/HTML-CSS/autoload/mtable.js * * Implements the HTML-CSS output for <mtable> elements. * * ---------------...
/**. * User: Matthieu Holzer * Date: 11.09.12 * Time: 17:41 */ define(['jquery', 'lib/jquery.reveal'], function ($) { //http://www.zurb.com/playground/reveal-modal-plugin var reveal = function ($el, options) { $el.css('display', 'block').reveal( { animat...
import React from 'react'; import PropTypes from 'prop-types'; export default function ReferralLink({ link }) { return ( <div className="setting last"> <div className="setting-title">Your Referral Link</div> <div className="copy-wrapper"> <div className="copy-text">{link}</div> <a hre...
import React, { Component } from 'react'; import { TabContent, TabPane, Nav, NavItem, NavLink } from 'reactstrap'; import classnames from 'classnames'; class Tabs extends Component { constructor(props) { super(props); this.toggle = this.toggle.bind(this); this.state = { activeTab: '1', }; }...
"use strict"; /* * ATTENTION: An "eval-source-map" devtool has been used. * This devtool is neither made for production nor for readable output files. * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. * If you are trying to read the output file, select a dif...
import { writeFileSync } from 'fs'; import { join, posix } from 'path'; import { fileURLToPath } from 'url'; import esbuild from 'esbuild'; /** * @typedef {import('esbuild').BuildOptions} BuildOptions */ const ssrFunctionRoute = '/api/__render'; /** * Validate the static web app configuration does not override th...
import gql from 'graphql-tag'; export const GET_GEOJSON = gql` query geojson($countryList: [String]!) { geojson(countryList: $countryList) { features regions { name emoji visited } budget } } `;
describe("lib/init/watcher", () => { test.todo(""); });
import React from 'react'; import ReactDOM from 'react-dom'; import { BrowserRouter } from 'react-router-dom'; import LoginRoute from '../routes/DashboardRoute'; describe('Login Route', () => { it('renders without crashing', () => { const div = document.createElement('root'); ReactDOM.render( <BrowserR...
// ==UserScript== // @name Stack Exchange CV Request Generator // @namespace https://github.com/SO-Close-Vote-Reviewers/ // @version 1.6.11 // @description This script generates formatted close vote requests and sends them to a specified chat room. // @author @TinyGiant // @contributor ...
/* eslint-env browser */ /* eslint-disable no-undef, no-use-before-define, new-cap */ const URL = window.URL || window.webkitURL; module.exports = (content, workerConstructor, workerOptions, url) => { try { try { let blob; try { // New API blob = new window.Blob([content]); } ...
import React, { Component } from 'react' import Layout from '../../components/Layout/index'; import { FormControl, FormLabel, Input, FormErrorMessage, Flex, Text, Button } from "@chakra-ui/core"; import { Formik, Field } from "formik"; import { toast } from 'react-toastify'; import { Link,...
import Vector from 'utils/math/Vector'; const hasPosition = function hasPositionFunc(state) { const pos = new Vector(); function setPosition({ x: xp, y: yp }) { pos.x = xp; pos.y = yp; return pos.clone(); } function setX(xp) { state.setPosition(new Vector(xp, pos.y)); ...
/** * Content is a formal component important content roots but is not itself being rendered. */ export default "*CONTENT";
import EmberObject from '@ember/object'; import { run } from '@ember/runloop'; import { module, test } from 'qunit'; import DS from 'ember-data'; import { setupTest } from 'ember-qunit'; import testInDebug from '@ember-data/unpublished-test-infra/test-support/test-in-debug'; module('unit/store/peekRecord - Store pe...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _VCheckbox = require("./VCheckbox"); Object.keys(_VCheckbox).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _VCheckbox[key]) return; Object.defineProperty(e...
(function ($) { // // Search var $searchWrap = $('.search-form-wrap'), isSearchAnim = false, searchAnimDuration = 200; var startSearchAnim = function () { isSearchAnim = true; }; var stopSearchAnim = function (callback) { setTimeout(function () { isSearchAnim = false; callback ...
/*! Copyright 2014 Amazon Digital Services, Inc. All rights reserved. */ UserExperienceServiceProxy=(function(){var a=function(){var c="https://ags-ext.amazon.com/services/ux/v1/";var b=1;this["getMyFriendProfiles"]=function(f){console.log("UserExperienceServiceProxy: getMyFriendProfiles");var d=$.Deferred();var e=[{ty...
describe('Data Access Groups (DAGs)', () => { before(() => { cy.set_user_type('standard') cy.mysql_db('projects/pristine') }) describe('User Interface', () => { before(() => { cy.set_user_type('admin') cy.visit_version({page: 'DataAccessGroups/index.php', params: 'pid=1'}) }) it('Should have th...
module.exports = require('../construct/_index.ts').default
angular.module('juiceShop').factory('ComplaintService', ['$http', function ($http) { 'use strict' var host = '/api/Complaints' function save (params) { return $http.post(host + '/', params) } return { save: save } }])
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototyp...
/*! * JSRT JavaScript Library 0.2.1 * lico.atom@gmail.com * * Copyright 2008, 2014 Atom Union, Inc. * Released under the MIT license * * Date: 2014年10月13日 */ $import("js.util.Arrays", "BootstrapClassLoader"); Class .forName({ name: "class js.text.DateFormatSymbols extends Object", /** * Constr...
module.exports = { name: '', //This is the user input parameter ie. {perfix}ping = !ping , response pong description: '', //Allows for a dynamic description of the command execute(message, args) { //code message.channel.send('Pong.'); }, };
import find from 'lodash/find'; import Base from './base.class'; import { SSL_MODE_REQUIRED, SSL_MODE_NA, SSL_MODE_SSL_TLS, } from './databases.constants'; import { ENGINES_NAMES } from './engines.constants'; export default class Database extends Base { constructor({ createdAt, plan, id, stat...
/** * Kendo UI v2017.3.1026 (http://www.telerik.com/kendo-ui) * Copyright 2017 Telerik AD. All rights reserved. ...
import { ChooserModalOnloadHandlerFactory } from '../../includes/chooserModal'; window.SNIPPET_CHOOSER_MODAL_ONLOAD_HANDLERS = new ChooserModalOnloadHandlerFactory({ chosenResponseName: 'snippetChosen', }).getOnLoadHandlers();
var loginPopupTimer = null; var loginPopupTime = 1000*20; //20sec var autoLogoutTimer = null; var autoLogoutTime = 1000*60*5 //5min var loggedIn = false; var authenticatedUser = null; $('.sidebar').on('click', '.btnSetStatus', function(){checkSession(loadChangeStatus)}); $('.sidebar').on('click', '.btnChangeContent', ...
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] =...
/* * (c) 2011-2019 Corporate Web Solutions Ltd. * All client side / JavaScript code may not be used in any way without a valid JSCharting license. * To license JSCharting for your own use, please visit www.JSCharting.com * */ JSC.maps()['sa_s']={"type":"Topology","transform":{"scale":[0.21152845915888313,0.17609717708...
'use strict'; var NAMESPACE = 'am'; var setNamespace = function(className) { return (NAMESPACE ? NAMESPACE + '-' : '') + className; }; module.exports = { NAMESPACE: NAMESPACE, CLASSES: { active: setNamespace('active'), disabled: setNamespace('disabled'), round: setNamespace('round'), radius: se...
'use strict'; module.exports = { up: async (queryInterface, Sequelize) => { return queryInterface.bulkInsert('productsCollections', [{ productId: 3, collectionId: 2, createdAt: new Date(), updatedAt: new Date() }]); }, down: async (queryInterface, Sequelize) => { return query...
import React, { Component } from "react"; import { Link } from "react-router-dom"; import './styles.css'; class Header extends Component { render() { return ( <nav className="navbar navbar-default navbar-static-top navbar--bordered" role="navigation" > <h1 className="nav__h...
"use strict"; let router = require('express').Router(); router.get('/', (req, res, next)=>{ res.status(200).send('Inventory Microservice'); }); module.exports = router;
import size from 'lodash/fp/size'; import toLower from 'lodash/fp/toLower'; import flow from 'lodash/fp/flow'; // eslint-disable-next-line import/prefer-default-export export const buildParticipantsList = participants => { if (size(participants) === 0) return null; if (size(participants) === 1) { return parti...
import React from "react"; import { render } from "@testing-library/react"; import { shallow } from "enzyme"; import Container from "../Container"; it("renders without crashing", () => { const div = document.createElement("div"); render(<Container />, div); });
/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ '...
import typescript from '@rollup/plugin-typescript'; import { terser } from 'rollup-plugin-terser'; export default { input: './src/app.ts', output: { dir: '.', format: 'iife', name: 'banglerun' }, plugins: [ typescript(), terser(), ] };
'use strict'; const FirebaseSupport = { init: function(log) { return $.getJSON('firebase-configuration.json', function(firebaseConfiguration) { if (firebase) { firebase.initializeApp(firebaseConfiguration); if ('serviceWorker' in navigator) { window.addEventListener('load', functi...
/** * Copyright 2016 The AMP HTML Authors. 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 require...
mycallback( {"CONTRIBUTOR OCCUPATION": "Diagnostic Radiologist", "CONTRIBUTION AMOUNT (F3L Bundled)": "500.00", "ELECTION CODE": "", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "RSI", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "2708 Legacy Ct", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID": "", "DONOR ...
function palindrome(str) { //lowercase the string and use a regular expression to remove unwanted characters var re = /[^A-Za-z0–9]/g; var reverseStr = lowRegStr.split('').reverse().join(''); return reverseStr === lowRegStr; } palindrome("tacocat");
/* * Toastr * Copyright 2012-2014 John Papa and Hans Fjällemark. * All Rights Reserved. * Use, reproduction, distribution, and modification of this code is subject to the terms and * conditions of the MIT license, available at http://www.opensource.org/licenses/mit-license.php * * Author: John Papa and Hans Fjäl...
'use strict'; const readline = require('readline'); const input = readline.createInterface(process.stdin, process.stdout, null); input.question('What do you think? ', function (answer) { console.log('You say: %s', answer); input.close(); }); input.on('close', function () { console.log('\nBye!'); });
module.exports = { 'Беговые кроссовки': [ { 'id': '1f3', 'name': 'Gel', 'cost': 6600, 'brand': 'Asics' }, { 'id': 'a3d', 'name': 'Wave', 'cost': 5520, 'brand': 'Mizuno' }, { 'id': 'd2b', 'name': 'Del Mar', 'cost': 4930, 'brand...
"use strict";(self.webpackChunkdocusaurus_2=self.webpackChunkdocusaurus_2||[]).push([[852],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return d}});var i=n(7294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){...
import PropTypes from 'prop-types'; import React from 'react'; import { View, Dimensions } from 'react-native'; import { WebView } from 'react-native-webview'; export class Pivot extends React.Component { constructor(props) { super(props); } shouldComponentUpdate() { return false;...
import redis from "redis"; import { promisify } from "util"; import logger from "../util/logger"; const client = redis.createClient(); const get = promisify(client.get).bind(client); function onError(error) { logger.log(error, logger.LEVELS.ERROR); } function onReady() { logger.log( "Cache connection has be...
import DisplayObject from './display-object.js' import util from '../../common/util' import Events from '../../common/event' class Bitmap extends DisplayObject { constructor (img, onLoad) { super() if (typeof img === 'string') { if (Bitmap.cache[img]) { if(util.isWeapp){ this.img = Bi...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _rxStorageLokijs = require("./rx-storage-lokijs"); Object.keys(_rxStorageLokijs).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in exports && exports[key] === _rxStorageLokijs[key]) return;...
import React from 'react'; // import Icon from 'react-native-vector-icons/FontAwesome'; import Main from '../components/Login'; import { SafeAreaView } from 'react-native'; const Login = ({ navigation }) => { return ( <> <SafeAreaView style={{ flex: 1, backgroundColor: '#F6F7F8' }}> <Main navigatio...
exports.newAlgorithmicTradingBotModulesTradingEpisode = function (processIndex) { /* This module packages all functions related to Episodes. */ let thisObject = { mantain: mantain, reset: reset, openEpisode: openEpisode, updateExitType: updateExitType, closeEpisod...
import { CommandsManager, ExtensionManager, ServicesManager, HotkeysManager, UINotificationService, UIModalService, UIDialogService, UIViewportDialogService, MeasurementService, DisplaySetService, ToolBarService, ViewportGridService, HangingProtocolService, CineService, UserAuthenticationS...
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else if(typeof exports === 'object') exports["donut"] = factory(); else root["britech...
var searchData= [ ['block_190',['block',['../classsrc_1_1python__code_1_1_code_block_1_1_code_block.html#aa8192a9843145248474724f29fadffef',1,'src::python_code::CodeBlock::CodeBlock']]] ];
(function($) { "use strict"; // Start of use strict // Toggle the side navigation $('#slide-submenu').on('click',function() { $(this).closest('.list-group').fadeOut('slide',function(){ $('.mini-submenu').fadeIn(); $('#contentBar').toggleClass('col-sm-8 col-...
var NAVTREEINDEX1 = { "classgame_1_1_circle_shape.html#ac5ca02d1fc47577635df419fcd96566f":[2,0,0,8,0], "classgame_1_1_circle_shape.html#add79825eb1f576b2ad1403d310bb1112":[2,0,0,8,5], "classgame_1_1_circle_shape.html#ae372d1654964c9c2413f11aea43c1e40":[2,0,0,8,2], "classgame_1_1_collision_target.html":[2,0,0,9], "class...
// Projects service used to communicate Projects REST endpoints (function () { 'use strict'; angular .module('projects') .factory('ProjectsService', ProjectsService); ProjectsService.$inject = ['$resource', '$log']; function ProjectsService($resource, $log) { var Project = $resource('/api/project...
// internals import { inspect } from 'util' // packages import core from '@actions/core' // modules import main from './lib/index.js' // parse inputs const inputs = { token: core.getInput('github-token', { required: true }), target: core.getInput('target', { required: false }), command: core.getInput('command'...
import { Template } from 'meteor/templating'; import { Blaze } from 'meteor/blaze'; import _ from 'underscore'; import $ from 'jquery'; let zIndexBackdrop = 1060; let zIndexModal = 1061; OHIF.ui.showDialog = (templateName, dialogData={}) => { // Check if the given template exists const template = Template[te...
/* eslint-disable no-unused-vars */ /* eslint-disable no-undef */ import React, { useEffect, useState } from 'react'; import { View, Text, TouchableOpacity } from 'react-native'; import styles from './StackCellStyles'; import { CellSize, BoardWidth, BorderWidth } from '../GlobalStyle'; import { number, func } from 'p...
// eslint-disable-next-line import/order import { initUserStorage } from '../../../lib/userStorage/__tests__/__util__' import React from 'react' import renderer from 'react-test-renderer' import { getWebRouterComponentWithMocks } from '../../dashboard/__tests__/__util__' import GDStore from '../../../lib/undux/GDStore'...
define( ({ _widgetLabel: "Editor de Atributos em Batch", widgetIntroSelectByArea: "Utilize uma das ferramentas abaixo para criar o conjunto selecionado de elementos a atualizar. Se a linha estiver <font class=\'maxRecordInIntro\'>destacada</font>, o número máximo de registos foi excedido.", widgetIntro...
import test from 'tape' import {h} from 'hastscript' import {toHtml} from '../index.js' test('`tbody` (opening)', (t) => { t.deepEqual( toHtml(h('tbody'), {omitOptionalTags: true}), '<tbody>', 'should not omit tag without children' ) t.deepEqual( toHtml(h('tbody', h('tr')), {omitOptionalTags: tr...
module.exports=['\u0964','\u0965','\u0C00','\u0C01','\u0C02','\u0C03','\u0C05','\u0C06','\u0C07','\u0C08','\u0C09','\u0C0A','\u0C0B','\u0C0C','\u0C0E','\u0C0F','\u0C10','\u0C12','\u0C13','\u0C14','\u0C15','\u0C16','\u0C17','\u0C18','\u0C19','\u0C1A','\u0C1B','\u0C1C','\u0C1D','\u0C1E','\u0C1F','\u0C20','\u0C21','\u0C22...
import { createApp } from 'vue' import { createI18n } from 'vue-i18n' import App from './App.vue' import ja from './locales/ja.json' import en from './locales/en.yaml' const i18n = createI18n({ legacy: false, locale: 'ja', messages: { en, ja } }) const app = createApp(App) app.use(i18n) app.mount('#...
/** * SPDX-License-Identifier: Apache-2.0 */ import { handleActions } from 'redux-actions' import { Record } from 'immutable' import * as actionTypes from '../actions/action-types' const InitialState = new Record({ loaded: false, peerStatus: [], errors: {}, }) const peerStatus = handleActions({ ...
const { entity } = require('./entities') /** Lazily resolves a query's _target property */ module.exports = (q,defs) => { if (!q._target || q._target.kind !== 'entity') Object.defineProperty (q, '_target', {value:( q.SELECT ? _resolve (q.SELECT.from, defs) : q.INSERT ? _resolve (q.INSERT.into, defs) : q....
import React from 'react' import renderer from 'react-test-renderer' import Roller from './Roller' describe('Roller component', () => { test('should render correctly', () => { const tree = renderer.create(<Roller />).toJSON() expect(tree).toMatchSnapshot() }) })
// internal methods /** */ console.log("---------------01--------internal method--------------------------"); // inserte or delete let fruits = ["Banana"]; let arr = fruits; // copy by refrence ( two variables refrence the same array) console.log(arr); // 'Banana' console.log(arr == fruits); // true ...
import Vue from 'vue' import router from '@/router' let actions = { // table data getItems({commit, state, getters}) { commit('setLoadingStatus', true) Vue.http.get(getters.path('i')) .then((response) => { commit('setItems', response.body) commit('setLoadingStatus', fals...
'use strict'; // Used for MongoDB access const User = require('../model/user-schema'); const hash = require('../common/hash-password'); const USER_FILTER = {_id: 1, username: 1, added: 1, liked: 1, linkedTo: 1}; module.exports = function(path) { let errorHandler = function(err, res) { console.error(...
// client-side webpack configuration for our dev //requiring objects const path = require('path'); // const HtmlWebpackPlugin = require('html-webpack-plugin'); const webpack = require('webpack'); const CURRENT_WORKING_DIR = process.cwd(); // let's create the config object const config = { name: "browser", mo...
// ** I18N // Calendar EN language // Author: Mihai Bazon, <mihai_bazon@yahoo.com> // Translator: Fabio Di Bernardini, <altraqua@email.it> // Encoding: any // Distributed under the same terms as the calendar itself. // For translators: please use UTF-8 if possible. We strongly believe that // Unicode is the answer t...
const core = require("@actions/core"); const path = require("path"); const axios = require("axios"); const os = require("os"); const fs = require("fs").promises; const getAbsolutePath = (filePath) => { if (filePath[0] !== "~") return path.resolve(filePath); const homeDir = os.homedir(); if (homeDir) retur...
function setEventHandler(name, handler, dom, tag, item) { dom[name] = function(e) { // cross browser event fix e = e || window.event e.which = e.which || e.charCode || e.keyCode e.target = e.target || e.srcElement e.currentTarget = dom e.item = item // prevent default behaviour (by def...
import Todo from './Todo'; export default Todo;
import React, { useState } from "react" const defaultValues = { bg: "blank.png", colorBg: "#fff", setBackground: () => {}, } const BackgroundContext = React.createContext(defaultValues) const BackgroundProvider = ({ children }) => { const [bg, setBgState] = useState(defaultValues.bg) const [colorBg, setCol...
import { remote } from 'electron' /** * Get root path for bundled (deployed) or non-bundled (dev) files. * @returns {String} absolute path to root folder */ export function getRootPath () { return remote.app .getAppPath() .replace( /\\(dist_electron|app.asar)/, '' ) }