text stringlengths 3 1.05M |
|---|
describe(".prototype.nonenumerable", function() {
require("./_enumerable_test")("nonenumerable", false)
})
|
export default xs => ({
next: cursor =>
xs[cursor >= xs.length - 1 ? 0 : cursor + 1],
prev: cursor =>
xs[cursor <= 0 ? xs.length - 1 : cursor - 1],
});
|
import React from 'react'
import { Link } from 'gatsby'
import Layout from '../components/layout'
const Portfolio = () => (
<Layout>
<h1>Hi from the portfolio page</h1>
<p>Welcome to page 2</p>
<Link to="/">Go back to the homepage</Link>
</Layout>
)
export default Portfolio
|
(() => {
"use strict";
const demo = {
title: "Combined - Bezier Curves",
author: "Agecaf",
text: `In this example we combine Bezier interpolation with linear motion.
Note how the movement of the
bullets far from the center is basically linear... However, if you focus
on the center you... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'dw_widgets.ui'
#
# Created by: PyQt5 UI code generator 5.12.2
#
# WARNING! All changes made in this file will be lost!
from qtpy import QtCore, QtGui, QtWidgets
class Ui_DockWidget(object):
def setupUi(self, DockWidget):
DockW... |
def bubble_sort(array): #function to sort array using bubble sort
swaps=0
comparison=0
for i in range(0,len(array)):
for j in range(1,len(array)):
if(array[j-1]>array[j]):
swaps+=1
temp=array[j]
array[j]=array[j-1]
ar... |
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
items:{ html:'<a href="https://help.rallydev.com/apps/2.0rc3/doc/">App SDK 2.0rc3 Docs</a>'},
launch: function() {
//Write app code here
}
});
|
define([
"skylark-domx-query",
"skylark-domx-velm",
"./plugins",
"./instantiate",
"./plugin",
"./register",
"./shortcutter"
],function($,elmx,plugins,instantiate,Plugin,register,shortcutter){
"use strict";
var slice = Array.prototype.slice;
$.fn.plugin = function(name,options) {
... |
/* eslint-disable no-console */
/* eslint-disable no-unused-vars */
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import html2canvas from 'html2canvas';
import { jsPDF } from 'jspdf';
import {
Table,
Header,
HeaderRow,
Body,
Row,
HeaderCell,
Cell,
} from '@table-library/re... |
# coding:utf-8
import socket
from struct import pack
import json
import time
# TPLink電球&プラグ共通クラス
class TPLink_Common():
def __init__(self, ip, port=9999):
"""Default constructor
"""
self.__ip = ip
self.__port = port
def info(self):
cmd = '{"system":{"get_sysinfo":{}}}'... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const pip_services3_commons_node_1 = require("pip-services3-commons-node");
const pip_services3_grpc_node_1 = require("pip-services3-grpc-node");
class RolesCommandableGrpcServiceV1 extends pip_services3_grpc_node_1.CommandableGrpcService {
... |
import { getInitialData } from '../utils/api'
import { receiveUsers } from './users'
import { receiveTweets } from './tweets'
import { setAuthedUser } from './authedUser'
import { showLoading, hideLoading } from 'react-redux-loading'
const AUTHED_ID = 'tylermcginnis'
export function handleInitialData() {
return (di... |
// Copyright 2017 The Kubernetes Dashboard Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicabl... |
import Header from './header';
import Link from 'gatsby-link';
import React from 'react';
import css from './index-page.module.css';
const Posts = ({data}) => {
const { edges: posts } = data.allMarkdownRemark;
return (
<div className="blog-posts">
{posts
.filter(post => ... |
class Solution:
def solve(self, s):
def getResult(op1, op2, opr):
x = int(op1)
y = int(op2)
if opr == "+":
return str(x+y)
elif opr == "*":
return str(x*y)
elif opr == "-":
return str(x-y)
... |
/*
* Copyright (C) 2015 The CyanogenMod project
*
* 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 o... |
'use strict';
var test = require('tape');
require('../../bootstrap');
var AnimationLoop = require('../../../js/style/animation_loop');
test('animationloop', function(t) {
var loop = new AnimationLoop();
t.equal(loop.stopped(), true, 'starts stopped');
t.equal(loop.n, 0, 'starts with zero animations');
... |
class test{
a
b;
c = 1
d = 2;
} |
export const secondaryOptions = {
delete: [
{
value: 'branch',
label: 'a branch',
usage: 'git branch -D <branch name>'
},
{
value: 'delete-multiple-branches',
label: 'multiple branches',
}
],
};
|
App.plugin('uservoice', (function () {
var parseList = function (list) {
return list.filter(function (a) {
return a;
}).map(function (a) {
return parseString(a);
});
};
var regExString = /"?([^ ]*)\s*(.*)"?\s*<([^>]+)>/;
var regExEmail = /([\w!.%+\-])+@(... |
// AgcPregnancyPercentage: Host Data, ES Module/es2017 Target
export const AgcPregnancyPercentage = ["agc-pregnancy-percentage","gjuwr7dl",0,[["cache",16],["currentStep",16],["mode",1,0,1,2],["results",16],["socket",1,0,1,2],["submitted",16],["tract",1,0,1,2]]];
export const AgcPregnancyPercentageInputs = ["agc-pregnan... |
import React, { useState, useEffect } from 'react'
import { useFetch, useInjectSaga, useInjectReducer } from 'utils/hooks'
import { listCropPlan } from '../actions'
export default () => {
useInjectSaga(require('../sagas/listCropPlan'))
useInjectReducer(require('../reducers/cropPlanRequest'))
return us... |
from PIL import Image
from django.core.exceptions import ValidationError
from django.test import TestCase
from applications.users.models import User, UserPatient, UserOffice, OfficeDay
class TestUserPatientModels(TestCase):
def setUp(self):
self.patient1 = User.objects.create_user(
'patient'... |
import React from "react";
import { Route, Redirect } from "react-router-dom";
import { connect } from "react-redux";
function PrivateRoute({ abc: Component, user }) {
if (user === null) {
return <Redirect to="/not-found" />;
}
return (
<React.Fragment>
<Component />
</React.Fragment>
);
}
f... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
"""
Don't show axis
"""
import numpy as np
import matplotlib.pyplot as plt
# Build datas ###############
x = np.arange(-10., 10., 0.1)
y1 = np.cos(x)
y2 = np.sin(x)
# Plot data #################
fig, (ax1, ax... |
/**
* @ngdoc service
* @name umbraco.resources.authResource
* @description
* This Resource perfomrs actions to common authentication tasks for the Umbraco backoffice user
*
* @requires $q
* @requires $http
* @requires umbRequestHelper
* @requires angularHelper
*/
function authResource($q, $http, umbRequestHe... |
import { default as React, Component } from "react";
import { GoogleMap, Marker, SearchBox } from "react-google-maps";
/*
* https://developers.google.com/maps/documentation/javascript/examples/places-searchbox
*
* Add <script src="https://maps.googleapis.com/maps/api/js"></script> to your HTML to provide google.ma... |
#!/usr/bin/env node
console.log('Hi!')
|
'use strict';
/**
* Module dependencies
*/
var path = require('path'),
config = require(path.resolve('./config/config'));
/**
* Participants module init function.
*/
module.exports = function (app, db) {
}; |
import { PRIVATE } from "@product/constants";
export default {
[PRIVATE.SAVE]: (state, payload) => {
state.items.push(payload)
}
}
|
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.15/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.
//>>built
define({"widgets/GriddedReferenceGraphic/nls/strings":{_widgetLabel:"Gridded Reference Graphic",newGRG... |
var searchData=
[
['calibrate_112',['calibrate',['../class_a_d_c___module.html#a037ab0589e2966cd07292c8186cad83e',1,'ADC_Module']]],
['checkdifferentialpins_113',['checkDifferentialPins',['../class_a_d_c___module.html#a80d29662a1a32a51fec606351685ebaf',1,'ADC_Module']]],
['checkpin_114',['checkPin',['../class_a_d... |
define({"topics" : [{"title":"Configuring a Static Lookup Processor","shortdesc":"\n <p class=\"shortdesc\">Configure a Static Lookup processor to perform key-value lookups in memory.</p>\n ","href":"datacollector\/UserGuide\/Processors\/StaticLookup.html#task_xk1_z4r_pv","attributes": ... |
// @flow
import * as ACTIONS from 'constants/action_types';
import { COPYRIGHT_ISSUES, OTHER_LEGAL_ISSUES } from 'constants/report_content';
type Dispatch = (action: any) => any;
export const doReportContent = (category: string, params: string) => (dispatch: Dispatch) => {
dispatch({
type: ACTIONS.REPORT_CONTEN... |
import { PrismaClient } from '@prisma/client';
import chalk from 'chalk';
const options = {
log: [
{
emit: 'event',
level: 'query',
},
],
};
function logQuery(e) {
if (process.env.LOG_QUERY) {
console.log(chalk.yellow(e.params), '->', e.query, chalk.greenBright(`${e.duration}ms`));
}
}... |
/* YUI 3.9.0pr1 (build 202) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
YUI.add('series-combospline', function (Y, NAME) {
/**
* Provides functionality for creating a combospline series.
*
* @module charts
* @submodule series-combospline
*/
/**
* The ComboSplineSeries class renders a combination... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var apollo_utilities_1 = require("apollo-utilities");
var ts_invariant_1 = require("ts-invariant");
var haveWarned = false;
function shouldWarn() {
var answer = !haveWarned;
if (!apollo_utilities_1.isTest()) {
haveWarned = true... |
import React from 'react'
import NavButton from './shared-components/NavButtons'
import locale from '../locale'
const NavBarLoggedIn = ({handleClick, cartItemCount}) => {
return (
<div className="nav-row">
<NavButton buttonTitle={locale.NAV_LINK_HOME} link="/home" />
<NavButton buttonTitle={locale.NA... |
// @flow strict
import getIcon from './get-icon';
import { ICONS } from '../constants';
test('getIcon', () => {
expect(getIcon('twitter')).toBe(ICONS.TWITTER);
expect(getIcon('github')).toBe(ICONS.GITHUB);
expect(getIcon('vkontakte')).toBe(ICONS.VKONTAKTE);
expect(getIcon('telegram')).toEqual(ICONS.TELEGRAM);
... |
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
export const handler = (req, res) => {
res.status(200).json({
name: "John Doe",
});
};
|
// @inheritedComponent AppBar
import * as React from 'react'
import PropTypes from 'prop-types'
import { generateUtilityClasses } from '@mui/core'
import { styled } from '@mui/system'
import { AppBar, Badge, IconButton, Toolbar } from '@mui/material'
import { useCheckoutSelection, useI18n } from 'api'
import { useDime... |
// On passe une extension et cea renvoie un Content-Type
// (ex: ".html" > devient "text/html")
function fileExtToContentType (fileExtension) {
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
// puuuuuuuuuuuuuuuuuuuutain
// ATTENTION, je n'ai pas tout ... |
import postData from './postData';
import tripCardFragment from './tripCardFragment';
import dataStore from './localStore';
const { setData: saveToLocalStorage } = dataStore();
export const updateUI = data => {
if (data.error) return;
const tripListElement = document.querySelector('#trips-list');
const newTripF... |
# encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
News: Hardtree module definition
"""
PROPERTIES = {
'title': 'News',
'details': 'Internal and external news',
'url': '/news/',
'system': False,
'type': 'minor',
}
URL_PATTERNS = [
... |
/**
* Selling Partner API for Shipping
* Provides programmatic access to Amazon Shipping APIs.
*
* OpenAPI spec version: v1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*
*/
import ApiC... |
var oldString7 = 'most',
newString7 = '<span>most</span>',
newText7 = $('ji').text().replace(RegExp(oldString7,"gi"),newString7);
$('ji').html(newText7); |
!function(e){var a="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js",o="//www.jplayer.org/2.5.0/js/jquery.jplayer.min.js",t="//www.jplayer.org/2.5.0/js/Jplayer.swf",n="html,flash",r=!1,i=!1,l=!1,s={mp3:{codec:'audio/mpeg; codecs="mp3"',flashCanPlay:!0,media:"audio"},m4a:{codec:'audio/mp4; codecs="mp4a.40.2"... |
"""AWS Glue Catalog Get Module."""
# pylint: disable=redefined-outer-name
import base64
import itertools
import logging
from typing import Any, Dict, Iterator, List, Optional, Union, cast
import boto3
import botocore.exceptions
import pandas as pd
from awswrangler import _utils, exceptions
from awswrangler._config i... |
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true... |
// @flow
import theme from 'shared/theme';
import styled, { css } from 'styled-components';
import { Link } from 'react-router-dom';
import { zIndex, Tooltip } from 'src/components/globals';
export const InboxThreadItem = styled.div`
display: flex;
flex-direction: column;
max-width: 100%;
min-width: 0;
overf... |
'''最嗨电音、爵士电台 - DI.FM APIs'''
from . import WeapiCryptoRequest
@WeapiCryptoRequest
def GetCurrentPlayingTrackList(channelId=101,limit=10,source=0):
'''移动端 - 小程序 - 获取当前某频道下正在播放的歌曲
Args:
channelId (int, optional): 频道 (channel) ID. Defaults to 101.
limit (int, optional): 单次获取数量. Defaults to 1... |
from random import random, seed
def calc_mutacao(pop_filhos):
for index, filho in enumerate(pop_filhos):
seed(random() * random())
# para a variavel x
x = filho[0]
for index_bit, bit in enumerate(x):
# probabilidade de 1% de mutacao
if not (bit == '-' or bi... |
export default { LEFT: 37, RIGHT: 39 };
|
function WithoutCurlyBraces() {
var _this = this;
if (true) {
var _loop = function (k) {
function foo() {
return this;
}
function bar() {
return foo.call(this);
}
console.log(_this, k); // => undefined
};
for (var k in kv) {
_loop(k);
}
}
}
... |
from obb.models import Train, TrainSection, Person
from django.shortcuts import get_object_or_404
from obb.serializers import TrainSerializer
from rest_framework import viewsets
from rest_framework.response import Response
from rest_framework.decorators import action
class TrainViewSet(viewsets.ViewSet):
def lis... |
import os
import pytest
import numpy as np
from .. import ZarrIndexer
from jina.executors.indexers import BaseIndexer
from jina.executors.indexers.vector import NumpyIndexer
from jina.executors.metas import get_default_metas
np.random.seed(500)
retr_idx = None
num_data = 10
num_dim = 64
num_query = 100
keys = np.ran... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'indent', 'en-gb', {
indent: 'Increase Indent',
outdent: 'Decrease Indent'
} );
|
import React from 'react';
const VideoDetail = ({video}) => {
if (!video) {
return <div>Loading...</div>;
}
const videoId = video.id.videoId;
const url = `https://www.youtube.com/embed/${videoId}`;
return (
<div className="video-detail col-md-8">
<div className="embed-responsive embed-respons... |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && defi... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{M8UQ:function(a,c,l){"use strict";l.r(c),l.d(c,"pageQuery",(function(){return V}));var h=l("zLVn"),m=l("q1tI"),v=l.n(m),z=l("oIa3"),e=l("rxcZ"),t=l("pOuo"),n=l("QRc3"),r=l("vOnD");var i=[{label:"Multicracker, 1 meter",Icon:function(a){return v.a.createElement("s... |
class Employee {
constructor(name, id, email) {
this.name = name;
this.id = id;
this.email = email;
this.role = "Employee";
}
getName() {
return `<h2 class="card-title">${this.name}</h2>`;
}
getId() {
return `<div>ID: ${this.id}</div>`;
}
getEmail() {
return `<div>email: <a ... |
//// [importDeclWithDeclareModifier.ts]
module x {
interface c {
}
}
declare export import a = x.c;
var b: a;
//// [importDeclWithDeclareModifier.js]
"use strict";
exports.__esModule = true;
exports.a = x.c;
var b;
|
import React from "react"
import { Link, graphql } from "gatsby"
import Img from "gatsby-image"
import Layout from "../components/layout"
import Seo from "../components/seo"
class BlogIndex extends React.Component {
render() {
const { data } = this.props
const { author, title: siteTitle, description } = dat... |
const sequelize = require('../config/connection');
const { Blogger, Post } = require('../models');
const bloggerData = require('./bloggerData.json');
const postData = require('./postData.json');
const seedDatabase = async () => {
await sequelize.sync({ force: true });
const bloggers = await Blogger.bulkCreate(bl... |
/* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
ABOUT THIS NODE.JS EXAMPLE: This example works with Version 3 (V3) of the AWS SDK for JavaScript,
which is scheduled for release by September 2020. The prerelease version of the SDK is available
at https://github.... |
import * as actions from '../../../src/redux/user/actions';
import * as types from '../../../src/redux/user/types';
describe('action tests', () => {
it('should get user', () => {
const payload = {
name: 'Taha',
surname: 'Tepedelen',
email: 'tahatepedelen@gmail.com',
... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime")... |
import Block from './block.vue'
export default Block
|
# Copyright 2015 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 law or a... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Ed Mountjoy
#
import argparse
import os
import sys
import pyspark.sql
from pyspark.sql.types import *
from pyspark.sql.functions import *
from functools import reduce
def main():
# Parse args
args = parse_args()
# File paths
in_path = 'gs://genetics-... |
/**
*
*/
$(document ).ready(function() {
$("#divFormulario").show();$("#divTblOutput").hide();
$(".alert").hide();
$('#idSolicitud').val("");
$('.aLink').attr('href','#');
var table= $('#tblOutput').DataTable( {
"bJQueryUI":true,
"processing": true,
"responsive": true,
... |
// Given a non-empty array of integers, every element appears twice except for one. Find that single one.
// Note:
// Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
// Example 1:
// Input: [2,2,1]
// Output: 1
// Example 2:
// Input: [4,1,2,1,2]
// Output... |
/**
* @license
* Copyright 2020 Google LLC. 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 requ... |
import '@core/services/environment'
import cron from '@core/entities/maha/cron'
cron()
|
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2018 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(["sap/ui/base/Object","./TableUtils"],function(B,T){"use strict";var a=B.extend("sap.ui.table.TableExtension",{_table:nu... |
# encoding: utf-8
import json
from .item import Item
from .mix import RawJsonMixIn
class PendingInputAction(RawJsonMixIn, Item):
''' this class implement functionality to process
`input step <https://www.jenkins.io/doc/pipeline/steps/pipeline-input-step/>`_
'''
def __init__(self, jenkins, raw):
... |
import React, {useState, useEffect} from 'react';
import {
Col,
Form,
Card,
Button
} from 'react-bootstrap';
import moment from 'moment';
import APIService from '../../../APIService';
function ReturnForm(){
const [isbn, setisbn] = useState('');
const [id_peminjam, setid_peminjam] = useState('');
cons... |
var isNumber = require('../utility/is-number');
function validate(port) {
if (!port) {
throw new Error('Invalid server port: ' + port);
}
if (!isNumber(port)) {
throw new Error('Invalid server port: ' + port);
}
}
module.exports = {
validate: validate
};
|
(function() {
angular.module('app.Note', ['firebase'])
.controller('NoteController', NoteController)
function NoteController($scope, currentAuth, $firebaseObject, $stateParams) {
$scope.firebaseUser = currentAuth;
let noteRef = firebase.database().ref()
.child('notes')
.child(currentAuth.uid)
.child... |
/*! DataTables Bootstrap 4 integration
* ©2011-2017 SpryMedia Ltd - datatables.net/license
*/
/**
* DataTables integration for Bootstrap 4. This requires Bootstrap 4 and
* DataTables 1.10 or newer.
*
* This file sets the defaults and adds options to DataTables to style its
* controls using Bootstrap. See http:/... |
'use strict'
const { hashPassword, generateRandomKey } = require('@mntd/crypto')
module.exports = (sequelize, DataTypes) => {
const User = sequelize.define(
'User',
{
username: DataTypes.STRING,
password: DataTypes.STRING,
role: DataTypes.STRING,
fullName: {
type: DataTypes.STR... |
'use strict';
/**
* module dependencies
*/
var debug = require( './debug' );
var info = require( './info' );
var error = require( './error' );
/**
* @type {Object} log
* @type {Function} log.debug
* @type {Function} log.error
* @type {Function} log.info
*/
var log = {
debug: debug,
error: error,
info: in... |
// Tests largely based on those of Esprima
// (http://esprima.org/test/)
if (typeof exports != "undefined") {
var test = require("./driver.js").test;
var testFail = require("./driver.js").testFail;
var testAssert = require("./driver.js").testAssert;
var acorn = require("..");
}
test("this\n", {
type: "Progr... |
import{S as a,i as s,s as n,e as t,c as p,a as e,d as o,b as c,f as l,n as r,g as u,t as i,h as k,q as m,j as h,k as f,l as g,m as v,o as d,p as E,r as w,u as $}from"./client.cad504f2.js";import{L as y}from"./Leaflet.399e6cc7.js";function b(a){let s;return{c(){s=t("pre"),this.h()},l(a){s=p(a,"PRE",{class:!0}),e(s).forE... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import shutil
from io import BytesIO
import pytest
from abindiff import patch
def test_read_headers_ok():
fpp = BytesIO('abindiff 001\nfoo: 1\nbar: юни:код\n\nthis should be ignored'.encode('utf-8'))
assert patch.read_headers(fpp) == {'foo': '1', '... |
const path = require(`path`)
const { createFilePath } = require(`gatsby-source-filesystem`)
exports.createPages = async ({ graphql, actions }) => {
const { createPage } = actions
const blogPost = path.resolve(`./src/templates/blog-post.js`)
const result = await graphql(
`
{
allMarkdownRemark(
... |
import {valueOrDefault} from 'chart.js/helpers';
import {getState} from './state';
function zoomDelta(scale, zoom, center) {
const range = scale.max - scale.min;
const newRange = range * (zoom - 1);
const centerPoint = scale.isHorizontal() ? center.x : center.y;
const minPercent = (scale.getValueForPixel(cent... |
#!/usr/bin/env python
import sys;
if sys.version[:3]=='1.5':
from lib152 import *;
else:
from lib import *;
from sys import argv;
from listR import stringToNumbers, biDifference, FLL, listFormCubicLatticeD, tracedSort, applyOrderList;
class control_variables: pass
control_variables.to_skip = {}; # This list is u... |
Blockly.Blocks['logic_compare_strings'] = {
/**
* Block for comparison operator.
* @this Blockly.Block
*/
init: function() {
var OPERATORS = Blockly.RTL ? [
['is equal to(strings)', 'EQ']
] : [
['is equal to(strings)', 'EQ']
];
this.setCo... |
import datetime
from tornado.testing import gen_test
from tornado import gen
from tornado_mysql.tests import base
import tornado_mysql.cursors
import warnings
class TestDictCursor(base.PyMySQLTestCase):
bob = {'name': 'bob', 'age': 21, 'DOB': datetime.datetime(1990, 2, 6, 23, 4, 56)}
jim = {'name': 'jim', 'a... |
# coding: utf-8
"""
Thingsboard REST API
For instructions how to authorize requests please visit <a href='http://thingsboard.io/docs/reference/rest-api/'>REST API documentation page</a>.
OpenAPI spec version: 2.0
Contact: info@thingsboard.io
Generated by: https://github.com/swagger-api/swagger-co... |
__NUXT_JSONP__("/de/entdecken", {data:[{_img:{}}],fetch:{},mutations:void 0}); |
/**
* Copyright IBM Corp. 2019, 2020
*
* 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.
*/
import { _ as _objectWithoutProperties, I as Icon, a as _extends } from '../I... |
import { GET_ERRORS, GET_SUCCESS, CLEAR_ERRORS } from './types'
export const getErrors = (msg, status, id) => ({
type: GET_ERRORS,
payload: { msg, status, id }
})
export const getSuccess = msg => ({
type: GET_SUCCESS,
payload: msg
})
export const clearErrors = () => ({
type: CLEAR_ERRORS
}) |
function treatNestedFilters(filter, where) {
const reg = /[, ]+/;
console.log('filter', filter);
if (where && filter && Object.keys(filter)) {
const nesteds = filter.split(reg).filter(x => x.indexOf('.') !== -1);
nesteds.forEach((key) => {
const splitted = key.split('.');
const a = splitted[0... |
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var minifyCSS = require('gulp-minify-css');
var rename = require("gulp-rename");
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
var sass = require('gulp-sass');
var js_dir = ['js/*.js'];
gulp.task('scripts', function()... |
/*****************************************
* Library is under GPL License (GPL)
* Copyright (c) 2012 Andreas Herz
****************************************/
/**
* @class draw2d.policy.figure.BusSelectionFeedbackPolicy
*
*
* @author Andreas Herz
* @extends draw2d.policy.figure.SelectionFeedbackPolicy
*/
dr... |
/**
* Layout component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react"
import PropTypes from "prop-types"
import { useStaticQuery, graphql } from "gatsby"
import Header from "./header"
import "./layout.css"
impo... |
'use strict';
const WIT_TOKEN = process.env.WIT_TOKEN || '532SMYDNILXEVS7CRD37ZLP2D6KLAGI4';
if (!WIT_TOKEN) {
throw new Error('Missing WIT_TOKEN. Go to https://wit.ai/docs/quickstart to get one.')
}
//EAATPOypj3vwBAIfuW9qOxWiEgUL1ebSij52C3zTZCcnwwcSiKJ4D5YuHgz35G6uDrZBtOEtZCMFWQpyjScWMQrFK1p16EcEny83i7LZAY1W7d6YHu... |
"use strict"
/**
* HTML Helpers
*/
const my = exports
const { html } = require("@kisbox/browser")
const { timeout } = require("@kisbox/helpers")
/* Library */
my.copyContent = function (element) {
if (!(html.copyContent(element) && document.activeElement.value)) {
return
}
const prevNode = html.grab("#c... |