text stringlengths 2 1.04M |
|---|
import React from 'react';
import './Modal.scss';
import Button from '@material-ui/core/Button';
class Modal extends React.Component {
constructor(props) {
super(props);
this.state = { isModalOpen: false };
}
handleClickLesson() {
this.setState({ isModalOpen: true });
}
handleClickClose() {
... |
// @flow
import * as React from 'react'
import Box from '../box'
import type {Props} from '../floating-box.types'
export default class FloatingBox extends React.Component<Props, {}> {
state = {}
render() {
return <Box style={this.props.containerStyle}>{this.props.children}</Box>
}
} |
export { default as Schedule } from './Schedule';
export { default as Schedules } from './Schedules';
export { default as ScheduleList } from './ScheduleList';
export { default as ScheduleOccurrences } from './ScheduleOccurrences';
export { default as ScheduleToggle } from './ScheduleToggle';
export { default as Schedu... |
/******************
* COPYRIGHT NOTICE:
* Current background system and text is from 'Dungeons & Dragons: 5th Edition'
* Copyright Wizards of the Coast
*****************/
const utility = require("../utility.js");
var Hermit = {
reason: [{
text: "I was searching for spiritual enlightenment.... |
/**
* Created by hocvt on 10/2/15.
*/
var editor_array = [];
(function ( $ ) {
$.fn.lecture_editor = function(options) {
options = options || {};
var $this = this;
var lecture_contents = options.lecture_contents || {};
var instance_time = $.now();
var content_id = this.p... |
// Available at https://github.com/Developer-Autodesk/Library-view.and.data.api-javascript
//Change '3dViewDiv' to the Div id in your application that will be associated with the viewer
var divid = '3dViewDiv';
// Bucket to use for uploading the file
var bucketName = null;
var baseurl = "https://developer.api.autod... |
if(cm._baseUrl.indexOf('serdidg.github.io') > -1){
cm._baseUrl = [cm._baseUrl, '/MagpieUI/docs/build'].join('/');
}else{
cm._baseUrl = [cm._baseUrl, 'docs/build'].join('/');
}
cm._assetsUrl = cm._baseUrl; |
// Copyright (c) 2017 Intel 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
//
// Unless required by... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'sds';
var iconName = 'document-add';
var width = 512;
var height = 512;
var ligatures = [];
var unicode = '';
var svgPathData = 'M430.77,137.89a15.91,15.91,0,0,0-3.47-5.21l-96-96A16.21,16.21,0,0,0,320,32H96A16,16,0,0,0,80,48V464a... |
const router = require('express').Router();
const passport = require('passport');
const storeMethods = require('../controllers/store');
router.post('/register', storeMethods.registerStore);
router.post('/login', passport.authenticate('local'), storeMethods.login);
router.get('/logout', storeMethods.logout);
router.... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var TwitterCircleFill = {
name: 'twitter-circle',
theme: 'fill',
icon: {
tag: 'svg',
attrs: { viewBox: '64 64 896 896' },
children: [
{
tag: 'path',
attrs: {
... |
/*
YUI 3.6.0pr3 (build 1)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('dd-gestures', function(Y) {
/**
* This module is the conditional loaded `dd` module to support gesture events
* in the event that `dd` is loaded onto a devic... |
console.log(">>Hello world from background script<<") |
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you... |
const About = () => {
return (
<div className="px-4 py-16 mx-auto sm:max-w-xl md:max-w-full lg:max-w-screen-xl md:px-24 lg:px-8 lg:py-20">
<div className="flex flex-col w-full mb-6 lg:justify-between lg:flex-row md:mb-8">
<div className="flex items-center mb-5 md:mb-6 group lg:max-w-xl">
... |
const MakeApiAdapter = (client) => ({
get: async (resource) => {
const { data } = await client.get(resource)
return data
},
post: async (resource) => {
const { data } = await client.post(resource)
return data
}
})
export default MakeApiAdapter |
$(document).ready(function() {
$('#new-form-next').on('click', function(){
$('#info-user-tab').removeClass('active')
$('#info-gem-tab').addClass('active')
});
}); |
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
import { EventEmitter, Injectable } from '@angular/core';
export class BsDropdownState {
constructor() {
this.direction = 'down';
this.isOpenChange = new EventEmitter();
this.isDisabledChange = new EventEmitte... |
import { RELATION_BASED_ON } from '../../schema/stixCoreRelationship';
import { ABSTRACT_STIX_CYBER_OBSERVABLE } from '../../schema/general';
import { RELATION_OBJECT } from '../../schema/stixMetaRelationship';
import { ENTITY_TYPE_CONTAINER_OBSERVED_DATA, ENTITY_TYPE_INDICATOR } from '../../schema/stixDomainObject';
... |
export * from "./HeaderActiveCovidSection" |
const isProd = process.env.NODE_ENV === 'production';
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
pageExtensions: ['page.tsx', 'api.ts'],
eslint: {
ignoreDuringBuilds: true,
},
swcMinify: true,
experimental: {
emotion: true,
},
compiler: {
reactRemoveP... |
/**
* TODO getStatesConfig setStatesConfig previous config //better work flow for disable and undo of disabling
* TODO have factories for certain recurring things
* - vehicularBehaviour
* - playerBehaviour
* this way being able to bind events to a certain entity
*/
import _ from 'lodash';
import {Logger} from '.... |
const prefix = 'order';
module.exports = function namespace(ruleName) {
return `${prefix}/${ruleName}`;
}; |
"use strict";
/**
* Copyright 2014 IBM Corp. 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 requi... |
// https://docs.cypress.io/api/introduction/api.html
describe("My First Test", () => {
it("Visits the app root url", () => {
cy.visit("/");
cy.contains("Login");
});
}); |
/*! firebase-admin v9.11.0 */
"use strict";
/*!
* Copyright 2020 Google 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
*
* Unle... |
class Spectrum {
constructor(id, scanNum, level, peakList, nIon, cIon, mass, charge = -1, mz = -1) {
this.id_ = id;
this.scanNum_ = scanNum;
this.level_ = level;
this.peakList_ = peakList;
this.nIon_ = nIon;
this.cIon_ = cIon;
this.precMass_ = parseFloat(mass);
this.precCharge_ = pars... |
require('./babel.register');
require('../webpack/webpack.dev.server'); |
var path = require('path');
var fs = require('fs');
module.exports = {
'init': function(browser) {
browser
.url('file://' + path.join(__dirname, 'index.html'))
.waitForElementVisible('body', 1000)
.assert.value('input', '<svg width="360" height="360"><defs></defs><g></g><g><g><g><rect x="25.099... |
angular
.module('core')
.filter('checkmark', function(){
return function(input){
return input ? '\u2713' : '\u2718'
}
})
// angular.module('myApp.version.interpolate-filter', [])
// .filter('interpolate', ['version', function(version) {
// return function(text) {
// return String(text).re... |
import React, { useEffect } from 'react';
import Button from '@/Components/Button';
import Checkbox from '@/Components/Checkbox';
import Guest from '@/Layouts/Guest';
import Input from '@/Components/Input';
import Label from '@/Components/Label';
import ValidationErrors from '@/Components/ValidationErrors';
import { He... |
import React from 'react';
import { RadialBarChart, PolarAngleAxis, RadialBar } from 'recharts';
export default function ToDoChart(props) {
const circleSize = 300;
const { list } = props;
const completedCount = list.filter(item => item.completed).length;
const data = [{ value: completedCount / list.length }];
... |
'use strict'
const http = require('http')
const server = http.createServer((req, res) => res.end('hello'))
const terminus = require('../terminus')
terminus(server, {
onSignal: () => {
console.log('on-sigterm-runs')
return Promise.resolve()
}
})
server.listen(8000, () => {
process.kill(process.pid, 'SIG... |
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import { Provider } from 'react-redux';
import GlobalStyles from './styles/global';
import Header from './components/Header';
import Routes from './routes';
import './config/ReactotronConfig';
import store from './store';
function App() {
... |
'use strict';
// ---------------------------------------------------------------------------
const Exchange = require ('./base/Exchange');
const { ExchangeError, BadRequest, ArgumentsRequired, InsufficientFunds, InvalidOrder } = require ('./base/errors');
// ----------------------------------------------------------... |
import { pgPool } from "../services/database";
import bcrypt from 'bcrypt-nodejs'
const saltRounds = 10;
const isActive = `status = 'A'`;
export const list = async ctx => {
const { username, role ,pagination} = ctx.request.body;
const rolequery = `and role = $2`;
const queryParam = [`%${username}%`];
role !== ... |
define(function (require) {
var _ = require('lodash');
var versionmath = require('utils/versionmath');
return function CheckEsVersionFn(Private, es, configFile, Notifier, minimumElasticsearchVersion) {
return function checkEsVersion() {
var notify = new Notifier({ location: 'Setup: Elasticsearch version... |
import AvatarBlock, { StyledAvatarBlock } from './avatar-block'
export default AvatarBlock
export { StyledAvatarBlock } |
import { expect } from 'chai';
import request from '../src/fetch-request';
/* eslint func-names: 0 */
/* eslint prefer-arrow-callback: 0 */
describe('fetch-request', function () {
it('(server) should accept json response', function () {
this.timeout(10000);
const test = request({ url: 'https://o.hahoo.cn/tes... |
import Vue from 'vue'
export default {
style: {
data() {
},
methods: {
// 封装提交css方法
commitCss(value) {
if (!this.id) {
console.warn("component must has unique id to use commit css")
return
}
let key = "#item-" + this.id
this.$css.add(key, va... |
const isRequestAjaxOrApi = (req) => {
//si no acepta html o xhr
return !req.accepts('html') || req.xhr
}
module.exports = isRequestAjaxOrApi |
biz
let foo;
var foo;
baz = "baz";
biz = "biz";
let foo = "foo";
var foo = "bar";
const foo = "foo";
const fiz = "fiz";
let foo, bar = "bar";
var foo, bar = "bar";
let foo = "foo", bar = "bar";
var foo = "foo", bar = "bar";
const foo = "foo", bar = "bar";
let foo,
bar = "bar";
var foo,
bar = "bar";
let foo... |
import React, { Component } from 'react'
import './styles/header.css'
class Header extends Component {
render () {
return (
<div className='my-header'>
<p>Lexicode</p>
</div>
)
}
}
export default Header |
import React from "react";
import { render } from "@testing-library/react";
import Footer from "./footer";
describe("<Footer />", () => {
let siteOwner = "The Test SiteOwner";
it("renders <Footer /> Content", () => {
const { getByText } = render(<Footer siteOwner={siteOwner} />);
expect(getByText(/© 2020 T... |
export let cnt = 0;
export function increment() {
cnt++;
} |
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/ |
import React, { Component } from 'react'
// import 'isomorphic-fetch'
// import 'whatwg-fetch'
import Image from '../components/Image'
import './InstagramFeed.css'
export default class InstagramFeed extends Component {
static defaultProps = {
instagramUrl: 'https://instagram.com/instagram',
count: 7
}
... |
const users = require('./users/user-models');
const events = require('./events/event-models');
const comments = require('./comments/comment-models');
const commentReactions = require('./comment-reactions/reaction-models');
module.exports = {
users,
events,
comments,
commentReactions,
}; |
import { createLocalVue, shallowMount } from '@vue/test-utils'
import { BootstrapVue } from 'bootstrap-vue'
import VueRouter from 'vue-router'
import Issue from '@/components/sprintbacklog/tasks/Issue.vue'
// create an extended `Vue` constructor
const localVue = createLocalVue()
// install plugins as normal
localVue.u... |
/* eslint-env browser */
const { getServerUrl, CONFIG_KEY } = require('./config');
const { GET_FILE } = require('./tasks/taskNames');
const { SAVE_TEXT, SAVE_IMAGE } = require('./server/actions');
const {
PATH_CSS,
PATH_DIFF_CSS,
PATH_DIFF_JS,
PATH_JS,
PATH_SOCKET_JS,
PATH_BASE64_JS,
} = require('./paths')... |
// THIS FILE IS AUTO GENERATED
import { GenIcon } from '../lib';
export function BiCalendarStar (props) {
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24"},"child":[{"tag":"path","attr":{"d":"M9.981 14.811L9.514 17.537 11.963 16.25 14.412 17.537 13.944 14.811 15.926 12.879 13.188 12.481 11.963 10 10.738 12.4... |
import React from 'react'
import { useStaticQuery, graphql } from 'gatsby'
import VideoEntry from './VideoEntry'
export default function Videos() {
const data = useStaticQuery(graphql`
query HomePageVideosQuery {
allMdx(
sort: { fields: frontmatter___date, order: DESC }
filter: {
... |
import React from 'react';
import MobileTearSheet from '../../../MobileTearSheet';
import {List, ListItem} from 'material-ui/List';
import ActionGrade from 'material-ui/svg-icons/action/grade';
import Divider from 'material-ui/Divider';
import Avatar from 'material-ui/Avatar';
import {pinkA200, transparent} from 'mater... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _reactAddonsPureRenderMixin = require('react-addons-pure-... |
const express = require("express");
const app = express();
const studentsRoute = require('./routes/students');
const port = process.env.PORT || 5000;
const bodyParser = require('body-parser');
//! body - parser: POST, PUT gibi http isteklerinde kullanıcıdan bilgileri genelde bodyden alırız.
//! body - parser bu body i... |
/** @flow */
import React from 'react';
import {InputText, inputPresets} from '../../../src/index.js';
/**
* @description An input text email demo.
* @returns {Object<string,*>} React component.
*/
function InputTextEmail() {
return (
<InputText
name={'email'}
placeholder={'Emai... |
// Copyright 2015 The Closure Library 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 requ... |
import React from 'react';
import Dropdown from './Dropdown';
import Select from 'react-select';
import WebFont from 'webfontloader';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCaretDown, faCaretUp, faCaretSquareDown } from '@fortawesome/free-solid-svg-icons'
const gradients = [
{... |
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-line/u-line"],{"05bc":function(t,e,n){"use strict";n.r(e);var r=n("cdcf"),i=n.n(r);for(var o in r)"default"!==o&&function(t){n.d(e,t,(function(){return r[t]}))}(o);e["default"]=i.a},1870:function(t,e,n){"use strict";var r;n.d(e,"b",(funct... |
const { clone } = require('lodash');
const config = clone(require('../default.config'));
config.features = { sessionManagement: true, backchannelLogout: true, alwaysIssueRefresh: true };
module.exports = {
config,
clients: [{
client_id: 'client',
client_secret: 'secret',
response_types: ['code id_tok... |
import React, { Component } from 'react';
import {Grid, Row, Col, Accordion, Panel, ListGroup, ListGroupItem, Button,Table} from 'react-bootstrap';
import FacetItem from '../../components/datasets/FacetItem';
import FacetShowHide from '../../components/datasets/FacetShowHide';
import Element from '../../components/hom... |
import * as R from 'ramda';
import * as pouch from './database';
const L = {
includeDoc: R.lensProp('include_docs'),
attachments: R.lensProp('attachments'),
keys: R.lensProp('keys'),
binary: R.lensProp('binary'),
deleted: R.lensProp('_deleted'),
};
const makeStartEndRangeAllDocOption = (key) =>
R.pipe(
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const multer = require("multer");
const error_handler_service_1 = require("../services/error-handler.service");
const errorHandler = new error_handler_service_1.ErrorHandler();
const multerStorage = () => {
re... |
import Xen from '../../modalities/dom/components/xen/xen.js';
Xen.Async = class extends Xen.Base {
// shorthand for adding state,
// equivalent to `this._setState(state)`
set state(state) {
this._setState(state);
}
get state() {
return this._state;
}
get props() {
return this._props;
}
//... |
'use strict';
describe('Test ghost-tester', function () {
let testEL;
beforeEach(function (done) {
testEL = document.createElement('div');
testEL.classList.add('layout');
testEL.classList.add('fit');
document.body.appendChild(testEL);
done();
});
afterEach(function (done) {
testEL.re... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the Lic... |
import { Helmet } from 'react-helmet-async';
import PropTypes from 'prop-types';
import { forwardRef, React } from 'react';
// material
import { Box } from '@material-ui/core';
// ----------------------------------------------------------------------
const Page = forwardRef(({ children, title = '', ...other }, ref) =... |
tinyMCEPopup.requireLangPack();
var EmotionsDialog = {
addKeyboardNavigation: function(){
var tableElm, cells, settings;
cells = tinyMCEPopup.dom.select("a.emoticon_link", "emoticon_table");
settings ={
root: "emoticon_table",
items: cells
};
cells[0].tabindex=0;
tinyMCEPopup.dom.addClass(ce... |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Norwegian Bokmål language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictiona... |
//
// SPDX-FileCopyrightText: 2021 SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0
//
'use strict'
const _ = require('lodash')
const socketIO = require('socket.io')
const logger = require('./logger')
const security = require('./security')
const { Forbidden, isHtt... |
const path = require('path');
module.exports = {
rootDir: path.resolve(__dirname),
verbose: true,
silent: false,
bail: true,
testEnvironment: 'jsdom',
moduleFileExtensions: ['ts', 'js', 'json'],
moduleDirectories: ['node_modules'],
setupFiles: ['<rootDir>/test/setup.ts'],
transform: {
'.+\\.ts$':... |
//# sourceMappingURL=TabBar.js.map |
"use strict";(self.webpackChunkCnblogs_Theme_SimpleMemory=self.webpackChunkCnblogs_Theme_SimpleMemory||[]).push([[6655],{9252:function(e,s,l){l.r(s)}}]); |
/**
* @license Highcharts JS v6.0.4 (2017-12-15)
*
* Indicator series type for Highstock
*
* (c) 2010-2017 Sebastian Bochan
*
* License: www.highcharts.com/license
*/
'use strict';
(function(factory) {
if (typeof module === 'object' && module.exports) {
module.exports = factory;
} else {
... |
describe("visor.ui-router", function () {
describe("state change", function () {
var defer = null;
angular.module("test.states", ['visor.ui-router', 'ui.router']).config(function ($stateProvider, visorPermissionsProvider) {
$stateProvider.state("first", {
url: "/first",
... |
const path = require("path");
const webpack = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const HtmlWebpackInlineSourcePlugin = require("html-webpack-inline-source-plugin");
const BUILD_ENV = process.env.DBT_DOCS_ENV || "production";
module.exports = {
devtool:
BUILD_ENV == "de... |
// Copyright (©) 2020 NewCraft Corporation. All rights reserved. MIT License.
exports.run = (client, message, args, database, ops) => {
if(!message.member.roles.cache.find(r => r.name === "DJ")) {
message.channel.send(`<@!${message.author.id}> vc ñ é DJ`)
return;
};
if (ops.active.get(message... |
export var nonenumerable = function (target, key) {
// first property defined in prototype, that's why we use getters/setters
// (otherwise assignment in object will override property in prototype)
Object.defineProperty(target, key, {
get: function () {
return undefined;
},
... |
/**
* 段落格式
* @file
* @since 1.2.6.1
*/
/**
* 段落對齊方式
* @command justify
* @method execCommand
* @param { String } cmd 命令字符串
* @param { String } align 對齊方式:left => 居左,right => 居右,center => 居中,justify => 兩端對齊
* @example
* ```javascript
* editor.execCommand( 'justify', 'center' );
* ```
*/
/**
* 如果選區所在位置是段落... |
import {app} from './app2.js';
const startSignUpForm = document.getElementById("startSignUpForm");
const generateHash = async (message) => {
const msgUint8 = new TextEncoder().encode(message); // encode as (utf-8) Uint8Array
const hashBuffer = await crypto.subtle.digest('SHA-256', ms... |
import _extends from 'babel-runtime/helpers/extends';
import CalendarLocale from '../../vc-calendar/src/locale/kn_IN';
import TimePickerLocale from '../../time-picker/locale/kn_IN';
// Merge into a locale object
var locale = {
lang: _extends({
placeholder: 'ದಿನಾಂಕ ಆಯ್ಕೆಮಾಡಿ',
rangePlaceholder: ['ಪ್ರಾರಂಭ ದಿನಾ... |
import { h } from 'vue'
export default {
name: "Texture",
vendor: "Mdi",
type: "",
tags: ["texture"],
render() {
return h(
"svg",
{"xmlns":"http://www.w3.org/2000/svg","width":"24","height":"24","viewBox":"0 0 24 24","class":"v-icon","fill":"currentColor","data-name":"mdi-texture","innerHTML":... |
import { pick, any, some, find } from 'underscore';
import template from './query.html';
function QueryViewCtrl(
$scope, Events, $route, $routeParams, $location, $window, $q,
KeyboardShortcuts, Title, AlertDialog, Notifications, clientConfig, toastr, $uibModal,
currentUser, Query, DataSource,
) {
const DEFAULT... |
const pdfRule = (state, silent) => {
const oldPos = state.pos;
// If not exist @ and [ , end and return false
if (
state.src.charCodeAt(oldPos) !== 0x40 /* @ */ ||
state.src.charCodeAt(oldPos + 1) !== 0x5b /* [ */
) {
return false;
}
const PDF_REGEX = /@\[([a-zA-Z].+)]\([\s]*(.*?)[\s]*[)]/im;
... |
import React from 'react'
import { Route } from 'react-router'
import RedirectRoute from 'router/RedirectRoute'
export default function AuthRoute ({
component,
nonAuthComponent,
requireAuth,
isLoggedIn,
currentUser,
returnToOnAuth,
setReturnToURL,
location,
...rest
}) {
if (!isLoggedIn && nonAuthCo... |
// Dependencies
var mongoose = require("mongoose");
// Schema
var Schema = mongoose.Schema;
// Create the NoteSchema object
var NoteSchema = new Schema({
title: String,
body: String
});
// Create & export Note model
var Note = mongoose.model("Note", NoteSchema);
module.exports = Note; |
/**
* 0.1
* toobusyFilter, Filter for toobusy, if the process is toobusy, just skip the new request
*
* @ Pankaj Jatav All Rights Reserved.
* Date: 3 Feb, 2017
* programmer: Pankaj Jatav <pankajjatav7777@gmail.com>
* Javascript file toobusyFilter.js
*/
var logger = require('pomelo-logger').getLogger('pome... |
const t = require('tap')
const { resolve } = require('path')
// have to fake the node version, or else it'll only pass on this one
Object.defineProperty(process, 'version', {
value: 'v14.8.0',
})
// also fake the npm version, so that it doesn't get reset every time
const pkg = require('../../../../package.json')
... |
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
module.exports = (env, argv) => {
const config = {
entry: argv.mode === 'production' ? './src/index.js' : './examples/example.js... |
#!/usr/bin/env node
var fs = require('fs');
var utils = require('./lib/util');
var path = require('path');
var showErrorBlock = utils.showErrorBlock;
var showTitleBlock = utils.showTitleBlock;
var showSuccessBlock = utils.showSuccessBlock;
var commitMessageFile = process.argv[2];
showTitleBlock('Checking commit mes... |
import { downloadLocal } from './utils/get';
import ora from 'ora';
import inquirer from 'inquirer';
import fs from 'fs';
import chalk from 'chalk';
import symbol from 'log-symbols';
let init = async (templateName, projectName) => {
//项目不存在
if (!fs.existsSync(projectName)) {
//命令行交互
inquirer.pr... |
import React from 'react'
import PropTypes from 'prop-types'
import SvgContainer from './SvgContainer'
const NotificationsOffCircleSharp = props => {
return (
<SvgContainer
height={props.height}
width={props.width}
color={props.color}
onClick={props.onClick}
rotate={props.rotate ? ... |
'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_pre... |
import { createElement } from 'preact';
import { useEffect, useRef } from 'preact/hooks';
import propTypes from 'prop-types';
import { normalizeKeyName } from '../../shared/browser-compatibility-utils';
function isElementVisible(element) {
return element.offsetParent !== null;
}
/**
* @typedef MenuKeyboardNavigat... |
/* Used to create extend, extendOwn and defaults.
*
* |Name |Desc |
* |--------|------------------------------|
* |keysFn |Function to get object keys |
* |defaults|No override when set to true |
* |return |Result function, extend... |
*/
/* module
* env: all
*/
/* typescr... |
define('bforms-pager', [
'jquery',
'jquery-ui-core'
], function () {
var Pager = function (opt) {
this.options = opt;
this._create();
};
Pager.prototype.options = {
pagesContainerSelector: '.bs-pages',
pageSelector: 'a[data-page]',
dataPageContainer: 'page'... |
import BaseSpeaker from './../baseSpeaker';
import BaiduChapter from './baiduChapter';
export default class BaiduSpeaker extends BaseSpeaker {
constructor() {
super('baidu');
}
static available(cb) {
try {
// Test for Audio
if ('undefined' === typeof window.Audio)
return cb({
... |
var express = require('express');
var nodemailer = require('nodemailer');
var router = express.Router();
var passport = require("passport");
var models = require("../models");
var Employee = models.Employee;
var Resume = models.Resume;
var Comment = models.Comment;
var User = models.User;
var transporter = nodemailer.... |
import { Vec3 } from '../math/vec3.js';
var tmpVecA = new Vec3();
/**
* @private
* @class
* @name pc.Plane
* @classdesc An infinite plane.
* @description Create an infinite plane.
* @param {pc.Vec3} [point] - Point position on the plane. The constructor takes a reference of this parameter.
* @param {pc.Vec3} [... |
const df = {
x: 0,
y: 0,
w: 148,
h: 148,
dx: 0,
}
let id = 0
class Sign extends dna.Prop {
constructor(st) {
super( augment({
name: 'sign' + (++id)
}, df, st) )
this.install( dna.pod.sprite, {
img: st.img || res.signWide,
w: this.w,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.