text stringlengths 2 1.04M |
|---|
'use strict';
/**
* Creates a slice of `array` excluding elements dropped from the beginning, until `predicate` returns falsy.
* The predicate is invoked with three arguments: (`value`, `index`, `array`).
*
* @param {Array} array The array to process.
* @param {function} predicate The function invoked per iterati... |
/*
Created By Erik Myers 8/16/2018
CONFIG FILE FOR USE WITH SPARROW-Midcontinental
THIS CONFIG REMOVES CATCHMENT AND AGGREGATE LABELS FROM THE CHARTOUTFIELS OBJECTS TO SHORTEN CHART AND DISPLAYED METRIC LABELS.
ALSO uses SPARROWID and ST_SPARRID in place of COMID, ST_COMID
*/
var appTitle = "2012 SPARROW Models for t... |
context('font-size test', () => {
it('has font-sizes for desktop', () => {
cy.visit('/');
cy.viewport(1000, 800);
cy.get('h1').should('have.css', 'font-size', '100px');
});
it('has font-sizes for mobile', () => {
cy.visit('/');
cy.viewport(500, 800);
cy.get('h1').should... |
(self.webpackJsonp=self.webpackJsonp||[]).push([[27],{360:function(n,t,e){"use strict";e.r(t),e.d(t,"HuiEmptyStateCard",function(){return s});var a,c,i,o=e(0),r=e(1),s=(e(177),function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return o.d(t,n),t.prototype.getCardSize=function(){return 2},t.prototype... |
export const distance = (x1, y1, x2, y2) => Math.sqrt((x1 - x2) ** 2 + (y1 - y2) ** 2); |
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("rxjs-compat/operators/publishLast"));
//# sourceMappingURL=publishLast.js.map |
/**
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
var Icon = require('../Icon-399ca71f.js');
var React = require... |
function n(n){return window.innerHeight*n/100}function r(n){return window.innerWidth*n/100}var t={vh:n,vw:r,vmax:function(t){return Math.max(n(t),r(t))},vmin:function(t){return Math.min(n(t),r(t))},px:function(n){return parseFloat(n)}};function a(n){var r=n.match(/^(\d+)(\w+)$/);return r?function(n,r){var a=t[r];if(a)r... |
const { ANALYTICS_DATA_TABLE_NAME } = require("../../src/publish/postgres")
const knex = require("knex")
const connection = {
host: process.env.PG_HOST ? process.env.PG_HOST : "localhost",
database: "analytics_reporter_test",
user : process.env.PG_USER ? process.env.PG_USER : 'postgres'
}
const resetSchema = (... |
var https = require('https');
var express = require('express');
var app = express();
var fs = require("fs");
app.get('/fingerprint/:host', function (request, response) {
console.log(request.params);
var host = request.params.host;
var options = {
host: host,
port: 443,
method: 'GET',
agent: false... |
import React from 'react'
import Header from '../components/header'
import Footer from '../components/footer'
import '../styles/index.scss'
import layoutStyles from './layout.module.scss'
function Layout(props) {
return (
<div className={ layoutStyles.container }>
<div className={ layoutStyles.... |
tinymce.addI18n('es_AR',{
"Cut": "Cortar",
"Heading 5": "Encabezado 5",
"Header 2": "Cabecera 2",
"Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Tu navegador no soporta el acceso directo al portapapeles. Por favor, utiliza los atajos de teclados ... |
import request from '../utils/request';
export async function query(params) {
return request(`/valve_status_abnormality`,{
method:'GET',
params:{
...params
}
});
} |
const dataset = [25, 60, 50, 1, 100 ];
let bars = d3.select("body").selectAll("p")
.data(dataset)
.enter()
.append("div")
.attr("class", "bar")
.style("height", (d) => (d * 3 + "px"));
bars.append("text")
.text((d) => (d))
.style('display','none');
//first event listener
bars.on("mouseenter", function(d, i){
... |
const fs = require('fs')
const chalk = require('chalk')
const setting = JSON.parse(fs.readFileSync('./setting.json'));
// Other
global.owner = ["6289508902582","6282195322106"]
global.packname = '© Sticker'
global.youtube = 'https://youtube.com/c/ZeeoneOfc'
global.author = 'By CaraTech'
global.sessionName = 'session'
... |
(function() {
function Room($firebaseArray, $uibModal) {
var ref = firebase.database().ref().child("rooms");
var rooms = $firebaseArray(ref);
var openmodal = function () {
var modalInstance = $uibModal.open({
templateUrl: '/templates/newroom.html',
controller: function ... |
/*! Sea.js 3.0.0 | seajs.org/LICENSE.md */ |
/* global angular $ */
(function(){
'use strict';
angular.module('iron-pong', ['ui.router', 'firebase', 'angularMoment', 'restangular'])
.config(function($stateProvider, $urlRouterProvider){
$stateProvider
.state('recentresults', {
url: '/recentresults',
templateUrl: 'views/r... |
define("dojo/number", [/*===== "./_base/declare", =====*/ "./_base/lang", "./i18n", "./i18n!./cldr/nls/number", "./string", "./regexp"],
function(/*===== declare, =====*/ lang, i18n, nlsNumber, dstring, dregexp){
// module:
// dojo/number
var number = {
// summary:
// localized formatting and parsing routines fo... |
import React from 'react';
import Button from 'semantic-ui-react/dist/es/elements/Button/Button';
import './ShareButton.scss';
class ShareButton extends React.Component {
render() {
return (
<Button
className="share-button"
fluid
basic
... |
const browserify = require('browserify')
// use `global.process` so it works correctly under node
const nTimes = Number.parseInt(global.process.env.PERF_N || 5, 10)
Promise.all(Array(nTimes).fill().forEach(async (_, index) => {
const bundler = browserify('./bundle-entry.js')
await new Promise(resolve => {
bun... |
function Decoder(bytes) {
var decoded = {};
coord_scale = 10000000;
// 32 bit, latitude
lat = ((0xff & bytes[0]) << 24) | ((0xff & bytes[1]) << 16) | ((0xff & bytes[2]) << 8) | (0xff & bytes[3] << 0);
// 32 bit, longitude
lon = ((0xff & bytes[4]) << 24) | ((0xff & bytes[5]) << 16) | ((0xff & bytes[6]) << 8)... |
(function(a,b){if('function'==typeof define&&define.amd)define(['exports','react'],b);else if('undefined'!=typeof exports)b(exports,require('react'));else{var c={exports:{}};b(c.exports,a.react),a.sourceCommitNextLocal=c.exports}})(this,function(a,b){'use strict';Object.defineProperty(a,'__esModule',{value:!0});var e=f... |
export default {
$id: "root",
type: "object",
definitions: {
refA: {
type: "object",
properties: {
valueA: {
type: "string"
}
}
},
refB: {
type: "object",
properties: {
valueB: {
type: "integer"
}
}
},
refC... |
// transformProps.js
export default function transformProps(chartProps) {
const { width, height, payload, queryData, groupby, formData } = chartProps;
//const { metric, metric2, } = queryData.data.chart_data
//console.log(chartProps); //可以用来验证数据是否正确
return {
data: queryData.data,
width,
height,
... |
import React, { useRef, useState } from "react";
import { Form, Button, Card, Alert } from "react-bootstrap";
import { Link, useHistory } from "react-router-dom";
import { useAuth } from "../config/authContext";
export default function Login() {
const emailRef = useRef();
const passwordRef = useRef();
const { lo... |
var protocol = window.location.href.split('://')[0];
if (protocol === 'file') { protocol = 'http'; }
var base_url = `${protocol}://alfafile.net/api/v1`;
var token = '';
const UPL_STATE_UPLOADING = 0;
const UPL_STATE_PROCESSING = 1;
const UPL_STATE_DONE = 2;
const UPL_STATE_FAIL = 3;
class ApiError extends Error {
... |
'use strict'
/**
* Module dependencies
*/
var EventEmitter = require('events').EventEmitter
var Store = require('./store')
var mqttPacket = require('mqtt-packet')
var Writable = require('readable-stream').Writable
var inherits = require('inherits')
var reInterval = require('reinterval')
var validations = require('./... |
//imports
const glob = require('glob');
const express = require('express');
const path = require('path');
const bodyParser = require('body-parser');
const cors = require('cors');
//colors
const colors = require('colors/safe');
colors.setTheme({
error: 'red',
alert: 'yellow',
data: 'white',
verbose: 'g... |
let db;
const request = indexedDB.open('budget_tracker', 1);
request.onupgradeneeded = function(event) {
const db = event.target.result;
db.createObjectStore('new_transaction', { autoIncrement: true });
};
request.onsuccess = function(event) {
db = event.target.result;
if (navigator.onLine) {
ad... |
import { shallowMount } from '@vue/test-utils';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
describe(`TimelineEntryItem`, () => {
let wrapper;
const factory = (options = {}) => {
wrapper = shallowMount(TimelineEntryItem, {
...options,
});
};
afterEach(... |
var step = '<font class="fontSize">'
+ '<p>Test Purpose: </p>'
+ '<p>Verify to query the product details and buy the in-app product successfully.</p>'
+ '<p>Expected Result: </p>'
+ '<p>It will firstly show "Initialization succeeded."</p>'
+ '<p>Querying the p... |
;(function(root){
'use strict'
/*lent*/
let is={}
is.element = function(obj){return !!(obj && obj.nodeType === 1)}
;
function entry(_target){
let o={}
o.target=is.element(_target)?_target:document.querySelector(_target)
o.ctrl=(obj)=>{o._done(obj,'ctrl');return o;}
o.input=(obj)=>{o._done(obj,'input');ret... |
const apiVersion = "v3"
const port = process.env.AGENT_PORT || 3000
module.exports = {
apiVersion: apiVersion,
port: port
} |
import React from 'react';
import { Link } from 'gatsby';
import Layout from '../components/layout';
import usePosts from '../hooks/use-posts';
import PostPreview from '../components/post-preview';
import Hero from '../components/hero';
import Insta from '../components/insta';
export default () => {
const posts = us... |
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>Hello Yangga!</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex:... |
var searchData=
[
['g',['G',['../class_color.html#a295dd700df3928849ca104e8f8592c97',1,'Color::G() const '],['../class_color.html#a7d697dbc16fa505697f772989e2c0d6e',1,'Color::G(int g)']]],
['gamestate',['GameState',['../class_game_state.html',1,'']]],
['genclips',['GenClips',['../class_image.html#ac4fa0d322908362... |
import React from "react"
import Svg, { Path } from "react-native-svg"
const iosbriefcase = props => (
<Svg width={props.size} height={props.size} fill={props.color} viewBox="0 0 512 512">
<Path d="M80 448h352c17.7 0 32-14.3 32-32V224H48v192c0 17.7 14.3 32 32 32zm352-320h-8v-8c0-4.4-3.6-8-8-8h-32c-4.4 0-... |
/* This file is automatically generated by ABP framework to use MVC Controllers from javascript. */
// module basket
(function(){
// controller eShopOnAbp.basketService.basket
(function(){
abp.utils.createNamespace(window, 'eShopOnAbp.basketService.basket');
eShopOnAbp.basketService.basket.get = func... |
import modConfig from './page.config.js';
import modController from './page.controller.js';
let mod = angular.module('prototype.page', [
'ionic',
'ui.router',
'prototype.constant',
'wp-api-angularjs',
'ngSanitize'
]);
mod.config(modConfig);
mod.controller('PageController', modController);
mod.filt... |
import vsComponent from './vsChip';
import vsComponent2 from './vsChips';
export default Vue => {
Vue.component(vsComponent.name, vsComponent);
Vue.component(vsComponent2.name, vsComponent2);
}; |
import 'vtk.js/Sources/favicon';
import vtkFullScreenRenderWindow from 'vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow';
import vtkImplicitPlaneWidget from 'vtk.js/Sources/Widgets/Widgets3D/ImplicitPlaneWidget';
import vtkWidgetManager from 'vtk.js/Sources/Widgets/Core/WidgetManager';
import vtkActor from 'vtk.... |
import React from 'react';
import classNames from 'classnames';
import { s3 } from 'common/constants/urls';
import Section from 'components/_common_/Section/Section';
import Badge from 'components/Badge/Badge';
import styles from './LogoSection.css';
function LogoSection() {
return (
<Section contentClassName={s... |
/* global MyAMS */
/**
* MyAMS JSON-RPC protocol support
*/
const $ = MyAMS.$;
export const jsonrpc = {
};
/**
* Global module initialization
*/
if (window.MyAMS) {
if (MyAMS.env.bundle) {
MyAMS.config.modules.push('jsonrpc');
} else {
MyAMS.jsonrpc = jsonrpc;
console.debug("MyAMS: jsonrpc module load... |
export default {
lazeresList: [],
lazerView: []
} |
'use strict';
exports.__esModule = true;
var _assert = require('assert');
var _assert2 = _interopRequireDefault(_assert);
var _bitsharesjsWs = require('bitsharesjs-ws');
var _hash2 = require('./hash');
var _bs = require('bs58');
var _deepEqual = require('deep-equal');
var _deepEqual2 = _interopRequireDefault(_d... |
let define = require( '../define' );
let fn, elesfn;
fn = elesfn = ({
data: define.data( {
field: 'data',
bindingEvent: 'data',
allowBinding: true,
allowSetting: true,
settingEvent: 'data',
settingTriggersEvent: true,
triggerFnName: 'trigger',
allowGetting: true,
immutableKeys: {... |
import {expect} from "chai";
import {field, Dict, Null, Store, Stream, Text} from "dotjs/db";
describe("Reactive", () => {
it("fields update with underlying changes", ()=> {
const initial = new Dict({
hello: new Text("world")
}).setStream(new Stream());
const hello = initial.get("hello");
initi... |
import web3NoAccount from './web3'
import muliSwapAbi from '../config/abi/muliSwapAbi.json'
import ERC20Abi from '../config/abi/ERC20Abi.json'
import DeusAMMAbi from '../config/abi/DeusAMM.json'
import UniswapRouterAbi from '../config/abi/uniswapRouterAbi.json'
import MultiCallAbi from '../config/abi/Multicall.json'
im... |
/**
* # Shop SVG Icon.
* @property {node} children - Elements passed into the SVG Icon.
* @property {string} color - This is the fill color of the svg icon.
* If not specified, this component will default to muiTheme.palette.textColor.
* @property {string} hoverColor - This is the icon color when the mouse hove... |
const axios = require('axios');
const ApiError = require("../errors/ApiError");
const logger = require("../utils/logger");
const validUrl = require('valid-url');
const REDDIT_URL = "https://www.reddit.com";
const getTopArticlesFromSubreddit = async (subreddit, limit) => {
let redditResponse;
try {
red... |
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib Authors.
*
* 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 a... |
// @ts-nocheck
'use strict';
const EventEmitter = require('events');
const Collection = require('../../util/Collection');
const { TypeError } = require('../../errors');
const Util = require('../../util/Util');
/**
* Filter to be applied to the collector.
* @typedef {Function} CollectorFilter
* @param {...*} args A... |
'use strict';
/**
* Module dependencies
*/
var acl = require('acl');
// Using the memory backend
acl = new acl(new acl.memoryBackend());
/**
* Invoke Boards Permissions
*/
exports.invokeRolesPolicies = function () {
acl.allow([{
roles: ['admin'],
allows: [{
resources: '/api/boards',
permiss... |
/**
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
var Icon = require('../Icon-1083255b.js');
var React = require... |
const initSqlJs = require('sql.js');
const { SqlResult } = require('./SqlResult');
const fs = require('fs');
/**
* Manages the SQLite database.
*/
class SqliteService {
/**
* Manages the SQLite database.
*
* @constructs SqlliteService
* @param {string} fileName The location of the .db file.
... |
commons.utils = {
POST_WITHOUT_COMMENTS_STYLE: 'commons-post-without-comments',
POST_WITH_COMMENTS_STYLE: 'commons-post-with-comments',
OGP_IMAGE_REGEX: /og:image" content=["']([^"]*)["']\s*\//,
TWITTER_IMAGE_REGEX: /twitter:image" content="([^"]*)"/,
OGP_TITLE_REGEX: /og:title" content="([^"]*)"/,... |
var stringHash = require('string-hash')
var stringify = require('fast-json-stable-stringify')
var SALT = 'chino'
hash.hash2 = function hash2(a, b) {
return hash(hash(a) + hash(b))
}
hash.hash3 = function hash3(a, b, c) {
return hash(hash(a) + hash(b) + hash(c))
}
function hash(input) {
return stringHash(strin... |
const _ = require('lodash');
const Promise = require('bluebird');
const constants = require('./../constants');
const errorTemplate = require('./../error.hbs');
const questionnaireTemplate = require('./questionnaire.hbs');
const questionnaireIntroTemplate = require('./questionnaire-intro.hbs');
const questionnaireDescr... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])... |
import Icon from '../components/Icon'
Icon.register({
'holly-berry': {
width: 447,
height: 512,
paths: [
{
d: 'M144 192c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zM256 144c0-26.5 21.5-48 48-48s48 21.5 48 48-21.5 48-48 48-48-21.5-48-48zM224 96c-26.5 0-48-21.5-48-48s21.5-... |
import Vue from 'vue'
import Vuex from 'vuex'
import VueRouter from 'vue-router'
import { Form, HasError, AlertError } from 'vform'
import StoreData from './store/store'
require('./bootstrap');
// window.Vue = require('vue');
//Vform
window.Form = Form;
Vue.component(HasError.name, HasError)
Vue.component(AlertErr... |
import { describe, it } from 'mocha';
import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
chai.use(chaiAsPromised);
const assert = chai.assert;
import Tree from '../src/index';
describe('find', () => {
it('should return key as the result of search', () => {
const tree = new Tree();
as... |
/**
* Kendo UI v2017.2.504 (http://www.telerik.com/kendo-ui)
* Copyright 2017 Telerik AD. All rights reserved. ... |
export { default } from 'navi-reports/components/asset-owner'; |
Package.describe({
summary: "Extended and Extensible JSON library",
version: '1.0.5-ipc.0'
});
Package.on_use(function (api) {
api.use(['json', 'underscore', 'base64']);
api.export('EJSON');
api.export('EJSONTest', {testOnly: true});
api.add_files('ejson.js', ['client', 'server']);
api.add_files('stringi... |
'use strict';
var $ = require('../internals/export');
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
var toLength = require('../internals/to-length');
var toString = require('../internals/to-string');
var notARegExp = require('../internals/not-a-regexp');
var requireObjectC... |
module.controller('EditLinkedItemCtrl', function ($scope, $modalInstance, $window, $modal, linkItemService, item, gist, gists) {
$scope.linkedItem = item;
$scope.gists = gists;
$scope.selected = {};
$scope.errorMsg = [];
$scope.selected.item = angular.copy(item);
function initGist() {
... |
import React, { Component } from 'react'
export default class Messages extends Component {
scrollDown = () => {
const { container } = this.refs
container.scrollTop = container.scrollHeight
}
componentDidMount() {
this.scrollDown()
}
componentDidUpdate(prevProps, prevState) {
this.scrollDown()
}
rend... |
export const DX_ICON_EXPORT_SELECTED_CONTENT_CODE = 61549; // .dx-font-icon("\f06d")
export const DX_ICON_XLSX_FILE_CONTENT_CODE = 61719; // .dx-font-icon("\f117")
export function checkDxFontIcon(assert, dxIconSelector, expectedIconCode) {
const GENERIC_BASE_ICON_SIZE = 18;
var iconBeforeElementStyle = getCom... |
define([
"backbone",
"lodash",
"templateEditor/element/elementView"
], function (Backbone, _, ElementView) {
"use strict";
return ElementView.extend({
className: "element",
attributes: {
},
initialize: function() {
},
events: function() {
... |
/**
* @license Highcharts JS v8.1.2 (2020-06-16)
*
* (c) 2009-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof def... |
/* cssMagicVar v 0.1 copyright 2018 Aaron Flin (aaron at flin dot org)
MIT Licensed */
var cssMagicVar={
observed:[]
}
cssMagicVar.unload = function(){
var ob=cssMagicVar.observed;
for (var i=0;i<ob.length;i++) {
ob[i].observer.disconnect();
delete ... |
/**
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/
i... |
var transition = require('../transition')
module.exports = function (value) {
var el = this.el
transition.apply(el, value ? 1 : -1, function () {
el.style.display = value ? '' : 'none'
}, this.vm)
} |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import ZeroFrame from 'zeroframe'
import { resolve } from 'react-resolver'
@resolve('video', (props) => {
var cmd = 'dbQuery'
var query = 'SELECT video.*, user.value AS user_name, user_json_content.directory AS user_address ' +
'FRO... |
import { assert } from 'chai';
import { Maybe } from 'monet';
import * as R from 'ramda';
import * as RA from '../src';
const add3 = (a, b, c) => a + b + c;
const add4 = (a, b, c, d) => a + b + c + d;
const add5 = (a, b, c, d, e) => a + b + c + d + e;
describe('liftF', function() {
const addF3 = RA.liftF(add3);
... |
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import ChevronDown20 from '@carbon/icons-react/lib/chevron--down/20';
import { settings } from 'carbon-components';
import cx from 'classname... |
/**
* @author Titus Wormer
* @copyright 2014 Titus Wormer
* @license MIT
* @module retext
* @fileoverview Natural language processor powered by
* plugins.
*/
'use strict';
/* Dependencies. */
var unified = require('unified');
var latin = require('retext-latin');
var stringify = require('retext-stringify');
... |
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import i18n from "./modules/i18n";
import VueMeta from "vue-meta";
import vClickOutside from 'v-click-outside';
import GrayLayout from './layouts/GrayLayout';
import WhiteLayout from './layouts/WhiteLayout';
... |
export default function getHeapSortAnimations(array) {
const animations = [];
heapSort(array, animations);
return animations;
}
const heapSort = (array, animations) => {
let array_len = array.length;
for (let i = array_len / 2 - 1; i >= 0; i--) {
heapify(array, array_len, i, animations);
}
for (let... |
import { gql } from '@apollo/client';
export const QUERY_USER = gql`
query user($username: String!) {
user(username: $username) {
_id
username
email
age
education
relationship
salary
location
vote
}
}
`
export const QUERY_ALL_USERS = gql`
query allUs... |
import Taro, { Component } from '@tarojs/taro';
import PropTypes from 'prop-types';
import { View, Button, Image, Text, Navigator } from '@tarojs/components';
import { connect } from '@tarojs/redux';
import { bindActionCreators } from 'redux';
import { getWxContextRequest } from '../../redux/actions/user';
import './i... |
"use strict";
var extend = require("../core/utils/extend").extend,
typeUtils = require("../core/utils/type"),
Guid = require("../core/guid"),
objectUtils = require("../core/utils/object"),
keysEqual = require("./utils").keysEqual,
Query = require("./query"),
errors = require("./errors").errors,... |
import React from 'react'
import Controller from '../animated/Controller'
export function useSpring ({
onRest,
onKeyframesHalt = () => null,
updatePropsOnRerender = true,
...props
}) {
const [ctrl] = React.useState(new Controller(props))
const onHalt = onRest ? ({finished}) => {
finished && onRest(ctr... |
'use strict'
const path = require('path')
const defaultSettings = require('./src/settings.js')
function resolve(dir) {
return path.join(__dirname, dir)
}
const name = defaultSettings.title || 'DATAX-ADMIN' // page title
// If your port is set to 80,
// use administrator privileges to execute the command line.
// Fo... |
const fs = require('fs-extra');
const path = require('path');
const _ = require('lodash');
const glob = require('glob');
const uglifyJs = require('uglify-js');
const exit = require('exit');
const Promise = require('promise');
const utils = require('../server/utils');
let files = glob.sync('public/js/**/*.js', {
cw... |
const mongoose = require('mongoose/browser');
const Code = require('../basetypes/Code');
const Interval = require('../basetypes/Interval');
const Quantity = require('../basetypes/Quantity');
const DateTime = require('../basetypes/DateTime');
const QDMDate = require('../basetypes/QDMDate');
const Any = require('../base... |
import * as React from 'react';
import wrapIcon from '../utils/wrapIcon';
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 32, height: 32, viewBox: "0 0 32 32", xmlns: "http://www.w3.org/2000/svg", className: className },
React.crea... |
import Taro, { Component } from '@tarojs/taro'
import { View, Navigator, Image, Text } from '@tarojs/components'
import './index.less'
import { ASSETSURL } from '../../public/constants'
export default class HuoDong extends Component {
constructor(props) {
super(props)
this.state = {
hdImg: `${ASSETSU... |
const { ServerError } = require('../errors/index');
module.exports = class HttpResponse {
static ok(body) {
return {
statusCode: 200,
body
}
}
static badRequest(error) {
return {
statusCode: 400,
body: {
error: error.... |
const SINGLETAG = ["br", "hr", "img", "input", "param", "link", "meta", "area", "base", "basefont", "param", "col", "frame", "embed", "keygen", "source"];
const ISHTMLREG = /^\s*<(\w+|!)[^>]*>/;
const REGS = {
k: /\r/g,
l: /\n/g,
a: /</g,
b: />/g,
d: /<%|%>/g,
e: /^=.*;$/,
i: /\r\n/g,
f: />[\s]+</g,
g: /... |
var w = 1024;
var h = 512;
var mapimg;
var table;
var Heart;
var clat = 0;
var clon = 0;
var lat = 0;
var lon = 0;
var wlat = 38.89;
var wlon = -100.03;
var zoom = 2.6;
function preload() // code from youtube channel - The Coding Train
{
mapimg = loadImage('https://api.mapbox.com/styles/v1/mapbox/dark-v10/stati... |
import React from 'react';
import { mount } from 'enzyme';
import toJson from 'enzyme-to-json';
import Loading from '../Loading';
describe('<Loading />', () => {
it('should render correctly', () => {
const tree = mount(<Loading />);
expect(toJson(tree, { noKey: true, mode: 'deep' })).toMatchSnapshot();
});... |
var buster = require("buster-node");
var assert = buster.referee.assert;
var refute = buster.referee.refute;
var changeTracker = require("../lib/change-tracker");
buster.testCase("change-tracker", {
"poll": {
setUp: function () {
this.statFiles = this.stub();
this.tracker = changeTr... |
const mongoose = require('../../../../../database/connection')
const PhoneHistory = new mongoose.Schema({
model: {
type: String,
required: true,
lowercase: true,
unique: true
},
service_tag: {
type: String,
required: true
},
equipament_status: {
type: String,
enum: ['NOVO', 'U... |
import processMarkdown from '../../../libs/marked'
const introContent = {
title: 'Canada Learning Bonds',
content: processMarkdown(`
**Your child could be eligible to receive up to $2,000 in free money for their post-secondary education from the Canada Learning Bond (CLB).**
If your child is eligible, the Governm... |
/*!
* @author Semenov Alexander <semenov@skeeks.com>
* @link http://skeeks.com/
* @copyright 2010 SkeekS (СкикС)
* @date 09.06.2015
*/
(function(sx, $, _)
{
sx.createNamespace('classes.combotext', sx);
sx.createNamespace('classes.combotext.controlls', sx);
sx.classes.combotext.controlls._Base = sx.cla... |
Goblin.SliderConstraint = function( object_a, axis, object_b ) {
Goblin.Constraint.call( this );
this.object_a = object_a;
this.axis = axis;
this.object_b = object_b;
// Find the initial distance between the two objects in object_a's local frame
this.position_error = new Goblin.Vector3();
this.position_error.s... |
function foo(x) {
switch (x) {
case "a": return 1;
case "ab": return 2;
case "abc": return 3;
case "abcd": return 4;
default: return 10;
}
}
var strings = ["a", "ab", "abc", "abcd", "abcde"];
var result = 0;
for (var i = 0; i < 1000000; ++i)
result += foo(strings[i % strings.length]);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.