text stringlengths 3 1.05M |
|---|
"use strict";
// 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 agre... |
import React from 'react';
import { Link as RouterLink, useNavigate } from 'react-router-dom';
import * as Yup from 'yup';
import { Formik } from 'formik';
import {
Box,
Button,
Container,
Grid,
Link,
TextField,
Typography,
makeStyles
} from '@material-ui/core';
import FacebookIcon from 'src/icons/Faceb... |
# -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright 2017, Battelle Memorial Institute.
#
# 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... |
import React, { useEffect, useState } from "react";
import PropTypes from "prop-types";
// import Utils from "@televisadigital/nxtv-utilities";
import { HeaderDropDown, LoginProfile, LogOut } from "../../items";
import { Anchor, Button, Icons, Form, Modal } from "../../accessories";
import Animate from "../../helpers/a... |
const express = require('express');
var bodyParser = require('body-parser');
const redis = require("redis");
const redisClient = redis.createClient(
15827,
"redis-15827.c264.ap-south-1-1.ec2.cloud.redislabs.com",
{ no_ready_check: true }
);
const route = require('./routes/route.js');
const app = expres... |
// Copyright 2018 Jonah Snider
const { Command } = require('discord.js-commando');
const config = require('../../config');
const rp = require('request-promise-native');
const diceAPI = require('../../providers/diceAPI');
module.exports = class RefundTransactionCommand extends Command {
constructor(client) {
super(... |
from django.db import models
class Item(models.Model):
"""To do item to show"""
title = models.CharField(max_length=255, unique=True)
done = models.BooleanField(default=False)
def __str__(self):
return self.title
|
'use strict';
exports = module.exports = function (ourDb, theirDb, count) {
function callback0() {
global.gc();
ourTest(ourDb, count, callback1);
}
function callback1() {
global.gc();
theirTest(theirDb, count, callback2);
}
function callback2() {
var closedCount = 0;
ourDb.on('close', closed).close()... |
(function(factory){if(typeof module==="object"&&typeof module.exports!=="undefined"){module.exports=factory}else{factory(FusionCharts)}})(function(FusionCharts){(function(modules){var installedModules={};function __webpack_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var ... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
'use strict';
var Base = require('azure-iot-mqtt-base').Mqtt;
var results = require('azure-iot-common').results;
var errors = require('azure-iot-common').errors;
var E... |
export { default } from 'rsg-components/Markdown/Checkbox/CheckboxRenderer'; |
import aiohttp
from typing import Callable, Dict, Iterable, List, Mapping, Any, Set
import json
import logging
import pkg_resources
import re
import os
import pathlib
import requests
from datetime import datetime, timedelta
from bs4 import BeautifulSoup # type: ignore
from typing import Union, Optional
logger = loggi... |
mycallback( {"CONTRIBUTOR OCCUPATION": "Diagnostic Radiologist", "CONTRIBUTION AMOUNT (F3L Bundled)": "150.00", "ELECTION CODE": "", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "Radiological Assoc. of Sacramento", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "1501 Chalupa Pl", "CONTRIBUTOR MIDDLE NAME": "", "DONOR... |
import game_2048 from "./game_2048.js";
const {left, right, up, down} = game_2048;
const print_boards = function (b1, b2) {
const string_rows_1 = b1.map(String);
const string_rows_2 = b2.map(String);
const padding = [" ", " --\\ ", " --/ ", " "];
const output = padding.map(
(p, ... |
from abc import ABC, abstractmethod
class Clothes(ABC):
@abstractmethod
def calculate(self):
pass
class Coat(Clothes):
def __init__(self, size: float):
self.size = size
@property
def calculate(self):
return round(self.size / 6.5 + 0.5, 2)
class Costume(Clothes):
de... |
/*************
**** <config>
**/
stepIn = 20; // delay when fading in
stepOut = 20; // delay when fading out
/*
** set to true or false; true will
** cause all links to fade automatically
***/
autoFade = true;
/*
** set to true or false; true will cause all CSS
** classes with "fade" in them to fade onmous... |
'use strict';
// /**
// * Synchronize zooming through the setExtremes event handler.
// */
// function syncExtremes(e) {
// var thisChart = this.chart;
//
// if (e.trigger !== 'syncExtremes') { // Prevent feedback loop
// window.charts.forEach( function (chart) {
// if (chart !== thisChar... |
'use strict';
const lowkie = require('lowkie');
const Schema = lowkie.Schema;
const ObjectId = Schema.ObjectId;
const scheme = {
id: ObjectId,
entitytype: String,
email: {
type: String,
unique: true,
},
password: String,
first_name: String,
last_name: String,
phone: String,
stat... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
__version__ = "1.3.1"
|
# coding: utf-8
"""
Copyright 2016 SmartBear Software
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... |
'use strict';
var grunt = require('grunt');
/*
======== A Handy Little Nodeunit Reference ========
https://github.com/caolan/nodeunit
Test methods:
test.expect(numAssertions)
test.done()
Test assertions:
test.ok(value, [message])
test.equal(actual, expected, [message])
test.notEqual(actua... |
// https://leetcode.com/problems/binary-tree-level-order-traversal-ii/
// Runtime: 72 ms, faster than 90.78% of JavaScript online submissions for Binary Tree Level Order Traversal II.
// Memory Usage: 38.7 MB, less than 7.45% of JavaScript online submissions for Binary Tree Level Order Traversal II.
/**
* Definition ... |
"use strict";
///////////////////////////////////////////////////////////
// Constants
///////////////////////////////////////////////////////////
var CARD_SLIDE_DURATION_MS = 450;
var DONATION_LINK_VARIETIES = 6;
var DONATION_PAGE_VARIETIES = 5;
var BUG_REPORT_MAX_SIZE = 0.74 * 1024 * 1024;
var OPTIONS_INIT_RETRY_DE... |
import Vue from "vue";
import Cloudbase from "@cloudbase/vue-provider";
export default async () => {
const envId = await fetch("/nuxt-ssr-echo/")
.then(response => response.json())
.then(data => data.envId);
Vue.use(Cloudbase, {
env: envId
});
};
|
(function ($) {
angular.module('designer').requires.push('expander', 'sfSelectors');
angular.module('designer').controller('SimpleCtrl', ['$scope', 'propertyService', function ($scope, propertyService) {
var emptyGuid = '00000000-0000-0000-0000-000000000000';
var sortOptions = ['PublicationDat... |
(function () {
'use strict';
angular
.module('app')
.directive('straboNestingTabDirective', straboNestingTabDirective);
function straboNestingTabDirective() {
return {
'restrict': 'AE',
'replace': true,
'templateUrl': 'app/spot/nesting/nesting-tab.directive.html'
};
}
}()); |
(window.webpackJsonp=window.webpackJsonp||[]).push([[569],{hcM1:function(e,o,t){var n,p,i;!function(c){if("object"==typeof e.exports){var s=c(0,o);void 0!==s&&(e.exports=s)}else p=[t,o],void 0===(i="function"==typeof(n=c)?n.apply(o,p):n)||(e.exports=i)}((function(e,o){"use strict";Object.defineProperty(o,"__esModule",{... |
$(document).ready(function(){
SIS.validacionGeneral('form-general'); //form general porq con ese id lo creamos al form
});
var f=new Date();
var a=f.getFullYear();
var m=f.getMonth()+1;
var d=f.getDate();
m=(m<10)?"0"+m:m;
d=(d<10)?"0"+d:d;
var fechaactual=a+"-"+m+"-"+d;
$('#fecha_esp').flatpickr({
... |
const Discord = require('discord.js');
module.exports = {
name: "unlock",
category: "mod",
aliases: ['unlock', 'destravar'],
async run(client, message, args) {
if (!message.member.hasPermission("MANAGE_CHANNELS")) return message.reply("<a:no:792088988785311754> | Você não tem a permissão `MANAGE_CHANNELS` p... |
from dataclasses import dataclass
from broadcaster import Broadcast
broadcast = None
async def get_broadcast():
global broadcast
if not broadcast:
broadcast = Broadcast("memory://")
await broadcast.connect()
return broadcast
@dataclass
class Context:
broadcast: Broadcast
|
/**
* Copyright 2017 Google Inc.
*
* 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... |
module.exports = {
User: require('./User')
} |
function original() {
function f(n){return n==0?1:n*f(n-1)}a=arguments[0];return f(2*a)/((a+1)*f(a)*4)
}
function solve() {
function fact(num) {
return num == 0 ? 1 : num * fact(num - 1);
}
input = arguments[0];
var answer = fact(2 * input) / (fact(1 + input) * fact(input) * 2);
return... |
// Copyright (c) 2016, Dataent Technologies and contributors
// For license information, please see license.txt
dataent.ui.form.on('Workflow Action', {
refresh: function(frm) {
}
});
|
"""
Serializers to convert API data to and from the database
"""
from django.contrib.auth.hashers import make_password
from django.contrib.auth.models import User
from rest_framework.serializers import ModelSerializer
from .models import Profile, UserPhoto
class UserSerializer(ModelSerializer):
"""
A seriali... |
module.exports = {
siteMetadata: {
title: `Nick EATS`,
description: `New Restaurant Site built with gatsbyjs.`,
author: `Nicholas Wease`,
},
plugins: [
`gatsby-plugin-react-helmet`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname... |
import webpack from 'webpack'
import path from 'path'
import HtmlWebpackPlguin from 'html-webpack-plugin'
export default {
entry: {
app: process.env.NODE_ENV === 'production' ? [
'./src/js/app.js',
] : [
'webpack-dev-server/client?http://localhost:8080',
'./src/js/app.js',
],
},
res... |
/**
* Copyright 2019, SumUp Ltd.
* 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 wri... |
// @flow
const eventListenerList = require('./eventListenerList.js'),
SublimeObject = require('./SublimeObject.js')
/**
* Note that many of these events are triggered by the buffer underlying the view, and thus the method is only called once, with the first view as the parameter.
*
* [sublime_plugin.EventLi... |
function formatDate(date) {
return new Intl.DateTimeFormat().format(new Date(date));
}
export const formatDateTime = (date) => {
if(!date){
return null
}
return new Intl.DateTimeFormat('en-us', { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "numeric", hour12: t... |
// @flow
import type {TypedState} from '../reducer'
export type NodeCB = (err: ?any, result: ?any) => void
export type SagaGenerator<Yield, Actions> = Generator<Yield, void, Actions>
export type Buffer<T> = {
isEmpty: () => boolean,
put: (msg: T) => void,
take: () => T,
}
export type Channel<T> = {
take: (c... |
'use strict';
const common = require('../common');
const assert = require('assert');
const tick = require('./tick');
const initHooks = require('./init-hooks');
const { checkInvocations } = require('./hook-checks');
const binding = process.binding('http_parser');
const HTTPParser = binding.HTTPParser;
const CRLF = '\... |
const pkg = require('../template/package.json');
const fs = require('fs-extra');
module.exports = (targetPkg, name, program) => new Promise((resolve, reject) => {
const customContent = {
author: program.author || '',
version: '0.0.0',
name: name,
license: program.license || ''
};
if (fs.existsSync(targetPk... |
# -*- coding: utf-8 -*-
###############################################################################
#
# AllExercises
# Retrieves a list of all exercises in the Khan Academy library.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");... |
var nnet_to_raw_nnet_8cc =
[
[ "main", "nnet-to-raw-nnet_8cc.html#a0ddf1224851353fc92bfbff6f499fa97", null ]
]; |
Ext.define('KitchenSink.view.binding.Formula', {
extend: 'Ext.form.Panel',
// <example>
otherContent: [{
type: 'ViewModel',
path: 'modern/src/view/binding/FormulaModel.js'
}],
// </example>
viewModel: 'binding-formula',
shadow: true,
cls: 'demo-solid-background',
... |
# Copyright 2013: Mirantis 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... |
from math import inf
# Input Arguments for Ranking & Crowding Distance calculation
# F : The list of objective functions
# X_in : The sample population in the form of 2D list of dimension X_in[pop_size][num_of_params]
# Rest are self-explanatory
class Individual:
def __init__(self, idx, X, F):
... |
from gi.repository import Gtk, GdkPixbuf
from typing import Any
from pkg_resources import resource_filename
from ocrd_browser import __version__
from ocrd_browser.model import Document
@Gtk.Template(filename=resource_filename(__name__, '../resources/about-dialog.ui'))
class AboutDialog(Gtk.AboutDialog):
__gtype_n... |
import Sequelize, { Model } from 'sequelize';
class Recipient extends Model {
static init(sequelize) {
super.init(
{
name: Sequelize.STRING,
street: Sequelize.STRING,
number: Sequelize.STRING,
complement: Sequelize.STRING,
state: Sequelize.STRING,
city: Seque... |
'use strict';
// FIXME not really a unit test
// FIXME npm should be stubbed
// TODO Test for local module... what does it even mean?
const os = require('os');
const path = require('path');
const fs = require('fs');
const test = require('tap').test;
const mkdirp = require('mkdirp');
const rimraf = require('rimraf');
... |
"use strict";var KTPortletDraggable={init:function(){$("#kt_sortable_portlets").sortable({connectWith:".kt-portlet__head",items:".kt-portlet",opacity:.8,handle:".kt-portlet__head",coneHelperSize:!0,placeholder:"kt-portlet--sortable-placeholder",forcePlaceholderSize:!0,tolerance:"pointer",helper:"clone",cancel:".kt-port... |
from .activity import ActivityCount |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const wrapIcon_1 = require("../utils/wrapIcon");
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 ... |
'''
This is the input node that receives spikes and converts to Baxter joint angles.
'''
import argparse
from brian_multiprocess_udp import BrianConnectUDP
def from_spikes_to_baxter(spikes_pipe_in, spikes_pipe_out):
"""
This function substitutes the run_brian_simulation and converts the received spikes in... |
/*!
* Copyright 2013 Apereo Foundation (AF) Licensed under the
* Educational Community 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://opensource.org/licenses/ECL-2.0
*
* Unless required by applicab... |
const Alexa = require('ask-sdk-core');
const util = require('./util');
const ScheduleTripApiHandler = {
canHandle(handlerInput) {
return util.isApiRequest(
handlerInput, 'com.ubertravel.scheduleTrip');
},
handle(handlerInput) {
const destination = util.getApiArguments(handlerInp... |
import React, { Component } from 'react';
import './ActorPage.scss';
import { withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import getActorPageData from '../../actions/pages/getActorPageData';
import Slider from '../Slider'
import PreviewItem from '../PreviewItem'
import noPoster from '.... |
const multer = require('multer')
const { v1: uuid } = require('uuid')
const MIME_TYPE_MAP = {
'image/png': 'png',
'image/jpeg': 'jpeg',
'image/jpg': 'jpg'
}
const fileUpload = multer({
limits: 500000,
storage: multer.diskStorage({
destination : (req, file, cb) => {
cb(null, 'up... |
var producto_table = $('#producto-table').DataTable({
"ajax": APP_URL+"/producto/getJson",
"responsive": true,
"processing": true,
"info": true,
"showNEntries": true,
"dom": 'Bfrtip',
lengthMenu: [
[ 10, 25, 50, -1 ],
[ '10 filas', '25 filas', '50 filas', 'Mostrar todo' ]
... |
# Copyright 2020 Box Robotics, Inc.
#
# 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 writin... |
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate... |
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict
* @format
*/
'use strict';
/**
* Determine if a given value is an object that implements the `RelayEnvironment`
* in... |
window.onload = function () {
const lf = new LogicFlow({
container: document.querySelector('#app'),
edgeTextDraggable: true,
nodeTextDraggable: true,
metaKeyMultipleSelected: true,
grid: {
type: 'dot',
size: 20,
},
keyboard: {
enabled: true,
},
snapline: true,
}... |
(function() {
var output = PUBNUB.$('output'),
input = PUBNUB.$('input'),
button = PUBNUB.$('button'),
avatar = PUBNUB.$('avatar'),
presence = PUBNUB.$('presence');
var channel = 'mchat';
// Assign a random avatar in random color
avatar.className = 'face-' + ((Ma... |
pbjsChunk([40],{100:function(e,r,a){a(101),e.exports=a(102)},101:function(e,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.spec=void 0;var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Sym... |
const themes = {
default: {
title_color: "2f80ed",
icon_color: "4c71f2",
text_color: "333",
bg_color: "ffffff00",
border_color: "e4e2e2",
},
default_repocard: {
title_color: "2f80ed",
icon_color: "586069", // icon color is different
text_color: "333",
bg_color: "fffefe",
},
... |
import {analyser, audio} from './audio';
mapboxgl.accessToken = 'pk.eyJ1IjoiY3R3aGl0ZSIsImEiOiItb0dqdUlZIn0.4Zb1DGESXnx0ePxMVLihZQ';
export const map = new mapboxgl.Map({
style: 'mapbox://styles/mapbox/dark-v9',
// center: [-78.9002, 35.9939],
center: {
lng: -74.00649562332922,
lat: 40.708113... |
import React from "react";
// nodejs library that concatenates classes
import classNames from "classnames";
// nodejs library to set properties for components
import PropTypes from "prop-types";
// @material-ui/core components
import { makeStyles } from "@material-ui/core/styles";
// @material-ui/icons
// core componen... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
runserver
~~~~~~~~~
develop server execute module for local test
:copyright: (c) 2014 by geeksaga.
:license: MIT LICENSE 2.0, see license for more details.
"""
from flask import redirect, url_for
from geeksaga.archive import create_app
... |
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
import reportWebVitals from './reportWebVitals';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getE... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path fill="none" d="M0 0h24v24H0V0z" /><g><path d="M12 19c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2... |
describe('Bramble Lynx', function () {
describe("Bramble Lynx's constant ability", function () {
beforeEach(function () {
this.setupTest({
player1: {
house: 'untamed',
inPlay: ['flaxia'],
hand: ['bramble-lynx']
... |
module.exports = function (req,res) {
var url = require("url");
var mongoose = require('mongoose');
var moment = require('moment');
var request = require("request");
var historyLength = 10;
var number = 5; // set a default number of search items to be returned
var regex = new RegExp(/([?])([a-z]{6})[... |
import styled, { css } from '@xstyled/styled-components'
import React from 'react'
export const FlexContainer = styled.div(
({ align, direction, flex, justify }) => css`
display: flex;
align-items: center;
justify-content: flex-start;
flex: ${flex};
flex-direction: ${direction};
${direction ... |
require('toml-require').install();
var options = {
redis: {
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT
}
};
if (process.env.NODE_ENV === 'development') {
options = require('./config.toml');
}
module.exports = options;
|
module.exports = function(text) {
return text.toLowerCase().replace(/[^\w]+/g, '-');
}
|
import { combineReducers } from "redux";
import { connectRouter } from 'connected-react-router'
//list the imports for the reducers to combine
import {reducer as notifications} from 'react-notification-system-redux'
export default (history) => combineReducers({
router: connectRouter(history),
notifications,
... |
this.NesDb = this.NesDb || {};
NesDb[ '185189551A395701FDDDB9FBD7F270B48A8FDD50' ] = {
"$": {
"name": "Power Soccer",
"altname": "パワーサッカー",
"class": "Licensed",
"catalog": "GTS-FT",
"publisher": "Tokuma Shoten",
"developer": "",
"region": "Japan",
"players": "2",
"date": "1990-03-30"
},
"cartridge... |
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* TodoStore
*/
var... |
"""Generates a JSON schema to handle Reaction protos.
See:
* https://json-schema.org/
* https://json-schema.org/understanding-json-schema/index.html
Inspired by https://github.com/GoogleCloudPlatform/protoc-gen-bq-schema.
"""
import json
from absl import app
from absl import flags
from ord_schema.proto import reac... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@styled-icons/material/Portrait"), exports);
|
/*
* Copyright (c) 2015-2016 PointSource, LLC.
* MIT Licensed
*/
//uses async init to set initialized to true
var initialized = false;
exports.init = function(service15) {
initialized = true;
};
exports.isInitialized = function() {
return initialized;
}; |
import request from '@/utils/request'
export function fetchList(query) {
return request({
url: '/article/list',
method: 'get',
params: query
})
}
export function fetchArticle(id) {
return request({
url: '/article/detail',
method: 'get',
params: { id }
})
}
export function createArticl... |
import aiotools
import asyncio
async def mytick(interval):
print('tick')
async def run():
t = aiotools.create_timer(mytick, 1.0)
await asyncio.sleep(4)
t.cancel()
await t
if __name__ == '__main__':
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
try:
loop.run_u... |
import withBreakpointManager from './withBreakpointManager.js';
import withBreakpointObserver from './withBreakpointObserver.js';
import withExtraConfig from './withExtraConfig.js';
import withIntersectionObserver from './withIntersectionObserver.js';
import withMountWhenInView from './withMountWhenInView.js';
export ... |
// Sign up form handler
async function signupFormHandler(event) {
console.log("Hello!");
event.preventDefault();
// get the information from the sign up form
const name = document.querySelector('#username-signup').value.trim();
const email = document.querySelector('#email-signup').value.trim();
... |
import Ember from 'ember';
import DS from 'ember-data';
var locale = new Globalize( navigator.language );
export default DS.Model.extend( {
account_id: DS.attr(),
company_id: DS.attr(),
amount: DS.attr( 'number' ),
currency_id: DS.attr(),
type: DS.attr( 'number' ),
status: DS.attr( 'number' ),... |
import numpy
import six
import chainer
from chainer import backend
from chainer.backends import cuda
from chainer import function_node
from chainer.utils import type_check
def _check_indices(indices):
if len(indices) == 0:
return
# TODO(unno): Check indices without cpu
indices = cuda.to_cpu(indic... |
console.log('Here I am');
console.log('It works');
for(let i=1;i<=5;i++) {
document.write('hello<br/>');
}
|
console.log('Cheers!');
|
$('#login-button').click(function (event) {
var userName=document.getElementById("userName").value;
var pwd=document.getElementById("pwd").value;
if(userName=="唐小月" && pwd=="0810"){
event.preventDefault();
$('form').fadeOut(500);
$('.wrapper').addClass('form-success');
requestFullScreen();
setTim... |
/**-----------------------------------------------------------------------------------------
* Copyright © 2020 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*--------------------------------------------------------------... |
import Firebase from 'firebase/app'
import { firebaseApp } from './firebase'
import 'firebase/auth'
export const auth = firebaseApp.auth()
const providersConfig = [
{
name: 'facebook',
obj: new Firebase.auth.FacebookAuthProvider(),
scopes: ['email'],
},
{
name: 'github',
obj: new Firebase.au... |
import './assets/styles.css';
import Vue from 'vue';
import App from './App.vue';
import VueMeta from 'vue-meta';
import createRouter from './router';
import createStore from './store';
Vue.config.productionTip = false;
Vue.use(VueMeta, {
keyName: 'head',
});
import TestCase from './components/TestCase.vue';
Vue.c... |
exports = module.exports;
exports.sendError = function(code, res, next, msg) {
return next({'message': msg, 'status': code});
};
exports.send400 = function(res, next, msg) {
return exports.sendError(400, res, next, msg);
};
exports.coerceDate = function(targetObject) {
var stringRep = JSON.stringify(targetObj... |
from __future__ import absolute_import
import json
import os
import six
from flask import Flask, redirect, url_for, request, session
from flask_oauth import OAuth
BASE_URL = os.environ.get("BASE_URL", "http://dev.getsentry.net:8000")
CLIENT_ID = os.environ.get("CLIENT_ID")
CLIENT_SECRET = os.environ.get("CLIENT_SECR... |
'use strict';
var _typeof2 = require('babel-runtime/helpers/typeof');
var _typeof3 = _interopRequireDefault(_typeof2);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to ... |
/**
* Kendo UI v2020.1.114 (http://www.telerik.com/kendo-ui)
* Copyright 2020 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.... |
# coding=utf-8
from OTLMOW.PostenMapping.StandaardPost import StandaardPost
from OTLMOW.PostenMapping.StandaardPostMapping import StandaardPostMapping
# Generated with PostenCreator. To modify: extend, do not edit
class Post050404312(StandaardPost):
def __init__(self):
super().__init__(
nummer... |