text stringlengths 3 1.05M |
|---|
document.querySelector("#add-time")
.addEventListener('click', clonefield)
function clonefield() {
const newFieldContainer = document.querySelector('.schedule-item').cloneNode(true)
const fields = newFieldContainer.querySelectorAll('input')
fields.forEach(function(field) {
field.value = ""
})... |
'use strict'
var Model = require('../model/model.js');
//API
function checkLocalStorage(){
var p = new Promise(function(resolve, reject) {
var reset = false;
// On vérifie la version du modèle présente
if (localStorage["game_model"]){
var modelTmp = JSON.parse(localStorage["game_model"]);
// Si la ver... |
#Copyright 2020 Nod Labs
import argparse
import open3d as o3d
class ViewerWithCallback:
def __init__(self, config, device, align_depth_to_color):
self.flag_exit = False
self.align_depth_to_color = align_depth_to_color
self.sensor = o3d.io.AzureKinectSensor(config)
if not self.sen... |
/**
* The MIT License (MIT)
*
* Copyright (c) 2015 Famous Industries Inc.
*
* 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... |
!function(e){function t(t){for(var n,o,i=t[0],c=t[1],l=t[2],s=0,p=[];s<i.length;s++)o=i[s],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&p.push(a[o][0]),a[o]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t... |
import React, { Component } from 'react'
import styles from '../styles/SearchBar.module.scss'
class SearchBar extends Component {
constructor(props) {
super(props)
this.state = { term: '' }
this.handleSubmit = this.handleSubmit.bind(this)
}
render() {
return (
<div>
<form className... |
import React from "react";
import ExpHeader from "../components/ExpHeader";
import Study from "../Study";
export default function Experience() {
return (
<div>
<ExpHeader />
</div>
);
}
|
from __future__ import absolute_import, print_function
import ruyaml as yaml
def test_marks(marks_filename, verbose=False):
with open(marks_filename, 'r') as fp0:
inputs = fp0.read().split('---\n')[1:]
for input in inputs:
index = 0
line = 0
column = 0
while input[inde... |
/**
* Slider Kit v1.9.2 (packed)
* http://www.kyrielles.net/sliderkit
*
* Copyright (c) 2010-2012 Alan Frog
* Licensed under the GNU General Public License
*/
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''... |
export function isPC() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
var flag = true;
for (let v = 0; v < Agents.length - 1; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
|
# -*- coding: utf-8 -*-
from ._common import *
class Lizhi(VideoExtractor):
name = 'Lizhi FM (荔枝电台)'
def prepare(self):
info = VideoInfo(self.name)
html = get_content(self.url)
self.vid, info.artist, _, info.title = \
match(html, 'data-hidden-ph\s?=\s?"(.+?)" '
... |
import React from 'react';
import './card.scss';
import Circle from './circle';
const Card = ({icon, title, args}) => (
<div>
<div className="card-shape">
<div className="circle">
<Circle icon={icon}> </Circle>
</div>
<p className="card-title"> {title} <... |
"""
Projet de session IFT780
Date:
Authors: Alexandre Turpin, Quentin Levieux and Adrien Verdier
License: Opensource, free to use
Other: This file provide us with method useful for active learning
"""
import numpy as np
from enum import Enum
import random
class StoppingCriteria(Enum):
STEP = 1
QUERIES = 2
... |
import asyncio
from asyncio import StreamWriter
from logging import StreamHandler, NOTSET, Formatter, Filter, LogRecord
from typing import Union, Optional
from aiologger.protocols import AiologgerProtocol
class AsyncStreamHandler(StreamHandler):
def __init__(
self,
stream=None,
level: Uni... |
/*
Steps:
1. Install gulp globally:
npm install --global gulp
2. Type the following after navigating in your project folder:
npm install gulp gulp-util gulp-sass gulp-uglify gulp-rename gulp-minify-css gulp-concat browser-sync --save-dev
3. Move this file in your project folder
4. Setup your vhosts or just use stat... |
(function(Se,kt){typeof exports=="object"&&typeof module!="undefined"?kt(exports):typeof define=="function"&&define.amd?define(["exports"],kt):(Se=typeof globalThis!="undefined"?globalThis:Se||self,kt(Se.niivue={}))})(this,function(Se){"use strict";var kt=function(t,i,e){var n=this;this.program=Oa(t,i,e);var a=/uniform... |
// Ladda loading buttons
import * as Ladda from 'ladda';
$(document).ready(() => {
Ladda.bind('.ladda-button', {timeout: 2000});
}); |
import React from 'react';
import { mount } from 'enzyme';
import Carousel from '..';
import mountTest from '../../../tests/shared/mountTest';
import rtlTest from '../../../tests/shared/rtlTest';
describe('Carousel', () => {
mountTest(Carousel);
rtlTest(Carousel);
beforeEach(() => {
jest.useFakeTimers();
... |
declare var npm$namespace$FormSerializer: {
patterns: typeof FormSerializer$patterns
};
declare interface FormSerializer$FormSerializerPatterns {
validate: RegExp;
key: RegExp;
push: RegExp;
fixed: RegExp;
named: RegExp;
}
declare export var FormSerializer$patterns: FormSerializer$FormSerializerPatterns;
d... |
/*
$(function(){
if($('#edit-success').val().length > 0){
$.x_say({'cont' : $('#edit-success').val(), bg: true,'callback':function(){
$('.x_say_wrapper', window.top.document).remove();
}});
}
})*/
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRgb = exports.hexToRgb = void 0;
const hexToRgb = (hexValue) => {
var _a;
const noHash = hexValue.substring(1);
if (noHash.length === 3) {
return noHash.split('').map((value) => parseInt(`${value}${value}`, 16));... |
# This script creates a thread to monitor the position and other variables from a real UR robot and stores the data to a CSV file
# With this script running, RoboDK will save a CSV file of the robot status
#
# Press F5 to run the script
# Or visit: http://www.robodk.com/doc/en/PythonAPI/
from robolink import * # API... |
var googleUser = {};
var startApp = function() {
gapi.load('auth2', function() {
// Retrieve the singleton for the GoogleAuth library and set up the client.
auth2 = gapi.auth2.init({
'client_id': '981798466996-o7ffbpavqm598cap9ems9fungt4juob1.apps.googleusercontent.com',
'co... |
/**
*
* Asynchronously loads the component for MuiformPage
*
*/
import Loadable from 'react-loadable';
export default Loadable({
loader: () => import('./index'),
loading: () => null,
});
|
/**
* Copies deep missing properties to the target object
* @param targetObj {Object} target object
* @param defaultObj {Object} default object
* @param exclude {Array} exclude properties from copy
* @returns {*}
*/
function extend(targetObj, defaultObj, exclude = []) {
for (let i in defaultObj) {
/*... |
"use strict";
/*
* Copyright 2019 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... |
angular.module('starter.services')
.factory('DiceRoller', function () {
function buildNotation(count, sides, modifier) {
var base = count + "d" + sides;
if (modifier < 0)
return base + "-" + Math.abs(modifier);
if (modifier > 0)
return base... |
import { ApnClient } from './apn';
const createContext = (config) => {
const context = {
apn: new ApnClient(config.apn),
config
};
return context;
};
export default createContext;
|
import React, {useEffect} from 'react'
import './StoryPageStyles.css'
function StoryPage() {
return (
<div className="">
<div className="header-text">An Old War Story</div>
<div className="storyTime">
<p>General Harold Ransom looked over the new recruits with a mixt... |
'use strict';
/**
* Mappers
*/
const groupMapper = require('./../db_mappers/group_mapper');
const userMapper = require('./../db_mappers/user_mapper');
const inviteMapper = require('./../db_mappers/invite_mapper');
/*
* Contains all the leagues previously checked out.
*/
let leaguesCache = [];
//request module
c... |
import React, { Component } from 'react'
import ShareConnect from './ShareConnect';
import renderContent from './ShareRenderer';
import { ShareStatus } from '../../redux/Share';
import { confirm, alert } from '../../alerts/Alerts'
class ShareScreen extends Component {
static KEY = 'ShareScreen'
componentDidM... |
// https://www.codewars.com/kata/54bf1c2cd5b56cc47f0007a1/train/javascript
// my implementation
// i figured it out
// but i looked to how to implatennt array.filter method
function duplicateCount(text) {
let array = [];
let duplicateArray = [];
// split into character array
// convert into lowercase
... |
const {expect} = require('chai');
const sinon = require('sinon');
const createConfig = require('../utils/config-stub');
const fs = require('fs-extra');
const ghostUser = require('../../lib/utils/use-ghost-user');
const migrations = require('../../lib/migrations');
describe('Unit: Migrations', function () {
after... |
// @remove-on-eject-begin
/**
* Copyright (c) 2015-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.
*/
// @remove-on-eject-end
'use strict';
const path = require('path');
const fs = require('fs');
const getPublicU... |
/**
* fullPage 1.7.9
* https://github.com/alvarotrigo/fullPage.js
* MIT licensed
*
* Copyright (C) 2013 alvarotrigo.com - A project by Alvaro Trigo
*/
(function(b){b.fn.fullpage=function(c){function X(a){if(c.autoScrolling){a.preventDefault();var f=a.originalEvent;a=b(".section.active");if(!q&&!r)if(f=K(f)... |
/***
PlotKit Autoload Javascript Module.
This file was adapted from MochiKit.
See <http://mochikit.com/> for documentation, downloads, license, etc.
(c) 2005 Bob Ippolito. All rights Reserved.
Modified by Alastair Tse, 2006, for PlotKit.
***/
if (typeof(PlotKit) == 'undefined') {
PlotKit = {};
}
if (typeof(P... |
import React from "react";
import "./VideoCard.css";
import Avatar from "@material-ui/core/Avatar";
function VideoCard({ image, title, views, timestamp, channel, channelImage }) {
function activateLasers(e) {
e.preventDefault();
window.location.href = "https://www.youtube.com/watch?v=urP4y3_wYMc";
}
... |
// Requiring necessary npm packages
const express = require('express');
const session = require('express-session');
const expressHandle = require('express-handlebars');
const passport = require('./config/passport');
// Setting up port and requiring models for syncing
const PORT = process.env.PORT || 8080;
const db = ... |
function(){class Base{constructor(){_defineProperty(this,"a",Promise.resolve(42));}}class Sub extends Base{constructor(...args){super(...args);const _this=this;_defineProperty(this,"f",_async(function(){return _awaitIgnored(_this.a);}));}};return new B();} |
(function( window, undefined ) {
kendo.cultures["sr-Latn-RS"] = {
name: "sr-Latn-RS",
numberFormat: {
pattern: ["-n"],
decimals: 2,
",": ".",
".": ",",
groupSize: [3],
percent: {
pattern: ["-n%","n%"],
... |
import error from '../../util/error';
export default function(item) {
let descriptors = item.srcset.map(
({descriptor}) => (descriptor || '1x').replace(/(?:\s+|^)\d+h(?:\s+|$)/, '')
);
descriptors.forEach((descriptor, index) => {
if (descriptors.indexOf(descriptor) !== index) {
error(__filename, item, {
... |
import {
isString,
isObject,
forEach
} from 'min-dash';
import Factory from './factory';
import Registry from './registry';
import Properties from './properties';
import {
parseName as parseNameNs
} from './ns';
//// Moddle implementation /////////////////////////////////////////////////
/**
* @class Modd... |
const mongoose = require('mongoose');
mongoose.Promise = global.Promise;
module.exports = (settings) => {
mongoose.connect(settings.db);
let db = mongoose.connection;
db.once('open', err => {
if(err) {
console.log('fail to connect to DB');
throw err;
}
console.log('MongoDB rd... |
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define("/Section/Menubar", ["exports", "jquery", "Component"], factory);
} else if (typeof exports !== "undefined") {
factory(exports, require("jquery"), require("Component"));
} else {
var mod = {
exports: {}
};... |
'use strict';
var lexemes = require('./lexemes.js');
var AST = require('../ast.js');
var join = require('./lib/join.js');
var typeDefinition = require('./type-definition.js');
var typeTuple = lexemes.openSquareBrace
.then(join(typeDefinition, lexemes.comma ))
.skip(lexemes.closeSquareBrace)
.map(function ... |
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
import React from 'react';
import QuestionOutlinedSvg from "@ant-design/icons-svg/es/asn/QuestionOutlined";
import AntdIcon from '../components/AntdIcon';
var QuestionOutlined = function QuestionOutlined(props, ref) {
return React.createElement(AntdIco... |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... |
'use strict'
var EasyXml = require('easyxml')
var setDokumenter = require('./setDokumenter')
var setMottaker = require('./setMottaker')
var validateOptions = require('./validateOptions')
var serializer = new EasyXml({
rootElement: 'soap:Envelope',
indent: 0,
unwrappedArrays: true
})
function buildXml (options)... |
/*
****************************************************************************
* Copyright 2015 Jonathan Barronville <jonathan@belairlabs.com> *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* yo... |
"""Plot spatial geometries, street networks, and routes."""
from pathlib import Path
import matplotlib.cm as cm
import matplotlib.colors as colors
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
from . import graph
from . import settings
from . import simplification
from ... |
import unittest
from logging import getLogger
import numpy as np
from redshells.contrib.model.gcmc_dataset import GcmcDataset
from redshells.contrib.model.graph_convolutional_matrix_completion import GcmcGraphDataset
logger = getLogger(__name__)
class TestGCMCDataset(unittest.TestCase):
def test_without_inform... |
//-------------------------------------------------------------------------------------------
// LightWare SF30 serial connection sample
// https://lightware.co.za
//-------------------------------------------------------------------------------------------
const SerialPort = require('serialport');
let socket = new S... |
from django.db import models
class Polls(models.Model):
name = models.CharField(max_length=255)
link = models.CharField(max_length=255)
is_active = models.BooleanField(default=True)
author = models.CharField(max_length=255)
|
import styled from 'styled-components'
import NavContent from './NavContent'
import { Link } from 'react-router-dom'
const NavbarWrapper = styled.div`
position: fixed;
bottom: 30px;
width: 576px;
left: 50%;
margin-left: -288px;
height: 60px;
border-radius: 13px;
background: linear-gradient(to right... |
export function calculateWithoutPlan(countMin, valueMin) {
let priceWithoutPlan = countMin * valueMin;
let formatePrice = priceWithoutPlan.toLocaleString("pt-BR", {
style: "currency",
currency: "BRL"
});
return `${formatePrice}`;
}
export function calculateWithPlan(selectedPlan, countMin, valueForMin) ... |
import os
import shutil
__all__ = ['copy', 'exists', 'isdir', 'isfile', 'listdir', 'makedirs', 'remove', 'stat', 'walk',
'path_join', 'rename']
def exists(path):
"""Determines whether a path exists or not.
Args:
path: string, a path, filepath or dirpath.
Returns:
True if the pat... |
from ._misc import RegressBoxes, RegressBoxes3D, UpsampleLike, Anchors, ClipBoxes # noqa: F401
from .filter_detections import FilterDetections # noqa: F401
|
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(d... |
#!/usr/bin/python
#coding:utf-8
import mybaselib
import myequation
import logging
import os.path
import sys
import numpy as np
import multiprocessing
import gen_entity_cluster as mygen_entity_cluster
import jieba
reload(sys)
sys.setdefaultencoding('utf8')
program = os.path.basename(sys.argv[0])
logger = logging.getLo... |
import util from "util";
import { gql } from "apollo-server";
import xmlrpc from "xmlrpc";
import { getPoseFromPetState } from "../util";
import { saveModelingData } from "../modeling";
const typeDefs = gql`
type Pet {
id: ID!
name: String!
petAppearance: PetAppearance!
wornItems: [Item!]!
"to b... |
var words = ["a","abans","ací","ah","així","això","al","aleshores","algun","alguna","algunes","alguns","alhora",
"allà","allí","allò","als","altra","altre","altres","amb","ambdues","ambdós","apa","aquell","aquella","aquelles",
"aquells","aquest","aquesta","aquestes","aquests","aquí","baix","cada","cadascuna","cadascune... |
import os
# Used by test scripts to tap into a folder of test files
TEST_FILES_BASE_DIR = os.path.join(".", "test", "testfiles")
DEFAULT_DATA_DIRECTORY = os.path.join(".", "resources", "corpora", "abui_toy_corpus", "data")
# Used by resample_audio.py
AUDIO_EXTENSIONS = ["*.wav"]
TEMPORARY_DIRECTORY = "tmp"
SOX_PATH =... |
/* jshint -W097*/
/* jshint node:true */
'use strict';
var path = require('path');
var fs = require('fs-extra');
var _ = require('lodash');
var format = require('util').format;
var browserify = require('browserify');
var watchify = require('watchify');
var collapser = require('bundle-collapser/plugin');
var del = req... |
import cv2
import math
import numpy as np
import face_alignment
class FaceDetect:
def __init__(self, device, detector):
# landmarks will be detected by face_alignment library. Set device = 'cuda' if use GPU.
self.fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, device=device, fa... |
import React, { Component, Fragment } from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import TetherComponent from 'react-tether';
import { Field, getFormValues } from 'redux-form';
import { Col, Select, TextField } from '@folio/stripes/components';
import { FormattedMessage } from 'react-intl'... |
define([
'intern!object',
'intern/chai!assert'
], function (
registerSuite,
assert
) {
registerSuite({
name: 'hello',
'hello world': function () {
var foo = 'hello';
assert.strictEqual(foo, 'hello');
}
});
});
|
const bcrypt = require("bcryptjs");
const jwt = require("jsonwebtoken");
const { APP_SECRET, getUserIdFrom } = require("../utils/authorization");
async function signup(parent, args, context, info) {
const password = await bcrypt.hash(args.password, 10);
const user = await context.prisma.user.create({
data: { .... |
/*===========================================================================*\
* Inverse Discrete Fourier Transform (O(n^2) brute-force method)
*
* (c) Maximilian Bügler. 2016
*
* Based on and using the code by
* (c) Vail Systems. Joshua Jung and Ben Bryan. 2015
*
* This code is not designed to be highly optim... |
/**
* @file to-function.js
* @author sfe-sy(sfe-sy@baidu.com)
*/
/* eslint-disable no-new, no-new-func */
import {noop, extend} from 'shared/util'
import {warn as baseWarn, tip} from 'core/util/debug'
function createFunction (code, errors) {
try {
return new Function(code)
} catch (err) {
errors.push(... |
import packageResult from 'utils/packageResult';
import { req } from 'utils/mappers';
export default function cjs ( bundle, options ) {
let importBlock = bundle.externalModules.map( x => {
return `var ${x.name} = ${req(x.id)};`;
}).join( '\n' );
if ( importBlock ) {
bundle.body.prepend( importBlock + '\n\n' );... |
/*
* Copyright 2015 IBM Corp.
*
* 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... |
# $Id$
#
# Copyright (C) 2008-2011 Greg Landrum
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
from rdkit import Chem
import numpy
import math
i... |
(function($){
var $paymentForm = $('#allsecure_exchange_seamless').closest('form');
var $paymentFormSubmitButton = $("#place_order");
var $paymentFormTokenInput = $('#allsecure_exchange_token');
var $allsecureExchangeErrors = $('#allsecure_exchange_errors');
var integrationKey = window.integrationKey;
... |
/*************************************************************
*
* MathJax/jax/output/SVG/fonts/TeX/svg/Main/Regular/Main.js
*
* Copyright (c) 2011-2018 The MathJax Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License... |
// Imports
const express = require("express");
const router = express.Router();
const {
signupController,
loginController,
protectedController,
getUser,
googleAuthController,
} = require("../controllers/AuthController");
const AuthMiddleware = require("../middleware/AuthMiddleware");
// Signup
router.post("... |
"use strict";
exports.__esModule = true;
var websocket_1 = require("websocket");
var ws = new websocket_1.client();
ws.on('connect', function (connection) {
console.log('connected');
connection.on('message', function (_) {
sendLogEntries(connection);
});
connection.send(JSON.stringify({
... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from numpy.testing import (assert_allclose, assert_array_almost_equal_nulp,
assert_equal)
from astropy.stats.biweight import (biweight_location, biweight_scale,
... |
StartTest(function(t) {
//==================================================================================================================================================================================
t.diag("Siesta mouse click simulation");
t.testExtJS(function (t) {
// Verify check b... |
'use strict';
var EventEmitter = require('events').EventEmitter;
var inherits = require('inherits');
var spdy = require('spdy');
var http = require('http');
var async = require('async');
var channels = require('./channels');
var ReadChannel = channels.ReadChannel;
var WriteChann... |
// require dependencies
const fs = require(`fs`);
const path = require(`path`);
const assert = require(`assert`);
const util = require('util');
// declare constants
const EXERCISE_NAME = path.basename(__filename);
const START = Date.now();
// declare logging function
const log = (logId, value) => console.log(
`\n... |
/*!
* vue-router v3.1.6
* (c) 2020 Evan You
* @license MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.VueRouter = factory());
}(... |
class AllCountsFilteredException(Exception):
def __init__(self, description: str = None, hint: str = None):
super(AllCountsFilteredException, self).__init__('All counts filtered')
self.description = description
self.hint = hint
|
import { doCreateAccountSuccess, doCreateAccountStarted, doCreateAccountError } from "./create-account";
import Services from "../../services";
export const createAccount = (accountData) => dispatch => {
dispatch(doCreateAccountStarted());
Services.APICallConfig.callAPIService('CREATE_ACCOUNT',accountData)
... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[98],{521:function(t,e,a){"use strict";a.r(e);var l=a(25),v=Object(l.a)({},(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"评分-rate"}},[a("a",{staticClass:"header-an... |
const { merge } = require("webpack-merge");
const singleSpaDefaults = require("webpack-config-single-spa-react-ts");
module.exports = (webpackConfigEnv, argv) => {
const defaultConfig = singleSpaDefaults({
orgName: "dg",
projectName: "react-routes",
webpackConfigEnv,
argv,
});
return merge(defa... |
/** @jsx jsx */
import { jsx, Styled, Link as LinkUI } from "theme-ui"
import processTweetString from "./process-tweet-string"
import Hero from "./item-hero"
const Detail = ({ item }) => {
const { url, datetime, author, authorSlug } = item
const body = processTweetString(item.title)
return (
<Styled.div sx={{... |
import FirebaseContext, { withFirebase } from './FirebaseContext';
export { FirebaseContext, withFirebase };
|
#-*- coding: utf-8 -*-
import inspect
from django.contrib import admin
from filer import settings
from filer.fields import folder
class PermissionAdmin(admin.ModelAdmin):
fieldsets = (
(None, {'fields': (('type', 'folder',))}),
(None, {'fields': (('user', 'group', 'everybody'),)}),
(None, ... |
'''
From PyTorch:
Copyright (c) 2016- Facebook, Inc (Adam Paszke)
Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
Copyright (c) 2011-2012 NEC Labora... |
import ckan.plugins as p
from ckan.tests import helpers, factories
from ckan.plugins import toolkit
from ckanext.visualize.plugin import VisualizePlugin
ignore_missing = p.toolkit.get_validator('ignore_missing')
class TestVisualizeView(helpers.FunctionalTestBase):
@classmethod
def setup_class(self):
... |
'use strict';
const ipcRenderer = require("electron").ipcRenderer;
let __messageCount = -1;
// getCount tries to parse the number of unread messages in whatsapp.
// The whatsapp web app keeps the unread count in an element with class
// unread-count.
function getCount() {
let count = 0;
let badges = document... |
// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init()
// 云函数入口函数
exports.main = async(event, context) => {
const wxContext = cloud.getWXContext()
const db = cloud.database()
var player = event.player
var id = event.id
const _ = db.command
console.log("first, we begin")
console.log("player:... |
/**
* 获取 IP 通过 webkitRTCPeerConnection
* @param callback {Function} 回调函数
* @return undefined
* JavaScript是无法获得或存储在客户端的IP。
* 但是由于JavaScript能够发送HTTP请求,而服务器端语言能够获取用户的公网IP,所以你可以利用这个获取IP。
* 换句话说,如果你想得到一个用户就取决于请求任何服务器检索公网IP
* @link https://developer.mozilla.org/zh-CN/docs/Web/API/RTCPeerConnection/RTCPeerConnection#Br... |
deepmacDetailCallback("0005e9000000/24",[{"d":"2001-06-04","t":"add","a":"870 Dorothy Dr. #708\nRichardson, TX 75081\n\n","c":"UNITED STATES","o":"Unicess Networks, Inc."},{"d":"2001-10-24","t":"change","a":"870 Dorothy Dr. #708\nRichardson TX 75081\n\n","c":"UNITED STATES","o":"Unicess Networks, Inc."},{"d":"2002-06-0... |
mainApp.controller('firstLoginCtrl', function ($rootScope, $scope, $state, $http,
loginService,
config, $base64, $auth,$q,$location,vcRecaptchaService,signUpServices,redctUrls,$window,$ngConfirm) {
var userData ={};
$... |
export { default as editorActions } from "./editor";
|
'use strict';
const express = require('express');
const router = express.Router();
const DBHelperFind = require('../../../mods/db/db.find'),
DBHelperInsert = require('../../../mods/db/db.insert');
const authController = require('../controller/auth');
const Json = require('../../../mods/jsonWrap');
router.post('/lo... |
#!/usr/bin/env python
# Copyright 2017 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 ... |
/*
* author @emmsdan
* for @alc 3.0
* date @2018-june
*
/* naming and settings for indexDB */
let dbname = {exchange: '', currency: ''}
const startDb = () => {
// for browser compactibility
const dBase = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || windo... |
layui.use('element', function(){
var element = layui.element;
});
layui.use('form', function(){
var form = layui.form;
// form.render();
form.on('radio(design_type)', function(data){
if(data.value == 1){
$('#design_table1').show();
$(... |