text stringlengths 3.07k 16k |
|---|
import React, { useState } from "react";
import { withNavigation } from "@react-navigation/compat";
import {
StyleSheet,
Dimensions,
Image,
TouchableWithoutFeedback,
} from "react-native";
import { Block, Text, theme, Button } from "galio-framework";
import { Icon } from "../components";
import materialTheme fr... |
Ti.include('global.js');
var win = Titanium.UI.currentWindow;
win.orientationModes = [Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT];
Titanium.App.Properties.setBool('front', false);
var frontback = Titanium.UI.createButton({
height:30, width:55,
top:65, right:15,
backgroundImage: 'images/s... |
import React, { useState, useRef, useCallback, useEffect } from "react";
import "./Grid.css";
import { makeStyles } from "@material-ui/core/styles";
import Typography from "@material-ui/core/Typography";
import Slider from "@material-ui/core/Slider";
import { Board } from "./GridStyles";
import { produce } from "immer"... |
import {sqnob} from '../sqnob.js'
import Chroma from '../Scales.js'
import Synth from '../Synth.js'
const noteCell = {
template:`
<td class="note-button"
:style="{backgroundColor:color, color:textColor}"
@click="toggle()"
:class="{'active-cell':active}"
>
<div class="note-grid">
<div class="beg... |
// components/home/2.js
// Modules
import { useEffect, useRef } from 'react';
import * as THREE from 'three';
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
import styled from 'styled-components';
export default (props) => {
const menuOpen = props.menuOpen;
const mount = useRef(nul... |
/*****
CASBAH
Contract Administration System Be Architectural Heroes
Copyright (c) 2018, 2019 <NAME>
MIT License
******/
//var Vue=require("../node_modules/vue");
var drr=require("./drr");
var casdoc=function(casbah, template$){
var html=template$.find("#casdoc-template").html();
console.log("casdoc", html);
Vue.... |
import React from 'react';
import { Link } from 'react-router-dom';
// MUI
import { makeStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Grid from '@material-ui/core/Grid';
// Devextreme
import DataGrid, {
Column,
FilterRow,
FilterPanel,
FilterBuilderPopup,
Paging,... |
const createError = require('http-errors');
const express = require('express');
const path = require('path');
const cookieParser = require('cookie-parser');
const logger = require('morgan');
const lowdb = require('lowdb');
const bodyParser = require('body-parser');
const FileSync = require('lowdb/adapters/FileSync');
... |
'use strict';
const axios = require('axios').default;
const axiosRetry = require('axios-retry');
const chalk = require('chalk');
const dotenv = require('dotenv');
const util = require('util');
// Setup dotenv
let result = dotenv.config({
path: __dirname + '/../.env'
});
if (result.error) {
result = dotenv.config({... |
//------------------------------------------------------------------------------
//
// Interaction handlers.
//
//------------------------------------------------------------------------------
/**
* Reverts the GUI to a neutral state, clearing stats and lists. Called on
* disconnects and shutdowns.
*/
var... |
import React, {Component} from 'react';
import {Card, Icon} from 'react-native-elements';
import {
Image,
ImageBackground,
Linking,
ListView,
Platform,
ScrollView,
StyleSheet,
Text,
View,
TextInput,
TouchableOpacity,
Alert,
} from 'react-native';
import {withNavigation} f... |
// Copyright (c) 2019 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge... |
'use strict'
//Cargamos todo el javascript una vez que el DOM esta cargado
const botonGuardarNuevaMateria = `<button type="submit" class="btn btn-primary">Guardar</button>`
const botonGuardarCambios = `<button type="button" class="btn btn-primary" onclick="guardarCambiosEditar()">Guardar</button>`
const botonCerrarModa... |
const fetch = require('node-fetch');
const Url = require('url');
const Metamask = require('./metamask.js');
const config = require('../../../config.json');
const cookieName = config.app.name;
const cookieExpiry = 30 * 24 * 60 * 60 * 1000; // 30 days
const cookieTerminator = '$A23&*BGY^%';
const getToken = async (ms... |
/*
* This is where all the magic happens for math input fields. Inside these input fields, there are several element types.
* - Expression: this is the default for any maths stuff. It's a list of the below elements.
* - ExpressionPart: anything that's a string. So "a+b" can be an expression part, or "2*sin(3)+5". (I... |
// seis copyright 2017-2019
// Objectbrowser.js
// via apple-picker, mlBench, and danmckeown.info #5
import React, { Component } from "react";
import { TextInput, Button, Pane } from "evergreen-ui";
import SpreadsheetObjectbrowser from "./SpreadsheetObjectbrowser";
import Headernav from "./Headernav";
import Errorbo... |
/**
* Layout component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react";
import PropTypes from "prop-types";
import { useStaticQuery, graphql } from "gatsby";
import { createGlobalStyle } from "styled-components";
... |
// @ts-check
// Import types
/** @typedef {ReturnType<import("webpack").Compiler['getCache']>} WebpackCacheFacade */
/** @typedef {import("webpack").Compilation} WebpackCompilation */
/** @typedef {Parameters<WebpackCompilation['fileSystemInfo']['checkSnapshotValid']>[0]} Snapshot */
const path = require('path');
con... |
// Get Values
const getValues = require('./getValues');
// Message Editor Generator
const messageEditorGenerator = require('./messageEditorGenerator');
// Create Message Editor
const createMessageEditor = require('./createMessageEditor');
// Reply Message
const replyMessage = require('./reply');
module.exports = as... |
//Commas for decimal place
jQuery.fn.dataTableExt.oSort['numeric-comma-asc'] = function(a,b) {
var x = (a == "-") ? 0 : a.replace( /,/, "." );
var y = (b == "-") ? 0 : b.replace( /,/, "." );
x = parseFloat( x );
y = parseFloat( y );
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
};
jQuery.fn.dataTableExt.... |
const Color = require('color')
const files = require('./files')
const c = '0123456789ABCDEF'.split('').map(x => `#${x}${x}${x}${x}${x}${x}`)
const red = '#FF0000'
const green = '#00FF00'
const blue = '#0000FF'
const yellow = '#FFFF00'
const magenta = '#FF00FF'
const cyan = '#00FFFF'
const white = '#FFFFFF'
const bl... |
#!/usr/bin/env ts-node
"use strict";
// tslint:disable:max-line-length
// tslint:disable:no-shadowed-variable
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
re... |
/*!
* MLP.Client.IAT.Aligner
* File: aligner.iat.js
* Copyright(c) 2021 Runtime Software Development Inc.
* Adapted from IAT web application
* MIT Licensed
*/
import * as math from 'mathjs';
import { getError } from '../../_services/schema.services.client';
import { scalePoint } from './transform.iat';
/**
* C... |
import * as tf from "@tensorflow/tfjs";
const TRUE_BOUNDING_BOX_LINE_WIDTH = 2;
const TRUE_BOUNDING_BOX_STYLE = "rgb(255,0,0)";
const PREDICT_BOUNDING_BOX_LINE_WIDTH = 2;
const PREDICT_BOUNDING_BOX_STYLE = "rgb(0,0,255)";
const generateRandomColorStyle = () =>
`rgb(${Math.round(Math.random() * 255)},
${Math.round... |
'use strict'
const puppeteer = use('puppeteer');
const urlParse = require('url');
const axios = require('axios');
const {
http_get,
http_post,
is_empty,
} = require('../../Tools/helper');
const iPhone = puppeteer.devices['iPhone X'];
class ShortVideoController {
async douyin({ request, response }) {
cons... |
import { Dropbox } from 'dropbox';
import { call, put, select, takeEvery } from 'redux-saga/effects';
import { CHOOSE_MEMORY } from '../App/constants';
import { selectCurrentMemory } from '../App/selectors';
import { chooseMemory, photoLoadError, photoLoadSuccess } from '../App/actions';
import { selectMemories } from... |
import { NODE_OBJECT_TYPE } from './node';
import { runAsSu } from '../context';
import { toStr } from '/lib/enonic/util';
import {
createObjectType,
GraphQLBoolean,
GraphQLFloat,
GraphQLInt,
GraphQLString,
list,
nonNull
} from '/lib/graphql';
import { connect } from '/lib/xp/node';
const ... |
var UTF8_ONE_BYTE_MASK = 0b10000000;
var UTF8_ONE_BYTE_COUNT = 0;
var UTF8_TWO_BYTE_MASK = 0b11100000;
var UTF8_TWO_BYTE_COUNT = 0b11000000;
var UTF8_THREE_BYTE_MASK = 0b11110000;
var UTF8_THREE_BYTE_COUNT = 0b11100000;
var UTF8_FOUR_BYTE_MASK = 0b11111000;
var UTF8_FOUR_BYTE_COUNT = 0b11110000;
var UTF8_OTHER_MASK... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Redirect, withRouter } from 'react-router-dom';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faBars, faClock, faSearch } from '@fortawesome/free-solid-svg-icons';
import Settings from './Settings';
i... |
import { setsAreEqual, oneOf, strAfter, padLeft, parseQuery } from "./utils.js";
export const DEFAULT_COOKIE_STORE_ID = "firefox-default";
export const PRIVATE_COOKIE_STORE_ID = "firefox-private";
const storageListeners = [];
const storageBeforeListeners = [];
async function processListeners(listeners, key, value, b... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... |
import React from 'react';
import styled from 'styled-components';
import { Col, Row, Input } from 'reactstrap';
import SelectCustom from './SelectCustom';
import DatePicker from 'react-datepicker';
import { dayjsInstance, isOnSameDay } from '../services/date';
export const filterData = (data, filters) => {
if (!!fi... |
const React = require('react');
const rB = require('react-bootstrap');
const cE = React.createElement;
const AppActions = require('../actions/AppActions');
const Slider = require('react-slider').default;
//const ChromePicker = require('react-color').ChromePicker;
const SliderPicker = require('react-color').SliderPicker... |
//function used with osm mapnik tiles
function osm_getTileURL(bounds) {
var res = this.map.getResolution();
var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));
var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));
var z = this.map.getZoom();
... |
'use strict'
const verifyNotFoundError = require('./util').verifyNotFoundError
const isTypedArray = require('./util').isTypedArray
let db
exports.setUp = function (test, testCommon) {
test('setUp common', testCommon.setUp)
test('setUp db', function (t) {
db = testCommon.factory()
db.open(t.end.bind(t))
... |
const express = require("express");
const router = express.Router();
const needLogin = require("./needLogin");
const {createSpot, findSpots,} = require("../models/spots");
const {createRoute, queryRoute,} = require("../models/routes");
const {createNewRecord, createNewRouteTable,} = require("../models/routeDetail");
co... |
function checkDoubleEntries(arrays, array) {
var compare = false;
arrays.some(function (items) {
compare = JSON.stringify(items)==JSON.stringify(array);
return compare;
});
return compare;
}
function addSelectOptions(id, selected) {
var el = document.getElementById(id);
el.i... |
import React from 'react'
import axios from 'axios'
import {connect} from 'react-redux'
import {fetchBikes} from '../store'
import {withStyles} from '@material-ui/core/styles'
import {TextField, Button, Typography} from '@material-ui/core'
const styles = {
root: {
display: 'flex',
alignItems: 'center',
p... |
var utils = require('./util');
var express = require('express');
var uuid = require('node-uuid');
//before we load the logger, make sure we have the directory we need
utils.ensureExists(__dirname + '/logs', 0744, function(err) {
if (err) {console.log("Error trying to create logging directory : "+err.message);}
});
... |
/* jshint esnext:true */
import videojs from 'video.js';
const debounce = require('throttle-debounce').debounce;
// Default options for the plugin.
const defaults = {
debounceDelay: 200,
layoutMap: [
{ layoutClassName: 'vjs-layout-tiny', width: 2},
{ layoutClassName: 'vjs-layout-x-small', width: 3},
{ ... |
"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 = { ... |
import UIElement, { EVENT } from "@core/UIElement";
import { isNotUndefined, OBJECT_TO_PROPERTY } from "@core/functions/func";
import { BIND } from "@core/Event";
const text = (x, y, text = '', className = 'base-line') => {
return /*html*/`<text x="${x}" y="${y}" class='${className}'>${text}</text>`
}
const line... |
import React, { Children, Component, PropTypes } from "react"
import debounce from "debounce"
class DropdownInput extends Component {
//
// Component setup
//
static propTypes = {
initVal: PropTypes.string,
debounceMillisecs: PropTypes.number,
skipBlurTimeout: PropTypes.number,
classNames: ... |
// check that geckodriver in path is up to date, otherwise you might get web driver errors
// also need to have video muted in the html
var selenium = require('selenium-webdriver');
//var chrome = require('selenium-webdriver/chrome');
var firefox = require('selenium-webdriver/firefox');
var chai = require('chai');
va... |
/**
* Created by mapbar_front on 2018/3/27.
*/
import React,{ Component } from 'react';
import Styles from './ProjectExciseStyle';
import Config from '../../config';
import { Pagination } from 'antd';
import VideoComponent from '../../components/VideoContainer/VideoComponent';
const typeConfig = Config.directionCon... |
import { get } from 'lodash';
import { SecretModel, V2VVMwareModel } from '../../../../models';
import { getImportProviderSecretObject, getDefaultSecretName, getV2VVMwareObject } from './vmwareProviderPod';
import {
NAMESPACE_KEY,
PROVIDER_STATUS_CONNECTING,
PROVIDER_STATUS_CONNECTION_FAILED,
PROVIDER_VMWARE_... |
const gameStart = document.querySelector('.game-start');
const gameArea = document.querySelector('.game-area');
const gameOver = document.querySelector('.game-over');
const gameScore = document.querySelector('.game-score');
const gamePoints = gameScore.querySelector('.points');
gameStart.addEventListener('click', onGa... |
import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import {
Row,
Col,
Form,
Input,
Modal, Button,
} from 'antd';
import TableModelTable from '@/pages/tool/TableModelTable';
import SelectModelTable from '@/pages/tool/SelectModelTable'
const { TextArea } = Input;
@connect((... |
//////////////////////////////////////////
// Requirements //
//////////////////////////////////////////
var Promise = require('bluebird');
var transformField = require('./transformField.js');
var transformModel = require('./transformModel.js');
var transformForm = require('./transformForm... |
import React from 'react';
import Chance from 'chance';
import PropTypes from 'prop-types';
import ReactHintFactory from 'react-hint';
import { FormattedMessage, intlShape } from 'react-intl';
import { EyeOff, RefreshCw, Settings } from 'react-feather';
import FlexContainer from 'primitives/container/flex-container';
... |
var isObjectLiteral = require("../vdom/is-object-literal")
var isArray = require('x-is-array')
var arraySearch = require("./binary-search")
var isSameArray = require("./is-same-array")
module.exports = diffProps
function diffProps(a, b) {
var diff
for (var aKey in a) {
if (!(aKey in b)) {
... |
// expand/collapse button (expander) is added if height of a cell content
// exceeds CLIP_HEIGHT px.
var CLIP_HEIGHT = 135;
// Height in pixels of an expander image.
var EXPANDER_HEIGHT = 13;
// Path to images for an expander.
var imgPath = "./images/expandcollapse/";
// array[group][cell] of { 'height', 'expanded'... |
import 'es6-promise/auto';
import { _$, _body, _doc, _html, _win, U } from './variables';
import { $exec } from './core';
import { _extend, _slice, $toArray } from './types';
let range;
let refs = {};
/**
* Check if a node contains another node
*
* @private
* @param {HTMLElement} source
* @param {HTMLElement} ta... |
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Form from '../../components/Form';
import makeFormysTextList from '../../utils/MakeFormysTextList';
import ActionType from '../../actions/ActionType';
import AppDispatcher from '../../AppDispatcher';
import AddressStore from '../../store... |
var HTTPS = require('https');
var cool = require('cool-ascii-faces');
var handler = require('./handler');
require('dotenv').config();
var botID = process.env.BOT_ID;
var pubKey = process.env.PUBLIC_KEY;
var prvKey = process.env.PRIVATE_KEY;
var bearer = process.env.BEARER_TOKEN;
var validSorts = ["ProductName ASC",... |
// Call "document ready function"
$(document).ready(function() {
// MAIN IMAGE height setting
setImgtopviewsHeight();
// THUMBNAIL IMAGES height setting
setThumbanilTopviewsHeight();
// THUMBNAIL IMAGES - click events
$(".gallery_topviews").on ("click", ".thumbnail", function(){
//... |
//Products
//Ürün ekleme başlangıç
let select_pidx = 0
$('#product_add_form').submit( ( event ) => {
event.preventDefault();
const ptitle = $("#ptitle").val()
const aprice = $("#aprice").val()
const oprice = $("#oprice").val()
const pcode = $("#pcode").val()
const ptax = $("#ptax").val()
co... |
// Admin menu Tooltip - this option will toggle the placement of the Tooltip on Desktop and Mobile
$(".admmenu-item-link").tooltip({
placement: function (ctx, src) {
if ($(window).width() > 991) {
return "right";
} else {
return "bottom";
}
}
});
function Conv... |
let dynamicLists = window.myArray[0];
let oldTemplate = window.myArray[1];
window.onload = function () {
let text = document.getElementById('addText')
text.addEventListener('click', addTextInput)
let number = document.getElementById('addNumber')
number.addEventListener('click', addNumberInput)
let ... |
import Main from '@/views/Main.vue';
//登录
export const loginRouter = {
path: '/login',
name: 'login',
meta: {
title: 'Login - 登录'
},
component: () => import('@/views/login.vue')
};
export const page404 = {
path: '/*',
name: 'error-404',
meta: {
title: '404-页面不存在'
},... |
const Utils = require('./utils');
const Errors = require('./errors');
const fse = require('fs-extra');
const {Storage} = require('@google-cloud/storage');
module.exports = class Data {
constructor() {
this.dataFolder = 'storage/collections/';
this.collections = {};
this.geeSourceCatalogLink = {
href: 'htt... |
import $ from "jquery";
import Node from "canvas2d/lib/node";
import { drawAnimation } from "canvas2d/lib/util";
import { randomHash } from "canvas2d/lib/color";
let $canvas = $("#canvas");
let context = $canvas[0].getContext("2d");
let width = $canvas.width();
let height = $canvas.height();
let center = {
x : width/2... |
import lightwallet from 'eth-lightwallet'
import Web3 from 'web3'
const STORAGE_KEY = 'botcm:wallet'
const hdPathString = 'm/44\'/60\'/0\'/0' // BIP44
var web3 = new Web3()
const ERRORS = {
WalletMissing: { message: 'Missing wallet!' },
WalletLoading: { message: 'Wallet loading failed!' },
WalletCreation: { mes... |
const path = require('path');
const fs = require('fs');
const { promisify } = require('util');
const crypto = require('crypto');
const axios = require('axios');
const makeDir = require('make-dir');
const get = require('lodash.get');
const debug = require('debug')('jason:load:http');
const REGEX_PAGINATION_EXP = /{(.+... |
'use strict'
const os = require('os');
const path = require('path');
const url = require('url');
const _ = require('lodash');
const async = require('async');
const shortid = require('shortid');
const fs = require('fs-extra');
const decompress = require('decompress');
const got = require('got');
const childProc = requi... |
"use strict";
window.search = window.search || {};
window.search.inputWidget = function () {
return {
// Initialize App
init: function init() {
var self = this;
$("#search-input").focus();
self.searchInputActions();
},
// Search Input related actions (focus, blur & keyup events)
... |
import {
drawPath
} from './Renderer';
import {
PrimitiveComponent
} from './PrimitiveComponent';
import {
Vector
} from 'vectorious';
import {
Line
} from './Line';
//would name the file 'path', but damn near everything
//relies on the filesystem 'path' module
/**
* An ordered set of vectors defining a path... |
/**
* Add Toggle Buttons to elements
*/
let toggleChevron = `
<svg xmlns="http://www.w3.org/2000/svg" class="tb-icon toggle-chevron-right" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" f... |
/* Site type
site : The domain (or domain pattern) of the site
status : One of 'secure', 'potential', 'blacklist'
*/
var API = {
'site.all': function() {
var rv = [];
jsonStorage.each(function(site, data) {
if (site[0] == '$') return;
data.site = site;
rv.push(data);
});
return rv;
},
'site.get':... |
const getSelector = require('./get-selector');
const { find } = require('./find');
const parse = require('./parse');
const generate = require('./serialize-node');
const core = {
// 通过选择器获取,返回ast片段
getAstsBySelector(ast, selector, { strictSequence, deep, parseOptions, expando = 'g123o456g789o' } = {}) {
... |
const STORAGE_KEY = 'BOOK-MARKS';
const isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
let myStorage = {
fetch: function () {
return JSON.parse(localStorage.getItem(STORAGE_KEY) || '[]');
},
save: function (bookmarks) {
localStorage.setItem(STORAGE_KEY,... |
import React, { Component } from 'react';
import './App.css';
import { Divider } from 'semantic-ui-react';
import { FormattedMessage } from 'react-intl';
import AddTask from './components/AddTask';
import Tasks from './components/Tasks';
import TaskFilter from './components/TaskFilter';
class App extends Component {... |
import { patchInner } from 'incremental-dom';
import {
connected as $connected,
created as $created,
props as $props,
renderer as $renderer,
rendererDebounced as $rendererDebounced,
rendering as $rendering,
updated as $updated
} from '../util/symbols';
import data from '../util/data';
import debounce from... |
import React from 'react';
import { Card } from 'boardgame.io/ui';
import { currentPlayer } from '../utils';
import phases from './phases';
import './board.css';
import { canPlay, canBuy } from './utils';
class DominionBoard extends React.Component {
onClickEndTurn() {
this.props.events.endPhase(phases.ACTION_... |
const { stream, setToken, search } = require('play-dl');
const randomUserAgents = require('random-useragent').getRandom;
const ffmpeg = require('prism-media').FFmpeg;
const { getLyrics } = require('./__lyrics');
const soundCloud = require('./__soundCloud');
const youtube = require('./__youtube');
class Track {
#__ra... |
"use strict"
const fs = require("fs")
const path = require("path")
const execFileSync = require("child_process").execFileSync
const util = require("util")
const readFile = util.promisify(fs.readFile)
const access = util.promisify(fs.access)
function isFile(filepath) {
return access(filepath).then(() => true, () => ... |
'use strict';
const express = require('express');
const bodyParser = require('body-parser');
const restService = express();
restService.use(bodyParser.json());
/**
* Methods ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*/
var METHODS = [
{
name... |
/*
PHÉNOMÈNE DE GIBBS
Version du 11/06/2016
Copyright <NAME> (<EMAIL>), <NAME>, <NAME>, 2016.
Les programmes Javascript fournis par l'intermédiaire de ces pages
proposent des illustrations et des animations pédagogiques pour le
traitement du signal, les communications numériques, etc... |
/*
The MIT License (MIT)
Copyright (c) 2014 <NAME> AS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publ... |
require('dotenv').config({
path: `.env`,
})
const queries = require('./src/lib/algolia')
function toPlainText(blocks) {
if (!blocks) {
return ''
}
return blocks
.map(block => {
if (block._type !== 'block' || !block.children) {
return ''
}
return block.children.map(child => chi... |
init()
function init() {
d3.select("#selDataset").property("value")
// initialize the dashboard and set the first dropdown entry to be the first name value
buildDashboard(940)
};
function buildDashboard(name) {
d3.json("data/samples.json").then(function(data) {
dropDown(data["names"]);
... |
// J A V A S C R I P T
function followToggle(username) {
event.preventDefault() //prevent <a> from reloading page
console.log("Following...", username)
var count = document.querySelector('#followby').innerHTML;
//
// Toggle button display:
if (event.srcElement.innerHTML == "Follow") {
//Unfollow is di... |
/*
开发中 红黑数 排序
var node = {
p: {}, // 父节点指针
n: "12",
c: "r",
l: {},
r: {}
}
*/
// 树根节点
var _root = {};
// 建叶子节点
var _createLeaf = (n, p) => {
return {
p,
n,
l: null,
r: null,
c: 'r'
}
}
// 左旋
var _leftRotate = (node, node_r) => {
if (!node_r) throw new Error(node.n + " 右子树不存在");
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _UniversalDisposable;
function _load_UniversalDisposable() {
return _UniversalDisposable = _interopRequireDefault(require('nuclide-commons/UniversalDisposable'));
}
var _react = _interopRequireWildcard(require('react'));
var _reac... |
import React, {PureComponent} from 'react';
import PageHeaderLayout from '../../../layouts/PageHeaderLayout';
// import Detail from './LiquidHistory'
import {Table, Card, Popconfirm, Layout, message, Row, Col,Button,Modal} from 'antd';
import Detail from './Chart.js'
import request from "./../../../utils/request";
imp... |
import React, {Component} from 'react'
const {random} = require('../utils/util')
class ComCard extends Component {
state = {
startDate: '',
endDate: '',
num: 5,
list: [],
}
componentDidMount() {
if (!this.state.list.length) {
this.onSubmit()
}
... |
const merge = require("lodash.merge");
const { WORLD_STATE_KEY } = require("../../scripts/config");
const handleGeniusBar = require("./events/handleGeniusBar");
const handleDoorControls = require("./events/handleDoorControls");
const {
processLaserEvents,
renderLaserState,
areAllLasersEnabled,
} = require("./even... |
var container, stats, clock, controls;
var camera, scene, renderer, mixer;
var raycaster = new THREE.Raycaster();
var points = new THREE.Vector2();
var center_x = $('#container').width() / 2;
var center_y = $('#container').height() / 2;
var elefant_geometry, elefant_material, elefant, elefant_texture, loader_model;
... |
var fs = require("fs");
var rp = require("request-promise");
var path = require("path");
var glob = require("glob");
var slug = require("slug");
var frontMatter = require("front-matter");
var yaml = require("js-yaml");
var moment = require("moment");
var _ = require("lodash");
var Q = require("q");
var chalk = require(... |
import {
Vec3
} from './vector.js'
export class BVH {
constructor(triangles, maxTris) {
let xIndices = triangles.map((_, i) => { return i });
let yIndices = Array.from(xIndices);
let zIndices = Array.from(yIndices);
this.maxTriangles = maxTris;
this.triangles = triangles;
this.depth = 0;
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = connectPagination;
var _utils = require("../../lib/utils");
var _Paginator = _interopRequireDefault(require("./Paginator"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; ... |
'use strict';
const yaml = require('yaml');
const JobConfig = require('../src/job-config');
const MessageController = require('../src/controller');
describe('MessageController', () => {
it('should reload configs on start and update listeners with new config', done => {
const exampleConfig = {
... |
// handles default listeners and any active additional listeners
var express = require('express');
var router = express.Router();
const nonceHandler = require('node-timednonce');
const ansiParser = require('../middleware/ansi');
var ansiOutput = require('../output/ansi');
const requestProcessor = require('../middlewar... |
import React, { Component } from 'react';
// import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import collections from './../../utils/custom-data/weaponSets.js';
class SearchFilter extends Component {
constructor(props) {
super(props)
this.state = {
currentList: this.props.weaponLis... |
import React, { Component } from 'react';
import _ from 'underscore';
import LocalStorageMixin from 'react-localstorage';
import { DraggableCore } from 'react-draggable';
import reactMixin from 'react-mixin';
import './cells.css'
const { sqrt, abs } = Math;
import { random, rand } from './random';
export default ... |
import React, { useState, useEffect } from 'react';
import marked from 'marked';
import '../static/style/addArticle.css';
import { Row, Col, Input, Select, Button, DatePicker, message } from 'antd';
import api from '../config/apiUrl';
const { Option } = Select;
const { TextArea } = Input;
function AddArticle(props) {... |
import React, { Fragment, useState, useRef, useEffect } from 'react';
import { Tree, Input, Button, message, Modal } from 'antd';
import { LoadingOutlined, SearchOutlined } from '@ant-design/icons';
import { cloneDeep } from 'lodash';
import styled from 'styled-components';
import {
getFlatList,
formatTree,
getP... |
const fs = require('fs')
const fse = require('fs-extra')
const glob = require('glob')
const moment = require('moment')
const path = require('path')
const {createFile, createLink} = require('ritter')
const {plugins: {render, raw, read, markdown, minifyCss, minifyHtml, yamlFrontMatter}} = require('ritter')
const doc = c... |
import { forwardRef } from 'react';
import { css } from 'styled-components';
import { useRouter } from 'next/router';
import Link from 'next/link';
import { VisuallyHidden } from 'reakit';
import useModalParentLocation from '../hooks/use-modal-parent-location';
import { useMenuState, MenuButton, Menu, MenuItem } from '... |
/* eslint-disable */
import assert from 'assert'
import { transform } from 'babel-standalone'
// SET TO TRUE WHEN QA IS COMPLETE:
export const QA = true;
// ---------------------------- define challenge title ----------------------------
export const challengeTitle = `<span class = 'default'>Challenge: </span>Handle ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.