text stringlengths 3 1.05M |
|---|
'use strict'
const test = require('tape')
const Metalsmith = require('metalsmith')
const render = require('../src/plugin')
const assert = require('./libassert')
const path = require('path')
const fs = require('fs-extra')
test('config: should have default config', (t) => {
var src = 'test/fixtures/config-defaults'
... |
#!/usr/bin/env python3
#
# Copyright (C) 2019-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# This file is based in part on deepspeech_openvino_0.5.py by Feng Yen-Chang at
# https://github.com/opencv/open_model_zoo/pull/419, commit 529805d011d9b405f142b2b40f4d202bd403a4f1 on Sep 19, 2019.
#
import time... |
// returns an array of two Vector3Ds (minimum coordinates and maximum coordinates)
export const measureBoundingBox = (surface) => {
if (surface.measureBoundingBox === undefined) {
const max = [-Infinity, -Infinity, 0];
const min = [Infinity, Infinity, 0];
for (const polygon of surface) {
for (const ... |
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
isAuthenticated: null,
}
}
componentDidMount(){
authAPI().then(data => {
this.setState(data);
});
}
render() {
return (
<div className="container">
<Men... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import setuptools
with open('README.md', 'r') as fin:
long_description = fin.read()
with open('LICENSE', 'r') as fin:
license = fin.read()
setuptools.setup(
name='cs-sync',
version='0.1.2',
license='MIT',
author='Kyle L. Davis',
author_email=... |
var resolve = require("path").resolve
var createReadStream = require("graceful-fs").createReadStream
var readFileSync = require("graceful-fs").readFileSync
var tap = require("tap")
var cat = require("concat-stream")
var server = require("./lib/server.js")
var common = require("./lib/common.js")
var tgz = resolve(__d... |
/***********************************************************
* Create framework
***********************************************************/
(function ($, doc, win, Snap) {
"use strict";
function Donut(el, opts) {
this.$el = $(el);
this.opts = opts;
this.snap = Snap(el);
this... |
webpackHotUpdate("app",{
/***/ "./src/helpers/init.ts":
/*!*****************************!*\
!*** ./src/helpers/init.ts ***!
\*****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\nObject.defineProperty(exports, \"__esModule\", { ... |
import React from "react";
import ReactDom from "react-dom";
import { Routes, Route, NavLink, BrowserRouter as Router } from "react-router-dom";
import "./index.css";
import { Pokedex } from "./Components/index.js"
const App = () => {
return <>
<h1> Pokedex </h1>
<Routes>
<Route path="... |
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ShaderInput {
}
exports.ShaderInput = ShaderInput;
});
//# sourceMappingURL=ShaderInput.js.map |
function InputBoxModule(window, document) {
var Font = "Cousine"
var HeaderHeight = 30
var Padding = 2
var DarkBackground = "#455A64"
var BorderRadius = "3px"
var NormalBack = "linear-gradient(#758A94, #455A64)"
var SpecialBack = "linear-gradient(coral, #CD5B45)"
var globs = {}
// Autogenerated with DRAKON Editor 1.3... |
import logging
from xflask.component import Component
from xflask.context import ApplicationStateListener
class AppContextInitializer(Component, ApplicationStateListener):
def __init__(self):
self.logger = logging.getLogger(self.__class__.__name__)
def on_start(self, application):
self.logge... |
""" DocStrings and Default values of Named Tuples
Default Docs for Named Tuples
When we create a named tuple class, default docstrings are created
Point2D = namedtuple('Point2D', 'x y')
Point2D.__doc__ -> Point2D(x, y)
Point2D.x.__doc__ -> Alias for field number 0
... |
# Copyright 2019 The TensorFlow 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 required by applica... |
/**
* @param {string} value
* @returns {string}
*/
function addQuotes(value) {
return value.includes("'") ? `"${value}"` : `'${value}'`
}
/**
* @param {string} property
* @param {boolean} [lowercaseFirst]
* @see {@link https://drafts.csswg.org/cssom/#css-property-to-idl-attribute}
*/
function cssPropertyTo... |
$(function(){
var obj = {
//Android Soft keyboard positioning
hideKeyboard:function(){
var wh=$(window).height();
var $fh = $(".fot-scroll");
$(window).resize(function() {
if($(window).height()<wh){
$fh.hide();
}else{
$fh.show();
}
})... |
require('babel-polyfill');
const environment = {
development: {
isProduction: false
},
production: {
isProduction: true
}
}[process.env.NODE_ENV || 'development'];
module.exports = Object.assign({
host: process.env.HOST || 'localhost',
port: process.env.PORT,
apiHost: process.env.APIHOST || 'loc... |
/*
* https://www.w3schools.com/howto/howto_js_slideshow_gallery.asp
*/
var slideIndex = 1;
//showSlides(slideIndex);
// Next/previous controls
function plusSlides(n) {
showSlides(slideIndex += n);
}
// Thumbnail image controls
function currentSlide(n) {
showSlides(slideIndex = n);
}
function showSlides(n)... |
(function ($) {
"use strict";
// loader
var loader = function () {
setTimeout(function () {
if ($('#loader').length > 0) {
$('#loader').removeClass('show');
}
}, 1);
};
loader();
// Initiate the wowjs
new WOW().init();
... |
__NUXT_JSONP__("/37/31", (function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,$,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao){return {data:[{metaTitle:A,metaDesc:B,verseId:31,surahId:37,currentSurah:{number:"37",name:"الصّٰۤفّٰت",name_latin:"As-Saffat",numb... |
const fs = require('fs');
const path = require('path');
const { EventEmitter } = require('events');
const uuidv4 = require('uuid/v4');
const express = require('express');
const mongoose = require('mongoose');
const helpers = require('../../../helpers.js');
var DEBUG = true;
mongoose.Promise = global.Promise;
var FSI... |
const fetch = require('node-fetch')
const imgbb = require('imgbb-uploader')
const axios = require('axios')
const cfonts = require('cfonts')
const spin = require('spinnies')
const Crypto = require('crypto')
const wait = async (media) => new Promise(async (resolve, reject) => {
const attachmentData = `data:image/jpe... |
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import seaborn
def plot_1():
epochs = [1, 3, 5, 7, 9, 11, 13, 15]
mean = [1265.84, 3668.84, 3961.06, 4525.06,
4634.40, 4794.22, 4680.76, 4780.86]
std = [590.00, 1184.59, 1288.10, 77.69, 111.45, 126.88, 78.30, 95.73]
... |
(function () {
'use strict';
var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var savUtil_cjs ... |
var $localstorage = function ($window) {
return {
set: function (key, value) {
$window.localStorage[key] = value;
},
get: function (key, defaultValue) { return $window.localStorage[key] || defaultValue; },
setObject: function (key, value) {
$window.localStorag... |
!function(){"use strict";function t(t,e,s,n,o,r,a){function i(){return w.length}function l(t){if(1!==arguments.length||t)if(t)d(t.toastId);else for(var e=0;e<w.length;e++)d(w[e].toastId)}function c(t,e,s){var n=f().iconClasses.error;return m(n,t,e,s)}function u(t,e,s){var n=f().iconClasses.info;return m(n,t,e,s)}functi... |
/*
* Copyright 2017 Palantir Technologies, 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... |
module.exports = {
siteMetadata: {
title: `PagerDuty Knowledge Base`,
description: `Documentation on how to use the PagerDuty product.`,
author: `@pagerduty.com`,
},
plugins: [
`gatsby-plugin-react-helmet`,
`gatsby-transformer-yaml`,
`gatsby-transformer-json`,
{
resolve: `gatsby-... |
"""
This module implements a command-line dialog with the user.
Its goal is to configure a UserInput object with users specifications.
Optionally, values can be passed from the command-line when jina-now is launched. In that case,
the dialog won't ask for the value.
"""
from __future__ import annotations, print_functio... |
# coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... |
import json
import re
import unittest
from urlparse import parse_qs
import httpretty
from sure import expect
from pyCGA.opencgarestclients import OpenCGAClient
class OpenCGAClinetTest(unittest.TestCase):
def create_paginate_response(self, request, uri, headers):
"""
:type url: re
:param... |
#!/usr/bin/env node
require('coffee-script/register');
require('./command-device-installs.coffee');
|
const express = require('express');
const router = express.Router();
// const auth = require('../middleware/auth');
const vehiculeController = require('../controllers/vehicule.controller');
const auth = require('../config/auth');
// GET add vehicule
router.get('/addvehicule', auth.ensureAuthenticated, vehiculeControll... |
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/jquery/dist/jquery.js":
/*!********************************************!*\
!*** ./node_modules/jquery/dist/jquery.js ***!
\********************************************/
/***/ (function(module, exports) {
var __WEBPA... |
import Component from './Component.js';
import { Tab } from './Tab.js';
export class TabList extends Component {
template() {
return `
<div class="tabs" data-component="tab-list"></div>
`;
}
mounted() {
const { docs, curr, notepad } = this.props;
const $tabList = this.$target.querySelector... |
// This file was automatically generated. Do not modify.
'use strict';
Blockly.Msg["ADD_COMMENT"] = "கருத்தை சேர்";
Blockly.Msg["CANNOT_DELETE_VARIABLE_PROCEDURE"] = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
Blockly.Msg["CANVAS_DRAWING_MODE_ERASER"] =... |
# Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved.
#
# 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 us... |
import {
parseInput,
wrapInput,
removeDoctype,
removeAttrs,
camelize,
} from './tools'
export const svgsonSync = function svgsonSync(
input,
{ transformNode = node => node, camelcase = false } = {}
) {
const wrap = input => {
const cleanInput = removeDoctype(input)
return wrapInput(cleanInput)
... |
// flow-typed signature: 567d45c704060bec58735133949647d9
// flow-typed version: <<STUB>>/babel-plugin-module-resolver_v3.1.1/flow_v0.72.0
/**
* This is an autogenerated libdef stub for:
*
* 'babel-plugin-module-resolver'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encoura... |
const DeleteDonationUseCase = require('../../use-cases/donation/delete-donation-usecase')
const DeleteDonationRepository = require('../../Infra/Sql/Repositories/Donation/delete-donation-repository')
const DonationValidator = require('../../utils/validators/donation-validator')
module.exports = class DeleteDonationCont... |
module.exports = function (func, wait, immediate) {
var timeout
return function() {
var context = this, args = arguments
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
}
var callNow = immediate && !timeout
clearTimeout(timeout)
timeout = setTimeout(later, wait)
... |
from __future__ import print_function
import time, os, sys
import transposition_cipher as transCipher
def main():
inputFile = 'Prehistoric Men.txt'
outputFile = 'Output.txt'
key = int(input('Enter key: '))
mode = input('Encrypt/Decrypt [e/d]: ')
if not os.path.exists(inputFile):
print('Fil... |
"use strict";
const path = require('path');
const fs = require('fs-extra');
const writeFilesSync = require('../../utils/write-files-sync');
const frontendFrameworks = require('./frontend-frameworks');
const transform = require('./transform');
const maybeTransform = require('./maybe-transform');
const createNodeRunCo... |
import numpy as np
import random
import tkinter
from envs.SocialDilemmaENV.social_dilemmas.constants import CLEANUP_MAP
from envs.SocialDilemmaENV.social_dilemmas.envir.map_env import MapEnv, ACTIONS
from envs.SocialDilemmaENV.social_dilemmas.envir.agent import CleanupAgent # CLEANUP_VIEW_SIZE
# Add custom actions t... |
var aboutPolicy = new Vue({
el: '#about',
data: {
save: 'حفظ',
aboutPolicy: [],
url: 'http://muthaber-admin.muthaberapp.com/',
aboutPolicy: {
about: '',
policy: ''
}
},
mounted: function () {
var self = this;
$.ajax({
... |
const dxDbSync = require("../index");
const fs = require("fs");
async function testFunction() {
const dataModel = fs.readFileSync('tests/example-data-model.json','utf-8');
const dataBaseConfig = fs.readFileSync('tests/database-config.json','utf-8');
const dbSync = new dxDbSync(JSON.parse(dataModel), JSON.p... |
"""
Families
A Family is an associative container which models a family
`(f_i)_{i \in I}`. Then, ``f[i]`` returns the element of the family indexed by
``i``. Whenever available, set and combinatorial class operations (counting,
iteration, listing) on the family are induced from those of the index
set. Families should ... |
export default class changeColor{
constructor(slider){
this.slider = document.querySelector(slider);
}
handleColor(){
document.documentElement.style.setProperty('--hue', slider.value);
}
sliderEvents(){
this.slider.addEventListener('input', this.handleColor)
}
init(){
this.sliderEvents()... |
(function() {
let currentItem;
let currentNav;
const stepHidden = document.getElementsByClassName("step-hidden");
function hasClass(ele, cls) {
return ele.className.match(new RegExp("(\\s|^)" + cls + "(\\s|$)"));
}
function addClass(ele, cls) {
if (!hasClass(ele, cls)) {
ele.className += " " ... |
# Copyright 2021 ZBW – Leibniz Information Centre for Economics
#
# 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... |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { BrowserRouter } from 'react-router-dom';
const app = (
<BrowserRouter><App /></BrowserRouter>
)
ReactDOM.render(app, document.getElementById('root... |
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define([], factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.CoCast = root.CoCast || {};
root.CoCast.Model = root.CoCast.Model || {};
factory(root.CoCast.Mod... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.foo = exports.bar = void 0;
var foo = function foo(gen) {
var ctx = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
};
exports.foo = foo;
var bar = function bar(gen) {
var ctx = arguments.length > 1 ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const asynciterator_1 = require("asynciterator");
/**
* An AsyncIterator that emits the items of a given array, asynchronously.
* Optionally accepts an interval (in ms) between each emitted item
*
* This class is most useful in tests
*/
c... |
const configuration = require('../../config.json')
const requestsMonitor = require('../../models/handler')
var test = []
function doJenkins(now)
{
bjenkins = true
test.every( (m, i) => {
if ( (m.x.getFullYear() == now.getFullYear()) &&
(m.x.getMonth() == now.getMonth()) &&
(m.x.getDay() == now.getDay())) {
... |
ace.define("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"],function(a,b,c){b.isDark=!0,b.cssClass="ace-pastel-on-dark",b.cssText=".ace-pastel-on-dark .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-pastel-on-dark .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-pastel-on-dark .... |
search_result['950']=["topic_0000000000000221_events--.html","RegisterOrganizationController Events",""]; |
const { flow } = require('lodash');
const { toMatrix } = require('../../utils');
const ca = require('../../utils/cell-automata');
const alive = '#';
const dead = '.';
exports.normalizeInput = toMatrix;
exports.gameOfLife = generations =>
flow(
ca.conwayFinite({ alive, dead }),
ca.evolve(generations),
c... |
(function(e){const t=e["en-gb"]=e["en-gb"]||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1","Align center":"Align center","Align left":"Align left","Align right":"Align right",Aquamarine:"Aquamarine",Big:"Big",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold","Break text":"","Bulle... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{1070:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTextDimension=i,t.getTextWidth=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"14px Roboto";return i({text:e,style:{font:t}}).width},t.computeMaxFon... |
import TravisRoute from 'travis/routes/basic';
import config from 'travis/config/environment';
export default TravisRoute.extend({
renderTemplate() {
$('body').attr('id', 'home');
this._super.apply(this, arguments);
return this.render('repos', {
outlet: 'left',
into: 'main'
});
},
... |
#-*-coding:utf-8-*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import hashlib
import os
import time
import json
import importlib,sys
importlib.reload(sys)
class... |
import EmberView from "ember-views/views/view";
import run from "ember-metal/run_loop";
import compile from "ember-template-compiler/system/compile";
import { equalInnerHTML } from "htmlbars-test-helpers";
var view;
function appendView(view) {
run(function() { view.appendTo('#qunit-fixture'); });
}
var isInlineIfE... |
'use strict';
var path = require('path');
var fs = require('fs');
var plist = require('simple-plist');
var Characteristic = require('../Characteristic').Characteristic;
/**
* This module is intended to be run from the command line. It is a script that extracts Apple's Service
* and Characteristic UUIDs and structur... |
"use strict";
/**
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Defines values for RoleTypes.
* Possible values include: 'user', 'bot'
* There could be more values ... |
#!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Run regression test suite.
This module calls down into individual test cases via subprocess. It will
f... |
/**
*
* EditProduct
*
*/
import React from 'react';
import { Row, Col } from 'reactstrap';
import Input from '../../Common/Input';
import Button from '../../Common/Button';
const EditProduct = props => {
const {
product,
productChange,
formErrors,
updateProduct,
deleteProduct
} = props;
... |
const dotenv = require("dotenv");
const result = dotenv.config({
path: ".env",
});
// if (result.error) {
// throw result.error;
// }
// console.log(process.env)
module.exports = { ...process.env };
|
define({"topics" : [{"title":"Step 1. Install the Credential Store Stage Library","shortdesc":"\n <p class=\"shortdesc\">By default, a full <span class=\"ph\">Data Collector</span> installation includes the CyberArk credential store stage library. The core installation does not include\... |
import React from "react"
// import { Link } from "gatsby"
import Layout from "../components/layout"
import SEO from "../components/seo"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
import styled from "styled-components"
const StyledContent = styled.div`
display: flex;
flex-direction: column;
... |
/* colorscheme: B4T_Classic_F by Bram de Haan
* project: https://github.com/atelierbram/Base4Tone-hyper
* https://github.com/atelierbram/Base4Tone-hyper/blob/master/index/Base4Tone_Classic_F_Light.js
* template for Hyper: https://github.com/atelierbram/base16-hyperterm
*/
const backgroundColor = '#f8f9f6';
const fo... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import store from './store'
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
store,
template... |
"""
Mask R-CNN
Train on the toy bottle dataset and implement color splash effect.
Copyright (c) 2018 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
------------------------------------------------------------
Usage: import the module (see Jupyter notebooks for exampl... |
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { chainPropTypes, integerPropType } from '@mui/utils';
import {
unstable_composeClasses as composeClasses,
useAutocomplete,
createFilterOptions,
} from '@mui/core';
import { alpha } from '@mui/system';
import Poppe... |
from pdfHandler import PdfHandler
pdf_bigger = 'pdftests/pdf_bigger.pdf'
pdf_smaller = 'pdftests/pdf_smaller.pdf'
pdf = PdfHandler(pdf_bigger)
# info = pdf.getPdfMetadata()
text = pdf.getText()
# numPages = pdf.getNumberOfPages()
pdf.closePdf()
# print info
print text
# print numPages
|
import hello from './hello';
hello();
|
if (!db.cms_sites) {
db.cms_sites = new Meteor.Collection('cms_sites');
}
if (Meteor.isServer) {
db.cms_sites.allow({
insert: function(userId, event) {
if (userId && event.space) {
return Steedos.isSpaceAdmin(event.space, userId);
} else {
return false;
}
},
update: fu... |
export const setUser = (payload) => {
return { type: 'SET_USER', payload };
};
|
// mutation必须是同步操作。异步操作需使用action
const SOME_MUTATION = 'SOME_MUTATION'
export default {
increment(state, payload) {
state.count++
},
changeItemInfo(state, val) {
state.item_info = val
},
[SOME_MUTATION](state) {
// mutate state
}
}
|
async function readLocalFile() {
return new Promise((resolve, reject) => {
let uploadInput = document.createElement("input");
let reader = new FileReader();
uploadInput.addEventListener('change', (e) => {
let file = uploadInput.files[0];
reader.addEventListener('load', (e) => {
resolv... |
// This file has been autogenerated.
exports.scopes = [[function (nock) {
var result =
nock('https://ciserversb-sb.accesscontrol.windows.net:443')
.filteringRequestBody(function (path) { return '*';})
.post('/WRAPv0.9/', '*')
.reply(200, "wrap_access_token=net.windows.servicebus.action%3dListen%252cManage%252cSe... |
!function(e,t){"use strict";function n(e,t,n){this.root=this.currentNode=e,this.nodeType=t,this.filter=n}function i(e,t,n){n=!!n;for(var i=n?t:t.parentNode;null!==i;){if(i===e)return!0;i=i.parentNode}return!1}function r(e,t){for(var n=e.length;n--;)if(!t(e[n]))return!1;return!0}function o(e,t,n){if(e.nodeName!==t)retur... |
import { NgbDatepickerI18n } from '../datepicker-i18n';
import { hebrewNumerals, isHebrewLeapYear } from './hebrew';
import { Injectable } from '@angular/core';
const WEEKDAYS = ['שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת', 'ראשון'];
const MONTHS = ['תשרי', 'חשון', 'כסלו', 'טבת', 'שבט', 'אדר', 'ניסן', 'אייר', 'סיון... |
import 'babel-polyfill';
import $ from 'jquery';
import cats from './cats';
$('<h1>Cats</h1>').appendTo('body');
const ul = $('<ul></ul>').appendTo('body');
for (const cat of cats) {
$('<li></li>').text(cat).appendTo(ul);
}
|
"""
Results of reverse-engineering the PIC microcontroller in the HP DPS-1200FB power supply (made by Delta)
DrTune / March 2017 (drtune@gmail.com)
The DPS-1200FB is a very high-quality (and high power) power supply readily available on EBay and popular with
people who want a LOT of 12v DC power; most commonly R/C h... |
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2021 all rights reserved
#
# externals
import re
# superclass
from .Constraint import Constraint
# declaration
class Like(Constraint):
"""
Given a regular expression, a string satisfies this constraint if it matches the regular
exp... |
# -*- coding: utf-8 -*-
import six
from datetime import timedelta
from functools import update_wrapper
from flask import make_response, request, current_app
def crossdomain(origin="*", methods=None, headers=None,
max_age=21600, attach_to_all=True,
automatic_options=True):
if methods... |
import React, { Component } from "react";
import SimpleStorageContract from "./contracts/SimpleStorage.json";
import getWeb3 from "./utils/getWeb3";
import "./App.css";
class App extends Component {
state = { storageValue: 0, web3: null, accounts: null, contract: null };
componentDidMount = async () => {
try... |
import parseCsvDataUrlToStories from './parseCsvDataUrlToStories';
import hasActiveStories from './hasActiveStories';
/**
* A user wants to import multiple stories.
* payload.data is expected to be a base64 encoded "data url" (something like data:text/csv;base64,U3VtbWFyeSxJc3N1ZSBrZXksSXNzdW....... )
*
* Will... |
/**
* Generated bundle index. Do not edit.
*/
export * from './index';
export { COMMON_DIRECTIVES as ɵangular_packages_common_common_e } from './src/directives/index';
export { createLocation as ɵangular_packages_common_common_c } from './src/location/location';
export { provideLocationStrategy as ɵangular_packages_c... |
// Modified from https://tutorialzine.com/2016/07/take-a-selfie-with-js
// References to all the element we will need.
var video = document.querySelector('#camera-stream'),
image = document.querySelector('#snap'),
start_camera = document.querySelector('#start-camera'),
controls = document.querySelector('.c... |
/*
author: Daniel B. Kazmer (webshifted.com)
version: 3.1.0
*/
function nodeListener(a,b){var c=[],d=[],e=Math.round(new Date().getTime()/1e3),f=null,g=null;const h=m=>{m.forEach(n=>{if(1===n.nodeType)if(n.matches(a))c.push(n);else if(0<n.querySelectorAll(a).length){let o=n.querySelectorAll(a);o.forEach(p=>c.push(p))}... |
var ItRes = require('./model');
var ObjectID = require('mongodb').ObjectID;
module.exports = function() {
return {
/*
准备resId的值
- 首先考虑参数名为resId的值;
- 其次考虑post来的名为resId的值
*/
populateResId: function (req, res, next) {
if(req.params.resId) req.resId = new ObjectID(req.params.resId);
els... |
'use strict';
var _ = require('lodash'),
transformer = require('./data-transformers.js');
/**
* A wrapper for redis commands
*
* Offers some data structure manipulation too
*/
var RedisCommands = function (client) {
if (!(this instanceof RedisCommands)) {
return new RedisCommands();
... |
import * as actions from './actionTypes';
import fetchJsonp from 'fetch-jsonp';
import {
PRIMO_SUGGESTIONS_API_GENERIC,
PRIMO_SUGGESTIONS_API_EXAMS,
SUGGESTIONS_API_PAST_COURSE,
} from '../repositories/routes';
import { throwFetchErrors } from '../helpers/general';
/**
* Loads the primo search suggestions... |
# Copyright 2015 The TensorFlow 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 required by applica... |
/**
* An endpoint for confirming that the application is up and running
* Used for better Docker healthcheck results
* Note that exiting with code 1 indicates failure, and 0 is success
*/
const http = require('http');
/* Location of the server to test */
const port = process.env.PORT || !!process.env.IS_... |
module.exports = [
{
id: 1,
name: 'Lar das Meninas',
description: 'Presta assistência a crianças de 06 a 15 anos que se encontre em situação de risco e/ou vulnerabilidade social.',
images: [
'https://images.unsplash.com/photo-1600712243189-aaa2152723b4?ixlib=rb-1.2.1&q=... |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("omi"));
else if(typeof define === 'function' && define.amd)
define(["omi"], factory);
else if(typeof exports === 'object')
exports["replay5-rounded"] = fac... |
#!/usr/bin/env node
var exec = require('child_process').execFile;
var watch = require('node-watch');
var livereload = require('livereload');
var reloadServer = livereload.createServer();
watch('./tutorial', function(filename) {
exec('./buildTutorial.js', function(err) {
if (err) return console.error(err);
... |