text stringlengths 3.07k 16k |
|---|
var LEFT = 0;
var RIGHT = 1;
var ANIM_IDLE_LEFT = 0;
var ANIM_JUMP_LEFT = 1;
var ANIM_WALK_LEFT = 2;
var ANIM_IDLE_RIGHT = 3;
var ANIM_JUMP_RIGHT = 4;
var ANIM_WALK_RIGHT = 5;
var ANIM_MAX = 6;
var lives = 3;
var Player = function ()
{
this.sprite = new Sprite("Bruh.png");
//AFK LEFT
this.sprite.buildAnimati... |
import { createAction } from 'redux-actions'
import keyMirror from 'keymirror'
import { browserHistory } from 'react-router'
import { requestOwnPlayer } from 'actions/player'
import { createUrl, metaGenerator } from 'utils'
import { GET, PATCH, POST, DELETE } from 'utils/api'
import { notify } from 'utils/actions'
con... |
import React, { Component } from "react";
import { connect } from "react-redux";
import * as actions from "../../Store/Actions/BookingActions";
import {
FormGroup,
Input,
Label,
Button,
ModalFooter,
ModalBody,
ModalHeader,
Modal
} from 'reactstrap';
class GenerateReceipt_01 extends Component {
stat... |
'use strict';
const AWS = require('aws-sdk');
const RealAWS = jest.requireActual('aws-sdk');
const underTest = async () => {
const s3 = new AWS.S3({ region: 'ab-cdef-1' });
return await s3.getObject({ Bucket: 'my', Key: 'thing' }).promise();
};
const eachPager = () =>
new Promise((resolve, reject) => {
con... |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { connect } from 'react-redux';
import { toastr } from 'react-redux-toastr';
import faker from 'faker';
import * as Services from '../../../services';
import { Can, read, manage, stat, api as API, administrator } from '../../util... |
import React from 'react';
import {
ListView,
StyleSheet,
Text,
TouchableOpacity,
View
} from 'react-native';
import {Global} from "../Global";
const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
const deviceWidth = Global.width;
const _midBorderWidth = 0.2;
const _borderRad... |
'use strict'
const chalk = require('chalk');
const EOL = require('os').EOL;
const {
Color
} = require('chalk');
const {
off
} = require('process');
let styles;
const defBeforeIndent = 3,
defAfterIndent = 3,
defTitleIndent = 3;
const formatBlock = {
indent: {
beforeIndent: defBeforeInden... |
let serviceCurrentStatus = {};
let services = [];
const pollingInterval = 30;
let pollingIntervalId = null;
// Read config.json and create health tiles
const readConfig = () => {
fetch("/config/default")
.then(async (response) => {
services = await response.json();
generateServiceTi... |
jQuery(document).ready(function ($) {
// подсветка инпутов
$('.bth__inp').on('focus', function () {
$(this).closest('.bth__inp-block').addClass('focus');
});
$('.bth__inp').on('blur', function () {
$(this).closest('.bth__inp-block').removeClass('focus');
});
$('.js-sug-open').... |
'use strict';
let scramble = function() {};
let reset = function() {};
let toggle_quaternions = function() {};
let toggle_animations = function() {};
let toggle_relative = function() {};
let undo = function() {};
let redo = function() {};
window.addEventListener("load", function() {
const canvas = document.getElemen... |
import Record from './Record';
const fakeUUID = () => (Math.random() * 16).toFixed();
// Model class that handles parsing, serializing, and pseudo-validation.
// Provides a mechanism for creating stubs (which will represent incremental UI updates)
// and fulfill themselves to the proper result of api calls
//
// An e... |
'use strict';
//Maps API
function getMap(POSTCODE, TARGET) {
const POSTCODES_URL = "https://api.postcodes.io/postcodes/"
//get map to dom
fetch(POSTCODES_URL + POSTCODE)
.then(response => response.json())
.then(data => {
const coord = {
lat: data.result.latitude... |
let node_machine = appSettings['appConfig']['node_machine'];
let protocol = appSettings['appConfig']['protocol'];
var socket = io.connect(protocol + '://'+ node_machine+'/tweet_cloud_nsp', { //nsp = namespace
"path": '/tweet_cloud',
"force new connection" : true,
"reconnection": true,
"reconnect... |
#!/usr/bin/env node
/**
* Copyright 2017 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unle... |
import logo200Image from 'assets/img/logo/logo_200.png';
import sidebarBgImage from 'assets/img/sidebar/sidebar-4.jpg';
import SourceLink from 'components/SourceLink';
import React from 'react';
import { FaGithub } from 'react-icons/fa';
import {
MdAccountCircle,
MdArrowDropDownCircle,
MdBorderAll,
MdBrush,
M... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.receiveAndParse = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; de... |
/*MD
{width=500px}
MD*/
"enable aexpr";
import Morph from 'src/components/widgets/lively-morph.js';
import _ from 'src/external/lodash/lodash.js';
const DEFAULT_VIEW = 'codeView';
export default class LivelySimulationC... |
'use strict';
var genFirstWaveBrick = require('./gen-first-wave-brick'),
genWaveBrick = require('./gen-wave-brick'),
findLaneMarkers = require('./find-lane-markers');
// text is the wave member of the signal object
// extra = hscale-1 ( padding )
// lane is an object containing all properties for this wavefor... |
/**
* Created by Peter on 2016. 8. 18..
*/
var mongoose = require("mongoose");
var dsForecastSchema = new mongoose.Schema({
geocode: {lat: Number, lon: Number},
address: {country:String, city:String, zipcode:Number, postcode:Number},
date: {type: Number, default: 0}, // timetick
dateObj: {type:... |
#!/usr/bin/env node
var startOpts = require("../lib/cli/opts.start.json");
var reloadOpts = require("../lib/cli/opts.reload.json");
var recipeOpts = require("../lib/cli/opts.recipe.json");
var pkg = require("../package.json");
var utils = require("../lib/utils");
var resolve = require("path").resolve;
var existsSync = ... |
const YoutubeService = require('./YoutubeService')
const TrackService = require('./TrackService')
const ServerService = require('./ServerService')
const QueueService = require('./QueueService')
const EmbedHelper = require('../../Helpers/EmbedHelper')
const { display, autoDelete } = require('./BotService.js')
class Mu... |
//declare required modules
var app = require('http').createServer(handler)
, io = require('socket.io').listen(app)
, fs = require('fs')
, static = require('node-static')
, sys = require('sys')
, sleep = require('sleep')
, blaster = require('pi-blaster.js')
, shellexecute = require('child_process').exec
... |
// JavaScript Document
var tabs = ["Queued","Crawling","Crawled","Files","Errors"];
var allPages = {};
var crawlStartURL = null;
var startingHost = "";
var startingPage = {};
var appState = "stopped";
//var maxDepth = parseInt(localStorage["max-crawl-depth"]?localStorage["max-crawl-depth"]:2);
//var maxSimult... |
/*globals exports, require */
var pointer = require('./pointer');
var errors = require('./errors');
var equal = require('./equal').equal;
var _add = function(object, key, value) {
if (Array.isArray(object)) {
// `key` must be an index
if (key == '-') {
object.push(value);
}
else {
object.... |
//Cloned from https://github.com/bmsimons/bootstrap-jsontables and modified
$(document).ready(function () {
loadTable();
});
function JSONTable(tableObject) {
this.table = tableObject
this.toJSON = function () {
tableHeaderArray = []
tableHeader = this.table.find("th")
for (var ... |
var fs = require('fs'),
readline = require('readline'),
Subscription = require('./subscription')
module.exports = NewsManager
// Manager for news updates.
// Registers Subscription objects and compares
// their results to updates stored in file.
// Input: filePath (path to file containing API tokens).
// If n... |
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
const vfs = require('vinyl-fs');
const lodash = require('lodash');
const through = require('through2');
const slash = require('slash2');
const chokidar = require('chokidar');
const gulpTs = require('gulp-typescript');
const gulpLess = require('gulp-... |
import "babel-polyfill";
import keyBy from "lodash/keyBy";
import get from "lodash/get";
import { DiffMarker, JsType } from "@ryaninvents/data-explorer-constants";
import diffValues from "./diffValues";
const key = (prop, prefix = "key") => `${prefix}:${prop.name}`;
key.plain = (prop) => key(prop);
key.added = (prop) ... |
// performs a search and returns the best move
function AI_getBest(grid, debug) {
Player = Snake
p = new Player();
playerMove = p.move(grid)
// console.log(playerMove)
return {move: playerMove};
}
// AI based on expectimax and snake-pattern weight function.
class Snake {
constructor() {
this.size = 4;
... |
import * as THREE from 'https://unpkg.com/three@0.119.0/build/three.module.js';
import { OrbitControls } from 'https://unpkg.com/three@0.119.0/examples/jsm/controls/OrbitControls.js';
import { ImprovedNoise } from 'https://unpkg.com/three@0.119.0/examples/jsm/math/ImprovedNoise.js';
class Spiral {
x = 0; y = 0; i ... |
const {
getStepsFromWebPage,
getIngredientsFromWebPage
} = require("../parseRecipe.js");
let cheerio = require("cheerio");
const fs = require("fs");
const util = require("util");
const readFile = util.promisify(fs.readFile);
const path = require("path");
let seriousEatsHTML;
let allRecipesHTML;
let damnDelicio... |
const Discord = require("discord.js");
const ms = require("ms");
const db = require("quick.db")
module.exports.run = async (client, message, args) => {
const mutelog = db.fetch(`mute.log_${message.guild.id}`)
const muteyetkilisi = db.fetch(`${message.guild.id}_mute.yetkilisi`)
const muted = ... |
import {
SEED_PASSWORD
} from './constants'
/**
* Creates a new seed phrase
* returns a promise
*/
export const createNewSeedPhrase = () => {
// balance blanket camp festival party robot social stairs noodle piano copy drastic
//kiwi acquire security left champion peasant royal sheriff absent calm alert ... |
// // Store API query variables
var baseURL = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_month.geojson";
var API_KEY = "<KEY>"
d3.json(baseURL, function(data) {
// Create a new marker cluster group
createFeatures(data.features);
});
function createFeatures(earthquakeData... |
const {
prettyNs
, safeFirstStamp
, uniqueUserFunctions
, separateUserFunctions
, mergeUserFunctions
} = require('ah-processor.utils')
class ReadFileOperation {
/**
* Processes a group of async activities that represent a fs read stream operation.
* It is used by the [ReadFileProcessor](#readfilepr... |
"use strict";
process.env.DEBUG = 'nuxt:*'
const App = require('../app');
const mailGun = require('../lib/mailgun');
const RSS = require('rss');
let VueAxios = require( 'vue-axios');
let axios=require('axios');
//const Nuxt = require('nuxt')
let { Nuxt, Builder } = require('nuxt');
// Launch nuxt build with given op... |
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
/*
let changeColor = document.getElementById('changeColor');
chrome.storage.sync.get('color', function(data) {
changeColor.style.backgro... |
let express = require('express')
let router = express.Router(); // 拿到express框架的路由
let Goods = require('../models/goods')
let mongoose = require('mongoose')
// 连接MongoDB数据库
mongoose.connect('mongodb://127.0.0.1:27017/db_shop'); // 若是带账号密码的:'mongodb://root:123456@127.0.0.1:27017/dbName'
// 连接成功操作
mongoose.connection.on(... |
import React, { Component } from 'react';
import { connect } from 'dva';
import router from 'umi/router';
import Header from '../Base/header';
import { List, InputItem, Button, Toast, Picker } from 'antd-mobile';
import styles from './userManager.less';
@connect(({ home }) => ({
...home,
}))
class userInfoChange ex... |
//Global Variable Declarations
var indexArr = [];
var textArr = [];
//Class declaration for CustomWord Class
class customWord {
constructor(text, color) {
this.text = text;
this.color = color;
}
}
//Default Custom Words
var um = new customWord("um", "Tomato");
var uh = new customWord("uh", "Orange");
... |
/**
* Handles file/project loading
*/
/*****************************************
* LOCAL FILE UPLOAD/DOWNLOAD, GENERIC
*/
function downloadPlaintext(filename, text) {
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
element.s... |
(function() {
var burger = document.querySelector('.navbar-burger');
var menu = document.querySelector('#'+burger.dataset.target);
burger.addEventListener('click', function() {
burger.classList.toggle('is-active');
menu.classList.toggle('is-active');
});
})();
var ar_menu = new ... |
const eleventyPluginRss = require('@11ty/eleventy-plugin-rss');
const dateFns = require('date-fns');
const YAML = require('yaml');
const markdownIt = require('markdown-it');
const markdownItTitleAnchor = require('markdown-it-anchor');
const markdownItContainer = require('markdown-it-container');
const markdownItToc = r... |
// Routing library (currently page.js, that will be replaced)
import page from 'page';
// API library, from github.com/typicode/fetchival
import fetchival from './fetchival.js'
// Svelte Shared Helpers
import * as svelteShared from 'svelte/shared';
// Svelte Store Library
import { Store } from 'svelte/stor... |
var curMnemonic = null;
var curAddress = '';
var curBalance = '';
var curIdentity = '';
var curName = '';
var sdkOpts = {};
var sdk = null;
var platform = null;
var identity = null;
var newWin = null;
const connectMaxRetries = 3;
var connectTries = 0;
function connect() {
return new Promise((resolve, reject) => {
... |
var bDeleteEntry, sImpression, sState, cbBookmark, bClosePopup, taTags, taComment;
function uiLocalization() {
[
"bDeleteEntry",
"lImpression",
"oImpressionNone",
"oImpressionDislike",
"oImpressionLike",
"oImpressionSoppy",
"oImpressionFluffy",
"oImpressionBorrrriiinnng",
"oImpressionLOLZ",
"oIm... |
const freeton = require('../../src');
const logger = require('mocha-logger');
const RootContract = require('../../contractWrappers/tip3/rootContract');
const { sleep } = require('../../src/utils');
/**
* String to hex
* @param {String} str
* @returns {String}
*/
function toHex(str) {
return Buffer.from(str, ... |
import { me } from "appbit";
import clock from "clock";
import document from "document";
import * as fs from "fs";
import * as messaging from "messaging";
import { preferences } from "user-settings";
import * as util from "./utils";
import * as hrm from "./hrm";
import { display } from "display";
import { today } from ... |
import path from "path";
import { COLORS } from "../utils/colors";
import { dnaComplement, partFactory } from "../utils/parser";
import parseBenchling from "./parsers/benchling";
import parseBioBrick from "./parsers/biobrick";
import parseFASTA from "./parsers/fasta";
import parseGenbank from "./parsers/genbank";
impo... |
let isPlaying;
let granimInstance;
let randomSound;
// Instructions to be executed on app startup.
async function main() {
isPlaying = false;
const ambiances = ['birds', 'bowls', 'morning', 'rain', 'sea']; // Array to hold the names of mp3 files
const randomAmbianceIdx = Math.floor(Math.random() * ambiances.len... |
let shoppingCart = [
{
name: "<NAME>",
type: "food",
quantity: 1,
price: 0.85,
},
{
name: "<NAME>",
type: "food",
quantity: 2,
price: 1,
},
{
name: "mushrooms",
type: "food",
quantity: 10,
price: 0.1,
},
{
name: "<NAME>",
type: "... |
let CSS = `
html { background-color: white !important;}
.interviews{
background-image: none !important;
}
/* change all text to black */
.search-page, .search-page *,.loading-quote__modal, .loading-quote__modal *, .podcast-index__list * , .podcast-index .podcast-index__header, section *, header *, footer *, #com... |
/**
* Copyright 2021 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... |
import "regenerator-runtime/runtime"; // needed for ``await`` support
import "../../core/jquery-ext";
import $ from "jquery";
import Base from "../../core/base";
import logging from "../../core/logging";
import Parser from "../../core/parser";
import utils from "../../core/utils";
const log = logging.getLogger("pat.sc... |
/* Module will be used for landing page,
search results page, subtopic page, etc.
Basically whenever a list of discussions need to be displayed*/
import React, { useEffect } from 'react';
import { useGlobal } from 'reactn';
import LazyLoad from 'react-lazyload';
import {
withStyles, Card, CardMedia,
Typography, C... |
var Hapi = require('hapi');
var Route = require('./route');
var Config = require('./config');
var app = {};
app.config = Config;
var server = new Hapi.Server();
server.connection({ routes: { cors: true }, port: app.config.server.port });
server.register(require('inert'));
server.register(require('vision'), functio... |
let chart3 = document.getElementById('chart3');
var data1 = [
{ name: "拒绝服务", value: 10 },
{ name: "蠕虫病毒", value: 13 },
{ name: "其他", value: 15 },
]
var data = data1
function getNum(num, d) {
let maxX = data[0].value
let minX = data[data.length - 1].value
let maxY = 5
let minY = 1
let... |
function normalize(x) {
// Calculates mantissa and exponent of a number
// Returns normalized number and exponent
// https://stackoverflow.com/q/9383593/6495043
if(x===0) {
return [0, 0];
}
if(isNaN(x)) {
return {mantissa: -6755399441055744, exponent: 972};
}
var sig = x > 0 ? 1 : -1;
if(!isFinite(x)) {
... |
//Global variables and DOM assignments
//assign strings containing each type of acceptable character"
var lowercaseLetters = "abcdefghijklmnopqrstuvwxyz";
var uppercaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var numbers = "123456789";
var specialChar = " !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";
//assign initial global valu... |
/*
what are you decoding?
images?
how?
take an Image
then take another image
use some algorithm to calculate position of the new pixels on existing image canvas
*/
/*
What inputs would you take?
1. canvas location - element id
2. new image
3. decoding algorithm
*/
function getImgData(id, imgSrc, decodeLaw) {
var... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getSpawnOptions = undefined;
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor... |
"use strict";
var express = require("express");
var app = express();
var fs = require("fs");
var multer = require("multer");
var upload = multer({ dest: "./uploads" });
var mongoose = require("mongoose");
mongoose.connect("mongodb://localhost/Realtec_Image_Bank", { useMongoClient: true })
var conn =... |
var flametexturesmap = {
"candle": "textures/candle.png",
"fury": "textures/fury.png"
};
getdataurl(flametexturesmap["candle"]).then(function(dataUrl) { flametexturesmap["candle"] = dataUrl; updateFromInputs(); });
getdataurl(flametexturesmap["fury"]).then(function(dataUrl) { flametexturesmap["fury"] = dataUrl;... |
import * as PIXI from 'pixi.js';
import _ from 'underscore';
import * as op from '../util/operation';
const TILE_SIZE = 16;
export { TILE_SIZE };
/**
* Makes TileOrientations much more human readable
*
* The tile id is calculated like this:
* 001 002 004
* 008 xxx 016
* 032 064 128
*
* If the tile we're... |
const path = require('path');
const fs = require('fs');
const cp = require('child_process');
const minimist = require('minimist');
const _ = require('lodash');
const util = require('./util');
const constants = require('./constants');
const defaults = {
nativeType: true,
setNodeEnv: false,
setHelpers: false... |
var AbstractColliderComponent = require('../../../addons/physicspack/components/AbstractColliderComponent');
var BoxCollider = require('../../../addons/physicspack/colliders/BoxCollider');
var SphereCollider = require('../../../addons/physicspack/colliders/SphereCollider');
var MeshCollider = require('../../../addons/p... |
'use strict'
// transformed from /vendor/optimisme-examples/egSelect.js by /scripts/transform.js
// (license unspecified)
const Gdk = require('Gdk');
const Gio = require('Gio');
const GLib = require('GLib');
const Gtk = require('Gtk');
const Select = require('./assets/select');
class App {
constructor() {
thi... |
const f1 = null; // false
const f2 = false; // false
const f3 = true; // false
const f4 = []; // false
const f5 = {}; // false
const f6 = undefined; // false
const f7 = '2.5..6 ..'; // false
const f8 = ' '; // false
const f9 = ''; // false
const f10 = ' . 5 '; ... |
const { translateToOSDITagging } = require("./people");
const bridge = require("../lib/bridge");
const config = require("../config");
const fields = require("../lib/knack-api-client/fields");
const objectMap = require("../lib/knack-api-client/objects");
const osdi = require("../lib/osdi");
const taglist = require("../l... |
const AdmZip = require('adm-zip');
const fetch = require('node-fetch');
const path = require('path');
const Big = require('big.js');
const fs = require('fs');
const csv = require('csv-parser');
const assert = require('assert').strict;
const testVersion = '2021.0.0';
const download = 'https://github.com/taxcalcs/taxcal... |
var dom = require('shipyard/dom'),
Request = require('shipyard/http/Request');
var LOADING_CLASS = 'loading',
LOADING_SMALL = 'small',
fd;
var browser_test_item = function(el) {
el.addListener('click', function(e){
e.stop();
var hashtag = this.get('data-hashtag');
var testThisXpi = function() {
var loade... |
function seed() {
return [...arguments];
}
function same([x, y], [j, k]) {
let args = [...arguments];
if(args[0].length === args[1].length){
for(i = 0; i < args[0].length; i++){
if(args[0][i] !== args[1][i]){
return false;
}
}
return true;
}
return false;
... |
const elLoket = document.querySelector("#loket");
function changeButton(id) {
let Btn = elLoket.querySelector(`#btn${id}`);
Btn.classList.toggle("btn-danger");
}
const audio = document.createElement("AUDIO");
function playAudio(tambahan = 1000) {
return new Promise(resolve => {
audio.currentTime = 0;
audio.play(... |
'use strict'
/* modalbox with message */
const toggleModal = (color='', header='', body='') => {
$('.modal-content').innerHTML = renderMessage(color, header, body)
$('.modal').classList.toggle('is-active')
}
const renderMessage = (color='', header='', body='') => {
switch (color) {
case 'red':
color =... |
'use strict';
var score = 0;
var userName = prompt('Hi! What is your name?');
alert('Welcome to my site ' + userName + '!');
//write 5 questions. they MUST accept yes or no OR y or n IN ANY CASE
//examples: YES, yes, YEs, yeS, Y, y,
function questionOne(){
var liveLocationCity = prompt('Do I live in Seattle?').to... |
const LdapStrategy = require('passport-ldapauth')
, log = require('winston')
, User = require('../models/user')
, Role = require('../models/role')
, Device = require('../models/device')
, TokenAssertion = require('./verification').TokenAssertion
, api = require('../api')
, userTransformer = require('../tr... |
/* eslint-disable consistent-return */
/* eslint-disable brace-style */
/* eslint-disable no-nested-ternary */
/* eslint-disable no-restricted-globals */
/* eslint-disable no-param-reassign */
// @param - timeStamp - Javascript Date object or date string
// @usage - timeSince(new Date().setFullYear(2019))
const timeSin... |
var axios = require('axios');
var bodyParser = require('body-parser');
var moody = require('..');
var expect = require('chai').expect;
var express = require('express');
var expressLogger = require('express-log-url');
var os = require('os');
var port = 8181;
var url = 'http://localhost:' + port;
var dy;
describe('ReST... |
// Copyright 2020 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 ... |
document.querySelector('#renderButton').addEventListener('click', e => {
e.preventDefault();
renderPlots();
});
const getPeriodOption = () => {
const period = document.querySelector('#period');
return period.item(period.selectedIndex);
}
const getPeriodStart = (text) => {
const period = getPeriodOption();
... |
var express = require("express");
var mysql = require('mysql');
var app = express();
var bodyParser = require('body-parser');
var https = require('https');
var config = require('./config/config');
var connection = mysql.createConnection(config.database);
var tables = ["nouveaux", "chefs", "benevoles", "tsj"]
... |
var Simple1DNoise = function() {
var MAX_VERTICES = 256;
var MAX_VERTICES_MASK = MAX_VERTICES -1;
var amplitude = 1;
var scale = 1;
var r = [];
for ( var i = 0; i < MAX_VERTICES; ++i ) {
r.push(Math.random());
}
var getVal = function(x) {
var scaledX = x * scale;
var xFloor = Math.f... |
'use strict';
function UnicornPic(image_url, title, description, keyword, horns) {
this.image_url = image_url;
this.title = title;
this.description = description;
this.keyword = keyword.toLowerCase();
this.horns = horns;
UnicornPic.allPics.push(this);
}
UnicornPic.allPics = [];
// vanilla JS: create ever... |
// TIP:
// A predicate function is a function that returns boolean true or false
// They are useful for improving the semantics of checking for conditions.
// Examples:
// - isUserLoggedIn(user)
// - isString(s)
// - isValidZipCode(code)
// etc
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
import React from 'react'
import { Container, Row, Col } from 'react-bootstrap'
import { Auth } from 'aws-amplify'
import { CognitoUser } from 'amazon-cognito-identity-js'
import { AppUser } from '../Auth'
import { getCurrentUser } from '../Auth/AppUser'
import { navigate } from '@reach/router'
import { UpdateUs... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ListEdgeTypeSubscriber = undefined;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(sour... |
//格式化日期
function formateDate(date) {
var y = date.getFullYear();
var m = date.getMonth() + 1;
var d = date.getDate();
var h = date.getHours();
var mi = date.getMinutes();
m = m > 9 ? m : '0' + m;
return y + '-' + m + '-' + d + ' ' + h + ':' + mi;
}
//删除节点
function removeNode(node) {
nod... |
'use strict';
/**
* Deploy token organization
*
* @module lib/setup/economy/DeployTokenOrganization
*/
const OSTBase = require('@ostdotcom/base'),
InstanceComposer = OSTBase.InstanceComposer;
const rootPrefix = '../../..',
coreConstants = require(rootPrefix + '/config/coreConstants'),
responseHelper = requir... |
/**
* Created by Ramos on 01/06/2015.
*/
var table = $('#usuarios');
/* Table tools samples: https://www.datatables.net/release-datatables/extras/TableTools/ */
/* Set tabletools buttons and button container */
$.extend(true, $.fn.DataTable.TableTools.classes, {
"container": "btn-group tabletools-dropdown-on... |
function protoLayout() { }
/*
*canvas関連の変数
*/
protoLayout.prototype.objects = [];
protoLayout.prototype.count = 0;
protoLayout.prototype.canvas;
protoLayout.prototype.context;
protoLayout.prototype.x;
protoLayout.prototype.y;
protoLayout.prototype.relX;
protoLayout.prototype.relY;
protoLayout.prototype.objX;
protoLayou... |
//Declare Variables
//Related to the following function: setTime
var introDiv = document.querySelector("#intro");
var timeElement = document.querySelector("#countdown");
var startQuizBtn = document.querySelector("#start-quiz")
var currentScore = document.querySelector("#current-score");
var initialQuestion = document.q... |
const express = require("express");
const mongoose = require("mongoose");
const path = require("path");
const ejsMate = require("ejs-mate");
const Campground = require("./models/campground");
const methodOverride = require("method-override");
const morgan = require("morgan");
const catchAsync = require("./utilities/cat... |
import React, { useState } from "react";
const fakeUserLocation = {
latitude: 37.7976,
longitude: 145.9837,
};
const DinerDashboard = (props) => {
const initialResults = props.trucks;
const initialFilters = {
nearMe: false,
ratingAvg: null,
cuisineType: null,
};
const [results, setResults] = ... |
/*
Copyright 2020 <NAME>
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, sublice... |
/**
* Class: AddMedicationForm
* Summary:
* Contains the contents and functionality of the AddMedicationDetail page.
*/
import React from "react";
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import PropTypes from "prop-types";
import TopNavigation from "../navig... |
var NBA = require("nba");
var node_helper = require("./node_helper.js");
var nba_helper = require("./nba_helper.js");
var convertData = nba_helper.convertData;
var parseField = node_helper.parseField;
function getPreviewArticle(params) {
return new Promise((resolve, reject) => {
var game_date = ... |
import React, {useEffect} from 'react';
import {Link} from "gatsby";
import {fade, makeStyles} from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import IconButton from '@material-ui/core/IconButton';
import Typography from '@material-ui/core... |
import React from "react";
import { Grid } from "@mui/material";
import { TextField } from "@mui/material";
import { InputAdornment } from "@mui/material";
import MailOutlineIcon from "@mui/icons-material/MailOutline";
import { FormControl, InputLabel } from "@mui/material";
import { IconButton } from "@mui/material";
... |
$(function () {
$("#jqGrid").jqGrid({
url: baseURL + 'car/teacher/list',
datatype: "json",
colModel: [
{ label: '手机号码', name: 'teacherMobile', index: 'teacher_mobile', width: 80 },
{ label: '姓名', name: 'teacherName', index: 'teacher_name', width: 80 },
{ label: '性别', name: 'sex',... |
import React, { useState, useEffect } from 'react'
import { useSelector, useDispatch } from 'react-redux'
import {
ChevronDown,
Trash,
Search
} from 'react-feather'
import DataTable from 'react-data-table-component'
import {
Card,
CardHeader,
CardTitle,
Input,
Badge,
Button
} from 'reactstrap'
import ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.