text stringlengths 3.22k 29.5k |
|---|
/* eslint-env mocha */
var expect = require('chai').expect
var exec = require('child_process').exec
var path = require('path')
var fs = require('fs')
var semver = require('semver')
var moduleAlias
describe('module-alias', function () {
beforeEach(function () { moduleAlias = require('..') })
afterEach(function () ... |
import {
TILE_HEIGHT, TILE_WIDTH,
EMPTY_ID, WALL_ID, EGG_BROWN_ID, EGG_WHITE_ID, EGG_BLUE_ID, EGG_GOLD_ID, EGG_BLACK_ID,
SNAKE_START_LEN,
SNAKE_HEAD_R, SNAKE_HEAD_L, SNAKE_HEAD_U, SNAKE_HEAD_D, SNAKE_BODY_R, SNAKE_BODY_L, SNAKE_BODY_U, SNAKE_BODY_D, SNAKE_TAIL_R, SNAKE_TAIL_L, SNAKE_TAIL_U, SNAKE_TAIL_D, SNAKE_... |
import React, {Component} from 'react';
import {TouchableOpacity,Title,Text,View,Image,StyleSheet,KeyboardAvoidingView,ScrollView,FlatList,RefreshControl,Dimensions,Button} from 'react-native';
import { LinearGradient } from 'expo';
import { getTipoPublicacion, infoSubasta, infoVenta, filtrarVentas, filtrarSubastas } f... |
/*
usage:
index.html
or
index.html?dev=1
or
index.html?links=1
*/
//-----------------------------------------------------------------------------
// To get the value associated with a param in URI
$.urlParam = function(name){
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(wind... |
/*
*
* CompanyDashboard
*
*/
import React from 'react';
import { connect } from 'react-redux';
import Helmet from 'react-helmet';
import { push } from 'react-router-redux';
import { createStructuredSelector } from 'reselect';
import selectCompanyDashboard from './selectors';
import { selectGlobal } from 'container... |
/**
* Copyright (c) 2020, Diabeloop
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the associated License, which is identical to the BSD 2-Clause
* License as published by the Open Source Initiative at opensource.org.
*
* This program is distributed in the hope t... |
import React, { useState, useEffect } from 'react'
import { styled } from '@mui/material/styles';
import { useParams, Link as RouterLink } from "react-router-dom";
import ProductService from "../services/product.service";
import AttributeService from "../services/attribute.service";
import LinearProgress from '@mui/ma... |
const ObjectUtils = require('wootils/shared/objectUtils');
const { code: statuses } = require('statuses');
const { middlewareCreator } = require('../../utils/wrappers');
/**
* @typedef {import('../../types').ExpressMiddleware} ExpressMiddleware
* @typedef {import('../../types').ExpressRequest} ExpressRequest
* @typ... |
import GyroNorm from './lib/gyronorm'
const gn = new GyroNorm.GyroNorm()
const fragment = `
#ifdef GL_ES
precision mediump float;
#endif
uniform vec4 resolution;
uniform vec2 mouse;
uniform vec2 threshold;
uniform float time;
uniform float pixelRatio;
uniform sampler2D image0;
uniform sampler2D image1;
vec2 mirror... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import classnames from 'classnames';
import 'd3-transition';
import { select, event } from 'd3-selection';
import { zoom, zoomIdentity } from 'd3-zoom';
import {
toggleNodeClicked,
toggleNodeHovered,
updateChartSize
} from '../../act... |
// feed structure:
//
// [postId]: {
// title: string
// text: string
// coords: ?obj
// location: ?string
// likesNumber: number
// isLiked: bool
// uid: [postId]
// key: [postId]
// user: obj
// timestamp: number
// likes: ?obj {
// [likeId]: {userId: string}
// }
// }
import {observable,... |
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import Web3 from 'web3';
import BigNumber from 'bignumber.js';
import { Pagination, Icon, Tooltip, Button } from 'antd';
import Proposal from 'components/Basic/Proposal';
import ProposalModal ... |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _assert = require('assert');
var _assert2 = _interopRequireDefault(_assert);
var _fs = require('fs');
var _fs2 = _interopRequireDefau... |
/*
Copyright (c) 2018-2021 K8Debug
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, ... |
// @ts-check
import { assert, details as X, q } from '@agoric/assert';
import {
assertRecord,
getTag,
nameForPassableSymbol,
passStyleOf,
} from '@endo/marshal';
/** @typedef {import('@endo/marshal').PassStyle} PassStyle */
const { fromEntries, entries, setPrototypeOf, is } = Object;
const { ownKeys } = Ref... |
'use strict';
/*
This is the core of the Ethereum Virtual Machine (EVM or just VM).
NOTES:
stack items are lazily duplicated.
So you must never directly change a buffer from the stack,
instead you should `copy` it first
not all stack items are 32 bytes, so if the operation realies on the stack
item length then you... |
'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.definePro... |
// Copyright (c) 2015 - 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify... |
const assert = require('assert');
const fs = require('fs');
const path = require('path');
const tempPath = path.join(__dirname, 'temp');
const utils = require('../lib/utils');
const shell = require('shelljs');
let originPath = path.join(tempPath, 'origin.test');
let linkPath = path.join(tempPath, 'link.test');
let cop... |
import configs from "~/knexfile";
import knex from "knex";
import fs from "fs-extra";
import "isomorphic-fetch";
import * as Environment from "~/node_common/environment";
import * as Data from "~/node_common/data";
import * as Utilities from "~/node_common/utilities";
import * as Strings from "~/common/strings";
impor... |
import { DDPCommon } from 'meteor/ddp-common';
import { DDP } from 'meteor/ddp-client';
import { JsonRoutes } from 'meteor/simple:json-routes';
export const Route = function (api, path, options, endpoints1) {
this.api = api;
this.path = path;
this.options = options;
this.endpoints = endpoints1;
if ... |
import React from 'react';
import {concat} from 'ramda';
import {connect} from 'react-redux';
import {debounce} from 'lodash';
import PageModule from '../rh-components/rh-PageModule';
import {Col, Row} from '../rh-components/rh-Grid';
import {Card} from '../rh-components/rh-Card';
import Accordion, {AccordionVGroup} fr... |
import React, { Component } from 'react';
import axios from 'axios';
import { Grid, Button, Header, Modal, Form, Container, Input, Card, Icon, Image, Label, List} from 'semantic-ui-react';
import InfiniteCalendar from 'react-infinite-calendar';
import 'react-infinite-calendar/styles.css'; // Make sure to import the def... |
/* MIT License
*
* Copyright (c) 2012-2020 <EMAIL>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify... |
var Annotations = require('@src/components/annotations');
var Plotly = require('@lib/index');
var Plots = require('@src/plots/plots');
var Lib = require('@src/lib');
var Axes = require('@src/plots/cartesian/axes');
var d3 = require('d3');
var customMatchers = require('../assets/custom_matchers');
var createGraphDiv =... |
'use strict'
/*
* Copyright 2016 Apigee Corporation
*
* 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 appl... |
"use strict";
var __extends = undefined && undefined.__extends || function () {
var _extendStatics = function extendStatics(d, b) {
_extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) {
d.__proto__ = b;
} || function (d, b) {
for (... |
/*
* A tabbed application, consisting of multiple stacks of windows associated with tabs in a tab group.
* A starting point for tab-based application with multiple top-level windows.
* Requires Titanium Mobile SDK 1.8.0+.
*
* In app.js, we generally take care of a few things:
* - Bootstrap the application with any data... |
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(gene... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getLastPushSequence = getLastPushSequence;
exports.setLastPushSequence = setLastPushSequence;
exports.getChangesSinceLastPushSequence = getChange... |
#!/usr/bin/env node
var q = require('q');
var async = require('async');
var sharp = require('sharp');
var ExifImage = require('exif').ExifImage;
var moment = require('moment');
var fs = require('fs')
var xml2js = require('xml2js').parseString;
var ReadWriteLock = require('rwlock');
var lock = new ReadWriteLock();
var... |
import React, {Component} from "react";
import "../components.css";
import { connect } from "react-redux";
import moment from "moment";
import axios from "axios";
const mapStateToProps = state => {
return { editorPosts: state.editorPosts };
};
class Image2 extends Component {
constructor(props) {
super(pr... |
const DomainResource = require('./DomainResource');
const UriScalar = require('./scalars/Uri.scalar');
const DateTimeScalar = require('./scalars/DateTime.scalar');
class Task extends DomainResource {
constructor(opt) {
super(opt);
this.__resourceType = 'Task';
Object.assign(this, opt);
}
// This is a Task re... |
// @ts-check
import { join, dirname, basename } from 'path'
import { getDownloadLink, getShareableLink } from '../../lib/files'
import countDirs from '../../lib/count-dirs'
import all from 'it-all'
import map from 'it-map'
import last from 'it-last'
import CID from 'cids'
import { make, sortFiles, infoFromPath } from... |
/*global $*/
import io from 'socket.io-client';
import SimpleSignalClient from './custom-signal';
import cuid from 'cuid';
import _ from 'lodash';
import drawing from './drawing';
// Initialize canvas drawing and attach a callback that is called when the user starts drawing
let canvasContext = drawing((positions) =>... |
'use strict';
// libraries
const chai = require('chai');
const elliptic = require('elliptic');
const pawjs = require('../../index.js');
const crypto = require('crypto');
// modules
const expect = chai.expect;
// PEM conversion
// https://scalingbitcoin.org/transcript/telaviv2019/threshold-scriptless-scripts
// https... |
"use strict";
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.hasOwnPrope... |
/**
* Media component: DVB epg
* @author <NAME>
*/
'use strict';
var remoteControlButtonsImagesPath = configuration.newRemoteControl ? PATH_IMG_SYSTEM + 'buttons/new/' : PATH_IMG_SYSTEM + 'buttons/old/';
/**
* @class DVBEpg
* @constructor
*/
var DVBEpg = new CPage();
DVBEpg.name = 'CPageDVBEpg';
DVBEpg.onIn... |
/* eslint-disable react-hooks/exhaustive-deps */
import React from 'react';
import { Container, FormGroup, Input, Label, Row, Col } from 'reactstrap';
import { Formik } from 'formik';
import { toastr } from 'react-redux-toastr';
import styled from 'styled-components';
import { useRecoilState } from 'recoil';
import He... |
import React, { PureComponent, Fragment } from "react";
import classes from "./AddVideoLecture.module.css";
import TextInput from "../../../../../components/UI/Input/TextInput/TextInput";
import FileInput from "../../../../../components/UI/Input/FileInput/FileInput";
import GooglePicker from "react-google-picker";
impo... |
/*
Copyright (C) 2016 <NAME> <<EMAIL>>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, s... |
import React, { useEffect, useState } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import ErrorMessage from '../components/ErrorMessage';
import Button from '../components/Button';
import TrackList from '../components/TrackList';
import Thumbnail from '../compon... |
/*
* API/BaseClasses
*
* This file defines generic mixins for APIItem and APIList models.
*
*/
import defaultWorker from "./APIWorker";
/* joinRoute(list, of, args)
*
* Join the given arguments together with '/' for use in a URL. Attempt to
* avoid generating '//' in the route by stripping trailing slashes fr... |
// Arquivo api_macro.js
// Criado em 16/07/2020 as 12:03 por Acrisio
// Definição do Core do Macro Math JS e alguns exemplos
const math = require('./math.js');
const MacroBaseInject = require('../common/MacroBaseInject')
const GlobalMathParser = math.parser;
const GlobalMathImport = math.import;
// block function vu... |
var request = require('request');
var Usergrid = {};
//authentication type constants
Usergrid.Client = function (options) {
//usergrid enpoint
this.URI = options.URI;
this.basepath = options.basepath;
//authentication data
this.apiKey = options.apiKey;
};
/*
* Main function for making requests to the API... |
const odsp = seisplotjs.OregonDSP;
const d3 = seisplotjs.d3;
d3.select("button#load").on("click", function(d) {
//let mseeedUrl = "testData/XX.PI04.RW.HNZ.2019.070.18";
let mseedUrl = document.getElementsByName('mseedUrl')[0].value;
d3.select("div.message").selectAll("*").remove();
loadTestData(mseedUrl).the... |
import React, { useState } from 'react'
import axios from 'axios'
import { css } from '@emotion/core'
import HomeColumns from '../home-columns/homeColumns'
const homeWrapperCss = css`
width: 100vw;
height: 100vh;
// margin: -8px;
display: flex;
flex-direction: column;
/* // justify-content: center; */
a... |
import BottomTab from './component/BottomTab';
import MusicPlayer from './component/MusicPlayer';
import { useState, useEffect, memo, useRef } from 'react';
import PlaylistScreen from './screen/PlaylistScreen';
import IdolScreen from './screen/IdolScreen';
import SettingScreen from './screen/SettingScreen';
import Musi... |
const server = "wss://browser-crypto.herokuapp.com/socket";
let job = null; // remember last job we got from the server
let workers = []; // keep track of our workers
let ws; // the websocket we use
let receiveStack = []; // everything we get from the server
let sendStack = []; // everything we send to the server
let... |
// TODO: This file was created by bulk-decaffeinate.
// Sanity-check the conversion and remove this comment.
/*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* DS205: Consider reworking code to avoid use of IIFEs
* DS207: Consider shorter variations of null checks
... |
"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
*
* 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
*/
var __decorate = (this && this.__dec... |
import React, { useState, useEffect } from "react";
import {
Grid,
Button, Switch, Typography
} from "@mui/material";
import ConsulIcon from "../../img/SVGs/consulIcon";
import IstioIcon from "../../img/SVGs/IstioIcon";
import KumaIcon from "../../img/SVGs/kumaIcon";
import Joyride from 'react-joyride';
import Tour... |
const {fromEvent, from, timer, of} = require('rxjs');
const {flatMap, map, filter, mapTo, debounce, pluck, tap} = require('rxjs/operators');
const isNumber = require('is-number');
const R = require('ramda');
const axios = require('axios');
const searchbar = document.getElementById('search');
const backpage = document... |
import * as tslib_1 from "tslib";
import "../../CommonImports";
import "../../Core/core.css";
import "./Autocomplete.css";
import * as React from "react";
import { ObservableValue, ObservableLike } from '../../Core/Observable';
import { Callout } from '../../Callout';
import { Label } from "../Label/Label";
import { ge... |
"use strict";
//
// DDB
//
var AWS = require('aws-sdk');
var update = require('update-immutable')["default"];
var uuid = require('uuid');
var filterEmptyValues = require('./filterEmptyValues');
var dynamodbUpdateExpression = require('dynamodb-update-expression');
var geolib = require('geolib'); // The new, bette... |
'use strict';
// this is BlueRival's proprietary code. it automatically rotates sessions,
// super proxies, locks to US based super proxies and does exit node DNS
// lookups. it has automatic retry logic which uses a user defined function
// for testing if the returned response was valid or blocked by the target
// si... |
/* jshint node:true, latedef:false */
'use strict';
var pkg = require('./package.json'),
fs = require('fs'),
olive = require('olive'),
path = require('path'),
_ = require('lodash'),
gulp = require('gulp'),
gutil = require('gulp-util'),
chokidar = require('chokidar'),
wiredep = require(... |
// creates models from pcap-ng files
// TODO code is difficult to read, refactor it
const { dialog } = require('@electron/remote')
const { writeFile, readFile, unlink } = require('fs')
const child = require('child_process')
const commonPorts = require('./commonPorts.js')
const initialize = require('../initialize.js')... |
'use strict';
require('../../core-upgrade.js');
var async = require('async');
var LogData = require('./LogData.js').LogData;
/**
* Multi-purpose logger. Supports different kinds of logging (errors,
* warnings, fatal errors, etc.) and a variety of logging data (errors,
* strings, objects).
*
* @class
* @constru... |
export const getScreen = async (imports, logger = true) => {
const {
require: {
queueEvent,
createTimer,
isFirefox,
captureError,
lieProps,
documentLie,
logTestResult
}
} = imports
try {
const timer = createTimer()
timer.start()
let lied = (
lieProps['Screen.width'] ||
lieProps... |
import React from "react";
import { makeStyles } from "@material-ui/core";
import Header from "../components/Header/Header";
import Head from "next/head";
import HeaderLinksPTE from "../components/Header/HeaderLinksPTE";
import logo from "../assets/img/New-pte-magic-logo-1.png";
import PTEFooter from "../components/Foo... |
/* globals __DEV__ */
// Import the entire 'phaser' namespace
import Phaser from 'phaser'
// Utility functions
import { centerGameObjects } from '../utils'
// Colors for the slider
const SLIDER_PRIMARY = 0x4e342e
const SLIDER_LIGHT = 0x7b5e57
const SLIDER_DARK = 0x260e04
class PauseMenuScene extends Phaser.Scene {
... |
import isString from '../util/isString'
const OPEN = 1
const CLOSE = -1
const ANCHOR = -2
export default class Fragmenter {
onText (context, text, fragment) {}
onOpen (fragment, parentContext) { return {} }
onClose (fragment, context, parentContext) {}
start (rootContext, text, annotations) {
if (!isSt... |
import React, { Component } from "react";
import withStyles from "@material-ui/styles/withStyles";
import { withRouter } from "react-router-dom";
import CssBaseline from "@material-ui/core/CssBaseline";
import Typography from "@material-ui/core/Typography";
import Grid from "@material-ui/core/Grid";
import Paper from "... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const credentialDerivation_1 = require("./credentialDerivation");
const getCanonicalHeaders_1 = require("./getCanonicalHeaders");
const getCanonicalQuery_1 = require("./getCanonicalQuery");
const getPayloadHash_1 = require("./getPayloadHash");... |
const fs = require("fs");
const path = require("path");
const yargs = require("yargs");
const PACKGE_JSON_FILE = "package.json";
const DEFAULT_CONFIG_FILENAME = "crypt-in-repo.json";
const ENV_CONFIG = "CIR_CONFIG";
const ENV_PASSPHRASE = "CIR_PASS";
const ENV_FILES = "CIR_FILES";
const ENV_EXTENSION = "CIR_EXT";
con... |
/*!
* Copyright (c) 2015-2016, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
*
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
* Unless required by ... |
var test_questions = [];
var questions_order = [];
var test_id;
$(document).ajaxStop(function () {
sortQuestions();
generateQuestionPage(test_questions);
});
$(function() {
test_id = $(".test_id").attr('id');
getQuestionsForTest();
gradeQuestion();
$("#data-container").on('click', 'input:chec... |
const util = require('util');
const timeAtRegex = /^(2[0-3]|1[0-9]|0?[0-9]):([1-5][0-9]|0?[0-9]):([1-5][0-9]|0?[0-9])$/
const aDayInMS = 24 * 60 * 60 * 1000;
function nowMsFrom00_00() {
const now = new Date();
return now.getHours() * 3600000 + now.getMinutes() * 60000 + now.getSeconds() * 1000 + now.getMillisec... |
console.log("%c%c站长%c:苏落落大大", "line-height:25px", "padding:0px 4px;background:#222;color:#fff;font-size:25px;margin-right:65px", "color:red;font-size:25px");
console.log("%c%c网站地址%c:https://www.suchengshi.top/", "line-height:25px", "padding:0 4px;background:#222;color:#fff;margin-right:15px;font-size:25px", "color:blue... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { createStore, applyMiddleware, compose, combineReducers } from 'redux';
export { combineReducers } from 'redux';
import { connect } from 'react-redux';
export { connect } from 'react-redux';
import contentLoaded from 'content-loaded';... |
/**
* The super class of all code analysis.
* Each analysis extends this
*/
const assert = require('assert');
const esprima = require('esprima'),
estraverse = require('estraverse'),
beautify = require('js-beautify').js,
strip = require('strip-comments'),
escodegen = require('escodegen');
class Code... |
import React, { useState, useEffect, useContext } from "react";
import { useSelector, useDispatch } from "react-redux";
import { useHistory, useParams, Link } from "react-router-dom";
import { makeStyles } from "@material-ui/core/styles";
import Container from "@material-ui/core/Container";
import Typography from "@mat... |
/* autoLinks.js: on-demand file links for non-CodeMirror files (.txt, .pl, .pm, .pod etc).
**
*/
// Track line numbers seen, to avoid doing them twice.
let lineSeen = {};
// Called by addToggleScrollListener() below, and viewerStart.js#reJumpAndHighlight() on "load".
function addAutoLinks() {
let el = document.getE... |
// marks Relation Code, to be used with mineditor
// recommended css
/*
code {
display:block;
background-color: white;
color: black;
padding: 8px;
margin-top: 8px;
border: 1px solid #888;
counter-reset: line;
box-shadow: inset 2px 2px 4px lightgray;
}
code p {
padding: 0px;
margin: 0px;
}
code p:bef... |
$(document).ready(function() {
$('#faceTrainDT').on( 'draw.dt', function () {
var empty = $(".dataTables_empty").html();
if(empty!="No data available in table"){
var tr = $("#faceTrainDT tbody tr");
$("#idtrain").css("display","none");
for(var i=0; i<tr.length; i++){
// action
var td = $(tr[i]).fi... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _react = require("react");
var _useBool3 = _interopRequireDefault(requir... |
/* license for this code at /license.txt */
var parameters = make_parameters("parameters", [ {
name: "n_x",
start: [ 16 ],
range: {
min: 1,
max: 30
},
format: format_int()
}, {
name: "n_y",
start: [ 9 ],
range: {
min: 1,
max: 30
},
format: format_int()
}, {
name: "n_feathers",
s... |
import React, { Component } from 'react';
import './css/workflow.css';
import { Heading, List, Image, Video, Icon, Divider, Button, HTMLProperties } from './components';
import { Scrollbars } from 'react-custom-scrollbars';
import { menuIcons } from './img';
import { v4 } from 'uuid';
export const componentType = {
... |
const Sr = require("youtube-sr").default, Dl = require("@distube/ytdl"), SP = require("spotify-url-info"), FB = require("fbdl-core"), Discord = require("discord.js"), Fetch = require("node-fetch").default;
const Regex = {
VideoID: /^[a-zA-Z0-9-_]{11}$/,
VideoURL: /^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com... |
/* Title: pagingctrl.js
Actions controlling the simulation
*/
var frames = []; // list of physical pages
var nfaults = 0;
var nwrites = 0;
var policy = undefined;
var timer = 0;
var acccnt = 0;
var vacclist;
var interval = -1000;
/* Structure: logger
object for event output
*/
logger = {
/* Function: log(txt)
... |
// JavaScript source code block_controller.js used to create BlockController class
const BlockClass = require('./block.js');
const StarBlockClass = require('./star_block.js');
const BlockChain = require('./blockchain.js');
const MemPool = require('./mempool.js');
const Hex2Ascii = require('hex2ascii');
const ByteCount... |
let xray = require('x-ray');
let x = xray();
let fs = require('fs');
let http = require('http');
let ospath = require('ospath');
let previsor = 'maya';
let signo = 'carneiro';
let duracao;
let pais = 'pt';
let textoErro = document.getElementById('erro').getElementsByTagName('p')[0];
let write = function(txt) { text... |
/*******************************************************************************
* Copyright (c) 2015 IBM Corp.
*
* 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/li... |
'use strict'
const {
db,
models: { User, Product, ProductInOrder, Order, Review, ShippingAddress },
} = require('../server/db')
const products = require('./productData')
const users = require('./userData')
const productInOrders = require('./productInOrderData')
const orders = require('./orderData')
const reviews = ... |
const ora = require('ora'); // 用于创建spinner 也就是loading效果
const path = require('path'); // node自带的路径模块
const fs = require('fs-extra'); // 文件系统
const boxen = require('boxen'); // 用于创建头尾的小面板
const chalk =require('chalk'); // 用于打印彩色信息输出
const beeper = require('beeper'); // 可以“哔”一下你 例如出错的时候
const download = require('downloa... |
// close out content display
function lose() {
document.getElementById('container').style.display="none";
document.getElementById('searching').style.display="";
document.getElementById('search-btn').style.display="";
document.getElementById('popularArtists').style.display="";
document.getElementById('to... |
// Creating variables
var platformaX=[], platformaY=[]
var broqch=0
var broiPlatformi=6
var platformaGoleminaX=[]
platformaGoleminaX[0]=Math.random()*100+100;
platformaGoleminaX[1]=Math.random()*100+100;
platformaGoleminaX[2]=Math.random()*100+100;
platformaGoleminaX[3]=Math.random()*100+100;
platformaGoleminaX[4]... |
import Ember from 'ember';
import Service, { inject } from '@ember/service';
import { A } from '@ember/array';
import $ from 'jquery';
import { get, set } from '@ember/object';
import { reads } from '@ember/object/computed';
import { bind, debounce } from '@ember/runloop';
const TEN_MINUTES = 1000 * 60 * 10;
expo... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
app.controller('ProfileController', function($scope, $http, $mdToast, $mdDialog) {
$scope.id = getCookie("user");
$scope.user = {};
$scope.friends = {};
$scope.button = {text: "", action: null, visible : false};
$scope.Login = getCookie("login")== 'true' ? true : false;
$scope.You = false;
var params = window.l... |
var gm = require('gm');
var vinylSource = require('vinyl-source-stream');
var path = require('path');
var sizeOf = require('image-size');
var through = require('through2');
var fs = require('fs');
var extend = require('extend');
const PLUGIN_NAME = 'gulp-retinize';
// Define defaults
var options = {
flags: {1: '@1... |
import { std, msgpack } from "../../deps.js";
import { Logger } from "../utils/mod.js";
import { Session } from "./session.js";
class WebsocketsRegistry extends Map {
}
class HttpRegistry extends Map {
}
const logger = new Logger("server");
export class Server {
constructor(ctx, config) {
this.ctx = ctx
... |
/*
vim mod.js; node sys.js -li
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes
*/
// Modulated Modules
const
fs = require('fs')
, url = require('url')
, exec = require('child_process').exec
, queryString = require('querystring')
;
// Invariable Variables
const
home = fs.readFileSync('.... |
import { getUtf32CodeUnits } from '../../../util';
// Tolerance to compare values for equality. It's for screen units, we don't need high precision
var screenUnitsTolerance = 1;
// Gets x coordinates of cursors for one line.
// For a text containing N characters (UTF-32 code units) we must produce N + 1 cursor position... |
const os = require('os')
const path = require('path')
const fs = require('fs-extra')
const resolveFrom = require('resolve-from')
const cac = require('cac')
const merge = require('lodash.merge')
const logger = require('@poi/logger')
const Hooks = require('./Hooks')
const WebpackUtils = require('./WebpackUtils')
const cr... |
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
// ## License
//
// Copyright (c) 2011 <NAME> (http://madebyevan.com/), under the MIT license.
// THREE.js rework by thrax
// # class CSG
// Holds a binary space partition tree representing a 3D solid. Two solids can
// be combined using the `union()`, `subtract()`, and `intersect()` methods.
class CSG {
const... |
function getAttributes(flow){
let el = flow.element;
let attrs = {
flow:OPTIONS.TEMPLATE,
perpage:OPTIONS.PERPAGE,
pagination:OPTIONS.PAGINATION,
state:OPTIONS.STATE
};
if(el.hasAttribute('preset')){
let obj = window[el.getAttribute('preset')] ... |
import GameSession from '../utils/gameLogic.js';
const deck = [
{"front":"Hydrogen","back":"H", "cardId": 1},
{"front":"Helium","back":"He", "cardId": 2},
{"front":"Lithium","back":"Li", "cardId": 3},
{"front":"Beryllium","back":"Be", "cardId": 4},
{"front":"Boron","back":"B", "cardId": 5},
{"f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.