text stringlengths 3.22k 29.5k |
|---|
const { Model, DataTypes, Op } = require("sequelize");
const datasource = require("../lib/datasource");
const { logger } = require("../lib/logger");
const moment = require("moment");
const { absolutePath } = require("../lib/datasource/utils");
module.exports = function(sequelize) {
class MediaSource extends Model {}... |
import ODMPath from "../odmwrapper/odmpath.js";
import * as metadataWrapper from "../odmwrapper/metadatawrapper.js";
import * as languageHelper from "./languagehelper.js";
class AutocompleteElement {
constructor(value, label) {
this._value = value;
this._label = label;
}
get value() {
... |
import React, {Component,Fragment} from 'react';
import {Text,TextInput, View, TouchableOpacity, AsyncStorage,StyleSheet,Image,ImageBackground,} from 'react-native';
import { FlatList, ScrollView } from 'react-native-gesture-handler';
import Overlay from 'react-native-modal-overlay';
import Modal from "react-native-mod... |
import React, { Component, Fragment } from 'react';
import { Row, Col, Card, message, Button } from 'antd';
import { Switch, Route, withRouter } from 'react-router';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import PageHeaderLayout from '../../../components/Layout/PageHeaderLay... |
import {parseValue, attr, flow, relative} from './utils';
import BaseSprite from './basesprite';
import {registerNodeType} from './nodetype';
import {createSvgPath} from './helpers/path';
import * as layout from './layout';
import groupApi from './helpers/group';
const _children = Symbol('children'),
_zOrder = Symb... |
import axios from 'axios';
var qs = require('qs');
import { Message } from 'view-design';
const util = {};
util.title = function(title) {
if (title === undefined) {
return window.document.title;
}
window.document.title = (title ? title : '');
};
//模板加代理插件
util.ajax = (function() {
var ajax = axios.create({
bas... |
$(function() {
$(window).scroll(function() {
if (window.location.href.indexOf("index.php") < 0) {
return false;
}
var scrollTop = $(this).scrollTop();
var windowHeight = $(window).height();
var documentHeight = $(document).height();
if (scrollTop == docume... |
import fs from 'fs';
import path from 'path';
import readline from 'readline';
import models from '../models';
import parse from 'csv-parse';
import Utils from '../helpers/utils';
const RESULTS_FILE = 'lstrslt.txt';
const SWIMMERS_FILE = 'lstconc.txt';
const SWIM_FILE = 'lststart.txt';
const STROKE_FILE = 'lststyle.t... |
kaboom({
global: true,
fullscreen: true,
scale: 1,
debug: true,
clearColor: [0, 0, 0, 1],
});
// Identificadores de velocidad
const MOVE_SPEED = 200
const JUMP_FORCE = 360
const BIG_JUMP_FORCE = 500
let CURRENT_JUMP_FORCE = JUMP_FORCE
let isJumping = true //camara en salto
const FALL_DEATH = 400... |
/**
* bin/generate-vaccinations.js
*
* <NAME>
* Consensas
* 2021-01-20
*
* Copyright (2013-2021) Consensas
*
* 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://... |
const Discord = require("discord.js");
const config = require("./config.json");
const Gamedig = require("gamedig")
const client = new Discord.Client();
const help = require('./help.js');
const prefix = require('discord-prefix');
//==============BOOT-UP==============//
client.on('ready', async () => {
var inf... |
import React from 'react'
import Link from 'gatsby-link'
import logo from '../../public/images/vegan/logo.png'
import sitemap from '../../public/images/vegan/sitemap.png'
import persona from '../../public/images/vegan/persona.png'
import userflow from '../../public/images/vegan/userflow.png'
import affinitymap from '.... |
var canvas = document.getElementById("gameCanvas");
var context = canvas.getContext("2d");
var startFrameMillis = Date.now();
var endFrameMillis = Date.now();
function getDeltaTime()
{
endFrameMillis = startFrameMillis;
startFrameMillis = Date.now();
var deltaTime = (startFrameMillis - endFrameMillis) * 0.001;
... |
"use strict";
const dvbcssClocks = require('dvbcss-clocks/src/main');
const argCheck = require('./argCheck');
/**
* @classdesc
*
* Synchronise a media element (slave) to either a clock or another media element (master).
* This should generally not be used directly by DMApp components.
* When constructed, synchro... |
import { Input } from 'phaser';
// Constants
import {
KEY,
COIN,
DOOR,
HEART,
ENEMY,
CRYSTAL,
IDLE_FRAME,
TILE_WIDTH,
TILE_HEIGHT,
UP_DIRECTION,
LEFT_DIRECTION,
DOWN_DIRECTION,
RIGHT_DIRECTION,
KEY_SPRITE_NAME,
HERO_SPRITE_NAME,
COIN_SP... |
import React from 'react';
class PCA extends React.Component {
constructor(props) {
super(props);
var color_by = this.props.plot['color_options'][0];
var points = this.props.plot['points'].concat(this.props.user_data);
var point_tags = {};
for (var i = 0; i < points.leng... |
/* display */
let svg;
let backColor = "#fff"
/* geometry */
let width = 900;
let height = 600;
let boundsX = [60, 840];
let boundsY = [45, 530];
/* scales */
let dayX = d3.scaleLinear()
.domain([0, 30])
.range([boundsX[0]+12, boundsX[0]+12 + 30*24]);
let graphY = config => {
return d3.scaleLinear()
.domain... |
$(document).ready(function() {
setTimeout(function() {
$(".logo > div").addClass("flash");
}, 4000);
setTimeout(function() {
$(".logo > div").removeClass("flash");
}, 4800);
});
/******************************
* Hexagons using Snap.svg
* Developer: <NAME>
* Github: https://github.com... |
/*
* Copyright 2016 Capital One Services, 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... |
/* global window */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { bindActionCreators, compose } from 'redux';
import { connect } from 'react-redux';
import * as breadcrumbsActions from 'state/breadcrumbs/BreadcrumbsActions';
import * as recordActions from 'state/records/RecordsA... |
let canvas = document.getElementById("c");
let ctx = canvas.getContext("2d");
let width = canvas.width = 912;
let height = canvas.height = 912;
let candy = false;
let score = 0;
let grid = [];
let gridWidth, gridHeight;
let gridSquareSize = 48;
let ai = false;
function random(min,max) {
var num = Mat... |
window.sliders = [];
$.fn.oldBxSlider = $.fn.bxSlider;
$.fn.bxSlider = function (options) {
x = $(this).oldBxSlider(options);
window.sliders.push(x);
return x;
}
jQuery(document).ready(function () {
jQuery('.moderate').on('click', 'a', function (e) {
e.preventDefault();
var method = j... |
//BEE+
// หน้าแรก
var _locat = $('.b_tab1[name="home"]').attr('locat');
var _insert = $('.b_tab1[name="home"]').attr('cin');
var _update = $('.b_tab1[name="home"]').attr('cup');
var _delete = $('.b_tab1[name="home"]').attr('cdel');
var _level = $('.b_tab1[name="home"]').attr('clev');
var _today = $('.b_tab1[name="... |
// events
// geojson:loaded - a georssfeed was loaded from a server and is now available: function(url,geojson)
// georss:error - a georssfeed failed to load: function(url,error);
var originalI18nObject = {
"labelLoadError" : "Could not load Document",
"labelName":"Name",
"labelUntitled":"Untitled",
"labelUrlB... |
// Bezier (Editor)
// The Coding Train / <NAME>
// https://thecodingtrain.com/CodingChallenges/163-bezier.html
// https://youtu.be/zUgsYaUQNBk
// Basic: https://editor.p5js.org/codingtrain/sketches/Z53a719cQ
// Editor by <NAME>: https://editor.p5js.org/codingtrain/sketches/_R7RgtGfA
// bezierVertex: https://editor.p5j... |
var Actualizar = function(mostrar) {
mostrar = (typeof mostrar !== 'undefined') ? mostrar : true;
if(!params.isAndroid){
Titanium.UI.iOS.appBadge = 0;
}
Ti.App.Properties.setString('ActualizarListadoAsistencias','N');
Ti.API.info("inicio...");
if(most... |
function EditarOrdenCompraManager(){
var self = this;
self.orden_compra_item_id_a_borrar = 0;
self.orden_compra_item_id_insertado = 0; // este al gas porque obtengo el valor directo desde ajax
self.descripcion_item_insertado = '';
self.cantidad_item_insertado = 0;
this.init = function(){
console.log('a ver la ... |
import React, { useEffect, useState } from "react"
import { connect } from "react-redux"
import { fetchMovie } from "../actions/movieActions"
import { fetchSimilarMovies } from "../actions/similarMoviesActions"
import { fetchKeywords } from "../actions/keywordsActions"
import { useParams } from "react-router"
import He... |
'use strict';
var util = require('../util/util');
var Point = require('point-geometry');
module.exports = {
rotationRange: rotationRange,
mergeCollisions: mergeCollisions,
rotatingFixedCollisions: rotatingFixedCollisions,
rotatingRotatingCollisions: rotatingRotatingCollisions,
cornerBoxCollision... |
/* jshint undef: true, unused: true */
/* globals $, addthis */
var vnllPracabar = {
startTime: null,
endTime: null,
average: null,
averageBt: null,
textOptions: function() {'use strict';
var $actions = $('.actions'),
$text = $('#reading-box');
// we need to control de open/close of dropdown
$actio... |
const Test = require('../config/testConfig.js');
const truffleAssert = require('truffle-assertions');
var BigNumber = require('bignumber.js')
contract('Flight Surety Tests', async (accounts) => {
var config;
// Operations and Settings
const minFund = web3.utils.toWei('10', 'ether'); // Note: .t... |
import { Entity, EntityManager } from "./entity";
import Weapon from "./weapon";
import {
TANK, STATE, PART, ITEM, BULLET,
LEVEL_TIME,
tankLife,
botTypeProbability,
angleProbability,
tankVelocity,
timeToRespawn,
directionTime,
shootTime,
tankWeaponType,
getScores,
scoreT... |
import React from 'react';
import moment from 'moment';
import BigNumber from "bignumber.js";
import { ethers } from 'ethers';
import { useState, useEffect } from 'react';
import { Table, Tag, Input, InputNumber } from 'antd';
import { Checkbox, Button, Modal, Divider, DatePicker, Spin, notification } from 'antd';
con... |
'use strict'
const https = require('https');
const { wallet } = require('@cityofzion/neon-js');
const endpoints = {
//Balances
"list_balances":{
"path":"/v2/balances",
"type":"GET"
},
//Cancel
"create_cancellation":{
"path":"/v2/cancellations",
"type":"POST"
},
"execute_cancellation":{
"path":"/v2... |
import FlightSuretyApp from '../../build/contracts/FlightSuretyApp.json';
import FlightSuretyData from '../../build/contracts/FlightSuretyData.json'
import Config from './config.json';
import Web3 from 'web3';
import express from 'express';
require('babel-polyfill')
const bodyParser = require('body-parser')
let confi... |
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
require('es6-shim');
var test = require('tape');
var uuid = require('uuid');
var $ = require('../src/util/jquery');
var Travel = require('../src/travel... |
/**
* The MIT License
* Copyright (c) 2016 Population Register Centre (VRK)
*
* 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 strict";
var DragEvents = require('../ui/drag.events'),
prime = require('prime'),
Emitter = require('prime/emitter'),
Bound = require('prime-util/prime/bound'),
Options = require('prime-util/prime/options'),
bind = require('mout/function/bind'),
isString = require('m... |
const { readFile, writeFile } = require('fs');
const { connect, createServer } = require('net');
const EventEmitter = require('events');
const { promisify } = require('util');
const { getCurrentWindow, dialog } = require('electron').remote;
const DMP = require('diff-match-patch');
const { defaultValue, stepOne, stepSe... |
// ES6
import * as vrm_mat from './vrm-materials.js';
import { GLTFLoader } from './gltf-three.js';
import { VrmModel } from './vrm-core/vrm.js';
import { blendshapeToEmotionId } from './mev-util.js';
/**
* Single instantiated view of a VrmModel as a positionable THREE.Object3D.
* Possibly caches THREE.Object3D / Te... |
//GA TRACKING v2.0 by www.blastam.com - <EMAIL>
// cross-domain/addIgnoreds list should be in here - if it needs to be updated there will be no need to modify beacons
//Array elements containing value of PLOS' Google Analytics web property ID for each journal and demo site
var plosGApropId = new Array();
//demo site... |
import { helpHTML } from './indexPage'
import { makeHighlight } from './highlight'
import { makeUploadedPage } from './uploadedPage'
import MimeTypes from 'mime-type/with-db.js'
const CHAR_GEN = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-=@';
const RAND_LEN = 4
const PRIVATE_RAND_LEN = 24
const S... |
var target = 339;
var key = {
'A': ['╘','K','O','⅃','±'],
'B': ['□','ꟻ'],
'C': ['ꟼ'],
'D': ['ʘ','A','S'],
'E': ['┤','B','N','𐐒','ɔ','I'],
'F': ['F'],
'G': ['L'],
'H': ['+'],
'I': ['<','H','P','ꓘ','ʎ'],
'L': ['◬','Ɑ','⊥'],
'M': ['┴'],
'N': ['·','△','>','D','Y'],
'O': ['M','R','V','^'],
'P': ['▲','j'],
'... |
import { Select, Link, TextField, Checkbox, Button, RadioButton, Stack, Card } from '@shopify/polaris';
import store from 'store-js';
import Cookies from 'js-cookie';
import '../stylesheets/detailSetting.css';
import '../stylesheets/global.css';
class DetailSetting extends React.Component {
state = {
displaySet... |
const dat = require("dat.gui");
// Patch dat.GUI
dat.GUI.prototype.removeFolder = function(name) {
var folder = this.__folders[name];
if (!folder) {
return;
}
folder.close();
this.__ul.removeChild(folder.domElement.parentNode);
delete this.__folders[name];
this.onResize();
};
function normalize(min,... |
'use strict'
const express = require('express')
const router = express.Router()
const { PassThrough } = require('stream')
const FR = require('ffmpeg-respawn')
const M4F = require('mp4frag')
const P2J = require('pipe2jpeg')
const packageJson = require('../package')
const title = `${packageJson.name} ver: ${packageJson.... |
/**
* SocketController
*
* @module :: Controller
* @description :: A set of functions called `actions`.
*
* Actions contain code telling Sails how to respond to a certain type of request.
* (i.e. do stuff, then send some JSON, show an HTML page, or redirect to another URL)... |
import diff from './diff/diff';
import {compareVersion} from './utils/helpers';
let toString = Object.prototype.toString;
function _isObj(e) {
return '[object Object]' === toString.call(e);
}
/**
* 解析出属性最终对应的子对象的属性名,以及对应的子对象
* @param {object} data 对象
* @param {array} keysArr 属性键数组
* @return {object} 对应子属性值和子... |
/* global google document */
const Evented = mapboxgl.Evented;
var TILE_SIZE = 256;
// This is designed to be used with Object.freeze (because it's slow in Vue otherwise)
function MapboxGoogleOverlay(options) {
this.mapboxRenderer = new mapboxgl.BasicRenderer(options);
this.styleLoadedPromise = new Promise(res... |
import React from 'react'
import { translate, actions } from 'decorators'
import styles from './styles.module'
import { Select, Button, Loading } from 'linkdrop-ui-kit'
import AssetValueInput from './asset-value-input'
import CustomAssetAddressInput from './custom-asset-address-input'
import { LinkBlock } from 'compone... |
// create a reference to the notifications list in the bottom of the app; we will write database messages into this list by
//appending list items on to the inner HTML of this variable - this is all the lines that say note.innerHTML += '<li>foo</li>';
var note = document.getElementById('notifications');
// create an i... |
export const introMd = `
Ever wonder why in our relatively progressive, technological
world why the price of things like education and
healthcare are constantly getting more expensive? If we're
so advanced, shouldn't we have figured out better ways to
teach or take care of people by now?
The cost of college tuition ha... |
//以下のページより引用,または参考にさせていただきました.
//https://wgld.org/sitemap.html
var c;
var q = new qtnIV();
onload = function(){
var mouseFlag = false;
var mousePositionX = 0.0;
var mousePositionY = 0.0;
c = document.getElementById('canvas');
c.width = 600;
c.height = 600;
c.addEventListener('mous... |
// Description:
// Integration point between hubot-plusplus-expanded and bonusly' api
//
//
// Configuration:
// MONGO_URI: URI for the mongo database
// BONUSLY_API_KEY: Api key for connecting to the bonusly api
//
// Commands:
// change my bonusly configuration - used to change the config on when bonusly poin... |
import React, {useEffect, useState} from 'react';
import {Alert, FlatList, Switch, Text, TextInput, View} from 'react-native';
import {Button, ListItem} from 'react-native-elements';
import {useDispatch, useSelector} from 'react-redux';
import commonStyles from '../../shared/common.styles';
import {getNewUUID, isEmpt... |
#!/usr/bin/env node
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
... |
import scaleOrdinal from "d3-scale/src/ordinal";
import scaleLinear from "d3-scale/src/linear";
import { min, max, range as d3Range } from "d3-array";
import { rgb } from "d3-color";
import { interpolateHcl } from "d3-interpolate";
import { genericDomain, colors, genotypeColors, isValueValid } from "./globals";
import ... |
var googleUser = {};
var startGoogle = function() {
localStorage.setItem('bitsoko-enable-autoreload','false');
gapi.load('auth2', function(){
// Retrieve the singleton for the GoogleAuth library and set up the client.
auth2 = gapi.auth2.init({
client_id: $('meta[name="google-signin-cl... |
import React, { Component } from 'react'
import _ from 'lodash'
import update from 'immutability-helper'
import queryString from 'query-string'
import Link from 'gatsby-link'
import QUESTIONS from './questions'
import Steps from './Steps'
import Question from './Question'
import Calendly from '../Calendly'
import Icon ... |
"use strict";
/* The Computer Language Benchmarks Game
http://benchmarksgame.alioth.debian.org/
contributed by <NAME>
Optimized by <NAME>
Adapted by <NAME>
*/
var SIZE = 5;
var bodyBuffer = new Float64Array(8 * 5);
/**
* @type {number}
*/
var PI = 3.141592653589793;
/**
* @type {number}
*/
var SOL... |
// /// <reference path="../../../bin/openrct2.d.ts" />
import MapHelper from "./MapHelper";
import ObjectHelper from "./ObjectHelper";
import TileHelper from "./TileHelper";
import SwimmingPoolWindow from "./SwimmingPoolWindow";
let downCoord;
let currentCoord;
let direction = 0;
let pathType = 0;
let lineColor = 0... |
var imergir = document.getElementById('imergir'),
bodychange = document.body,
container = document.getElementById('container'),
ondas = document.getElementsByClassName('waves'),
sectionOndas = document.getElementById('section'),
player,
checkbox = document.getElementById('alegrometro'),
emoji = document.q... |
var number = [
["01110","10001","10001","10001","10001","10001","10001","10001","01110"],
["00100","11100","00100","00100","00100","00100","00100","00100","11111"],
["01110","10001","00001","00001","00010","00100","01000","10000","11111"],
["01110","10001","00001","00001","01110","00001","00001","10001","0111... |
/**
* @author xeolabs / https://github.com/xeolabs
*/
import {Map} from "../../utils/map.js";
import {OutlineShaderSource} from "./outlineShaderSource.js";
import {Program} from "../program.js";
import {stats} from "../../stats.js";
const ids = new Map({});
const OutlineRenderer = function (hash, mesh) {
this.... |
function fix_region(str) {
var replace = [
"world",
"east",
"west",
"death",
"mountain",
"palace",
"tower",
"castle",
"escape",
"mire",
"of",
"darkness",
"woods",
"town",
"hera",
"rock",
"norfair",
"ship",
"portals",
"c... |
/*
* This JS Object stores all the tables names and its columns names.
* This object can be used for visualizations and places where the name of the columns are needed.
*/
const tableSchema = {
patients: [
'patientId',
'dateOfBirth',
'gender',
'ethnicity',
'race',
'provinceOfResidence',
... |
/**
* 日志上报模块
* @module
*/
import * as errorType from './errorType'
import platform from '../platform'
let jsBridge, bridgeName, logEventName
// 初始化 JSBridge 相关参数
if (typeof ServiceJSBridge !== 'undefined') {
jsBridge = globalThis.ServiceJSBridge
bridgeName = 'Service'
logEventName = 'H5_JS_SERVICE_ERR'
} el... |
import _ from 'lodash';
import ReactGa from 'react-ga';
import {
SET_CODE,
SET_HEADER_CODE,
SET_DEFAULT_CODE,
SET_FOOTER_CODE,
RUN_CODE_FAILED,
SET_INPUT,
APPEND_INPUT,
SEND_INPUT,
PRINT_OUTPUT,
REGISTER_WORKER_SUCCEEDED,
REGISTER_WORKER_FAILED,
FLAG_RUNNING_CODE,
FLAG_REGISTERING_WORKER,
AP... |
/**
POLYFILLS START
not required in nodejs
*/
if (!String.prototype.trim) {
String.prototype.trim = function () {
return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
};
}
if (!String.prototype.startsWith) {
String.prototype.startsWith = function (searchString, position) {... |
import React, { useState, useRef } from "react";
import { connect } from 'react-redux';
import { View, Text, TextInput, TouchableOpacity, Platform, StyleSheet, ScrollView, ImageBackground, Dimensions, ActivityIndicator, Alert } from "react-native";
import WebView from 'react-native-webview';
import queryString from 'qu... |
/**
* This plugin adds RxCollection.inMemory()
* Which replicates the collection into an in-memory-collection
* So you can do faster queries and also query over encrypted fields.
* Writes will still run on the original collection
*/
import {
Subject,
fromEvent as ObservableFromEvent
} from 'rxjs';
import... |
'use strict'
const mongoose = require('mongoose')
const Crufler = require('./crufler.js')
const debug = require('debug')('bouncer-db.owner-crufler')
let Acl = undefined
/** owner-crufler extends crufler to give message owners read & write */
module.exports = class OwnerCrufler extends Crufler {
constructor ({ acto... |
const WickrIOAPI = require('wickrio_addon');
const WickrIOBotAPI = require('wickrio-bot-api');
const WickrUser = WickrIOBotAPI.WickrUser;
const bot = new WickrIOBotAPI.WickrIOBot();
var zendesk = require('node-zendesk');
var fs = require('fs');
module.exports = WickrIOAPI;
process.stdin.resume(); //so the program will... |
navigator.vibrate = navigator.vibrate ||
navigator.webkitVibrate ||
navigator.mozVibrate ||
navigator.msVibrate;
function MakeVibe(time){
time = time || 500;
if (navigator.vibrate) {
navigator.vibrate(time);
}
}
/**
* Captures the address fo... |
/**
* 3D Much Whee!
* by DY
*
* A helper library for constructing 3D scenes in Processing.js.
*
* Rotate the scene by dragging or using the arrow keys.
* Press ENTER/RETURN to zoom in, and SHIFT to zoom out.
*
* Thanks to T#1B12P for the inital boilerplate methods.
* Parts of his code are used throughout t... |
import * as fs from 'node:fs'
import * as https from 'node:https'
import * as zlib from 'node:zlib'
import {resolve, sep as pathSeperator} from 'node:path'
import {pipeline} from 'node:stream'
import {TarExtractStream} from './tar-extract-stream.js'
import {ZipExtractStream} from './zip-extract-stream.js'
const module... |
import React from 'react';
import update from 'react/lib/update';
import PropTypes from 'prop-types';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from '../Card_Item/Card_Item.css';
// import component
import MHelper from '../../../../helper/MHelper.js';
import AudioPlayer from './AudioPla... |
import React, { useEffect } from "react";
import {
ScrollView,
Dimensions,
StatusBar,
TouchableOpacity,
View,
Text,
StyleSheet,
ActivityIndicator,
} from "react-native";
import orm from "src/data";
import { DrawerActions, NavigationAction } from "react-navigation";
import { baseUrlProd } from "../Consta... |
const editor = ace.edit("editor");
const Range = ace.require("ace/range").Range;
editor.session.setMode("ace/mode/javascript");
editor.session.setUseWorker(false);
function clearMarkers() {
const markers = editor.session.getMarkers();
if (!markers) return;
for (let marker of Object.keys(markers))
editor.sess... |
"use strict";
function natural_compare(a, b) {
var ax = []
,bx = []
;
a.replace(/(\d+)|(\D+)/g, function(_, $1, $2) { ax.push([$1 || Infinity, $2 || ""]) });
b.replace(/(\d+)|(\D+)/g, function(_, $1, $2) { bx.push([$1 || Infinity, $2 || ""]) });
while(ax.length && bx.length) {
var ... |
import * as m from 'mithril';
import { isEmpty } from 'lodash';
import { hasNetwork, getBoardBounds, playerName, oppositeColor, noNull } from '../../../utils';
import i18n from '../../../i18n';
import * as gameApi from '../../../lichess/game';
import gameStatusApi from '../../../lichess/status';
import continuePopup fr... |
import WKT from "ol/format/WKT.js";
import { Icon, Stroke, Fill } from "ol/style.js";
import {
Point,
MultiPoint,
Polygon,
MultiPolygon,
LineString,
MultiLineString,
} from "ol/geom.js";
function componentToHex(c) {
var hex = c.toString(16);
return hex.length === 1 ? "0" + hex : hex;
}
function rgbToH... |
/*
* Copyright (c) 2006 <NAME>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAI... |
/**
* Created by myles on 24/1/2017.
*/
// initialize wilddog
var appId = "telxt";
var config = {
syncURL: "https://" + appId + ".wilddogio.com",
authDomain: appId + ".wilddog.com"
};
var error_code_dict;
wilddog.initializeApp(config);
// load default error_code list
wilddog.sync().ref('error_code').once("va... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.... |
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { StyleSheet, Platform, TouchableWithoutFeedback } from 'react-native';
import times from 'lodash/times';
import without from 'lodash/without';
import uniq from 'lodash/uniq';
import noop from 'lodash/noop';
import { toTime } from '../u... |
var firstname = "john";
console.log(firstname);
var job;
console.log(job);
var firstname = "john";
var age = 28;
console.log(firstname + " " + age);
//variable coercion//
var job, isMarried;
job = "teacher";
isMarried = "false";
console.log(
firstname +
"is a " +
age +
"years old" +
... |
import {
Select
} from "./chunk-VO6KTAMP.js";
import {
GridColumn
} from "./chunk-EMVGQF52.js";
import {
TextField
} from "./chunk-4EQQPNFR.js";
import "./chunk-4V7HTHEB.js";
import {
Checkbox
} from "./chunk-E4PWA4PK.js";
import "./chunk-XMK3PKMX.js";
import "./chunk-5IY3DZOH.js";
import "./chunk-FXDBZGKI.js";... |
class Pizza {
constructor(name, amount, price, ingredients, id) {
this.name = name;
this.amount = amount;
this.price = price;
this.ingredients = ingredients;
this.id = id;
}
}
const Pizzas = [
{
name: "Margarita",
amount: "0",
price: 24.99,
ingredients: "basil, tomato saunce, ... |
import _pt from "prop-types";
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.... |
import React, { useState, useEffect, useContext } from 'react'
import { Link, useParams } from 'react-router-dom'
import { AddNewObservation, AddNewCorner } from '../Components/AddNew'
import { ObservationList, NoObservations } from '../Components/ObservationList'
import { CornersList, NoCorners } from '../Components/C... |
import {useEffect, useState} from 'react';
import {Image, Text, View, Block} from '@fower/taro';
import {AtFloatLayout} from 'taro-ui';
import './index.scss';
import clsx from 'clsx';
import $ from 'miaoxing';
import Taro from '@tarojs/taro';
import FooterBar from '@mxjs/m-footer-bar';
import ActionButtonGroup from '..... |
const Telegraf = require('telegraf');
const { Markup } = Telegraf;
const messages = require('./messages');
const questions = {
food_vote: {
question: ' hat eine Food-Umfrage gestartet. Für Pizza klicke zuerst auf die Anzahl und danach auf die Sorte. Um eine Ganze zu bestellen reicht ein Klick auf die Sorte... |
/**
* ajax封装,只用于支持XMLHttpRequest,用于移动端
* @param {[type]} obj 对象 url,type,data,dataType,success,error
* @return {[type]}
*/
export const getDataFromAPI = (obj) => {
let abj = {},objObj,objStr;
if(typeof obj.data === "string"){
objObj = JSON.parse(obj.data);
// objObj.sid = getCookie("sid") ? getCookie("sid")... |
'use strict'
const slugify = require('slugify')
const vehicle_makes = [
"Abarth",
"AC",
"Acura",
"Advance Mixer",
"<NAME>",
"Allard",
"Allstate",
"Alpine",
"Alvis",
"AM General",
"American Austin",
"American Bantam",
"American IronHorse",
"Buick",
"Bultaco"... |
/**
* Pagination and sort functionality
* for the site templates.
**/
'use strict';
var navi = (function($) {
$(document).ready(function() {
var ctypeValue='';
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1))... |
const VERSION = '1.0';
// Functions
function stripHtml(html) {
let tmp = document.createElement("DIV");
tmp.innerHTML = html;
return tmp.textContent || tmp.innerText || "";
}
function randId() {
return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10);
}
function placeCaretAtEnd(el) {
//https:... |
/* eslint-disable */
import React, { Component } from 'react';
import Write from '../Write/Write';
import App from '../App';
import MemoList from '../MemoList/MemoList';
import './style.css';
import { mobilecheck } from '../../utils/mobilecheck';
import Materialize from 'materialize-css';
import $ from 'jquery';
import... |
const hash = require('crypto').createHash;
const assert = require('assert');
const {describe, it} = require('mocha');
const io = require('../../io.js');
describe('#readMASFile', () => {
it('should read a .psmsa file', () => {
assert.deepStrictEqual(
io.readMASFile('./test/data/1024.PS.EDS/1024_pt1.psmsa'),
... |
/*
# Copyright 2020 FundingBox Accelerator S.P. z.o.o. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "li... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.