text stringlengths 3.22k 29.5k |
|---|
// prompt("name")
genderImage()
coverImage()
// -------------- gender image to change with radio selction -------------
function genderImage(){
var imageparent = document.querySelector("#img-box");
var m_image = document.createElement('img');
imageparent.appendChild(m_image);
m_image.classList.add("gnd-img")
m_image.... |
import { parseCSV } from "../../../lib";
import { finalizeContactLoad } from "../helpers";
import { completeContactLoad, failedContactLoad } from "../../../workers/jobs";
import { Tasks } from "../../../workers/tasks";
import { jobRunner } from "../../job-runners";
import { r, cacheableData } from "../../../server/mode... |
import './Table.scss'
import React from 'react'
import { Column, Table as TableVirtualized } from 'react-virtualized'
import { Button } from 'reactstrap'
import classNames from 'classnames'
import { NodeRelevanceUpdatedEvent } from 'model/event/RecordEvent'
import { ColumnDefinition, ColumnGroupDefinition } from 'mod... |
/* globals before, describe, it */
var assert = require('assert')
var marky = require('..')
var fixtures = require('./fixtures')
var cheerio = require('cheerio')
describe('headings', function () {
var $, $md, $html
before(function () {
$md = cheerio.load(marky(fixtures.dirty))
$html = cheerio.load(marky(... |
// Site dependencies; should always match the dependencies in package.json
var express = require('express');
var path = require('path');
var favicon = require('static-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var validator = require(... |
const AWSXRay = require("aws-xray-sdk");
const got = require('got');
const EventEmitter = require("events").EventEmitter;
const express = require("express");
const bodyParser = require("body-parser");
const cors = require("cors");
const Message = require("./Message");
const Postback = require("./Postback");
const Read... |
/**
* Drawing Config Sheet
* @type {FormApplication}
*
* @params drawing {Drawing} The Drawing object being configured
* @params options {Object} Additional application rendering options
* @params options.preview {Boolean} Configure a preview version of a drawing which is not yet saved
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArrayInput = void 0;
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importDefault(require("react"));
var theme_1 = require("../theme");
var locale_1 = require("../locale");
var InputBox_1 = tslib_1.__importDefault(require("./I... |
import Events from './events'
import local from '../../local.js'
import { SettingsStore } from './settingsStore.js'
import { t } from './translationStore.js'
import iconhelper from '../helpers/icon.js'
const IconHelper = new iconhelper()
export class stationStore extends Events {
constructor(props) {
super(prop... |
'use strict';
var yeoman = require('yeoman-generator');
var fs = require('fs');
var path = require('path');
var chalk = require('chalk');
var yosay = require('yosay');
var _ = require('lodash');
var inquirer = require('inquirer');
var glob = require('yeoman-generator/node_modules/glob');
module.exports = yeoman.gene... |
// Central data management module for coordinated background refresh and caching
const frostybot_module = require('./mod.base')
var cron = require('node-cron');
module.exports = class frostybot_datasources_module extends frostybot_module {
constructor() {
super();
this.description = 'Datasource C... |
const fs = require('fs')
const Path = require('path')
const deepSet = require('deep-set')
const {JSONPath} = require('jsonpath-plus')
const debug = require('debug')('dpc.DpcProject')
const Utils = require('./utils')
const uniqueArray = Utils.uniqueArray
const Validator = require('./validator')
const validator = new ... |
import htmlcontents from "./play.html";
import { createTemplate } from "../../utils/shadowdom";
import toast from "../../components/utils/toast";
import { Deferred } from "../../utils/time";
import debug from "debug";
import notificationsound from "../../assets/notification.mp3";
const log = debug("chainreaction:play"... |
/* Copyright (c) 2013-2015 <NAME>, MIT License */
/* jslint node:true, asi:true */
'use strict'
var Fs = require('fs')
var Path = require('path')
var _ = require('lodash')
var Uuid = require('node-uuid')
var Levelup = require('level')
var LevelQuery = require('level-queryengine')
var JsonqueryEngine = require('jsonque... |
/* This plugin was created for a personal project and then converted to a general purpose plugin.
I've been out of the loop for some time, so my knowledge of latest JS is somewhat limited.
The below program could be shortened using better javascript.
Keep this in mind before reading.
*/
const React = require("react")... |
import React, { useContext, useEffect } from 'react';
import { useHistory } from 'react-router';
import { YellowButton } from '../common/Buttons';
import { EditContext } from './EditContextProvider';
import * as fetcher from '../../utils/fetch';
const refineQuiz = ({ id, title, imagePath, quizOrder, score, timeLimit ... |
// render 2d textured quads
class Render2d {
constructor(device, colors, maxQuads = 512) {
const vertexShader =
'attribute vec3 vertex_position;\n' + // unnormalized
'attribute vec4 vertex_texCoord0;\n' + // unnormalized texture space uv, normalized uv
'uniform... |
function allowNumberOnly(object){
object.value = object.value.replace(/[^0-9\.]/g,'');
}
function allowAlphaNumericOnly(object){
object.value = object.value.replace(/[^a-zA-Z0-9\.]/g,'');
}
function selectDatePickerOnly(object){
object.value = object.value.replace(/[^]/g,'');
}
$.clearInput = fu... |
import React, { useState, useEffect } from "react";
import HamburgerButton from "../../../common/components/HamburgerButton";
import ChatInput from "./ChatInput";
import ChatMessages from "./ChatMessages";
import { useDispatch, useSelector } from "react-redux";
import { changeChatRoomName, exitChatRoom } from "../../..... |
// APA6 Format
// Authors + Year + Title + Journal + DOI
//
var log = function(msg){console.log(msg)};
var stglog = function(msg){console.log("====================\n"+msg+"\n====================\n")};
var warn = function(msg){console.warn("WARNING: \t" + msg)};
var isZero = function(v){
if (v !== undefined && v.lengt... |
var HackF = {
// Hacked for the St. Clair College Fruitbots
// competition, courtesy of Hackforge
// "Have fun!" - <NAME> & <NAME> & <NAME>
// *** This version contains additions to support the fruitHelp API by <NAME>
enableHack: true,
boardWidth: 10,
boardHeight: 10,
numberOfItemTypes: 4,
g... |
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] =... |
import PropTypes from 'prop-types';
import React, {PureComponent} from 'reactn';
import {Button, Modal, ModalHeader, ModalBody, ModalFooter, ModalTitle, Alert, FormControl,
Form, FormGroup, InputGroup, Col, ControlLabel} from 'react-bootstrap';
import './settingsModal.scss';
import axios from 'axios';
import Select f... |
datagramas.prepare_graph(_data_graph);
var matrix = new Array(_data_graph.nodes.length);
//Agrega la propiedad index a cada nodo con el valor del indice.
_data_graph.nodes.forEach(function(node, i) {
node[_index_name] = i;
matrix[i] = new Array(_data_graph.nodes.length);
});
// Insertar valores a la matriz. ... |
const { sendLog } = require('../ipc/ipc-cmd-sender');
const { receiveCmdProc } = require('../net-command/command-ns-res');
const CommandHeader = require('../net-command/command-header');
const ResData = require('../ResData');
const CmdConst = require('../net-command/command-const');
const CmdCodes = require('../net-co... |
//setting the variables
var score = 0;
var wrong = 0;
var size = 3.75;
var gameStarted = false;
var finalScore = 0;
var gen_string = words({
exactly: 2,
maxLength: 8,
join: ' '
}).toUpperCase();
//POST scpre to database
function sendJSON(score) {
$.post(
'./eyesightsql.php',
{
... |
// @noflow // The typing of these components isn't good so lets no try and fix that here
import * as React from 'react'
import * as Constants from '../constants/tracker'
import * as Sb from '../stories/storybook'
import Tracker from '.'
const proofMaker = (type, id = 'id-') => ({
humanUrl: '',
id: String(id),
is... |
var { i18n, runtime, storage } = browser;
String.prototype.trunc = String.prototype.trunc || function(n){
return (this.length > n) ? this.substr(0, n-1) + '…' : this;
};
var list = {
last_selected_index: null,
_strip: html => html.replace(/<(?:.|\n)*?>/gm, ''),
_escapeHTML: str => str.replac... |
/* eslint-disable react/forbid-foreign-prop-types */
import React, {Fragment, PureComponent} from 'react';
import styled from 'styled-components';
import {withRouter, Redirect} from 'react-router-dom';
import controller from '../../lib/controller';
import i18n from '../../lib/i18n';
import log from '../../lib/log';
i... |
// Enemies our player must avoid
var Enemy = function(x, y) {
this.x = x; // Current x position for enemy
this.y = y; // Current y position for enemy
this.movementSpeed = getRandomNumber(20, 30); // Movement speed of enemy
this.wi... |
var config = require('../config.js');
var dateFormat = function (fmt, date) {
let ret;
let opt = {
"Y+": date.getFullYear().toString(), // 年
"M+": (date.getMonth() + 1).toString(), // 月
"D+": date.getDate().toString(), // 日
"h+": date.getHours().toString(), // 时
"m+": dat... |
/*global chrome */
import React from "react";
import PropTypes from "prop-types";
import { MODE, ID, CONTROLS } from "../constants/index";
import { CenterHV, Col, Separator, Img } from "../components";
import styled from "styled-components";
import "react-circular-progressbar/dist/styles.css";
import "../css/circular-... |
'use strict';
var Promise = require('pinkyswear');
var extend = require('extend');
var JWTUtils = require('./JWTUtils');
var RequestManager = require('./RequestManager');
var VALID_RESPONSE_CODES = [200, 201, 202, 204];
/**
* A wrapper around the XMLHttpRequest object.
* @param {object} options Options f... |
function apiCall(method, url, jsonData=null, callback=null) {
if (callback==null) {
callback=function(a) {return true;}
}
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4) {
callback(this.responseText, this.status);
}
};
xhttp... |
import React, {useReducer} from 'react';
import MainContentContainer from "../layout/MainContentContainer";
// TODO: Things I don't like so far
// I need a better way of tracking uom for an ingredient
// Ingredient
// Serving Size (Put whatever you want)
// Number of Servings (Fractional Number)
// New Ingredient S... |
/**
* Notes which I took during watching the 1h-video
* "Lambda λ Calculus - Fundamentals of Lambda Calculus & Functional Programming in JavaScript" by <NAME>
* Video 1: https://www.youtube.com/watch?v=3VQ382QG-y4
* Video 2 -> see separate file
* Repo: https://github.com/glebec/lambda-talk
* Original Slide-Deck (... |
/**
* mdrscr - Mandarake Scraper <https://github.com/msikma/mdrscr>
* Copyright © 2018, <NAME>
*/
import cheerio from 'cheerio'
import { flattenDeep } from 'lodash'
import { shopsByName } from '../common/shopsByName'
import { getExtendedInfo, getMultiplePages } from './request'
import { MANDARAKE_ORDER_BASE, manda... |
/**
* Created by <NAME> on 2018.12.31
* Copyright (c) 2018 <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, ... |
/**
* Customize this impact tool by filling in the following values to match your data
*/
const config = {
/**
* Replace this with your Mapbox Access Token (**Do this first!**)
*/
accessToken:
'<KEY>',
/**
* Replace with the url of your map style
*/
mapStyle: 'mapbox://styles/mapbox-community/... |
import React, { Component } from 'react';
import MenuView from './menuView';
import { withFirebase } from '../Firebase';
class Menu extends Component {
constructor(props) {
super(props);
this.state = {
dataFetched: false,
orderSent: false,
error: false,
menu: { drinks: 0, dishes: 0 }... |
require("dotenv").config();
const request = require("request");
const client_id = process.env.CLIENT_ID;
const client_secret = process.env.CLIENT_SECRET;
const Playlist = require("./models/playlist");
const getRecommendations = (seedString, accessToken) => {
return new Promise((resolve, reject) => {
recommendation... |
'use strict';
const uWS = require('uWebSockets.js');
const kleur = require('kleur');
const ora = require('ora');
const path = require('path');
const fs = require('fs');
const Logger = require('./helpers/Logger');
const HTTPVerbs = require('./constants/HTTPVerbs');
const EndResponse = require('./helpers/EndResponse');
... |
var defaults = {
'requireSecure': true,
'dropbox_appKey': '',
'github_repo': '',
'github_token': '',
'github_tokenService': ''
};
var credentials = testCredentials || defaults;
var providersToTest = [
{ 'name': 'localstorage', 'config': {}, 'requireSecure': false },
{ 'name': 'dropbox', 'config': { '... |
// Import libraries
import * as THREE from 'https://cdn.jsdelivr.net/npm/three@0.126.0/build/three.module.js'
import { OrbitControls } from 'https://cdn.jsdelivr.net/npm/three@0.126.0/examples/jsm/controls/OrbitControls.js'
import rhino3dm from 'https://cdn.jsdelivr.net/npm/rhino3dm@0.15.0-beta/rhino3dm.module.js'
impo... |
// loads necessary packages and configs
const fs = require('fs');
const Discord = require('discord.js');
const StatsFunc = require ('./StatsFunc.js')
// loads only the values being called from config.json
const { prefix, token, errorMsg, botChannel, CringeEmoji, CringeTimeout, CringeValue, OfficialCringeEmoji, MarkovD... |
// Copyright 2019 <NAME>. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-initializedatetimeformat
description: Checks basic handling of dayPeriod, long format.
features: [Intl.DateTimeFormat-dayPeriod]
locale: [en-US]
---*/
const d0000 = new Date(2017, 11, ... |
import React, {useEffect, useRef, useState} from 'react';
import {tsvParse} from "d3-dsv";
import {Button} from '@mantine/core';
// https://github.com/tradingview/lightweight-charts/issues/543
// const createChart = dynamic(() => import('lightweight-charts'));
import {createChart, CrosshairMode} from 'lightweight-char... |
var Game = {};
Game.init = function() {
game.stage.disableVisibilityChange = true;
}
Game.preload = function() {
game.load.spritesheet('player', 'assets/sprites/touhou.png', 64, 64);
game.load.image('space', 'assets/map/space.png');
game.load.image('bullet', 'assets/sprites/purple_ball.png');
}
//var... |
if (typeof $ == "function" && typeof $.noConflict == "function" && typeof $(document).on != "function"){
$.noConflict();
$("scripts").remove();
console.log("removing scripts");
}
var hangitt = {
ENV: "http://clositt.com/",
user: null,
init: function(){
hangitt... |
// constants
var SPAWN_POINT_PARTICLE_FREQ = 0.3;
// enum GameStatus
var GAME_IN_PLAY = 0;
var GAME_WON = 1;
var GAME_LOST = 2;
// enum StatIndex
var STAT_PLAYER_DEATHS = 0;
var STAT_ENEMY_DEATHS = 1;
var STAT_COGS_COLLECTED = 2;
var STAT_NUM_COGS = 3;
// class GameState
function GameState() {
this.world = new Wor... |
function addComboToCart(
comboSize,
comboTopId,
comboTopSize
) {
var instrucciones = $(".notes_instructions").val(),
comboQty = Number($('.cantidad .quantity').html()),
comboId = $("#combo").attr('data-id');
$.ajax({
url: '/add_to_cart_ajax',
type: 'POST'... |
// Product details (and followups) handlers
const APIcaller = require('./apicaller')
const {Card, Suggestion} = require('dialogflow-fulfillment');
// UTILITIES
// Utility function for productDetailsHandler => print the suggestions to get detailed info about a product
function printProductDetailsSuggestions(product, ... |
function download(filename, text) {
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
element.setAttribute('download', filename);
element.style.display = 'none';
document.body.appendChild(element);
element.... |
import {
Box,
Button,
Checkbox,
Flex,
FormControl,
FormLabel,
Heading,
HStack,
Input,
Modal,
ModalCloseButton,
ModalContent,
ModalHeader,
Table,
Tbody,
Td,
Th,
Thead,
ModalOverlay,
Tr,
useColorModeValue,
VStack,
ModalBody,
useDisclosure,
Select,
} from "@chakra-ui/react... |
// @TODO: YOUR CODE HERE!
var svgWidth = 960;
var svgHeight = 910;
var margin = {
top: 20,
right: 40,
bottom: 60,
left: 100
};
var width = svgWidth - margin.left - margin.right;
var height = svgHeight - margin.top - margin.bottom;
// Create an SVG wrapper, append an SVG group that will hold our chart, an... |
import React from 'react';
import classNames from 'classnames';
import { withStyles } from '@material-ui/core/styles';
import CssBaseline from '@material-ui/core/CssBaseline';
import Drawer from '@material-ui/core/Drawer';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
i... |
/*!
* Copyright 2015 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
*
* Unless required by applica... |
// File project-reporting.js
// Author: <NAME> Date: 02/09/2021
// Copyright 2021 by <NAME>
//
// Handle the form and api calls to give the instructor
// page student work details
// Modification log:
// 05/11/2021 Updated routes to work with mysql format
const numberOfDays = 6;
let currProjectName = ""
$(function(... |
angular.module('orderCloud')
.config(CategoryFacetsConfig)
.controller('CategoryFacetsCtrl', CategoryFacetsController)
.controller('CategoryFacetsManageCtrl', FacetedCategoryManageController)
.controller('CategoryFacetsModalCtrl', CategoryFacetsModalController)
;
function CategoryFacetsConfig($statePro... |
/**
* @author Mugen87 / https://github.com/Mugen87
*/
import { EventDispatcher, Vector3, Logger, MathUtils } from 'yuka';
const direction = new Vector3();
const target = new Vector3();
const currentGamepadValues = {
buttonPressed: false,
leftStickX: 0,
leftStickY: 0,
rightStickX: 0,
rightStickY: 0,
};
class V... |
import bitcoin from 'bitcoinjs-lib'
import {flo_testnet} from '../../../src/config'
import {isValidWIF} from '../../../src/util/btc'
import {OIP} from '../../../src'
import floTx from 'fcoin/lib/primitives/tx'
import Network from 'fcoin/lib/protocol/network'
import {artifactSmall, artifactLarge} from '../../../examples... |
import EventEmitter from 'events';
import 'pixi';
import 'p2';
import Phaser from 'phaser';
import _ from 'lodash';
export const LOAD_COMPLETE = 'load-complete';
export const SHOOT = 'shoot';
const SCREEN_WIDTH = 800;
const SCREEN_HEIGHT = 600;
const CELL_WIDTH = 24;
const CELL_HEIGHT = 55;
const ZOMBIE_WIDTH = 35;
... |
"use strict";
// DOM
let displayCards = document.querySelector(".display-cards");
let displayCardsSingle = document.querySelector(".display-cards-single");
let displayCardsSingleContainer = document.querySelector(
".card-container-small"
);
let shuffleCards = document.querySelector("#shuffle-cards");
let suitCards =... |
import React, { useState, useEffect, useContext } from "react";
import axios from 'axios';
import { axiosWithAuth } from "../../utils/axiosWithAuth";
import { CurrentUserContext } from '../../contexts/CurrentUserContext';
import * as timeago from 'timeago.js';
import {FontAwesomeIcon} from "@fortawesome/react-fontaweso... |
import React, { Component } from "react";
import ReactDOM from "react-dom";
import Header from "./Header.js";
import Filter from "./Filter.js";
import Listings from "./Listings.js";
import listingsData from "./data/listingsData.js";
import Modal from "./Modal.js";
// This is the parent component.
class App extends Co... |
// -----------------------------------------------------------------
'use strict';
// ------------------------------------------------------------------
var MapView = require('./map/map-view.js');
var SourceManager = require('./managers/source-manager.js');
var StyleManager = require('./managers/styl... |
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: check-double;
// These constants are used to determine if a field is a tag (e.g. @home) or an
// attribute (e.g. @due(2019-02-08)).
const FIELD_TYPE_TAG = 'tag';
const FIELD_TYPE_ATTR = 'attr';
... |
// Instruction to ESLint that 'describe', 'before', 'after' and 'it' actually has been defined.
/* global describe before after it */
const puppeteer = require('puppeteer');
const assert = require('chai').assert;
const config = require('../config.js');
const util = require('../util.js');
describe('Protected Mode', fun... |
/**
* Created by nicolas.urgin on 05/05/17.
*/
var fs = require('fs');
var async = require('async');
var mkdirp = require('mkdirp');
// Configuration
// Constantes
var DATA_DIRECTORY = "./data";
var CLEAN_DIRECTORY = "./clean";
// lancer le traitement
async.waterfall([
// récupérer les répertoires contenant ... |
import React, { useState, useEffect } from 'react';
import { CButton, CDropdown, CDropdownToggle, CDropdownItem, CDropdownMenu, CDropdownDivider } from '@coreui/react';
import firebase from '../../../libraries/Firebase';
import { grayButton, greenButton, redButton } from '../../../assets/css/global';
import { useSelect... |
/**
* Progress Wizard component
*
* @version 1.0.0
* @author [<NAME>](https://github.com/binoy-sinha)
*/
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import './styles/ProgressWizard.css';
/**
* update the header nav states via classes so they can be styled via css
* @param ... |
/* eslint-disable no-unused-vars */
/* global jsork, $ */
var playerContent = '';
var numberOfDays = 0;
var startDate;
var incrementalDate;
var endDate;
var localPlayersOnly = true;
var uniqueParkIDs = {};
var uniqueKingdoms = {};
var allCSV = '';
var kingdomName = '';
function kingdomSelect(event, ui) {
uniquePark... |
#!/usr/bin/env node
const { resolve, relative, dirname, sep } = require('path');
const glob = require('glob');
const rimraf = require('rimraf');
const crypto = require('crypto');
const { writeFileSync, unlink, existsSync, symlinkSync } = require('fs');
const mkdirp = require('mkdirp');
const { version: nccVersion } = ... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Moment from 'moment';
import { toastr } from 'react-redux-toastr';
import lodash from 'lodash';
import { Trans } from 'react-i18next';
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
import { Col, Button, Dro... |
/**************************************\
Config
\**************************************/
var APP_ID = 'amzn1.echo-sdk-ams.app.xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'; //replace with your amazon app ID
var appToken = '<KEY>'; //replace with your LIFX app token
var dimString = ["dim", "lower", "decrease", "do... |
'use strict';
const testEvent = {
resource: '/users',
path: '/users',
httpMethod: 'GET',
headers: {
'Accept':
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-US,en;q=0.9',
'CloudFront-F... |
function JCSmartFilter(ajaxURL)
{
this.ajaxURL = ajaxURL;
this.form = null;
this.timer = null;
}
JCSmartFilter.prototype.keyup = function(input)
{
if(this.timer)
clearTimeout(this.timer);
this.timer = setTimeout(BX.delegate(function(){
this.reload(input);
}, this), 1000);
}
JCSmartFilter.prototype.click = f... |
import Alignment from '@ckeditor/ckeditor5-alignment/src/alignment';
import Autosave from '@ckeditor/ckeditor5-autosave/src/autosave';
import BlockQuote from '@ckeditor/ckeditor5-block-quote/src/blockquote';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import CKEditorInspector from '@ckeditor/ckeditor5... |
import React from 'react';
import ReactDOM from 'react-dom';
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faLongArrowAltRight } from "@fortawesome/fontawesome-free-solid";
import axios from 'axios';
import Block from "./ExchangeBlock";
class Currency extends React.Component {
construc... |
//
// Chatr - API
// Webhook event handler for receiving upstream events from Azure Web PubSub
//
// NOTE. This function DOES NOT use the Web PubSub Trigger binding as you might expect
// So we can host it in Static Web App, we handle the HTTP webhooks manually, it's not hard :)
// <NAME>, 2021
//
const { WebPubSubSer... |
function getText(foo) {
if (!foo)
return '';
if ( typeof foo == 'string')
return foo.replace(/\n/gm, '').trim();
if (foo.content) {
return foo.content.replace(/[\s]{3,}/gm, '\n').trim();
} else
return foo[0].content.replace(/[\s]{3,}/gm, '\n').trim();
}
var Moment = require('vendor/moment');
Moment.loca... |
import React, { useCallback, Fragment, useState } from 'react';
import PropTypes from 'prop-types';
import {
isNil,
isEmpty,
ifElse,
map,
prop,
always,
when,
last,
compose,
contains,
head,
all,
equals,
keys,
reject,
path,
} from 'ramda';
import { useDispatch } from 'react-redux';
import... |
const roundConstants = [ 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36 ];
const sBox = new Array(256);
const inverseSBox = new Array(256);
function initSBox() {
// mainly copied from wikipedia
let p = 1, q = 1;
do {
p = (p ^ ((p << 1) % 2**8) ^ (p & 0x80 ? 0x11B : 0)) % 2**8;
q ^= q << 1;
q ^= q... |
function kiemtrathemnhanvien(){
var nhanvien=true;
var tennhanvienValue = document.getElementById("tennhanvien").value;
var namsinhValue = document.getElementById("namsinh").value;
var matkhauValue = document.getElementById("matkhau").value;
var diachiValue = document.getElementById("diachi").value... |
window.updateWordCloudFilterDescr = function() {
// 8. Retrieve the parent id from the data attributes.data("subthreadid")
var descr = $("#word-filter option:selected").data("descr");
$("#word-filter-description").text(descr);
}
window.updateWordCloudcolorsetDescr = function() {
// 8. Retrieve the pare... |
'use strict';
/** @namespace DevKit */
var DevKit;
(function (DevKit) {
'use strict';
DevKit.msdyn_ocsystemmessageApi = function (e) {
var EMPTY_STRING = '';
var f = '@OData.Community.Display.V1.FormattedValue';
function webApiField(entity, logicalName, schemaName, entityLogicalCollectionName, entityLogi... |
/*
Copyright (c) 2019, because-why-not.com Limited
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 of conditions and ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.NikeClient = 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; descrip... |
/**
* cli
*
* Instance of ArgumentParser with some small improvements and additional
* methods.
*
*
* #### Extra Actions
*
* We provide some extra-actions for our instance of ArgumentParser.
*
*
* ###### store+lazyChoices
*
* Allows you define actions with lambda-like choices
*
* cli.addArgu... |
'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... |
"use strict";
//contrib
const express = require("express");
const router = express.Router();
const winston = require("winston");
//mine
const globalConfig = require("../config");
const logger = new winston.Logger(globalConfig.logger.winston);
const db = require("../models");
const meshconfig = require("./meshconfig")... |
var resetForm = function resetForm(form){
$(form).find('input[name=\'refId\']').val('');
$("newUploadsForm").find('input[name=\'refId\']').val('');
$(form)[0].reset();
};
var isValid = function isValid(el){
if($(el).val()=='' && $(el).hasClass('validate')){
$(el).addClass('invalid');
return false;
}
return... |
/*
1
Create an object represents you
have your first name, last name, age, dob(date of birth), favorite food (3),favorite movie (5)
*/
let myself={
firstName:"obada",
lastname:"alshafeey",
age:23,
dob:"28/6/19998",
favoritefood:[`burgar`,`mansaf`,`mqloba`],
favortemovie:[`game`,`green mael`,`fure`]
... |
'use strict'
var types = require('./util/types')
var create = require('./util/create')
var caseSensitiveTransform = require('./util/case-sensitive-transform')
var boolean = types.boolean
var number = types.number
var spaceSeparated = types.spaceSeparated
var commaSeparated = types.commaSeparated
var commaOrSpaceSepar... |
let questionViewWrap = document.getElementById('questionViewWrap')
let userInfo = document.getElementById('userInfo')
let questionNumber = document.getElementById('questionNumber')
let questionContent = document.getElementById('questionContent')
let greetBox = document.getElementById('greetBox')
let answer1 = document.... |
'use strict';
import * as bsa from './search/binarySearchAlgorithm.js';
import * as bst from './search/binarySearchTree.js';
import * as Draw from './view/draw.js';
const mainCanvas = document.getElementById('mainCanvasElement');
const sideCanvas = document.getElementById('sideCanvasElement');
mainCanvas.tabIndex = 0... |
/* eslint-disable import/no-unresolved */
/* eslint-disable react/destructuring-assignment */
/* eslint-disable react/prop-types */
import React from 'react';
import styled from 'styled-components';
import Experience from 'components/Experience/Experience';
import Repository from 'components/Repository/Repository';
im... |
//
// Main js
//
'use strict';
(function() {
// Menu toggle for admin dashboard
if ($("#nav-toggle").length) {
$("#nav-toggle").on("click", function(e) {
e.preventDefault();
$("#db-wrapper").toggleClass("toggled");
});
}
// slimscroll for sidebar nav
... |
'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 ("... |
var $ = require('$'),
Popup = require('popup/popup'),
Events = require('events/events'),
Templatable = require('templatable/templatable'),
DragSupport = require('./dialog/drag');
var BUTTONS_TEMPLATE = {
confirm : {
role : 'confirm',
cls : 'ui-dialog-button-orange',
text : '确定',
autofocus: tru... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.