text stringlengths 3.07k 16k |
|---|
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Grid from '@material-ui/core/Grid';
import Container from '@material-ui/core/Container';
import Typography from '../Typography/Typography';
import Brightness2Icon from '@material-ui/icons/Brightn... |
/******************************************************************************
*
* Copyright (c) 2017, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms of
* the Apache License 2.0. The full license can be found in the LICENSE file.
*
*/
import {de... |
let fs = require('fs');
let moment = require('moment');
let gm = require('gm')
let imageType = require('image-type');
let ent = require('ent');
let Event = require(__dirname + '/../models/data/event');
let WebappPost = require(__dirname + '/../models/data/webappPost');
let config = require(__dirname + '/../config');
... |
import React, { useState } from "react";
import { Link } from 'react-router-dom'
import IconButton from '@material-ui/core/IconButton';
import Button from '@material-ui/core/Button';
import ListItem from '@material-ui/core/ListItem';
import ListItemIcon from '@material-ui/core/ListItemIcon';
import ListItemText from '@... |
/**
* SSB CUSTOM URI
*
* This library and its API is inspired and informed by the conversations in:
*
* %g3hPVPDEO1Aj/uPl0+J2NlhFB2bbFLIHlty+YuqFZ3w=.sha256
*
* And the `fromSigilLink` and `toSigilLink` API signatures have been copied from
* https://github.com/fraction/ssb-uri
*
* This library is a drop-i... |
/*
* 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, publish, distribute, sublicense, and/or sell... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var PharmacyManager_1 = require("./PharmacyManager");
var maps_1 = require("@google/maps");
var GoogleMapsAPIKey_1 = require("./GoogleMapsAPIKey");
var LocationHandler = /** @class */ (function () {
function LocationHandler() {
// ... |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import React from 'react';
import axios from 'axios';
i... |
import { useMemo } from 'react';
import ReactDOM from 'react-dom';
import { useSelector } from 'react-redux';
import { createSelector } from 'reselect';
import debounce from 'lodash/debounce';
import union from 'lodash/union';
import isEqual from 'lodash/isEqual';
import get from 'lodash/get';
import { CRUD_GET_MANY } ... |
// initialise
var canvas = document.getElementById('the-canvas'),
ctx = canvas.getContext('2d');
// rectangle
ctx.fillStyle = 'red';
ctx.fillRect(50, 50, 75, 50); // top-left: x, y, width, height
ctx.strokeStyle = 'white';
ctx.lineWidth = 3;
ctx.strokeRect(150, 50, 75, 50);
ctx.fillStyle = 'rgba(100, 20, 23, 0.3)'... |
//****************************************************************************************
//Nombre: mainRD.css
//Objetivos: Código JS para registrar el diagnostico para un paciente mediante
// su número de NSS. Usa validaciones y funciones para los botones.
//Creado por: <NAME>
//Fech... |
import { useParams } from "react-router-dom";
import Description from "../components/Course/Description";
import EnrolledStudnets from "../components/Course/EnrolledStudents";
import Lectures from "../components/Course/Lectures/Lectures";
import Assignments from "../components/Course/Assignments/Assignments";
import Ap... |
const electron = require('electron')
const path = require('path')
const Menu = electron.Menu
const app = electron.app
const BrowserWindow = electron.BrowserWindow
const {dialog} = require('electron')
const { default: installExtension, REACT_DEVELOPER_TOOLS } = require('electron-devtools-installer');
let windows = []
... |
import React from "react"
import Image from "gatsby-image"
import { FaGithub } from "react-icons/fa"
import {BiLinkExternal} from 'react-icons/bi'
import styled from 'styled-components';
import { useState } from "react";
import { Link } from "gatsby";
const StyledProject = styled.div`
box-shadow: 0 3px 6px rgba(255... |
'use strict';
let hasReplied = false;
const startFrom = +process.argv[2];
const toIncluded = +process.argv[3];
const os = require('os');
const fs = require('fs');
const path = require('path');
const cluster = require('cluster');
const https = require('https');
const querystring = require('querystring');
const msgpac... |
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
const SCROLL_SPEED = 0.005;
const MIN_SQUARE_SIZE = 5;
const DEFAULT_SQUARE_SIZE = 30;
const DEFAULT_GPS = 5; // Generations per second
const DRAG_THRESHOLD = 5;
const RANDOMIZE_DENSITY = 0.5;
let squareSize = DEFAULT_SQUARE_SIZE;
le... |
/* eslint no-console: 0, max-len: 0 */
'use strict' // eslint-disable-line
var
tmpl23 = require('../dist/tmpl').tmpl,
tmpl22 = require('./v223/tmpl223.js').tmpl
var
data = { num: 1, str: 'string', date: new Date(), bool: true, item: null },
tmplList = [
[' { date }', ' ' + data.date],
[' { num === ... |
import { $, $$, Utils } from '../utils.js';
import { Resource } from '../common.js';
export class GeneralView {
constructor() {
$$('.tabs a').forEach(e => e.addEventListener('click', this.handleTabs.bind(this)));
$$('.notification > .delete').forEach(e => e.addEventListener('click', evt => {
... |
import React from 'react'
import { render } from 'react-dom'
import styled from 'styled-components'
import Cookies from 'universal-cookie'
import Axios from 'axios'
import { CopyToClipboard } from 'react-copy-to-clipboard'
import Button from '@components/common/button'
import Card from '@components/common/card'
import... |
import $ from 'jquery';
import 'jquery-touchswipe';
$(window).on('load', function() {
Common.init();
Components.init();
});
const Common = {
countLines: function($target) {
// const style = $target.css(); // window.getComputedStyle(target, null);
let height = parseInt( $target.css('height'... |
import forge from 'node-forge';
import fs from 'fs';
import jwt from 'jsonwebtoken';
import { check, Match } from 'meteor/check';
import {
ERR_AUTH_UNKNOWN_JWT,
ERR_AUTH_UNKNOWN_USER,
ERR_INVALID_JWT,
ERR_MALFORMED_AUTH_HEADER,
nogthrow,
} from './errors.js';
import { JwtAAToAction } from './jwt-aa-to-action.... |
var url = "https://qseeupdates.firebaseio.com/";
var firebase = new Firebase(url);
var posts = new Firebase(url+"posts");
var app = angular.module('qsee_updates',['ui.router','firebase','angularTrix'])
.controller('qsee_updates_ctrl',function($scope,$timeout,$state,$firebaseArray,$rootScope,$firebaseObject){
functio... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... |
const Direction = {
LEFT: {
oppositeDirection: 'RIGHT',
keyMappings: ['a', 'ArrowLeft'],
},
UP: {
oppositeDirection: 'DOWN',
keyMappings: ['w', 'ArrowUp'],
},
RIGHT: {
oppositeDirection: 'LEFT',
keyMappings: ['d', 'ArrowRight'],
},
... |
var url = "https://raw.githubusercontent.com/freeCodeCamp/ProjectReferenceData/master/global-temperature.json";
var titleName = d3.select("body").append("titleName");
titleName.append("div")
.attr("id", "title")
.html("Monthly Global Land-Surface Temperature");
var description = d3.select("body").ap... |
/* The Distance Teaching and Mobile learning 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
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
/* globals require, process, Promise */
"use strict";
// TODO: SEPARATE IN MODULES ONCE IT WORKS!!!!!!!!!!!!!!!!
var Superhero_1 = require("./models/Superhero");
var AlignmentType_1 = require("./utils/AlignmentType");
var Power_1 = require("./models/Power");
var PowerType_1 = require("./utils/PowerType");
var ts_promis... |
const fs = require("fs");
const Discord = require('discord.js');
const client = new Discord.Client();
const commandFiles = fs.readdirSync('./command');
const config = require ("./config.json");
client.login(config.token);
client.on("ready",() => {
console.log("yo boi im online");
client.user.setUsername("ROGer"... |
/*
* Copyright (C) 2014 Camptocamp
*
* This file is part of MapFish Print
*
* MapFish Print is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any l... |
//////////////////////////////////////////////////
// MISSKEY-WEB BUILDER
//////////////////////////////////////////////////
'use strict';
Error.stackTraceLimit = Infinity;
const fs = require('fs');
const gulp = require('gulp');
const gutil = require('gulp-util');
const glob = require('glob');
const del = require('d... |
/**
* Skip Silence Browser Extension:
* Skip silent parts in videos and audio files.
*
* Content script: Speed up and slow down source, measure volume using audio analyser
*
* @author vantezzen (https://github.com/vantezzen)
* @license MIT License
*/
// Currently disabled: Log info to page console
const debug... |
import * as THREE from "three";
import * as topojson from "topojson";
import * as d3 from "d3";
import * as TWEEN from "@tweenjs/tween.js";
import { geo } from "./geo.js";
class Globe {
constructor(container) {
this.container = container;
this.boundBox = this.container.getBoundingClientRect();
this.point... |
import { computed } from "@ember/object";
import { alias } from "@ember/object/computed";
import { makeArray } from "discourse-common/lib/helpers";
import ComboBoxComponent from "select-kit/components/combo-box";
import DiscourseURL from "discourse/lib/url";
import TagsMixin from "select-kit/mixins/tags";
import { defa... |
//
// Copyright (c) 2018 by SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with th... |
import CollisionTypes from "./collision-types.js";
import Relationships from "./relationships.js";
const DEFAULT_TYPE = CollisionTypes.Default;
const PROJECTILE_TYPE = CollisionTypes.Projectile;
const CACHE_POSITION_LENGTH = 4;
const WARN_FLOATING_TILE_SIZE = (baseTileSize,resolutionScale) => {
console.warn(`Tile... |
var http = require("http");
var readline = require("readline");
var files = [{
type: "magnetic_fields",
endpoint: "http://services.swpc.noaa.gov/products/solar-wind/mag-5-minute.json",
json: true,
headers: ["bx", "by", "bz", "lon", "lat", "bt"],
cache: []
}, {
type: "wind_plasma",
endpoint:... |
/**
* 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 required by appli... |
import JFlowEvent from '../events';
import { DIRECTION } from '../utils/constance';
import { makeAST } from './low-code-types/baseNode';
function sqr(x) {
return x * x;
}
function dist2(v, w) {
return sqr(v[0] - w[0]) + sqr(v[1] - w[1]);
}
/**
* @typedef {Object} LowcodeLayout~Configs
* @property {number} ... |
import React, { PureComponent } from 'react'
import { Menu, Icon, Button, Switch } from 'antd'
import { Layout } from 'antd'
import { Utils, Components } from 'react-dom-chunky'
import { Fab } from '@rmwc/fab'
const SubMenu = Menu.SubMenu
export default class Section extends PureComponent {
constructor(props) {
... |
import path from 'path'
import fs from 'fs'
import yargs from 'yargs'
import childProcess from 'child_process'
import { createPACServer } from 'pac-server'
import { createClient, createServerRouter } from './index'
import { MODES } from './modes'
import { logger, changeLogger, logMemory } from './logger'
import { logCo... |
//Based on http://www.html5rocks.com/en/tutorials/webdatabase/todo/
document.addEventListener("deviceready", init, false);
//Activate :active state on device
document.addEventListener("touchstart", function() {}, false);
var app = {};
app.db = null;
var Sync_status = false;
//Create DB
app.openDb = function() {
... |
let fs = require('fs');
let minify = require('html-minifier').minify;
let UglifyJS = require("uglify-js");
let cleanCSS = require('clean-css');
let cssMinify = new cleanCSS();
let babel = require('babel-core');
let es2015 = require('babel-preset-es2015');
// const filePath = process.argv[2];
// const distPath = process... |
/**
* MagresView 2.0
*
* A web interface to visualize and interact with computed NMR data in the Magres
* file format.
*
* Author: <NAME>
*
* Copyright 2022 Science and Technology Facilities Council
* This software is distributed under the terms of the MIT License
* Please refer to the file LICENSE for the te... |
/*
* ==============================================================================
* * GTP: Gamefall Team Plugins - Undertale Save System
* ------------------------------------------------------------------------------
* GTP_UnderSave.js Version 2.0
* =======================================================... |
const express = require("express");
const KholaController = express.Router();
const nodeCron=require('node-cron');
const {CattleVaccinationData,PigsVaccinationData,FeedingData,Khola } = require("../../models");
const { validateToken } = require("../../../middlewares/AuthMiddleware");
const cattleVaccines=require("../..... |
const express = require('express');
const https = require('https');
const fs = require('fs');
const bodyParser = require('body-parser');
const cookieParser = require('cookie-parser'); // optional
//const uuidv1 = require('uuid/v1'); // optional
const session = require('express-session');
const createError = require('ht... |
import testMap from './test-worldmap';
import ScatterPlot from '../../src/vis/circle';
import AreaChart from '../../src/vis/area';
import BarChart from '../../src/vis/bar';
import ColumnChart from '../../src/vis/column';
import SplineLine from '../../src/vis/spline';
import {timeFormat} from 'd3-time-format';
// import... |
/*
* Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
*
* Domain Summary Page
*/
var domainSummaryView = new domainSummaryRenderer();
function domainSummaryRenderer() {
var DomainStatsViewModel = function() {
this.inBytes = ko.observable('-'),
this.outBytes = ko.observable('-')
... |
import React from "react";
import Button from "./Button";
const testimage = require("./1800.jpg");
class reactangle {
constructor(props) {
this.x = props.x
this.y = props.y
this.width = props.width
this.height = props.height
}
getData() {
return [
this.x... |
function isSrc(url) {
return url.indexOf('http') === 0 || url.indexOf('data:image') === 0 || url.indexOf('//') === 0;
}
function _typeof(obj) {
return Object.prototype.toString.call(obj).slice(8, -1).toLowerCase();
}
function isPlainObject(obj) {
return _typeof(obj) === 'object';
}
function isString(obj) {
retur... |
/**
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
// Adopted fr... |
var Sails = require('sails'),
_ = require('underscore'),
async = require('async');
var opts = {
connections: {
postgresql: { softDelete: false }
}
};
Sails.lift(opts, function(err, sails) {
if (err) return console.error(err);
var tagsToRename = {
'Part Time': 'One time',
'Full Time': 'On... |
var datas = {};
var onGame = false;
var quPoints = 1;
var tiCounter = 20;
function execute() {
alert('実行する');
}
function mainClear() {
document.getElementById('content').innerHTML = '<p class="bookTitle">下から図形を選べ</p>';
}
function bookClear() {
$("#content").html(`\
<div class="bookContent">\
<p class="b... |
import React from 'react';
import styled from 'styled-components';
import ArrayValidator from '../../classes/ArrayValidator';
import DateTimeValidator from '../../classes/DateTimeValidator';
import BooleanValidator from '../../classes/BooleanValidator';
import NumberValidator from '../../classes/NumberValidator';
impor... |
console.log('navigator.language', navigator.language);
function uselocale() {
//return 'ru-';
var navlan = navigator.language;
//if (navlan.startsWith("en-")) return 'en-';
if (navlan.startsWith("ru-")) return 'ru-';
if (navlan.startsWith("fr-")) return 'fr-';
if (navlan.startsWith("de-")) return 'de-';
if (nav... |
import { ref, computed, watch, watchEffect, readonly, reactive } from 'vue';
import { WEATHER_URL, API_KEY, TIME, API_KEY_CODING, API_KEY_REVERSE_CODING, CODING_URL, CODING_REVERSE_URL } from '~/config/config.js';
import { useWeatherStore } from '~/stores/weather.js';
// todo работа с pinia store
const store = useWe... |
import React, { useContext, useEffect, useMemo, useState } from 'react';
import { useSelector } from 'react-redux';
import { useTranslation } from 'react-i18next';
import Rating from '@material-ui/lab/Rating';
import { Button, TextField, Tooltip } from '@material-ui/core';
import { useMutation, useQuery } from '@apollo... |
/*
* Copyright 2021 MeshDynamics.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writ... |
const Event = require('../../structures/Event');
const { Permissions, Collection } = require("discord.js");
const discord = require("discord.js");
const config = require('./../../config.json');
const { MessageEmbed } = require('discord.js');
const mongoose = require('mongoose');
const Guild = require('../../datab... |
/*
*
* Funcionalidades auxiliares para manejo de fechas
* Estas funciones son invocadas dede archivos externos
*
*/
//* Dependencies
const moment = require('moment');
//* Cambiar formato de fecha standard a fecha Unix
function unixDate (standardDate){
return parseInt((new Date(standardDate).getTime() / 1000).toFixe... |
/**
*
* 作者:黎伟杰 on 2018/5/2.
* 邮箱:<EMAIL>
* description:上拉刷新+下拉加载的FlatList封装
* update by:
* update day:
*/
import React, { Component } from "react";
import {
View,
FlatList,
StyleSheet,
Text,
ActivityIndicator,
TouchableOpacity,
Image
} from "react-native";
/**
* 列表状态
* @type {{NORMAL: number, R... |
import React from 'react';
import { View, Text, ScrollView, Linking } from 'react-native';
import { useRoute } from '@react-navigation/native';
import BottomButton from '../../components/common/bottom-button';
import moment from 'moment';
import 'moment/locale/tr';
import styles from './style';
import { showMessage } f... |
'use strict';
const fs = require('fs');
const _ = require('lodash');
const del = require('del');
const gulp = require('gulp');
const argv = require('minimist')(process.argv.slice(2));
const webpack = require('webpack');
const browserSync = require('browser-sync');
const htmlcompress = require('gulp-minify-html');
const... |
/**
* Import React libraries and CSS
*/
import React, {
Component
} from 'react';
import axios from 'axios';
import './style.css';
let URL_SCHEMA = require('../../config/urlSchema.json');
import AddTransaction from '../app-add-transaction/addTransaction';
import AddNetworkNode from '../app-add-network-nodes/add... |
const noteData = require("./note_data.js");
class PianoRoll {
static width = 1000;
static octaveHeight = 180;
static notesPerOctave = 12;
static pianoRollPadding = 80;
static transportPadding = 15;
constructor(svgSelector, tonic, steps, extent, d3) {
this.d3 = d3;
this.svg = this.d3.select(svgSe... |
console.defaultLog = console.log.bind(console);
logs = '';
// override default console ===========================================================
console.log = function () {
console.defaultLog.apply(console, arguments);
logs += Array.from(arguments).join(' ') + '\n';
document.getElementById('console-log')... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var CONTROL_KEYS = {
ArrowUp: true,
Up: true,
ArrowDown: true,
Down: true,
Enter: true,
Escape: true,
Esc: true,
Tab: true
};
var Autocomplete = /** @class */ (function () {
function Autocomplete(element, op... |
const express = require('express');
const router = express.Router();
const data = require('../data');
const listingData = data.listings;
const userData = data.users;
const bcrypt = require('bcryptjs');
const xss = require('xss');
router.get('/', async (req,res)=>{
if(!req.session.user){
res.rende... |
/*
Author : <NAME>
Student ID: 8735314
*/
const Order = require("./Order");
const OrderState = Object.freeze({
WELCOMING: Symbol("welcoming"),
SIZE: Symbol("size"),
TOPPINGS: Symbol("toppings"),
SAUCE: Symbol("sauce"),
SALAD: Symbol("salad"),
QUANTITY: Symbol("quantity"),
PAYMENT: Symb... |
// Renders homepage
function initialProductsPage() {
var ajax = new XMLHttpRequest();
ajax.open('GET', 'api/products');
ajax.send();
ajax.onreadystatechange = function() {
if(ajax.readyState == 4 && ajax.status == 200) {
var products = JSON.parse(ajax.responseText);
var productContainer = "<div class='cont... |
import publishRandomNumber from './publishRandomNumber.js'
import uint8ArrayToString from 'uint8arrays/to-string.js'
import determineWinner from './determineWinner.js'
import writeWinnerToLog from './writeWinnerToLog.js'
import { createRequire } from "module"; // Bring in the ability to create the 'require' method
cons... |
// get root dir from html attribute
var rd = $('html').data('root-dir');
// change editor display to inline-block on editing
// $('.dcp-editor').on('keyup', function(event) {
// if ($(this).html() != "") {
// $(this).css('display', 'inline-block');
// } else {
// $(this).css('display', 'block');
// }
// });
//... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... |
import React, { useEffect, useState } from "react";
import { useSelector, useDispatch } from "react-redux";
import { Loader, Message } from "src/containers/utils/index";
import { Button, IconButton, Tooltip } from "@material-ui/core";
import Person from "@material-ui/icons/Person";
import TextField from "@material-ui/c... |
/***
* react-native-scroll-tab
* author smallapes
*/
import React , { Component } from 'react'
import PropTypes from 'prop-types'
import {
View,
ScrollView,
Dimensions,
Platform,
ViewPropTypes,
Animated,
} from 'react-native'
import styles from './style'
import DefaultTabBarComponent from './... |
var colorbrewer = require('colorbrewer');
var d3 = require('d3');
var exts = require('./d3Extensions.js')
require('string.prototype.startswith');
var HeatMap = function (parent) {
this.parent = parent;
this.data = parent.data;
this.opt = parent.opt;
}
HeatMap.prototype.calculateBarWidth = function(){
var av... |
import { DataTable } from 'primereact/datatable';
import { Column } from 'primereact/column';
import { InputText } from 'primereact/inputtext';
import { Growl } from 'primereact/growl';
import { Button } from 'primereact/button';
import Layout from '../components/Layout';
export class UserService {
getAllUsers(... |
/**
*
* Web Starter Kit
* Copyright 2014 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*... |
const { expect } = require("chai")
const { ethers, deployments } = require("hardhat")
const { exampleRequest, exampleOffer } = require("./examples")
const { advanceTime, advanceTimeTo, currentTime } = require("./evm")
const { requestId, offerId } = require("./ids")
const { periodic } = require("./time")
describe("Stor... |
var express = require('express');
var router = express.Router();
var sqlite3 = require('sqlite3');
var db = new sqlite3.Database('baza.db');
router.get('/', function(req, res, next) {
var str, nizz, strtip, nizztip, strsvitip, nizzsvitip, strtoptip, nizztoptip;
db.serialize(function()
{
db.all("SELECT * F... |
function getLanguage() {
var language = getParameterValue("locale", window.location.toString());
var suppportedLanguages = getSupportedLanguages();
language = findSupportedLanguage(language, suppportedLanguages);
return language;
}
// Name: loadJSFiles
// Description:
// loadJSFil... |
var express = require('express');
var morgan = require('morgan');
var uuid = require("uuid");
/**
* AutoUri: A class for automatedly provisioning URIs and executing callbacks
* when those URIs are requested.
*
* @param {String} hostname: The protocol and hostname of the server running this app, e.g. https://server... |
// 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 required by applicable... |
const { arrayIncludes } = require("@material-ui/pickers/_helpers/utils");
const Edu = require("../Models/Education");
const { editUserInformation } = require("./profileController");
// University
const postEdu = async (req, res) => {
try {
if (["University", "Highschool"].includes(req.body.edu_type)) {
cons... |
const fs = require('fs');
const sbxRpc = require('@pascalcoin-sbx/json-rpc');
const sbxCommon = require('@pascalcoin-sbx/common');
const prompt = require('prompt');
prompt.start();
function slugify(text) {
return text.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(/[^\w\-]... |
const { partTwoInput } = require('./input');
const offset = parseInt(partTwoInput.slice(0, 7).join(''), 10);
const slice_to_iterate = partTwoInput.slice(offset);
for (let j = 0; j < 100; j++) {
// We don't need to do anything with the last number so start at 2nd the last
for (let i = slice_to_iterate.length - 2; i >... |
"use strict";
var gulp = require("gulp"),
header = require("gulp-header"),
contentFilter = require("gulp-content-filter"),
purescript = require("gulp-purescript"),
webpack = require("webpack-stream"),
rimraf = require("rimraf"),
fs = require("fs"),
trimlines = require("gulp-trimlines"),
... |
import React from 'react'
import Api from '../api.json'
import SweetAlert from 'react-bootstrap-sweetalert';
import DataTable from 'react-data-table-component';
const columns = clickHandler => [
{
name: 'Editar',
cell:(row) => <img alt="cover" width="10%" src={Api.url+row.img_url} />,
igno... |
/* eslint-disable react-native/no-inline-styles */
import React from 'react';
import {
StyleSheet,
BackHandler,
Alert,
ToastAndroid,
Text,
Image,
View,
} from 'react-native';
import { useNavigation } from '@react-navigation/native';
import { Appbar } from 'react-native-paper';
import AsyncStorage from '@r... |
import { ViewPlugin, PluginField, EditorView } from '@codemirror/view';
import { Facet } from '@codemirror/state';
const panelConfig = /*@__PURE__*/Facet.define({
combine(configs) {
let topContainer, bottomContainer;
for (let c of configs) {
topContainer = topContainer || c.topContainer... |
"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];
})... |
// Pulling in the necessary classes, packages, and dependencies
const Manager = require("./lib/Manager");
const Engineer = require("./lib/Engineer");
const Intern = require("./lib/Intern");
const inquirer = require("inquirer");
const path = require("path");
const fs = require("fs");
// Building the output file directo... |
// Copyright (c) 2021, Agile Shift and contributors
// For license information, please see license.txt
function calculate_invoice_total_and_words(frm) {
// Set new 'total' and 'in_words' fields. // TODO: Delete the if (frm.doc.total) ?
frm.doc.total = frm.get_sum('items', 'amount'); // Using built-in function:... |
import tinycolor from "tinycolor2";
const primary = "#536DFE";
const secondary = "#FF5C93";
const warning = "#FFC260";
const success = "#3CD4A0";
const info = "#9013FE";
const lightenRate = 7.5;
const darkenRate = 15;
export default {
palette: {
primary: {
main: primary,
light: tinycolor(primary)
... |
import Cookie from 'js-cookie';
import { get } from 'lodash';
import { createAction } from 'redux-actions';
import { createAsyncActionType } from '../../common/helpers/stateHelpers';
import { addNewNotification, getCurrentCurrencyRate } from '../appStore/appActions';
import { getFollowing } from '../userStore/userActio... |
/**
* This is intended to be a test helper for jest to run lambda functions
* as a full http server.
*/
const e2p = require('event-to-promise');
const http = require('http');
const util = require('util');
const { findServerless, findServerlessPath } = require('./findServerless');
const path = require('path');
const ... |
import { useRouter } from 'next/router';
import React, { useState, useEffect } from 'react';
import ApiClient, { initialPropsHelper } from '../../ApiClient.js';
import XButton from '../../components/XButton';
import '../../style.css';
import XInput from '../../components/XInput';
import PhotoUpload from '../../componen... |
import { Formik } from "formik";
import { Container, Paper, TextField, Button} from '@material-ui/core';
import Grid from '@material-ui/core/Grid';
import { firestore } from "../../../firebase";
import * as Yup from "yup";
import { useState, useEffect } from "react";
import AdminNav from '../AdminNavbar/AdminNav';
... |
// * SVG namespaces
let _SVG_NS = "http://www.w3.org/2000/svg";
let DIV = document.getElementById("svg-experiment");
let SVG = document.createElementNS(_SVG_NS, "svg");
let DEFS = document.createElementNS(_SVG_NS, "defs");
DIV.appendChild(SVG);
// ! Global variables
let filterURL, filterID, SELECTED;
let WIDTH = win... |
axios.get(`/getLevels/${localStorage.id}`).then((response) => {
localStorage.levels = JSON.stringify(response.data.userArray.levels);
if (JSON.parse(localStorage.levels)[4]) {
document.querySelector('.completed').style.display = 'inline';
}
});
let button = document.querySelector('#submitCode');
let inp = documen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.