text
stringlengths
3
1.05M
const toggleLoading = prevState => ({ loading: !prevState.loading }); // const a = prevState => ({ loading: !prevState.loading }); // todo delete this, just for eslint second val export { toggleLoading };
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _config = _interopRequireDefault(require("../config")); var _nodeFetch = _interopRequireDefault(require("node-fetch")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: ...
mycallback( {"_record_type": "fec.version.v7_0.TEXT", "FILER COMMITTEE ID NUMBER": "C00461061", "REC TYPE": "TEXT", "TEXT4000": "Earmarked through ActBlue", "TRANSACTION ID NUMBER": "TIDTA562", "_src_file": "2011/20110504/727407.fec_5.yml", "BACK REFERENCE TRAN ID NUMBER": "IDTA562", "BACK REFERENCE SCHED / FORM NAME":...
/** * Description: Basic console log, error and warn. */ console.log('hello world'); console.log('hello %s', 'world'); console.error(new Error('Whoops, something bad happened')); const name = 'Will Robinson'; console.warn(`Danger ${name}! Danger!`);
// Modules import base64 from "base-64"; // Services import StorageService from "./storage-service"; import Permissions from "../stores/permissions"; // Get Role const getRole = () => { let role = StorageService.getLocalData("role"); return base64.decode(role); }; // Set Role const setRole = role => { if (role...
import React, { Component } from 'react' import NavigationBar from './navigation/index' class HomePage extends Component { render() { return ( <div> <NavigationBar /> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam eu urna tincidunt, luctus ante ut, ultrices quam. Etiam l...
/// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the /// "Use Terms"). Any redistribution of this code must retain the above /// copyrigh...
'use strict'; /** * Checks if `value` is greater than or equal to `other`. * * @static * @since 3.9.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is greater than or equal to * `other`, else `false`. *...
from direct.gui.DirectGui import * from pandac.PandaModules import * from direct.directnotify import DirectNotifyGlobal from otp.otpbase import OTPLocalizer from otp.otpbase import OTPGlobals from pirates.piratesgui import PDialog from pirates.piratesgui import PiratesGuiGlobals from pirates.piratesbase import PiratesG...
import pickle from dagster_azure.adls2.utils import ResourceNotFoundError from dagster import Field, IOManager, StringSource, check, io_manager from dagster.utils import PICKLE_PROTOCOL _LEASE_DURATION = 60 # One minute class PickledObjectADLS2IOManager(IOManager): def __init__(self, file_system, adls2_client...
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.HttpRequest = void 0; const axios_1 = __importDefault(require("axios")); const ActionResult_1 = ...
'use strict' var message = 'It looks like you are trying to import `git-format-staged`. This module does not export a Javascript library - it is just a CLI program.' console.info(message) module.exports = message
import machine st7789=machine.st7789() st7789.init() ov2640=machine.ov2640() ov2640.init() buf=bytearray(320*240*2) demo=machine.demo_face_detect()
#!/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")...
var data=[['20070430',2.945], ['20070508',2.885], ['20070509',2.754], ['20070510',2.786], ['20070511',2.667], ['20070514',2.651], ['20070515',2.514], ['20070516',2.696], ['20070517',2.831], ['20070518',2.754], ['20070521',2.741], ['20070522',2.715], ['20070523',2.872], ['20070524',2.820], ['20070525',2.897], ['20070528...
module.exports = function toReadable (number) { if (number == 0) return 'zero'; //array from 0..19 let smallNumbers = [ '', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', ...
module('lively.morphic.ObjectMigration').requires('lively.morphic.Serialization', 'cop.Layers').toRun(function() { Object.extend(LivelyMigrationSupport, { moveFileFromTo: function(sourceURL, destURL, onFinish, fixLinks, dryRun, log) { log = log || alertOK; var from = new WebResource(sourceURL).for...
var talib = require('talib') module.exports = function trix(s, timeperiod) { return new Promise(function(resolve, reject) { // create object for talib. only close is used for now but rest might come in handy if (!s.marketData) { s.marketData = { open: [], close: [], high: [], low: [], volume: [] } ...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import errno import logging import os import random import signal import socket import sys import time import traceback import warnings from datetime import timedelta from rq.compat imp...
// 引入 express 并且创建一个 express 实例赋值给 app var express = require('express') var app = express() var bodyParser = require('body-parser') app.use(bodyParser.json()) // 配置静态文件目录 app.use(express.static('static')) // 加载 blog.js 模块 const blog = require('./model/blog') const comment = require('./model/comment') var sendHtml =...
from moto import mock_ssm from ssm.cli import load from tests.fixtures import aws_credentials, ssm, ssm_put_parameter, runner from tests.fixtures import ssm_parameters, ssm_empty_parameters, load_command_parameters_output def test_load_output_without_params(runner, ssm, ssm_empty_parameters): with runner.isolated...
/* Задание 4 * Напиши функцию countTotalSalary(employees) принимающую объект зарплат. * Функция считает общую сумму запрплаты работников и возращает ее. * Каждое поле объекта, передаваемого в функцию, имеет вид "имя":"зарплата". */ const countTotalSalary = function (employees) { // твой код let values = Object...
# Author: Fabio Rodrigues Pereira # E-mail: fabior@uio.no # Author: Per Morten Halvorsen # E-mail: pmhalvor@uio.no # Author: Eivind Grønlie Guren # E-mail: eivindgg@ifi.uio.no try: from Oblig2.packages.preprocessing import load_embedding, TSVDataset from Oblig2.packages.preprocessing import pad_batches ...
import { LightningElement, track } from 'lwc'; //import Name from '@salesforce/book__c/Name'; // import server side apex class method import getBooksByName from '@salesforce/apex/LibrarySearch.getBooksByName'; export default class BookSearch extends LightningElement { @track searchData; errorMsg; strSearc...
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d...
var venueDetails = function (version, isPrimary, notExpandable) { var mapAddress = [ // if lat or long are not specified, map will be generated by address { "id": "line1", "path": "address" }, { "id": "line2", "path": "address" }, { ...
import React, { useState } from "react"; import 'bootstrap/dist/css/bootstrap.css'; import './Register.css'; import { useHistory } from "react-router-dom"; function Register(props) { let history = useHistory(); const backUrl = "https://wheelsuniandes.herokuapp.com"; const wsUrl = "wss://wheelsuniandes.herokuap...
import React from 'react'; import ModalAdd from '../src/components/ModalAdd'; import {action} from '@storybook/addon-actions'; import {Wrapper} from './ui'; import {withA11y} from '@storybook/addon-a11y'; export default { title: 'ModalAdd', component: ModalAdd, decorators: [withA11y], }; export const Basic = (...
"""Class for downloading and ingestion of data for running regression tests. The output of these classes is a directory of TFRecord files ready for decoding experiments. Note, this code assumes the following data flow Internet data file -> Download -> cache_dir (local copy of original data) cache_dir -> Ingestion...
// @link https://schemas.toofab.com/json-schema/toofab/notify/request/get-notification-response/1-0-0.json# import Fb from '@gdbots/pbj/FieldBuilder'; import GdbotsPbjxResponseV1Mixin from '@gdbots/schemas/gdbots/pbjx/mixin/response/ResponseV1Mixin'; import Message from '@gdbots/pbj/Message'; import Schema from '@gdbot...
import re def prepare_input_from_constituency_tree(constituency_tree): cons_tree = ConsTree([]) tree = cons_tree.read_tree(constituency_tree[5:-1]) tree.close_unaries() tree.left_markovize(dummy_annotation="") const = cons_tree.linearize_parse_tree(str(tree)) clean_const = re.sub(r'\(([^ ]+) '...
'use strict'; var colName = "daemons"; var grpConfCol = "daemon_grpconf"; var async = require("async"); var fs = require('fs'); function validateId(soajs, cb) { BL.model.validateId(soajs, cb); } function checkReturnError(req, mainCb, data, cb) { if (data.error) { if (typeof (data.error) === 'object' && (data.err...
#!encoding: utf-8 """ Base classes for agents and actions. """ class Agent(): def __init__(self, name): self._name = name def get_name(self): return self._name def reset(self): pass def take_actions(self, game, phase): raise NotImplementedError class Action(): ...
// eslint-disable-next-line import { UserLayout, BasicLayout } from '@/layouts' import { bxAnaalyse } from '@/core/icons' const RouteView = { name: 'RouteView', render: (h) => h('router-view') } export const asyncRouterMap = [ { path: '/', name: 'index', component: BasicLayout, ...
const oBanner = document.querySelector('.banner'); const pic = document.querySelectorAll('.banner ul li'); const btn = document.querySelectorAll('.banner ol li'); const leftBn = document.querySelector('.leftBn'); const rightBn = document.querySelector('.rightBn'); let index = 0 for (let i = 0; i < btn.length; i++) { ...
import PhoneNumber from './PhoneNumber' import Email from './Email' import Address from './Address' export { Address, PhoneNumber, Email, }
import networks import losses import utilities import trainingdata import config
import Ember from 'ember'; import { module, test } from 'qunit'; import { setupRenderingTest } from 'ember-qunit'; import { render } from '@ember/test-helpers'; import hbs from 'htmlbars-inline-precompile'; import {basicMockUser} from '../../helpers/mock-data'; module('Integration | Component | presence-indicator', f...
# # Copyright 2019-2020 Lukas Schmelzeisen # # 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 t...
// Ionic Starter App // angular.module is a global place for creating, registering and retrieving Angular modules // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) // the 2nd parameter is an array of 'requires' angular.module('starter', ['ionic']) .run(function($...
// Copyright 2019 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 // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
import React, { useState, useEffect } from 'react' import PropTypes from 'prop-types' import { navigate } from 'gatsby' import styled from 'styled-components' import Avatar from '@material-ui/core/Avatar' import Button from '@material-ui/core/Button' import MUICard from '@material-ui/core/Card' import CircularProgress ...
# qubit number=3 # total number=12 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collectio...
var app = angular.module('app', ['ui.router', 'ui.bootstrap', 'flash','ngSanitize', 'ngAnimate', 'angularModalService', //main modules 'login', 'dashboard']); app.config(['$stateProvider', '$locationProvider', '$urlRouterProvider', function ($stateProvider, $locationProvider, $urlRouterProvider, $modalInsta...
import Ember from 'ember-metal/core'; import { get } from 'ember-metal/property_get'; import { set } from 'ember-metal/property_set'; import run from 'ember-metal/run_loop'; import { computed } from 'ember-metal/computed'; import EmberObject from 'ember-runtime/system/object'; import ArrayProxy from 'ember-runtime/syst...
(function () { QUnit.module('Where'); var Observable = Rx.Observable, TestScheduler = Rx.TestScheduler, SerialDisposable = Rx.SerialDisposable, onNext = Rx.ReactiveTest.onNext, onError = Rx.ReactiveTest.onError, onCompleted = Rx.ReactiveTest.onCompleted, subscribe = Rx.ReactiveTest.subscrib...
import mongoose from "mongoose"; const { Schema } = mongoose; let Profile = null; try { const ProfileSchema = new Schema({ user: { type: Schema.Types.ObjectId, ref: "users" }, handle: { type: String, required: true, max: 40 }, location: { type: String }, ...
from typing import List, Optional, Union from pydantic import BaseModel, HttpUrl class ShortUser(BaseModel): thumbnail: HttpUrl username: Optional[str] display_name: str share_link: Optional[HttpUrl] class ShortData(BaseModel): id: Union[int, str] artist: Optional[str] name: Optional[str] ...
import React from 'react' import Link from 'gatsby-link' import OnTrakLogo from '../elements/OnTrakLogo' import FormCallback from '../components/FormCallback' import AssessmentEntryCard from '../components/AssessmentEntryCard' import ChatPrompt from '../components/ChatPrompt' import '../stylesheets/pages/get-started....
import time from collections import OrderedDict import os from django.conf import settings from django.template import loader from contents.models import ContentCategory from goods.models import GoodsChannel def generate_static_index_html(): """ 生成静态的主页html文件 """ print('%s: generate_static_in...
if __name__ == "__main__": from tests.block_tools import BlockTools, test_constants from wheat.util.default_root import DEFAULT_ROOT_PATH # TODO: mariano: fix this with new consensus bt = BlockTools(root_path=DEFAULT_ROOT_PATH) new_genesis_block = bt.create_genesis_block(test_constants, b"0") ...
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test block processing.""" import copy import struct import time from test_framework.blocktools import ...
/** * Copyright 2011 Microsoft Corporation * * 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...
/** * @class Oskari.userinterface.request.ModalDialogRequest */ Oskari.clazz .define('Oskari.userinterface.request.ModalDialogRequest', function (title, message, buttons, onshow) { this._title = title ? title : "Untitled"; this._message = message ? message : "Lorem ipsum"; ...
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Defines the {@link CKEDITOR.env} object, which constains * environment and browser information. */ if ( !CKEDITOR.env ) { /** * @namespace Enviro...
# 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 ...
import React from "react"; import 'bootstrap'; import '../../scss/app.scss'; import Template from './template'; import FixtureInputField from "./fixture_input_field" import FixtureOutputField from "./fixture_output_field" class HomePage extends React.Component { constructor(props) { super(props); t...
(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}c...
import unittest import unittest import rttov import h5py import rmodel import logging import glob import rttovgui_unittest_class import sys class Test(rttovgui_unittest_class.RttovGuiUnitTest): def setUp(self): level_logging = logging.DEBUG self.p = rmodel.project.Project() logging.basic...
# Generated by Django 4.0.2 on 2022-02-22 13:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
(function(){"use strict";var e=function(e){return!!(e&&e!==null)},t=/^(\-|\+)?([0-9]+(\.[0-9]+)?|Infinity)$/,n=function(e){e=e.toLowerCase();return e==="true"||e==="false"};var i=function(e,i,o){var r="return ",s=function(e,i){if(t.test(e)){return"Number(values["+i+"]),"}else if(n(e)){return"Boolean(values["+i+"].toLow...
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types")):"function"==typeof define&&define.amd?define(["exports","react","prop-types"],t):t(e.reactI18next={},e.React,e.PropTypes)}(this,function(e,t,n){"use strict";function r(e,t){return e===t?0!==e||0!==t||1/...
import React, { Component } from "react"; import { connect } from "react-redux"; import { bindActionCreators } from "redux"; import { getAllapiarios, detalhesApiario } from "../../redux/actions/apiarioActions"; import ModalDetalhesMap from "../ModalDetalhesMap"; import ModalApiario from "../../pages/Dashboard/subpa...
define('lodash/_copySymbolsIn', ['exports', 'lodash/_copyObject', 'lodash/_getSymbolsIn'], function (exports, _copyObject, _getSymbolsIn) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * Copies own and inherited symbols of `source` to `object`. * * @private ...
import React, { useEffect, useContext } from "react"; import { ProblemContext } from "./context/ProblemContext"; import axios from "axios"; import { Table } from 'react-bootstrap'; import 'bootstrap/dist/css/bootstrap.min.css'; import { useParams } from "react-router-dom"; import { format } from 'timeago.js' ...
import React from 'react' import Img from './index' export default stories => stories .add('デフォルト', () => <Img src="/mock/images/img01.jpg" width="128" heigth="72" />)
module.exports = { parser: "@typescript-eslint/parser", // Specifies the ESLint parser extends: [ "plugin:@typescript-eslint/recommended", // Uses the recommended rules from the @typescript-eslint/eslint-plugin "prettier/@typescript-eslint", // Uses eslint-config-prettier to disable ESLint rules from @types...
# Generated by the protocol buffer compiler. DO NOT EDIT! # sources: ibc/applications/transfer/v1/genesis.proto, ibc/applications/transfer/v1/query.proto, ibc/applications/transfer/v1/transfer.proto, ibc/applications/transfer/v1/tx.proto # plugin: python-betterproto from dataclasses import dataclass from typing import...
const express = require("express"); const Joi = require("joi"); const Boom = require("@hapi/boom"); const bcrypt = require("bcryptjs"); const uuidv4 = require("uuid/v4"); const jwt = require("jsonwebtoken"); const { graphql_client } = require("../graphql-client"); const User = require("./mail/user"); const axios = requ...
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. const { Client } = require('@microsoft/microsoft-graph-client'); /** * This class is a wrapper for the Microsoft Graph API. * See: https://developer.microsoft.com/en-us/graph for more information. */ class GraphClient {...
import objc from Foundation import * from LaunchServices import * import DropboxDetect from lib.utils import detect_dropbox_folder, get_pref, set_pref, share_url from lib.windows import UpShotWindowController DEFAULTS = { 'launchAtStartup': True, 'autoupdate': True, # Check for updates periodically. 'ra...
//From: https://stackoverflow.com/questions/27936772/how-to-deep-merge-instead-of-shallow-merge function isObject(item) { return (item && typeof item === 'object' && !Array.isArray(item)); } export default function deepMerge(target, source) { let output = Object.assign({}, target); if (isObject(target) && isObj...
/**! * easyPieChart * Lightweight plugin to render simple, animated and retina optimized pie charts * * @license Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * @author Robert Fleischmann <rendro87@gmail....
from django.contrib.auth import SESSION_KEY from django.core.cache import cache from django.conf import settings from django.http import HttpResponse, HttpResponseServerError from proxy_server.response import AJAX_REQUEST import httplib, json, proxy_server def invoke_backend_service(method, function_path, json_data=di...
# -*- coding: utf-8 -*- """Public section, including homepage and signup.""" from flask import (Blueprint, request, render_template, flash, url_for, send_from_directory, make_response, redirect, current_app) import datetime from flask_login import login_user, login_required, logout_user from dice.e...
const dateformat = require('dateformat') const html = require('../../../html') module.exports = function (state, prev, send) { const params = state.params const mailbox = params.mailbox const messages = state[mailbox].messages return html` <div> <div class="db cf w-100"> <div class="fl mb3 w-...
// 변수 myName에 '동현'을 대입 let myName = "동현"; // myName의 값을 console로 출력 console.log(myName); let myString = "동현"; // 문자열 let currentDate = new Date(); // 현재 날짜 let myFunction = () => console.log("함수 확인"); // 함수 // 대입값 변경 let name = "펭귄"; name = "고래"; console.log(name); // 숫자 타입 변수 간에는 덧셈과 뺄셈 계산 가능 // 문자열 타입 변수 간에는 결합이 가...
import React from "react" import { useStaticQuery, graphql } from "gatsby" const getData = graphql` { site { info: siteMetadata { title author data description } } } ` export const Content = () => { const data = useStaticQuery(getData) return ( <div> ...
$(document).ready(function () { $("#form_login").submit(function (event) { $("#alerta").html(""); $.ajax({ url: 'login/validate', type: 'POST', data: $(this).serialize(), beforeSend: function () { $("#botonIniciar").val("Validando dat...
import React from 'react'; import PropTypes from 'prop-types'; import { gql } from '@apollo/client'; import { graphql } from '@apollo/client/react/hoc'; import { Add } from '@styled-icons/material/Add'; import { Close } from '@styled-icons/material/Close'; import { difference, get, pick } from 'lodash'; import memoizeO...
import React from 'react'; import createSvg from '../utils/createSvg'; export default createSvg(<g><path d="M10.18 9"/><path d="M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z"/></g>, 'AirplanemodeActive');
### IMPORT # il file di run da importare è nella cartella pgr/, padre di quella corrente import sys sys.path.append('../pgr') import imghdr import os from flask import Flask, render_template, request, redirect, url_for, abort, \ send_from_directory from werkzeug.utils import secure_filename import zipfile import j...
/* eslint-env mocha */ const ITERATIONS = 10000 const mc = require('../') const states = mc.states const testDataWrite = [ { name: 'keep_alive', params: { keepAliveId: 957759560 } }, { name: 'chat', params: { message: '<Bob> Hello World!' } }, { name: 'position_look', params: { x: 6.5, y: 65.62, stance: 67.24,...
import graph from collections import defaultdict def find_parent(parent, vertex): if parent[vertex] == vertex: return vertex else: return find_parent(parent, parent[vertex]) def union(parent,rank,x,y): xroot = find_parent(parent, x) yroot = find_parent(parent, y) if rank[xroot] ...
import React from 'react'; import PropTypes from 'prop-types'; import exact from 'prop-types-exact'; import {Alert, CustomInput, Input} from 'reactstrap'; import {PlaygroundContext} from '../../../app'; export class PlaygroundInput extends React.PureComponent { static propTypes = { name: PropTypes.stri...
import { eyesItInstance } from '../../test/utils/eyes-it'; import { breadcrumbsTestkitFactory } from '../../testkit/protractor'; import { waitForVisibilityOf } from 'wix-ui-test-utils/protractor'; import { getStoryUrl } from '../../test/utils/storybook-helpers'; describe('Breadcrumbs', () => { const storyUrl = getSt...
def setBit(num, k): return num | (1 << k) inp = raw_input('enter the number and kth bit separated by commas:') nums = inp.split(',') print 'the number after setting kth bit is', setBit(int(nums[0]), int(nums[1])) # time complexity = O(logn)
/* @flow strict-local */ import { applyMiddleware, compose, createStore } from 'redux'; import type { Store } from 'redux'; import thunkMiddleware from 'redux-thunk'; import { createLogger } from 'redux-logger'; import createActionBuffer from 'redux-action-buffer'; import { createReactNavigationReduxMiddleware } from '...
import React, { useState } from 'react'; import { View, StyleSheet, Text, Image, Dimensions, TouchableOpacity, TextInput, ImageBackground, Alert } from 'react-native'; import PushNotification from "react-native-push-notification"; import { useDispatch, useSelector } from '...
var __awaiter=this&&this.__awaiter||function(t,e,i,r){function n(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function s(t){try{h(r.next(t))}catch(t){o(t)}}function a(t){try{h(r["throw"](t))}catch(t){o(t)}}function h(t){t.done?i(t.value):n(t.value).then(s,a)}h((r=r.app...
from sense_hat import SenseHat sense = SenseHat() sense.clear() sense.set_pixel(2, 2, (0, 0, 255)) sense.set_pixel(4, 2, (0, 0, 255)) sense.set_pixel(3, 4, (100, 0, 0)) sense.set_pixel(1, 5, (255, 0, 0)) sense.set_pixel(2, 6, (255, 0, 0)) sense.set_pixel(3, 6, (255, 0, 0)) sense.set_pixel(4, 6, (255, 0, 0)...
class Instructions { constructor(inst) { this.instructions = inst; this.ip = 0; } *[Symbol.iterator]() { while(this.ip < this.instructions.length) { yield this.instructions[this.ip]; this.ip++; } } insert(command) { ...
var utils = require('./utils') var config = require('../config') var isProduction = process.env.NODE_ENV === 'production' module.exports = { loaders: utils.cssLoaders({ sourceMap: isProduction ? config.build.productionSourceMap : config.dev.cssSourceMap, // extract: isProduction }), postcss: ...
import axios from 'axios' /** * ACTION TYPES */ const SET_CATEGORIES = 'SET_CATEGORIES' const ADD_CATEGORY = 'ADD_CATEGORY' const REMOVE_CATEGORY = 'REMOVE_CATEGORY' /** * INITIAL STATE */ const initialState = [] /** * ACTION CREATORS */ const setCategories = categories => ({type: SET_CATEGORIES, categories}) ...
# Generated by Django 2.0.3 on 2018-08-07 10:47 import json from django.db import migrations from django.contrib.postgres import fields from saleor.page.models import Page from saleor.product.models import Collection, Category def get_linked_object_kwargs(object): return {"pk": object.pk, "slug": object.slug} ...
"use strict";(self.webpackChunksolidapp=self.webpackChunksolidapp||[]).push([[662],{662:(d,r,c)=>{c.r(r),c.d(r,{ForecastModule:()=>p});var a=c(9808),s=c(9291),t=c(5e3);const u=[{path:"",component:(()=>{class o{constructor(){}}return o.\u0275fac=function(e){return new(e||o)},o.\u0275cmp=t.Xpm({type:o,selectors:[["app-fo...
/* */ "format global"; 'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); return (i == -1) ? 0 : n.length - i - 1; } f...
"use strict"; const dashify = require("dashify"); const leven = require("leven"); // eslint-disable-next-line no-restricted-modules const { default: chalk } = require("../../../vendors/chalk.js"); // eslint-disable-next-line no-restricted-modules const prettier = require("../../index.js"); const { optionsNormalizer } ...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Link = undefined; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target...
/** * Change light color to match when another entity changes its color. */ AFRAME.registerComponent('light-color-copy', { schema: { mute: {default: true}, target: {type: 'selector'} }, init: function () { var el = this.el; this.data.target.addEventListener('componentchanged', function changeCo...