text
stringlengths
7
3.69M
let express = require('express'); let router = express.Router(); let auth = require('../middleWare/auth'); let models = require('../models'); let multer = require('multer'); var storage = multer.diskStorage({ // 目标路径 destination: function (req, file, cb) { cb(null, 'public/uploads') }, //文件名 filename...
/* * moleculer-cli * Copyright (c) 2018 MoleculerJS (https://github.com/moleculerjs/moleculer-cli) * MIT Licensed */ const Moleculer = require("moleculer"); /** * Yargs command */ module.exports = { command: ["start", "*"], describe: "Start a Moleculer broker locally", builder(yargs) { yargs.options({ "...
function AsyncGetData (label) { return new Promise(resolve => { setTimeout(() => { let output = extra_large_items.filter(obj => { return obj.label.indexOf(label) > -1; }).slice(0, 10); resolve(output); }, 500); }) } window.AsyncFilteringSelect...
import config from '../config'; export default function addLegend(parent, { items, position, unxkcdify, parentWidth, parentHeight, strokeColor, backgroundColor, }) { const filter = !unxkcdify ? 'url(#xkcdify)' : null; const legend = parent.append('svg'); const backgroundLayer = legend.append('svg'); const t...
const toggleButton = document.getElementsByClassName('toggle-button')[0] const navbarLinks = document.getElementsByClassName('navbar-links')[0] toggleButton.addEventListener('click', () => { navbarLinks.classList.toggle('active') }) // ICON LIBRARIES SOURCES: //AWESOME_FONTS //https://fontawesome.com/v4.7.0/exam...
// @flow strict import * as React from 'react'; import { graphql, createFragmentContainer } from '@kiwicom/mobile-relay'; import CityImageContainer from './cityImage/CityImageContainer'; import type { MulticityFlight_booking as MulticityFlightType } from './__generated__/MulticityFlight_booking.graphql'; type Props ...
import app from 'firebase/app'; import 'firebase/auth' import 'firebase/firestore' const firebaseConfig = { apiKey: process.env.REACT_APP_API_KEY, authDomain: process.env.REACT_APP_AUTH_DOMAIN, databaseURL: process.env.REACT_APP_DATABASE_URL, projectId: process.env.REACT_APP_PROJECT_ID, storageBuc...
function baseStorage(key ,value){ uni.setStorage({ key:key, data:value, success: () => { console.log('--->save data success') }, fail: () => { console.log('--->save data fail') } }) } function objectStorage(key ,object){ baseStorage(key,JSON.stringify(object)) } function getStorageValue(key,de...
/* Copyright (c) 2015 Intel Corporation. All rights reserved. * Use of this source code is governed by a MIT-style license that can be * found in the LICENSE file. */ /* global process */ /* global console */ /* global __dirname */ /* global module */ /** * */ "use strict"; var path=require("path"); var fs=requir...
const test = alert('Выберите верные утверждения:'); let ok = 0; let cancel = 0; const question1 = confirm('1. Преобразование Number (“false”) вернет число 0.'); if (question1 === true) { ok++ } else { cancel++; }; const question2 = confirm('2. Значение переменной let нельзя изменить после инициализации.'); if ...
(function($) { /** * KOR library facade extentions * shortcut methods off the static KOR namespace for opening and hiding The Login and Detail Dialogs. */ /** * triggers a show event on the dom element anchor of the login dialog. */ KOR.showLoginDialog = function() { $('input[name=LoginForm_Password]').v...
module.exports = { name: 'model', create: 'each', dependencies: [], allowedParents: ['$root'], allowedChildren: ['field', 'comment'], autoAddedChildGears: { '_createdAt.field': { type: 'date', '.comment': {text: 'When record got created'} }, '_crea...
const head = require("./config/head.js"); const plugins = require("./config/plugins.js"); const themeConfig = require("./config/themeConfig.js"); const { penName, title } = require("./common/info"); module.exports = { // 使用npm包主题 vuepress-theme-vdoing theme: "vdoing", // 仓库地址 base: "/", head, markdown: { ...
import axios from 'axios'; import { fetchRestaurantById } from './RestaurantActions'; function setFavorites(favorites) { return { type: 'SET_FAVORITES', favorites, }; } function appendFavorite(restaurant) { return { type: 'APPEND_FAVORITE', restaurant, }; } function removeFavorite(restaurantI...
import { LOAN_REQUEST, LOAN_SUCCESS, LOAN_FAILURE } from './loan-constants'; const initialState = { isFetching: false, loanDetails: [], totalRecords: '', }; const loan = (state = initialState, action) => { switch (action.type) { case LOAN_REQUEST: return { ...state, isFetching: true,...
//This js file contains functions that use local storage //This function writes a string to local storage function writeToStorage(name, value){ localStorage.setItem(name, value); } //This function reads a string from local storage function readFromStorage(name){ //This variable will hold the item ret...
window.onload = function(){ /*****************头部****************/ //头部二维码 $(".app_down").hover(function(){ $(".header_code").stop().slideDown(); },function(){ $(".header_code").stop().slideUp(); }) //头部城市选择列表 $(".city_select").hover(function(){ $(".select_city").stop().slideDown(); },function(){ $(".sel...
import React, { Component } from 'react'; import Card from "./components/Card"; import Wrapper from "./components/Wrapper"; import Header from "./components/Header"; import Navbar from "./components/Navbar"; import instruments from "./instruments.json"; import './App.css'; class App extends Component { // Setting th...
import RegionsButton from "./RegionsButton"; export default RegionsButton;
/* * ForumPage Messages * * This contains all the text for the ForumPage component. */ import { defineMessages } from 'react-intl' export default defineMessages({ VoterPlaceholder: { id: 'ProxyPage VoterPlaceholder', defaultMessage: '请输入您投票的账户名' }, StatusText: { id: 'ForumVotePage StatusText', ...
// #!include Store.js /********* Devices in a location Store ****/ var LocationDevicesStore = function () { // NOT tested ReactStore.call(this); // @_devices = {'locationId': [<device>] } this._devices = {}; this._DEVICES_CHANGE = '1'; dispatcher.register(this._pullDevices.bind(this)); }; Lo...
import Citas from './classes/citas.js'; import UI from './classes/UI.js'; import { mascotaInput, propietarioInput, telefonoInput, fechaInput, horaInput, sintomasInput, formulario, } from './selectores.js' const administrarCitas = new Citas(); const ui = new UI(administrarCitas); let edit...
var excelTables = function(config) { return function (file, filename, done) { if (typeof file.table === "string"){ for (var i = 0; i < files.length; i++) { console.log(files[i].filename) }; /*alasql(makeQry(file.table, file.select, file.additional), [],functi...
require('dotenv').config(); const { start, dispatch, stop, spawnStateless, spawn, query, configurePersistence, spawnPersistent } = require("nact"); const { PostgresPersistenceEngine } = require("nact-persistence-postgres"); const system = start( configurePersistence( new PostgresPersistenceEngine( process.env.DB_...
export const REQ_LOADING = 'REQ_LOADING' export const REQ_SUCCESS = 'REQ_SUCCESS' export const REQ_FAIL = 'REQ_FAIL' export const REGISTER_USER = 'REGISTER_USER'
"use strict"; var _config = require("./../config"); var _config2 = _interopRequireDefault(_config); var _path = require("path"); var _path2 = _interopRequireDefault(_path); var _getTemplate = require("../utils/getTemplate"); var _getTemplate2 = _interopRequireDefault(_getTemplate); function _interopRequireDefaul...
// This file is full of stuff that the program needs to know to make a new game // World (terrain, time, etc) const blockSizeCm = 50; const mapCols = 150; const dirtBlockSoundNames = { onExcavate : 'gravel' } const stoneBlockSoundNames = dirtBlockSoundNames; const bedrockSoundNames = { onHit : 'clang' }; co...
import React, { useState, createContext, useContext, useEffect } from 'react'; import { useSocket } from './useSocket'; const ItemModelContext = createContext(); /** * Contexte permettant d'avoir accès aux fonctions de gestion des modèles d'item * partout dans le code */ export const ItemModelProvider = ({ childre...
/** 個人 第二步 填寫會員資料 */ import React,{Component} from 'react' import{ View,StyleSheet,Switch, Text,TouchableOpacity,Image, } from 'react-native' import {createDateData, currentFullData, createAreaData} from '@/utils/common' import { colors, scale, width } from '@/utils/device'; import Picker from 'react-native-pi...
(function(){ angular .module('everycent.transactions', ['everycent.common', 'everycent.transactions.importers']) .config(RouteConfiguration); RouteConfiguration.$inject = ['$stateProvider']; function RouteConfiguration($stateProvider){ $stateProvider .state('transactions', { url: '/t...
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; // action creators import { searchFocus, searchBlur, fetchSearchResults } from 'search'; import { fetchSeries } from 'series'; // components import SearchBox from 'search/components/SearchBox'; const Search = ({ results, hasFo...
$(function() { var params = {}; params.categoryType = $("#categoryType").val(); params.masterId = $("#masterId").val(); $("#groupGrid").jqGrid({ url:_requestPath+'/admin/getGroupListData', datatype:'json', mtype:'POST', postData:params, height: 450, rowNum:-1, //width: 800, //shrinkToFit:false, js...
const Order = require('./model'); const request = require('request'); const config = require('../../config'); const crypto = require('../../utils/crypto'); const fs = require('fs'); module.exports.createOrder = async (order, imageFile) => { if (imageFile) { return new Promise((resolve, reject) => { fs.readFile(i...
import { Debug } from '../../core/debug.js'; /** * Callback used by {@link ResourceLoader#load} when a resource is loaded (or an error occurs). * * @callback ResourceLoaderCallback * @param {string|null} err - The error message in the case where the load fails. * @param {*} [resource] - The resource that has been...
export const sortBanners = (banners) => { const mainBanner = banners.find((banner) => banner.isMain); if (!mainBanner) { return banners; } const resBanners = banners.filter((banner) => banner.id !== mainBanner.id); return [mainBanner, ...resBanners]; }; export const getLinksFromPath = (path) => { co...
import React from "react"; // nodejs library that concatenates classes import classNames from "classnames"; import Header from "../../components/Header/Header"; import Footer from "../../components/Footer/Footer"; // sections for this page import HeaderLinks from "../../components/Header/HeaderLinks"; import LeftLink f...
const { body, check } = require("express-validator/check"); const { Todo } = require("../../db/models/todo"); module.exports.addTodo = [ body("title", "Title is invalid") .exists() .isLength({ min: 1, max: 150 }), body("description") .exists() .isLength({ min: 1 }) ]; module.exports.checklist = [ ...
export function getGrandchild(obj, ids){ for(var i = 0; i < ids.length; ++i){ var id = ids[i]; for(var j = 0; j < obj.childNodes.length; ++j){ var o = obj.childNodes[j]; if(o.id == id){ obj = o; break; } } } return obj; } export function getChild(obj, id){ for(var j = 0; j < obj.ch...
const express = require('express'); const { log } = require('console'); const app = express(); const PORT = process.env.PORT || 3000; app .use(express.static(__dirname + '/public')) .listen(PORT, () => log(`> http://localhost:${PORT}`));
$('a[href*="#"]') .not('[href="#"]') .not('[href="#0"]').jQuery.easing();
let mongoose = require('mongoose') const MONGODB_USER = 'icaro' const MONGODB_PASSWORD = 'adminq1w2e3' const MONGODB_URI_DEV = 'ds133202.mlab.com:33202' const MONGODB_DATABASE = 'only-pay-waiter' var dbURI = `mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${MONGODB_URI_DEV}/${MONGODB_DATABASE}` mongoose.connect(dbURI,...
// action types // add card export const addCard = (text, boardIndex) => ({ type: 'ADD_CARD', text, boardIndex }); // remove card export const removeCard = id => ({ type: 'REMOVE_CARD', id }); // transfer a card export const transferCard = (id, destinationBoardIndex) => ({ type: 'TRANSFER_CARD', id, destinationBoard...
import getQuote from "./coindesk.js"; export default async function main() { let quote = await getQuote(); let data = JSON.parse(quote); const coin = { disclaimer:data.disclaimer, eur:data.bpi.EUR.rate, usd:data.bpi.USD.rate, gbp:data.bpi.GBP...
import React, { useState } from "react"; function ItemInput(props) { const [title, setTitle] = useState(); const [assignee, setAssignee] = useState(); return( <div> <h2>Add Item Details</h2> <form className="form-style" onSubmit={(event) => { props.item...
import React, {Component} from 'react'; import {Table,Button} from 'antd' import 'antd/dist/antd.css'; import BaseComponent from "../Base/BaseComponent"; import ModalWrapper from "../Base/ModalWrapper"; import JSTemplateGenerator from "./JSTemplateGenerator"; import {Upload} from "antd" const { clipboard } = window.req...
const personal = r => require.ensure([], () => r(require('@/views/personal/index')), 'order') const collection = r => require.ensure([], () => r(require('@/views/personal/collection/index')), 'collection') const similar = r => require.ensure([], () => r(require('@/views/personal/similar/index')), 'similar') const disco...
const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const CleanWebpackPlugin = require('clean-webpack-plugin'); module.exports = { entry: { app: './src/app.js', }, output: { path: path.join(__dirname, 'dist'), publicPath: '', filename: '[name].bundle.js', s...
import React from "react"; import "./App.css"; import { Route } from "react-router-dom"; import NavBar from "./components/molecules/NavBar"; import HomePage from "./components/organisms/HomePage"; import ShoppingCartPage from "./components/organisms/ShoppingCartPage"; import styled from "styled-components"; import Deco...
<Title level={3} style={{ textAlign: 'center' }} editable={() => console.log('asdfasd')}> {selectedMark.properties.getAll().hintTitle} </Title> <Paragraph editable={() => console.log('asdfasd')}> {selectedMark.properties.getAll().hintContent} </Paragraph> <Tabs defaultActiveKey="1" type="card"> <TabPane key="1" tab=...
'use strict'; var app = angular .module('ngloginApp'); app.controller('RegisterCtrl', ['$rootScope', '$scope', '$log', '$route', '$location', 'APIConfig', '$http', 'APIService','$timeout','$window','APIFactory', function ($rootScope, $scope, $log, $route, $location, APIConfig, $http, APIService,$timeout,$window,...
const AreaReducer = (state = {}, action) => { if(action.type === "addAreaSuccess"){ var areas; if(state) areas = Object.assign({}, state); else { areas = {}; } areas[action.area.name] = action.area; return areas; } else if(action.type === "gotAreas") { var areas = {}; ac...
const fetch = require('node-fetch'); const glitchTextCD = { list: async function () { let _a = await global.db.ref('cooldown/glitchtext').get(); let _b = _a.val(); return Object.keys(_b) }, update: async function (uid, data) { await global.db.ref(`cooldown/glitchtext/${uid}`...
chrome.runtime.onMessage.addListener(function (msg, sender, sendResponse) { if (msg.text === 'get_parent_jira_issue') { var parentIssue = document.querySelector("a#parent_issue_summary.issue-link") var parentIssueLink = "" if (parentIssue) parentIssueLink = "<a href='" + parentIssue.href ...
import React from 'react'; import { useSelector, useDispatch } from 'react-redux'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import { SET_PAGE_NUMBER } from '../actions/file'; import { selectImageSearchResult } from '../features/searchImage/searchImageSlice'; export...
'use strict' const fp = require('fastify-plugin') const {Sequelize, DataTypes} = require('sequelize'); module.exports = fp(async function (fastify , opts) { const sequelize = new Sequelize(opts.db.mysql.database, opts.db.mysql.username, opts.db.mysql.password, { host: opts.db.mysql.host, diale...
const Model = require('../models/guias'); const getGuias = async () => { const guias = await Model.find(); return guias; } module.exports = { list: getGuias, }
Page({ /** * 页面的初始数据 */ data: { currentData: 0, selectPerson: true, }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { let scrollHeight = wx.getSystemInfoSync().windowHeight-32; this.setData({ scrollHeight: scrollHeight }) }, //获取当前滑块的index bindchange: functio...
const expect = require('chai').expect; const fs = require('fs'); const path = require('path'); const mkdirp = require('mkdirp'); const spawn = require('cross-spawn'); const utils = require('./utils'); // const template = require('../scripts/inc/template_cg_v5'); const { getGlobalScripts, getCampaignScripts, getVarian...
let router = require("express").Router(); let mongo = require("../../common/mongo"); router.get("/",(req,res)=>{ let commonDate = { slides:req.session, crumb:"首页", active:"follow", columnName:req.query.columnName, 'api_name':"product", q:req.query.q, tim...
var renderButton; var resultElement; var init = function() { console.log( "ready!" ); renderButton = $('#render')[0]; resultElement = $('#result'); var placeholder = $('#equation').attr('placeholder'); console.log(placeholder); }; $( document ).ready(function() { init(); renderButton.addEventLis...
var unitNumPropActivationValues = [25, 50, 100, 250, 500, 1000, 2500, 5000, 10000]; class Achievement{ constructor(name, requiredProperties){ this.Name = name; this.Props = requiredProperties; this.Unlocked = false; } } class AchievementController { constructor(){ thi...
function mostrarHola() { var numer1 = 5; var numer2 = 7; var total = numer1 + numer2; console.log(total); } mostrarHola();
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ angular.module('appAnalist').controller('listPesqController',function($scope,$http,$routeParams,NgTableParams){ $scope.user ...
const express = require("express"); const app = express(); const bodyParser = require("body-parser"); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); const cors = require("cors"); const { initDB, getRandomQuestions } = require("./DB/Models/Question"); app.use(cors()); initDB(); app.use...
/** * application class, cares on initialization and maintenance * @namespace * @param {number} id the document id */ vonline.Document = function(id) { this.id = id; // storage for undo-/redoable actions this.undoList = []; this.redoList = []; // observe if command was executed var that = this; vonline.event...
import React, { Component } from 'react'; import { Flex } from 'grid-styled'; import axios from 'axios'; import Input from './utilities/Input'; import Button from './utilities/Button'; import Tile from './utilities/Tile'; import Form from './utilities/Form'; export default class extends Component { constructor(){ ...
import styled, { keyframes } from "styled-components"; const ToRightAnimation = keyframes` 0% { transform: translateX(-100%); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } `; const ToBottomAnimation = keyframes` 0% { transform: translateY(-50%); opacity: 0; } 100% ...
import SubscriptionReference from './subscription-reference'; export default class CompositeSubscriptionReference extends SubscriptionReference { add(subscription) { if(!this._subscription) { this.pendingAdds = this.pendingAdds || []; this.pendingAdds.push(subscription); } else { this._subs...
angular.module('softtechApp') .factory('$dataFactory',function(){ var menuActive = {}; var baseUrl = 'http://127.0.0.1:3000'; var setLogin = function(item){sessionStorage.setItem('loginApp',JSON.stringify(item))}; var getLogin = function(){return JSON.parse(sessionStorage.getItem('loginApp'))}; v...
import { combineReducers } from 'redux' import auth from 'admin/reducers/AuthentificationReducer' import { reducer as formReducer } from 'redux-form' /** * Insert here any 'static' created reducers * @param {*} asyncReducers */ export const makeRootReducer = (asyncReducers) => { return combineReducers({ ...
/*const initialState = { payload: 'ZENIT' }*/ const Statenull = (state, action) => { //let value; switch (action.type) { case 'STATE_NULL' : return Object.assign({}, state, { value: null }) default: return state } } export default Statenull; /*return [ ...state, {value: acti...
const net = require('net'); const {getRandomBookId} = require('../code'); const socket = new net.Socket(); socket.connect({ host: '127.0.0.1', port: 3000, }); /** * 计数器 * @returns {object} */ const count = () => { let num = 0; return { get() { return num; }, add...
import CarsApp from '@/Pages/Cars'; import MotorcyclesApp from '@/Pages/Motorcycles'; import Home from '@/Pages/Home'; const routes = [{ path: '/', name: 'Home', component: Home }, { path: '/cars', name: 'Cars', component: CarsApp }, { path: '/motorcycles', name: 'Motorcycles', ...
import React, { useState } from "react"; import PropTypes from "prop-types"; import MyCollapse from "../Collapse"; function MultiCollapse(props) { const { collapseList, isShowTheFirst, isAdmin } = props; const [activeTab, setActiveTab] = useState(isShowTheFirst ? 0 : 1000); const handleActiveTab = (tab) => { ...
import React from 'react'; import { extend } from 'underscore'; const TestUtils = React.addons.TestUtils; function simulate (eventType, node) { TestUtils.Simulate[eventType](node); } module.exports = { render: (Component, options) => { extend({}, options); return TestUtils.renderIntoDocument(Component(opt...
import React from 'react'; import List from '@material-ui/core/List'; import ListItem from '@material-ui/core/ListItem'; import ListItemText from '@material-ui/core/ListItemText'; import Avatar from '@material-ui/core/Avatar'; import AppBar from '@material-ui/core/AppBar'; import Toolbar from '@material-ui/core/Toolbar...
require('/javascripts/jquery.js') require('/javascripts/core.js') describe('Ql core', function () { it("should return a QL object" , function() { expect(Ql).toBeTypeOf('object'); }) it("should be a Ql object" , function() { expect(Ql).toBe(window.Ql); }) describe('Ql helpers', function() { var ...
describe('VglGeometry:', function suite() { const { VglGeometry, VglNamespace } = VueGL; it('without properties', function test(done) { const vm = new Vue({ template: '<vgl-namespace><vgl-geometry ref="g" /></vgl-namespace>', components: { VglGeometry, VglNamespace }, }).$mount(); vm.$nextTi...
const CPUProfiler = require("./cpu-profiler/app") const tCPUProfile = require("./cpu-profiler/template") let Control = function () { this.elWebView = document.getElementById("web-view") this.elAddress = document.getElementById("address") this.elLoadBtn = document.getElementById("load-btn") this.elRecBtn = docu...
function solve(people,groupType,dayOfWeek){ let price; let totalSum; if (dayOfWeek === "Friday") { if (groupType === "Students") { price = 8.45; }else if (groupType === "Business") { price = 10.90; }else{ price = 15; } }else if (dayOfWe...
import React from 'react'; function HSLToRGB(h,s,l,a=1) { // Must be fractions of 1 s /= 100; l /= 100; let c = (1 - Math.abs(2 * l - 1)) * s, x = c * (1 - Math.abs((h / 60) % 2 - 1)), m = l - c/2, r = 0, g = 0, b = 0; if (0 <= h && h < 60) { r = c; g = x; b = 0;...
var express = require('express'); var router = express.Router(); var feedmodel = require('../model/feeds'); var commonpage = require('../views/common/template.marko'); var pages = { "local": require('../views/local/template.marko'), "international": require('../views/world/template.marko'), "lifestyle": require...
/****************** firebase references ******************/ var dbRef = firebase.database().ref('user'); var dbCounterRef = firebase.database().ref('counter'); var storageRef = firebase.storage().ref(); /****************** start of signUp Function ******************/ function signUp(){ var signup_username = documen...
import styled, { css } from "styled-components"; import { device } from "../../device"; const buttonStyles = css` @media ${device.mobileS} { height: 50px; line-height: 50px; font-size: 15px; padding: 0 10px; text-transform: uppercase; font-family: "Raleway", sans-serif; font-weight: bolde...
import {TableRow} from "./index" import './Table.css' export default function RataCompositionTable(props) { let table = [] props.rows.forEach((row, index) => { // if (row.stopping === true || showAll === true) { // let arrivalData = "-" // let departureData = "-" // ...
import test from 'ava'; import * as my_test from '../../dist/ava/date-trans'; /** *测试是不是闰年 */ test("is_leapyear_pass_1", async (t) => { t.is(my_test.is_leapyear(2000), true); }); test("is_leapyear_pass_2", async (t) => { t.is(my_test.is_leapyear(2001), false); }); /** * new Date()传入毫秒数, 获取年份 */ test("ge...
var mainModule = angular.module('mainModule', ['ngRoute', 'ui.bootstrap']); mainModule.config(function ($routeProvider) { $routeProvider .when('/',{ templateUrl: 'partials/defaultPartial.html' }) .when('/secondPartial', { templateUrl: 'partials/secondaryDefaultPartial.html' }) .otherwise({ redirectTo: '/' ...
import React,{Component} from 'react'; import {NavLink} from 'react-router-dom'; class TopNavigation extends Component{ render(){ let nav=null; if(this.props.enabled) { nav=(<div> <NavLink className="menu-link is-active notify" to="/" activeClassName="notify" ...
'use strict'; /** * @ngdoc overview * @name yapp * @description * # yapp * * Main module of the application. */ var states = [ { name: 'base', state: { abstract: true, url: '', templateUrl: 'views/base.html', data: {text: "Base", visible: false, admin: false } } }, { name: 'login', state: { url:...
angular.module('zingClient') .factory('Support', ['$resource', function($resource) { return $resource('/api/support/:id', {id : "@_id"}, { 'update': {method: 'PUT', isArray:true}, 'get': {method:'GET'}, 'save': {method:'POST', isArray:true}, ...
/** * Copyright 2016 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...
/** * 单例 * * 规则: 1. overscroll:scroll的元素始终可以在对应坐标方向滚动 2. overscroll:auto的元素如果在对应方向滚动到头则继续向上层寻找可滚动元素 3. 符合extra条件的元素不能作为选择元素的条件 */ var startPosY, startPosX, curPosY, curPosX; var stat = false; var defaultConfig = { //其他不爽的element isExtraElement : function(element){ switch(true){ ...
const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; const Body = Matter.Body; const Constraint=Matter.Constraint; var ground; function setup() { createCanvas(800, 700); engine = Engine.create(); world = engine.world; ground=new Roof(400,200,400,30); bob1=new Bob(300,480...
import React, { Component } from 'react'; import Pumpkin from "./Pumpkin"; import './App.css'; class Deal extends Component { constructor(props) { super(props); this.state = { pumpkinData: [ { name: "Blaze", description: "Flashy yellow, orange-striped fruits are flattened-r...
$(document).ready(function(){ var input; // 입력값 var calc_2 = 0; // 1항 var result = 0; // 2항 var cookie = null; // 대입 var cookie2 = null; // 대입 $('.btn .num').on('click', function(){ input = $(this).text(); ...
import ucFirst from "./ucFirst"; const actions = { getWeatherCity: cityName => dispatch => { const URL = `/data/2.5/weather?q=${cityName}&APPID=01d43d3c7f7d4442d855a56e23659f74&units=metric&lang=ru`; dispatch({ type: "CITY_START_FETCH" }) return fetch(URL) .t...
import { stripTrailingSlash } from './utils'; const WEBSITE_BASE_URL = stripTrailingSlash(process.env.REACT_APP_WEBSITE_BASE_URL); const BASE_AIRQLOUDS_URL = stripTrailingSlash( process.env.REACT_APP_BASE_AIRQLOUDS_URL || process.env.REACT_NETMANAGER_BASE_URL ); export const AIRQLOUD_SUMMARY = `${BASE_AIRQLOUDS_UR...
const isInteger = (NumberForCheck) => Math.floor(NumberForCheck) === NumberForCheck; console.log(isInteger(4)); console.log(isInteger(4.5));
import styled from 'styled-components'; export const FieldContainer = styled.div` background-color: #f1f4f6; border: 1px solid #e3e6ea; box-sizing: border-box; border-radius: 8px; width: 100%; height: 56px; display: flex; flex-direction: column; padding: 7px 16px; // margin: 4px 0px; ${props => (...
import { FaShieldAlt } from "react-icons/fa"; export default { name: "team", type: "document", title: "Teams", icon: FaShieldAlt, fields: [ { name: "name", title: "Name", type: "string" }, { name: "logo", type: "image", title: "Logo" }, { name: "a...