text stringlengths 3 1.05M |
|---|
class Bus {
constructor() {
this.listeners = {};
}
on(event, listener) {
(this.listeners[event] || (this.listeners[event] = [])).push(listener);
return this;
}
off(event, listener) {
if (listener) {
this.listeners[event] = (this.listeners[event] || []).f... |
angular.module('workbenchQuery', ['ngRoute'])
.value('version', '0.0.1')
.controller('wbQueryCtrl', function($scope, $location, tmMsgQuery) {
$scope.date = {
from: $location.$$search['date.from'] || new Date().toISOString().substr(0, 11) + "00:00",
to: $location.$$search['date.to'] || new Date().toISOString... |
import React, { Component } from 'react';
import { IntlProvider } from 'react-intl';
import { connect } from 'react-redux';
const mapStateToProps = state => ({
locale: state.settings.locale,
});
/**
* Local Wrapper
*
* @class IntlWrapper
* @extends {Component}
*/
class extends Component {
static defaultP... |
def get_package_data():
# Installs the testing data files. Unable to get package_data
# to deal with a directory hierarchy of files, so just explicitly list.
return {'linetools.isgm.tests': ['files/*.fits', 'files/*.dat', 'files/*.json', 'files/*.all', 'files/*.fits.gz', 'files/*.VP', 'files/*.out']} |
const FILES_TO_CACHE = [
"/",
"/index.html",
"/index.js",
"/db.js",
"/manifest.webmanifest",
"/styles.css",
"/icons/icon-192x192.png",
"icons/icon-512x512.png",
];
const CACHE_NAME = "static-cache-v2";
const DATA_CACHE_NAME = "data-cache-v1";
// install
self.addEventListener("install", function (evt) {
evt.w... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import {StyleSheet,Image ,View,Text } from 'react-native'
import { WhiteSpace,WingBlank,Flex } from '@ant-design/react-native'
import { CircleThumb } from '../../../components/Thumb'
@connect(({ player }) => ({
player
}))
class UserInfo ... |
"""Support to pretty-print lists, tuples, & dictionaries recursively.
Very simple, but useful, especially in debugging data structures.
Classes
-------
PrettyPrinter()
Handle pretty-printing operations onto a stream using a configured
set of formatting parameters.
Functions
---------
pformat()
Format a... |
import { Machine } from "xstate";
import { drawer } from '../store/stores';
export default Machine(
{
id: 'Drawer',
initial: 'starting',
//strict: true,
states: {
starting: {
entry: ['activated'],
after: {
10: 'closed'
... |
Ti.include("/lib/styles.js");
Ti.include("/lib/dataHandler.js");
Ti.include("/lib/createInfoIcon.js");
// var ImageFactory = require('fh.imagefactory');
function ObjectView(data) {
var editMode = false;
if (data){
editMode = true;
}
var objData = {};
if (!editMode){
// set date
var currentdate = new Date(... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import IconButton from "material-ui/IconButton";
import Paper from "material-ui/Paper";
import TextField from "material-ui/TextField";
import ContentAdd from "material-ui/svg-icons/content/add";
import Subheader from "material-ui/Subheader";
... |
/* @flow */
import * as nodeOps from 'web/runtime/node-ops'
import { createPatchFunction } from 'core/vdom/patch'
import baseModules from 'core/vdom/modules/index'
import platformModules from 'web/runtime/modules/index'
// the directive module should be applied last, after all
// built-in modules have been applied.
c... |
const test = require("ava")
const extractDmg = require(".")
test("main", async (t) => {
if (process.platform === "darwin") {
const contents = await extractDmg("fixtures/vlc-3.0.8.dmg")
t.deepEqual(contents, [
".VolumeIcon.icns",
".background.tiff",
"Applications",
"VLC.app",
])
} else {
t.pass()
... |
// @flow
import { describe, it } from "flow-typed-test";
import * as fs from "fs-extra";
import * as Path from "path";
let len = 2;
let src = "";
let dest = "";
let file = "";
let dir = "";
let path = "";
let data = "";
let uid = 0;
let gid = 0;
let fd = 0;
let modeNum = 0;
let modeStr = "";
let object = {};
let erro... |
import Vue from 'vue';
import { AgGridVue } from 'ag-grid-vue';
import 'ag-grid-community/dist/styles/ag-grid.css';
import 'ag-grid-community/dist/styles/ag-theme-alpine.css';
const VueExample = {
template: `
<div style="display: flex; flex-direction: column; height: 100%">
<div style="margin... |
// var submmitted = false; // 全局变量
// var submit_form = function (form_name) {
// if(submmitted) {
// return; // 不能重复提交
// }
// // 向后端发送请求
// // ...
// submmitted = true;
// };
var submit_form = (function () {
var submmitted = false; // 局部变量,只在闭包内生效
return function (form_name) {
... |
import React from 'react';
import CreateSvgIcon from '../CreateSvgIcon'
export default CreateSvgIcon({
path: <React.Fragment><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/></React.Fragment>,
name: 'Error',
}) |
# -*- coding: utf-8 -*-
"""
Pytest fixtures
"""
from __future__ import division, absolute_import, print_function
import collections
from contextlib import contextmanager
from io import StringIO
import os
import shutil
import pytest
import sphinx
from sphinx.application import Sphinx
from sphinx.util.docutils import ... |
export default Ext.define("ExtReactMaterialUIExamples.reader.Salary", {
extend: "Ext.data.reader.Json",
alias: "reader.salary",
getResponseData: function (...args) {
const data = KitchenSink.reader.Salary.superclass.getResponseData.call(
this,
...args
);
ret... |
const MessageProcessor = require('../../message-processor')
const Interruptible = require('../../shared/interruptible')
/**
* SyncTask represents an operation run by the SyncWorker.
* Any IMAP sync operation that runs during sync should extend from this class
* and implement `runTask`
*
* By default, this class e... |
/* eslint-disable max-len */
import flatpickr from 'flatpickr';
import inputFocus from './_inputFocus';
const datePicker = () => {
if (!document.querySelectorAll('.flatpickr').length > 0) return false;
const html = document.querySelector('html');
const allDates = Array.from(html.querySelectorAll('.flatpickr'));... |
import datetime
import logging
from discord import Embed
from discord.ext import commands
from bot.bot import Bot
from bot.constants import Colours, Month
from bot.utils.decorators import in_month
log = logging.getLogger(__name__)
HEBCAL_URL = (
"https://www.hebcal.com/hebcal/?v=1&cfg=json&maj=on&min=on&mod=on&... |
'use strict';
const wrap = require('lodash/wrap');
function spyOnUnsubscribe(mockStore) {
let unsubscribeSpy;
mockStore.subscribe = wrap(mockStore.subscribe, (subscribe, callback) => {
const unsubscribe = subscribe(callback);
unsubscribeSpy = jest.fn(() => unsubscribe());
return uns... |
module.exports={title:"Windows 95",slug:"windows95",svg:'<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Windows 95 icon</title><path d="M5.712 1.596l-.756.068-.238.55.734-.017zm1.39.927l-.978.137-.326.807.96-.12.345-.824zM4.89 3.535l-.72.05-.24.567.721-.017zm3.724.309l-1.287.068-.394.96 1... |
// Copyright (c) 2015 Uber Technologies, 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
// to use, copy, modify, merge... |
module.exports = rotateY;
/**
* Rotate a 3D vector around the y-axis
* @param {vec3} out The receiving vec3
* @param {vec3} a The vec3 point to rotate
* @param {vec3} b The origin of the rotation
* @param {Number} c The angle of rotation
* @returns {vec3} out
*/
function rotateY(out, a, b, c){
var p = [], r... |
'use strict';
const Schema = require('../user.schema');
const Joi = require('joi');
module.exports = {
create: create,
update: update,
read: read,
login: login,
logout: logout
};
const schema = Schema.getSchema();
function read () {
return {};
}
function logout () {
return {};
}
function login () {
... |
import React from "react";
export default function NavegadorBarra() {
return (
<nav className="navbar navbar-expand-sm navbar-dark bg-primary mb-4">
<div className="container">
<span className="navbar-brand">
Processo Pitang
</span>
<div className="pull-left" title="Ínicio... |
import Ember from 'ember';
import { get, set, setProperties } from '@ember/object';
import { sendEvent } from '@ember/object/events';
import RSVP from 'rsvp';
import Service from '@ember/service';
import fetch from 'fetch';
import { A } from '@ember/array';
import { ApolloClient } from 'apollo-client';
import { InMemor... |
# from gammagl import data, datasets, layers, models, utils, sparse
# from gammagl.data.graph import Graph
# from gammagl.sparse.sparse_adj import SparseAdj
__version__ = '0.0.1'
|
import re
import string
import nltk
import pandas as pd
import numpy as np
import spacy
def init():
nltk.download("punkt")
stpwrds = "a, agora, ainda, alguém, algum, alguma, algumas, alguns, ampla, amplas, amplo, amplos, ante, antes, ao, aos, após, aquela, aquelas, aquele, aqueles, aquilo, as, até, através, cada,... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FUNCTIONS = void 0;
exports.FUNCTIONS = {
TemperatureLevel: 'heating',
TemperatureOffset: 'heating',
Thermostat: 'heating',
ValveTappet: 'heating',
RoomClimateControl: 'heating',
TemperatureLevelConfiguration: '... |
var exceptions = require('../exceptions/exceptions.js');
/**
* Repräsentiert ein Veröffentlicher im Observern Patterns.
*/
class Subject {
/**
* Erzeugt ein Subject.
*/
constructor(){
this.observers = [];
}
/**
* Registriert ein Beobachter beim Veröffentlicher (Subject).
*... |
var Tutor = function(){
this.steps = [];
this.currentStep = 0;
(function() {
if ( typeof Tutor.prototype.uniqueid == "undefined" ) {
var id = 0;
Tutor.prototype.uniqueid = function() {
if ( typeof this.__uniqueId == "undefined" ) {
this.__uniqueId = ++id;
... |
#! /usr/bin/env python3
# -*- coding: utf-8; py-indent-offset: 4 -*-
#
# Author: Linuxfabrik GmbH, Zurich, Switzerland
# Contact: info (at) linuxfabrik (dot) ch
# https://www.linuxfabrik.ch/
# License: The Unlicense, see LICENSE file.
# https://github.com/Linuxfabrik/monitoring-plugins/blob/main/CONTRIBUTING... |
import { Vector3 } from '../math/Vector3';
import { Object3D } from '../core/Object3D';
import { LineSegments } from '../objects/LineSegments';
import { LineBasicMaterial } from '../materials/LineBasicMaterial';
import { Float32BufferAttribute } from '../core/BufferAttribute';
import { BufferGeometry } from '../core/Bu... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import copy
import time
import argparse
import cv2 as cv
import numpy as np
import onnxruntime
def run_inference(onnx_session, input_size, image):
# Pre process:Resize, BGR->RGB, Transpose, float32 cast
input_image = cv.resize(image, dsize=(input_size[1], input_s... |
require('./helper');
var thesis = {
title: "Node is cool",
author: "creationix",
reasons: ["Non-Blocking I/O", "Super Fast", "Powered by bacon"]
};
expect("load");
var documents = nStore.new('fixtures/new.db', function (err) {
if (err) throw err;
fulfill("load");
expect("save");
documents.save("thesis"... |
//>>built
define("dijit/_editor/nls/th/LinkDialog",({createLinkTitle:"คุณสมบัติลิงก์",insertImageTitle:"คุณสมบัติรูปภาพ",url:"URL:",text:"คำอธิบาย:",target:"เป้าหมาย:",set:"เซ็ต",currentWindow:"หน้าต่างปัจจุบัน",parentWindow:"หน้าต่างหลัก",topWindow:"หน้าต่างบนสุด",newWindow:"หน้าต่างใหม่"}));
|
/*
* 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.
*/
import React from 'react';
import ReactDOM from 'react-dom';
import { uiMod... |
/*! ramp-pcar 06-07-2015 14:40:07 : v. 5.4.2-rc1
*
* RAMP GIS viewer - Groundhog; Sample of an implementation of RAMP
**/
define(["dojo/_base/declare","dojo/_base/lang","dojo/dom","dojo/dom-construct","dijit/form/Form","dijit/form/TextBox","dijit/form/Select","dijit/form/Button","esri/tasks/QueryTask","esri/tasks... |
#! /usr/bin/env python
from itertools import product
import copy
import pddl
class ConditionProxy(object):
def clone_owner(self):
clone = copy.copy(self)
clone.owner = copy.copy(clone.owner)
return clone
class PreconditionProxy(ConditionProxy):
def __init__(self, action):
se... |
import { fromJS } from 'immutable'
import {
SIGN_IN,
SIGN_IN_ERROR,
CHANGE_USER_CREDENTIALS,
GET_INFO,
GET_INFO_SUCCESS,
GET_INFO_ERROR,
} from './constants'
// The initial state of the App
const initialState = fromJS({
user_credentials: {
email: '',
password: '',
},
menu_state: {},
info: ... |
var categories = [
"astro-ph",
"astro-ph.CO",
"astro-ph.EP",
"astro-ph.GA",
"astro-ph.HE",
"astro-ph.IM",
"astro-ph.SR",
"cond-mat",
"cond-mat.dis-nn",
"cond-mat.mtrl-sci",
"cond-mat.mes-hall",
"cond-mat.other",
"cond-mat.quant-gas",
"cond-mat.soft",
"cond-mat.stat-mech",
"cond-mat.str-e... |
'use strict';
var http = require('http');
var fs = require('fs');
var path = require('path');
//var express = require('express');
//var app = express();
var server = http.createServer(function(req,res){
if(req.url === "/"){
fs.readFile('./index.html','UTF-8', function(err, html){
res.writeHead(... |
/**
* The core Dress-up blueprint game file.
*
* This file is only used to initalise (start-up) the main Kiwi Game ,
* add all of the relevant states to that Game,
* and then choose which one to load first.
*/
//Create some gameoptions
var gameoptions = {
width: 768,
height: 1024
}
//Initialise the Kiwi Game.
... |
'use strict';
const ImageSource = require('./image_source');
const window = require('../util/window');
/**
* A data source containing the contents of an HTML canvas.
* (See the [Style Specification](https://www.mapbox.com/mapbox-gl-style-spec/#sources-canvas) for detailed documentation of options.)
* @interface Ca... |
import initRouterGuard from './router-guard'
let appVm = false
export function getApp () {
return appVm
}
export function getCurrentPages (isAll = false, ignoreError = false) {
const pages = []
const app = getApp()
if (!app) {
if (ignoreError) {
console.error('app is not ready')
}... |
var callbackArguments = [];
var argument1 = function() {
callbackArguments.push(arguments)
return undefined; };
var argument2 = true;
var argument3 = 1.7762170015239209e+308;
var argument4 = function() {
callbackArguments.push(arguments)
return undefined; };
var argument5 = [59,714,714,0,783];
var argument6... |
/*!
* jQuery JavaScript Library v3.3.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
... |
$(function () {
var login = avalon.define({
$id: "login",
username: null,
password: null,
errorMsg: null,
hasError: false,
submit: function () {
login.hasError = false;
if (login.username == null || login.password == null || login.username == "... |
# -*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
import argparse
import sys
import json
from astropy.time import Time
predefined_bands = ["g", "r", "i", "z", "y", "J", "H", "K"]
def _parse_command_line_args():
'''
Parses and returns the command line arguments.
'''
pars... |
export const exclamationMarkTriangle16F = "M14.894 12.552l-6-11.998a1 1 0 0 0-1.787 0l-6 11.998A.998.998 0 0 0 2 13.999h12a.998.998 0 0 0 .894-1.447zM9 12H7v-2h2zm0-3H7V4h2z";
|
// Simple arithmetic calc app
/**
* Write some pseudo code steps here.
* Use those steps as your `commit` messages (and delete them from here as you complete a step.)
*/
const calc = {
add(a, b) {
return Number(a) + Number(b);
},
subtract(a, b) {
return a - b;
},
multiply(a, b) {
return a * b... |
import Repository from './default-repository';
import UserModel from '../models/user-model';
class UserRepository extends Repository {
constructor() {
super(UserModel);
}
}
export default new UserRepository(); |
const mongoose = require('mongoose')
const Schema = mongoose.Schema
const messages = new Schema({
name: { type: String, required: true, trim: true },
subject: { type: String, required: true, trim: true},
message: { type: String, required: true, trim: true },
ownerId: Schema.Types.ObjectId,
reply: [
... |
import React from 'react';
import ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { store, persistor } from './redux/store';
// import store from './redux/store';
import App from '.... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(React.createElement("g", null, React.createElement("path", {
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .... |
from kivy.garden.mapview import MapView
from kivy.app import App
class MapViewApp(App):
def build(self):
mapview = MapView(zoom=15, lat=35.681382, lon=139.766084)
return mapview
MapViewApp().run()
|
/* eslint-env amd, jquery */
/* eslint-disable no-console */
/* global requirejs */
requirejs.config({
paths: {
"SocketIOFileUpload": "/siofu/client",
"socket.io": "/socket.io/socket.io"
}
});
require(["socket.io", "SocketIOFileUpload"], function (io, SocketIOFileUpload) {
// jQuery version
function flash(mes... |
import sys
import time
from random import random
from pathlib import Path
from examinator import *
import asyncio
import concurrent.futures
import itertools
from collections import Counter
#from joblib import Parallel, delayed
basepaths = ['.']
basepaths = map(Path, basepaths)
counter = Counter()
def cc(s):
cou... |
/*!
* OpenUI5
* (c) Copyright 2009-2019 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define([],
function() {
"use strict";
/**
* SinglePlanningCalendar renderer.
* @namespace
*/
var SinglePlanningCalendarRenderer = {};
/**
* Renders ... |
#!/usr/bin/env python
import os
from pip.req import parse_requirements
from setuptools import setup
install_reqs = parse_requirements(os.path.join(os.path.dirname(os.path.abspath(__file__)),
'requirements.txt'), session='None')
setup(
name='apsconnectcli',
auth... |
import * as types from "../actions/ActionTypes";
const initialState = {
auth: null,
githubProvider: null,
facebookProvider: null,
user: null,
isNewUser: false,
newUserInfo: null,
token: null,
isSigningOut: false,
isInitialized: false,
idtokenUnsubscribe: null,
};
export default function (state = ... |
System.register(["@angular/core", "./test.component"], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? ... |
import { toArray } from 'util'
import { Document } from './models/Document'
import { wrapObject } from './wrapNativeObject'
import { Types } from './enums'
import { Factory } from './Factory'
import { colorFromString } from './style/Color'
const simpleAttribute = (attribute, opposite) => (
operator,
value,
{ add... |
import React from 'react'
import logo from '../../assets/logo.svg'
import { FiLogIn } from 'react-icons/fi'
import { Link } from 'react-router-dom'
import './styles.css'
const Home = () => {
return(
<div id="page-home">
<div className="content">
<header>
<img... |
Clazz.declarePackage ("J.g3d");
Clazz.load (["JU.P3"], "J.g3d.SphereRenderer", null, function () {
c$ = Clazz.decorateAsClass (function () {
this.g3d = null;
this.shader = null;
this.minX = 0;
this.maxX = 0;
this.minY = 0;
this.maxY = 0;
this.minZ = 0;
this.maxZ = 0;
this.x = 0;
this.y = 0;
this.z = 0;
this.diameter = ... |
/*
Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
if(!dojo._hasResource["dijit.form.CheckBox"]){
dojo._hasResource["dijit.form.CheckBox"]=true;
dojo.provide("dijit.form.Chec... |
# Copyright (C) 2010-2011 Richard Lincoln
#
# 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, merge, publish... |
/*
square.js
This file exports a function for drawing a square centre piece for a QRCode
--Geoff Natin 11/1/18 17:41
*/
import React, { Component } from 'react';
import { Rect } from 'react-native-svg';
//Returns an SVG Element for a piece of the 'square' codeStyle
export function drawSquarePiece(x,y,modules,pie... |
import pytest
import requests
STOP_IDS = {
"1A",
"1B",
"1C",
"1D",
"1E",
"1F",
"1G",
"1AS",
"1BS",
"1CS",
"1DS",
"1ES",
"1FS",
"1GS",
"1AN",
"1BN",
"1CN",
"1DN",
"1EN",
"1FN",
"1GN",
"2COL",
"2MEX",
}
ROUTE_IDS = {"A", "B"}
FEE... |
// generator: babel-node
// xfail: generator support isn't 100%
// "yield *, iterator closing via throw()" from kangax
function __createIterableObject(a, b, c) {
var arr = [a, b, c, ,];
var iterable = {
next: function() {
return { value: arr.shift(), done: arr.length <= 0 };
}
};
... |
const ghcjsRequire = require('ghcjs-require');
const Main = ghcjsRequire(module, 'README');
Main(({wrapped}) => {
wrapped.someFunction().then(() => {
console.log('someFunction is over');
process.exit(0);
});
});
|
module.exports = `<homepage-layout>
<!-- <template slot="title">My custom title</template>
<template slot="slogan">My slogan</template> -->
<p>{{ text }}</p>
<hr>
<n-test>Hello World</n-test>
<n-hello></n-hello>
<hr />
<ol>
<li
v-for="item in items"
v-text="item"
></li>
<input type="text" clas... |
/**
* Author: imzhi
* Date: 2015-05-20
* Result: Accepted
* Runtime: 188 ms
* @param {number} n - a positive integer
* @return {number}
*/
var hammingWeight = function(n) {
var bin = n.toString(2), bin_arr = bin.split("");
// reduce 方法 initial value 为 0 要加上,否则当 n 为 0 或者 1 时,rv 返回 string 类型的值,导致通过不了
/... |
function workingHours(input) {
switch (Number(input[0])) {
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 16:
case 17: switch (input[1]) {
case 'Monday': console.log('open'); break;
case 'Tuesday': console.log('open... |
'use strict'
angular.module('singleConceptAuthoringApp')
.directive('autofocus', ['$timeout', function ($timeout) {
return {
restrict: 'A',
link: function ($scope, $element) {
$timeout(function () {
$element[0].focus();
});
}
};
}]);
|
const sequelize = require('../database');
const { DataTypes, Model } = require('sequelize');
class Post extends Model {}
Post.init({
title:{
type:DataTypes.STRING,
allowNull: false,
},
text: {
type: DataTypes.STRING,
allowNull: false,
},
}, {
sequeliz... |
import Row from './src/row';
/* istanbul ignore next */
Row.install = function (Vue) {
Vue.component(Row.name, Row);
};
export default Row;
|
"""
Copyright 2018 Goldman Sachs.
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 di... |
'use strict';
const AstNodeInfo = require('../helpers/ast-node-info');
const createErrorMessage = require('../helpers/create-error-message');
const dasherizeComponentName = require('../helpers/dasherize-component-name');
const isDasherizedComponentOrHelperName = require('../helpers/is-dasherized-component-or-helper-na... |
/**
* Tom Select v1.7.7
* Licensed under the Apache License, Version 2.0 (the "License");
*/
import TomSelect from '../../tom-select.js';
var defaults = {
options: [],
optgroups: [],
plugins: [],
delimiter: ',',
splitOn: null,
// regexp or string for splitting up values from a paste command
persist: tru... |
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['pl']={"editor":"Edytor tekstu sformatowanego","editorPanel":"Panel edytora tekstu sformatowanego","common":{"editorHelp":"W celu uzyskania pomocy naciśnij ALT 0",... |
##############################################################################
#
# Copyright (c) 2008 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... |
import BaseInput from './BaseInput';
/* import FormContext from './FormContext';
import Form from './Form';
import Input from './Input';
import Submit from './Submit';
import FormScrollView from './FormScrollView';
import BaseInput from './BaseInput';
export default {
FormContext,
Form,
FormScrollView,
BaseInp... |
// Automatically generated from TypeScript type definitions provided by
// DefinitelyTyped (https://github.com/DefinitelyTyped/DefinitelyTyped),
// which is licensed under the MIT license; see file DefinitelyTyped-LICENSE
// in parent directory.
// Type definitions for Node.js 10.5.x
// Project: http://nodejs.org/
// D... |
class Queue:
def __init__(self):
self.__queue: dict[int, list[dict[str, str]]] = {}
async def insert_one(self, chat_id: int, datas: dict[str, str]):
if chat_id not in self.__queue:
self.__queue[chat_id] = [datas]
else:
self.__queue[chat_id].extend([datas])
... |
import Vue from 'vue'
import App from './App.vue'
import AnimateOnVisible from "./components/AnimateOnVisible.vue"
import VueTimeline from "@growthbunker/vuetimeline";
Vue.use(VueTimeline);
import { library } from '@fortawesome/fontawesome-svg-core'
import { faCopyright} from '@fortawesome/free-solid-svg-icons'
imp... |
from .Graph import Graph, draw_graph
from .Node import Node
from .Edge import Edge
from .get_ancestors import get_ancestors
from .get_descendants import get_descendants
from .graph_style.NodeStyle import NodeStyle |
const {
AwsCdkTypeScriptApp,
GithubWorkflow,
Semver
} = require('projen');
const AUTOMATION_TOKEN = 'GITHUB_TOKEN';
const project = new AwsCdkTypeScriptApp({
cdkVersion: "1.63.0",
name: "cdk-docker-awscli",
authorName: "Pahud Hsieh",
authorEmail: "pahudnet@gmail.com",
repository: "https://github.com/... |
export const FORMAT = "FORMAT";
export const RUN_SQL_CODE = "RUN_SQL_CODE";
export const RUN_SQL_FILE = "RUN_SQL_FILE";
|
import {useState, useEffect} from 'react'
const useFetch = (url) =>{
const [data, setData] = useState(null)
const [isloading, setIsLoading] = useState(true)
const [error, setError] = useState(null)
useEffect(()=>{
fetch(url)
.then(res =>{
return res.json()
})
... |
/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp",
"hr",
{
title: "Upute dostupnosti",
contents: "Sadržaj pomoći. Za zatvaranje pritisnite ESC.",
legend: [
... |
# Configuration file for the Sphinx documentation builder.
# -- Path setup --------------------------------------------------------------
import os
import sys
sys.path.insert(0, os.path.abspath('./..'))
# -- Project information -----------------------------------------------------
project = 'crosslingual-informati... |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("./runmode"));
else if (typeof define == "functi... |
# 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 ... |
module.exports = {
title: 'Cozastore',
/**
* @type {string} url pages
* @description Redirect before login
*/
redirect: '/product-payments',
/**
* @type {number} offset time zone
* @description Redirect before login
*/
timeZone: process.env.MIX_TIME_ZONE || 'Asia/Tokyo', // Tokyo
/**
... |
import pytz
import datetime
class Settings:
SECRET_KEY = 'you can copy from: python -c "print(repr(__import__(\"os\").urandom(30)))"'
TIMEZONE = pytz.timezone('Asia/Shanghai')
WEBROOT = '/report'
SQLALCHEMY_DATABASE_URI = 'sqlite:////Users/abcdabcd987/Developer/acm-semester-report/data/report.db'
M... |
#!/usr/bin/env python
"""
map.py
State Estimation and Analysis for PYthon
Utilities for dealing with basemap plotting. These routnes are simply
abstractions over the existing basemap to make it quicker for generating
basemap plots and figures.
Examples
-------
Assume you have longitude, latitu... |
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RSnowfall(RPackage):
"""Usability wrapper around snow for easier development of parallel R... |