text stringlengths 3.22k 29.5k |
|---|
import React from 'react';
import { Resource, Frame, Context, Drawable } from '@psychobolt/react-regl';
import attachCamera from 'canvas-orbit-camera';
import mat4 from 'gl-mat4';
import ReglContainer from 'stories/Core/Setup/Resizable';
import frag from './Minecraft.frag';
import vert from './Minecraft.vert';
import... |
"use strict";
const fs = require("fs");
const path = require("path");
const _ = require("lodash");
const { wikia, wikipedia } = require("./api");
const isFile = fp => fs.lstatSync(fp).isFile();
const getFilePathsInDir = fp => fs
.readdirSync(fp)
.map(name => path.join(fp, name))
.filter(isFile);
const colour... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import CardWrapper from "../../CardWrapper/CardWrapper";
import URLs from "../../../URLs";
import axios from 'axios';
import InlineError from '../../messages/InlineError';
import { ClipLoader } from 'react-spinners';
import { Redirect } fr... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.NgbRatingNgFactory = exports.RenderType_NgbRating = undefined;
exports.View_NgbRating_0 = View_NgbRating_0;
exports.View_NgbRating_Host_0 = View_NgbRating_Host_0;
var _core = require("@angular/core");
var i0 = _interopRequireWil... |
import IntroductionPage from '../containers/IntroductionPage';
import ConfirmationPage from '../containers/ConfirmationPage';
import { VA_FORM_IDS } from 'platform/forms/constants';
import environment from 'platform/utilities/environment';
import manifest from '../manifest.json';
import FormFooter from 'platform/forms/... |
const path = require('path')
const {
startsWithCaseInsensitive, cutLastChars, removeRepeatedItems
} = require('../../utils')
const { removeAnsiCodes } = require('../../terminal')
const {
parseBash, traverseAST, NodeType, builtins
} = require('../../parser')
const env = require('../../env')
const colors = requi... |
/* El mapa es una matriz, depende de el numero es el objeto que vamos a insertar */
var mapa = [
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
[1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0],
[1, 0, 0, 0, 1, 3, 0, 0, 0, 1, 0],
[1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0],
[1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0],
[1, 0, 1, 1, 3, 0, 0, 1, 0, 1, 0],
... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generate = void 0;
const skia_canvas_1 = require("skia-canvas");
const canvas_1 = require("./fun... |
var ParcelLayer = function(name, urls, options) {
this.name = (name !== undefined) ? name : 'Parcel';
this.minZoom =14;
if (options !== undefined) {
this.minZoom = (options.minZoom !== undefined) ? options.minZoom : 18;
this.localData = (options.localData !== undefined) ? optio... |
import * as React from 'react';
import { withStyles, Button, Select, OutlinedInput } from '@material-ui/core';
import { Search, AddBox, PermIdentity } from '@material-ui/icons';
import ButtonWihTooltip from '../ButtonWithTooltip/ButtonWithTooltip';
import DLCSLoginPanel from './DLCSLoginPanel';
import DLCSImageThumbna... |
//每条菜单的id
var dbid = "";
//1-10的正则表达式
var regu = /^[1-9|10]$/;
var re = new RegExp(regu);
//按钮控制
function submitOparation(obj){
var obj_checked = obj.checked;
$("input[name='checkbox-inline']:checkbox").attr("checked", false);
obj_checked?obj.checked=true:obj.checked=false;
if (obj_checked) {
... |
// Build a worker from an anonymous function body
// http://stackoverflow.com/a/19201292/2487925
// something like workify (https://github.com/shama/workerify) would be
// prettier, but it requires a bunch of dependencies and looks like it
// might not work with bundlers other than browserify
var blobURL = URL.createOb... |
// import utils from './utils.js'
function randomIntFromRange(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min)
}
function randomColor(colors) {
return colors[Math.floor(Math.random() * colors.length)]
}
function distance(x1, y1, x2, y2) {
const xDist = x2 - x1
const yDist = y2 - y1
... |
import {
faDownload, faSave, faShare, faCodeBranch,
} from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import React, { useState, useEffect } from 'react';
import { Controlled as CodeMirror } from 'react-codemirror2';
import ReactModal from 'react-modal';
impo... |
import React from 'react';
import subscribe from 'horizon-react/lib/components/subscribe';
import wedding from '../../../../../config/wedding.js';
import variables from '../../../../../config/variables.js';
import glob from 'styles/app';
import effects from 'styles/effects';
import local from './_styles';
import Row fr... |
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react'
import { Box, Drop, Text, TextInput, ThemeContext } from 'grommet'
import { Scroller, Button, Check as Checkmark, Close, Notification, Explore as Search, User, Tag as TagIcon } from 'forge-core'
import { SortAsc as Ascend, SortDesc as D... |
const electron = require("electron");
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
const { Menu, Tray, session, remote, Notification, shell, dialog } = require('electron')
const ipcMain = require('electron').ipcMain;
const contextMenu = require('electron-context-menu')
const { autoUpdater } ... |
"use strict";
/*!
* Copyright 2017 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless req... |
import React, {useState} from "react";
import {useHistory} from "react-router-dom";
import styled from "styled-components";
import Helmet from 'react-helmet';
import AntTabs from "~/components/AntTabs";
import Json2html from "~/components/Json2Html"
import {
Box as MuiBox,
Button as MuiButton,
Card as MuiC... |
var current_container=""
var current_stack_id=1;
var current_container_id=1;
var selected_gene_list_to_display = [];
myLayout = new GoldenLayout({
content:[{
type: 'row',
content:[{
title: 'New graph',
type: 'component',
componentName: 'testComponent',
... |
//expression
// Ensure that you use template literal ` instead of '
let name='Deepti';
message=`How are you ${name}`
console.log(message);
//output: How are you Deepti
//next line \n
let address ='C24\nAyudh Vihar\nDwarka';
// Output UNix
// C24
// Ayudh Vihar
// Dwarka
console.log(address);
// next ... |
/*
* Copyright 2008-2018 the original author or 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... |
/**
* Table组件的封装
* yanggqm
* 2018/01/10
* 备注:
* 1、表格分为三类( 展示类简单表格 编辑性表格)
* createSimpleTable 展示类简单表格
* createEditableTable 编辑性表格
*/
// 引入react以及所需的NC组件
import React, { Component } from 'react';
import Table from '../../base/nc_Table';
import Pagination from '../../base/nc_Pagination';
import S... |
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from '../server/pages';
import { FormattedMessage, defineMessages } from 'react-intl';
import withIntl from '../lib/withIntl';
import { formatCurrency, capitalize } from '../lib/utils';
import { Badge } from 'react-bootstrap';
import { get, ... |
//// { "order": 5, "isJavaScript": true}
// Di bawah ini merupakan contoh pembuata sebuah kanvas HTML
// yang menggunakan WebGL untuk menghasilkan _confetti_ yang
// berputar menggunakan JavaScript. Kita akan menelusuri kode
// program untuk mengerti bagaimana program bekerja, dan melihat
// bagaimana perkakas TypeS... |
/*******************************************************************************
* Licensed Materials - Property of IBM
* (c) Copyright IBM Corporation 2019. All Rights Reserved.
*
* Note to U.S. Government Users Restricted Rights:
* Use, duplication or disclosure restricted by GSA ADP Schedule
* Contract with IB... |
var path = require( 'path' );
var _ = require( 'lodash' );
var regex = require( './regex.js' );
var log = require( '../log' )( 'autohost.http.adapter' );
var passportFn = require( './passport.js' );
var metronic = require( '../metrics' );
function buildActionUrl( state, resourceName, actionName, action, resource, reso... |
var tape = require('tape'),
vega = require('../');
function draw(context) {
context.beginPath();
context.moveTo( 0, 0);
context.lineTo(-10, -10);
context.lineTo(-10, 10);
context.lineTo( 10, -10);
context.lineTo( 10, 10);
context.closePath();
}
tape('intersectPath should intersect paths', funct... |
var wait = 60;
var banbCode = $("#bank_code").val();
var min = $("#min").val();
$(function() {
$("#nfd-channel-form-bank input").focus(function() {
var msg_wrapper = $(this).parent().find(".msg-wrapper");
if (msg_wrapper.css("display") == 'block') {
msg_wrapper.hide();
}
});
... |
var ACCELERATION = 0.5;
var DIFFERENCE_LIMIT = 5;
(function (window, undefined) {
'use strict';
var CF;
CF = function CopterFace(cockpit) {
// console.log("Loading Copterface plugin.");
// Instance variables
this.cockpit = cockpit;
this.tracking = false;
// Add required UI elements
$("#... |
let search_data = {};
let searchBox = document.getElementsByClassName('search-w')[0];
// 0: Closed
// 1: Empty
// 2: Typed anything
let searchState = 0;
let inputWrap = document.getElementsByClassName('search-input-w')[0];
let input = document.getElementById('t-s-input');
let button = document.getElementById('t-s-but... |
/* eslint-disable no-nested-ternary, no-param-reassign */
/* eslint-disable no-underscore-dangle, object-curly-newline */
import SdaExtension from '../SdaExtension';
import SdaShapeExtension from '../SdaShapeExtension';
import { getClientPos } from '../utils/dom-manipulate';
import PathOptimizerT1 from '../utils/PathOp... |
"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, { useEffect, useState } from 'react'
import {
makeStyles,
Typography,
IconButton,
Popover,
MenuItem,
ListItemIcon,
ListItemText,
Checkbox
} from '@material-ui/core'
import {
MoreVert,
Lock,
FilterList,
ArrowDownwardSharp,
ArrowUpwardSharp,
VisibilityOff,
Clear
} from '@materi... |
/* eslint-disable */
// @ts-nocheck
'use strict';
require('ooi/polyfills');
const _ = require('ooi');
const path = require('path');
const jsyaml = require('js-yaml');
const util = require('util');
const File = require('./file');
class XyamlDocument {
constructor(src, file) {
this.defineProps(src, file);
O... |
import DataRequest from '@shopgate/pwa-core/classes/DataRequest';
import { logger } from '@shopgate/pwa-core/helpers';
export * as SGAction from '@shopgate/pwa-core/commands/unifiedTracking';
/**
* Decodes a hexadecimal encoded binary string
* @param {string} str The string that shall be decoded
* @see http://locu... |
// ==UserScript==
// @name AMQ Rewards Tracker
// @namespace https://github.com/TheJoseph98
// @version 1.0.2
// @description Tracks rewards gained per hour such as xp, notes and tickets
// @author TheJoseph98
// @match https://animemusicquiz.com/*
// @grant none
// @require ht... |
var fs = require("fs");
var Okb = require("./Okb")
var examples = require("./examples")
const { execSync } = require('child_process');
var run = function(id){
var code = document.getElementById("code-"+id).innerText;
var header = "var canvas = document.getElementById('canv-"+id+"');\n"
+ "var context ... |
/*
attempt to port sonic wire sculptor by <NAME> into p5.js
sonic wire sculptor was "made around 2003 to explore basic connections between sound and visuals."
see: http://www.sonicwiresculptor.com/
this version is based on an openFrameworks port I worked on while attending the School for Poetic Computation (http://sf... |
import React from "react";
import AuthService from "../utils/auth";
import Box from '@mui/material/Box';
import Modal from '@mui/material/Modal';
import { useMutation } from '@apollo/client';
import { UPDATE_PORTFOLIO_PROJECT, DELETE_PORTFOLIO_PROJECT } from "../utils/mutations";
import { USER_PROFILE } from "../utils... |
var L = require('leaflet');
require('drmonty-leaflet-awesome-markers');
require('leaflet-groupedlayercontrol');
require('../../leaflet-extensions');
require('../leaflet');
var turf = require('turf');
var _ = require('underscore');
module.exports = function LeafletMapController($scope, $element, $rootScope, LocalStorag... |
if (!window.tempobj) window.tempobj = [];
if (!window.dict) window.dict = {};
dict.calendar = {
div:'-',
table:{
'2011-10-31':'’эллоуин Ч канун ƒн¤ всех св¤тых',
'2011-11-01':'ƒень судебного пристава',
'2011-11-19':'ƒень ракетных войск и артиллерии',
'2011-12-12':'ƒень онституции –оссийской ‘едерации',
... |
/* eslint-disable */
import { Tab, Tabs } from '@material-ui/core';
import AppBar from '@material-ui/core/AppBar/index';
import React from 'react';
import PropTypes from 'prop-types';
import Typography from '@material-ui/core/Typography/index';
import TextField from '@material-ui/core/TextField/index';
import { cre... |
/** Hylite.js basic syntax highlighter
* @author <NAME>
*/
import {HtmlHelper} from "./HtmlHelper.js";
import {Lexer} from "./Lexer.js";
class HyliteEditor {
constructor () {
this.isHooked = false;
this.editorElement = undefined;
this.language = undefined;
this.onchan... |
import React from 'react';
import { graphql } from 'gatsby';
import styled from 'styled-components';
import Markdown from 'markdown-to-jsx';
import Layout from '../components/Layout';
import SEO from '../components/SEO';
import Newsletter from '../components/Newsletter';
import Activity from '../components/Activity';
... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
})... |
function mean(arr) {
return arr.reduce((a,b) => a+b) / arr.length;
}
function median(arr) {
arr.sort((a,b) => a-b);
return (arr.length % 2) ? arr[(arr.length / 2) | 0] : mean([arr[arr.length/2 - 1], arr[arr.length / 2]]);
}
// Overload
Function.prototype.toSource = function() {
return this.toString().slice(this.to... |
"use strict";
var Promise = require('bluebird');
var Backbone = require('backbone');
var Marionette = require('backbone.marionette');
var context = require('../../../utils/context');
var apiClient = require('../../../components/api-client');
var appEvents = require('../../../utils/appevents');
var moment = require('mo... |
angular.module('myApp').
controller('contentController', function($scope, $http, $interval){
console.log('init contentController');
//获取大盘指数
$scope.marketdata = [];
getMarketInfo($http, function(data){
if(data.code === 0){
$scope.marketdata = data.data;
$scope.marketda... |
const puppeteer = require('puppeteer');
const fs = require('fs');
const docx = require('docx');
const rimraf = require('rimraf');
const mkdirp = require('mkdirp')
let image = []; //for serial works
let timer;
let curCountg = 1;
let isParallel = false;
const doc = new docx.Document();
(async function () {
try {
... |
let html = { }
let math = { }
math .average = math .平均 = math .平均值 = function ( x , rt ) {
let average = 0
if ( typeof rt === 'function' ) {
for ( let i in x ) {
let red = rt ( x [ i ] , i )
if ( Number ( red ) + '' !== 'NaN' ) {
average += red
}
}
} else {
for ( let i in x ) {
average += x [ i... |
const Discord = require('discord.js');
const client = new Discord.Client();
//pour le lancement du bot
client.on('ready', () => {
console.log(`${client.user.tag} est lancer il est partit écumer les océans de discord!`);
client.user.setActivity(prefix + 'help', { type: 'WATCHING' })
});
client.on('g... |
'use strict';
const DATE_FORMAT_REGEX = /%([-_0^#:]*)([0-9]*)([EO]?)(.)/;
const abbr = str => str.slice(0, 3);
const toDate = d => d ? new Date(d) : new Date();
const daysInMonth = date => {
return [31, isLeapYear(date) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
};
const getDayOfYear = date => {
const ... |
/* Javascript classes supporting the pageMenu that appears at the top
of each page
- included in pages via baseHTMLIncludes.jsp
- inserted in pages by pageHeader.tag
- data supplied by pageMenuData.jsp
*/
var pageMenu = null;
var debug = false;
var currentMenuItem = null;
var verbose = false;
function myCreateElem... |
/**
*
* https://github.com/arnogues/html-components
*
* @author <NAME>
* @class HTMLComponents
* @copyright (c) 2014 <NAME>
* @license MIT
*
*
*/
"use strict";
var cheerio = require("cheerio"),
_ = require("lodash"),
path = require("path"),
Handlebars = require("handlebars"),
mkdirp = require("mkdir... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import axios from 'axios';
import { config } from '../../config';
import Select from 'react-select';
import logo from '../../images/logo.svg';
import timeIcon from '../../images/time.svg';
import closeIcon from '../../images/close-grey.svg';
... |
const {Expr, Token, TrackPath, Get, Expression} = require('./lang');
const _ = require('lodash');
const SimpleCompiler = require('./simple-compiler');
const {searchExpressions} = require('./expr-search');
const {exprHash} = require('./expr-hash');
const enums = require('../bytecode/bytecode-enums');
// const {flatbuf... |
import React from "react";
import CustomButton from "../components/CustomButton";
import CustomTextInput from "../components/CustomTextInput";
import {
Alert, AsyncStorage, BackHandler, FlatList, Picker, Platform, ScrollView,
StyleSheet, Text, View
} from "react-native";
import { StackNavigator } from "react-naviga... |
// import React, { Component } from 'react';
import { Icon, InlineIcon } from '@iconify/react';
import setCenter from '@iconify-icons/mdi/set-center';
import lightbulbOnOutline from '@iconify-icons/mdi/lightbulb-on-outline';
import clockOutline from '@iconify-icons/mdi/clock-outline';
import {Link} from "react-router-d... |
import "./style.css"; // For webpack support
import {
Vector3,
Raycaster,
Vector2,
BoxGeometry,
Scene,
Color,
PerspectiveCamera,
AmbientLight,
SpotLight,
PlaneGeometry,
ShadowMaterial,
Mesh,
GridHelper,
WebGLRenderer,
BufferGeometry,
BufferAttribute,
CatmullRomCurve3,
Line,
LineBa... |
/** # Independence test
Player performance comparisons and tests based on hypothesis testing.
*/
// ## Fisher exact test ############################################################################
/** Part of Fisher's exact test is the hypergeometric rule, which is used to calculate the
probability of a given conti... |
$(function(){
$.ajax({
type: "GET",
url: "ajax/message.json",
dataType: "json",
success: function(data){
data.about_info.forEach(function(item){
$("#about_info").append("<p>"+item+"</p>");
});
$("#skill_info").append("<p>"+data.skill_info+"</p>");
$(".skill_int").append("<ul></ul>");
data.h... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.resetChecked = resetChecked;
exports.setChecked = setChecked;
exports.setLabel = setLabel;
exports.decodeMenukey = exports.getTreeItem = exports.getKeyId = exports.getRoleId = exports.getUserId = exports.deSelectType = exports.deSel... |
/*
* LICENSE
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*/
import Modifier from 'famous/src/core/Modifier';
import RenderNode from 'famous/src/core/Rend... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { HexGrid, Layout, Hexagon } from "react-hexgrid";
import BattlePopup from "./battle/BattlePopup";
import NewsPopup from "./NewsPopup";
import ContainerPopup from "./ContainerPopup";
import Refuel... |
/* eslint func-names: 0, no-invalid-this: 0, max-lines: 0, no-undefined: 0 */
import {
omit, mapObjIndexed, curry, path as getPath, assocPath, merge, binary, when,
always, zipObj, clone, toPairs, find, nth, keys as getKeys, values as getValues,
is as ramdaIs, fromPairs, indexBy, sum, pluck, any, map, pipe, split,... |
var test = null;
var state = document.getElementById('content-capture');
var selectedDevice = ""; // Drop down selected value of reader
var disabled = true;
var startEnroll = false;
var setUpType = 'Enrollment'; //Enrollment or Verification
//var currentFormat = Fingerprint.SampleFormat.PngImage;
var currentFormat =... |
import {initializeCanvas} from "./setup.js";
import {colors} from "../../../utils/colors.js";
import createTypeOptions from "./create-type-options.js";
import {onLineOrNot} from "../../../utils/shape.js";
const minHeight = 200;
function computePositions(data, width, height, radius = 20, padding = 10, margin = 60) {
... |
/* Author: <NAME>
License: MIT
*/
/*jshint browser:true, devel:true, white:false, plusplus:false */
/*globals $, CodeMirror, editor, library */
var globals_ = "/*globals move, turn_left, RUR, inspect, UsedRobot, front_is_clear, right_is_clear, "+
" is_facing_north, done, put, take, shape_here,... |
const express = require("express");
const router = express.Router();
const { version } = require("../../package.json");
// Import adm-zip
const AdmZip = require("adm-zip");
const archiver = require("archiver");
// Bring in sendEmail method to send email
const sendEmail = require("./sendEmail");
// import multer for ... |
/* Init */
var myApp = new Framework7({
modalTitle: 'Ticketeer',
material: true,
tapHold: true
});
var $$ = Dom7;
var mainView = myApp.addView('.view-main', {});
var onScan = false;
/* Global Namespace*/
/* Authentication */
firebase.auth().onAuthStateChanged(function (user) {
if (user)... |
'use strict';
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = ... |
function getInput() {
var x = document.getElementById("entry").value;
return x;
}
function Div(className) {
let div = document.createElement("div");
div.className = className;
return div;
}
let button = document.getElementById("postIt");
button.addEventListener('click', function() {
//Create new... |
var map;
var layer;
//定义一些常量
var piObj = {
x_PI : 3.14159265358979324 * 3000.0 / 180.0,
PIs : 3.1415926535897932384626,
a : 6378245.0,
ee : 0.00669342162296594323
};
$(function(){
layui.use('layer',function() {
layer = layui.layer;
});
initMap();
//定位到地理位置名
$("#btn").click... |
'use strict';
var _interopRequireWildcard = require("@babel/runtime-corejs3/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
var _Object$defineProperty2 = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
_Object$d... |
/*
* The MIT License
*
* Copyright 2020 <NAME> <<EMAIL>>.
*
* 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... |
var socket = io();
socket.on('connect', () => {
console.log('connected');
socket.emit('register', 'client');
});
var app = new Vue({
el: '#vue',
data: {
height: 480,
width: 640,
connected_models: [],
img: new Image,
enabled_dict: {}
},
created: function() {
var vm = this;
var ... |
import {
Avatar,
Button,
Col,
Divider,
Input,
PageHeader,
Pagination,
Row,
Tabs,
Tag,
Typography,
} from "antd";
import axios from "axios";
import React, { useEffect } from "react";
import {Link, useParams} from "react-router-dom";
import NTNU from "../../assets/image/ntnu.png";
import { use... |
import React from 'react';
import {observer, inject} from 'mobx-react';
import * as Xcomp from './observableComponents';
import {loadData} from '../apiService'
import config from '../config'
// import LoadingHoc from './LoadingHoc'
import {action, autorun, extendObservable, observable, toJS, computed} from "mobx"
impo... |
var express = require('express');
var router = express.Router();
var DeviceModel = require('../models/device.js');
var settings = require('../settings');
var JsonFileTools = require('../models/jsonFileTools.js');
var UserDbTools = require('../models/userDbTools.js');
var path = './public/data/finalList.json';
var pa... |
/* Menu ---------------------------------------------------------------- */
//Menu toggle
toggleFunction = () => {
//console.log('this is toggleFunction');
$("#sidebar").toggleClass("active").addClass("deactive");
$("#headOne").toggleClass("activeOne").addClass("deactive");
};
//if click on body to toggle this
t... |
/**
* Created by highlander on 5/7/16.
*/
const TAG = ' | (modules/api) INTERFACE | '
const uuid = require('node-uuid')
const co = require('co')
// const async = require('asyncawait/async')
// const await = require('asyncawait/await')
// const Redis = require('promise-redis')();
// const redis = Redis.createClient()... |
var Item = function(json) {
if ('name' in json) {
this.name = json.name;
} else {
this.name = '???';
}
if ('count' in json) {
this.count = json.count;
} else {
this.count = 1;
}
if ('done' in json) {
this.done = json.done;
} else {
this.done = false;
}
if ('note' in json) {
... |
//一般直接写开头
layui.use([ 'layer', 'form' ], function() {
var layer = layui.layer, form = layui.form();
// 新增
$("#btn_add").on("click", function() {
USER.add();
});
// 修改
$("#btn_edit").on("click", function() {
USER.edit();
});
// 充值
$("#btn_addMoney").on("click", function() {
USER.addMoney... |
const sysPath = require("path");
const yaml = require("js-yaml");
const fs = require("fs");
const sanitizeVersion = require("../functions/sanitizeVersion");
// const data = require("../data/softwares.json");
const data = require("../data/training.json");
// const data = [];
const test_ua = yaml.safeLoad(fs.readFileS... |
'use strict'
const EventEmitter = require('events')
const { PG, sql } = require('@iarna/pg')
const fun = require('funstream')
const unixTime = require('./unix-time.js')
const { Fic } = require('@fanfic/parser')
const validate = require('aproba')
const deeplyEquivalent = require('./deeply-equivalent.js')
class ScannerD... |
import { useFormik } from 'formik';
import { useState, forwardRef } from 'react';
// material
import { Container, Stack, Typography, Button } from '@mui/material';
// components
import Page from '../components/Page';
import {
ProductSort,
ProductList,
ProductCartWidget,
ProductFilterSidebar
} from '../component... |
window.onload = init;
window.onresize = () => {
manual.display();
}
class Help {
constructor(element) {
this.element = element;
this.skills = [];
// Search index: element -> { type: (command, subcommand or skill), skill if command or subcommand, command if subcommand }
... |
// Copyright 2015-2021, University of Colorado Boulder
/**
* Conductivity tester. Light bulb connected to a battery, with draggable probes.
* When the probes are both immersed in solution, the circuit is completed, and the bulb glows.
*
* @author <NAME> (Mlearner)
* @author <NAME> (PixelZoom, Inc.)
*/
import Pr... |
var socket = io.connect('/');
socket.once('reload', function () {
console.log('reloading...');
setTimeout(function () {
location.reload();
}, 100);
});
var DAY_MS = 24 * 60 * 60 * 1000;
var rgxMetadata = /^(\w+)\:\s*(.*)$/
var nextId = 1;
socket.on('data', function (data) {
// console.log(data... |
const router = require('express').Router();
const request = require('request-promise-native');
const moment = require('moment');
const tor = require('tor-request');
const auth = require('../auth');
const { t, generateSlug } = require('../../utils');
tor.TorControlPort.password = '<PASSWORD>';
router.get('/:lang/:spor... |
import Link from "next/link"
import styled from "styled-components"
import Fade from "react-reveal/Fade"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
const HeaderImage = styled.div`
grid-area: header-image;
justify-self: start;
align-self: center;
`
const HeaderContent = styled.div`
grid-a... |
import Ember from 'ember';
const { getOwner } = Ember;
export default Ember.Service.extend({
sitemapEntryFilter: null,
dynamicSegmentResolver: null,
rootUrl: null,
allRoutes: null,
cleanUrls: true,
/**
* Initialize the service. Try to add the sitemap settings and the routes automatically.
*/
init(... |
var gui = require('nw.gui');
var win = gui.Window.get();
var cp = require('child_process');
var fs = require("fs");
//OS X Specific Window Menu
if (process.platform === "darwin") {
var mb = new gui.Menu({type:"menubar"});
mb.createMacBuiltin("nwMAME");
win.menu = mb;
}
//Disable any file to drag into appl... |
function doOneTest(test, cbFct){
async.setImmediate(() => {
let t0 = new Date();
test();
let t1 = new Date();
return cbFct(null, t1-t0);
});
}
function doNbTest(test, nb, cbFct){
async.times(nb, (i,cb) => doOneTest(test, cb), (err,ret) => {
return cbFct(err, (ret||[]).reduce((a,c) => a+c,0)/... |
import { randFloatSpread, sample } from './math.js';
var AudioContext = window.AudioContext || window.webkitAudioContext;
var OfflineAudioContext = window.OfflineAudioContext || window.webkitOfflineAudioContext;
var audioContext = new AudioContext();
var sampleRate = audioContext.sampleRate;
function toFreq(note) {
... |
/*
* test_phyx.js: Test all Phyx files in this repository.
*/
const BASE_DIR = 'phyx/';
/*
* The `phyx` folder contains a set of public and private (encrypted)
* Phyx files. We can run some fast tests against these:
* - 1. Validate them against the JSON Schema.
* We can also run some slow tests:
* - 1. See i... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _classCallCheck(instance, Construct... |
import React from 'react';
import {
cloneDeep,
omit,
} from 'lodash';
import { createMemoryHistory } from 'history';
import { waitFor, screen, act } from '@testing-library/react';
import { renderWithIntl } from '@folio/stripes-data-transfer-components/test/jest/helpers';
import { ConfirmationModal } from '@folio/s... |
//terragen features:
// generation options:
// alg type
// perlin-erosion, simplex-erosion, simplex-fbm, white noise, sinusoidal
// alg arguments
// smoothing factor, num. layers, etc.
// size
// x, y, [z scale, z adjust /or/ z minimum, z maximum]
// brick type
// 2x zonefloat, 4x zonefloat, 8x zonefloat, 2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.