text stringlengths 3 1.05M |
|---|
'use strict';
const service = require('feathers-sequelize');
const hooks = require('./hooks');
module.exports = function () {
const app = this;
let options = {
Model: app.db.service,
paginate: {
default: 10,
max: 25
}
};
// Initialize our service with any options it requires
app.us... |
import test from "tape"
import postcss from "postcss"
import nextNonCommentNode from "../nextNonCommentNode"
test("nextNonCommentNode", t => {
let planned = 0
const caseA = "a {} /* x */ b {}"
postcss().process(caseA).then(result => {
let aNode
let bNode
result.root.walkRules(rule => {
if (rul... |
$(document).ready(function () {
// Generic Cancel button click handler
$('.admin-cancel-button').on('click', function (e) {
location.href = $(this).attr('data-redirect');
});
}); |
/**
* @widget Tree
* @plugin Lazy Loading
*/
gj.tree.plugins.lazyLoading = {
config: {
base: {
paramNames: {
/** The name of the parameter that is going to send the parent identificator.
* Lazy Loading needs to be enabled in order this parameter to be in ... |
/**
* svgtoreact
*
* @author Michael Hsu
*/
import React from 'react';
export default function SVGMobile(props) {
return (
<svg width={26} height={42} viewBox="0 0 26 42" {...props}>
<g fill="none">
<path d="M-17-9h60v60h-60z" />
<g fill="#fff">
<path
opacity=".5"... |
import os
import sys
import django
from django.core import management
def pytest_addoption(parser):
parser.addoption('--no-pkgroot', action='store_true', default=False,
help='Remove package root directory from sys.path, ensuring that '
'rest_framework is imported fr... |
var inherit = require('inherit'),
Base = require('../base');
module.exports = inherit(Base, {
getHeight: function() {
return this.getSource().offsetHeight;
}
}, {
instances: {}
}); |
# coding=utf-8
# Copyright 2018 The Mesh TensorFlow 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 applicab... |
# !/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... |
/*
* simple-test.js: Simple tests for using Monitor instances.
*
* (C) 2010 Charlie Robbins & the Contributors
* MIT LICENCE
*
*/
var assert = require('assert'),
path = require('path'),
vows = require('vows'),
fmonitor = require('../../lib'),
macros = require('../helpers/macros');
var examplesDi... |
##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2015 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... |
from models.block.conv import conv3x3
from models.sseg.base import BaseNet
import torch
from torch import nn
import torch.nn.functional as F
class SCSEModule(nn.Module):
def __init__(self, in_channels, reduction=16):
super().__init__()
self.cSE = nn.Sequential(
nn.AdaptiveAvgPool2d(1)... |
export default function ({store, app: { $axios }}) {
$axios.setHeader('Content-Type', 'application/x-www-form-urlencoded', [
'post'
]);
const user = store.state.auth.user;
if ( user )
{
const token = user.token;
if ( token )
$axios.setHeader('x-access-token', tok... |
import { VAP } from '../types';
export default {
type: VAP,
service: 'myvaporwallet.com',
url: 'https://o70075sme1.execute-api.us-east-1.amazonaws.com/latest/vap',
port: 443,
auth: false,
username: '',
password: ''
};
|
/**
* @license Apache-2.0
*
* Copyright (c) 2018 The Stdlib 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 a... |
import EventEmitter from 'events';
import Engine from 'socket.io';
/**
* An instance of [Promise]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise}.
* @typedef {Promise} Promise
*/
/**
* @module Socket
*/
let SERVER;
/**
* The Store class
* @class
*/
class Stor... |
exports.session = function(req, res, next) {
res.json({
user: process.env.NEXMO_USER,
displayName: process.env.NEXMO_DISPLAYNAME,
jwt: process.env.NEXMO_TOKEN
});
}; |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.secrets = void 0;
var fs_1 = require("fs");
var util_1 = require("util");
var secrets = {
get: function (secret) {
try {
return fs_1.default.readFileSync(util_1.default.format('/run/secrets/%s', secret), 'utf8')... |
import * as array from 'd3-array'
import * as scale from 'd3-scale'
import * as shape from 'd3-shape'
import PropTypes from 'prop-types'
import React, { PureComponent } from 'react'
import { View } from 'react-native'
import Svg from 'react-native-svg'
import Path from './animated-path'
class BarChart extends PureComp... |
import os
import time
from datetime import datetime
import pytest
from test.data import TEST_IMAGE_FILE, RANDOM_MONGO_ID, TEST_IMAGE_URL
from matroid.error import APIConnectionError, InvalidQueryError, APIError
from test.helper import print_test_pass
DETECTOR_TEST_ZIP = os.getcwd() + '/test/test_file/cat-dog-lacroix.... |
load("8b38e12cab5de21ec5393724c0d9b7dd.js");
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//------------... |
/**
* A service implementation sample for displaying a greeting notification and counting the number of alerts displayed.
*
* The service provides a public API which is defined in its interface (in this example, Sample.json file)
* and can be used by other plugins.
*
* Every method call on a service is asynchrono... |
// @flow
export type State = boolean;
|
import _isEqual from 'lodash/isEqual';
import ava from 'ava';
import CommandParser from '../../src/assets/scripts/client/commands/parsers/CommandParser';
const TIMEWARP_50_MOCK = 'timewarp 50';
const CALLSIGN_MOCK = 'AAL777';
const FH_COMMAND_MOCK = 'fh 180';
const D_COMMAND_MOCK = 'd 030';
const STAR_MOCK = 'star qui... |
// ag-grid-enterprise v20.2.0
"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 ... |
import { Box, Button, makeStyles, Typography } from "@material-ui/core";
import PopupService from "../../../../services/PopupService";
import { createEmptyFile } from "../../../../utils/storageUtils";
const { dialog } = window.require('electron').remote;
const useStyles = makeStyles((theme) => ({
root: {
... |
var cluster = require('cluster');
const http = require('http');
const fs = require('fs');
var os = require( 'os' );
const path = require('path');
const { parse } = require('querystring');
const directoryPath = path.join(__dirname, 'static');
var port = process.env.PORT || 8010;;//REF:https://help.h... |
c['336']=[['337',"VitNX_DockRegion Constructor","topic_00000000000012AB.html",0],['338',"Methods","topic_00000000000012AA_methods--.html",1]]; |
const printSeparatedList = require('./print-separated-list');
const parameters = (node, path, print) =>
node.parameters && node.parameters.length > 0
? printSeparatedList(path.map(print, 'parameters'))
: '';
const EventDefinition = {
print: ({ node, path, print }) => [
'event ',
node.name,
'('... |
'use strict';
var util = require('util'),
ScriptBase = require('../script-base.js'),
path = require('path'),
angularUtils = require('../util.js');
var Generator = module.exports = function Generator() {
ScriptBase.apply(this, arguments);
this.sourceRoot(path.join(__dirname, '../templates'));
if (typeof t... |
require(`dotenv`).config({
path: `.env.${process.env.NODE_ENV}`,
})
console.log(process.env.NODE_ENV)
const contentfulConfig = {
spaceId: process.env.CONTENTFUL_SPACE_ID,
accessToken:
process.env.CONTENTFUL_ACCESS_TOKEN ||
process.env.CONTENTFUL_DELIVERY_TOKEN,
}
// If you want to use the preview API pl... |
'use strict';
describe('TreeNodes.prototype.clone', function() {
var $tree;
var tree;
before(function() {
helpers.createTreeContainer();
// Query DOM
$tree = $('.tree');
// Create tree
tree = new InspireTree({
target: $tree,
data: [{
... |
import {
ANI_CLOSE,
ANI_DURATION
} from './util'
import {
setStatusBarStyle
} from '../../bridge'
let firstBackTime = 0
function quit () {
if (!firstBackTime) {
firstBackTime = Date.now()
plus.nativeUI.toast('再按一次退出应用')
setTimeout(() => {
firstBackTime = null
}, 2000)
... |
from collections import OrderedDict
from datetime import timedelta
import numpy as np
import pytest
from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype
import pandas as pd
from pandas import (
Categorical, DataFrame, Series, Timedelta, Timestamp,
_np_version_under1p14, concat, date_range,... |
// jshint expr:true
"use strict";
var LSM9DS0XM = source("lsm9ds0xm");
describe("Cylon.Drivers.I2C.LSM9DS0XM", function() {
var driver;
beforeEach(function() {
driver = new LSM9DS0XM({
name: "lsm9ds0xm",
connection: {},
pin: 13
});
});
describe("constructor", function() {
it("s... |
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])... |
#!/usr/bin/env node
const pkg = require("./package.json");
const chalk = require("chalk"); // node 8+
require("please-upgrade-node")(pkg, {
message: function (requiredVersion) {
return chalk.red(
`Eleventy requires Node ${requiredVersion}. You’ll need to upgrade to use it!`
);
},
});
const debug = req... |
// Set the date we're counting down to
var countDownDate = new Date("Jun 1, 2020 09:00:00").getTime();
// Update the count down every 1 second
var x = setInterval(function() {
// Get todays date and time
var now = new Date().getTime();
// Find the distance between now an the count down date
var distance = co... |
// @flow
import React, { Component } from 'react';
import { Dialog } from '../../base/dialog';
import { translate } from '../../base/i18n';
import { getLocalParticipant } from '../../base/participants';
import { connect } from '../../base/redux';
import SpeakerStatsItem from './SpeakerStatsItem';
import SpeakerStats... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
'use strict';
/**
* Sets up global variables for React Native.
* You can use this module dir... |
var ThemeSwitcher = function() {
return {
init: function() {
var theme_panel = $(".theme-panel");
switchTheme = function(color) {
$("#style_color").attr("href", "layouts/layout/css/themes/" + color + ".css");
if (color == "day")
$("... |
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
module('Integration | Modifier | basic-scroll', function(hooks) {
setupRenderingTest(hooks);
// Replace this with your real tests.
test(... |
"""mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... |
import * as formHandler from './handler';
const availableHandlers = [
formHandler.checkboxHandler,
formHandler.ckEditorHandler,
formHandler.customAngularSelectHandler,
formHandler.defaultHandler,
formHandler.fileHandler,
formHandler.radioHandler,
formHandler.selectHandler,
formHandler.uploadedFileHandl... |
#!/usr/bin/env python
# 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 writing, software... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.VerticalMenu = exports.Table = exports.RestFlexRoute = exports.PanelHeader = exports.PanelBody = exports.Panel = exports.NotificationManager = exports.NotificationContainer = exports.Modal = exports.InputLabel = exports.Input = expo... |
//// [declarationEmitTypeAliasWithTypeParameters2.ts]
export type Bar<X, Y, Z> = () => [X, Y, Z];
export type Baz<M, N> = Bar<M, string, N>;
export type Baa<Y> = Baz<boolean, Y>;
export const y = (x: Baa<number>) => 1
//// [declarationEmitTypeAliasWithTypeParameters2.js]
"use strict";
exports.__esModule = true;
... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Redirect } from 'react-router-dom';
import { haddleAddTWeet } from '../actions/tweets';
class NewTweet extends Component {
state = {
text: '',
toHome: false
};
handleChange = (e) => {
const text = e.target.valu... |
import mutations from "./mutation";
import getters from "./getters";
import actions from "./action";
const state = {
homeList: {
mix: [],
head: []
},
mixtapeList: [],
listHead: [],
community : {
list: [],
selected: null
},
detailSelected: null,
words: {},... |
module.exports = {
options: {
cache: false
},
dist: {
files: [/*{
expand: true, // Enable dynamic expansion
cwd: 'images/', // src matches are relative to this path
src: ["*.{png,jpg,gif}"], // Actual patterns to ... |
(function () {
var encode = flyingon.create(null);
var decode = flyingon.create(null);
var pow = flyingon.create(null);
var round = Math.round;
encode['&'] = '&';
encode['<'] = '<';
encode['>'] = '>';
encode['\''] = ''';
encode['"'] = '"';
decode['amp... |
/*
* Tell Electrode app archetype that you want to use ES6 syntax in your server code
*/
process.env.SERVER_ES6 = true;
/*
* Tell Electrode app archetype that you want to shorten css names under production env
*/
process.env.ENABLE_SHORTEN_CSS_NAMES = true;
require("electrode-archetype-react-app")();
//
|
/**
* Admin JavaScript
*/
/* Trigger when DOM has loaded */
jQuery( document ).ready( function( $ ) {
var pw = $( 'tr#password' );
if ( pw.length ) {
// Change password hint
pw.next( 'tr' ).find( '.indicator-hint' ).html( 'To make a strong password, it\'s usually best to use a passphrase. Here\'s <a href="ht... |
window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
// window.$ = window.jQuery = require('jquery');
// require... |
export default function sumInputMapper(input, event, context) {
return {
...input,
parameters: {
...input.parameters,
a: Number(input.parameters.query.a),
b: Number(input.parameters.query.b)
}
}
}
|
'use strict';
/**
* egg-validation default config
* @member Config#validation
* @property {String} SOME_KEY - some description
*/
exports.validation = {
};
|
module.exports = {
siteMetadata: {
title: 'Gatsby + Netlify CMS Starter',
description:
'This repo contains an example business website that is built with Gatsby, and Netlify CMS.It follows the JAMstack architecture by using Git as a single source of truth, and Netlify for continuous deployment, and CDN ... |
MobData = {
688: [{ id: "0",name:"スーバン",type:13,inid:0,repop:20,isptboss:0,posx:49.90,posy:217.85, lv_min:0, lv_max:0, is_npc: false },
{ id: "1",name:"ウルフ",type:2,inid:9,repop:120,isptboss:0,posx:120.60,posy:56.53, lv_min:0, lv_max:0, is_npc: false },
{ id: "2",name:"ウルフ",type:2,inid:9,repop:120,isptboss:0,posx:123.... |
import csv
import sys
import calculador_mochila
import time
CONST_NOMBRE = 0
CONST_N = 1
CONST_C = 2
CONST_Z = 3
CONST_TIEMPO = 4
CONST_PRIMERA_LINEA = 5
CONST_ID = 0
CONST_VALOR = 1
CONST_PESO = 2
CONST_SEPARADOR = "-----\n"
if __name__ == '__main__':
if len(sys.argv) != 3:
print('parametro 1: archivo de... |
// Example 1
// pre-defined function
const logGreeting = () => console.log("greetings from inside a callback");
setTimeout(logGreeting, 2000);
// argument-defined function
setTimeout(() => {
console.log("greetings, Arrow");
}, 2000);
// Example 2
const timesTwo = num => num * 2;
const doubledArr1 = [1,2,3].... |
const fs = require("fs");
let css = "";
let path = "client";
let filesNumber = 0;
console.time("in");
function walk(directory) {
const items = fs.readdirSync(directory, { withFileTypes: true });
for (let i = 0; i < items.length; i++) {
if (items[i].isDirectory()) {
walk(directory + "... |
exports.activate = function () {
if (!atom.grammars.addInjectionPoint) return
atom.grammars.addInjectionPoint('source.vcd', {
type: 'preproc_arg',
language (arg) { return 'vcd' },
content (arg) { return arg }
})
}
|
[{"Owner":"Hersir","Date":"2017-04-04T06:05:40Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t_lt_p_gt_\n\tHi_co_ is ti possible to completely remove debug info for release version? I use production Babylon file but still get logs in console.\n_lt_/p_gt_\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_... |
// window.basePath = 'http://localhost:8001'
window.basePath = 'http://www.luckymorning.cn'
window.version = 0;
window.device = 'web';
window.Authorization = localStorage.getItem('Authorization');
window.host = "";
if (localStorage.getItem("userInfo")){
window.userInfo = JSON.parse(localStorage.getItem("userInfo"))... |
import styled from "styled-components"
import { Header2 as H2 } from "atti-components"
const Header2 = styled(H2)`
margin-bottom: ${({ theme }) => theme.spaces.s1};
margin-top: ${({ theme }) => theme.spaces.s3};
`
export default Header2
|
class Node {
constructor(data, next) {
this.data = data;
this.next = next;
}
}
class LinkedList {
constructor() {
this.head = null;
this.tail = null;
this.size = 0;
}
addAtBeginning(element) {
this.head = new Node(element, this.head);
if (!this.tail) {
this.tail = this.head... |
import sdi_utils.gensolution as gs
import sdi_utils.set_logging as slog
import sdi_utils.textfield_parser as tfp
import pandas as pd
import numpy as np
try:
api
except NameError:
class api:
class Message:
def __init__(self,body = None,attributes = ""):
self.body = body
... |
from __future__ import annotations
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeassistant.const import STATE_UNKNOWN
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platfor... |
'use strict';
const room = require('./room');
const piece = require('./piece');
const authentication = require('./authentication');
const user = require('./user');
const Sequelize = require('sequelize');
module.exports = function() {
const app = this;
const sequelize = new Sequelize(app.get('postgres'), {
dial... |
import React, { Component, Fragment } from 'react'
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
UncontrolledDropdown,
DropdownToggle,
DropdownMenu,
DropdownItem,
} from 'reactstrap'
import logo from '../../logo.svg'
import SignOut from '../SignOut'
import { Link } from 'react-router-do... |
const STORE_NAME = 'pptw_settings';
const SETTINGS_LIST = [
{
id: 'update_check',
value: 'checked',
},
{
id: 'update_check_interval',
value: 'value',
},
{
id: 'mute_by_key',
value: 'checked',
},
{
id: 'block_by_key',
value: 'checked',
},
];
const conf... |
# Copyright (c) 2011 OpenStack Foundation.
# 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... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(t,e,n){"use strict";t.exports=n(118)},function(t,e,n){n(44);var r=n(99),o=n(2).publicLoader,i=o.getResourcesForPathname,a=o.getResourcesForPathnameSync,u=o.getResourceURLsForPathname;e.apiRunner=function(t,e,n,o){void 0===e&&(e={}),window.Cypress&&(windo... |
/**
*
* Tests for H1
*
* @see https://github.com/react-boilerplate/react-boilerplate/tree/master/docs/testing
*
*/
import React from 'react';
import { render } from 'react-testing-library';
import { IntlProvider } from 'react-intl';
// import 'jest-dom/extend-expect'; // add some helpful assertions
import H1 fr... |
__author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de'
from pybrain3.rl.environments import Task
from scipy import array
class MDPMazeTask(Task):
""" This is a MDP task for the MazeEnvironment. The state is fully observable,
giving the agent the current position of perseus. Reward is given on reaching
... |
var ImportsModel = require('builder/data/background-importer/imports-model.js');
var UploadModel = require('builder/data/upload-model.js');
var UserModel = require('builder/data/user-model');
var ConfigModel = require('builder/data/config-model');
describe('common/background-polling/imports-model', function () {
bef... |
"""
*********************************************************************
This file is part of:
The Acorn Project
https://wwww.twistedfields.com/research
*********************************************************************
Copyright (c) 2019-2021 Taylor Alexande... |
#!/usr/bin/python3
from modules.PipelineManager import PipelineManager
from modules.ModelManager import ModelManager
from concurrent.futures import ThreadPoolExecutor
from gi.repository import GLib
import time
class RunVA(object):
def __init__(self):
super(RunVA, self).__init__()
ModelManager.load... |
var request = require('request').defaults({jar: true/*, proxy:"http://localhost:8888", strictSSL:false*/}); // use cookies
module.exports = {
SurePetcareApi: SurePetcareApi
}
function SurePetcareApi(config) {
this.email_address = config.email_address;
this.password = config.password;
this.baseURL =... |
import os
INSTALL_SCRIPTS_DIR = 'install-scripts'
PYPIPE_DIR = os.path.join(os.environ['HOME'], '.pypipe')
|
export function has(prop, obj){
if (arguments.length === 1) return _obj => has(prop, _obj)
if (!obj) return false
return obj[ prop ] !== undefined
}
|
/* eslint-disable func-names */
/* eslint quote-props: ["error", "consistent"]*/
/**
* This sample demonstrates a simple skill built with the Amazon Alexa Skills
* nodejs skill development kit.
* This sample supports multiple lauguages. (en-US, en-GB, de-DE).
* The Intent Schema, Custom Slots and Sample Utterances... |
# Copyright (C) 2020. 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... |
var dns = require('../dns');
var question = dns.Question({
name: 'www.google.com',
type: dns.consts.NAME_TO_QTYPE.A
});
var start = new Date().getTime();
var req = dns.Request({
question: question,
server: { address: '8.8.8.8', port: 53, type: 'udp' },
timeout: 1000
});
req.on('timeout', function() {
co... |
from django.forms import ModelForm, ModelChoiceField, HiddenInput
from cards.models import Card, CardInstance
class CardForm(ModelForm):
card = ModelChoiceField(queryset=Card.objects.all(), widget=HiddenInput())
class Meta:
model = CardInstance
def __init__(self, *args, **kwargs):
super... |
// BabblerScriptControlBar.js
var React = require('react');
import {Button, ButtonGroup, Glyph} from 'elemental';
import Babbler from 'babbler-js';
import BabblerScript from 'babbler-script-js';
//import BabblerScript from '../../babbler-script-js/src/babbler-script';
const btnStyle = {
margin: 12,
paddingLeft:... |
import React from "react";
import { colours } from "@times-components-native/styleguide";
import { ArticleSummaryHeadline, ArticleSummaryContent } from "..";
const defaultHeadline = "Sajid Javid to end hostile era for illegal immigrants";
const defaultLabel = "Francis Elliott";
const defaultLink1 =
"https://www.thet... |
var premierDay = moment('18/12/2015', 'DD/MM/YYYY'),
now = moment();
$().ready(function () {
if (now.isBefore(premierDay)) {
$('.answer').append('<p>No</p>');
} else {
$('.answer').append('<p>Yes</p>');
}
});
|
# Copyright The PyTorch Lightning team.
#
# 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 i... |
const m = require("mithril")
module.exports = { view: (vnode) => { return m.trust(`<svg xmlns="http://www.w3.org/2000/svg" width="${vnode.attrs.width || "24"}" height="${vnode.attrs.height || "24"}" viewBox="0 0 24 24" fill="${vnode.attrs.fill || "none"}" stroke="${vnode.attrs.stroke || "currentColor"}" stroke-width="2... |
/**
* @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'codesnippet', 'ko', {
button: '코드 스니펫 삽입',
codeContents: '코드 본문',
emptySnippetError: '코드 스니펫은 빈칸일 수 없습니다.',
language: '언어',
ti... |
"""
Performance of DFT calculation is better when array size = power of 2
arrays whose size is product of 2, 3, and 5 also quite efficient
for performance: ue zero padding
OpenCV - manually pad 0s
Numpy - specify new size of FFT calculation, automatically pads 0s
"""
# to calculate optimal size: use OpenCV func... |
# Copyright 2019-2020 ETH Zurich and the DaCe authors. All rights reserved.
import math
import dace
import polybench
import numpy as np
N = dace.symbol('N')
#datatypes = [dace.float64, dace.int32, dace.float32]
datatype = dace.float64
# Dataset sizes
sizes = [{N: 40}, {N: 120}, {N: 400}, {N: 2000}, {N: 4000}]
args ... |
var searchData=
[
['level_977',['Level',['../class_t_r_a_p_1_1_log.html#ad03369cc0e494c8d9ff384c4e4d7e7fc',1,'TRAP::Log']]],
['linuxwindowmanager_978',['LinuxWindowManager',['../class_t_r_a_p_1_1_application.html#a4986fdbc4890edfd84e12ce4fd534616',1,'TRAP::Application']]]
];
|
'use strict'
const Mgf1 = require('../src/crypto/mgf1')
const assert = require('chai').assert
describe('Mgf1', function () {
describe('with sha-1', function () {
beforeEach(function () {
this.mgf1 = new Mgf1({ hashAlgorithm: 'sha1' })
})
it('generates the correct padding', function () {
con... |
import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'umi'
import { Page } from 'components'
import styles from './index.less'
@connect(({ userDetail }) => ({ userDetail }))
class UserDetail extends PureComponent {
render() {
const { userDetail } = this.props
... |
// Manipulando Arrays
let techs = ['html', 'css', 'js']
// adicionar um item no fim
techs.push('nodejs')
// adicionar no começo
techs.unshift('sql')
// remover do fim
//techs.pop()
// remover do começo
//techs.shift()
// pegar somente alguns elementos do array
// console.log(techs.slice(1, 3))
// remover 1 ou ma... |
if (!window.emp3) {
emp3 = {};
}
if (!window.emp3.api) {
emp3.api = {};
}
/**
* @class
* @extends {emp3.api.MapService}
* @constructor
* @classdesc This class defines the interface to a KML Layer. It requires a
* url that points to a KML data source, a KMZ data source or a blob of KML data.
* The data th... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
import { EMBER_GLIMMER_NAMED_ARGUMENTS } from 'ember/features';
import { compile } from '../../index';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';
if (EMBER_GLIMMER_NAMED_ARGUMENTS) {
moduleFor('ember-template-compiler: assert-reserved-named-arguments (EMBER_GLIMMER_NAMED_ARGUMENTS) ', class... |