text stringlengths 3.07k 16k |
|---|
import React, { useState, useEffect, useRef } from "react";
import applyThreshold from "../algorithms/threshold";
import findContours from "../algorithms/contours";
import { COLORS } from "../../../constants";
function onCropHandlDragStart(e, which, { croppers, setDragInfo }) {
const { left, top } = croppers[which];... |
require('enum').register();
// built on Connect, express provides a clean HTTPS interface
var express = require('express');
var https = require('https');
var http = require('http');
var bodyParser = require('body-parser')
var validator = require('express-validator');
//var serveStatic = require('serve-static')
// J... |
//
// Copyright:: Copyright (c) 2008 Opscode, Inc.
// License:: Apache License, Version 2.0
//
// 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/LICENS... |
const WXAPI = require('../../wxapi/main')
const CONFIG = require('../../config.js')
//const app = getApp()
var app = getApp()
Page({
data: {
showDialog: false,
sessionKey: '',
userId: 0,
applicantId: 0,
error: '',
interviewStatus:''
},
onShow() {
const applicantId=wx.getStorageSync('... |
import { draw_options } from "./map_control.js";
var _oldhide = $.fn.hide;
$.fn.hide = function(speed, callback) {
$(this).trigger("elem.hide");
return _oldhide.apply(this, arguments);
};
export function get_push_point(s, ns, angle, fraction = 100) {
let _oX = ns.geo.long - s.geo.long,
_oY = ns.geo.lat - s.... |
const ipc = require('electron').ipcRenderer
const { remote } = require('electron')
const open = require('open');
const shell = require('electron').shell;
const input = document.querySelector('input');
input.addEventListener('change', updateValue);
function updateValue(e) {
console.log(e.target.value)
ipc.send(... |
const fetch = require('./fetch');
// const Animon = require('animon');
const path = require('path');
const moment = require('moment');
const Appear = require('./appear');
const getAnimation = require('./element_animation');
const MarginTop = 0;
const ImportentSize = 40;
const NormalSize = 12;
class TimelineItem {
... |
import React, { Component } from 'react';
import { connect } from 'dva';
import { formatMessage } from 'umi/locale';
import { stringify } from 'qs';
import Link from 'umi/link';
import {
Row,
Col,
Card,
Avatar,
Button,
Carousel
} from 'antd';
const { Meta } = Card;
import { getTimeDistance } from '@/utils/u... |
/**
* 生成sku表格
* @author json
* @time 2016-1-6 11:06:52
* @version 1.0
*/
var checkbox_total=[]; //记录选中的checkbox值 通过下标和二位数组的方式记录
var combination_data=[]; //记录最新组合值组
var chose_attribute=[]; //记录选中的属性 计算表头
var attributenumber_data=[]; //记录已设置的数量值
var attributeprice_data=[]; //记录已设置的价格值
var checkbox_... |
export * from './Actionscript';
export * from './Android';
export * from './Angular';
export * from './Apiblueprint';
export * from './Applescript';
export * from './Appveyor';
export * from './Arduino';
export * from './Assembly';
export * from './Audio';
export * from './Aurelia';
export * from './Authors';
export * ... |
var pWin = window.parent.parent;
if (window == top) top.location.href = "../";
document.write('<script type="text/javascript" src="' + pWin.url + 'Scripts/jquery/jquery-min.js"></script>');
var loa = {
ci: new Array(6),
$: function () { return document.getElementById ? document.getElementById(arguments[0]) : e... |
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { TimelineLite } from 'gsap';
// import config from 'utils/config';
import ArrowScroll from 'components/arrow-scroll';
import Heading from './Heading';
import Lamp from './Lamp';
import s from './Hero.scss';
const lamps = [
{ ... |
const SearchUtility = require('../../utils/searchUtility');
const searchUtility = new SearchUtility();
const { DataLibrary} = require('../../lib/dataLibrary');
const dataLibrary = new DataLibrary();
const constants = require('../../config/constants');
const SearchHandler = require('../base/searchHandler');
const FAVOR... |
__version__ = "0.5"
function searchable_setup($identifier) {
// create and add the filter form to the identifier (before computing the cache for searching)
// > TODO > styles should be moved to common.css after beta tests
var $form = $("<form>").attr({"id":"searchable_form", "action":"#", "style":"padding: 3px;ba... |
/**
* @function Call the related functions
* @param {$(this)[0].action.affectedRegionId} p_affectedRegionId
* @param {Y or N} p_attrib1
* @param {Y or N} p_attrib2
* @param {HEX Color Code} p_attrib3
* @param {Y or N} p_attrib4
* @param {HEX Color Code} p_attrib5
*/
function caller(p_affectedRegionId, p_... |
var preMarkup = '<!doctype html><html><head><meta charset="utf-8"><link rel="stylesheet" href="../src/nv.d3.css"><script type="text/javascript" src="../lib/d3.v2.js"></script><script type="text/javascript" src="../lib/fisheye.js"></script><script type="text/javascript" src="../nv.d3.js"></script></head><body>';
var m... |
import { material } from './colors/material-colors'
const theme = {
colors: {
grey: material.grey,
primary: material.lightBlue,
secondary: material.green,
tertiary: material.purple,
accent: material.orange,
info: material.blue.m400,
success: material.green.m400,
warning: material.yell... |
'use strict';
const pWaitFor = require('p-wait-for');
const {
getExecutionInputObject,
loadCollection,
loadProvider,
waitForCompletedExecution,
} = require('@cumulus/integration-tests');
const { LambdaStep } = require('@cumulus/integration-tests/sfnStep');
const {
createCollection, deleteCollection,
} = requ... |
const { gql } = require('apollo-server-express');
const typeDefs = gql`
type Post {
_id: ID!
post_text: String!
date_created: String
author: User
reactions: [String]
edited: Boolean
thread: Thread
comments: [Comment]
}
type Portfolio {
... |
import { Sun as SunDef, Planets } from "./SolarSystem.js";
import * as THREE from "./three.module.js";
import { CSS2DObject } from "./CSS2DRenderer.js";
class Sun {
constructor(body, container) {
this.body = body;
this.container = container;
}
get name() { return this.body.name }
get p... |
import $ from 'jquery';
import '../common/lib/jquery.iframe.transport';
import '../common/lib/jquery.fileupload';
import '../common/lib/jquery.md5';
import {
createUUID,
bytesToMB,
bytesToSize,
checkUpLoadFileExist
} from '../common/utils/utils';
import sdkConfig from '../../../sdk_config.js';
const limitFileSi... |
import MagicString from 'magic-string';
import traverse from '@babel/traverse';
import parse from '../parse.js';
import unwrap from './unwrap.js';
const WHITE_SPACE_REGEX = /\s/;
const NEW_LINE_REGEX = /[\n\r]+/;
const NEW_LINE_AT_START_REGEX = /^(\n|\r|(\n\r)|(\r\n))/g;
const NEW_LINE_AT_END_REGEX = /(\n|\r|(\n\r)|(\... |
const vm = require('vm');
const path = require('path');
const jetpack = require('fs-jetpack');
function isFunction(obj) {
return !!(obj && obj.constructor && obj.call && obj.apply);
}
function getMissingKeys(expected, actual) {
return Object.keys(expected).filter(
expectedKey =>
!Object.keys(actual).som... |
import React, { useEffect, useState } from 'react'
import moment from 'moment'
import ToBack from '../components/ToBack'
import { useParams, useLocation } from 'react-router-dom'
import { searchFavorite } from '../recruitment/Details'
import { EditJournal } from '../commonFetch'
const Details = () => {
const [ite... |
const container = document.querySelector('.container');
let conDim = container.getBoundingClientRect();
const gameover = document.createElement('div');
gameover.textContent = "Click here to Start Game And Press up Arrow Key Left/Right Arrow Key to Move";
gameover.style.position ... |
import Vue from "vue";
import App from "./App.vue";
import vuetify from "./plugins/vuetify";
import "./registerServiceWorker";
import router from "./router";
import store from "./store";
import SocketClient from "./api/SocketClient";
import moment from "moment";
import i18n from './i18n'
moment.locale("ru");
const ... |
require("dotenv").config(); // config env first ...
// ================================================
// movie-this
//http://www.omdbapi.com/?i=tt3896198&apikey=685c6d4e
const figlet = require('figlet'),
clc = require('cli-color'),
notice = clc.blue,
error = clc.re... |
const observableModule = require("tns-core-modules/data/observable");
const app = require("tns-core-modules/application");
const frame = require("tns-core-modules/ui/frame");
const dialogs = require("tns-core-modules/ui/dialogs");
const appSettings = require("tns-core-modules/application-settings");
const httpModule = ... |
const d2r = Math.PI / 180
const clip = (v, max) => {
let result
if (v < 0) {
result = v + max + 1
} else if (v > max) {
result = v - max - 1
} else {
result = v
}
return Math.min(Math.max(result, 0), max)
}
export const keyToTile = (key) => {
return key.split(',').map((d) => parseInt(d))
}
... |
divAutDoc = document.createElement("div");
divAutDoc.innerHTML = '';
divAutDoc.style.margin = "10px";
divAutDoc.style.maxWidth = "700px";
divAutDoc = {"Body":divAutDoc};
var svgNS = "http://www.w3.org/2000/svg";
function AutomataImageOptions(Image,Obj)
{
var div = document.createElement("div");
var Initial... |
/**
* created by <NAME>
* laridev
* -life is easy y'r so weak-
* --> tasks :
* task 1 : get the value from progress-bar && number-input
* task 2 : update the password-text based on strength
* task 3 : get options && and update the password-text
* task 4 : work on copy && generate
*
*/
c... |
import * as React from "react";
import { ethers } from "ethers";
import { useEffect, useState } from "react";
import abiFile from "./util/WavePortal.json";
import moment from "moment";
import "./App.css";
import { motion } from "framer-motion";
const filledButtonVariants = {
initial: {
scale: 1,
background:... |
/* eslint-disable no-restricted-syntax */
// import GLOBALS from '../consts/GLOBALS';
import Component from '../component/Component';
import flatten from '../utils/flatten';
import patch from './patch';
import getElementFromQuery from './utils/getElementFromQuery';
import textNode from './utils/textNode';
import explo... |
/*
*
* Things to add to rb!censor:
* ------------------------------
*
*
*/
const Discord = require("discord.js");
const Enmap = require("enmap");
const censor = new Enmap({ name: "censor" });
const bsp = require("better-sqlite-pool");
const { prefixFile } = require("./prefix/custom-prefix.js");
const { onOff } = ... |
"use strict";
const { autocomplete, getAlgoliaResults } = window["@algolia/autocomplete-js"];
const { createQuerySuggestionsPlugin } =
window["@algolia/autocomplete-plugin-query-suggestions"];
const searchClient = algoliasearch(
"GP0DLH6H8N",
"33d2d683d760f0a63181958fabe1665f"
);
const INSTANT_SEARCH_INDEX_NAM... |
console.group("Build Chrome");
// truthy
// falsy
// false
// 0
// ""
// null -> how you as a developer signalize emptiness
// undefined -> how JavaScript signalizes emptiness
// NaN
// =========== =========== <<<<< Chrome Exercise >>>>>> ================= ================
// =========== <<<<< Variables >>>>>> =====... |
#!/usr/bin/env node
// Bitbucket API description
// https://developer.atlassian.com/server/bitbucket/how-tos/updating-build-status-for-commits/
//
// POST https://<bitbucket-base-url>/rest/build-status/1.0/commits/<commit-hash>
// {
// "state": "<INPROGRESS|SUCCESSFUL|FAILED>",
// "key": "<build-key>",
// ... |
import React from 'react';
import { CreatePage, getStructFromFormat, getIDList, getIFList } from 'tfsm-formset/dist';
import 'tfsm-formset/dist/index.css';
import './App.css';
export default class test2 extends React.Component {
onSubmit = (data) => {
console.log(data);
};
render() {
return (
<div>
<Cr... |
/* jshint unused:false */
let Plot = {};;
/* global interact */
$( document ).ready(function() {
});
function dragMoveListener (event) {
'use strict';
console.log('here!');
var target = event.target,
// keep the dragged position in the data-x/data-y attributes
x = (parseFloat(target.getAttribute(... |
// routes
app.route('/api/v1/stripe/charge')
.post(campaigns.charge)
app.route('/api/v1/stripe/customer/:customerId')
.get(campaigns.retrieveCustomer)
.post(campaigns.createCustomer)
.put(campaigns.updateCustomer)
.delete(campaigns.deleteCustomer)
app.route('/api/v1/stripe/card/:customerId')
.get(campaigns.... |
importClass(Packages.com.tivoli.am.fim.trustserver.sts.utilities.IDMappingExtUtils);
importClass(Packages.com.tivoli.am.fim.fedmgr2.trust.util.LocalSTSClient);
importClass(Packages.com.tivoli.am.fim.trustserver.sts.STSUniversalUser);
importClass(Packages.com.tivoli.am.fim.base64.BASE64Utility);
/**
* Utility to get t... |
// 验证页码参数。
function validate(){
var rpcuser = $("#rpcuser");
var rpcpassword = $("#<PASSWORD>");
var rpcport = $("#rpcport");
if($.trim(rpcuser.val()).length == 0){
alert("请输入RPC用户名!"); rpcuser.focus(); return false;
}
if($.trim(rpcpassword.val()).length == 0){
alert("请输入RPC密码!"... |
function hex(buf, start, length) {
const ubuf = new Uint8Array(ArrayBuffer.isView(buf) ? buf.buffer : buf, start, length);
return ubuf.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
}
function text(buf, start, length) {
const ubuf = new Uint8Array(ArrayBuffer.isView(buf) ? buf.buffer : buf,... |
'use strict';
import Chart from 'chart.js';
import DataSource from '../core/core.datasource';
import datasourceHelpers from '../helpers/helpers.datasource';
var helpers = Chart.helpers;
function getDelimiter(url) {
switch (datasourceHelpers.getExtension(url)) {
default:
return ',';
case 'tsv':
return '\t';
c... |
/*
* Copyright (c) 2014 <NAME>, <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, merge, publish, ... |
// JS
import './js/'
// SCSS
import './assets/scss/main.scss'
// CSS (example)
// import './assets/css/main.css'
// Vue.js
window.Vue = require('vue')
// Vue components (for use in html)
Vue.component('example-component', require('./js/components/Example.vue').default)
// Vue init
const app = new Vue({
el: '#a... |
import React, { Component } from 'react';
import { connect } from 'dva';
import moment from 'moment';
import { Form, Radio, Divider, Icon, Button, message, Input } from 'antd';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import layout from "@/utils/layout";
import styles from './LayoutDemo.less';
co... |
// function makeResponsive() {
// var svgArea = d3.select("#scatter").select("svg");
// if(!svgArea.empty()) {
// svgArea.remove();
// }
// svgHeight = 500;
// svgWidth = 960;
// var margins = {
// top: 20,
// right: 40,
// bottom: 60,
// left: 100
// ... |
const http = require('http');
const fs = require('fs');
const path = require('path');
const options = { headers: { authorization: 'Basic YWRtaW46YWRtaW4=' } };
const metatypeHints = JSON.parse(fs.readFileSync(path.join(__dirname, 'metatypeHints.json')));
function getJSON(url, callback) {
http.get(url, options, re... |
$(".testcases").each(function(){
var testCases = $(this).val();
var testCaseLines = testCases.split("\n");
var html = "";
for (var i = 0; i < testCaseLines.length; i++) {
if(testCaseLines[i].startsWith("##")){
html += "<h4 class='testCaseTitle'>" + testCaseLines[i].replace("##","") + "</h4>";... |
/**
* Created by jingpinghong on 2017/1/4.
*/
/**
* Created by jingpinghong on 2017/1/4.
*/
(function () {
checkUserLogin();
var RoadingList = {
init: function () {
this.getTotalList();
},
getTotalList: function () {
currentpage = 1;
$('#current... |
// Copyright (c) 2020, <NAME> and contributors
// For license information, please see license.txt
frappe.ui.form.on('Penalty Issuance', {
refresh: function(frm) {
// get_penalty_list(frm);
if(frm.doc.__islocal){
get_location(frm);
set_issuing_employee(frm);
}
frm.fields_dict[... |
const SCRIPT = {
// push value
OP_0 : 0x00,
OP_FALSE : 0x00,
OP_PUSHDATA1 : 0x4c,
OP_PUSHDATA2 : 0x4d,
OP_PUSHDATA4 : 0x4e,
OP_1NEGATE : 0x4f,
OP_RESERVED : 0x50,
OP_1 : 0x51,
OP_TRUE : 0x51,
OP_2 : 0x52,
OP_3 : 0x53,
OP_4 : 0x54,
OP_5 : 0x55,
OP_6 : 0x56,
... |
/**
* DroneDeploy to Melown-cloud export app
*/
/**
* Global vars
*/
var LOGGED_IN=false;
var OAUTH_WINDOW=null;
var CREDENTIALS = {
access_token: null,
state: null,
action: null
};
var dronedeployApi = null;
var ME = {};
var IMAGES_COLLECTION = [];
/**
* onMeSuccess
* set ME global variable after logg... |
'use strict';
var assert = require('assert');
var ip = require('../lib/ip');
describe('lib/ip', function() {
describe('parse()', function() {
describe('ipv4', function() {
it('should successfully parse v4', function() {
assert.deepEqual(ip.parse('127.0.0.1'), [0x7f, 0x00, 0x00, 0x01]);
a... |
/**
* @license
* MIT License
*
* Copyright (c) 2020 Lyon Software 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 t... |
import { dispatcher } from '../../../../adcirc-events/index'
function dataset ( renderer ) {
var _renderer = renderer;
var _gl = _renderer.gl_context();
var _dataset = dispatcher();
var _views = [];
var _mesh = adcirc.mesh();
var _geometry;
var _current_view;
var _timestep_index = 0... |
import * as props from "./props"
import { isBrowser, isReferrerSameHost, getHost, sendData, isExcludePath, trackOutbound } from "./utils"
import constants from './constants'
/**
* The default options.
*/
const defaults = {}
export const App = (function () {
function App(projectId, options = defaults) {
this.... |
const {
Rectangle,
Text,
Artboard,
Ellipse,
Line,
Path,
SymbolInstance,
LinkedGraphic,
Color
} = require("scenegraph")
const { findArtboardInParent } = require("./scenegraphUtils.js");
const addMappedNodeRecursive = (target, nodeMap) => {
if (!target.name.includes("@ignore") ... |
const express = require('express')
const router = express.Router()
const superagent = require('superagent')
const cheerio = require('cheerio')
const fs = require('fs')
const path = require('path')
let bossDatas = []
/**
* index.js
* [description] - 抓取boss直聘页面数据
*/
let getBossDatas = (res) => {
/* 使用cheerio模块的cher... |
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { Avatar, Checkbox, Col, Row, Grid, List, Drawer, Menu } from 'antd';
import randomColor from 'randomcolor';
import isEmpty from 'lodash/isEmpty';
import isString from 'lodash/isString';
import map from 'lodash/map';
import { ListItemA... |
// NPM
import { StyleSheet, css } from 'aphrodite';
import { Colors } from "../utils/colors";
import Row from './Row';
import Column from './Column';
import p1Wins from "../assets/1p-win.png";
import { RetroUIBorder } from "../utils/styles";
import { dimensionStyles } from "../utils/styles";
const TextBox = (props... |
import React, { Component } from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';
import io from 'socket.io-client'
import InsightAPI from './services/InsightAPI';
import { Layout } from './components/common/Layout';
import './App.css';
import Header from './containers/Header';
import Tabs f... |
/**
* ------------------------------------------------------------------------
* JA Google Chart Module
* ------------------------------------------------------------------------
* Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
* @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
*... |
'use strict'
var xlsx = require('xlsx')
var geocoder = require('./geocoder');
var dataHandler = require('./data_handler');
var panelControl = require('../controls/panel');
module.exports = {
readXlsx: readXlsx,
fullXlsxSolution: fullXlsxSolution
}
var deliveryHeaders = [
'city',
'street',
'postal_code',
'... |
import React, { useState, useEffect, useContext } from "react";
import { ContractContext } from "../App";
import { useMeasure } from 'react-use'
import Cell from './Cell';
import "../styles/Map.css";
import gameBackground from '../images/main_map_small.png';
import Draggable from 'react-draggable';
const imgWidth = 1... |
import { useState, useLayoutEffect } from "react";
import axios from "axios";
import useStateWithCallback from "use-state-with-callback";
import {
dev_site,
itemsGet,
itemGet,
tagsGet,
tagGet,
userLogin,
userRegister,
userValidate,
userPasswordUpdate,
userProfileUpdate,
userEmailUpdate,
userAcco... |
"use strict";
console.log(window.global)
window.global = window
if (Symbol.aspect === undefined) {
Symbol.aspect = Symbol("aspect");
Symbol.pre = Symbol("pre");
Symbol.post = Symbol("post");
Symbol.aspects = Symbol("aspect");
}
class Method {
//mode can be one of Symbol.pre or Symbol.post
constructor(nam... |
const { getValueAsNumber, getValue, getValueAsArray } = require('../utils/helpers')
const { getAllowanceOtherChildren } = require('../utils/support-tables')
const { currency, format, add, subtract, multiply, sum } = require('../utils/currency')
const calcAllowableDeductions = (form, initiate, income) => {
// Main
... |
#!/usr/bin/env node
var generator = require('./lib/generator');
var async = require('async');
var fs = require('fs');
var path = require('path');
var glob = require('glob');
const { program } = require('commander');
program.version('0.0.1');
module.exports = generate;
var FORMATS = {
'json': {template: 'json.templa... |
var dataDokumen = function(){
let data = [];
var t_dokument = $(document);
this.addData = function(string, object){
if(!data[string]){
data[string] = object;
}
}
this.eksekusi = function(){
t_dokument.click(function(e){
if(e.target.dataset.cstarget){
data[e.target.dataset.cstarget].result(e);
}
... |
// SynthMesh scripts
var tabledata;
var tabledataS;
var page = "home"
function load() {
// var linkC = "https://us-central1-absolute-pulsar-232300.cloudfunctions.net/selectCompanies"
// var linkS = "https://us-central1-absolute-pulsar-232300.cloudfunctions.net/selectSynth"
... |
/**
* The MIT License (MIT)
* Copyright (c) 2015-present <NAME> <<EMAIL>>
*/
import LexRule from './lex-rule';
import {EOF} from '../special-symbols';
/**
* Standard macro symbols.
*/
const StandardMacros = {
/**
* End of file macro, matches `$` at the end of the parsing string.
*/
'<<EOF>>': EOF,
};
... |
var HIGHSCORE = null;
function $id(id, parent) {
return (parent || document).getElementById(id);
}
function $listen(node, event, handler) {
if (typeof node == "string") node = $id(node);
node.addEventListener(event, handler);
}
function showNode(node, focus) {
if (typeof node == "string") node = $id(node);
... |
let getDefaultState = () => ({
last_sale: null,
sale: {
reference: '',
payment_method_id: 1,
memo: null,
cashier_id: parseInt(localStorage.getItem('u')),
customer_id: null,
subtotal: 0,
tax: 0,
total: 0,
tendered: '',
change: 0,
balance: 0,
products: [],
tickets: ... |
/* eslint-disable no-param-reassign */
/* eslint-disable-next-line max-len */
const getAutoCorrectedNodeSequenceNumber = (currentSequence, currentIndex, nodes, direction, correctedNodeSequence = {}) => {
const nextIndex = (direction === 'reverse') ? currentIndex - 1 : currentIndex + 1;
const nextNode = nodes[nextIn... |
import React from 'react';
import defaultClasses from './products.css';
import { mergeClasses } from '../../../../../classify';
import { arrayOf, bool, number, oneOf, shape, string } from 'prop-types';
import SlickSlider from 'react-slick';
import Gallery from '../../../../Gallery';
import GET_PRODUCTS_BY_SKU from '../... |
import React, {
useState,
useCallback,
useEffect,
useMemo,
useRef,
} from "react";
import {
Button,
Form,
FormGroup,
Input,
Table,
Modal,
ModalHeader,
ModalFooter,
ModalBody,
} from "reactstrap";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
faSort,
faSortDo... |
"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];
})... |
import ReactDOM from "react-dom";
import { make } from "../dom";
import ListEditor from "./ListEditor.jsx";
export class TipTapList {
constructor({ data, api, config, readOnly }) {
this.api = api;
this.config = config || {};
if (!data || Object.keys(data).length === 0) {
this.data = {
ht... |
const {NotFoundError} = require('../const')
const dwebapi = require('@dpack/api')
const parseRange = require('range-parser')
const {identifyStream} = require('../helpers')
const directoryListingPage = require('../templates/directory-listing-page')
const joinPaths = require('path').join
// exported api
// =
module.exp... |
import { paneActiveEvt } from '../../redux/paneReduce';
import storage from '../../redux/storage';
const $ = require('jquery');
const _ = require('underscore');
const Backbone = require('backbone');
Backbone.$ = $;
const MainEvents = require('../../events/main-events');
const CommentEvents = require('../../events/co... |
var tau = 6.283185307179586
function clamp(x, a, b) { return x < a ? a : x > b ? b : x }
var C = 128, samples_per_chunk = C
var P = 128, chunks_per_window = P
var Q = 256, frequencies_sampled = Q
var F = 32768, samples_per_second = F
var L = F / 64, samples_per_slice = L
var Sw = 256
var hmin = -40, hmax = 24
function... |
'use strict';
// ------------------------------------------------
// CONSTANTS
// ------------------------------------------------
const BOARD_X_SIZE = 10;
const PIECE_GRID_SIZE = 4;
const NUMBER_OF_BOTTOM_BOARDS = 3;
// ------------------------------------------------
// VARIABLES
// -------------------------------... |
var extend = require("./extend");
var Promise = require("./promise");
var Revalidator = require("revalidator");
var Restify = require("restify");
var URL = require("url");
var _ = require("underscore");
(function (module) {
"use strict";
/* Special options parsed from the extend ... |
import React, { useEffect, useState } from 'react'
import { useHistory } from 'react-router'
import styled from 'styled-components'
import axiosWithAuth from '../Utils/axiosWithAuth'
import Comments from './Comments'
import EditPost from './EditPost'
import * as timeago from 'timeago.js'
const StyledPost = styled.div`... |
#!/usr/bin/env node
/*
* tlddoc-util
* https://github.com/NKjoep/tlddoc-util
*
* Copyright (c) 2014 <NAME>
* Licensed under the MIT license.
*/
var _ = require('underscore'),
argv = require('minimist')(process.argv.slice(2)),
fs = require('fs'),
handlebars = require('handlebars'),
parseString = require(... |
var fs = require("fs");
var notify = require('gulp-notify');
// var notifyConfig = require('../../tars-config').notifyConfig;
var tarsConfig = require('../../tars-config');
var modifyDate = require('./modify-date-formatter');
var path = require('path');
// var recursive = require('recursive-readdir');
// var readDir = ... |
const _ = require('lodash');
const t = require('@babel/types');
const traverse = require('@babel/traverse').default;
const { getStorySubject } = require('../../metadata/utils/angular/story-subject');
const { INJECTED_SOURCE_PLACEHOLDER } = require('../../addons/constants');
const { getAvailableKnobsFunctions, isKnownKn... |
import { css, html, LitElement } from "lit-element";
import { translate as t } from "lit-translate";
import { emit } from "../host.js";
import "../button/exports.js";
import { scss, events, MDCDataTable } from "../table/exports.js";
import { cell, checkbox, columnheader, columnheaderCheckbox } from "./html.js";
cons... |
// import React, { useState } from 'react'
import React, { Component } from 'react'
import Persons from '../../components/Persons'
import styled from 'styled-components'
const Wrapper = styled.div`
text-align: center;
`
const Text = styled.p`
color: ${({ humans }) => humans.length <= 2 && 'red'};
font-weight: ${({... |
var Alloy = require('/alloy'),
Backbone = Alloy.Backbone,
_ = Alloy._;
function __processArg(obj, key) {
var arg = null;
if (obj) {
arg = obj[key] || null;
}
return arg;
}
function Controller() {
require('/controllers/' + 'BaseController').apply(this, Array.prototype.slice.call(arguments));
this._... |
'use strict'
var minilint = require('./minilint')
exports['should check strict mode'] = function(t) {
t.ok(!lint('').contains('strict mode'))
t.ok(!lint('\n\n\n').contains('strict mode'))
t.ok(!lint(function() { 'use strict' }).contains('strict mode'))
t.ok(lint(function() { 'hello' }).contains('strict mode')... |
import React from 'react';
import ReactDOM from 'react-dom';
import './css/reset.css';
import './css/layout.css';
import './css/grid.css';
import './css/typography.css';
import './css/forms.css';
import './css/ui.css';
import './css/helpers.css';
class SinglePokemon extends React.Component {
constructor(props){
... |
function prepare_file_before_post(em) {
if (em.file) {
em.spiner_visible = true;
em.errors_visible = false;
if (em.file.size > 2621440) {
em.errors = [
`Превышен максимальный размер файла.</br>Ваш файл ${em.file.size} B.</br>
Максимальный размер файла - 2621440 B (2.5... |
const argv = require('yargs').argv
const webpack = require('webpack')
const cssnano = require('cssnano')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const project = require('./project.config')
const debug = require('debug')('app:config:webpac... |
import React, { Component } from "react";
import { StatusBar, View, StyleSheet, ScrollView, Image, Text, TouchableOpacity, Dimensions, TouchableHighlight,Modal, findNodeHandle } from "react-native";
import { GameEngine } from "react-native-game-engine";
import { Stopwatch, Timer } from 'react-native-stopwatch-timer'
im... |
'use strict';
const core = require('@actions/core');
const github = require('@actions/github');
const semver = require('semver');
const getJSON = require('get-json');
async function getNodeVersions(type = 'nodejs') {
const index = await getJSON(`https://${type}.org/dist/index.json`).catch((e) => {
console.error(`E... |
/**
* Created by Administrator on 2017-08-30.
*/
var uuid = sessionStorage['uuid'];
var path=sessionStorage['basePath'];
function getMyRedCard(){
$.ajax({
url:path+"manager/getRecentBet",
data:{uuid:uuid,pageNum:1},
success:function(data){
var list = JSON.parse(data);
console.dir(list.redCard);
... |
/*
* moleculer-fake
* Copyright (c) 2019 MoleculerJS (https://github.com/moleculerjs/moleculer-addons)
* MIT Licensed
*/
"use strict";
const Fakerator = require("fakerator");
const _ = require("lodash");
module.exports = {
name: "fake",
/**
* Default settings
*/
settings: {
locale: null, // default is... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.