text stringlengths 3.07k 16k |
|---|
'use strict';
const url = 'http://localhost:3000'; // change url when uploading to server
// select existing html elements
const loginWrapper = document.querySelector('#login-wrapper');
const userInfo = document.querySelector('#user-info');
const logOut = document.querySelector('#log-out');
const main = document.query... |
/**
*
* WaitlistPage
*
*/
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Helmet } from 'react-helmet';
import { createStructuredSelector } from 'reselect';
import { compose } from 'redux';
import {
get as getObjectProperty,
... |
import React, {useContext} from "react";
import { makeStyles } from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";
import Button from "@material-ui/core/Button";
import Grid from "@material-ui/core/Grid";
import {TicketsContext} from '../utils/TicketsContext'
const useStyles = mak... |
'use strict';
var array = require('x-is-array');
var object = require('is-object');
var proto = require('getprototypeof');
var size = require('unist-util-size');
var objectProto = Object.prototype;
var ignoredKeys = ['type', 'children', 'value'];
module.exports = diff;
function diff(left, right) {
var patch = {l... |
/*
This is what the desktop widgets look like:
-------------------------body (or other)---------------------
| |
| -------------------------top--------------------------- |
| | | |
| | ---left... |
import http from "http";
import fs from "fs";
import { once } from "events";
import { extname } from "path";
import { fileURLToPath } from "url";
import open from "open";
import kleur from 'kleur';
import { spawn } from 'child_process';
import glob from 'glob';
import path from 'path';
const timeout = 60 * 1000;
const... |
const debug = _debug('hodext:viewcontroller')
import Fuse from 'fuse.js'
import { clipboard, ipcRenderer } from 'electron'
import { EventEmitter } from 'events'
import { focus } from './helpers'
import {
ITEM_HEIGHT,
MAX_CHAR_COUNT,
SCROLL_THRESHOLD,
MAX_ITEM_COUNT,
ACTION_LOAD,
EVENT_HIDE,
EVENT_PASTE,... |
//dependencies
var express = require("express");
var router = express.Router();
var moment = require('moment');
//JWT
var authCtrl = require("../controllers/authCtrl.js");
var middleware = require("../controllers/middleware.js");
var utils = require("../controllers/utils.js");
var Mensaje = require("../models/mensaje"... |
var numeric = {};
numeric.dim = function dim(x) {
var y, z;
if (typeof x === "object") {
y = x[0];
if (typeof y === "object") {
z = y[0];
if (typeof z === "object") {
return numeric._dim(x);
}
return [x.length, y.length];
}... |
var mathCos = Math.cos;
var mathSin = Math.sin;
var mathSqrt = Math.sqrt;
var mathAcos = Math.acos;
var mathAtan = Math.atan;
var TransformMatrix = function (a, b, c, d, tx, ty)
{
a = typeof a === 'number' ? a : 1;
b = typeof b === 'number' ? b : 0;
c = typeof c === 'number' ? c : 0;
d = typeof d === ... |
"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... |
import { useState } from 'react';
import PropTypes from 'prop-types';
import {
FormattedMessage,
useIntl,
} from 'react-intl';
import SafeHTMLMessage from '@folio/react-intl-safe-html';
import {
IfPermission,
Pluggable,
} from '@folio/stripes/core';
import {
Paneset,
Pane,
MultiColumnList,
Row,
Col,
... |
var fs = require('fs');
var path = require('path');
var filepath = path.join(__dirname, '../temp/article');
var createMobi = require('./createMobi.js');
function getUrlFromBody (body) {
var regexp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i;
var cleanUrl = body['stripped-text'].... |
//--------------------------------------------------------
var Phaser;
var GameApp;
var MACRO_DEBUG;
//--------------------------------------------------------
(function (GameApp) {
"use strict";
GameApp.State_TestTouchControl = function () {
// 本state变量放在这里
this.character = null; // 主角... |
/**
* ### Контейнер с динамической подгрузкой данных
*
* @module InfiniteList
*
* Created by <NAME> on 18.09.2017.
*/
import React from 'react';
import PropTypes from 'prop-types';
import InfiniteLoader from 'react-virtualized/dist/es/InfiniteLoader';
import List from 'react-virtualized/dist/es/List';
import Aut... |
const path = require('path')
const Plaza = require('../models/plaza');
const Comment = require('../models/comment');
const { returnPaging } = require('../utils')
class CommentCtl {
async addComment(ctx) {
ctx.verifyParams({
content: { type: 'string', required: true },
plazaId: { type: 'string', requir... |
/* eslint-disable */
import window from 'global/window';
import Config from './config';
import Playlist from './playlist';
// Utilities
/**
* Returns the CSS value for the specified property on an element
* using `getComputedStyle`. Firefox has a long-standing issue where
* getComputedStyle() may return null when ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importDefault(require("react"));
var factory_1 = require("../factory");
var helper_1 = require("../utils/helper");
var react_dom_1 = require("react-dom");
var resize_sensor_1 = require(".... |
class Node {
constructor() {
this.left = this;
this.right = this;
this.up = null;
this.down = null;
this.header = null;
}
}
class Header {
constructor() {
this.left = null;
this.right = null;
this.up = this;
this.down = this;
this.header = this;
this.name = null;
t... |
import React from 'react';
import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { TextContent, TextListItem, TextListItemVariants, TextListVariants, TextList } from '@patternfly/react-core';
import get from 'lodash/get';
import hardcodedSchemas from '../../addSourceWizard/hardcodedS... |
/* global ethers hre */
const diamond = reqiure('../js/diamond-util/src/index.js')
function addCommas(nStr) {
nStr += ''
const x = nStr.split('.')
let x1 = x[0]
const x2 = x.length > 1 ? '.' + x[1] : ''
var rgx = /(\d+)(\d{3})/
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2')
}
retur... |
import useSWR from "swr";
import Table from "react-bootstrap/Table";
import { Accordion, Card } from "react-bootstrap";
// converts time hh:mm AM/PM to minute of the day
function convertTime(str) {
var min = 0;
var morn = 0; // 0 if morning, 1 if afternoon
if (str.charAt(str.length - 2) == "P") {
morn = 1;
... |
import * as THREE from "three";
const defaultDirections = {
iso: new THREE.Vector3(1, 1, 1),
front: new THREE.Vector3(1, 0, 0),
rear: new THREE.Vector3(-1, 0, 0),
left: new THREE.Vector3(0, 1, 0),
right: new THREE.Vector3(0, -1, 0),
top: new THREE.Vector3(0, 0, 1),
bottom: new THREE.Vector3(0, 0, -1),
};
... |
// ########### CLIENT CONFIG ###########
// Connect to local running Gosbank server
const LOCAL_DEBUG_MODE = true;
// Your country code always 'SO'
const COUNTRY_CODE = 'SO';
// Your bank code
const BANK_CODE = process.argv[2] || 'BANQ';
// When disconnect try to reconnect timeout (in ms)
const RECONNECT_TIMEOUT = ... |
var rows; //A json array of rows holding project goals
var editProjectID; //The ID of the project currently being edited
///// Document Ready
/////
/////
$(document).ready(function(){
ReadProjectGoals(ReadProjectGoalsCallback);
$("#add-project").click(function(){
SetupNewPr... |
import { isObject, forEachValue, isPromise, partial } from './util'
import ModuleCollection from './module/module-collection'
let Vue;
export class Store{
constructor(options = {}) {
const {
plugins = [],
strict = false
} = options
this.strict = strict
this... |
const DropPosition = {
ABOVE: 'drag-above',
BELOW: 'drag-below',
ON: 'drag-on'
}
function isMovingStarted (event, start) {
return Math.abs(event.clientX - start[0]) > 5 || Math.abs(event.clientY - start[1]) > 5
}
function composedPath (event) {
let el = event.target
const path = []
while (el) {
pat... |
import parseDates from './parseDates.js'
import { isObject } from './helpers.js'
// Performs HTTP requests
export default class HttpRequest {
constructor(method, url, data, options) {
const {
agent,
headers,
shouldParseJsonDates,
onAddCookies,
onResponseHeaders
} = options
this.onAddCookies = on... |
// problem domain: the Seattle Kitten Rescue has tons of kittens who need good homes. One of the best ways to reach prospective adoptive homes is to have profiles for each kitten available on a website. There are hundreds of kittens, though, and only a few volunteers; it's too time-consuming to hand-code each kitten's ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _team = require('../models/team.model');
var _team2 = _interopRequireDefault(_team);
var _cloudinary = require('../helper/cloudinary');
var _cloudinary2 = _interopRequireDefault(_cloudinary);
function _interopRequireDefault(obj) ... |
frappe.ui.form.on('Sales Invoice', {
async validate(frm) {
await correct_taxes(frm, "Selling", false)
}
})
frappe.ui.form.on('Purchase Invoice', {
async before_save(frm) {
var place_of_supply = frm.doc.place_of_supply
var supplier_gstin = frm.doc.supplier_gstin
var bypass_gs... |
// Project Variables
var project = 'BaguetteBoxWP'; // Project Name.
var projectURL = 'dev4'; // Project URL. Could be something like localhost:8888.
var productURL = './'; // Theme/Plugin URL. Leave it like it is, since our gulpfile.js lives in the root folder.
// Style related
var... |
'use strict';
var _asyncToGenerator = require('babel-runtime/helpers/async-to-generator')['default'];
var _Object$assign = require('babel-runtime/core-js/object/assign')['default'];
var _Promise = require('babel-runtime/core-js/promise')['default'];
var osascriptExecAsync = _asyncToGenerator(function* (script, opts... |
import { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { v4 } from 'uuid';
import { withRouter } from 'next/router';
import difference from 'lodash/difference';
import FilterSelectionItem from './FilterSelectionItem';
import * as actions from 'li... |
/* LICENSE
_This file is Copyright 2018 by the Image Processing and Analysis Group (BioImage Suite Team). Dept. of Radiology & Biomedical Imaging, Yale School of Medicine._
BioImage Suite Web is licensed under the Apache License, Version 2.0 (the "License");
- you may not use this software except in complianc... |
// ---------------- Variables ----------------
const answerDiv = document.querySelector('.answers');
const questionElement = document.querySelector('.question');
const nextQuestionBtn = document.querySelector('.next-question');
const finalScreenElement = document.querySelector('.final-screen');
const modal = document.... |
const router = require("express").Router();
const path = require("path");
const parseRange = require("range-parser");
const torrentStream = require("torrent-stream");
const _ = require("lodash");
const fs = require("fs-extra");
const MovieWatched = require("../Models/WtchedMovie");
const ffmpegInstdataer = require("@ff... |
import React from 'react'
import styled from 'styled-components'
import { Tooltip } from 'react95'
const renderStar = (number, serialize) => {
let temp = []
for (let i = 0; i < number; i++) {
temp.push(serialize)
}
return temp
}
const renderCategory = category_id => {
switch (category_id) {
case 1:
return... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { is } from 'immutable';
import { PropTypes } from 'prop-types';
import {
StyleSheet,
View,
Image,
Text,
Dimensions,
TouchableOpacity,
} from 'react-native';
import PanelVideo from './componentVideo';
import arrowLeft fr... |
//--------------------------------------- Project Information - Start ---------------------------------------//
/*
Author: <NAME>
Project Name: Vet Klinik
Page: Storage Page JavaScript File
Version: v1.2
GitHub: https://github.com/eymeneruyar
Date: 18.09.2021
*/
//----------------------------... |
/* -----------------------------------
1. Switch pages on click
----------------------------------- */
const [elements, clicks] = [
[document.querySelector(".about"), document.querySelector(".experience"), document.querySelector(".contact")],
[document.getElementById("about"), document.getElementById("exper... |
import Api from '../api/Api'
import ModelCollection from './ModelCollection'
/**
* A ModelCollectionProperty instance is a ModelCollection that is a property of
* a model instance. ModelCollectionProperties can be operated on independently of
* the Model that owns them.
*
* @memberof module:model
*/
class ModelC... |
var container = d3.select("#container")
//var audio_wall = new Audio('wall-hit2.mp3');
//var audio_yahoo = new Audio('yahoo.mp3');
var PRIZE_VALUE = 100;
var GHOST_PENALTY = 100;
var Maze = function(data) {
this.data = data;
this.aStarGraph = this.genAStarGraph(data);
this.players = [];
this.targets =... |
/* Promises
**********************************************************************/
const getFakeMembers = count => new Promise((resolves, rejects) => {
const api = `https://api.randomuser.me/?nat=US&results=${count}`
const request = new XMLHttpRequest()
request.open('GET', api)
request.onload = () =>... |
const ms = require('../../dist/modelscript.cjs');
const expect = require('chai').expect;
const path = require('path');
let SNA_csv;
const {
ReinforcedLearningBase,
UpperConfidenceBound,
ThompsonSampling,
} = ms.ml.RL;
describe('ml', function () {
this.timeout(10000);
before((done) => {
Pr... |
require("./helpers/logger");
require("dotenv").config();
const { getCommandLineObject, prepareCli } = require("./cli");
const Renderer = require("./renderer");
const { getTweetsFromUser, getTweetsFromThreads } = require("./twitter");
const { getOutputFilePath } = require("./utils/path");
const { sendToKindle } = requir... |
import {EventEmitter} from 'events';
import {getConfig, copyObject, getFirstByName} from 'helptos';
import {randomInt} from 'random-tools';
import {createName} from './name';
import * as properties from './properties';
import * as race from './race';
import * as item from './item';
import * as actions from './actions';... |
import { GcodeControllerApi } from "./api.js";
const api = GcodeControllerApi.initialize("/api/");
const app = new Vue({
el: "#main",
data: {
port: "",
ports: [],
baudRate: 0,
connected: false,
commandHistory: [],
log: [],
xyStep: 5,
zStep: 0.1,
files: [],
job: {
fileN... |
import React, { PureComponent } from 'react';
import moment from 'moment';
import { routerRedux, Route, Switch, Link } from 'dva/router';
import { Upload, Button, Modal, Icon, message } from 'antd';
// import "cropperjs/dist/cropper.css"
import Cropper from 'react-cropper'
import { connect } from 'dva';
// import style... |
import React from "react"
import PropTypes from "prop-types"
import { connect } from "react-redux"
import { getCurrentLanguageString, createPath } from "../../utility/helper"
import * as actionTypes from "../../store/action"
import {
BackDropWrapper,
ModalWrapper,
FormInput,
FormButton,
FormLabel,
ModalHead... |
import * as React from 'react';
import { Pressable, StyleSheet, TouchableOpacity, View } from 'react-native';
import { AppText as Text } from '../components/AppText';
import { DeckCaption } from '../components/DeckCaption';
import { formatCount, shareDeck } from '../common/utilities';
import { gql } from '@apollo/clien... |
import React from 'react'
import styled from 'styled-components'
import { graphql, Link } from 'gatsby'
import { motion } from 'framer-motion'
import Layout from '../components/structure/layout'
import PostsList from '../components/PostsList'
import TinyLetterSignup from '../components/TinyLetterSignUp'
import Announc... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
import React, { Component } from 'react'
import { inject, observer } from 'mobx-react'
import { compose } from 'recompose'
import { NoPaddingCol, NoMarginPaddingCol } from '../components/Common/Common'
import { Grid, Row, Col } from 'react-bootstrap'
import { ProgressBar } from 'react-bootstrap'
import TokenInfo from ... |
const fetch = require('node-fetch');
const db = require('./connection');
const { State } = require('../models');
const { URLSearchParams } = require('url');
const encodedParams = new URLSearchParams();
require('dotenv').config()
const censusUrl = `https://api.census.gov/data/2021/pep/population?get=group(NST_EST2021_... |
// Load in geojson data
var geoData = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_month.geojson";
//var geojson;
console.log(geoData)
// Grab data with d3
d3.json(geoData, function(data) {
makeFeatures(data.features);
})
function magColor(depth) {
return depth > 90 ? "red":
... |
import test from 'ava';
import {
makeEvaluators,
evaluateProgram as evaluate,
} from '@agoric/make-simple-evaluate';
import * as babelStandalone from '@babel/standalone';
import { makeModuleTransformer } from '../src/main.js';
const { default: babel } = babelStandalone;
const makeImporter = (liveVars = []) => as... |
const path = require('path');
const {test} = require('mocha');
const chai = require('chai');
const chaifs = require('chai-fs');
const {expect} = chai;
const express = require('express');
const {buildSchema} = require('graphql');
const schemaFile = require('../test-fixtures/schemas/basic-graphql-schema-1');
const Graph... |
import fetchDataContacto from "../configurar_contacto/getDataContacto.js";
import setDataMenu from "../setting_data/setDataMenu.js"
const loadChatBot = function(){
return new Promise((resolve) => {
var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();
var s1=document.createElement("script"),s0=docu... |
'use strict';
/**
* Returns true if word occurrs in the specified word snaking puzzle.
* Each words can be constructed using "snake" path inside a grid with top, left, right and bottom directions.
* Each char can be used only once ("snake" should not cross itself).
*
* @param {array} puzzle
* @param {array} sear... |
'use strict';
const Rx = require('rxjs/Rx');
const fs = require('fs-extra');
const path = require('path');
// const chalk = require('chalk');
const sass = require('node-sass');
const stylus = require('stylus');
const postcss = require('postcss');
const sasslint = require('sass-lint');
const stylint = require('stylus-l... |
const { Game } = require('../models/Game')
const { TttError, ERR_CODES } = require('../utils/tttError')
const BOARD_SIZE = 9
const GAME_STATES = {
'initial': 0,
'joined': 5,
'player1': 10,
'player2': 20,
'wonByPlayer1': 30,
'wonByPlayer2': 31,
}
// odd and even eases the computation of game over
const PLAY... |
'use strict'
import './switch.css'
const defaults = {
color: '#64bd63',
secondaryColor: '#dfdfdf',
jackColor: '#fff',
jackSecondaryColor: null,
className: 'weex-switch',
disabledOpacity: 0.5,
speed: '0.4s',
width: 100,
height: 60,
// is width and height scalable ?
scalable: false
}
function tra... |
const middy = require('./middy');
const AWS = require('aws-sdk');
const S3_VIDEO_BUCKET = `weadmit-videos-${process.env.STAGE}`;
const FACE_DETECTION_ROLE_ARN = 'arn:aws:iam::536335609904:role/weadmit-rekognition';
exports.facedetect = middy(async (req) => {
if (!req.body.key) {
return { status: 'error', ... |
var elementTypes = {
Episode: require('./Elements/Episode'),
Programme: require('./Elements/Programme'),
Group: require('./Elements/Group'),
Version: require('./Elements/Version')
},
fs = require('fs'),
http = require('http');
function Fixture(name, data, elementPool, config, fixtureName) {
... |
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj ... |
// Copyright 2020 Las Venturas Playground. All rights reserved.
// Use of this source code is governed by the MIT license, a copy of which can
// be found in the LICENSE file.
import { random } from 'base/random.js';
import { range } from 'base/range.js';
import { stringToUtf8Buffer, utf8BufferToString } from 'compone... |
/**
Activity 2: Draw an Alien
<NAME>
Draw an alien on canvas
*/
"use strict";
/**
Description of preload
*/
function preload() {
}
/**
Description of setup
*/
function setup() {
// Create background
createCanvas(640,480);
background('#FFD9FF');
noStroke();
// Draw neck
ellipseMode(CENTER);
fill('... |
'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 ("val... |
import React, { Component, PropTypes } from 'react'
import { findDOMNode } from 'react-dom'
import { DropTarget } from 'react-dnd'
import { Collection } from 'react-virtualized'
import withScrolling, { createVerticalStrength, createHorizontalStrength } from 'react-dnd-scrollzone';
const ScrollZoneCollection = withSc... |
var sources = {
"current": "firstAttempt",
"sample": {
"path": "/data/sampleTreeData.json",
"createGetChildrenFunction": function(treeData) { return undefined },
"getRoot": function(treeData){
return treeData
}
},
"firstAttempt": {
"path": "/data/first_test_data.json",
"createGetCh... |
"use strict";
const { AsyncEventEmitter } = require("emitter");
const { ServiceMgr } = require("service");
const rp = require("request-promise");
const JenkinsEventEmitter = require("./jenkins_event_emitter");
const Job = require("../../types/job");
const JenkinsExecutor = require("./executor");
/*
To get started wit... |
import * as d3 from "d3";
import {dispatch} from "../dispatch";
export function VisualizationPreview(container) {
this.visPreview = makeVisPreview(container);
}
var makeVisPreview = function(container) {
var inPalette = [],
barSvg = container.select(".barPreview"),
mapSvg = container.select(".mapPrevi... |
import React, { Component } from 'react'
import { Button, Alert, Pagination } from 'react-bootstrap'
import { Link } from 'react-router'
import SubHeader from '../../../components/SubHeader'
import SearchBar from '../../../containers/SearchBarContainer'
import AddProductDialog from './AddProduct/Dialog'
import Product... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import CurrentTimeIndicator from '../CurrentTimeIndicator/CurrentTimeIndicator';
import NextButton from '../NextButton/NextButton';
import PreviousButton from '../PreviousButton/PreviousButton';
import SkipAheadButton from '../SkipAheadButton... |
import { Button, Modal, Form, Input, Select, Cascader } from 'antd';
const FormItem = Form.Item;
const Option = Select.Option;
import styles from "./Manage.less";
import { connect } from 'dva';
@connect(({ manage, loading }) => ({
manage,
// submitting: loading.effects['manage/submit'],
}))
@Form.create()
expor... |
import React, { useEffect, useState } from "react";
import { StyleSheet, Text, Image, TouchableOpacity, Alert } from "react-native";
import styles from "./styles";
import {
Container,
Content,
Form,
Item,
Input,
Button,
Icon,
Label,
View,
Picker,
} from "native-base";
import { Formik } from "formi... |
ddpFuentesDataStore = new Ext.data.Store({
id: 'ddpFuentesDataStore',
proxy: new Ext.data.HttpProxy({
url: CARPETA+'/listado',
method: 'POST'
}),
baseParams:{tampagina: TAM_PAGINA}, // this parameter is passed for any HTTP request
reader: new Ext.data.JsonReader({
ro... |
let myReq;
const myTextArea = document.getElementById("code");
const myCodeMirror = CodeMirror.fromTextArea(myTextArea, {
mode: "x-shader/x-fragment",
theme: "pastel-on-dark",
lineNumbers: true,
indentUnit: 4,
extraKeys: {
"Ctrl-Space": "autocomplete",
"Ctrl-S": function(cm) {
ca... |
'use strict';
const Chat = require('./Chat');
const textMatchesPatterns = require('./utils/text-matches-patterns');
const BootBot = require('./BootBot');
class Conversation extends Chat {
/**
* Create a new conversation with a user.
* @param {BootBot} bot Bot instance
* @param {String} userId
*/
const... |
function changeCity(cityId, cityName){
$('#city_id').val(cityName);
$.kingAjaxNotMsg('/index/common/hospitals', {city_id:cityId}, function(data){
var hospitalOpt = '';
if(data.data.length > 0){
$.kingAjaxNotMsg('/index/common/departments', {hospital_id:data.data[0].hospital_id}, func... |
// common.js:
// Euler Zero project, common javascript used by html doc files
//
// <copyright>
// This is a part of Euler Zero - see https://github.com/frasnian/euler-zero
// Copyright (c) 2015,2016 <NAME>
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or co... |
import CSymbol from '../symbol';
class Path {
constructor(param) {
this.points = [...param.points];
this.symbol = param.symbol;
this.color = param.color || 'yellow';
this.width = param.width || 8;
this.animation = param.animation || 'alternate';
this.speed = Math.abs... |
/**
* Object helper functions
* @module bmoor.object
**/
var bmoor = require('./core.js');
/**
* Takes a hash and uses the indexs as namespaces to add properties to an objs
*
* @function explode
* @param {object} target The object to map the variables onto
* @param {object} mappings An object orientended as [... |
// Copyright 2012 Traceur Authors.
//
// Licensed under the Apache License, Version 2.0 (the 'License');
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed ... |
function DownloadJson(json_url)
{
var json = null;
$.ajax({
'async': false,
'global': false,
'url': json_url,
'dataType': "json",
'success': function (data) {
json = data;
}
});
return json;
}
async function DownloadJsonAsync (json_url)
{
l... |
var path = require('path');
var slasp = require('slasp');
var semver = require('semver');
var npmconf = require('npmconf');
var nijs = require('nijs');
var RegClient = require('npm-registry-client');
var Source = require('./Source.js').Source;
var inherit = require('nijs/lib/ast/util/inherit.js').inherit;
var client;
... |
import { run } from '@ember/runloop';
import { set, setProperties, get, getProperties } from '@ember/object';
import { guidFor } from '@ember/object/internals';
import buildOwner from './build-owner';
import { _setupAJAXHooks } from './settled';
import Ember from 'ember';
import { Promise } from 'rsvp';
import { assert... |
const request = require("request");
const moment = require('moment');
const PostOnServer = require('../models/PostOnServer');
// const serverHost = 'http://localhost:8000';
const serverHost = 'http://yadgarcarriage.com/demo/yadgar';
const time2Sync = 5;
let holdSync = time2Sync * 60;
let receive... |
import React, { Component } from 'react'
import decodeFn from 'utils/decodeFn'
import ClaimHolder from '../../contracts/ClaimHolder'
import Loading from 'components/Loading'
import ValidateClaim from './_ValidateClaim'
import ClaimDetail from './modals/ClaimDetail'
import KeyDetail from './modals/KeyDetail'
import ... |
//////////////////
// Dependencies //
//////////////////
const browserSync = require("browser-sync");
const spawnSync = require("child_process").spawnSync;
const fs = require("fs");
const gulp = require("gulp");
const gp = require("gulp-load-plugins")();
const _ = require("lodash")... |
// create-collection-pop.jsx -> add a project to a new user or team collection
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { kebabCase, orderBy } from 'lodash';
import { withRouter } from 'react-router-dom';
import { Button, Loader } from '@fogcreek/shared-components';... |
import React from "react"
import { graphql } from "gatsby"
import Img from "gatsby-image"
import Layout from "../components/layout"
import Heading from "../components/text/Heading"
import Paragraph from "../components/text/Paragraph"
import WorkSubHeading from "../components/text/WorkSubHeading"
import CallToAction fr... |
//TABLA SOLO USUARIOS DE LA LISTA GENERAL CON 4 COLUMNAS
$(document).ready(function() {
// Function to convert an img URL to data URL
function getBase64FromImageUrl(url) {
var img = new Image();
img.crossOrigin = "anonymous";
img.onload = function () {
var canvas = document.createElemen... |
// sets up dependencies
const Alexa = require('ask-sdk-core');
const i18n = require('i18next');
// core functionality for tweet skill
const GetElonTweetHandler = {
canHandle(handlerInput) {
const request = handlerInput.requestEnvelope.request;
// checks request type
return request.type === 'LaunchRequest... |
let game;
let started;
let paused;
let lost;
let rewinding;
var birdImg;
var backImg;
var birdImgTwo;
let backgroundImg;
let backgroundX = -10;
let backgroundY = -10;
let back
var THATSHOT, REWIND, LOOKGOOD;
var SOUNDS;
var BOPS, SELECTED_BOP;
let font;
let startButton, restartButton, pauseButton;
let startCoun... |
var identifier_field = 'package';
var blobField = 'content';
var titleField = 'path';
var labelField = 'eadtitle_t';
var bytesField = 'stream_size';
var typeField = 'content_type';
var rows = 20;
function callback(data) {
var repo_item_access_endpoint = 'http://'+django_service_host+':'+django_service_port+'/earkweb... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.generate = generate;
exports["default"] = void 0;
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; };... |
/**
* DRAW METHODS
*/
var radians = Math.PI / 180; // multiply degrees by this to get radians :)
var pi2 = Math.PI * 2;
/**
* creates a polygon shape path with n sides at the specified radius
*
* @param {number} centerX center x of polygon
* @param {number} centerY center y of polygon
* @param {number} r... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
// récupération des coordonnées des voisins autorisées de la zone contact utilisateurs
var connexion ;
var _connectionStatus = docume... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.