text stringlengths 2 1.04M |
|---|
var Pacientes = require('../../src/Pacientes.js');
var Sus = require('../../src/convenios/Sus');
describe('Pacientes', function () {
var paciente;
beforeEach(function () {
paciente = new Pacientes({
nome: 'João',
idade: 12,
peso: 55,
altura:1.70
})
});
describe('Testes Básicos... |
const knex = require('../connection')
const { getDifficulty } = require('./difficulty.dao')
/*
console.log(msg.author)
User {
id: 'xxxxxxxxxxxxxxxxxxxxxx',
username: 'User Name',
bot: false,
discriminator: 'XYZW',
avatar: 'ghasd76fgsa79d6gas67fdg685as', //HEX?
lastMessageID: 'xxxxxxxxxxxxxxxxxxxxxxx',
la... |
'use strict';
module.exports = {
connections: {
type: 'embedded_object',
embed: {
url: {
type: 'string',
required: true
},
options: {
type: 'object',
default: {}
},
collection... |
const getFileMenu = [
{
icon: 'photo',
title: 'Images',
to: { path: '/media', query: { type: 'image' }}
},
{
icon: 'videocam',
title: 'Video',
to: { path: '/media', query: { type: 'video' }}
},
{
icon: 'volume_down',
title: 'Audio',
to: { path: '/media', query: { type: '... |
import { dispatch as d3_dispatch } from 'd3-dispatch';
import {
select as d3_select,
event as d3_event
} from 'd3-selection';
import { utilRebind } from '../../util/rebind';
import { t } from '../../util/locale';
import { actionReverse } from '../../actions';
import { osmOneWayTags } from '../../osm';
import ... |
const { test } = require('tap')
const render = require('../lib')
test('properties', assert => {
assert.plan(1)
const color = false
const native = false
const source = false
const error = new Error('foo')
error.foo = 'baz'
const found = render(error, { native, source, color })
assert.match(found, /... |
class Bird extends Shape{
constructor(x, y) {
super(x, y, 20, 10);
this.angle = 0;
this.flapStrength = 15;
this.gravity = 0.9;
this.velocity = 0; //only one dimensional velocity (y axis)
}
flap(){
this.velocity += -this.flapStrength;
}
update() {
this.velocity += this.gra... |
import React from 'react'
import './styles.css'
const Feature = ({ left, top, open, title, description }) => (
<div className={`Feature ${open ? ` open` : ``}`} style={{ left, top }}>
<div className="Feature-thumb">+</div>
<div className="Feature-content">
<h2 className="Feature-title">{title}</h2>
... |
/*
--- Day 4: The Ideal Stocking Stuffer ---
Santa needs help mining some AdventCoins (very similar to bitcoins) to use as gifts for all the economically forward-thinking little girls and boys.
To do this, he needs to find MD5 hashes which, in hexadecimal, start with at least five zeroes. The input to the MD5 hash is... |
import React from "react";
const TasksFilter = props => {
return (
<form
className="text-right"
onSubmit={props.handleConfirm}
id="tasksFilter"
>
<div className="form-group row">
<label htmlFor="inputProjectName" className="col-sm-4 col-form-label">
Project Name
... |
"use strict";
var helpers = require("../../helpers/helpers");
exports["Pacific/Kwajalein"] = {
"guess:by:offset" : helpers.makeTestGuess("Pacific/Kwajalein", { offset: true, expect: "Asia/Kamchatka" }),
"guess:by:abbr" : helpers.makeTestGuess("Pacific/Kwajalein", { abbr: true, expect: "Asia/Kamchatka" }),
"1936... |
/*eslint no-unused-vars: "off"*/
'use strict';
/**
* Solution 1.
* Recursively seeks the key, slices arrays and requires an offset to remain true.
*/
const chopWorker = (key, array, offset) => {
if (array.length === 0) {
return -1;
}
if (array.length === 1 && array[0] !== key) {
return -... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 Numenta, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use... |
import { kebabCase } from 'custom-e-ui/src/utils/util';
/**
* Show migrating guide in browser console.
*
* Usage:
* import Migrating from 'custom-e-ui/src/mixins/migrating';
*
* mixins: [Migrating]
*
* add getMigratingConfig method for your component.
* getMigratingConfig() {
* return {
* props: {
... |
/**
* Copyright IBM Corp. 2016, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
var iconPropTypes = require('./iconPropTypes-b9203099.js');
va... |
/**
* Copyright 2019 The AMP HTML Authors. 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 require... |
app.factory('dataFactory',function($http){
var myService= {
httpRequest:function (url,method,params,dataPost,upload){
var passParameters={};
passParameters.url=url;
passParameters.headers={'Content-Type': "application/json"};
passParameters.headers={"X-Requested-With":"XMLHttpRequest"};
if (typeof me... |
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... |
const _ = require("lodash");
function permutations(array) {
if (array.length === 1) return array;
let poss = [];
for (let i = 0; i < array.length; i++) {
let value = array[i];
let otherValues = array.slice(0);
otherValues.splice(i, 1);
let possibilities = permutations(ot... |
Package.describe({
name: 'percolate:google-api',
summary: "A Meteor library to interact with Google's API",
version: '1.1.0',
git: 'https://github.com/percolatestudio/meteor-google-api'
});
Package.onUse(function (api, where) {
if (api.versionsFrom) {
api.versionsFrom(['1.0', '2.3']);
api.use(['http'... |
const Discord = require('discord.js')
const settings = require('../Ayarlar/Ayarlar.json')
const kanallar = require('../Ayarlar/Kanallar.json')
const ayarlar = require('../Ayarlar/Yetkiler.json')
const cevaplar = require('../Ayarlar/Cevaplar.json')
exports.run = (client, message, args) => {
if(![ayarlar.Staff... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/builtin/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _createSvgIcon = _interopRequireDefault(require("./utils/c... |
//# sourceMappingURL=applications.c59e090d.js.map |
const config = {
// basename: only at build time to set, and don't add '/' at end off BASENAME for breadcrumbs, also don't put only '/' use blank('') instead,
// like '/berry-material-react/react/default'
basename: '',
defaultPath: '/dashboard/default',
fontFamily: `'Roboto', sans-serif`,
borderRadius: 12
}... |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App/App';
import {BrowserRouter} from 'react-router-dom'
import { EventListProvider } from './context/EventListContext'
import {EventProvider} from './context/EventContext'
import {LoginLogoutContextProvider} from './context/Logi... |
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const React = require('react');
const CompLibrary = require('../../core/CompLibrary.js');
const MarkdownBlock = CompLibrary.MarkdownBl... |
'use strict';
angular.module('searches').config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/', {
templateUrl: '/searches/views/home.client.view.html',
controller: 'SearchController'
}).
when('/search', {
templateUrl: '/searches/views/search.client.view.html',
controller: '... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.9/esri/copyright.txt for details.
//>>built
define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/Evented ../../../core/accessorSupport/deco... |
/**
* Simple functions to communicate with Rapid 2FA API.
*
* @author Areeb Majeed
* @copyright 2017 Rapid 2FA
* @license https://opensource.org/licenses/MIT MIT License
*
* @link https://rapid2fa.com/
*/
var Rapid2FA = require('./rapid2fa.js');
module.exports = Rapid2FA; |
import polylabel from '@mapbox/polylabel';
import proj4 from 'proj4';
import { proj4crs25832def } from '../constants/gis';
export function getPolygonfromBBox(bbox) {
return (
'POLYGON((' +
bbox.left +
' ' +
bbox.top +
',' +
bbox.right +
' ' +
bbox.top +
',' +
bbox.right +
' ' +
bbox.bottom +
... |
({"removeFormat":"Înlăturare format","copy":"Copiere","paste":"Lipire","selectAll":"Selectare toate","insertOrderedList":"Listă numerotată","insertTable":"Inserare/Editare tabelă","print":"Tipărire","underline":"Subliniere","foreColor":"Culoare prim plan","htmlToggle":"Sursă HTML","formatBlock":"Stil paragraf","newPage... |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
/*jshint unused:true, eqnull:true, curly:true, bitwise:true */
/*jshint undef:true, latedef:true, trailing:true */
/*global CodeMirror:true */
// erlang mode.
// tokenizer -> token types -> C... |
//http://devthought.com/blog/client-side/2009/04/javascript-regexp-based-highlighting-function-for-mootools-and-jquery/
jQuery.fn.extend({
highlight: function(search, insensitive, klass){
var regex = new RegExp('(<[^>]*>)|(\\b'+ search.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1") +')', insensitive ? 'ig' : 'g');
re... |
// Copyright 2012 Google Inc. All rights reserved.
// Container Version: 96
(function(w,g){w[g]=w[g]||{};w[g].e=function(s){return eval(s);};})(window,'google_tag_manager');(function(){
var __awct;(function(){var a=!1,b=[],d=function(a){var b=p("google_trackConversion"),c=a.gtm_onFailure;"function"==typeof b?b(a)||c(... |
import React, { Fragment } from "react";
const About = () => {
return (
<Fragment>
<h1>About Queeery</h1>
<p>Queer event, meetup, venue finder</p>
<p>Version 0.1.1</p>
</Fragment>
);
};
export default About; |
import * as ACTION_TYPE from '../constants/ActionTypes';
export function setLoginCredentials(object) {
return { type: ACTION_TYPE.UPDATE_LOGIN_CREDENTIALS, object };
}
export function setIsLoggedStatus(value) {
return { type: ACTION_TYPE.UPDATE_LOGIN_STATUS, value };
} |
define("ace/snippets/nim",["require","exports","module"], function(require, exports, module) {
"use strict";
exports.snippetText =undefined;
exports.scope = "nim";
}); (function() {
window.require(["ace/snippets/nim"], function(m) {
if (typeof module == "obje... |
/*!
* Start Bootstrap - SB Admin 2 v3.3.7+1 (http://startbootstrap.com/template-overviews/sb-admin-2)
* Copyright 2013-2016 Start Bootstrap
* Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE)
*/
$(function() {
$('#side-menu').metisMenu();
});
//Loads the correct side... |
// /*eslint-env node, mocha */
// /*global expect */
// /*eslint no-console: 0*/
// 'use strict';
// // Uncomment the following lines to use the react test utilities
// // import React from 'react/addons';
// // const TestUtils = React.addons.TestUtils;
// import createComponent from 'helpers/shallowRenderHelper';
//... |
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable */
!(function(global) {
"use strict";
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var undefined... |
/**
*
* Tests for QueryModal
*
* @see https://github.com/react-boilerplate/react-boilerplate/tree/master/docs/testing
*
*/
import React from 'react';
import { render } from 'react-testing-library';
// import 'jest-dom/extend-expect'; // add some helpful assertions
import QueryModal from '../index';
describe('<... |
import axios from "axios";
export const axiosWithAuth = () => {
const token = window.localStorage.getItem("token");
return axios.create({
headers: {
authorization: token,
},
baseURL: "https://fitnesssmaster.herokuapp.com",
});
}; |
var dir_09c654bbd753bf05984e95de00625755 =
[
[ "exos", "dir_04ac16e32990e7b0365b3b7d643d7e2a.html", "dir_04ac16e32990e7b0365b3b7d643d7e2a" ],
[ "FreeRTOS", "dir_76f8db89a3e7bf177d9ae3aeb9b0a3ba.html", "dir_76f8db89a3e7bf177d9ae3aeb9b0a3ba" ],
[ "mqx", "dir_7944cfc02ed5cb6d1bf914c22b431ac5.html", "dir_7944cf... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const cli_framework_1 = require("@ionic/cli-framework");
const lodash = require("lodash");
const guards_1 = require("../guards");
const color_1 = require("./color");
const config_1 = require("./config");
const errors_1 = require("./errors");
e... |
import React from "react";
import PropTypes from "prop-types";
import { withStyles } from "@material-ui/core/styles";
import { Typography } from "@material-ui/core";
import Grid from "@material-ui/core/Grid";
import classnames from "classnames";
import Settings from "../../../config/settings";
import {
callToActionBac... |
// Magic Wand (Fuzzy Selection Tool) for Javascript
//
// The MIT License (MIT)
//
// Copyright (c) 2014, Ryasnoy Paul (ryasnoypaul@gmail.com)
//
// 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 Sof... |
import { MdPerson as icon } from 'react-icons/md';
export default {
name: 'author',
title: 'Author',
type: 'document',
icon,
fields: [
{
name: 'name',
title: 'Name',
type: 'string',
},
{
name: 'slug',
title: 'Slug',
type: 'slug',
options: {
source... |
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import * as ProtocolModule from './protocol.js';
self.Protocol = self.Protocol || {};
Protocol = Protocol || {};
Protocol.DevToolsStubErrorCode = Protoc... |
/**
* Child of Block. The DoubleLoopBlock is for Blocks like CommandBlock but with a space for additional Blocks
* @constructor
* @param {number} x - The x coord for the Block.
* @param {number} y - The y coord for the Block.
* @param {string} category - The Block's category in string form. Used mainly to color it... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2016-2017 Dan "Ducky" Little
*
* 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... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_reduce_capacity_outline = void 0;
var ic_reduce_capacity_outline = {
"viewBox": "0 0 24 24",
"children": [{
"name": "rect",
"attribs": {
"fill": "none",
"height": "24",
"width": "24"
},
"chil... |
import React from "react";
import { View, Text, StyleSheet, ActivityIndicator } from "react-native";
import * as firebase from "firebase";
export default class LoadingScreen extends React.Component {
componentDidMount() {
firebase.auth().onAuthStateChanged(user => {
this.props.navigation.navig... |
import {StyleSheet} from 'react-native';
import {colors, metrics, general} from '../../styles';
const styles = StyleSheet.create({
container: {
height: 55,
width: metrics.containerBase / 1.1,
flexDirection: 'row',
backgroundColor: colors.colorBackground,
alignItems: 'center',
justifyContent:... |
/**
* scope.js
* Defines an array of rsIds for the oAuth authentication with
* 23andMe
*/
var COMT = [
// COMT
"rs737866",
"rs737865",
"rs737864",
"rs9332316",
"rs1544325",
"rs174675",
"rs5993882",
"rs5993883",
"rs7290221",
"rs4646312",
"rs35919169",
"rs5748492",
"rs34686565",
"rs165656"... |
"use strict";
/**
* Create HTML output for cross validate unit mapping and dimension mapping
* using the dimensionUnit association
*
* output:
* - "check - dimension per unit after mapping" ... list of instances, where a unit SynSet is associated with more than one dimension SynSet
*/
// includes
var Q ... |
import * as pureimage from "../src/index.js"
import chai, {expect} from "chai"
import fs from 'fs'
import path from 'path'
import {mkdir, write_png} from './common.js'
describe("simple transforms",() => {
let image
let context
beforeEach(() => {
image = pureimage.make(20,20)
context = ima... |
'use strict';
export default function (context, options = {}) {
const words = options.words || [];
const { Syntax, getSource, report, RuleError } = context;
return {
[Syntax.Str](node) {
const text = getSource(node);
words.forEach(word => {
let fromIndex = -1;
let violationIndex =... |
const images = {
compass: require('./Compass.png'),
};
export default images; |
var hours = [
'6am',
'7am',
'8am',
'9am',
'10am',
'11am',
'12pm',
'1pm',
'2pm',
'3pm',
'4pm',
'5pm',
'6pm',
'7pm'
];
function Store(locationName, minCustPerHour, maxCustPerHour, avgCookiePerSale) {
(this.locationName = locationName),
(this.minCustPerHour = minCustPerHour),
(this.maxCu... |
var key_labels = {
'sub_only': 'Only <strong>subscribers</strong> can use this command.',
'can_execute_with_whisper': 'Can be executed by whispering <strong>' + bot_name + '</strong>',
}
function handle_command(base_key, command)
{
$.each(command, function(key, value) {
switch (key) {
c... |
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
/* SHA-256 implementation in JavaScript | (c) Chris Veness 2002-2010 | www.movable-type.co.uk */
/* - see http://csrc.nist.gov/groups/ST/toolkit/secure_hashing.html */
/* http:/... |
import { useEffect, useState } from "react";
import { useParams } from "react-router-dom";
import jsonApi from '../../../API/jsonApi'
export default function BlogsDetail() {
const { slug } = useParams()
const [blogsObj, setBlogsObj] = useState(null)
useEffect(() => {
(async () => {
const response = await js... |
// ----------- ckeditor config ----
// see: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/vuejs-v2.html#configuring-vueconfigjs
const path = require('path');
const CKEditorWebpackPlugin = require('@ckeditor/ckeditor5-dev-webpack-plugin');
const { styles } = require('@ckeditor/ckeditor5... |
import "./windowMatchMedia.mock";
import { create, OptionTypes, FileStatus } from '../index.js';
describe('adding files', () => {
const data = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==';
let pond = null;
const createPond = (options) => {
if (pond) {
pond.destroy();
}
... |
const KEY = { context_key: 'sveltex' }
export const createServiceFactory = ({
svelte: { setContext, getContext },
}) => {
let lastId = 0
const nextId = () => ++lastId
const service = (opts, provider) => {
// service({ name: string }, provider)
// service(name: string, provider: function)
if (type... |
var douban = require('../../comm/script/fetch')
var config = require('../../comm/script/config')
Page({
data: {
films: [],
hasMore: true,
showLoading: true,
start: 0
},
onLoad: function() {
var that = this
douban.fetchFilms.call(that, config.apiList.coming, that.data.start)
},
onPullDownRefresh: functi... |
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.undefined = mod.exports;
}
})(this, function... |
//! moment.js locale configuration
;(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined'
&& typeof require === 'function' ? factory(require('/alloy/moment')) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(th... |
/**
* [mocks]
* @param {[type]} app [description]
* @return {[type]} [description]
*/
module.exports = function(app) {
app.get("rest", function(req, content, callback) {
setTimeout(function() {
callback(null, {
a: 1,
b: 2
});
}, 500)
... |
/** @jsx jsx */
import { jsx } from "@emotion/core";
import { useEffect, useState, forwardRef } from "react";
import Box from "../Box";
export const useHasImageLoaded = ({ src, onLoad, onError }) => {
const [hasLoaded, setHasLoaded] = useState(false);
useEffect(() => {
const image = new window.Image();
im... |
const Page = require('./Page');
const Base = require('./Base.js');
const footerSelector = '#page-footer';
const confirmMessage = "#content p";
class LogInPage extends Base{
getPageText(){
browser.pause(10000);
return Page.getElementText("body");
}
getMessageText(){
return Page.getE... |
'use strict';
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
const React = require('react');
const PropTypes = require('prop-types');
const {
Box
} = r... |
const nav = require('./utils/nav').default
const sidebar = require('./utils/sidebar').default
const i18n = {
path: '/zh/',
guide: '教程',
changelog: '更新日志',
essentials: '基础',
custom: '个性化',
advanced: '进阶',
meta: '更多'
}
// 站点配置
exports.default = {
lang: 'zh-CN',
title: 'Vue Router Tab',
description: ... |
const express = require('express');
const checkAuth = require('../middlewares/check-auth');
const ProductsController = require('../controllers/products');
const router = express.Router();
// Get all products
router.get('/', ProductsController.get_all_products);
// Search products
router.get('/search', ProductsContro... |
import React from 'react';
import img1 from "./../../images/profilePhoto.png";
import "./../../styles/style.css";
export default function Home() {
return (
<div id="bio">
<img id="photo" src={img1} alt="profilePhoto" />
<div className="summary">
<h2>Bio</h2>
<p>Full stack developer... |
YUI.add('jsonp', function(Y) {
var isFunction = Y.Lang.isFunction;
/**
* <p>Provides a JSONPRequest class for repeated JSONP calls, and a convenience
* method Y.jsonp(url, callback) to instantiate and send a JSONP request.</p>
*
* <p>Both the constructor as well as the convenience function take two
* parameters:... |
/**
* Copyright (c) 2013-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.
*
* @provides... |
module.exports = [
{
title: "Top 5 asistentes mas frecuentes",
value: [
"Santiago Sanchez Zuleta",
"Danny Francisco Hernández Godoy",
"Cristian Camilo Mendoza",
"Juan José Márquez Villacís",
"Joan Sebastian Gómez Acevedo",
],
},
{
title: "Top 3 Nivel estudiantes",
... |
import { StoridgeInfoModel } from '../models/info';
import { StoridgeEventModel } from '../models/events';
angular.module('portainer.integrations.storidge').factory('StoridgeClusterService', [
'$q',
'Storidge',
function StoridgeClusterServiceFactory($q, Storidge) {
'use strict';
var service = {};
se... |
var axios = require("axios");
var createInstance = (baseURL, headers) =>
axios.create({
baseURL,
headers
});
module.exports = createInstance; |
define([], function () {
'use strict';
class Rule {
constructor(component, settings, config) {
this.component = component;
this.settings = settings;
this.config = config;
}
check() {
}
};
return Rule;
}); |
'use strict';
import test from 'ava';
import {parse} from './_helpers.js';
import {buildResponse} from './_helpers.js';
import crypto from 'crypto';
const validation = {
username: 'garloth', password: 'swingsword',
realm: 'dungeon'
};
// Client has not provided authorization field in request headers
te... |
// app.js
var http = require('http');
var fs = require('fs');
var server = http.createServer(function(request, response) {
fs.readFile(__dirname + '/estados-cidades.json', function(err, arquivo) {
var headers = {};
headers["Access-Control-Allow-Origin"] = "*";
headers["Access-Control-Allow-Method... |
/**
* @jest-environment node
*/
import { run, runIf, apply } from '..';
function pause() {
return new Promise(resolve => void setTimeout(resolve, 10));
}
function resolveShortly(value) {
return pause().then(Promise.resolve.bind(Promise, value));
}
test('explicit-this', () => {
expect.assertions(12);
// run[If... |
var data = [],
totalPoints = 110;
var updateInterval = 320;
var realtime = 'on';
$(function () {
//Real time ==========================================================================================
var plot = $.plot('#real_time_chart', [getRandomData()], {
series: {
shadowSize: 0,
... |
const express = require('express');
const router = express.Router();
const gravatar = require('gravatar');
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const passport = require('passport');
// Load input validation
const validateRegisterInput = require('../validation/register');
const valid... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("specialchar", "ca", {
euro: "Símbol d'euro",
lsquo: "Signe de cometa simple esquerra",
rsquo: "Signe de cometa simple dreta",
ldquo... |
exports.E_BROWSE_DIRECTORY = "browseDirectory";
exports.E_DIRECTORY_SELECTED = "directorySelected";
exports.E_BROWSE_FILE = "openSuite";
exports.E_FILE_SELECTED = "suiteFile";
exports.E_RUN_TESTS = "runTests";
exports.E_TEST_REPORTED = "testReported";
exports.E_PROJECT_LOADED = "projectLoaded";
exports.E_SUITE_LOADED =... |
// Chosen, a Select Box Enhancer for jQuery and Protoype
// by Patrick Filler for Harvest, http://getharvest.com
//
// Version 0.9.12
// Full source at https://github.com/harvesthq/chosen
// Copyright (c) 2011 Harvest http://getharvest.com
// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
// T... |
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*-------------------------------------------------... |
import { __assign } from "tslib";
import * as React from 'react';
import { StyledIconBase } from '@styled-icons/styled-icon';
export var LocalFlorist = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentColor",
"xmlns": "http://www.w3.org/2000/svg",
};
return (React.creat... |
"use strict";
const codes = {
0x00: "STOP",
0x01: "ADD",
0x02: "MUL",
0x03: "SUB",
0x04: "DIV",
0x05: "SDIV",
0x06: "MOD",
0x07: "SMOD",
0x08: "ADDMOD",
0x09: "MULMOD",
0x0a: "EXP",
0x0b: "SIGNEXTEND",
// 0x10 range - bit ops
0x10: "LT",
0x11: "GT",
0x12: ... |
(function () {
var div = document.getElementById("d01");
var p1 = document.createElement("p");
p1.appendChild(document.createTextNode("I am normal"));
div.appendChild(p1);
var p2 = document.createElement("p");
p2.appendChild(document.createTextNode("I am blue"));
p2.style.color = "blue";
... |
import React from 'react'
import { LineChart, Line, YAxis} from 'recharts';
const getGraphDataWindow = (data, playedPercent) => {
const windowLength = 600 // this is # of intervals
const syncStartTime = .21
const start = (playedPercent - syncStartTime) * data.length
const end = start + windowLength
return da... |
// Zepto.js
// (c) 2010-2012 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
// The following code is heavily inspired by jQuery's $.fn.data()
;(function($) {
var data = {}, dataAttr = $.fn.data, camelize = $.zepto.camelize,
exp = $.expando = 'Zepto' + (+new Date())
// G... |
'use strict';
require("dotenv").config();
const express = require("express");
const messageModel = require("./models/messageModel");
const expressLayouts = require("express-ejs-layouts");
const flash = require("connect-flash");
const session = require("express-session");
const passport = require("passport");
const sock... |
function mudaFoto (foto) {
document.getElementById("icone").src = foto;
} |
const path = require('path');
const root = path.resolve(__dirname, '..');
const scripts = path.resolve(root, 'app/scripts');
const styles = path.resolve(root, 'app/css');
const dist = path.resolve(root, 'dist');
module.exports = {
entry: path.resolve(scripts, 'index.jsx'),
output: {
path: dist,
filename: ... |
define(['react', 'lodash', 'jquery', './libs/codemirror-4.8/lib/codemirror'], function (React, _, $, CodeMirror) {
'use strict'
function annotationTooltip(ann) {
var severity = ann.severity
if (!severity) {
severity = 'error'
}
var tip = document.createElement('div')... |
export default function Checkbox (h, { props, styles }) {
return (
<input className={styles.toggle} type='checkbox' {...props} />
);
}
Checkbox.styles = css => css`
.toggle {
text-align: center;
width: 40px;
height: auto;
position: absolute;
top: 5px;
margin: auto 0;
border: none;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.