text stringlengths 3 1.05M |
|---|
'use strict';
const State = require('./../src/state');
describe('SSFST State Tests', () => {
it('Invoking the constructor should create an instance', () => {
expect(new State()).toEqual(jasmine.any(State));
});
it('Should have "isFinal" property set to false after invoking the constructor, witho... |
const HAPIRestAPI = require('@envage/hapi-pg-rest-api');
module.exports = (config = {}) => {
const { pool, version } = config;
return new HAPIRestAPI({
table: 'idm.kpi_view',
endpoint: '/idm/' + version + '/kpi',
connection: pool,
validation: {}
});
};
|
import React from "react";
import './ListaTareas.css'
function ListaTareas (props){
return (
<section>
<ul>
{props.children}
</ul>
</section>
)
}
export {ListaTareas} |
// the first week of a month includes a thursday, in that month
// (leap days do not effect week-ordering!)
const getFirstWeek = function (s) {
let month = s.month()
let start = s.date(1)
start = start.startOf('week')
let thu = start.add(3, 'days')
if (thu.month() !== month) {
start = start.add(1, 'week')... |
version https://git-lfs.github.com/spec/v1
oid sha256:39fd36e0022b2b06755ab72d1298b78c3f21e2b294fa9a945fac6ab51c96d39f
size 5139
|
import React, { useState, useEffect, useContext } from "react";
import { storeContext } from "./StoreContext";
import DisplayCounter from "./DisplayCounter";
import Button from '@material-ui/core/Button'
export default function Counter (props) {
const appStore = useContext(storeContext);
console.log(appStore);
... |
# Generated by Django 2.1.15 on 2020-02-22 20:34
import django.db.models.deletion
import jsonfield.fields
from django.db import migrations, models
import generic_serializer.serializable_model
class Migration(migrations.Migration):
dependencies = [
('test_app', '0001_initial'),
]
operations = [
... |
/*! cornerstone-web-image-loader - 2.1.1 - 2018-12-05 | (c) 2016 Chris Hafey | https://github.com/cornerstonejs/cornerstoneWebImageLoader */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define ===... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('collector', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Stylesheet',
fields=[
... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import { uniqueId } from './../../libs/utils';
import AssistiveText from './../AssistiveText';
import { Provider } from './context';
import getMaxHeight from './getMaxHeight';
import Description from './de... |
class Weather {
constructor(weatherObj) {
(this.datetime = weatherObj.datetime),
(this.description = weatherObj.weather.description);
}
}
module.exports = Weather;
|
// Set up your root reducer here...
import { combineReducers } from 'redux';
export default combineReducers;
|
export default {
/*
** Single Page Application mode
** Means no SSR
*/
mode: 'spa',
/*
** Headers of the page (works with SPA!)
*/
head: {
title: 'SPA mode with Nuxt',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: '... |
import pandas as pd
import src.modules.preprocessing.nlp_sentence_loader as nl
def test_preprocessed_sentences_sql():
'''
preprocessed_sentences_sql()
Load data from SQL
'''
data = nl.preprocessed_sentences_sql(query = '''SELECT * FROM sentences;''')
assert isinstance(data, pd.DataFrame)
|
// @target: esnext
// @lib: esnext
// @declaration: true
// @allowJs: true
// @checkJs: true
// @filename: uniqueSymbolsDeclarationsInJs.js
// @out: uniqueSymbolsDeclarationsInJs-out.js
// classes
class C {
constructor(){
/**
* @readonly
*/ this.readonlyCall = Symbol();
this.readwriteCall ... |
"""Start Home Assistant."""
import argparse
import os
import platform
import subprocess
import sys
import threading
from typing import List, Dict, Any, TYPE_CHECKING
from homeassistant import monkey_patch
from homeassistant.const import __version__, REQUIRED_PYTHON_VER, RESTART_EXIT_CODE
if TYPE_CHECKING:
from ho... |
var structranges_1_1v3_1_1unwrap__reference__fn =
[
[ "operator()", "structranges_1_1v3_1_1unwrap__reference__fn.html#aa434034a497b1779fcf2c92daa3fe1c8", null ],
[ "operator()", "structranges_1_1v3_1_1unwrap__reference__fn.html#a593e0f69eb48492446847aeed8c51db3", null ],
[ "operator()", "structranges_1_1v3_... |
def scrape(scraper, url):
'''
Utility function which retrieves data from the specified
url and decodes it in the latin-1 format.
'''
return scraper.get(url).content.decode('latin1')
|
import React from 'react';
import {
StyleSheet,
Text,
View,
Image
} from 'react-native';
import pizzaImage from './images/pizza.jpg';
const MenuItem = ({ item, price }) => (
<View style={styles.menuItem}>
<Text style={styles.title}>{item.toUpperCase()}</Text>
<Text style={styles.info}>${price}</Text... |
import React from "react";
import styles from "./PhotoList.css";
export default class PhotoList extends React.Component {
constructor(props) {
super(props);
this.state = {
photos: []
};
}
componentDidMount() {
fetch("/api/photos").then((response) => {
response.json().then((photos) =... |
from fabric.api import local, task
@task
def docs():
"""
Build the Trafo docs.
"""
local('sphinx-build -b html docs/ build/docs')
|
import React, { Component, PropTypes } from 'react';
export default ({ cols, height, onMouseDown, children, resizing }) => {
const styles = resizing ? {display: 'block'} : {display: 'none'}
return (
<div style={{height}} className={`col-sm-${cols} dashboard-column`}>
{children}
<div style={styles} ... |
module.exports = function(CONFIG){
var mongoose = require('mongoose');
var db = mongoose.connection;
db.on('error', console.error.bind(console, 'connection error:'));
db.once('open', function callback(){
console.log('Connected to DB');
});
mongoose.connect(CONFIG.mongo.uri);
return mongoose;
}
|
import React, {Component, Fragment} from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import {
Row, Col,
Button,
UncontrolledButtonDropdown,
DropdownToggle,
DropdownMenu,
Nav,
NavItem,
NavLink,
Progress
} from 'reactstrap';
import {
AreaChart... |
// Composited file - DO NOT EDIT
//----------------------------------------------------------------------
//
// ECMAScript 5 Polyfills
//
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// ES5 15.2 Object Objects
//------... |
export const NO_END = 'Gonna need that end param dawg'
export const END_BIGGER = 'Start can\'t be bigger than end, dawg.'
/**
* Get the factorial of a number.
*
* @param {integer} num The number to add
* @return {integer}
*/
export const factorial = (num) => {
// If we ever reach 0 then the whole thing would en... |
import React from 'react';
import { StaticQuery, graphql } from 'gatsby';
import Lightbox from './lightbox';
const Cars = () => (
<StaticQuery
query={graphql`
query {
carImages: allFile(filter: {sourceInstanceName: { eq: "cars" }}) {
edges {
node {
childImageShar... |
var demoLog = function(message, param) {
// Custom logger for color coded demo logs
console.log(`%cMP Demo: ${message}`, 'color: green; font-size: bold', param);
};
var mediaLog = function(message, param) {
// Custom logger for color coded demo logs
console.log(
`%cMP Media: ${message}`,
'color: purple... |
# uncompyle6 version 2.11.5
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.18 (default, Apr 20 2020, 20:30:41)
# [GCC 9.3.0]
# Embedded file name: Tools\__init__.py
pass |
module.exports = class MemoryCache {
constructor() {
this._gcing = false
this._data = {}
this._tagData = {}
}
_getData(tag) {
if (tag) {
if (!this._tagData[tag]) this._tagData[tag] = {}
return this._tagData[tag]
}
return this._data
}
async clear(name, tag) ... |
from collections.abc import Iterable
import requests
def get_json_object():
"""
Return a json object from Twitter Api, using bearer token.
"""
base_url = "https://api.twitter.com/1.1/friends/list.json"
# input here your bearer token:
bearer_token = ""
search_headers = {
"Authoriz... |
/* ************************************************************************
*
* qooxdoo-compiler - node.js based replacement for the Qooxdoo python
* toolchain
*
* https://github.com/qooxdoo/qooxdoo-compiler
*
* Copyright:
* 2011-2017 Zenesis Limited, http://www.zenesis.com
*
* License:
*... |
$(document).ready(function() {
init();
});
function init() {
let toolTimeline = new TimelineLite({ paused: true });
let duration = 1;
toolTimeline.add(
TweenLite.to("#toolBox", duration, { y: -100, ease: Linear.easeInOut })
);
toolTimeline.add(
TweenLite.to("#weightLifter", duration, { y: -100, ea... |
"use strict";(function(){var a="false";try{a=localStorage.getItem("cookie_prompt_success")}catch(a){}"true"!==a&&($("body").append("\n \n <div class=\"fixed-bottom\" style=\"z-index:99999999999;display:none;\" id=\"gdpr-cookie-notice\">\n <div class=\"row\">\n <div class=\"col-12... |
import * as React from "react"
import { Link, graphql } from "gatsby"
import { getSrc } from "gatsby-plugin-image"
import styled from "@emotion/styled"
import "./styles.css"
import Bio from "../components/Bio"
import Layout from "../components/layout/Layout"
import Seo from "../components/SEO"
require(`katex/dist/kat... |
/* eslint-disable */
import * as THREE from 'three';
/**
* @author mrdoob / http://mrdoob.com/
* @author Mugen87 / https://github.com/Mugen87
*/
const PointerLockControls = function ( camera, domElement ) {
var scope = this;
this.domElement = domElement || document.body;
this.isLocked = false;
... |
module.exports = {
api: {
reddit: 'https://www.reddit.com/r/programming/top/.json',
github: {
repos: 'https://api.github.com/search/repositories',
trending: 'https://github.com/trending',
},
devblogs: {
personal: 'https://awesome-devblog.now.sh/domestic',
team: 'https://awesome... |
from .connector import ButtplugClientConnector, ButtplugClientConnectorError
from ..core.messages import ButtplugMessage
import websockets
import asyncio
import json
from typing import Optional
from logging import getLogger
logger = getLogger("buttplug")
class ButtplugClientWebsocketConnector(ButtplugClientConnecto... |
"""
measure
"""
import numpy as np
def calculate_angle(rA, rB, rC, degrees=False):
# Calculate the angle between three points. Answer is given in radians by default, but can be given in degrees
# by setting degrees=True
AB = rB - rA
BC = rB - rC
theta=np.arccos(np.dot(AB, BC)/(np.linalg.norm(AB)*n... |
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... |
const bcrypt = require("bcrypt");
const User = require("../models/User");
module.exports = {
async createUser(req, res) {
try {
const { email, firstName, lastName, password } = req.body;
const existentUser = await User.findOne({ email });
if (!existentUser) {
const hashPassword = await... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports['default'] = {
// Options.jsx
items_per_page: '/ صفحه',
label_items_per_page: 'Items / page',
jump_to: 'برو به',
jump_to_confirm: 'تایید',
page: '',
// Pagination.jsx
first_page: 'First Page',
last_page: 'Last Pag... |
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
import C from 'ui/utils/constants';
import Component from '@ember/component';
import { set, get, computed, observer } from '@ember/object';
import { alias } from '@ember/object/computed';
import { inject as service } from '@ember/service';
import layout from './template';
export default Component.extend({
intl: ser... |
import React from 'react';
import { Navbar, Nav, NavItem } from 'react-bootstrap';
import npmLogo from '../images/npm-logo.png';
import githubLogo from '../images/github-logo.png';
import '../styles/header.css';
class Navigation extends React.Component {
constructor(props) {
super(props);
this.s... |
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
const BatteryCharging = forwardRef(({ color = 'currentColor', size = 24, ...rest }, ref) => {
return (
<svg
ref={ref}
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
... |
function updraft_delete(key, nonce, showremote) {
jQuery('#updraft_delete_timestamp').val(key);
jQuery('#updraft_delete_nonce').val(nonce);
if (showremote) {
jQuery('#updraft-delete-remote-section, #updraft_delete_remote').removeAttr('disabled').show();
} else {
jQuery('#updraft-delete-remote-section, #updraft_... |
import makeArrayMethod from './shared/makeArrayMethod';
export default makeArrayMethod( 'sort' ).path;
|
# -*- coding: utf-8 -*-
'''
Manage Dell DRAC from the Master
The login credentials need to be configured in the Salt master
configuration file.
.. code-block: yaml
drac:
username: admin
password: secret
'''
# Import python libs
from __future__ import print_function
import logging
try:
... |
/**
* @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/* globals window, document, console */
import ClassicEditor from '../../build/ckeditor';
ClassicEditor.create( document.querySelector( '#e... |
export default {
name: 'ElRow',
componentName: 'ElRow',
props: {
tag: {
type: String,
default: 'div'
},
gutter: Number,
type: String,
justify: {
type: String,
default: 'start'
},
align: {
type: String,
default: 'top'
}
},
computed: {
s... |
import React from "react";
import CopyToClipboard from 'react-copy-to-clipboard';
import IconButton from 'material-ui/IconButton';
import FontIcon from 'material-ui/FontIcon';
import {indigo500} from 'material-ui/styles/colors';
export default class extends React.Component {
render() {
// what to display
... |
"use strict";
// Libs
import $ from "jquery";
import _ from "underscore";
import Backbone from "backbone";
// App Modules
import Router from "./router";
// Start on DOM Ready
$(() => {
new Router();
Backbone.history.start();
}); |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2010 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* http://www... |
/*
Copyright (c) 2014, Kristoffer Brabrand
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... |
var annotated =
[
[ "XV_frmbufwr", "struct_x_v__frmbufwr.html", "struct_x_v__frmbufwr" ],
[ "XV_frmbufwr_Config", "struct_x_v__frmbufwr___config.html", "struct_x_v__frmbufwr___config" ],
[ "XV_FrmbufWr_l2", "struct_x_v___frmbuf_wr__l2.html", "struct_x_v___frmbuf_wr__l2" ]
]; |
/*
* This combined file was created by the DataTables downloader builder:
* https://datatables.net/download
*
* To rebuild or modify this file with the latest versions of the included
* software please visit:
* https://datatables.net/download/#bs-3.3.7/jq-3.2.1/dt-1.10.16/r-2.2.1
*
* Included libraries:
* ... |
export const LOGIN = 'login';
export const LOGOUT = 'logout';
export const REGISTER = 'register';
|
var firebase = require("firebase/app")
const { database } = require("firebase/app");
//dependencies of firebase authentication
require("firebase/auth");
// dependencies of firebase firestore
require("firebase/firestore");
require("firebase/analytics");
// Your web app’s Firebase configuration
var firebaseConfig = {
... |
# License: BSD 3 clause
from scalpel.core.cohort import Cohort
from scalpel.core.cohort_flow import get_steps, cohort_collection_from_cohort_flow
from scalpel.core.cohort_collection import CohortCollection
from scalpel.core.cohort_flow import CohortFlow
from .pyspark_tests import PySparkTest
import pytz
class TestCo... |
//function __getUrl(url){
// var lpId = $("meta[name='id']").attr("content");
// if(lpId){
// url += url.includes('?')?('&lp_id='+lpId):('?lp_id='+lpId);
// }
// return url;
//}
function __buildProp(url, method, data, complete, onError, dataType){
var prop = {
url : url,
type: ... |
import fastapi
import uvicorn
import httpx
app = fastapi.FastAPI()
@app.get("/foobar")
async def foobar():
async with httpx.AsyncClient() as client:
response = await client.get('http://localhost:5001/another_endpoint')
resp = response.json()
return resp
# ------ SETUP OPEN-TELEMETRY FOR FASTA... |
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 ... |
function imprecise(a, b) {
return Math.round(a * 1000) === Math.round(b * 1000);
}
function quartered(a, b) {
const quarter = imprecise((a - b) % 90, 0) || imprecise((a - b - 180) % 90, 0);
const switched = quarter && !(imprecise((a - b) % 180, 0) || imprecise((a - b - 360) % 180, 0));
return [quarter... |
import React from 'react';
import PropTypes from 'prop-types';
export default function TextArea({
name,
label,
className,
onChange,
placeholder
}) {
return (
<label htmlFor={name}>
{label}
<textarea
className={className}
id={name}
name={name}
onChange={onChan... |
/*global defineSuite*/
defineSuite([
'DataSources/CompositeProperty',
'Core/Cartesian3',
'Core/JulianDate',
'Core/TimeInterval',
'Core/TimeIntervalCollection',
'DataSources/ConstantProperty'
], function(
CompositeProperty,
Cartesian3,
... |
import { login, logout, getInfo } from '@/api/login/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
const mutationsType = {
setToken: 'setToken',
setName: 'setName',
setAvatar: 'setAvatar',
setRoles: 'setRoles',
setMenus: 'setMenus'
}
const user = {
state: {
token: getToken(),
... |
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_exempt
from django.core.urlresolvers import reverse, reverse_lazy
from django.http import HttpResponseRedirect, JsonResponse
from django.shortcuts import get_object_or_404
from django.shortcuts import redirect, rende... |
export const CHANGE_SIDEBAR_VISIBILITY = 'CHANGE_SIDEBAR_VISIBILITY';
export const CHANGE_MOBILE_SIDEBAR_VISIBILITY = 'CHANGE_MOBILE_SIDEBAR_VISIBILITY';
export const HIDE_MOBILE_SIDEBAR_VISIBILITY = 'HIDE_MOBILE_SIDEBAR_VISIBILITY';
export const HIDE_SIDEBAR = 'HIDE_SIDEBAR';
//reducer
const initialState = {
show: ... |
const licenseChecker = require('./licenseChecker');
module.exports = licenseChecker;
|
/// Copyright (c) 2009 Microsoft Corporation
///
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
/// that the following conditions are met:
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
/// ... |
import './MovieInfoBar.css';
import FontAwesome from 'react-fontawesome';
import { calcTime, convertMoney } from '../../../helpers';
import React from 'react'
function MovieInfoBar(props) {
return (
<div className="rmdb-movieinfobar">
<div className="rmdb-movieinfobar-content">
... |
webpackJsonp([54],{2096:function(l,n,u){"use strict";function a(l){return e._42(0,[(l()(),e._16(0,0,null,null,12,"ion-header",[],null,null,null,null,null)),e._15(1,16384,null,0,w.a,[y.a,e.p,e.K,[2,K.a]],null,null),(l()(),e._40(-1,null,["\n "])),(l()(),e._16(3,0,null,null,8,"ion-navbar",[["class","toolbar"],["core-ba... |
import pickle
import time
from selenium import webdriver
from bs4 import BeautifulSoup
import re
def getDriver():
driver = webdriver.Chrome()
return driver
def prepareMovieAndBookId():
movieIdSet = set()
bookIdSet = set()
for i in range(20):
fileName = 'userMovi... |
'use strict';
// Use application configuration module to register a new module
ApplicationConfiguration.registerModule('photos-uploader');
|
"""
This file offers the methods to automatically retrieve the graph Dysgonomonas macrotermitis.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--pro... |
import React, { useState } from 'react';
import { useIntl } from 'react-intl';
import { Button, Form, Input } from 'antd';
// API
import { findGroups } from 'network/api';
// Components
import { DataRequestModal } from 'components/App/modals/GroupSearchModal/DataRequestModal';
import { EmptySearch } from './EmptySear... |
function toTitle(val) {
switch (val) {
case 1:
return '费用类型'
default:
return val
}
}
function toValue(val) {
switch (val) {
case '费用类型':
return 1
default:
return val
}
}
function toTitleFilter(val) {
return toTitle(val)
}
function toValueFilter(val) {
return toVal... |
import _ from 'lodash';
import React,{Component} from 'react';
import ReactDOM from 'react-dom';
import YTSearch from 'youtube-api-search';
import SearchBar from './components/search_bar';
import VideoList from'./components/video_list';
import VideoDetail from './components/video_detail';
const API_KEY ='AIzaSyBjZjqqo... |
var mongoose = require('mongoose');
var bcrypt = require('bcrypt');
var UserSchema = new mongoose.Schema({
email: {
type: String,
unique: true,
required: true,
trim: true
},
favoriteBook: {
type: String,
required: true,
trim: true
},
name: {
type: String,
required: true,
... |
import { LOAD_FLIGHTS, LOAD_FLIGHT, ADD_FLIGHT, EDIT_FLIGHT, DELETE_FLIGHT } from './FlightActions';
// Initial State
const initialState = {
data: [],
editedFlight: {
_id: '',
flightNumber: '',
departureDateTime: '',
arrivalDateTime: '',
seatsTotal: '',
price: '',
tourists: [],
ifAppendingTouristPos... |
'use strict';
const { convertToStrapiError } = require('../../errors');
module.exports = async () => {
// set plugin store
const configurator = strapi.store({
type: 'plugin',
name: 'upload',
key: 'settings',
});
strapi.plugins.upload.provider = createProvider(strapi.plugins.upload.config || {});
... |
/*
Copyright 2012 Igor Vaynberg
Version: @@ver@@ Timestamp: @@timestamp@@
This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU
General Public License version 2 (the "GPL License"). You may choose either license to govern your
use of this software only upon the condition th... |
import React from "react";
import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
function Contact() {
return(
<Container>
<Row>
<Col lg={6}>
<div className="box">
<h4>M... |
var path = require("path");
var config = require('../predix-config');
// export the routes to be used in express/json-server in app.js
module.exports = function() {
// mock asset data contains an extra "filter" property, so we can easily match the Predix API.
const routes = {};
// http://localhost:5000/mock-ap... |
'use strict';
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _inherits2 = _interopReq... |
import {createSelector} from 'reselect';
const selectShop = state => state.shop;
export const selectCollections = createSelector(
[selectShop],
shop => shop.collections
)
export const selectCollection = collectionUrlParam => createSelector(
[selectCollections],
collections => collections ? collection... |
import {
KPOP_A2HS_PROMPT_AVAILABLE,
KPOP_A2HS_PROMPT_RESULT,
} from './constants';
const defaultState = {
a2hs: {
available: false,
accepted: null,
outcome: undefined,
},
};
function pwaReducer(state = defaultState, action) {
switch (action.type) {
case KPOP_A2HS_PROMPT_AVAILABLE: {
c... |
import { BUTTON_ICON_POSITION_TOP } from '../constants'
/**
* @param {import('@beatgig/synth-ui').ButtonIconPosition} position
* @returns {boolean}
*/
const iconToTop = (position) => position === BUTTON_ICON_POSITION_TOP
export default iconToTop
|
!function(a,b){"use strict";function c(a,c){var d=this;c=b.extend({chooseText:ccmi18n.chooseUser,loadingText:ccmi18n.loadingText,inputName:"uID",uID:0},c),d.$element=a,d.options=c,d._chooseTemplate=_.template(d.chooseTemplate,{options:d.options}),d._loadingTemplate=_.template(d.loadingTemplate),d._userLoadedTemplate=_.... |
# Copyright 2020 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 l... |
VTABLE(_Main) {
<empty>
Main
}
FUNCTION(_Main_New) {
memo ''
_Main_New:
_T0 = 4
parm _T0
_T1 = call _Alloc
_T2 = VTBL <_Main>
*(_T1 + 0) = _T2
return _T1
}
FUNCTION(main) {
memo ''
main:
_T3 = "hello world"
parm _T3
call _PrintString
}
|
/**
* plugin.js
*
* Released under LGPL License.
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
/*global tinymce:true */
tinymce.PluginManager.add('autolink', function(editor) {
var Auto... |
#!/usr/bin/python
#
# Copyright 2013 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 b... |
import { LOADING_RECIPES } from '../../actions/actions';
export default function loadingRecipes (state = true, action) {
switch (action.type) {
case LOADING_RECIPES:
return action.payload;
}
return state;
}
|
'use strict';
(function() {
// Shows Controller Spec
describe('Shows Controller Tests', function() {
// Initialize global variables
var ShowsController,
scope,
$httpBackend,
$stateParams,
$location;
// The $resource service augments the response object with methods for updating and deleting the resour... |
from allennlp.common.testing import AllenNlpTestCase
from allennlp.common.util import ensure_list
from defx.dataset_readers import DeftSubtask1Reader
class DeftSubtask1ReaderTest(AllenNlpTestCase):
"""Test the implementation of the dataset reader for subtask 1"""
@staticmethod
def check_instances(instan... |
angular.module('insight').run(['gettextCatalog', function (gettextCatalog) {
/* jshint -W100 */
gettextCatalog.setStrings('de_DE', {"(Input unconfirmed)":"(Eingabe unbestätigt)","404 Page not found :(":"404 Seite nicht gefunden :(","<strong>insight</strong> is an <a href=\"http://live.insight.is/\" target=\"_blank... |
const weatherConfig = {
url: 'https://api.openweathermap.org/data/2.5',
key: process.env.OPENWEATHER_API_KEY,
};
const imageConfig = {
url: 'https://api.unsplash.com',
key: process.env.UNSPLASH_API_KEY,
};
const ipConfig = {
url: 'https://geo.ipify.org/api',
key: process.env.IP_API_KEY,
};
export { weath... |
import React from 'react';
import {
Button, Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input, FormText, Col
} from 'reactstrap';
import './recipeInput.css';
import ProcessInput from '../processInput/processInput.js'
export default class RecipeInput extends React.Component {
constructor... |