text stringlengths 5.97k 41.2k |
|---|
//> Shortcut utility function to check if a given name is
// bound to something that's an actual object (not just null)
// We perform the `null` check first because it's faster.
const isObject = obj => obj !== null && typeof obj === 'object';
//> Clip the end of a given string by the length of a substring
const clip... |
var possibleResults = [];
var sortType = 2;
var french = false;
var frenchVal = "";
var currentPage = "";
var viewText = "";
$(document).ready(function () {
var firstSlash = window.location.pathname.indexOf('/');
var secondSlash = window.location.pathname.indexOf('/', 1);
currentPage = window.location.pathname.su... |
$(document).on('submit', '.incomeform', function(e){
e.preventDefault();
nos = 1;
var barcode = $('.barcodeinput').val();
$.post(baseUrl+"/getpatientbybarcode", {
barcode: barcode,
},
function (data, status){
$('.itemsbody').empty();
$('.transaction-content').empty();
var reques... |
/**
* A mixin that adds locale functionality to components
* @param {any} superclass Accepts a superclass and creates a new subclass from it
* @returns {any} The extended object
*/
class IdsLocale {
constructor() {
this.loadedLocales = new Map();
this.loadedLanguages = new Map();
this.state = {
... |
var CJ_HashcatMasks = {
template: null,
maxCustomCharsets: 4,
validMasks: {
'lower': '?l',
'upper': '?u',
'digits': '?d',
'hexlower': '?h',
'hexupper': '?H',
'special': '?s',
'all': '?a',
'binary': '?b'
},
validReverseMasks: {
... |
import { grey } from 'material-ui/colors';
export const darkBackground = 'rgb(232,232,232)';
export const darkText = 'rgb(107,107,107)';
const Theme = {
darkBg: grey[200],
darkBgHover: '#e1e1e1',
darkText: grey[500],
navText: grey[800],
navHoverBg: grey[300],
navHeight: '60px',
searchInputBorderRadius: ... |
var sg = require("scenegraph"),
commands = require("commands");
var DEFAULT_NUMBER_STAR_POINTS = 5;
var DEFAULT_STAR_POINT_INSET = 0.5;
var DEFAULT_STAR_RESIZE_SCALE = 1;
var STAR_POINTS_ID = "starPoints";
var STAR_POINT_INSET_ID = "starPointInset";
var STAR_RESIZE_ID = "starShapeResize";
var STAR_RESIZE_CONTROL_I... |
function drawCircle(x, y, r, c, options) {
if (!options)
options = {};
let _ctx = options.ctx || ctx;
_ctx.save();
_ctx.beginPath();
_ctx.arc(x, y, r, 0, 2 * Math.PI, false);
_ctx.fillStyle = c || 'red';
_ctx.globalAlpha = options.alpha || 1;
if (options.glow)
_ctx.shadowBlur = 100;
... |
const { green, yellow, red, bold, italic, dim } = require(`chalk`)
const { Writable, Readable } = require(`stream`)
const Logger = require(`../index`)
const format = require(`../format`)
const TTY_LENGTH = 20 + Math.round(Math.random() * 100)
const prefix = Math.round(10000000 + Math.random() * 100000000).toString(36)... |
const conf = require('ocore/conf.js');
const db = require('ocore/db.js');
const express = require('express')
const cors = require('cors');
const mutex = require('ocore/mutex.js');
const assocTickersByAssets = {};
const assocTickersByMarketNames = {};
const assocTradesByAssets = {};
const assocTradesByMarketNames = {}... |
$(function(){
'use strict';
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content'),
'Authorization': $('meta[name="csrf-token-api"]').attr('content')
},
complete: function(xhr, stat) {
if(typeof xhr.responseJSON !== "undefined") {
... |
var articleId;
var purchasePrice;
var clientId, clientIdExpiration;
var transactionId = 0;
var counter = 0;
var PayableHeaderNames = [
"X-Article-Id",
"X-Purchase-Price",
];
var BG = {
Methods: {},
statusSettings: {
id: RQ.STORAGE_KEYS.REQUESTLY_SETTINGS,
avoidCache: true,
isExtensionEnabled: tru... |
import React, { useEffect, useLayoutEffect, useRef } from 'react'
import Attributes from 'react-native-painter/src/Components/Constants'
const clamp = (num) =>{
return num < 0 ? 0 : (num > 1 ? 1 : num)
}
//text-after-edge -> descender
//text-before-edge-> ascender
//hanging -> capheight
//central -> center
//mi... |
/**
* Copyright 2017 University of Castilla - La Mancha
*/
var zerorpc = require('zerorpc');
var async = require('async');
var request = require('request');
var fs = require('fs');
var exec = require('child_process').exec;
var ssh2 = require('ssh2').Client;
var mongo = require('mongodb').MongoClient;
var utils = requ... |
import React, { PureComponent } from "react";
import { Modal, Tabs, Form, Input, Select, AutoComplete, Spin, message, Button, Radio, Row, Col } from 'antd/lib';
import { authHeader, handleError } from "../common/AuthHeader.js"
import { hasEditPermission } from "../common/AuthUtil.js";
import AssociatedDataflows from ".... |
require(['scripts/modules/Logger', 'MVC_Controller_Managerpage', 'MVC_View_Managerpage', 'scripts/tools/showPW', 'scripts/tools/storagemanagement','scripts/tools/crypt', 'scripts/cryptojs/rollups/sha512'],
function(Logger, controller, view, showPW, SM, crypt){
var addBtn = document.querySelector('#addEntry');
v... |
/*
Contains functions for parsing the course offerings / course evaluations
webpages given the corresponding Cheerio object.
Exported functions and the pages they parse:
parseSemesterSearchPage($)
https://registrar.princeton.edu/course-offerings/search_results.xml?submit=Search&term=????
parseCourseOf... |
import React, {PropTypes} from 'react'
import Page from 'components/Page'
import {Modal, Alert, Button, Popover, Overlay} from 'react-bootstrap'
import autobind from 'autobind-decorator'
import moment from 'moment'
import Fieldset from 'components/Fieldset'
import Breadcrumbs from 'components/Breadcrumbs'
import Repor... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getColorScheme = exports.getColorSchemeKey = exports.isValidColor = exports.availableColors = exports.colorScheme = exports.createColorScheme = exports.colors = exports.transparentColors = exports.primitiveColors = exports.naturalColor... |
import React, { PureComponent } from 'react'
import { getApps } from 'edf-app-loader'
import componentFactory from '../componentFactory'
import utils from 'edf-utils'
import { connect } from 'react-redux';
import config from '../config';
import regExpStr from './regExpStr';
class componentClass extends PureComponent {... |
/*
Copyright 2010-2013 SourceGear, 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 in writing, softwar... |
//uncomment lines 249 and 620 to see the evolution in process, i currently have the optimal bird hardcoded in.
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var width = 600; var height = 800;
var player = {x: 20, y: 400, width: 40, acceleration: 1, velocity: 1};
var numOfHiddenLayer... |
// React
import React, { useState, useEffect, useCallback } from 'react';
//themes
import RCPCHTheme1 from '../components/chartThemes/rcpchTheme1';
import RCPCHTheme2 from '../components/chartThemes/rcpchTheme2';
import RCPCHTheme3 from '../components/chartThemes/rcpchTheme3';
import RCPCHThemeMonochrome from '../comp... |
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.definePrope... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va... |
/*
* eGov suite of products aim to improve the internal efficiency,transparency,
* accountability and the service delivery of the government organizations.
*
* Copyright (C) <2017> eGovernments Foundation
*
* The updated version of eGov suite of products as by eGovernments Foundation
* is... |
const fs = require('fs')
const path = require('path')
const Query = require('./query')
const baseDir = path.dirname(require.main.filename)
// Allows us to see if a find operation has any results
if (!Object.size) {
Object.size = function (obj) {
var size = 0; var key
for (key in obj) {
... |
/**
* Created by <NAME> on 16.12.2014.
*/
import { AppContext, BaseUtils } from 'phovea_core';
import { Polygon } from 'phovea_core';
import { Vector2D } from 'phovea_core';
import { IDType, SelectionUtils } from 'phovea_core';
import { Range } from 'phovea_core';
import { PluginRegistry } from 'phovea_core';
import ... |
/* 2D COLLISION FUNCTIONS ******************************************************
Very simple collision library that allows for a few collision types between
points, circles and boxes (AABB only at the moment).
*/
/* CORE FUNCTIONS **************************************************************
*/
var Collision2d = {}; ... |
/****************************************************************************************
Script to provide an API for managing card games
Written by <NAME>, 20/12/2005-8/1/2006
*****************************************************************************************
Please see http... |
// TODO: Do permissions checks before every action.
process.chdir('/home/user/documents/professional_documents/utt/university/conseil-perf/git/DiscordDynChanBot');
require('dotenv').config();
const Discord = require('discord.js');
const client = new Discord.Client();
const fs = require("fs");
const guildConfigFolder ... |
const EXIF = require('./exif');
const CanvasExifOrientation = require('canvas-exif-orientation');
const JSZip = require('jszip');
const { writePsdBuffer } = require('ag-psd');
const { parsePngFormat } = require('png-dpi-reader-writer');
const fs = require('fs');
const { Image, createCanvas } = require('canvas');
class... |
export { $pac } from './$pac';
export { TwoGive } from './TwoGive';
export { Abt } from './Abt';
export { Act } from './Act';
export { Actn } from './Actn';
export { Ada } from './Ada';
export { Add } from './Add';
export { Adx } from './Adx';
export { Ae } from './Ae';
export { Aeon } from './Aeon';
export { Aeur } fr... |
// Load native UI library
var nw_gui = require('nw.gui')
var test = false
nw_gui.App.on('open', function (argString) {
// get's called from the main window (first opened window)
argString = argString.split(' ')
var nr = argString[argString.length - 1]
if (!open_windows[nr]) {
log("open new win from... |
var MAX_DELTA_TIME = 0.2;
var PRESIMULATION_DELTA_TIME = 0.1;
var QUALITY_LEVELS = [
{
resolution: [256, 256],
diameter: 0.03,
alpha: 0.5
}, {
resolution: [512, 256],
diameter: 0.025,
alpha: 0.4
}, {
resolution: [512, 512],
diameter: 0.02,
... |
function init(expenses, year) {
var margin = {
top: 280,
right: 400,
bottom: 280,
left: 400
},
radius = Math.min(margin.top, margin.right, margin.bottom, margin.left) - 100;
var hue = d3.scale.category10();
var luminance = d3.scale.sqrt()
... |
/*
BitVec - A high performance JavaScript bit vector class.
Copyright (C) 2020 <NAME>. All rights reserved.
<EMAIL>
*/
/**
BitVec - A high performance JavaScript bit vector class.
@module bitvec
@author <NAME> (<EMAIL>)
@description A high performance JavaScript bit vector class.
*/
//const ENABLE_BO... |
// Datepicker
$(document).ready(function(){
$('.datepicker').datepicker(
{
format: 'dd/mm/yyyy',
language: 'pt-BR',
autoclose: true,
todayHighlight: true
}
);
});
// Marcar página como active no menu
$(document).ready(function(){
let pagina = $('input[name=page]').val();
// ... |
var urlparse = require('url').parse,
frame = '~m~',
qs = require('querystring');
var multipart = require("./node_modules/multipart/lib/multipart");
var events = require('events');
var StringDecoder = require('string_decoder').StringDecoder
var util = require('util');
var path = require('path');
var nodeBase = ... |
var d3 = {
...require("d3-axis/dist/d3-axis.min"),
...require("d3-scale/dist/d3-scale.min"),
...require("d3-selection/dist/d3-selection.min"),
...require("d3-shape/dist/d3-shape.min"),
...require("d3-interpolate/dist/d3-interpolate.min")
};
var { COLORS, classify, makeTranslate, wrapText } = require("./lib/h... |
var labelType, useGradients, nativeTextSupport, animate;
var a,c,flag1=0,k;
var json=[];
var doc=[];
var t=0,y=0,j=0;
var js,res;
var e=0,w=0,b=0,d=0;
var size=[];
var score=[];
var numbr=0;
var qry;
var z=1,q=0,wl=0,l=0,h,s,g;
var clr=['FF981D','F3B200','FF76BC','E064B7','CEA539'];
(function() {
var ua = navigator.... |
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] =... |
// QVsecure.js copied here
var cryptoObj = window.crypto || window.msCrypto; // for IE 11
var qvuser = {};
qvuser["testclient1"] = "";
qvuser["testclient2"] = "";
qvuser["testserver1"] = "";
qvuser["testserver2"] = "";
function getUserCredentials(username) {
if (username in qvuser) {
console.log(username+" :creden... |
var instruments = ["drum"];
var playerLengthElement = document.getElementById("player-length");
var playerLength = parseInt(playerLengthElement.value);
document.getElementById("text-player-length").innerHTML = "Length<br><span>" + playerLength + "</span>";
var instruments_map = {
drum : [9, playerLength]
};
var ma... |
/* eslint class-methods-use-this: "off" */
/* eslint-env es6 */
import { SNS } from 'aws-sdk';
import Validation from 'rsp-validation';
import config from '../config';
import createResponse from '../utils/createResponse';
import createErrorResponse from '../utils/createErrorResponse';
import getUnixTime from '../utils... |
const exec = require('child_process').exec;
var adb = require('adbkit')
var client = adb.createClient();
const fs = require('fs');
const fsPromise = fs.promises;
var platform = require('os').platform;
var fetch = require('node-fetch')
var path = require('path')
var commandExists = require('command-exists');
const p... |
/** Cases for spec'ing use of templatedata while converting HTML to wikitext */
'use strict';
/*global describe, it, before, after*/
var serviceWrapper = require('../serviceWrapper.js');
var request = require('supertest');
var path = require('path');
require('chai').should();
var configPath = path.resolve(__dirname, ... |
// Env variables
const maxImagesPermitted = 7;
const baseApiUrl = 'api'
// End Env variables
let token = getCookie('ai-biopsy-auth');
checkTokenAndRedirectIfEmpty();
document.getElementById('year').innerHTML = new Date().getFullYear();
for (var element of document.getElementsByClassName('max-number-of-images')) {
... |
import mysql from './MysqlWraper.js'
import csv from 'fast-csv'
import PdfPrinter from 'pdfmake'
import Excel from 'ejsexcel'
import Logger from './Logger.js'
let pdfDefinition = require('./pdfDefinition.js')
let PdfPrinterDriver = require('./pdfDefintionDriver.js')
let fs = require('fs')
let path = require('path')
le... |
var classicInfo = [
{type: 'TITLE', contain: " Classic Lode Runner " },
{type: 'TEXT' , contain: "Release year : 1983, 1984"},
{type: 'TEXT' , contain: "Platform : APPLE-II, Commodore 64, IBM PC, NES ..."},
{type: 'TEXT' , contain: "Publisher : Br\u00F8derbund & Ariolasoft" }, //Brøderbund
{type: 'TEXT' , contain:... |
const WORD_LENGTH = 5;
const MAX_CHANCES = 6;
const DEBUG_WORD = null; // Set as null to not use it.
const WRONG_LETTER = 0;
const BAD_SPOT_LETTER = 1;
const CORRECT_LETTER = 2;
const CELL_PADDING = 5;
const BUTTON_WIDTH = 40;
const BUTTON_HEIGHT = 60;
const BUTTONS_BOTTOM_MARGIN = 20;
const PARTICLES_SPAWN_COUNT = ... |
var assert = require("assert");
// bad dependency...
var Conf = require("../../../server/conf.js");
if (!Conf || Conf.get("email.send.confirmation"))
{
console.log("\n== WARNING WARNING WARNING WARNING WARNING WARNING ==\n");
console.log('Conf.get("email.send.confirmation") is set to true');
console.log(' => UN... |
/**
netherlands.js
Computer Science 50
Programmeer Project 2016
Energy Knowledge
<NAME>
11170816
*/
var year = "2010";
var product = "electricity";
// lists to store data
var dataList = [],
detailList = [],
dataElec2010 = [],
dataElec2012 = [],
dataElec2014 = [],
dataGas2010 = [],
dataGas2012 = [],
dataGas2014 = ... |
/*
* Copyright 2018-2021 Membrane Software <<EMAIL>> https://membranesoftware.com
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireWildcard(require("react"));
require("./slider.css");
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWil... |
function loadData(url) {
var json = null;
$.ajax({
'async': false,
'global': false,
'url': url,
'dataType': 'json',
'success': function(data) {
json = data;
}
});
return json;
}
// Load JSON data
var df = loadData('data.json');
var data = df.data;
var C = df.columns;
var path_loss_models = df.path_l... |
/*
* Copyright (c) 2018, Gnock
* Copyright (c) 2018, The Masari Project
* Copyright (c) 2018, The Plenteum Project
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain t... |
var Hexagon;
import * as THREE from "three";
import {
vis
} from "../../../lib/pub/draw/Vis.js";
Hexagon = class Hexagon {
constructor(main) {
this.animate = this.animate.bind(this);
this.main = main;
this.main.hexagon = this;
this.main.animateOn = false;
}
drawHsv(orient) {
var obj;
... |
var falcor = require('./Falcor');
var ModelRoot = require('./ModelRoot');
var RequestQueue = require('./request/RequestQueue');
var ImmediateScheduler = require('./scheduler/ImmediateScheduler');
var ASAPScheduler = require('./scheduler/ASAPScheduler');
var TimeoutScheduler = require('./scheduler/TimeoutScheduler');
va... |
let windowHeight;
let windowWidth;
let canvasWidth;
let canvasHeight;
let FRAME_RATE = 60;
let score= 0;
let difficulty =1;
let missileSpawnTime =9000;
let lastSpawn = 0;
let gameStarted = false;
let gameEnded = false;
let missile_images = [
'https://cdn.glitch.com/dfc8b693-bd17-4d21-9139-26bd8b54df55%2Fmissile_1.p... |
/*
* 本次更新内容
* 放弃ymPrompt弹出层(有弹出层无法关闭bug)
* 使用lhgdialog弹出层
* 放弃 window.alert = showAlertDivLayer 浏览器alert不能占用
* @user:943
* @date:2013-9-10 12:00:00
*/
/**初始化参数*/
var config = {
// 注意,此配置参数只能在这里使用全局配置,在调用窗口的传参数使用无效
lock : true,
fixed : true,
max : false,
min :false
};
/* 扩展窗口外部方法 */
var notice = fun... |
/* Copyright (c) 2013, Cornell University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list ... |
const assert = require('assert')
const { describe, it } = require('mocha')
const bitcoin = require('bitcoinjs-lib')
const regtestUtils = require('./_regtest')
const bs58 = require('bs58')
const ecc = require('tiny-secp256k1');
const bech32 = require('bech32')
const dhttp = regtestUtils.dhttp;
const TESTNET = bitcoin.... |
const uva10196 = require("../uva-10196-check-the-check");
describe("UVA 10196: check the check", () => {
it("pawns attack forward diagonally", () => {
expect(uva10196(fen("8/2P5/3k4/8/8/8/8/7K"))).toBe(null);
expect(uva10196(fen("8/3P4/3k4/8/8/8/8/7K"))).toBe(null);
expect(uva10196(fen("8/4P3/3k4/8/8/8/8... |
/* global WebSocket */
/* FIXME: Verify that we actually need `self`. */
/* eslint consistent-this: ["error", "self"] */
import React from 'react';
import {
Image,
Linking,
Platform,
ScrollView,
StyleSheet,
Text,
View,
} from 'react-native';
import {Button, ButtonGroup, Icon, SearchBar} ... |
'use strict';
const assert = require('assert').strict;
const { evaluate: e } = require('../support');
describe('operators', () => {
describe('grouping operators', () => {
it('should evaluate grouping operators', async () => {
assert.equal(await e('2 / 1 * 4 / 2'), 4);
assert.equal(await e('2 / (1 * ... |
'use strict'
const db = require('APP/db')
, {Book, Thing, Author, Favorite, User, AuthorsBooks, Publisher, Genre, BooksGenres, Review, Order, OrderItem, Promise} = db
, {mapValues} = require('lodash')
function seedEverything() {
const seeded = {
users: users(),
things: things(),
authors: authors(),
... |
"use strict";
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, ... |
/* This file is part of VoltDB.
* Copyright (C) 2008-2018 VoltDB Inc.
*
* This file contains original code and/or modifications of original code.
* Any modifications made by VoltDB Inc. are licensed under the following
* terms and conditions:
*
* Permission is hereby granted, free of charge, to any person obtain... |
var tasklist = new Array();
//window.onload = init_page;//不要括号
function TaskInfo() {
this.task_id = 0;
this.task_name = '';
this.start_url = '';
this.skip_time = 12;
this.page_list = '';
this.page_list_times = 0;
this.page_content = '';
this.post_title = '';
this.post_content = '';... |
/* Game of Hearts model object. */
var Hearts = {
// Pass constants
PASS_LEFT : 1,
PASS_RIGHT : 2,
PASS_ACROSS : 3,
PASS_NONE : 4,
// Player positions
NORTH : "North",
EAST : "East",
SOUTH : "South",
WEST : "West",
// Game status constants
FINISHED : -1,
REGISTERIN... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; ... |
/*
* D:/Development/XNAT/1.6/xnat_builder_1_6dev/plugin-resources/webapp/xnat/scripts/utils.js
* XNAT http://www.xnat.org
* Copyright (c) 2014, Washington University School of Medicine
* All Rights Reserved
*
* Released under the Simplified BSD.
*
* Last modified 1/13/14 11:49 AM
*/
// indexOf method for IE8
... |
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var Rectangle = require('./rectangle');
var Rectangle = Rectangle.Rectangle;
var Point = (function () ... |
import GPGPU from "../../GPGPU.js";
import Car from "../../physics/Car.js";
import CubicPath from "./CubicPath.js";
import QuinticPath from "./QuinticPath.js";
import xyObstacleGrid from "./gpgpu-programs/xyObstacleGrid.js";
import slObstacleGrid from "./gpgpu-programs/slObstacleGrid.js";
import slObstacleGridDilation ... |
import React from 'react';
import { Map, View, Overlay } from 'ol';
import { asArray } from 'ol/color';
import {
defaults as defaultControls,
FullScreen,
MousePosition
} from 'ol/control';
import { createStringXY, format } from 'ol/coordinate';
import { getCenter } from 'ol/extent';
import { GeoJSON } from 'ol/f... |
import * as Dat from "dat.gui";
import { Scene, Color, Fog, Vector3, MeshLambertMaterial } from "three";
import {
Flower,
Land,
Bear,
Deer,
Penguin,
Stork,
Fox,
Reindeer,
PolarBear,
Albatross,
Seal,
PineTree,
OakTree,
ElmTree,
Grass,
Mushroom,
Trees,
Iceberg1,
Iceberg2,
IcebergSm... |
// Avoid "already defined" errors when navigating away from Lovelace and back.
if (doc_root == undefined) {
var app_layout, card, chevron, div_view, doc_root, drawer_layout, edit_mode,
hui_root, icon, iron_icon, love_lace, main, menu_btn, menu_icon,
menu_iron_icon, notify_btn, notify_icon, notify_dot, not... |
import { Promise } from "meteor/promise";
import { Campaigns } from "/imports/api/campaigns/campaigns.js";
import { Comments } from "/imports/api/facebook/comments/comments.js";
import { People } from "/imports/api/facebook/people/people.js";
import { PeopleHelpers } from "/imports/api/facebook/people/server/peopleHelp... |
Figure.prototype.toggleBackground=function()
{
if(this.highlight) {
this.setBackgroundColor(new Color(245,115,115));
} else {
this.setBackgroundColor(new Color(115,245,115));
}
this.highlight = !this.highlight;
this.toggleCountdown--;
if (this.toggleCountdown == 0) {
window.clearInterval(this... |
class Rectangle{
constructor(width, height, color){
this.width = width;
this.height = height;
this.color = color;
}
calcArea(){
return this.width * this.height;
}
}
let rect = new Rectangle(4, 5, 'red');
console.log(rect.width);
console.log(rect.height);
console.log(rect... |
"use strict";
/**
* Model
*/
var model = {}
model.ajax = {
"data":false
}
// model.ajax.data
$.ajax({
url: "data.json",
beforeSend: function(xhr) {
if (xhr.overrideMimeType) { xhr.overrideMimeType("application/json"); }
},
dataType: 'json',
success: function(json) {
model.da... |
import React from 'react';
import { connect, Provider } from 'react-redux';
import {stateFromHTML} from 'draft-js-import-html';
// import { EditorContainer } from './editorContainer';
import Editor from 'draft-js-plugins-editor-wysiwyg';
import { EditorState, RichUtils, Entity, Modifier, ContentState, convertToRaw, Ato... |
jQuery(document).ready(function () {
var options = new primitives.orgdiagram.Config();
options.hasSelectorCheckbox = primitives.common.Enabled.False;
options.hasButtons = primitives.common.Enabled.False;
options.onMouseClick = onMouseClick;
options.onItemRender = onTemplateRender;
options.defaul... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.protot... |
var player;
var socket = io();
var time_update_interval;
let cnt = 0;
let chr = "";
let countit = 0;
let messageStr = "";
let isYoutube = true;
let silenzioso = false;
let canNotify = false;
let alreadyToggled = false;
//let nickName = promt('Nick?')
var notifica = new Audio("assets/juntos-607.mp3");
function notify()... |
'use strict';
var jQuery = require('jquery');
var $ = jQuery;
var _ = require('underscore');
require('datatables');
//require('jquery.browser');
require('toolkit');
var Backbone = require('backbone');
var Marionette = require('backbone.marionette');
Backbone.$ = $;
var Handlebars = require('handlebars');
var Templates... |
var url = require('url');
var ipn = require('paypal-ipn');
var _ = require('lodash');
var nconf = require('nconf');
var async = require('async');
var shared = require('../../../../common');
var User = require('./../../models/user').model;
var utils = require('./../../libs/utils');
var analytics = utils.analytics;
var G... |
// создаем объект Периодической Таблицы и задаем размер клетки элемента
var pt = new ChemDoodle.PeriodicTableCanvas('pt', 40);
//pt.specs.backgroundColor = 'rgba(158, 167, 184, 0.2)';
//ctx.setLineDash([4, 3]);
var arr1 = [1, 3, 11, 19, 37, 55, 87];
var arr2 = [4, 12, 20, 38, 56, 88];
... |
"use strict";
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { ... |
require('./utils');
var SocketsManager = {
sockets: {},
rooms: {},
interval: null,
startInterval: function () {
var self = this;
self.interval = setInterval(function () {
for (var roomid in self.rooms) {
if (self.rooms[roomid].length > 1) {
self.rotate(... |
"use strict";
var Backbone = require('../../shim/backbone'),
$ = require('jquery'),
_ = require('lodash'),
turfArea = require('turf-area'),
L = require('leaflet'),
utils = require('./utils'),
pointSourceLayer = require('../core/pointSourceLayer'),
drawUtils = require('../draw/utils'),
s... |
class Vector4 {
constructor( x = 0, y = 0, z = 0, w = 1 ) {
this.x = x;
this.y = y;
this.z = z;
this.w = w;
}
get width() {
return this.z;
}
set width( value ) {
this.z = value;
}
get height() {
return this.w;
}
set height( value ) {
this.w = value;
}
set( x, y, z, w ) {
th... |
var updateFilterTimer;
var resultCache;
var validSet;
var sortBy;
var nameDimension;
var nominateScatterChart = dc.scatterPlot("#scatter-chart");
var baseTip = d3.select("body").append("div").attr("class", "d3-tip").style("visibility","hidden").attr("id","mapTooltip");
var eW;
// From stackoverflow response, who borro... |
/**
* Display a message over the current position of the mouse cursor.
*
* Bind to a key by passing a reference to the `MousePointer.reveal` function.
*
* e.g.
* new Key('m', ['cmd','alt','ctrl'], MousePointer.reveal);
*/
"use strict";
class MousePointer {
static reveal() {
var invertedModalYAxisOf... |
/*!
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.12-master-9c079aa
*/
goog.provide('ngmaterial.components.slider');
goog.require('ngmaterial.core');
/**
* @ngdoc module
* @name material.components.slider
*/
SliderDirective['$inject'] = ["$$rAF", "$window", "$mdAria", "... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: TZ="MST+7" %hermes -O %s | %FileCheck --match-full-lines %s
"use strict";
// Tests are being run under Mountain Standard ... |
var GoogleMapAircraftDetailObjects = [];
function googleMapAircraftDetailSelectClosest(idx) { GoogleMapAircraftDetailObjects[idx].selectClosestClicked(); }
function googleMapAircraftDetailStopSelecting(idx) { GoogleMapAircraftDetailObjects[idx].stopSelectingClicked(); }
function googleMapAircraf... |
"use strict";
exports.default = void 0;
var _iterator = require("../../../core/utils/iterator");
var _extend2 = require("../../../core/utils/extend");
var _common = require("../../../core/utils/common");
var _label = require("./label");
var _symbol_point = _interopRequireDefault(require("./symbol_point"));
var _... |
// 任务动态
import React from 'react'
import './TaskState.less';
import '../../../../less/page-tab.less';
import Title from '../../../../components/IndexComponents/Title';
import request from '../../../../utils/request';
import moment from 'moment';
import { Input, Button, Modal, Tree, Checkbox, Pagination, message, Toolt... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.