text stringlengths 3.22k 29.5k |
|---|
$(document).ready(function () {
//Initialize tooltips
$('.nav-tabs > li a[title]').tooltip();
//Wizard
$('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
var $target = $(e.target);
if ($target.parent().hasClass('disabled')) {
return false;
}
});
$(... |
const {
prefix: globalPrefix
} = require('../config.json');
const guildPrefixes = {};
const Discord = require('discord.js');
const basic = require("../util/basic.js");
const {
missingPermsColorEmbed,
cooldownColorEmbed
} = require("@conf/colors.json");
const cooldowns = new Set();
module.exports = (client, comma... |
const MI = [[0, 5, 4], [5, 1, 3], [4, 3, 2]];
const MK = [[1, 0.5, 0.5], [0.5, 1, 0.5], [0.5, 0.5, 1]];
const matrix2tensor = tensor => {
const S = math.inv(tensor);
const s = [
[
[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
[[0, 0, 0], [0, 0, 0], [0, 0, 0]],
],
... |
/* Globals */
//var $, moment, videojs
// TODO: 'strategy' modules that handle a source type
// modules
var TagReader = require('../lib/tag-reader')
var localforage = require('localforage')
module.exports = Player
function Player (config) {
var self = this
this.$audio = $(config.audio)
this.$video = $(confi... |
"use strict";
/* ============================================================= */
/* Declarations */
/* =========================================================== */
var originalText = "There are two hard things in Computer Science: Cache invalidation, naming things, a... |
/* *****************************************************************************
*
* StoryPlaces
*
This application was developed as part of the Leverhulme Trust funded
StoryPlaces Project. For more information, please visit storyplaces.soton.ac.uk
Copyright (c) 2016
University of Southampton
<NAME>, cah07r.e... |
function Parser(grammar, startRule) {
var ast = PEG.parser.parse(grammar);
var rules = {};
for (var i = 0; i != ast.rules.length; ++i) {
rules[ast.rules[i].name] = ast.rules[i];
}
function compileActions(ast) {
var jsParts = [];
jsParts.push('function offset() { return iter.frame.startPos; }')
jsParts.pu... |
'use strict';
/* global angular, L, $ */
/* jshint unused:false */
var controllersModule = require('./_index');
var Leaflet = require('../components/leaflet');
var GeoJSON = require('../components/geojson');
var result;
var marker=[];
/**
* @ngInject
*/
controllersModule.controller('AnalyzeCtrl', ['$rootScope','$http... |
const colors = require('colors'); // eslint-disable-line
const util = require('util');
const path = require('path');
const _ = require('lodash');
const utils = require('keystone-utils');
const crypto = require('crypto');
const yeoman = require('yeoman-generator');
require('./includesPolyfill');
const KeystoneGenerator... |
(function ($) {
//console.log("Hello Ek-Shop User!");
productCarousel();
$('#mainAdds').owlCarousel({
loop: true,
margin: 30,
nav: false,
items: 1,
autoplay: true,
autoplayTimeout: 3500
});
$(document).ready(function () {
var incValue = 1;
... |
/*
1. (Easy) crear una función que dado un número
del 1 al 100 indique el porcentaje de contaminación
de Madrid. Ayuso ha dicho en rueda de prensa esta mañana
que cuando la contaminación supere el 40%, los coches
no podrán superar los 90km/h. Si la contaminacion
supera el 75% los coches no podrán superar lo... |
import angular from 'angular-fix'
function isFieldGroup(field) {
return field && !!field.fieldGroup
}
// @ngInject
export default function FormlyFormController(
formlyUsability, formlyWarn, formlyConfig, $parse, $scope, formlyApiCheck, formlyUtil) {
setupOptions()
$scope.model = $scope.model || {}
setupFie... |
const moment = require("moment");
const DB = require("./db");
const pool = require("../dbPool");
// The data that we use does not come from data sets that match the data sets
// used in out PopHealth app. To simulate those, we run the queries as usual,
// but introduce some randomness by excluding some po... |
import React, { useEffect } from 'react'
import { isMobile } from 'react-device-detect'
import fragment from 'raw-loader!glslify-loader!./shaders/fragment.glsl'
import vertex from 'raw-loader!glslify-loader!./shaders/vertex.glsl'
const Sketch = ({ container, imageOriginal, imageDepth, vth, hth, respondTo, reverseMotio... |
var cleaner = require('htmlstrip-native');
var cheerio = require('cheerio');
var _ = require('underscore');
module.exports = {
escape: function (html) {
'use strict';
return html.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"... |
import React, { useContext, useEffect, useState, useCallback, useRef } from "react";
import { useNavigate, useParams } from "react-router-dom";
import { AiOutlineLoading3Quarters } from "react-icons/ai";
import { AuthContext } from "../context/auth";
import fetchWithAuth from "../utils/fetchWithAuth";
import { msToTime... |
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _possibleConstructorReturn from "@babel... |
import u from './Util'
var icon = require('./Icon');
function get_hostname(url) {
if(!url){return;}
var matches = url.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
return matches[1];
}
function vimeoID(url) {
var match = url.match(/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/vid... |
//@ sourceURL=baseExample1.js
/*
* 项目:base
* 模块:Example1
* 标识:bssw
* 日期:2018.1.29
* 人员:anthony
* 备注:
*/
;
var baseExample1 = function () {
//初始化表格
var initTable = function (lastQueryParams) {
var options = $.extend(true, plugOpts.getDatatableDefaultOptions(), {
method: 'get'... |
import 'lazysizes';
// import a plugin
import 'lazysizes/plugins/parent-fit/ls.parent-fit';
import * as Sentry from '@sentry/browser';
import notify from './utils/notify';
// import notify3 from './utils/notify3';
import { isIE, setEscapedHTML } from './utils';
import { scrollToTop } from './utils/scroll';
import Them... |
const canvas = document.getElementById("cnvs");
const gameState = {};
function onMouseMove(e) {
gameState.pointer.x = e.pageX;
gameState.pointer.y = e.pageY
}
function onMouseClick(e) {
if(gameState.isStopped)
{
const prevScore = gameState.lastGameScore + gameState.gameTime;
const prevBonus = gameSt... |
import { LitElement, html, nothing, MdElement } from "../../foundations/foundations.js";
import { ifDefined } from "../../foundations/foundations.js";
import { choose } from "../../foundations/foundations.js";
/**
*
*/
class MdTextFieldElement extends MdElement {
static get properties() {
return {
... |
var secureRandom = require('secure-random'),
xor = require('bitwise-xor'),
crypto = require('crypto')
var KEY_SIZE = 256,
K = 20
var conf = {
nodeId: secureRandom(KEY_SIZE/8, {type: 'Buffer'}).toString('hex'),
port: process.env.PORT,
seeds: process.argv.slice(2),
msgTimeout: 3000
}
var se... |
$(document).ready(function () {
if (!localStorage.getItem('qaref')) {
localStorage.setItem('qaref', '');
}
ItemnTotals();
$('.bootbox').on('hidden.bs.modal', function (e) {
$('#add_item').focus();
});
$('body a, body button').attr('tabindex', -1);
check_add_item_val();
i... |
var Score = -1;
var marked = 0;
var red = "#f44254";
var green = "#8bf97b";
var black = "transparent";
function answered() {
var incomplete = 0;
var Q1check = $("input:radio[name='Q1']").is(":checked");
var Q1element = document.getElementById("Q1");
if (Q1check) {
Q1element.style.backgroundColor = bla... |
//
// Bilateral filter for 3d iamge using render and shader
//
import * as THREE from 'three';
import GlSelector from '../GlSelector';
// Shaders
const s_shaderVertex = `
varying vec2 texCoord;
void main() {
texCoord = position.xy + vec2(0.5, 0.5);
gl_Position = vec4(position * 2.0, 1.0);
}
`;
const s_shaderF... |
const GafanRecords = [
{
title: "Gafan Records",
style: "Full House",
},
{
band: "Игорь",
album: "Работа Полным Ходом",
date: "Сейчас",
link: "https://soundcloud.com/hotkeymusic/sets/b4frokptmusf",
soundloudPlaylistId: "1282586335",
coverUrl: "https://i1.sndcdn.com/avatars-00063196... |
import React, { Component } from 'react';
import { push } from 'connected-react-router';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import Chip from '@material-ui/core/Chip';
import Grid from '@material-ui/core/Grid';
import Hidden from '@material-ui/core/Hidden';
impo... |
'use strict'
// =====================
// 当前浏览器名称
// =====================
export const getExplorer = () => {
const ua = window.navigator.userAgent
const isExplorer = exp => {
return ua.indexOf(exp) > -1
}
if (isExplorer('MSIE')) return 'IE'
else if (isExplorer('Firefox')) return 'Firefox'
... |
// Selectors.
var answerFeedbackEl = document.querySelector("#answer-feedback");
var timer = document.querySelector("#timer");
var mainContentBox = document.querySelector("#main-content");
var scoreBoardButtonTopRight = document.querySelector("#top-right-sb-button");
// Global variables.
var secondsLeft = 60;
var tota... |
/**
* Filename: kyyla.js
* Project: Kyylacam
* Copyright: (c) 2014 <NAME>
* License: The MIT License (MIT) http://opensource.org/licenses/MIT
*
* A node.js kitchen sink surveillance robot for the Raspberry Pi
*/
var sys = require('sys');
var util = require('util');
var child_process = require('child_process'),
... |
document.body.scrollTop = 0; // For Safari
document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
var board = {players: [null, null],
types: [null, null],
'0': [0,0,0,0,0,0,0,0,0],
'1': [0,0,0,0,0,0,0,0,0],
'2': [0,0,0,0,0,0,0,0,0],
'3': [0,0,0,0,0,0,0,0,0],
'4': [0,0,0,0,... |
'use strict';
exports.__esModule = true;
exports.getClient = getClient;
exports.handleConversationSubscription = handleConversationSubscription;
exports.subscribeConversation = subscribeConversation;
exports.handleConversationActivitySubscription = handleConversationActivitySubscription;
exports.subscribeConversationA... |
import React, { Component } from "react";
import { connect } from "react-redux";
import moment from "moment";
import _ from "lodash";
import { getPoll, editPoll, deletePollOption, deletePollQuestion } from "./../actions";
import { BASE_URL } from "./../constants/appConfig";
import {
Divider,
Form,
Input,
Button... |
/**
* pub-util.js
* Utility toolbelt based on lodash for pub-server and other pub-* packages
*
* Copyright (c) 2015-2022 <NAME> - github.com/jldec - MIT license
**/
var util = require('util');
var path = require('path');
var ppath = path.posix || path; // in browser path is posix
var querystring = require('queryst... |
import React from "react";
import Fb from "components/Fb";
import CircularProgress from "@material-ui/core/CircularProgress";
import Container from "@material-ui/core/Container";
import Fab from "@material-ui/core/Fab";
import Typography from "@material-ui/core/Typography";
import Accordion from "@material-ui/core/Acco... |
class Response {
#resolve;
#statusCode;
#body;
#isHtml;
#contentType;
#location;
#cookies;
/**
* @constructs
* @description Create a new Response object. This is called automatically when
* a new App is instatiated. You do not need to call this directly.
* @param {resolve} resolve - Re... |
/**
* Created by liuhui on 2016/2/15.
*/
stayThree.end.datepicker('option', 'minDate', $("#startDateThree").val());
stayThree.start.datepicker('option', 'maxDate', $("#endDateThree").val());
//图表
// 基于准备好的dom,初始化echarts实例
var couponChart = echarts.init(document.getElementById('coupon-info'));
// 指定图表的配置项和数据
var coupo... |
import React, {useState} from "react";
import moment from "moment";
import {
DotIcon,
DownloadIcon,
FileDirectoryIcon,
FileIcon,
PencilIcon,
PlusIcon,
TrashIcon
} from "@primer/octicons-react";
import Tooltip from "react-bootstrap/Tooltip";
import Table from "react-bootstrap/Table";
import ... |
import { DateTime } from './luxon.js';
const dt = DateTime.now().toLocaleString(DateTime.DATETIME_MED);
document.getElementById('date-time').innerHTML = dt;
const formObjTitle = document.getElementById('book_title');
const formObjAuthor = document.getElementById('book_author');
const formObjButton = document.getEleme... |
import React, { Component } from 'react';
import { withStyles } from 'material-ui/styles';
import Button from 'material-ui/Button';
import Typography from 'material-ui/Typography';
import GraphIcon from '@material-ui/icons/Equalizer';
import SearchIcon from '@material-ui/icons/Search';
import { observer } from 'mobx-re... |
import { next } from "@ember/runloop";
import { iconHTML, iconNode } from "discourse-common/lib/icon-library";
import { renderSpinner } from "discourse/helpers/loading-spinner";
import { ajax } from "discourse/lib/ajax";
import lightbox from "discourse/lib/lightbox";
import {
fetchUnseenHashtags,
linkSeenHashtags,
... |
"use strict";
import gulp from "gulp";
/**
* Gulp CSS Plugins
*
* gulp-sass - SASS plugin
* gulp-sourcemaps - Add CSS sourcemap
* gulp-postcss - PostCSS plugin
* postcss-assets - Manage Img Url, Img inlines and size
* autoprefixer - Add browser prefixes
* css-mqpacker - Packi... |
import React, { Component } from "react";
// import { findDOMNode } from "react-dom";
import { DropTarget } from "react-dnd";
// import { connectMenu } from "react-contextmenu";
import { getMenu } from "../ContextMenu/ContextMenu";
// import ArrowKeyStepper from '../../containers/ArrowKeyStepper';
import DataCells fro... |
var fs = require('fs'),
path = require('path'),
events = require('events'),
util = require('util'),
existsSync = fs.existsSync || path.existsSync,
exists = fs.exists || path.exists,
Map = require('railway-routes').Map,
ControllerBridge = require('./controller-bridge'),
compoundUtils = r... |
import RolServicio from './service/rolServicio.js';
import UsuarioServicio from './service/usuarioServicio.js';
let roles = [];
RolServicio.findAll()
.then((data) => {
roles = data;
mostrarRoles();
})
.catch((error) => {});
function mostrarRoles(){
let select = "<option value=''>Seleccione</option>";
ro... |
const express = require('express');
var session = require('express-session');
// const session = require('session');
const router = express.Router();
const db = require('../config/database');
const Product = require('../models/Product');
const User = require('../models/User');
const Favorite = require('../models/Favori... |
var console = require('console')
var http = require('http')
var shelter = require('./shelter.js')
printData();
//exports.printData = printData;
function printData() {
var apiResultArr = [];
var itemArr = [];
var coords;
var item;
apiUrl = "http://openapi.animal.go.kr/openapi/service/rest/animalShelterSrvc/... |
var window_height = $(window).height();
$.browser.safari = ($.browser.webkit && !(/chrome/.test(navigator.userAgent.toLowerCase())));
$('.home-slide').each(function() {
contentSize = $(this).find('.home-slide-content');
contentSize.fitText(1.2);
});
var init = function() {
$('nav').animate({'opacity': '1'... |
// Variable for HTML
var sbtn = '#search-btn';
var sbar = '#search-bar';
var rpb = '#remove-pin-btn';
var dpml = '#dropdown-pins .dropdown-menu li';
var dpm = '#dropdown-pins .dropdown-menu';
var tesb = '#toast-error-search .toast-body';
var tes = '#toast-error-search';
var cn = '#city-name';
var frc = '#forecast-row .... |
import moment from "moment"
import { Collection, TimeSeries, TimeEvent, TimeRange, IndexedEvent } from "pondjs"
import Fund from './tradeValue'
// import getPriceOfPool from './getPriceOfPool'
import formatDate from './formatDate'
import Axios from 'axios'
const clone = require('rfdc')()
// get portfolio data, retur... |
import { component, Morph, Icon, HTMLMorph, Label, HorizontalLayout } from 'lively.morphic';
import { evalOnServer } from 'lively.freezer/src/util/helpers';
import { resource } from 'lively.resources';
import { Color, pt } from 'lively.graphics';
import { runCommand } from '../shell/shell-interface.js';
class Version... |
var timer_time = 15 * 60 * 1000;
var timer;
var reloadinterval;
var cur_client;
function WaitTimer(){
alert("Время бездействия слишком большое!");
document.location.reload()
}
function DoSetInterval(){
reloadinterval = setInterval(CheckOrder, 2500);
}
function ResetTimer(){
clearInterval(timer);
timer = setInterv... |
let name = localStorage.getItem('name');
console.log(name);
if (!name) {
name = 'Player#' + Math.floor(Math.random() * 1000 + 1)
}
// const MY_URL = 'http://localhost:8000';
const MY_URL = 'https://paintin.azurewebsites.net';
const SOCKET_URL = MY_URL + '?room=' + room + '&name=' + encodeURIComponent(name);
const sock... |
const params = require("./parameters.js");
const WebSocket = require("ws");
const wss = new WebSocket.Server({
port: params.socket_port,
path: params.socket_path
});
let challenges = {}; //variantName --> socketId, name
let games = {}; //gameId --> gameInfo (vname, fen, players, options, time)
let sockets = {}; //... |
import React, { Component } from 'react';
import update from 'react/lib/update';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from '../../Card_Item/Card_Item.css';
// Sub Comp: Drap n Drop
import DragCorrectBlank from './DragCorrectBlank';
import DropCorrectBlank from './DropCorrectBlank';... |
window.onload = startApp;
// Inicia a aplicalção
function startApp(){
renderLoadAnimation();
setDatas();
checkUser();
renderTaskCards();
setTheme()
}
// logout
function exit(){
window.sessionStorage.removeItem('user');
}
function checkUser(){
const user = window.sessionStorage.getItem("u... |
import { createVNodeTree } from '../../../src/jsx/index.js'
const h = (tag, props, ...children) => ({ tag, props, children })
const html = (statics, ...fields) => createVNodeTree(h, statics, fields)
describe('JSX parse', () => {
it('empty', () => {
expect(html``).toEqual(undefined)
})
it('single ... |
const getServiceClient = (clientClass, address, cert) =>
new Promise((resolve, reject) => {
if (cert == "") {
return reject(new Error("Unable to load dcrwallet certificate. dcrwallet not running?"));
}
var grpc = require("grpc");
var creds = grpc.credentials.createSsl(c... |
import React, { Component } from 'react';
import { ReactMic as Visualizer } from 'react-mic';
import hark from 'hark';
import Recorder from './components/Recorder';
import PhraseBox from './components/PhraseBox';
import SpokenWords from './components/SpokenWords';
import ReadPrompt from './components/ReadPrompt';
impo... |
const {
PhantomCollection,
/** @exports */
EVT_UPDATED,
/** @exports */
EVT_DESTROYED,
} = require("phantom-core");
const {
/** @exports */ EVT_CHILD_INSTANCE_ADDED,
/** @exports */ EVT_CHILD_INSTANCE_REMOVED,
} = PhantomCollection;
const MediaStreamTrackController = require("./_base/_MediaStreamTrackCont... |
import React, { useRef } from "react"
import { motion } from "framer-motion"
import { useOnScreen } from "../hooks/useOnScreen"
import styled from "styled-components"
const ScrollContainer = styled(motion.div)`
background: black;
position: relative;
overflow: hidden;
@media (min-width: 500px) {
margin: 0 ... |
var style = document.createElement('style');
style.innerHTML = [
'.text-input--material.focused {',
'background-image: -webkit-gradient(linear, left top, left bottom, from(#009688), to(#009688)), -webkit-gradient(linear, left bottom, left top, color-stop(1px, transparent), color-stop(1px, #afafaf));',
'backgroun... |
'use strict';
var Map = require("./map");
var Entity = require("./entity");
var NeonError = require('./error');
function Result() {
this.key = 0;
this.value = null;
this.add = function (key, value) {
if (this.value === null) {
this.value = new Map();
}
return this.value.add(key, value);
};
}
function ... |
var series = require("run-series");
var n = require('numbro');
var pad = require('pad');
var colors = require('colors');
var request = require('request');
var ta = require('./technical.js');
var dates = require('./isodate.js');
var quotes = require('./quotes.js');
var sentiment = require('./sentiment.js');
var conf =... |
function listCheckAllPages(form) {
form.find('input[type=checkbox]').prop("checked", true);
form.find('.check_all_list').removeClass('check-some');
form.find('.list_actions').removeClass('hide');
$.uniform.update();
}
function listUncheckAllPages(form) {
form.find('input[type=checkbox]').prop("chec... |
/**
* Creates postsperday.csv, postsbyvotes.csv, userstats.csv, ctastats.csv
*/
var fs = require('fs')
var dayNames = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
var configstr = fs.readFileSync("config.json", {encoding: "utf8"})
var config = JSON.parse(configstr)
var watchNames = config.users
var scrapedir ... |
const {QueryTypes} = require("sequelize");
const lodash = require('lodash');
const Activities = require('../models/Activities');
const db = require('../helpers/db');
const getAllActivity = result => {
Activities.findAll({type: QueryTypes.SELECT})
.then(activities => result(null, activities))
.catch(err => ... |
/**
* @title DTW API
* @author <NAME>
*/
var EPSILON = 2.2204460492503130808472633361816E-16;
function validateOptions(options) {
if (typeof options !== 'object') {
throw new TypeError('Invalid options type: expected an object');
} else if (typeof options.distanceMetric !== 'string' && typeof optio... |
import * as Backbone from 'backbone';
import setelements_tpl from '../templates/setelements-tpl';
import setattributes_tpl from '../templates/setattributes-tpl';
// Sadly Bootstrap js is not ES6 ready yet.
var $ = global.jQuery = require('jquery');
require('bootstrap/dist/js/umd/modal');
require('bootstrap/dist/js/umd... |
const fs = require("fs");
const LynnRequest = require("lynn-request");
const mkdirp = require("mkdirp");
const dateFormat = require("dateformat");
const url = require("url");
const files = require("./files");
const yaml = require("js-yaml");
const jp = require("jsonpath");
const ptr = require("json-ptr");
const expand ... |
var dom = require('shipyard/dom'),
Request = require('shipyard/http/Request'),
Events = require('shipyard/class/Events'),
typeOf = require('shipyard/utils/type').typeOf,
object = require('shipyard/utils/object'),
string = require('shipyard/utils/string'),
Cookie = require('shipyard/utils/Cookie'... |
var doc = document.getElementsByClassName("btn");
for (var i=0; i<doc.length; i++){
doc[i].addEventListener("click", addToCart, true);
}
var username = document.getElementById("username").innerHTML;
var razorObj = JSON.parse(localStorage.getItem("basket_"+ username));
if (razorObj === null) {
razorObj = {ejQuan: ... |
//----------------------------------------------
//Used as an exmaple for CampusInsight to demonstrate Connect extension
//Created by <NAME> 2017,2018,2019.
//----------------------------------------------
function setExampleListeners(){
//checks to make sure all of the fields we are using in the script exis... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _Controls = _interopRequireDefault(require("./components/Controls"));
var _Layout = _i... |
import { Group, Vector3 } from '../core/three.js';
import Peers from '../core/peers.js';
import Controls from '../renderables/controls.js';
import Display from '../renderables/display.js';
import Door from '../renderables/door.js';
import Sign from '../renderables/sign.js';
import Skin from '../renderables/skin.js';
im... |
/* eslint-disable no-param-reassign */
import FieldPath from './FieldPath.js';
const guard = (pos, length) => (
new RangeError(`cannot read ${length} bytes at position ${pos}`)
);
// See: https://github.com/dotabuff/manta/blob/master/reader.go
class Reader {
constructor(buffer) {
this.buffer = Buffer.from(bu... |
/*
@titre du fichier: style.css
@auteur: <NAME>, <NAME>
@code permanent: MAIP20118804, Limk15019302
@date d'édition: 10/12/2016
@description: la librairie chronomètre également couplée avec la librairie mouvement permet de créer un chronomètre temps réel dont le déroulement
se fait selon une échelle temporelle ch... |
const util = require('util');
const BufferWrapper = require('../buffer');
const Salsa20 = require('./salsa20');
const tactKeys = require('./tact-keys');
const BLTE_MAGIC = 0x45544c42;
const ENC_TYPE_SALSA20 = 0x53;
const EMPTY_HASH = '00000000000000000000000000000000';
class EncryptionError extends Error {
... |
const fs = require('fs');
const os = require('os');
const path = require('path');
const url = require('url');
const {fork, spawn} = require('child_process');
const {Console} = require('console');
const _ = require('lodash');
const express = require('express');
const {ipcRenderer} = require('electron');
const... |
function routeTo(e) {
NProgress.start();
let to = $(e.currentTarget).data("route-to");
window.location = baseurl + to;
}
function addPreNew() {
let tmp = document.getElementsByTagName("template")[0];
if(!tmp) {
return;
}
let row = tmp.content.cloneNode(true);
let _row = {
id: null,
tmp_id: "pre_new"... |
/*! http://mths.be/placeholder v2.1.2 by @mathias */
(function(factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('jquery'));
} else {
// Browser globals
... |
/* eslint-disable jsx-a11y/anchor-has-content */
/* eslint-disable no-unused-vars */
/* eslint-disable react-hooks/exhaustive-deps */
import React, { useEffect } from "react";
import { useState } from "react";
import { useSelector, useDispatch } from "react-redux";
import { useHistory } from "react-router";
import Wait... |
import { checkForSwissTopoInfo } from "./modules/swissTopo.js";
import { calculateHikingTime } from "./modules/hikingTimeCalculation.js";
var map = null;
var currentMapTileLayer = null;
var onceCentered = false;
export function initMap() {
var L = window.L;
map = L.map("map", {
center: [47.17599, 7.33801],
... |
import Ember from 'ember';
import defaultIfAbsent from '../../utils/default-if-absent';
const {
$,
isEmpty,
isBlank,
computed,
run: { next, scheduleOnce },
} = Ember;
export default Ember.Component.extend({
displayProperty: null,
placeholder: defaultIfAbsent(''),
itemClass: defaultIfAbsent(''),
auto... |
/**
* This is the example web application that demonstrates how to handle hashcode containers together with hashcode
* PHP library and DigiDocService.
*
* Current file is the javascript helper for the hashcode application.
*
* LICENSE:
*
* This library is free software; you can redistribute it
* and/o... |
import React, {Component} from 'react';
import {
StyleSheet,
ImageBackground,
Image,
Text,
View,
TouchableHighlight
} from 'react-native';
import {
Card,
Item,
Input,
ListItem,
CheckBox,
... |
const Logger = require("../utils/Logger.js").Logger;
const isMissing = require("../utils/Logger.js").isMissing;
const isPresent = require("../utils/Logger.js").isPresent;
const Device = require("./Device.js").Device;
var microtime = require('microtime');
/*
A node.js library to control a WS2801 RGB LED strip via S... |
const sequelize = require("sequelize");
const db = require("../models/");
module.exports = function (app) {
db.sequelize.sync().then(() => {
let stories = [{ //1
title: "Homework Dilemma",
narrative: "Your first homework has been graded. You received a decent grade but you do notice things in the feedba... |
import React, { PureComponent } from 'react'
import { connect } from 'react-redux'
import * as actions from '../actions'
import AnimationButtons from '../components/animation-buttons'
import LayerControls from './layer-controls'
import MapControls from './map-controls'
import { Range, Handle } from 'rc-slider'
import c... |
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Card, Form, Icon, Button, Divider, Tabs, Table, Input, Select, Modal, Message } from 'antd';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import styles from '../List/TableList.less';
const formItemLayout = {
label... |
import { zero, one, pointFromSize, pointFct } from '../records/point'
import { getRotatedSizes } from '../utilities'
import Immutable from 'immutable'
import { onLoadUrlPromise } from './index'
export default (obj)=>
onLoadUrlPromise({url:obj.options.get('url')})
.then(({src})=> getBlobFromSrc({obj, src, type: "imag... |
load('api_gpio.js');
load('api_config.js');
load('api_rpc.js');
load('api_dht.js');
load('api_timer.js');
load('api_sensor_utils.js');
load('api_adc.js');
let device_id = Cfg.get('project.name');
let device_ip = "unknown";
// homie topic root
let tr = 'homie/' + device_id + '/';
Cfg.set({mqtt: {will_topic: tr + '$sta... |
/*
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you 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/li... |
// An experiment in rendering Dungeon Master levels on a web page
// (c) 2021 <NAME>
'use strict';
class Party {
constructor() {
this.onMoved = [];
this.facing = Party.facingDirection.north;
this.champions = [];
}
goto(tile) {
this.tile = tile;
this.onMoved.forEac... |
var global = window;
global._DEBUG_ = false;
var MAP_SIZE = 21;
function rand( min, max ) {
if( max ) {
return Math.floor(Math.random() * (max - min + 1)) + min;
} else {
return Math.floor(Math.random() * (min + 1));
}
}
var randomItemFromArray = function(arr){
return arr[rand(0, ar... |
function Line(x1,y1,x2,y2){
this.x1=x1;
this.y1=y1;
this.x2=x2;
this.y2=y2;
}
Line.prototype.drawWithArrowheads=function(c){
// arbitrary styling
c.strokeStyle="#000";
c.fillStyle="#000";
c.lineWidth=1;
// draw the line
c.beginPath();
c.moveTo(this.x1,this.y1);
c.lineTo(this.x2,this.y2);
c.stroke();
... |
/* eslint no-alert: 0 */
import React from 'react';
import flow from 'lodash/flow';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import axios from 'axios';
// Ui
import { withStyles } from '@material-ui/styles';
import Grid from '@material-ui/core/Grid';
import Accordion from '@ma... |
function treasureitem(id, name, price, rarity, texture){
this.texture = texture;
this.name = name;
this.rarity = rarity;
this.id = id;
this.price = price;
this.amount = 1;
this.resetthesellingbutton = function(){
this.display = "<div class=container><div class=inventoryitem id="+this.id+"... |
var accion = "";
var BarMatricula = ""; var BarMatriculaNuevoIngreso = "";
var total_matricula = 0;
var annlectivo = "";
$(function(){
// funcionalidad del botón Actualizar
$("#lstannlectivo").change(function () {
annlectivo=$("#lstannlectivo").val();
accion = "GraficoIndicadores";
// INICIO DE ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.