text stringlengths 3 1.05M |
|---|
#!/usr/bin/python
import time
import os.path
import subprocess
import sys
import hashlib
# notes:
# KEY difference: with sshCluster, phonecall file is already created and modified
# with qsub, phoneCall is created dynamically and creates qsub pbs file
# rList == list of files to process on cluster with qsub
# list i... |
function cartController() {
return {
cart(req, res) {
res.render("cart")
},
update(req, res) {
// let cart = {
// items: {
// pizzaId: { item: pizzaObject, qty: 0 }
// },
// totalQty: 0,
/... |
# 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"); you may not u... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-12-28 11:42
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('quest', '0001_initial'),
]
operations = [
migrations.AlterField(
... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[83],{1457:function(e,t,a){"use strict";a.r(t);var n=a(11),o=a.n(n),l=a(24),r=a.n(l),c=a(25),s=a.n(c),i=a(22),m=a.n(i),d=a(26),u=a.n(d),h=a(27),p=a.n(h),f=a(16),g=a.n(f),v=a(6),b=a.n(v),E=a(0),N=a.n(E),y=a(699),w=a.n(y),C=a(197),A=a(692),k=a(32),I=a(148),S=a(713),x=a.... |
const ApiRequest = require('./lib/apiRequest')
const WshubClient = require('./lib/client')
const RemoteDebug = function(auth, func, Region = 'ap-guangzhou') {
this.auth = auth
this.func = func
this.Region = Region
this.request = new ApiRequest(auth, func, Region)
}
RemoteDebug.prototype.remoteDebug = async fu... |
(void 0).toString();
|
const config = require('../config/config');
const Logger = require('../config/logger');
const client = require('twilio')(config.twilio.asid, config.twilio.authtoken);
const sendSMStoAdmin = async (txtMsg) => {
client.messages.create({
body: txtMsg,
from: config.twilio.from,
to: config.twi... |
import React from "react";
import { BrowserRouter as Router, Route } from "react-router-dom";
import routes from "./routes";
import "bootstrap/dist/css/bootstrap.min.css";
import "./assets/styles/shards-dashboards.1.1.0.min.css";
export default () => (
<Router basename={process.env.REACT_APP_BASENAME || ""}>
<... |
import axios from 'axios';
import { normalize, schema } from 'normalizr';
import { actionCreator } from '../../helpers';
import { registerMovie } from '../../movies/redux/moviesActions';
import {
// get
GET_COMMENTS_FAILURE,
GET_COMMENTS_REQUEST,
GET_COMMENTS_SUCCESS,
// add
ADD_COMMENT_FAILURE,
ADD_COMMENT_RE... |
import { map } from '../util';
export default function afterHelper (Handlebars) {
/**
* Returns all of the items in the collection after the specified index.
* May be used inline or as an iterator.
*
* @category collections
* @signature {{after items [count]}}
* @param {Array} input Collection
* @par... |
export const ic_location_on = {"viewBox":"0 0 24 24","children":[{"name":"path","attribs":{"d":"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"}}]}; |
// eslint-disable-next-line import/no-unresolved
const _ = require('underscore');
const sumThis = [1, 2, 3, 4, 5, 6, 7, 8, 9];
function sumWithFor(data) {
let total = 0;
for (let i = 0; i < data.length; i++) {
total += data[i];
}
return total;
}
console.log(sumWithFor(sumThis));
function sumWithWhile(da... |
/**
* Layout component that queries for data
* with Gatsby's useStaticQuery component
*
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react"
import PropTypes from "prop-types"
import { useStaticQuery, graphql } from "gatsby"
import MobxProvider from '../stores/provider'
import 'mobx... |
#!/usr/bin/env python
# -*- coding: utf8 -*-
__version__ = '$Id: svn_redater.py 748 2010-07-30 09:59:56Z mn $'
USAGE = "svn_redater.py\n\tredate source files according to svn data"
"""
Iterates through a directory, reading the data from svn info that looks like:
$Id: svn_redater.py 748 2010-07-30 09:59:56Z mn $
f... |
'use strict';
describe('IndexedDB', ifEnvSupports('IDBDatabase', function () {
var testZone = zone.fork();
var db;
beforeEach(function (done) {
var openRequest = indexedDB.open('_zone_testdb');
openRequest.onupgradeneeded = function(event) {
db = event.target.result;
var objectStore = db.cre... |
export const Locale = {
ENGLISH: {
code: 'en',
value: 'English'
},
FRENCH: {
code: 'fr',
value: 'French'
},
GERMAN: {
code: 'de',
value: 'German'
},
ITALIAN: {
code: 'it',
value: 'Italian'
},
JAPANESE: {
code: 'ja',
value: 'Japanese'
},
KOREAN: {
code: '... |
# sqlalchemy/engine/events.py
# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
from .base import Engine
from .interfaces import ConnectionEventsTarge... |
// import React from 'react';
// import CMS from 'netlify-cms';
// import { StyleSheetManager } from 'styled-components';
// import IndexPagePreview from './preview-templates/IndexPagePreview';
// //Component used to Enable netlify CMS to apply the styles added through styled-components
// class CSSInjector extends R... |
import React, { Component } from "react";
import { Card, Image, Icon, Button } from "components";
import Label from "egov-ui-kit/utils/translationNode";
import isEmpty from "lodash/isEmpty";
import "./index.css";
class PayDetails extends Component {
render() {
const { bkPaymentDate, paymentDetails, bkPayment... |
import subprocess
import os
import tempfile
import traceback
import time
import sys
import pwd
import Utils.constants as constants
import xml.sax.saxutils as xml_utils
import Utils.logger as logger
if not hasattr(subprocess, 'check_output'):
def check_output(*popenargs, **kwargs):
r"""Backport from subpro... |
'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;
}
function getVF(n... |
// MySql数据库连接池
const mysql=require("mysql");
var pool =mysql.createPool({
host:'127.0.0.1', //数据库地址
posrt:3306, //数据库端口
user:'root', //数据库管理员
password:'', // 数据库管理员密码
database:'xiaofeiniu', //默认连接的数据库
connectionLimit:10 //连接池中的连接数量
});
module.exports = pool;
|
import { useMutation } from '@apollo/client';
import gql from 'graphql-tag';
import Router from 'next/router';
import useForm from '../lib/useForm';
import DisplayError from './ErrorMessage';
import { ALL_PRODUCTS_QUERY } from './Products';
import Form from './styles/Form';
const CREATE_PRODUCT_MUTATION = gql`
mutat... |
def minimum_sum(values, n):
return sum(sorted(values)[:n])
def maximum_sum(values, n):
return sum(sorted(values, reverse=True)[:n]) |
const graphql = require('@octokit/graphql');
async function getUserOrganizationsSingle(authToken, cursor) {
let paging;
if (cursor === undefined) {
paging = '';
}
else {
paging = ` after: "${cursor}"`;
}
const response = await graphql.graphql({
query: `
query... |
module.exports = {
up: (queryInterface, Sequelize) => queryInterface.createTable('template_decks', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER,
},
cardsIds: {
allowNull: false,
type: Sequelize.ARRAY(Sequelize.TEXT),
},
... |
# 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 may ... |
"""
"""
from wheezy.html.utils import escape_html as escape
from wheezy.template.engine import Engine
from wheezy.template.ext.core import CoreExtension
from wheezy.template.loader import FileLoader
def main(name):
searchpath = [name]
engine = Engine(
loader=FileLoader(searchpath),
extension... |
import assert from 'assert';
import Vue from 'vue';
import easeljs from '../src/easel.js';
import EaselFake from './fixtures/EaselFake.js';
import doesEvents from './includes/does-events.js';
import isADisplayObject from './includes/is-a-display-object.js';
describe('EaselDisplayObject', function () {
describe('i... |
#!/usr/bin/env python
from pprint import pprint
import os, yaml, json, sys, argparse, logging, re, datetime
try:
import pynetbox
from netaddr import *
except ImportError as e:
sys.exit("Please install required python modules: pynetbox netaddr")
class NetboxInventory(dict):
def __init__(self):
... |
import styled from 'styled-components';
export const Container = styled.div`
max-width: 1200px;
width: 100%;
margin: 0 auto;
padding: 0 16px;
@media (min-width: ${props => props.theme.screen.xs}) {
max-width: 540px;
}
@media (min-width: ${props => props.theme.screen.sm}) {
max-width: 720px;
}... |
/** @license React v16.1.1
* react-dom.development.js
*
* 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.
*/
'use strict';
(function (global, factory) {
typeof exports === 'object' && typeo... |
{
"config": {
"is_corner": true,
"num_color_0": 2,
"num_color_1": 2,
"num_color_2": 2,
"num_color_3": 2,
"num_x_variants": 1,
"num_y_variants": 1,
"short_side_length": 9
},
"max_tiles": {
"h": 64,
"v": 64
},
"h_tiles": [{
"a_constraint": 0,
"b_constraint": 0,
"c_constraint": 0,
"d_constraint": 0,
"e_constraint": 0,
"f_... |
import collections
import nlp
import numpy as np
from textattack.datasets import HuggingFaceNlpDataset
class TedMultiTranslationDataset(HuggingFaceNlpDataset):
"""Loads examples from the Ted Talk translation dataset using the `nlp`
package.
dataset source: http://www.cs.jhu.edu/~kevinduh/a/multitarget-... |
from typing import Optional, Union
import discord
from discord.ext import commands
import aoi
class WelcomeGoodbye(commands.Cog):
def __init__(self, bot: aoi.AoiBot):
self.bot = bot
@property
def description(self):
return "Set and view the welcome and goodbye messages of a server"
... |
import debounce from 'lodash.debounce';
import template from "../templates/form.hbs";
import templ from "../templates/country.hbs";
import API from './fetchCountries';
import refs from './refs.js';
import {error} from './notifications.js'
const { input, coutryItem, countryLink } = refs;
input.addEventListener('input',... |
from typing import Optional
import requests
from libgravatar import Gravatar
from bs4 import BeautifulSoup
def get_gravatar_image(email) -> Optional[str]:
"""Only will return a url if the user exists and is correct on gravatar, otherwise None"""
g = Gravatar(email)
profile_url = g.get_profile()
res =... |
const emailRegister = require('./email_register');
// const facebookSignUp = require('./fb_register');
// const linkedInRegister = require('./linkedin_register');
module.exports = {
emailRegister,
// facebookSignUp,
// linkedInRegister,
};
|
import math
import numpy as np
import gym
from gym import spaces
from gym.utils import seeding
class EasyMountainCarEnv(gym.Env):
metadata = {
'render.modes': ['human', 'rgb_array'],
'video.frames_per_second': 30
}
def __init__(self):
self.min_position = -1.2
self.max_pos... |
(function(window, document, undefined) {
var zPagenav = {
default: {
page: 1
,pageSize: 10
,total: 0
,prevHtml: '«'
,nextHtml: '»'
,prevSrHtml: 'Previous'
,nextSrHtml: 'Next'
,dotsHtml: '...'
,eventName: 'page-change'
,template:
'<nav class="zpagenav" >' +
'<span class="pagina... |
class behavior_microsoft_dxtfilterbehavior {
constructor() {
}
// System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType)
CreateObjRef() {
}
// bool Equals(System.Object obj)
Equals() {
}
// int GetHashCode()
GetHashCode() {
}
// System.Object GetLifetimeSe... |
import {
eachDayOfInterval,
endOfMonth,
endOfWeek,
startOfMonth,
startOfWeek,
isDate,
} from 'date-fns'
const getDaysToDisplay = (date, weekStartsOn = 1) => {
if (!isDate(date)) {
throw new Error('Expecting a date object, got', typeof date)
}
// Rewind time back to the first weekday after the en... |
import React, { useState, useEffect } from "react";
import {
StyleSheet,
View,
FlatList,
Image,
ImageBackground,
Dimensions,
} from "react-native";
import { AddTodo } from "../components/AddTodo";
import { Todo } from "../components/Todo";
import { THEME } from "../theme";
export const MainScreen = ({ todo... |
#!/usr/bin/env python3
import fire
import json
import os
import numpy as np
import tensorflow as tf
import model, sample, encoder
def interact_model(
model_name='1558M',
seed=None,
nsamples=1,
batch_size=1,
length=None,
temperature=1,
top_k=0,
top_p=1,
models_dir='models',
):
... |
/*
* Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license.
* See LICENSE in the source repository root for complete license information.
*/
/*
* The OneDriveShare object definition.
* @param {Object} link - A list of html links.
* @param {Object} recipients - Recipients of the email.
* @para... |
(function ($, CrO3) {
'use strict';
var background = new CrO3.Background({
notify_notifications : true,
notify_following : true,
notify_public : false,
notify_time : 5,
crawling_interval : 180,
token : null,
url_name : null,
followi... |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.
import infra.network
import infra.proc
import infra.net
import suite.test_requirements as reqs
import infra.e2e_args
import subprocess
@reqs.description("Running TLS test against CCF")
@reqs.at_least_n_nodes(1)
def te... |
function solve(num) {
for (let i = 0; i < num; i++) {
let letter1 = String.fromCharCode(97 + i);
for (let k = 0; k < num; k++) {
letter2 = String.fromCharCode(97 + k);
for (let j = 0; j < num; j++) {
letter3 = String.fromCharCode(97 + j);
... |
import tensorflow as tf
import numpy as np
import threading
import gym
import os
from scipy.misc import imresize
import cv2
def copy_src_to_dst(from_scope, to_scope):
"""Creates a copy variable weights operation
Args:
from_scope (str): The name of scope to copy from
It should be "global"
... |
import $ from "../constructor";
$.prototype.last = function () {
return this.get(-1) || null;
};
|
jQuery(document).ready(function($) {
"use strict";
//Contact
$('form.contactForm').submit(function() {
var f = $(this).find('.form-group'),
ferror = false,
emailExp = /^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i;
f.children('input').each(function() { // run all inputs
var i = $(this); ... |
import unittest
import day14.main as main
class TestAnswers(unittest.TestCase):
def test_part1(self):
actual = main.part1()
expected = 9967721333886
self.assertEqual(actual, expected)
def test_part2(self):
actual = main.part2()
expected = 4355897790573
self.as... |
"use strict";
const dateConverter = require("../../lib/dateConverter");
const expect = require('chai').expect;
describe("dateConverter", () => {
describe("dateToNumber", () => {
it("should convert date to number", () => {
expect(dateConverter.dateToNumber(new Date('01 Jan 1900 00:00:00'))).to.... |
self.window = self
self.importScripts('https://cdnjs.cloudflare.com/ajax/libs/jsencrypt/2.3.1/jsencrypt.min.js');
let crypt = null
let privateKey = null
onmessage = function (e) {
const [message_type, text, key] = e.data
let result
switch (message_type) {
case 'generate-keys':
... |
var game = new PhaserNano.Game(800, 600, 'canvas', '', { preload: preload, create: create, update: update, render: render });
function preload () {
game.load.image('sky', 'assets/deepblue.png');
game.load.image('snowflake', 'assets/snowflake.png');
}
var pool = [];
function create() {
game.add.sprite(... |
export { default } from 'ember-one-way-select/components/one-way-select/option';
|
module.exports = {
async redirects() {
return [
{
source: "/",
destination: "/0",
permanent: true,
},
{
source: "/20210829_tauri_create_react_app_tutorial_part4",
destination: "/post/20210829_tauri_create_react_app_tutorial_part4",
permanent: true,... |
/*!
betajs-media-components - v0.0.304 - 2022-06-08
Copyright (c) Ziggeo,Oliver Friedmann,Rashad Aliyev
Apache-2.0 Software License.
*/
(function(){var t=this.subScope();t.binding("browser","global:BetaJS.Browser"),t.binding("dynamics","global:BetaJS.Dynamics"),t.binding("module","global:BetaJS.MediaComponents"),t.ext... |
$(document).ready(function () {
//scroll bar
//$("html").niceScroll();
//$("body").niceScroll({scrollspeed: 60, mousescrollstep: 60});
$(".allImages").niceScroll({railalign: 'left', railpadding: {top: 10, right: 3, left: 0, bottom: 0}});
$(".productSliderItemContainer").niceScroll({
railpad... |
import { createWidget } from "discourse/widgets/widget";
import { h } from "virtual-dom";
import { iconNode } from "discourse-common/lib/icon-library";
import { wantsNewWindow } from "discourse/lib/intercept-click";
import DiscourseURL from "discourse/lib/url";
export default createWidget("home-logo", {
tagName: "di... |
# -*- coding: utf-8 -*-
"""
@file turndefinitions.py
@author Karol Stosiek
@author Michael Behrisch
@date 2011-10-26
@version $Id$
Operations and classes necessary to work on SUMO turn definitions.
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
Copyright (C) 2011-2017 DLR (http://www.dlr.de/) and... |
const fs = require('fs')
const https = require('https')
const VARIATION_16 = String.fromCodePoint(0xfe0f)
const basefilePath = require('../package.json')['main']
const lang = process.argv[2]
const cldrLang = process.argv[3]
if (!lang || !cldrLang) {
console.log(`npm run i18n [language-code] [cldr-language code]
La... |
const WEBGL_INFO = {
WEBGL: false,
SUPPORTED_EXTENSIONS: {}
};
const canvas = document.createElement("canvas");
if (canvas) {
const gl = canvas.getContext("webgl", {antialias: true}) || canvas.getContext("experimental-webgl", {antialias: true});
WEBGL_INFO.WEBGL = !!gl;
if (WEBGL_INFO.WEBGL) {
... |
import React, { Component, PropTypes } from 'react';
import { Router } from 'react-router';
import { Provider } from 'react-redux';
class AppContainer extends Component {
static propTypes = {
history: PropTypes.object.isRequired,
routes: PropTypes.object.isRequired,
store: PropTypes.object.isRequired
}... |
const logger = require('logger');
const Router = require('koa-router');
const StatisticModel = require('plugins/sd-ct-statistics-plugin/models/statistic.model');
const ApiRouter = new Router({
prefix: '/api/v1/statistic',
});
function getMiddleware() {
class StatisticRouter {
static async get(ctx) {... |
import React from 'react'
import {Link} from 'gatsby'
const Header = () => {
return (<header>
<h1>Gatsby Bootcamp</h1>
<nav>
<ul>
<li>
<Link to="/">Home</Link>
</li>
<li>
<Link to="/about">About</Link>
</li>
<li>
<Link to="/blog">Blo... |
import React from "react";
import '../css/sidebar.css'
function Sidebar(){
patients = this.props.patient_list;
return <div className="sidebar">
</div>
} |
"""
Sponge Knowledge Base
GrovePi
"""
class ManageLcd(Action):
def onConfigure(self):
self.withLabel("Manage the LCD text and color")
self.withDescription("Provides management of the LCD properties (display text and color). A null value doesn't change an LCD property.")
self.withArgs([
... |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["plugin-rtsp"] = factory();
else
root["p... |
#!/usr/bin/env python
__all__ = ['create_chute']
import os, sys
import numpy
import math
import pickle
from siconos.mechanics.collision.tools import Contactor
import siconos.numerics as Numerics
# WARNING : in 3D by default z-axis is upward
# this is very important to direct PLANx objects
dim = 3
box_height = 3.... |
console.log('from mod2 babelrc...............')
const presets = [
];
const plugins = [
];
// if (process.env["ENV"] === "prod") {
// plugins.push(...);
// }
module.exports = { presets, plugins };
|
import moment from 'moment';
import fixtures from './fixtures';
describe('Workflow list', () => {
async function workflowsTest(mochaTest, initialWorkflows, query, domainDesc) {
const [testEl, scenario] = new Scenario(mochaTest)
.withDomain('ci-test')
.startingAt('/domains/ci-test/workflows')
.w... |
import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
'sqlite:///'... |
import Vue from 'vue'
import { mergeData } from 'vue-functional-data-merge'
import warn from '../../utils/warn'
export const props = {
tag: {
type: String,
default: 'ul'
},
fill: {
type: Boolean,
default: false
},
justified: {
type: Boolean,
default: false
},
tabs: {
type: Boo... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
async function setCookies(cookieObjs) {
const cookieObjsList = !Array.isArray(cookieObjs) ? [cookieObjs] : cookieObjs;
if (cookieObjsList.some(obj => (typeof obj !== 'object'))) {
throw new Error('Invalid input (see https://web... |
var slideIndex = 1;
showSlides (slideIndex);
function plusSlides(n) {
showSlides(slideIndex += n);
}
function currentSlide (n) {
showSlides(slideIndex = n);
}
function showSlides(n) {
var i;
var slides = document.getElementsByClassName("mySlides");
var dots = document.getElementsByClassName("dot... |
import firebase from 'firebase';
var config = {
apiKey: "AIzaSyBC-eYzxGV1rJGELv7EHIt5LbMjRp7E4U0",
authDomain: "react-todo-app-98aa8.firebaseapp.com",
databaseURL: "https://react-todo-app-98aa8.firebaseio.com",
projectId: "react-todo-app-98aa8",
storageBucket: "react-todo-app-98aa8.appspot.com",
messagingSenderI... |
import { createSelector } from 'reselect';
import {
VERSION,
GROUP_ID,
ITEM_IDS,
IS_LISTABLE,
NO_NAMESPACE,
} from '../../../modules/k8s';
export const TYPE_NAMESPACE = 'TYPE_NAMESPACE';
export const TYPE_RESOURCE = 'TYPE_RESOURCE';
export const TYPE_ITEM = 'TYPE_ITEM';
const sortByName = (a, b) =>
(a.... |
/*
* Root saga
* */
import { fork, spawn, all } from 'redux-saga/effects';
import map from 'lodash/fp/map';
import { initI18n, watchI18n } from 'src/client/store/reducers/i18n/i18n.saga';
import { watchFetchProjectData } from 'src/client/store/reducers/project/project.saga';
import { watchProjects } from 'src/client/st... |
#MenuTitle: Anchor Mover 2.0
# -*- coding: utf-8 -*-
from __future__ import division, print_function, unicode_literals
__doc__="""
Batch-process anchor positions in selected glyphs (GUI).
"""
import vanilla, math
from Foundation import NSPoint
listHorizontal = [
["current position", "copyAnchor.x"],
["LSB", "0.0"],... |
import React from 'react';
import SpeedtestHeader from '../../components/speedtest/SpeedtestHeader';
import SpeedtestList from '../../components/speedtest/SpeedtestList';
import './style.css';
function Speedtest() {
return (
<div className="ui-top-content">
<SpeedtestHeader />
<div className="ui... |
# 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 may ... |
var Author = require('../models/authorModel');
// function declaration
exports.authorList = authorList;
exports.authorDetail = authorDetail ;
exports.authorCreateGet = authorCreateGet ;
exports.authorCreatePost = authorCreatePost ;
exports.authorDeleteGet = authorDeleteGet ;
exports.authorDeletePost = author... |
import { Meteor } from 'meteor/meteor';
import { Tracker } from 'meteor/tracker';
import _ from 'underscore';
import mem from 'mem';
import { Subscriptions, Messages } from '../../../models';
import { callbacks } from '../../../callbacks';
import { settings } from '../../../settings';
import { hasAtLeastOnePermission ... |
// https://alisdair.mcdiarmid.org/simple-nodejs-tests-with-assert-and-mocha/
// https://nodejs.org/api/all.html#assert_assert
const assert = require('assert');
const parser = require('../index');
const data = require('./data');
describe('tile-parser', function() {
describe('module.exports', function() {
data.... |
const path = require('path')
exports.createPages = ({ graphql, actions }) => {
const { createPage } = actions
return new Promise((resolve, reject) => {
const storyblokEntry = path.resolve('src/templates/storyblok-entry.js')
resolve(
graphql(
`{
stories: allStoryblokEntry {
... |
!function(e){function t(t){for(var n,i,a=t[0],l=t[1],p=t[2],f=0,s=[];f<a.length;f++)i=a[f],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&s.push(o[i][0]),o[i]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(c&&c(t);s.length;)s.shift()();return u.push.apply(u,p||[]),r()}function r(){for(var e,t... |
function drawGraph(connections) {
var nodes = [];
var edges = [];
var network = null;
var nodes = [],
nodesHash = {};
function addNode(nodeObject) {
nodesHash[nodeObject.id] = {
id: nodeObject.id,
shape: 'circularImage',
image: nodeObject.avatar,... |
import Project from './ui/Project';
import ScratchAudio from '../utils/ScratchAudio';
import Paint from '../painteditor/Paint';
import Prims from './engine/Prims';
import Undo from './ui/Undo';
import Alert from './ui/Alert';
import Palette from './ui/Palette';
import Record from './ui/Record';
import IO from '../table... |
import React, { useState } from "react";
import { Formik } from "formik";
import * as Yup from "yup";
import axios from "axios";
import TextField from "@material-ui/core/TextField";
import { SignUpButton, SignUpWrapper, StyledForm } from "./SignUpLoginStyles";
import { Link } from 'react-router-dom';
const Login = p... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
export const string = () => ({
name: 'string',
aliases: [],
type: 'stri... |
jQuery(function() {
var $ = jQuery, // just in case. Make sure it's not an other libaray.
$wrap = $('#uploader'),
// 图片容器
$queue = $('<ul class="filelist"></ul>')
.appendTo( $wrap.find('.queueList') ),
// 状态栏,包括进度和控制按钮
$statusBar = $wrap.find('.statusBar'),
... |
System.register([],(function(e){"use strict";return{execute:function(){var r=e("s",(function(e){try{if(e instanceof o){return e.value}if(typeof e!=="string"||e===""){return e}var r=document.createDocumentFragment();var a=document.createElement("div");r.appendChild(a);a.innerHTML=e;i.forEach((function(e){var a=r.querySe... |
const https = require('https');
const { InitializeHeaders } = require('../util/InitializeHeaders');
const { EventEmitter } = require('events');
const { BASE_BUFFER } = require('../constants/Constants');
const FrameBuffer = require('../util/FrameBuffer');
const GKey = require('../util/GenerateKey');
class YenSocket ext... |
const fs = require('fs');
const path = require('path');
const gulp = require('gulp');
const less = require('gulp-less');
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const easings = require('postcss-easings');
const modules = require('postcss-modules');
const {rollup} = require... |
"""Game dynamics"""
from board import format_board
def turn(first, second, board, solution_board):
"""Fills board if user find out a pair"""
first_box = solution_board[first[1]][first[0]]
second_box = solution_board[second[1]][second[0]]
board[first[1]][first[0]] = first_box
board[second[1]][sec... |
/* jQuery v1.11.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof windo... |
<<<<<<< HEAD
const app = require("tns-core-modules/application");
var view = require("ui/core/view");
const httpModule = require("http");
const ListPicker = require("tns-core-modules/ui/list-picker").ListPicker;
const fromObject = require("tns-core-modules/data/observable").fromObject;
const switchModule = require... |
const React = require('react');
import { Pagination } from 'react-bootstrap';
class DocumentViewerControls extends React.Component {
render() {
return (
<Pagination
activePage={this.props.currentPage}
boundaryLinks
bsSize="medium"
ellipsis
first
items={this... |