text stringlengths 2 1.05M |
|---|
//jCarouselLite调用
function Carousel(obj, leftArrow, rightArrow, num) {
$(obj).jCarouselLite({
btnNext: rightArrow,
btnPrev: leftArrow,
visible: num,
circular: false,
vertical: false
});
}
function Carousel2(obj, leftArrow, rightArrow, num, start) {
var numStart = start != undefined ?... |
// Copyright 2017 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --expose-wasm --stress-compaction
load('test/mjsunit/wasm/wasm-module-builder.js');
var initialMemoryPages = 1;
var maximumMemoryPages = 5;
... |
'use strict'
const { v4: uuidv4 } = require('uuid')
const moment = require('moment')
const helper = require('../lib/password')
const mongooseHandler = require('../lib/mongoose_handler.js')
const User = require('../models/user')
const password = require('../lib/password')
const schema = require('../schemas/user')
asyn... |
/*globals define*/
/*jshint browser: true*/
/**
* Contains helper functions for logging/downloading the state of the client.
*
* @author pmeijer / https://github.com/pmeijer
*/
define([
'js/Utils/SaveToDisk'
], function (saveToDisk) {
'use strict';
function _stateLogReplacer(key, value) {
var ... |
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
moduleForComponent('mobile-bar-wrapper', 'Integration | Component | mobile bar wrapper', {
integration: true
});
test('it renders', function(assert) {
// Set any properties with this.set('myProperty', 'value');
... |
/* General notes:
DONE Be able to add list items.
DONE List items should fade and cross off when clicked.
DONE Deleting items
DONE Need a whole-list delete button.
DONE Categories? And organization by them. Want a drop-down with
but the ability to add new ones.
Saving list? Probably need back-end. */
//check for we... |
const express = require("express");
const router = express.Router();
const constants = require('../helpers/constants');
const utils = require('../helpers/utils');
router.get('/', (_, res)=>{
res.status(200).json(constants.quotes);
});
router.get('/:option', async(req, res)=>{
let option = req.params.option;
... |
define(
//begin v1.x content
{
"dateFormat-medium": "d MMM G y",
"dateFormatItem-MMMEd": "E d MMM",
"dateFormatItem-MEd": "E, d/M",
"dateFormatItem-yyyyMMM": "MMM G yy",
"dateFormatItem-Hm": "HH:mm",
"dateFormatItem-H": "HH",
"dateFormatItem-y": "ปีGที่ y",
"dateFormatItem-hm": "h:mm a",
"dateFormatItem-Md": "... |
import React from "react"
import CollectionCard from "./collectionCard"
import Title from "../title"
import styled from "styled-components"
import { graphql, useStaticQuery, Link } from "gatsby"
const getImages = graphql`
query {
landscapes: allFile(
filter: { relativeDirectory: { eq: "paintings/landscapes... |
const R = require("ramda");
const SockJS = require("sockjs-client");
const Stomp = require("stompjs");
const socket = new SockJS("http://localhost:8080/ws");
const ws = Stomp.over(socket);
const readline = require("readline");
// const WebSocket = require("ws");
// const Stomp = require("stompjs");
// const socket ... |
function setup() {
// Create Canvas of size 600*600
createCanvas(700, 700, WEBGL);
}
function draw() {
// Set background color
background(200);
// Set filled color of sphere
fill('green');
// sphere() function called
sphere(100);
}
|
/* global describe */
/* global it */
import assert from 'assert';
import isSqlQuery from '../../src/utilities/isSqlQuery';
describe('isSqlQuery', () => {
it('recognizes SQL input', () => {
assert(isSqlQuery('SELECT 1'));
});
it('recognizes SQL input after ignoring defined patterns', () => {
assert(isSq... |
//>>built
define("dojox/editor/plugins/nls/sr/SafePaste",{instructions:"Direktno nalepljivanje je onemogu\u0107eno. Nalepite sadr\u017eaj u ovaj dijalog koriste\u0107i standardne tasterske kontrole pregleda\u010da ili kontrole menija za nalepljivanje Kada ste zadovoljni sa sadr\u017eajem za umetanje, kliknite na dugme... |
/* eslint no-unused-vars: 0 */
import { navigate } from "gatsby";
import Button from "antd/lib/button";
import Form from "antd/lib/form";
import Input from "antd/lib/input";
import PropTypes from "prop-types";
import React from "react";
const FormItem = Form.Item;
const { TextArea } = Input;
import "antd/lib/form/sty... |
app.stats.timeUnderwater = (() => {
let time = 0
return app.stats.invent('timeUnderwater', {
get: () => time,
increment: function (value) {
time += value
return this
},
set: function (value) {
time = Number(value) || 0
return this
},
})
})()
engine.loop.on('frame', ({... |
/**
* KolibriModule module.
* Provides the base class for Kolibri Modules - all Kolibri Modules must extend this Base class.
* @module kolibriModule
*/
const Kolibri = require('kolibri');
module.exports = class KolibriModule {
/**
* An array of options to select from the options object passed into the constr... |
// // @flow
import React from 'react';
import ReactDOM from 'react-dom';
import ViewTopic from '../../components/viewTopic';
import withLoginManager from '../../components/view';
// import '../../../css/style.scss';
function renderTopic(
version: Object,
// topicUID: string,
// topicName: string,
// versionUI... |
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
saveEvent(done) {
// Ember.run.later(this, () => {
typeof done === 'function' && done();
// }, 500);
},
reset() {
this.get('model').setProperties({
name: '',
participants_number: '',... |
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Wor... |
import Tx from 'ethereumjs-tx';
import { toHex } from 'web3-utils';
import { safeFromWei, safeToWei } from './lib';
import retry from 'async-retry';
import { NETWORK_TYPES } from './network';
import { ledgerSignTransaction } from './ledger';
import { trezorSignTransaction } from './trezor';
import { metamaskSignTransa... |
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.lang['fi']={"wsc":{"btnIgnore":"Jätä huomioimatta","btnIgnoreAll":"Jätä kaikki huomioimatta","btnReplace":"Korvaa","btnReplaceAll":"Korvaa ... |
!function(e){const o=e.cs=e.cs||{};o.dictionary=Object.assign(o.dictionary||{},{"%0 of %1":"%0 z %1","Align center":"Zarovnat na střed","Align left":"Zarovnat vlevo","Align right":"Zarovnat vpravo",Aquamarine:"Akvamarínová",Big:"Velké",Black:"Černá","Block quote":"Citace",Blue:"Modrá",Bold:"Tučné","Bulleted List":"Odrá... |
import { samplingFactors } from '@/config'
export default {
// changeFormat: false,
// format: '',
quality: '',
interlace: true,
strip: true,
samplingFactor: samplingFactors[0],
shrinkOnly: true,
maintainAspectRatio: true,
resize: true,
width: '1080',
height: ''
}
|
var structnode =
[
[ "data", "structnode.html#a760d01e575916fa5cbe75618da4922ee", null ],
[ "next", "structnode.html#aa3e8aa83f864292b5a01210f4453fcc0", null ],
[ "previous", "structnode.html#abf777f4eb2cf7f2f68812be81cd761f8", null ]
]; |
// Copyright 2019 Brandon Jones
//
// 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, dis... |
/* Theme Name: Jobya - Responsive Landing Page Template
Author: Themesdesign
Version: 1.0.0
File Description: Main JS file of the template
*/
(function ($) {
'use strict';
// Loader
$(window).on('load', function() {
$('#status').fadeOut();
$('#preloader').delay(350).fadeOut('sl... |
//External dependencies
var commando = require("discord.js-commando");
var path = require("path");
var moment = require("moment");
//Custom dependencies
var nkn1396_music = require("./modules/music/index");
//Load information
var token = require("./../token.json").nova;//I"m an idiot - Thanks for the lesson
//Start
va... |
import path from 'path';
import { runEmit } from './helpers/run';
const FIXTURES_DIR = path.join(__dirname, 'fixtures');
describe('toType option', () => {
it('should move a file to a new file', (done) => {
runEmit({
expectedAssetKeys: ['new-file.txt'],
patterns: [
{
from: 'file.tx... |
// Tests valid coordination of the expiration and vivification of documents between the
// config.system.sessions collection and the logical session cache.
//
// 1. Sessions should be removed from the logical session cache when they expire from
// the config.system.sessions collection.
// 2. getMores run on open cur... |
export const REQ_DEFECTS = "REQ_DEFECTS";
export const RCV_DEFECTS = "RCV_DEFECTS";
export const REQ_DEFECT = "REQ_DEFECT";
export const RCV_DEFECT = "RCV_DEFECT";
export const RESET_DF_ADD_EDIT = "RESET_DF_ADD_EDIT";
export const CHANGE_DF_ASSIGNEE = "CHANGE_DF_AS... |
import valuesService from '@/services/valuesService';
export default {
async fetchCount ({commit})
{
commit('ui/setLoading' , true,{ root: true })
try{
const resp = await valuesService.fetchCounts();
commit('setCounts',resp.item)
commit('ui... |
import React from "react"
import Scrollspy from "react-scrollspy"
import { Navbar, Nav } from "react-bootstrap"
import Scroller from "./scroller"
export default class Header extends React.Component {
constructor(props) {
super(props)
Scroller.handleAnchorScroll = Scroller.handleAnchorScroll.bind(this)
}
... |
import AssetsManager from './AssetsManager.js';
import KeyboardAndMouse from './KeyboardAndMouse.js';
import SpriteManager from './SpriteManager.js';
export default class SceneLoading{
constructor(manager){
this.manager = manager;
this.loading = 0;
this.assetsLoadedTime = 0;
this.loa... |
import React from "react";
export default (({
styles = {},
...props
}) => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style={{
width: "1.5rem",
height: "1.5rem"
}} {...props}><path fillRule="evenodd" d="M4.287 7.8a1 1 0 0 1 1.414 0l6.293 6.292L18.287 7.8a1 1 0 1 1 1.438 1.39l-.024.024-7 7a1 1... |
const { StatusCodes } = require("http-status-codes");
const ReviewUserLikeRepository = require("../../infrastructure/repositories/reviews/userLikesCount");
const add = async (req, res) => {
try {
const result = await ReviewUserLikeRepository.persist(req.params.estateId, req.params.userId, req.body);
res.jso... |
/**
* @licstart The following is the entire license notice for the
* Javascript code in this page
*
* Copyright 2020 Mozilla Foundation
*
* 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... |
// **********************************************************************
// *** DO NOT EDIT! This file was autogenerated by xcrpc ***
// **********************************************************************
// Copyright 2018 Xcalar, Inc. All rights reserved.
//
// No use, or distribution, of this source ... |
/**
* Module dependencies
*/
var assert = require('assert');
var _ = require('@sailshq/lodash');
var Machine = require('../');
var testMachineWithMocha = require('test-machinepack-mocha').testMachineWithMocha;
describe('`like` and `itemOf`', function (){
describe('using `like` in one of its exits', function ()... |
// Global utility script for NuGetGallery
/// <reference path="jquery-1.6.4.js" />
(function (window, $, undefined) {
function checkServiceStatus() {
$.get(app.root + 'api/v2/service-alert?cachebust=' + new Date().getTime())
.done(function (data) {
if (typeof data === 'string' &... |
document.querySelector('.cancle').addEventListener('click', e => {
e.preventDefault()
history.back()
})
document.querySelector('#content').addEventListener('keyup', e => {
document.querySelector('.limit').innerHTML = `(${e.target.value.length}/300)`
if(e.target.value.length > 300) {
e.target.va... |
const SoftUniFy = require('./app');
const assert = require('chai').assert;
describe('SoftUniFy', function () {
let softunify;
beforeEach(() => {
softunify = new SoftUniFy();
});
let artist = 'Bon Jovi';
let song = 'These days';
let lyrics = 'I was walking around, just a face in the cr... |
import { UPDATE_LOGIN_DATA } from '../actions/types'
const initialState = {
email: null,
password: null
}
export default (state = initialState, action) => {
switch(action.type){
case UPDATE_LOGIN_DATA:
return {...state, ...action.data }
default:
return state;
}
}; |
import babyYoda from '../../../assets/images/elements/yoda.png'
let floatImage = `
<div class="main-left">
<img src="${babyYoda}" alt="baby yoda">
</div>
`
export default floatImage |
"use strict";
/*
* Create the `min` function that takes 2 number as arguments
* and returns the lowest
* You must not just use `Math.min`, make your own.
* see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign
*
* @notions Functions, Ternary
*/
// Your code:
function ... |
module.exports = options => {
const { mdxOtherwiseConfigured = false, mdx: legacyConfigureMdxFlag = true, mdxLayouts = {} } = options
return {
siteMetadata: {
title: `Notes Title Placeholder`,
description: `Description placeholder`,
siteUrl: `http://example.com/`,
},
plugins: [
... |
!function(e){const i=e.it=e.it||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"%0 di %1","Align center":"Allinea al centro","Align left":"Allinea a sinistra","Align right":"Allinea a destra",Aquamarine:"Aquamarina",Black:"Nero","Block quote":"Blocco citazione",Blue:"Blu",Bold:"Grassetto","Break text":"Inte... |
import Section from 'components/Section';
const CenteredSection = Section.extend`
text-align: center;
`;
export default CenteredSection;
|
import {
Mixin,
meta,
on,
addListener,
removeListener,
suspendListener,
suspendListeners,
sendEvent,
hasListeners
} from '..';
QUnit.module('system/props/events_test');
QUnit.test('listener should receive event - removing should remove', function(assert) {
let obj = {};
let count = 0;
functio... |
app.route.get('/realdatamodels/:id_field', async (req) => {
let result = await app.model.RealDataModels.findOne({
condition: {
id_field: req.query.id_field
}
})
return result
})
app.route.get('/realdatamodels', async (req) => {
let limit = req.query.limit ? req.query.limit : 50
let offset = re... |
'use strict'
Object.defineProperty(exports, '__esModule', { value: true })
const contract = require('@truffle/contract')
const ConcreteChainlink = contract({
"contractName": "ConcreteChainlink",
"abi": [
{
"constant": false,
"inputs": [],
"name": "closeEvent",
"outputs": [],
"payable": false,
"sta... |
typeof(SVGeneration) == "undefined" && (SVGeneration = {});
SVGeneration.Editor = React.createClass({displayName: "Editor",
getInitialState: function() {
return {
active: 'Parameters',
image: false,
script: false,
windowHeight: $(window).height(),
currentParameters: []
};
},
... |
'use strict';
/**
* FFVideo - Video component-based display component
*
* ####Example:
*
* const video = new FFVideo({ path, width: 500, height: 350 });
* video.setAudio(true);
* video.setTimes("00:00:43", "00:00:50");
* scene.addChild(video);
*
*
* ####Note
* https://spritejs.org/demo/... |
'use strict';
const {
db,
models: { User, MealPlan },
} = require('../server/db');
async function seed() {
await db.sync({ force: true }); // clears db and matches models to tables
console.log('db synced!');
const users = await Promise.all([
User.create({ username: 'cody', password: '123' }),
User.... |
import React from 'react';
import { Show } from "@semapps/archipelago-layout";
import OrganizationTitle from "./OrganizationTitle";
import MarkdownField from "../../markdown/MarkdownField";
const OrganizationShow = props => (
<Show title={<OrganizationTitle />} {...props}>
<MarkdownField source="pair:descr... |
function GetDataJason(url, controle) {
$.getJSON(url, GetData);
function GetData(json) {
//Limpar os itens que são maiores que 0
//Ou seja: não retirar o primeiro item
$(controle + " :gt(0)").remove();
$(json).each(function () {
//adicionando as opções de acord... |
$(function(){
var tabs = $(".tabs");
var tabs1 = $(".tabs1");
tabs.each(function(){
var tab = $(this),
menu = tab.find(".menu li"),
content = tab.find(".content>div");
menu.hover(function(){
var me = $(this),
index = me.index();
... |
import { Vector2 } from '../math/Vector2.js';
import { MeshStandardMaterial } from './MeshStandardMaterial.js';
import { Color } from '../math/Color.js';
/**
* @author WestLangley / http://github.com/WestLangley
*
* parameters = {
* reflectivity: <float>
* clearcoat: <float>
* clearcoatRoughness: <float>
*
... |
(self["webpackChunk_vue_devtools_shell_chrome"]=self["webpackChunk_vue_devtools_shell_chrome"]||[]).push([[1594],{71594:(e,o,n)=>{"use strict";n.r(o),n.d(o,{conf:()=>t,language:()=>r});var t={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],... |
cordova.define("phonegap-plugin-push.PushNotification", function(require, exports, module) {
/* global cordova:false */
/* globals window */
/*!
* Module dependencies.
*/
var exec = cordova.require('cordova/exec');
/**
* PushNotification constructor.
*
* @param {Object} options to initiate Push Notifications.
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Utils_1 = require("../../../../Utils");
const commands_1 = require("../../commands");
const GraphCommand_1 = require("../../../base/GraphCommand");
const request_1 = require("../../../../request");
const vorpal = require('../../../../vor... |
/*
Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'undo', 'no', {
redo: 'Gjør om',
undo: 'Angre'
} );
|
import React from "react";
import ColoredCard from "../Components/ColoredCard.js";
import { Code, Cpu, Users } from "react-feather";
import Headings from "../Components/Headings.js";
const Skills = () => {
return (
<section className="section" id="skills">
<Headings number="03." title="Skills" emoji=... |
#!/usr/local/bin/node
var dash_button = require('node-dash-button');
var config = require("./config");
var twilio = require('twilio')(config.TWILIO_ACCOUNT_SID, config.TWILIO_ACCOUNT_AUTH_TOKEN);
console.log("Starting Amazon Dash Buzzer Hack.");
var send_message = function(){
var numbers = config.PHONE_NUMBERS.sli... |
import React, { useState, useEffect } from "react";
import { Switch, Route, Redirect, Router, Link } from "react-router-dom";
import axios from "axios";
import Web3 from "web3";
// creates a beautiful scrollbar
import PerfectScrollbar from "perfect-scrollbar";
import "perfect-scrollbar/css/perfect-scrollbar.css";
// @... |
import React from 'react'
import StaggeredList from '../components/staggeredList'
const SecondPage = () => (
<StaggeredList>
<div className="container header-margin-2">
<div className="row">
<div className="col-md-8">
<h3>Resume</h3>
</div>
<div className="col-md-4">
<a class="bt... |
/*
* h5ai
* h5ai 列目录
*/
const name = 'h5ai-beta'
const version = '1.0'
const protocols = ['h5ai']
const defaultProtocol = 'h5ai'
const path = require('path')
const { URL } = require("url")
const { Writable } = require('stream')
const clientMap = {}
module.exports = ({ request , getConfig, cache, base64 , re... |
import MiningTransactionsSelector from "./transactions-selector/Mining-Transactions-Selector";
import NodeBlockchainPropagation from "common/sockets/protocol/propagation/Node-Blockchain-Propagation";
import consts from 'consts/const_global';
import global from 'consts/global';
import BlockchainMiningReward from 'com... |
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var React = require("react");
var react_redux_1 ... |
import { configure, setAddon, addDecorator } from '@kadira/storybook'
import GithubCorner from '@personare/react-storybook-decorator-github-corner'
import AddonInfo from '@kadira/react-storybook-addon-info'
addDecorator(GithubCorner)
setAddon(AddonInfo)
function loadStories () {
require('../src/<%= camelName %>.sto... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<d82c331d0ebbc2a58c38ea4828920e09>>
* @flow
* @lightSyntaxTransform
* @nogrep
*/
/* eslint-disable ... |
var carbon = require('carbon-io')
var __ = carbon.fibers.__(module)
var _o = carbon.bond._o(module)
var o = carbon.atom.o(module).main // Note the .main here since this is the main application
/***************************************************************************************************
* HelloEnd... |
/* NDRExplorer - support for NDR Explorer page */
/*
Display a NDR object in a specified format - handler for the "Get" button in
the NDR Explorer UI:
url - getUrl (e.g., http://ndrtest.nsdl.org/api/get/2200/test.20080710155619680T)
viewMethod - determined by "viewMethod" UI control, defaults to "json"
*/
functio... |
module.exports = function(grunt) {
'use strict';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
clean: {
dev: { src: ['build'] },
prod: { src: ['dist'] }
},
concat: {
dev: {
files: [
{
... |
import React from 'react'
import ReactDom, {render} from 'react-dom'
require('../index.js');
require('./demo.less');
class Main extends React.Component {
onTap(index) {
alert(index);
}
render () {
return (
<div>
<div className="demo-title">Tap</div>
... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import Order from '../../components/Order/Order'
import axios from '../../axios-orders'
import withErrorHandler from '../../hoc/withErrorHandler/withErrorHandler'
import * as actions from '../../store/actions/index'
import Spinner from '../... |
/* eslint-disable no-restricted-syntax */
import BigNumber from 'bignumber.js'
import { MAINNET } from '../utils/enums'
import { significantDigits } from '../utils/utils'
const unApprovedTransactions = (state) => {
const transactions = []
for (const id in state.transactions) {
if (state.transactions[id].statu... |
// Google BSD license http://code.google.com/google_bsd_license.html
// Copyright 2013 Google Inc. johnjbarton@google.com
(function() {
chrome.devtools.panels.create("Doors", null, "Panel/doors.html", function(panel) {
panel.onShown.addListener(function(window) {
getTrace(window.updateTrace, function(ex) ... |
jQuery(document).ready(function() {
jQuery(".ajaxLoad").each(function() {
var ajaxLink = jQuery(this);
ajaxLink.click(function () {
jQuery("#" + ajaxLink.attr("rel")).load(ajaxLink.attr("href"));
return false;
});
});
});
function submitForm(ele) {
var d =... |
import React, { Component } from 'react'
class Events extends Component{
render(){
return <h1>Events Page</h1>
}
}
export default Events ; |
export default function changeData(data) {
return { type: "CHANGE_DATA", payload: data };
}
|
/*
* HomeFilters Messages
*
* This contains all the text for the HomeFilters component.
*/
import { defineMessages } from 'react-intl';
export const scope = 'app.components.HomeFilters';
export default defineMessages({
header: {
id: `${scope}.header`,
defaultMessage: 'This is the HomeFilters component!... |
"use strict";(self.webpackChunkdocusaurus_2=self.webpackChunkdocusaurus_2||[]).push([[3426],{3905:function(e,t,n){n.d(t,{Zo:function(){return u},kt:function(){return f}});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t)... |
document.querySelectorAll('#contactBtn').forEach(button => {
let getVar = variable => getComputedStyle(button).getPropertyValue(variable);
button.addEventListener('click', e => {
button.classList.add('active');
gsap.to(button, {
keyframes: [{
'--le... |
import React from "react"
import Layout from "../components/layout"
import SEO from "../components/seo"
import NotFound from "../components/NotFound"
const NotFoundPage = () => (
<Layout>
<SEO title="404: Not found" />
<NotFound />
</Layout>
)
export default NotFoundPage
|
const mongo = require('mongodb');
const MongoClient = mongo.MongoClient;
const url = 'mongodb+srv://emreKommez:lastikPark48@bodcluster-whupa.mongodb.net/test?retryWrites=true&w=majority';
MongoClient.connect(url, { useNewUrlParser: true, useUnifiedTopology: true }, (err, client) => {
if (err) throw err;
co... |
//相同名稱的函式會被覆蓋
function getUser() {
console.log("a");
}
function getUser() {
console.log("b");
}
getUser(); //"b"
//透過命名空間區分相同的方法名稱
var ns = {};
ns.common = {};
ns.custom = {};
ns.common.getUser = function() {
console.log("a");
};
ns.custom.getUser = function() {
console.log("b");
};
ns.common.getUser()... |
import PropTypes from 'prop-types'
const Button = ({color, text, onClick}) => {
return (
<button
onClick={onClick}
style={{ backgroundColor: color }}
className='btn'
>
{text}
</button>
)
}
Button.defaultProps = {
color: 'steelblue'
}
Button.propTypes = {
text: PropT... |
export const castToInt = x => (x ? x / 1 : 0);
export const formatNumber = x => {
if (!x) {
return 0;
}
const parts = parseFloat(castToInt(x).toFixed(2))
.toString()
.split('.');
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
return parts.join('.');
};
|
import React from 'react';
import Link from 'gatsby-link';
import './footer.css';
const Footer = () => (
<footer>
<div>Nov 15-16 | Seattle, WA</div>
<div>
<ul>
<li><a href="https://join.slack.com/t/cascadiajs/shared_invite/enQtMzcyMjkzMDk0NjQwLTc3YmJiMTk0NTZjNDBjMzg2YTMxNDA4Njk3YTgyZWY0MGM4NjVh... |
/* @flow */
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {|
ID: string,
String: string,
Boolean: boolean,
Int: number,
Float: number,
|};
/** A comment about an entry, submitted by a user */
export type Comment = {|
__typename?: 'Comment',
/** The SQL ID of... |
module.exports = {
'env': {
'browser': true,
'es6': true
},
'extends': 'eslint:recommended',
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
},
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'module'
},
'plugins':... |
/**
* Helper method to create a scene, create an entity, add entity to scene,
* add scene to document.
*
* @returns {object} An `<a-entity>` element.
*/
module.exports.entityFactory = function (opts) {
const scene = document.createElement('a-scene');
const assets = document.createElement('a-assets');
const e... |
const FILES_TO_CACHE = [
'/',
'/index.html',
"/assets/css/styles.css",
"/assets/js/index.js",
"/assets/js/indexed_db.js",
"/assets/images/icons/icon-192x192.png",
"/assets/images/icons/icon-512x512.png",
"https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css",
... |
'use strict';
module.exports = {
app: {
title: 'NUS Module Wiki',
description: 'The aim of NUS Module Wiki is to expand on extra module informations with the inclusion of more user-generated content',
keywords: 'mongodb, express, angularjs, node.js, mongoose, passport'
},
port: process.env.PORT || 80,
templa... |
"use strict";
// drawExposureGraphs Fetches records summary
function drawExposureGraphs(eDivID, errElementID) {
fetchHK("/v1/exposure")
.then(d => readyExposureChart(eDivID, d.exposure))
.catch(e => displayError(errElementID, e));
}
// readyExposureChart
function readyExposureChart(divID, d) {
... |
module.exports=function(e){var n={};function t(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModu... |
import { createGlobalStyle } from "styled-components"
const globalStyle = createGlobalStyle`
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address... |
'use strict'
const text = require('./text')
module.exports = {
text
}
|
class WorldGraphic extends PIXI.Graphics {
constructor(x, y, texture){
super(x, y, texture);
this.render = function() {};
this.displayGroup = game.render.underLifeLayer;
this.failed = false;
this.jobCount = 0;
this.fixedInPlace = true;
this.built = false;
this.failedCount = 0;
this.tick = functi... |
function orbit([rows, cols, starRow, starCol] ) {
let matrix = [];
for(let i=0; i<rows; i++) {
matrix.push([]);
}
for(let row = 0; row< rows; row++) {
for(let col=0; col<cols; col++) {
matrix[row][col] = Math.max(Math.abs(row - starRow), Math.abs(col - starCol)) + 1;
}
}
console.log(mat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.