text string | size int64 | token_count int64 |
|---|---|---|
var Discord = require("discord.js"),
client = new Discord.Client(),
Enmap = require("enmap"),
db = new Enmap({name: "tickets"}),
devs = ["345152850751389697"],
prefix = "-"
const http = require("http");
const express = require("express");
const app = express();
app.get("/", (request, response) => {
console.log(Date.n... | 22,733 | 8,525 |
export default {
namespace: 'common',
state: {},
reducers: {
updateState(state, { payload }) {
return {
...state,
...payload,
};
},
replaceState(state, { payload }) {
if (payload) {
return payload;
}
return state;
},
},
};
| 302 | 94 |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-36c22a7e"],{"6bae":function(t,e,n){},a96d:function(t,e,n){"use strict";n("6bae")},ded8:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"about"},[n("van-nav-bar",{attrs:{title:... | 1,046 | 656 |
const req = require('bd-require')
const {decrypt} = req('./libs/crypto')
module.exports = async function (context, next) {
if (/^\/login/.test(context.url)) {
await next()
} else {
let auth = context.header.authorization
let result = auth && decrypt(auth)
if (result && String(result.token) === '12... | 445 | 154 |
module.exports = {
root: true,
parserOptions: {
parser: '@typescript-eslint/parser'
},
env: {
browser: true,
jest: true,
node: true
},
extends: [
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
'plugin:vue/strongly-recommended',
'prettier',
'prettier/vu... | 1,578 | 583 |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = pickProps;
/**
* Copyright (c) 2015-present, Zippy Technologies
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
function pickProps(prop... | 523 | 167 |
import { memo } from "react";
import {
useVirtual,
areItemPropsEqual,
List
} from "@af-utils/react-virtual-list";
const Item = memo(
({ i }) => <div className="border-t p-2 border-zinc-400">row {i}</div>,
areItemPropsEqual
);
const SimpleList = () => {
const model = useVirtual({
itemCo... | 417 | 145 |
// @ts-check
"use strict";
const fs = require("fs");
const path = require("path");
const { URL } = require("url");
const markdownIt = require("markdown-it");
const rules = require("./rules");
const helpers = require("../helpers");
const cache = require("./cache");
const deprecatedRuleNames = [ "MD002" ];... | 29,957 | 8,850 |
define(["require", "exports", "@fluentui/style-utilities"], function (require, exports, style_utilities_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.styles = void 0;
var GlobalClassNames = {
root: 'ms-DatePicker',
callout: 'ms-DatePicker-callo... | 2,987 | 718 |
const fs = require('fs')
const path = require('path')
const puppeteer = require('puppeteer')
const DOCUMENT_URL = {
classes: 'https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes',
elements: 'https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements',
}
const CODES_SELECTOR = '#index>ul>li>a>cod... | 1,452 | 531 |
/** ****************************************************************************************************
* File: jsdocs.js
* Project: template-npm-module
* @author Nick Soggin <iSkore@users.noreply.github.com> on 30-May-2018
*******************************************************************************************... | 1,183 | 357 |
'use strict';
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... | 79,742 | 23,318 |
module.exports = {
getWindowHeight: function () {
return window.innerHeight || window.clientHeight;
},
getWindowWidth: function () {
return window.innerWidth;
},
getPageHeight: function () {
return document.body.scrollHeight || document.documentElement.scrollHeight;
}
};
| 296 | 84 |
const BusinessSubscriptionPlanStatus = require('./BusinessSubscriptionPlanStatus');
const AnnouncementAccessibilityType = require('./AnnouncementAccessibilityType');
const DashboardNotificationCategory = require('./DashboardNotificationCategory');
const ReleaseNoteAccessibilityType = require('./ReleaseNoteAccessibility... | 5,755 | 1,477 |
// Reference: https://prettier.io/docs/en/options.html
module.exports = {
$schema: 'http://json.schemastore.org/prettierrc',
// Specify the line length that the printer will wrap on.
printWidth: 80,
// Specify the number of spaces per indentation-level.
tabWidth: 2,
// Indent lines with tabs instead of s... | 1,106 | 336 |
/*
artifact generator: /wizzi/lib/artifacts/js/module/gen/main.js
primary source IttfDocument: c:\my\wizzi\v3\next\sources\webpacks\cssstyle\ittf\webpacks\cssstyle\src\containers\appcontainer.js.ittf
utc time: Wed, 19 Jul 2017 08:08:01 GMT
*/
'use strict';
import React from 'react';
import PropTypes from 'p... | 3,754 | 1,091 |
module.exports.pointToPixel = function(fontSize, dpi){
dpi = dpi || dpi === 0 ? dpi : 96;
fontSize = fontSize * dpi / 72;
return Math.round(fontSize);
};
module.exports.getPxScale = function(font, fontSize) {
if(font.bitmap)
return 1.0;
fontSize = typeof fontSize === "number" ? fontSize ... | 717 | 291 |
(function(exports){
crossfilter.version = "1.3.7";
function crossfilter_identity(d) {
return d;
}
crossfilter.permute = permute;
function permute(array, index) {
for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) {
copy[i] = array[index[i]];
}
return copy;
}
var bisect = crossfilter.bisect ... | 44,228 | 14,005 |
const express = require("express");
const router = express.Router();
const Users = require("./users-model");
// All recorded Sauti Databank users
router.get("/all", (req, res) => {
Users.get()
.then(users => {
res.status(200).json(users);
})
.catch(err => {
res.status(500).json(err);
});... | 8,910 | 3,526 |
export default {
domain: "https://damp-river-04072.herokuapp.com",
METHOD: {
GET: 'get',
POST: 'post',
PUT: 'put',
DELETE: 'delete'
}
} | 179 | 71 |
export {default } from './graph.container' | 42 | 11 |
// ThreeCanvas.js r46 - http://github.com/mrdoob/three.js
var THREE=THREE||{};if(!self.Int32Array)self.Int32Array=Array,self.Float32Array=Array;THREE.Color=function(a){a!==void 0&&this.setHex(a);return this};
THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,copy:function(a){this.r=a.r;this.g=a.g;this.b=a.b;re... | 74,750 | 37,414 |
const BudgetType = require('./BudgetType');
class SplitBudget extends BudgetType {
get priority() {
return this.config.priority || 200;
}
run(runningBalance) {
if (runningBalance <= 0) {
this.addDebugMessage('We have no running balance to use!');
return this.setValue(0, (this.config.failOnE... | 458 | 155 |
import React from 'react'
import {connect} from 'react-redux'
import {fetchProducts} from '../store/allProducts'
import ProductView from './ProductView'
export class AllProducts extends React.Component {
constructor() {
super()
this.state = {sort: 'random', filter: 'all'}
this.handleChange = this.handle... | 2,750 | 810 |
/*!
* jQuery JavaScript Library v2.1.1
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
*
* Date: 2014-05-01T17:11Z
*/
(function (global, factory) {
if (... | 1,036,270 | 304,416 |
import * as React from 'react';
import SearchOutlined from "@ant-design/icons/es/icons/SearchOutlined";
import Input from '../input';
export default function Search(props) {
var _props$placeholder = props.placeholder,
placeholder = _props$placeholder === void 0 ? '' : _props$placeholder,
value = props.val... | 997 | 296 |
import createTheme from "spectacle/lib/themes/default"
const brand = {
// black and its tints:
black: "#242121", // black
darkerGray: "#373534",
darkGray: "#5f5c5b",
gray: '#949BA6',
lightGray: "#e8e8e9",
white: '#F6F3F3', // lightest gray
// purple
// darkPurple: '#000326',
purple: '#2C2853',
l... | 1,555 | 665 |
import Image from 'next/image'
import { Grid } from 'theme-ui'
import { MDXProvider } from '@mdx-js/react'
const Layout = ({ compact, ...props }) => (
<Grid
columns={['64px 1fr', compact ? 'repeat(2, 96px 1fr)' : '96px 1fr']}
gap={3}
sx={{
py: [3, 4],
alignItems: compact ? 'center' : 'start',... | 719 | 269 |
import { inspect } from 'util';
// Server side redux action logger
export default function createLogger() {
return store => next => action => { // eslint-disable-line no-unused-vars
const formattedPayload = inspect(action.payload, {
colors: true,
});
console.log(` * ${action.type}: ${formattedPaylo... | 393 | 114 |
import React from 'react';
import propy from '../assets/images/propy.png';
const Propy = () => (
<div style={{"border-style":"solid","border-color":"#00ff00","width":"95%", "height":"250px"}}>
<img src={propy} style={{"width":"200px","height":"200px",}} />
</div>
);
export default Propy;
| 300 | 117 |
var digits = [];
var drawTimeout;
var fontName="";
var settings = require('Storage').readJSON("contourclock.json", true) || {};
if (settings.fontIndex==undefined) {
settings.fontIndex=0;
require('Storage').writeJSON("myapp.json", settings);
}
function draw() {
var date = new Date();
// Draw day of the week
g... | 909 | 351 |
/*
AngularJS v1.6.5-build.5390+sha.a86a319
(c) 2010-2017 Google, Inc. http://angularjs.org
License: MIT
*/
(function(J,d){'use strict';function A(d){k&&d.get("$route")}function B(t,u,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,c,m){function v(){l&&(g.cancel(l),l=null);n... | 5,657 | 2,571 |
const { ChatReply } = require("../Models/ChatReply");
module.exports = {
IgnoreChatAction: function(reason){
const self = this;
self.executeAsync = async function(){
return new ChatReply(false, undefined, undefined, undefined, undefined, reason);
}
}
} | 298 | 85 |
var tops = [
{"segment":1,
"top": [
{
"code": "Tour Gran Manzana",
"count": "2"
},
{
"code": "Empire State Building",
"count": "1"
},
{
"code": "Explora Nueva York",
"count": "1"
},
{
"code": "AllStar Basket NY",
"count": "1"
},
{
"code": "New York City Pass",
"count": "1"
},
{
"code": "Top Of The Rock",
"count": "1"
}... | 91,372 | 44,384 |
module.exports = new Date(2025, 5, 5)
| 38 | 20 |
import * as ItinerariesActionTypes from '../actiontypes/itineraries';
const initialState = []
export default function Itineraries(state=initialState, action){
switch (action.type) {
case ItinerariesActionTypes.UPDATE_ITINERARIES:{
return action.itineraries;
}
default:
return state;
}
}
| 317 | 95 |
/*
Copyright (c) 2009, www.redips.net All rights reserved.
Code licensed under the BSD License: http://www.redips.net/license/
http://www.redips.net/javascript/drag-and-drop-table-content/
version 1.3.3
Jul 15, 2009.
*/
// parameters that can be changed
var hover_color = '#E7AB83'; // define hover color
var ... | 24,060 | 7,728 |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: %hermes -hermes-parser -dump-ir %s -O0 | %FileCheck %s --match-full-lines
// RUN: %hermes -hermes-parser -dump-ir %s -O
... | 2,530 | 1,106 |
//download.js v3.0, by dandavis; 2008-2014. [CCBY2] see http://danml.com/download.html for tests/usage
// v1 landed a FF+Chrome compat way of downloading strings to local un-named files, upgraded to use a hidden frame and optional mime
// v2 added named files via a[download], msSaveBlob, IE (10+) support, and window.UR... | 4,006 | 1,322 |
import m from 'mithril';
import postgrest from 'mithril-postgrest';
import h from '../h';
import models from '../models';
import landingSignup from '../c/landing-signup';
import projectRow from '../c/project-row';
import landingQA from '../c/landing-qa';
const Flex = {
controller() {
const stats = m.prop([... | 15,748 | 4,510 |
const github = require('@actions/github')
const fs = require('fs/promises')
const isPlainObject = require('lodash/isPlainObject')
const orderBy = require('lodash/orderBy')
const find = require('lodash/find')
const slice = require('lodash/slice')
const round = require('lodash/round')
const { ChartJSNodeCanvas } = requir... | 7,608 | 2,312 |
const path = require('path')
const { createFilePath } = require('gatsby-source-filesystem')
// Setup Import Alias
exports.onCreateWebpackConfig = ({ getConfig, actions }) => {
const output = getConfig().output || {}
actions.setWebpackConfig({
output,
resolve: {
alias: {
components: path.reso... | 1,632 | 495 |
parse_and_compile_and_run(10, 5, 2,
"function f(x) { \
x + 1; \
} \
f(3); ");
// Line 915: Error: "reached oom"
| 177 | 69 |
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/component/form/form"],{
/***/ "../../../uniPro/main.js?{\"page\":\"pages%2Fcomponent%2Fform%2Fform\"}":
/*!********************************************************************!*\
!*** D:/uniPro/main.js?{"page":"pages%2Fcomponent%2Fform%2Fform"} **... | 28,054 | 9,365 |
beforeEach(() => {
jest.resetModules()
})
test('Should start the bot', () => {
const index = require('./index')
const robot = {}
robot.log = jest.fn(() => {})
robot.on = jest.fn(() => {})
index(robot)
expect(robot.log).toBeCalled()
})
test('Should set the utils', () => {
jest.mock('./lib/utils', () =>... | 1,177 | 456 |
import React from 'react'
import SamplePreview from './sample-preview.js'
import useArticle from '../hooks/useArticle';
export default () => {
const { articles } = useArticle();
return (
<ul className="article-list">
{articles.map((node, i) => {
return (
<li key={i}>
<Samp... | 402 | 130 |
const expressModule = require('@luongthanhluu/express-mongoose-api-generator');
class Controller extends expressModule.Controller {
constructor(name, model) {
super(name, model);
}
//overide
getById() {
return async (req, res, next) => {
console.log("run overdie")
... | 1,306 | 326 |
/* eslint-env mocha */
'use strict'
const { Buffer } = require('buffer')
const { nanoid } = require('nanoid')
const { getDescribe, getIt, expect } = require('../utils/mocha')
const testTimeout = require('../utils/test-timeout')
const CID = require('cids')
/** @typedef { import("ipfsd-ctl/src/factory") } Factory */
/*... | 1,933 | 665 |
/** *******************************************************
* *
* *
* LEAVE STATION *
* By Ryker *
* ... | 642 | 114 |
import React, { useState, useEffect } from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
import '../Csscomponents/Findhelp.css';
import db from '../firebase';
import '../Csscomponents/Table.css';
const Findhelp = () => {
// fetch data from firebase start
const [helpOther, setHelpOther] = useState([]... | 1,842 | 479 |
define([
'jquery',
'angular',
'angular-route',
'bootstrap',
'ng-breadcrumbs',
'angular-growl',
'directives/index.js',
'services/index.js',
'filters/index.js'
],
function() {
'use strict';
var app = require('angular').module('app',
['ngRoute', 'ng-breadcrumbs', 'ang... | 989 | 307 |
/**
* Rooms
* Pokemon Showdown - http://pokemonshowdown.com/
*
* Every chat room and battle is a room, and what they do is done in
* rooms.js. There's also a global room which every user is in, and
* handles miscellaneous things like welcoming the user.
*
* @license MIT license
*/
'use strict';
const TIMEOUT... | 41,786 | 17,490 |
const { app, BrowserWindow } = require('electron');
const path = require('path');
if (require('electron-squirrel-startup')) { app.quit(); }
const createWindow = () => {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 1000,
height: 700,
icon: path.join(__dirname, "/favicon.p... | 889 | 293 |
const { schemaDir, schemaExtension, schemaTypeDir } = require('../../backend/build/consts');
const fs = require('fs');
const js2ts = require('json-schema-to-typescript');
if (!fs.existsSync(schemaTypeDir)) {
fs.mkdirSync(schemaTypeDir, { recursive: true });
}
fs.readdir(schemaDir, (_err, files) =>
files.forEa... | 511 | 165 |
(function ( views ) {
views.AppView = Backbone.View.extend({
el : '#content',
initialize : function () {
var tags = this.collection;
tags.on('add', this.addOne, this);
tags.on('reset', this.addAll, this);
tags.on('all', this.render, this);
tags.pager();
},
addAll : functi... | 590 | 249 |
var { graphqlHTTP } = require("express-graphql");
var { buildSchema, assertInputType } = require("graphql");
var express = require("express");
// Construct a schema, using GraphQL schema language
var restaurants = [
{
id: 1,
name: "WoodsHill ",
description:
"American cuisine, farm to table, with fr... | 2,924 | 989 |
import React from "react";
// import {
// Card,
// CardImg,
// CardText,
// CardBody,
// CardTitle,
// CardSubtitle
// } from "reactstrap";
import {Button} from '@material-ui/core';
// import styled from "styled-components";
import { addFavorite } from "../actions/index";
import { connect } from "react-redu... | 3,063 | 1,001 |
'use strict';
var _utils = require('../utils');
var _lodash = require('lodash');
const arr = v => [].concat(v || []);
module.exports = class UiBundlerEnv {
constructor(workingDir) {
// the location that bundle entry files and all compiles files will
// be written
this.workingDir = workingDir;
//... | 3,941 | 1,101 |
'use strict';
module.exports = function addTransforms(b, transforms) {
if (transforms) b.pipeline.on('package', function(pkg) {
var add = pkg.name && transforms[pkg.name]
if (add) {
var br = pkg.browserify || (pkg.browserify = {})
br.transform = [].concat(br.transform || []).concat(add)
... | 330 | 118 |
const Util = require('spike-util')
const glob = require('glob')
const path = require('path')
const fs = require('fs')
const File = require('filewrap')
const Joi = require('joi')
const yaml = require('js-yaml')
const bindAllClass = require('es6bindall')
const bindAll = require('lodash.bindall')
const { map, reduce, filt... | 9,861 | 3,187 |
import React, { Component } from 'react';
import CommentList from '../CommentList/CommentList';
import CommentForm from '../CommentForm/CommentForm';
class CommentBox extends Component {
constructor(props) {
super(props);
this.state = {
comments: [
{
id: 1388534400000,
a... | 1,015 | 322 |
/*!
* AdminLTE v3.2.0-rc (https://adminlte.io)
* Copyright 2014-2021 Colorlib <https://colorlib.com>
* Licensed under MIT (https://github.com/ColorlibHQ/AdminLTE/blob/master/LICENSE)
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("jquery")):"function"==typeof define&&define... | 46,156 | 16,602 |
// @flow
import * as React from 'react';
import { connect } from 'react-redux';
import styled from 'styled-components';
import { createStructuredSelector } from 'reselect';
import Modal from 'react-modal';
import classNames from 'classnames';
import NavBar from '../components/NavBar';
import SearchFilter from '../com... | 4,826 | 1,784 |
/**
* Schema.org/PaymentMethod
* A payment method is a standardized procedure for transferring the monetary amount for a purchase. Payment methods are characterized by the legal and technical structures used, and by the organization or group carrying out the transaction.\n\nCommonly used values:\n\n* http://purl.org/... | 1,054 | 362 |
const replayer = require('watchtower-replayer');
const consumeHandler = replayer.createReplayHandler('handler.js', 'consume')
const produceHandler = replayer.createReplayHandler('handler.js', 'produce')
module.exports = {consumeHandler, produceHandler};
if (require.main === module) {
const execId = process.argv[... | 399 | 120 |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var LitisconsortePassivo;
(function (LitisconsortePassivo) {
LitisconsortePassivo["Litispas"] = "Litispas";
LitisconsortePassivo["LitPass"] = "LitPass";
LitisconsortePassivo["LitisconsortePassiv"] = "LitisconsortePassiv";
Litis... | 531 | 184 |
const mongoose = require('mongoose');
const { Schema } = mongoose;
const jobSchema = new Schema(
{
id: String,
companyId: { type: String, ref: 'CompanyModel'},
title: String,
description: String
},
{
collection: 'jobs',
versionKey: false
}
);
const compa... | 666 | 199 |
function DebitPaymentDAO(db){
this.db = db;
this.getByUuid = function(uuid, callback){
if(!uuid) return false;
var sql = "SELECT * FROM debit_payments WHERE uuid = '" + uuid + "'";
this.db.query(sql, function(err, rows, fields){
if(err) callback(err, null);
els... | 904 | 287 |
const mongoose = require('mongoose');
const jwt = require('jsonwebtoken');
const { Schema } = mongoose;
const userSchema = new Schema({
email: String,
password: String,
resetToken: String,
firstLogin: Date,
lastLogin: Date,
});
userSchema.virtual('jwt').get(() => {
console.log(this.id);
console.log(thi... | 671 | 246 |
import * as utils from './index.js';
describe('Top level exports', () => {
test('should export the modules ', () => {
const expectedExports = [
'guid',
'ObjectPath',
'absoluteUrl',
'addServers',
'sortBy',
'writeScript',
'StackManager',
'studyMetadataManager',
... | 588 | 183 |
/**
* @author mrdoob / http://mrdoob.com/
*/
import {
BufferAttribute,
BufferGeometry,
InterleavedBuffer,
InterleavedBufferAttribute,
TriangleFanDrawMode,
TriangleStripDrawMode,
TrianglesDrawMode,
Vector2,
Vector3
} from "../../../build/three.module.js";
var BufferGeometryUtils = {
computeTangents: funct... | 16,841 | 6,608 |
import { addClass, div, img, p, section, text } from '../builders';
export default function hero() {
const logo = addClass(img('static/fancybear_white.png'), 'logo');;
const the = addClass(p(text('The')), 'hero-text-light');
const fancyBear = addClass(p(text('Fancy Bear')), 'hero-text-bold');
const eateries... | 582 | 205 |
var namespaceEnergyPlus_1_1HeatingCoils =
[
[ "HeatingCoilEquipConditions", "structEnergyPlus_1_1HeatingCoils_1_1HeatingCoilEquipConditions.html", "structEnergyPlus_1_1HeatingCoils_1_1HeatingCoilEquipConditions" ],
[ "HeatingCoilNumericFieldData", "structEnergyPlus_1_1HeatingCoils_1_1HeatingCoilNumericFieldData... | 398 | 160 |
/**
* 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... | 5,502 | 1,753 |
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import TipImage from '@assets/img/gold-tip.svg';
export default function TipsWidget({ tips }) {
const [active, setActive] = useState(0);
return (
<div>
<div className='pl-2 md:pl-0 mb-8 md:mb-10'>
<h2 className='text-bl... | 2,039 | 645 |
import React, { PropTypes } from 'react';
class Marker extends React.Component {
static propTypes = {
x: PropTypes.number.isRequired,
y: PropTypes.number.isRequired,
name: PropTypes.string.isRequired,
owner: PropTypes.object,
units: PropTypes.number
};
render () {
... | 1,033 | 272 |
/**
* Copyright (c) UNA, Inc - https://una.io
* MIT License - https://opensource.org/licenses/MIT
*
* @defgroup Posts Posts
* @ingroup UnaModules
*
* @{
*/
function BxPostsPolls(oOptions)
{
BxBaseModTextPolls.call(this, oOptions);
this._sObjName = oOptions.sObjName == undefined ? 'oBxPostsPolls... | 478 | 193 |
var e=(e,t,a)=>new Promise(((o,n)=>{var l=e=>{try{i(a.next(e))}catch(t){n(t)}},s=e=>{try{i(a.throw(e))}catch(t){n(t)}},i=e=>e.done?o(e.value):Promise.resolve(e.value).then(l,s);i((a=a.apply(e,t)).next())}));import{ah as t,az as a,au as o}from"./index.44a64fe8.js";import{r as n,a0 as l,u as s,C as i,t as r}from"./vendor... | 1,897 | 781 |
'use strict';
const shared = require('../shared');
module.exports = (sequelize, DataTypes) => {
const ContactUs = sequelize.define('ContactUs', {
subject: DataTypes.STRING,
body: DataTypes.STRING,
...shared.fields
}, {
...shared.options
}
);
ContactUs.associate = function (models) {
... | 443 | 140 |
import PropTypes from 'prop-types';
import React from 'react';
import { FlatList, View, StyleSheet, Keyboard, TouchableOpacity, Text, ImageBackground } from 'react-native';
import LoadEarlier from './LoadEarlier';
import Message from './Message';
import Color from './Color';
import { warning } from './utils';
const st... | 9,998 | 2,718 |
// cria a conexão persistente
class Observer
{
source = null;
constructor(url) {
this.source = new EventSource(url)
}
add(event, callback) {
this.source.addEventListener(event, (ev)=> {
callback(JSON.parse(ev.data))
});
}
}
/*
var obs = new Observer('src/Obse... | 430 | 152 |
// @flow
import React from 'react';
import { type StoryDecorator } from '@storybook/react';
import { I18nProvider } from '@lingui/react';
const i18nProviderDecorator: StoryDecorator = (story, context) => (
<I18nProvider language="en">{story(context)}</I18nProvider>
);
export default i18nProviderDecorator;
| 311 | 107 |
console.log("Hello");var cubes,list,math,num,number,opposite,race,square,slice=[].slice;number=42;opposite=true;if(opposite){number=-42}square=function(x){return x*x};list=[1,2,3,4,5];math={root:Math.sqrt,square:square,cube:function(x){return x*square(x)}};race=function(){var runners,winner;winner=arguments[0],runners=... | 782 | 290 |
import {URL_VIEWS} from "./conf.js";
function addTemplateToElement(element,template) {
element.innerHTML=template;
}
function loadTemplateToElement(path,element) {
getTemplate(path)
.then(res=>{
if(res.ok){
res.text()
.then(template=>{
addTemplateToElement(element,template);
conso... | 3,602 | 1,223 |
var KEY = 'store';
var dottie = require('dottie');
var localStorage = typeof window === 'undefined' ? null : window.localStorage;
if (!localStorage) {
console.log('Mocking localStorage-api');
localStorage = {
getItem: function getItem(key) {},
setItem: function setItem(key, value) {},
removeItem: fun... | 2,138 | 689 |
describe('App', function () {
beforeEach(function () {
browser.get('/');
});
it('should have a title', function () {
expect(browser.getTitle()).toEqual("Angular 2 App | ng2-webpack");
});
it('should have <header>', function () {
expect(element(by.css('my-app header')).isPresent()).toEqual(true)... | 717 | 240 |
const {
MessageEmbed,
Message
} = require("discord.js");
const config = require("../../botconfig/config.json");
const ee = require("../../botconfig/embed.json");
const settings = require("../../botconfig/settings.json");
const {
check_if_dj
} = require("../../handlers/functions")
module.exports = {
name: "jump", //... | 3,916 | 1,700 |
"use strict";
const path = require('path');
class BundlesServer {
constructor() {
this.bundles = [];
this.bundleBykey = {};
this.backendUrl = `https://${serverConfig.ip}:${serverConfig.port}`;
}
initialize(sessionID) {
for (const i in res.bundles) {
if(!("manif... | 2,424 | 694 |
import { declare } from "@babel/helper-plugin-utils";
import remapAsyncToGenerator from "@babel/helper-remap-async-to-generator";
import syntaxAsyncGenerators from "@babel/plugin-syntax-async-generators";
import { types as t } from "@babel/core";
import rewriteForAwait from "./for-await";
export default declare(api =>... | 2,879 | 835 |
window.searchData = JSON.parse("{\"kinds\":{\"2\":\"Module\",\"64\":\"Function\",\"128\":\"Class\",\"256\":\"Interface\",\"512\":\"Constructor\",\"1024\":\"Property\",\"2048\":\"Method\",\"65536\":\"Type literal\"},\"rows\":[{\"id\":0,\"kind\":2,\"name\":\"main\",\"url\":\"modules/main.html\",\"classes\":\"tsd-kind-mod... | 10,719 | 4,502 |
import React, { useContext, useEffect } from "react";
import { GlobalContext } from "../context/globalContext";
import Layout from "../components/Layout";
import { Container, Flex } from "../styles/globalStyles";
import {
NavBar,
SwitchButton,
Body,
Heading,
SubPara,
Para,
Content,
} from "../styles/home... | 1,928 | 545 |
const Joi = require('joi')
const fields = {
daysUntilStale: Joi.number()
.description('Number of days of inactivity before an Issue or Pull Request becomes stale'),
daysUntilClose: Joi.alternatives().try(Joi.number(), Joi.boolean().only(false))
.error(() => '"daysUntilClose" must be a number or false')
... | 3,051 | 932 |
(function ($) {
$(document).ready(function(){
if($(window).width() > 767){
$('.home-section').viewportChecker({
classToAdd: 'inView',
offset: '50%'
});
}else{
$('.home-section').viewportChecker({
classToAdd: 'inView'... | 616 | 179 |
module.exports = {
list: require('./list'),
details: require('./details'),
dashboard: require('./dashboard')
};
| 118 | 38 |
;
/**
* 原生JavaScript代码实现
* @author SuZhou LichKin Information Technology Co., Ltd.
*/
/**
* 判断是否为JSON对象
* @param json JSON对象
*/
var isJSON = function(json) {
return (typeof json == 'object') && Object.prototype.toString.call(json).toLowerCase() == "[object object]" && !json.length;
};
/**
* 判断是否为空JSON
* @pa... | 4,749 | 2,085 |
"use strict"
const SchemaHelper = require("./SchemaHelper")
/**
*
*/
class schemaValidator {
/**
*
* @param {{[resourceName: string]: import("../types/ResourceConfig").ResourceConfig}} resources
*/
static validate(resources) {
for(const [resourceName, resource] of Object.entries(resou... | 1,367 | 347 |
export * from './Welcome'
export * from './Logon'
export * from './Confirmation'
export * from './PlantSelect'
export * from './PlantSave'
export * from './UserPlants' | 167 | 52 |
module.exports = function check(str, bracketsConfig) {
// your solution
const stack = [];
const BRACKETS_PAIR = Object.fromEntries(bracketsConfig);
for (let i = 0; i < str.length; i++) {
let topItem = stack[stack.length - 1];
if (BRACKETS_PAIR[topItem] === str[i]) {
stack.pop();
} else if (B... | 444 | 167 |
'use strict';
var TestHelper = require('../../../TestHelper');
var TestContainer = require('mocha-test-container-support');
/* global bootstrapModeler, inject */
var propertiesPanelModule = require('lib'),
domQuery = require('min-dom').query,
domClasses = require('min-dom').classes,
coreModule = require... | 7,240 | 2,158 |
try {
window.$ = window.jQuery = require('jquery');
} catch (e) {
console.log(e);
}
import Vue from 'vue';
import Cookies from 'js-cookie';
import ElementUI from 'element-ui';
import "./firebase"
import App from './views/App';
import store from './store';
import router from '@/router';
import i18n from './lang'; /... | 1,087 | 362 |