text
stringlengths
3
1.05M
export const addItem = (item = [], count = 0, next = f => f) => { let cart = []; if (typeof window !== 'undefined') { if (localStorage.getItem('cart')) { cart = JSON.parse(localStorage.getItem('cart')); } cart.push({ ...item, count: 1 }); cart = Array.from(new Set(cart.map(p =...
let integrationPathIdList = []; function createSelectedIntegrationPath(integrationPathId, callback) { serverRequest('/integration?id=' + integrationPathId, 'GET', {}, res => { if (!res.success) return callback(res.error || 'unknown_error'); const integrationPath = res.integration_path; const wrapper = ...
from django.contrib import admin from .models import Colourants # Register your models here. @admin.register(Colourants) class ColourantAdmin(admin.ModelAdmin): list_display = ('colour','pigment', 'chronology_from', 'chronology_to', 'location',)
var host = window.location.hostname + "_v11"; var keys = { AREA_DATA: host + "_001" } const unavaKey = generateCallback('无效key!'); const successCallbackObj = generateCallback('', 1); function generateCallback(message, code = -1, data) { return { code: code, data: data, message: message ...
"""Motion state store and getters.""" from dataclasses import dataclass from typing import List, Optional from opentrons.types import MountType, Point from opentrons.hardware_control.types import CriticalPoint from opentrons.motion_planning import ( MoveType, Waypoint, MotionPlanningError, get_waypoint...
import dotenv from 'dotenv'; import Web3 from 'web3'; import { networks, abi } from '../../dapp/build/contracts/dAppVote.json'; dotenv.config(); export default class Provider { async GetWeb3(req, res) { try { console.log('chamando provider'); const web3 = await new Web3(new Web3.providers.HttpProvi...
import { useRef, useEffect } from 'react' const useCanvas = (draw, image) => { //setup canvas ref const canvasRef = useRef(null); useEffect(() => { // establecemos la referencia const canvas = canvasRef.current; const context = canvas.getContext('2d'); //pintamos d...
from traits.api import HasTraits, Instance, DelegatesTo, Float, Range, Property from traitsui.api import View, Item, Group, VGroup from reservoir import Reservoir class ReservoirState(HasTraits): """Keeps track of the reservoir state given the initial storage. For the simplicity of the example, the release i...
import deep_coffee import deep_coffee.image_proc import deep_coffee.image_proc.crop_beans
// source: proto/admpb/systemnumber.proto /** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb ...
/** * @file 点编辑模式 * @author mengke01(kekee000@gmail.com) */ define( function (require) { var lang = require('common/lang'); // 移动步频 var stepMap = { left: [-1, 0], right: [1, 0], up: [0, -1], down: [0, 1] }; function onC...
var map = Ember.EnumerableUtils.map, trim = Ember.$.trim; var dispatcher, select, view; module("Ember.Select", { setup: function() { dispatcher = Ember.EventDispatcher.create(); dispatcher.setup(); select = Ember.Select.create(); }, teardown: function() { Ember.run(function() { dispat...
// Initializes the `layers` service on path `/layers` const createService = require('feathers-sequelize') const createModel = require('../../models/layers.model') const hooks = require('./layers.hooks') module.exports = function (app) { const Model = createModel(app) const paginate = app.get('paginate') const o...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Nov 12 16:07:58 2018 @author: nmei in exp2 (e2) there were 3 possible awareness ratings ( (e.g. 1- no experience, 2 brief glimpse 3 almost clear or clear perception) BUT if can make a binary classification by focussing on 1 and 2 which are the majority...
(function ($) { "use strict"; // Start of use strict // Smooth scrolling using jQuery easing $('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function () { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var target = $(this....
# Generated by Django 2.1.1 on 2018-11-08 09:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('qwsite', '0001_initial'), ] operations = [ migrations.AlterField( model_name='education', name='date', f...
import urllib.request import random from bs4 import BeautifulSoup from requests import get import mysql.connector conn = mysql.connector.connect(user="root", passwd="",host="localhost", database="product") cursor = conn.cursor() sql = """INSERT INTO comcleanserd (about, rate, top, comment, dari) VALUES (%s, %s, %s, ...
var NAVTREEINDEX9 = { "permissions_8hpp.html#ab183028e0a6f2c28f63dc83b3f2308e7":[2,0,0,0,0,1,6,25], "permissions_8hpp.html#ab31c9362922d24c766609b661c199a96":[2,0,0,0,0,1,6,0], "permissions_8hpp.html#abb4061d49497135328a6592b90ccac5b":[2,0,0,0,0,1,6,37], "permissions_8hpp.html#ac17b2aadbc683a691b4600d0c3655acd":[2,0,0,...
const express = require("express"); const helmet = require("helmet"); const cors = require("cors"); const apiRouter = require("./api/apiRouter.js"); const server = express(); server.use(cors()); server.use(helmet()); server.use(express.json()); server.use(ken); server.use("/api", apiRouter); server.get("/status",...
var jspb=require("google-protobuf"),goog=jspb,global=Function("return this")(),google_api_annotations_pb=require("../../../../../google/api/annotations_pb.js");goog.object.extend(proto,google_api_annotations_pb),goog.exportSymbol("proto.google.ads.googleads.v4.errors.ResourceCountLimitExceededErrorEnum",null,global),go...
def ssm_add_param(ssm_client, ssm_param, old_param=None): """Add a secret to parameter store.""" def check_updateable_params(ssm_param, old_param): """Helper function to check if parameter has been modified.""" values_changed = [ ssm_param["Value"] != old_param["Parameter"]["Value"], ssm_param["...
/* generates a schema based on the database models * for GraphQL using graphql-compose */ const { schemaComposer } = require('graphql-compose'); const { queries, mutations, subscriptions, _relationships, } = require('./index'); // Add fields to root queries if (Object.keys(queries).length) { schemaComposer...
"use strict"; // 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 // "Lice...
const codeBlocks = require('gfm-code-blocks'); const merge = require('lodash/merge'); const includes = require('lodash/includes'); const get = require('lodash/get'); const trim = require('lodash/trim'); const md5 = require('blueimp-md5'); const self = {}; self.parseBlock = (content) => { const parsedCodeBlocks = ...
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
from datetime import datetime, timezone, tzinfo, timedelta from typing import Optional import pytest import ois_api_client as ois from ois_api_client.v3_0 import dto, namespaces as ns from ois_api_client.serialization.serialize_header import serialize_header from ois_api_client.xml.get_full_tag import get_full_tag from...
import axios from "axios"; export const Server = axios.create({ responseType: "json", });
"use strict" const websocket = require('websocket-stream') const WebSocketServer = require('ws').Server const Connection = require('mqtt-connection') const http = require('http') const request = require('request-promise-native'); const envVariables = { appName: process.env.APPLICATION_NAME, oauthUrl: process.env.O...
from freenect2 import Device, FrameType import numpy as np def main(): device = Device() frames = {} with device.running(): for type_, frame in device: frames[type_] = frame if FrameType.Color in frames and FrameType.Depth in frames: break rgb, depth = f...
<!DOCTYPE html> <html lang='zh-CN'> <head> <meta charset='utf-8'> <meta name='viewport' content='maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,width=device-width,initial-scale=1.0'/> <link rel='stylesheet' type='text/css' href='../css/bootstrap.min.css' /> <link rel='stylesheet' href='../css/gith...
// // @material-ui/icons // import Dashboard from "@material-ui/icons/Dashboard"; // import Person from "@material-ui/icons/Person"; // import LibraryBooks from "@material-ui/icons/LibraryBooks"; // import BubbleChart from "@material-ui/icons/BubbleChart"; // import LocationOn from "@material-ui/icons/LocationOn"; // i...
import app from '../../app'; import { product } from '../helpers/productarray'; import { Order } from '../helpers/productarray'; import { Prods } from '../models/productsModel'; const chaiHttp = require('chai-http'); const chai = require('chai'); const should = chai.should(); chai.use(chaiHttp); const testproduct ...
from collections import OrderedDict import re import xml.etree.ElementTree as ET from html.parser import HTMLParser import ftfy import unicodedata import lxml.etree as etree class OrderedDefaultListDict(OrderedDict): def __missing__(self, key): self[key] = value = [] return value none_to_empty_...
// Earlier Params are Available to Later Default Params function welcome(name, greeting, message = greeting + " " + name) { return [name, greeting, message]; } console.log(welcome("Sean", "Hi")); // ["Sean", "Hi", "Hi Sean"] console.log(welcome("Sean", "Hi", "Happy Birthday!")); // ["Sean", "Hi", "Happy Birthday!"]
#encoding: utf-8 import urllib, urllib2, difflib, logging, datetime from time import mktime from django.utils.translation import ugettext_lazy from django.utils.translation import ugettext as _ from django.utils import simplejson as json from django.views.generic.list_detail import object_list, object_detail from djang...
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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, merg...
import logging import environ # --- BASE --- root = environ.Path(__file__) - 2 env = environ.Env() BASE_DIR = root() DEBUG = env('DEBUG', default=False) ALLOWED_HOSTS = env.list('ALLOWED_HOSTS', default=[]) SITE_ID = env('SITE_ID', default=1) SECRET_KEY = env('SECRET_KEY') WSGI_APPLICATION = 'config.wsgi.applicati...
import React ,{ Component } from 'react'; import "../Header/Header.scss"; import { NavLink } from "react-router-dom"; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faTrello } from "@fortawesome/free-brands-svg-icons"; import { faHome, faSearch, faPlus, faInfoCircle, faBell } from "@fortawes...
var assert = require('yeoman-assert') var helpers = require('yeoman-test'); var path = require('path'); var fs = require('fs'); describe('test extension generation', function () { this.timeout(10000); it('generate the hello world extension', function (done) { const name = 'hello-world-test'; h...
import React, { Component, PureComponent } from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { Link } from 'react-router'; class Showcase extends PureComponent { constructor(props, context) { super(props, context); } render() { const { item, itemData, width =...
import {$, activePage} from './dollar.js' import {AudioLoader} from './audioloader.js' import {PageManager} from './pagemanager.js' import * as utils from './utils.js' export function Mushra (config) { PageManager.call (this, config) // Stop audio activePage('.mushra-stop').on('click', function () { this.lo...
const { MessageEmbed, Client, Interaction, MessageActionRow, MessageButton } = require("discord.js") module.exports = { name: "acceptDevRules", /** * * @param {Client} client * @param {Interaction} interaction * @returns */ async execute (client, interaction) { // if (i...
/** * @fileoverview 触控板 * @authors Tony.Liang <pillar0514@gmail.com> * @description 提供touch操作和指向标记 */ define('mods/view/touchPad',function(require,exports,module){ var $ = require('lib'); var $view = require('lib/mvc/view'); var $touchPadModel = require('mods/model/touchPad'); var $socket = require('mods/chan...
import csv from collections import defaultdict from tqdm import tqdm import tfkit.utility.tok as tok def get_data_from_file(fpath): tasks = defaultdict(list) task = 'default' tasks[task] = [] with open(fpath, encoding='utf') as csvfile: for i in tqdm(list(csv.reader(csvfile))): sou...
""" test_domain_c ~~~~~~~~~~~~~ Tests the C Domain :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import zlib from xml.etree import ElementTree import pytest from sphinx import addnodes from sphinx.addnodes import desc from sphinx.do...
this.NesDb = this.NesDb || {}; NesDb[ 'E68E0734B127FF92B93A2DCA7F466C90929165D0' ] = { "$": { "name": "Joshua & the Battle of Jericho", "class": "Unlicensed", "catalog": "WT-JC-6", "publisher": "Wisdom Tree", "developer": "Wisdom Tree", "region": "USA", "players": "1", "date": "1992" }, "cartridge":...
valores = [] index = 0 for c in range(0, 5): valor = int(input(f'Digite um valor para a posição {index}: ')) valores.append(valor) index += 1 print('-=-' * 15) print(f'Você digitou os valores {valores}.') print(f'O maior valor digitado foi {max(valores)} nas posições ', end='') for i, v in enumerat...
(function(){"use strict";var n=function(n){THREE.MeshLambertMaterial.call(this);this.depthTest=!1;this.depthWrite=!1;this.side=THREE.FrontSide;this.transparent=!0;this.setValues(n);this.oldColor=this.color.clone();this.oldOpacity=this.opacity;this.highlight=function(n){n?this.color.setRGB(1,1,0):(this.color.copy(this....
import PropTypes from "prop-types" import React from "react" const Checkbox = props => ( <div className="checkbox"> <label> <input className="checkbox" type="checkbox" checked={props.checked} onChange={props.onChange} /> {props.label} </label> </div> ) Chec...
const { Schema, model } = require("mongoose"); const userSchema = new Schema( { userName: { type: String, unique: true, required: true, trimmed: true, }, email: { //Must match a valid email address (look into Mongoose's matching v...
const { Command, util: { toTitleCase, codeBlock } } = require('klasa'); module.exports = class extends Command { constructor(...args) { super(...args, { runIn: ['text'], permissionLevel: 6, guarded: true, subcommands: true, description: language => language.get('COMMAND_CONF_SERVER_DESCRIPTION'), ...
const Obj = require("../models").ContactAttempt; module.exports = { async index(req, res) { return await Obj.findAll({ order: [['createdAt', 'DESC']], attributes: {exclude: ["createdAt", "updatedAt"]} }) .then(lista => res.status(201).json({ retorno: 0, mensagem: `Total: ${lista.length}`, lista: lista...
webpackHotUpdate('static/development/pages/_app.js', { /***/ './node_modules/css-loader/dist/cjs.js?!./node_modules/next/dist/compiled/postcss-loader/index.js?!./src/styles/global.css': /*!*****************************************************************************************************************************...
import currencies from '../currencies'; import { CURRENCIES, CURRENCIES_PRICE } from '../../actions/document'; import { SORT_CURRENCIES_BY, FILTER_BY } from '../../actions/command'; describe('currencies reducer', () => { const state = { list: [ { CoinInfo: { Id: '1182', Name: '...
import { RECORD_CREATE_ATTEMPT, RECORD_CREATE_SUCCESS, RECORD_CREATE_FAIL, RECORD_CREATE_SET_VALUE, RECORD_CREATE_RESET, } from '../ActionTypes'; import { sessionTimeout } from '../../../../Routing/Store/Actions'; import { AuthenticatedFetch } from '../../../../Util/fetch'; import { dashboardLoading, showDash...
/* Native method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max, nativeMin = Math.min; /** * Checks if `n` is between `start` and up to but not including, `end`. If * `end` is not specified it is set to `start` with `start` then set to `0`. * * @static * @member...
# coding: utf-8 # In[5]: import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt # # 投资数据4invest.csv(提取的特征) # > 实验发现,所有被投资的企业在EID中都没有出现,所有随意每一个企业只有投资数据,没有被投资数据,而且不能构造新的训练数据 # 1. 企业投资企业的数量, TZ_CNT # 2. 投资企业在省内的个数,TZ_INHOME_CNT # 3. 投资企业在省内的个数的比例,TZ_INHOME_RATE # 4. 投资企业在省外的个数,TZ...
import { expect } from 'chai'; import React, { Component } from 'react'; import PropTypes from 'subschema-prop-types'; import ValueManager from 'subschema-valuemanager'; import {newSubschemaContext} from 'subschema'; import { byComponent, change, intoWithContext } from 'subschema-test-support'; describe('subschema/tar...
'use strict'; const BoundAsync = require(process.env.CSSVC_BACKEND_ROOT + '/shared/server_utils/bound_async'); const CodeStreamAPITest = require(process.env.CSSVC_BACKEND_ROOT + '/api_server/lib/test_base/codestream_api_test'); class CommonInit { init (callback) { BoundAsync.series(this, [ CodeStreamAPITest.pr...
"use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been cal...
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
export const getNextPost = ({ state, api }) => api.getPost(state.posts.list.length + 1)
/** * The main class that is needed once per scroll container. * * @class * * @example * // basic initialization * var controller = new ScrollMagic.Controller(); * * // passing options * var controller = new ScrollMagic.Controller({container: "#myContainer", loglevel: 3}); * * @param {object} [o...
const spawn = require('child_process').spawn; const exec = require('child_process').exec; const os = require('os'); const defaultOptions = { onBuildStart: [], onBuildEnd: [], onBuildExit: [], dev: true, verbose: false, safe: false, swallowError: false }; export default class WebpackShellPlugin { const...
var fs = require("fs"); const webpack = require('webpack'); const config = require('./webpack.config'); module.exports = env => { let header = fs.readFileSync('./tampermonkey-headers.js', 'utf8'); header = header.replace('VERSION', process.env.TM_VERSION); // set by the build process on Travis console.log('C...
import { LOADING, API_SUCCES, API_ERROR, CLOSE_SNACKBAR } from './constants'; export function loading() { return { type: LOADING, }; } export function apiSuccesAction(action) { return { type: API_SUCCES, action, }; } export function apiErrorAction(error) { console.log('error en actions ', error)...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { var Controller = { index: function () { // 初始化表格参数配置 Table.api.init({ extend: { index_url: 'third/index' + location.search, ...
import time from datetime import datetime from serpent.enums import InputControlTypes from serpent.frame_grabber import FrameGrabber from serpent.game_agent import GameAgent from serpent.input_controller import KeyboardKey from .super_ml import super_agent from .super_ml import super_reward class SerpentSuperAIsaacG...
/**************************************************************************** Copyright (c) 2010-2012 cocos2d-x.org Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011 Zynga Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this sof...
# Unit testing import unittest # Operating system import os # regular expression library import re # safe queue import sys if (sys.version_info > (3, 0)): from queue import Queue else: from Queue import Queue # Time utility import time # Serp API client from serpapi.google_search_results import GoogleSearch...
!function(e){const t=e.sv=e.sv||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Align center":"Centre...
import React, { Component } from 'react' import { reduxForm, Field } from 'redux-form' import { connect } from 'react-redux' import PropTypes from 'prop-types'; import Messages from '../notifications/Messages' import Errors from '../notifications/Errors' // include our widgetRequest action import { widgetCreate, widg...
# test_ciphers.py # # Copyright (C) 2006-2019 wolfSSL Inc. # # This file is part of wolfSSL. # # wolfSSL is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) a...
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['BoxCox'] , ['Lag1Trend'] , ['NoCycle'] , ['ARX'] );
import React, { Component } from "react"; import logo from "./logo.svg"; import "./App.css"; import UploadFile from "./UploadFile"; class App extends Component { render() { return ( <div className="App"> <header className="App-header"> <img src={logo} className="App-logo" alt="logo" /> ...
from privapi.fakers import ( _full_name_, _date_, _id_, _key_, _company_business_id_, _company_, _bank_account_, _first_name_, _last_name_, _address_, _bban_, _city_, _country_, _country_code_, _ssn_, _email_, _phone_number_, _gender_, _building_number_, _iban_, _postal_code_, _state_, _street_, _province_,...
define(["exports", "foo"], function (_exports, _foo) { "use strict"; Object.defineProperty(_exports, "__esModule", { value: true }); Object.keys(_foo).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (key in _exports && _exports[key] === _foo[key]) return; _exp...
import getBandcampId from '#/actions/api/bandcamp_id/get' export default function ({ artist, track }) { this.error = null this.isLoading = true const bandcampIdArgs = { model: 'track', artist, title: track } const handleSuccess = response => { this.isLoading = false const idData = resp...
import Candidate from './candidate'; /** * Modelo para candidatos a diputos de parlacen * * @class Model.Parlacen * @extends Model.Candidate */ export default Candidate.extend({ // Atributes // Tipo de elección type: 'parlacen', typeCommonName: 'parlacen', electionName: 'Diputados Parlacen' });
const gulp = require('gulp') const stylelint = require('gulp-stylelint') module.exports = function(config) { return function() { return gulp.src(config.stylelint.css).pipe( stylelint({ failAfterError: false, reporters: [ { ...
var miniExcludes = { "hcb-faq/README.md": 1 }, amdExcludes = { }, isJsRe = /\.js$/, isTestRe = /\/test\//; var profile = { resourceTags: { test: function(filename, mid){ return isTestRe.test(filename); }, miniExclude: function(filename, mid){ return isTestRe.test(filename) || mid in miniExcludes; ...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import * as co from '../colors'; import * as u from '../util'; import makeMesh from '../mesh'; import * as geo from '../geometry'; import makeLife from '../life'; export default function block(ctrl, play, id) { const { camera } = ctrl; const { width, height } = ctrl.data.game; const bWidth = 20; const colB...
import ReactDOM from 'react-dom' import React from 'react' import store from './store' import { Provider } from 'react-redux' import Routes from 'routes' import 'index.scss' ReactDOM.render( <Provider store={store}> <Routes /> </Provider>, document.getElementById('root') )
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ComponentViewBuilder = void 0; var _View = require("./View"); var _SerializeError = require("../SerializeError"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var ...
import { OrderedMap, Map } from 'immutable'; import uuid from 'uuid'; import { ADD_VACCINATION, FETCH_VACCINATIONS_SUCCESS, } from '../constants/actions'; export default (state = OrderedMap(), action) => { switch (action.type) { case ADD_VACCINATION: return state.set(uuid(), Map({ id: action.va...
import test_data import json #Creates and returns a GameLibrary object(defined in test_data) from loaded json_data def make_game_library_from_json( json_data ): #Initialize a new GameLibrary game_library = test_data.GameLibrary() #Loop through the json_data #Create a new Game object from the json_...
var webdev = { language: "Python", position: "senior", experience: ["Designer", "Web Developer"], //added a method: add: function(x, y) { return x + y; } }; console.log(webdev.add(10,5));
exports.up = async function (db) { await db.runSql(` ALTER TABLE matchmaking_ratings ADD COLUMN wins integer DEFAULT 0; `) await db.runSql(` ALTER TABLE matchmaking_ratings ADD COLUMN losses integer DEFAULT 0; `) // Migrate existing users. Sort of a hack to avoid needing to query into game re...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import TextAreaFieldGroup from '../common/TextAreaFieldGroup'; import { addComment } from '../../actions/postActions'; class CommentForm extends Component { constructor(props) { super(props)...
var json_PendudukPrasejahtera_2 = { "type": "FeatureCollection", "name": "PendudukPrasejahtera_2", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, "features": [ { "type": "Feature", "properties": { "PraSjthra": 2800.0, "Sejahtera1": 6993.0, "Sejahtera2": 11893.0, "Kec": "Ungaran Ba...
define(['dart_sdk', 'packages/angular/di.template', 'packages/angular_components/model/selection/selection_container.template', 'packages/angular_components/model/selection/selection_model.template', 'packages/angular_components/model/selection/selection_options.template', 'packages/angular_components/model/selection/s...
from django.conf import settings from .exeline import Exeline from .formatter import ApiFormatter from .filterer import ApiFilterer from ..models import User, Contract class Updater(object): def format_and_add_to_db(self, unformatted_members): members = ApiFormatter().format_response_list(unformatted_mem...
/** * Manager handling the keyboard and mouse/touch events. * * @author Alain Pitiot * @version 2020.2 * @copyright (c) 2017-2020 Ilixa Ltd. (http://ilixa.com) (c) 2020 Open Science Tools Ltd. (https://opensciencetools.org) * @license Distributed under the terms of the MIT License */ import {MonotonicClock, Clo...
import React from "react" import styled from "styled-components" import Link from "./Link" const StyledButton = styled(Link)` text-decoration: none; display: inline-block; white-space: nowrap; margin-top: 0.5rem; padding: 0.5rem 0.75rem; font-size: 1rem; border-radius: 0.25em; text-align: center; ` c...
'use strict'; const fs = require('fs'); const process = require('process'); module.exports = (username) => { return new Promise((resolve, reject) => { if (process.platform === 'win32') { return reject('This module doesn\'t work on Windows systems'); } else { fs.readFile('/etc/passwd', (err, ...
from .rest import RestClient class DeviceCredentials(object): """Auth0 connection endpoints Args: domain (str): Your Auth0 domain, e.g: 'username.auth0.com' token (str): An API token created with your account's global keys. You can create one by using the token generator in the ...
import React from "react"; import { Modal } from "react-bootstrap"; import Typography from "../Typography/Typography"; import { ReactComponent as ClockImage } from '../../assets/icons/icon/ClockImg.svg'; import { ReactComponent as PencilSvg} from '../../assets/icons/icon/Pencil.svg'; import { ReactComponent as CloseSvg...
/** * This is the main entrypoint to your Probot app * @param {import('probot').Application} app */ module.exports = app => { app.on('issues.opened', async context => { let { assignees, body, labels, user } = context.payload.issue; // Convert newlines to match our local template string. body = body.re...
import React, { useEffect, useState } from 'react' import { useLocation, useHistory } from 'react-router-dom' import { useSelector, useDispatch } from 'react-redux' import { CHeader, CToggler, CButton, CInputGroup, CInputGroupPrepend, CInputGroupText, CInput, CLabel, CModal, CCardHeader, CModalBod...