text stringlengths 7 3.69M |
|---|
import React, { Component } from 'react'
import Moment from 'react-moment'
class Card extends Component {
render() {
return (
<div className="card mb-3 mt-3" onClick={this.props.delete}>
<div className="card-header d-flex justify-content-between">
<h5>{this.p... |
import React from 'react';
import './GifTile.scss'
import {getUrlByEndpoint} from '../ApiHelper';
import { connect } from "react-redux";
import {UPDATE_TILE, TOGGLE_LOCK_TILE} from './../store/constants/action-types';
function GifTile(props) {
React.useEffect(() => {
setNewGif();
}, [props.refreshTile... |
var Max7219 = require('node-max7219');
var moment = require("moment");
var options = {
device: 'matrix',
cascaded: 8,
vertical: true,
brightness: 4
};
var max7219 = Max7219(options);
/**
* fast teset
*/
// max7219.drawText('The repl module exports the repl.REPLServer class. While running, instan... |
/**
* Abstract representation of navs components.
* @abstract
* @name Navs
* @class Navs
* @standalone
* @augments ch.Uiobject
* @memberOf ch
* @param {object} conf Object with configuration properties
* @returns itself
* @see ch.Dropdown
* @see ch.Expando
*/
ch.navs = function () {
/**
* Reference to a internal c... |
import { takeLatest, call, put, all } from 'redux-saga/effects';
import {clearCart} from './cart.actions';
import * as UserActionTypes from '../user/user.type';
export function* clearCartOnSignOut() {
yield put(clearCart());
}
export function* onSignOutSuccess() {
yield takeLatest(UserActionTypes.SIGN_OUT_SUCCESS... |
import React from "react";
import { TouchableOpacity, Image, StyleSheet } from "react-native";
function Profile(props) {
return (
<TouchableOpacity>
<Image source={require("../assets/profile.jpeg")} style={styles.image} />
</TouchableOpacity>
);
}
const styles = StyleSheet.create({
image: {
wi... |
function Controller() {
require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
$model = arguments[0] ? arguments[0].$model : null;
var $ = this, exports = {}, __defers = {};
$.__views.resultWin = A$(Ti.UI.createWindow({
backgroundColor: "white",
e... |
export const dailyGraphsStore = {
description:
'',
allSliceData: [],
graphs: [
{
name: 'DailyAlt',
id: 1,
sectionName: 'Daily Cases',
description:
'5 day average is average of current days new confirmed cases and 4 previous days.',
xAxisLabel: '# cases',
xAxisAttribute: 'Date... |
const chai = require("chai");
const expect = chai.expect;
const { v4: uuid4 } = require('uuid');
const {save, getAllPurchases, getHighestSalesProducts, getCustomerPurchase, getRegularCustomers } = require("../app/services/purchase.service");
describe("User Controller", function() {
describe("Error response for cu... |
$(document).ready(function() {
$("#volunteergrid").kendoGrid({
height: 390,
scrollable: true,
sortable: true,
reorderable: true,
filterable: true,
// columnMenu: true,
// selectable: "row",
resizable: true,
columns: [
{field: "actio... |
$(document).delegate('#review-form', 'submit', function(e) {
$(this).attr('disabled', 'disabled');
$('#review-form .alert').remove();
$.post(reviewUrl, $('#review-form').serialize(), function(json) {
if(json.operation == 'success')
{
location = location;
/*var html = '<div class="alert alert-warning">'... |
const authRoutes = require('express').Router();
const passport = require('passport');
authRoutes.get('/twitter', passport.authenticate('twitter'));
authRoutes.get('/twitter-callback', passport.authenticate('twitter', {
failureRedirect: '/',
}), (req, res) => {
console.log(req);
res.redirect('/create');
});
auth... |
import { parser } from './index.js';
(async() => {
const env = {};
await parser(
env,
'test.env',
true
);
console.log(env);
console.log(env.TEST1);
console.log(env.TEST2);
console.log(env.TEST3);
console.log(env.TEST4);
console.log(env.TEST5);... |
'use strict';
var Opt = require('./opt');
var lib = require('./lib');
var Command = require('./command');
var hlp = require('./help');
var parse = require('./parse');
var Program = function(cmd, shortDesc, usage, longDesc) {
this.cmd = cmd;
this.shortDesc = shortDesc;
this.usage = usage;
this.longDesc = longD... |
import userRoutes from './userRoutes.js';
import footBallDataRoutes from './footBallDataRoutes.js';
import express from 'express';
const router = express.Router();
router.use('/user', userRoutes);
router.use('/football-data', footBallDataRoutes);
export default router; |
var MarkChart;
(function (MarkChart_1) {
var MarkChart = (function () {
function MarkChart(elementId, chartType, data, colors) {
this.data = [];
this.colors = [];
this.canvasElementId = elementId;
this.chartType = chartType;
this.data = data;
... |
//Banner carousel
$('#car-banner').owlCarousel({
loop: true,
nav: false,
items: 2,
mouseDrag: false,
autoplay: true,
dots: true,
responsive : {
0 : {
items:1,
nav:false,
mouseDrag: true,
},
560 : {
items:2,
... |
var room= require('../route/room.js');
exports= module.exports = function(io){
io.sockets.on('connection', (socket)=>{
console.log("New");
socket.on('webChange', (data)=>{
room.updateChange(data, (err, doc)=>{
if (err) {
throw err ;
console.log("err");
}
});
... |
(function() {
'use strict';
angular
.module('app', [])
.factory('skillManagerFactory', skillManagerFactory);
function skillManagerFactory() {}
})();
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
const fs = require("fs");
const restify = require('restify');
const path = require('path');
const axios = require('axios');
axios.interceptors.request.use(function(config) {
config.headers['x-api-key'] = process.env.xa... |
const playerHelpPageData = [{
title: 'Bli med i turnering',
texts: [
'For å bli med i en turnering velger du "spill turnering" på hjemmesiden. Der etter fyller du ut skjemaet.',
' Game pin får du av turnerings verten. Spillernavn kan vær hvilket som helst navn du ønsker å bruke under ' +
'turneringen,... |
define([
"dcl",
"napp/Command"
], function (
dcl,
Command) {
return dcl([Command], {
constructor: dcl.advise({
after: function() {
this.canExecute = !!this.model.greeting;
this.model.observe(function () {
this.canExecute = ... |
import React from 'react';
class PatternSection extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div className='pattern-item-section'>
<h5 className='pattern-item-section-label'>
{this.props.label}
</h5>
{this.props.children}
</div>
)
}
}
export ... |
// TODO: lumbar prefix won't show up in font urls
// but will in all other urls
$(function() {
var css = '@font-face {font-family: MyriadPro; src: url("' + lumbarLoadPrefix + 'fonts/MyriadPro-Regular.otf"); format("opentype")} ';
css += '@font-face {font-family: MyriadPro; font-weight: bold; src: url("' + lumbarLoa... |
!function () {
'use strict';
function UserListController($scope, dataService, info, model) {
$scope.results = [];
$scope.statuses = info.UserStatus;
$scope.search = function (filter) {
return $scope.results = dataService.user.query(filter);
};
};
... |
import React, { Component } from 'react';
import { AnimatedRoute, AnimatedSwitch, spring } from 'react-router-transition';
import { BrowserRouter, Route } from 'react-router-dom'
import About from './Components/About';
import Navbar from './Components/Navbar';
import Testimonials from './Components/Testimonials';
impor... |
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import omit from 'lodash/omit'
import { connect } from 'react-redux'
import { fromImpression } from 'store/selectors'
import { impressionDetailReadRequest } from 'store/actions'
import Chart from 'components/Chart'
class ChartContainer extend... |
$(document).ready(function(){
// your jQuery codes will go here
$("img").hover(
function(){
var temp = $(this).attr("alt-img-src");
$(this).attr("alt-img-src", $(this).attr("src"));
$(this).attr("src", temp);
},
function(){
var temp = $(this).attr("alt-img-src");... |
function solve(arr, magicNumber){
let result = '';
for (let i = 0; i < arr.length; i++) {
for (let j = i + 1; j < arr.length; j++) {
if (arr[i] + arr[j] === magicNumber) {
result += arr[i] + ' ' + arr[j] + '\n';
}
}
}
console.log(result);... |
import React from 'react'
import './Dialog.scss'
function Dialog ({ children }) {
return (
<div className="dialog">
<div className="dialog__box">{children}</div>
</div>
)
}
export default Dialog
|
'use-strict'
/* base libs */
import express from 'express'
/* libs/modules */
/* utils/constants */
import { ClassController } from '../controllers'
const centreClass = express.Router()
/**
* ##############################################
* # CRUD
* ##############################################
*/
centreClass... |
import Board from "./board.js";
import BoardSolver from "./../solver/board_solver.js";
import SudokuSolver from "./../solver/sudoku_solver.js";
// purpose of this class:
// 1) Get one board
// 2) Get the solution of the board
// 3) save the inputsVal to display the hint (ex: {1: 3, 2:0, 3: 2})
class Sudok... |
import {
checkEmailFormat,
checkUsernameFormat,
checkFullnameFormat,
checkEmptyField
} from '../../../api/signUpService';
/* eslint-disable no-unused-vars */
/* eslint-disable func-names */
/* eslint-disable object-shorthand */
const validations = {
fullnameEmpty: function(value, attributes, attributeName, ... |
import React, {
createContext,
useState,
useEffect,
useContext,
useMemo,
} from "react";
import { auth } from "../firebase-config";
import { db } from "../firebase-config";
import firebase from "firebase/app";
const AuthContext = createContext();
export const useAuth = () => useContext(AuthContext);
export c... |
class ElasticSearchCases{
getCAseeTemplate(){
return {
id: 1551731054913653,
jurisdiction: "IA",
state: "respondentReview",
version: null,
case_type_id: "Asylum",
created_date: "2019-03-04T20:24:14.948",
last_modified: ... |
import React from 'react';
import './style.css';
import Card from '../UI/Card';
/**
* @author
* @function sidebar
**/
const sidebar = (props) => {
return(
<div className='sidebarcontainer'>
<Card style={{marginBotton:'20px', padding:'20px',boxSizing:'border-box'}}>
<div className="cardHead... |
// Problem 7
var listSize = function(head) {
let n = 0;
while (head !== null) {
n++;
head = head.next;
}
return n;
}
var isPalindrome = function(head) {
if (head === null || head.next === null) return true;
let num = listSize(head);
let half = Math.floor(num / 2);
let r... |
import {
ADD_NEW_MOBILE_IN_REDUX,
DELETE_EXISTING_MOBILE_BY_ID_FROM_REDUX,
SET_EXISTING_MOBILE_IN_REDUX_FOR_UPDATING,
UPDATE_EXISTING_MOBILE_IN_REDUX
} from "./actionTypes";
import * as URLPathConstant from "../URLPathConstant";
export const addNewMobileInRedux = (newMobile, history) => dispatch => {
dispatc... |
var util = require('util');
var name = 'Tony';
// formats code
var greeting = util.format('Hello, %s', name);
// prints with time stamp
util.log(greeting); |
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import AuthService from "./AuthService";
//Vue.config.productionTip = false
import MyModal from './components/Modal.vue'
import BoardTitle from './components/BoardTitle'
import ClickEdit from './components/C... |
import React from "react";
const HomePackageCardSC = props => {
return (
<div className="cardMain">
<div className="cardMain_side cardMain_side--front">
<div className="cardMain_picture cardMain_picture">
<img
className="cardMain_picture cardMain_picture"
... |
import React from "react";
import { Animated } from "react-animated-css";
import style from "./Conversion.css";
import fetch from "node-fetch";
import ProfileHolder from "../Images/spotifylogo.png";
import Dropdown from "react-bootstrap/Dropdown";
import Tracks from "./Tracks";
class Successful extends React.Component... |
const path = require('path'),
glob = require('glob'),
CleanWebpackPlugin = require('clean-webpack-plugin'),
UglifyJsPlugin = require('webpack/lib/optimize/UglifyJsPlugin'),
CommonsChunkPlugin = require('webpack/lib/optimize/CommonsChunkPlugin')
const dir = {
build : (...files) => ... |
import { pushRelations } from "@/helpers/pushRelations";
export const restructureData = arr => {
return arr[0].reduce((acc, cur) => {
//Check if location matches another entries' location, return the index
const itemIndex = acc.findIndex(item => console.log(item.people));
// Check if index exists
i... |
"use strict";
angular.module('environment', [])
.constant('ENV', {name:'production',apiEndPoint:'https://diinner.herokuapp.com/ionic',stripePublishableKey:'pk_test_aVle0kDCMX2iyIfuEvHoYcfq',auth0ClientID:'BBLhUOEcSMo60RljToZKPWzNClPnAOPl',auth0Domain:'app35743745.eu.auth0.com'})
; |
import {createStore, applyMiddleware , compose} from "redux"
import rootReducer from "../reducers/index"
import {forbiddenWordsMiddleware} from "../middleware/index"
import thunk from "redux-thunk"
const storeEnhancers=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
const store=createStore(rootReducer,storeEn... |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
export default function ContentSectionRowItem({ rowItem }) {
const { image, title, description } = rowItem;
return (
<div className="item team">
<img alt="" className="image" src={image} />
{title && <div className="component-title title">{title}</div>}
<div className="description">{descripti... |
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
// 引入 redux
import { Provider } from 'react-redux';
import store from './store'
import { BrowserRouter } from 'react-router-dom'
import Search from './components/Search';
import Nav from './components/Nav';
import Main from '.... |
export default class Job {
constructor(data) {
console.log('job formed')
this._id = data._id
this.company = data.company
this.jobTitle = data.jobTitle
this.hours = data.hours
this.rate = data.rate
this.description = data.description
}
get Template() {
return `
<div class="co... |
import styled from '@emotion/styled/macro'
const Container = styled.div`
border: 2px solid white;
border-radius: 10px;
margin: 1rem;
width: 100%;
`
export default Container
|
var config = require('./config.json');// configuración de Postgres
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser... |
let nodemailer = require("nodemailer");
let htmlToText = require("html-to-text");
let {
welcomeTemplate,
passwordResetTemplate,
} = require("../utils/emailTemplates");
module.exports = class Email {
constructor(user, url) {
(this.to = user.email), (this.firstName = user.name.split(" ")[0]);
this.url = ur... |
var eventInputBinding = new Shiny.InputBinding();
$.extend(eventInputBinding, {
find: function(scope) {
return $(scope).find(".shinysky-eventinput");
},
getValue: function(el) {
var elem = $(el)
console.log(elem)
return {
event: elem.data("shinysky-last-event"),
event_count: elem.data(... |
const LRU = require("lru-cache");
let cachePage = new LRU({
max: 100, // 缓存队列长度
maxAge: 1000 * 60, // 缓存1分钟
});
export default function (req, res, next) {
let url = req._parsedOriginalUrl;
let pathname = url.pathname;
console.log("%c huan", "color:green;font-weight:bold");
console.log(JSON.stringify());
... |
const pagarme = require('pagarme')
var fs = require('fs')
function createSubscription(subscriptionData,customerData,addressData){
return new Promise(function (resolve,reject){
var credentials = JSON.parse(fs.readFileSync('./storage/env.json','utf8'));
var data = {};
console.log(subscriptionData.plan_id)
pagar... |
export {ErrorMessage} from './error.message'
export {PendingMessage} from './pending.messages' |
import React, { useState } from 'react';
import { SafeAreaView, Text, StyleSheet, TouchableOpacity } from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import {Input} from 'react-native-elements';
import firestore from '@react-native-firebase/firestore';
const InputBuku = ({navigation}) =>... |
//take action whenever a quantity input changes
var numInputs = $(".mid_col input[type=number]");
numInputs.change(handleQuantityUpdate);
numInputs.keyup(handleQuantityUpdate);
function handleQuantityUpdate() {
if (this.value == "" || this.value.indexOf('.') > -1)
this.value = ""; //Chrome/FF have "" if ... |
'use strict';
var Knex = require('knex');
var knexnest = require('../knexnest');
// to use postgres, the pg npm module must be installed
var knex = Knex({
client: 'postgres',
connection: process.env.DATABASE_URL
});
var testData = ''
+ 'CREATE TEMPORARY TABLE temp_user ('
+ ' id INTEGER PRIMARY KEY,'
+ ' name... |
const axios = require('axios');
const Portfolio = require('../model/portfolio.js');
const { APIKEY } = require('../../fmp-config.js');
const createPortfolio = (req, res) => {
const holdingsArray = req.body.holdings.map((holding) => ({
symbol: holding.symbol,
name: holding.name,
exchange: holding.exchange... |
import { useStory } from '../../dataHooks/storyHooks'
import withRouter from 'next/dist/client/with-router'
import {useState} from 'react'
import Link from 'next/link'
import {getCookie, isAuthenticated} from '../../actions/authAction'
import {removePart} from '../../actions/partAction'
import {mutate} from 'swr'
impor... |
/* Details
Remove all exclamation marks from the end of sentence.
Examples
remove("Hi!") === "Hi"
remove("Hi!!!") === "Hi"
remove("!Hi") === "!Hi"
remove("!Hi!") === "!Hi"
remove("Hi! Hi!") === "Hi! Hi"
remove("Hi") === "Hi"
Note
Please don't post issue about difficulty or duplicate.
End Details ... |
module.exports = UserModel => {
const withReferences = references => {
const User = UserModel.query()
if (references) {
const extractedReferences = references.split(',')
extractedReferences.forEach(reference => User.with(reference))
}
return User
}
return {
createNewDevice: ({ ... |
function Character(name, profession, gender, age) {
this.name = name;
this.profession = profession;
this.gender = gender;
this.age = age;
this.strength = Math.floor(Math.random() * 100) + 1;
this.hitPoints = Math.floor(Math.random() * 100) + 1;
this.printStats = function() {
console.l... |
import React from "react";
import { connect } from "react-redux";
import { getNews } from "../../../redux/news-reducer";
import NewsPage from "./NewsPage";
import Preloader from "../../../common/preloader";
class NewsPageContainer extends React.Component {
componentDidMount() {
this.props.getNews();
this.ref... |
import React, { Component } from 'react';
import './style.scss';
import logo from './logo.png';
console.log(APP_MODE);
const ipc = require('electron').ipcRenderer; //利用ipc自定义窗口的最大化,最小化,关闭,移动
class TitleBar extends Component {
constructor(props) {
super(props);
this.maxWindow = this.maxWindow.bind... |
import { expect, assert } from 'chai';
import { spy } from 'sinon';
import { matchActions, matchSubjects } from '../../src/assets/js/actions/match'
import { Subject } from 'rx';
let subjectNames = Object.keys(matchSubjects);
describe('match', () => {
it('make sure that "matchSubjects" are instances of Rx.Subject',... |
// test función window.controller.validateLogin
describe('Create account with email and password', () => {
it('Must return true with email and password', () => {
const email = 'test@test.com';
const password = '123456';
const result = window.controller.validateLogin(email, password);
assert.equal(resu... |
$(document).ready(function(e) {
listSorterInit();
initItemsButtons();
updateRowsInfo(false);
sortInit();
if ($('input[name="addnewmega"]:checked').val() == 1)
$('#is_simple_menu').hide();
else
$('.mega_menu').hide();
if ($('input[name="issimplemenu"]:checked').val() == 1)
$('#is_mega_menu').hide();
e... |
import "meteor/reactive-var";
import "meteor/session";
import "./graph_guide.html";
import "/imports/ui/components/graph_view/graph_view.js";
import "/imports/ui/components/guide_view/guide_view.js";
import {DATA_READ_ONLY} from "../../components/graph_view/graph_view";
Template.graph_guide.onCreated(function () {
... |
function alignBlocks() {
var max_height = 0;
$('.middle-side .align-content').each(function(){
if ($(this).height() > max_height) {
max_height = $(this).height()
}
})
.height(max_height);
}
$(function(){
//Cufon.replace('#company-logo h1', { fontFamily: 'Myriad Pro Bold' });
Cufon.replace('... |
'use strict';
const colors = require('colors');
const assert = require('assert');
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
let board = [];
let solution = '';
let letters = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
function printB... |
var Bind = require('../util/Bind');
function VideoCanvas(videoDom,$videoContainer,readyCallBack){
this.drawCvs;
this.drawCtx;
this.name = name;
this.video = videoDom;
this.containerSize = {width:0,height:0};
this.canvasSize = {width:0,height:0,x:0,y:0};
this.videoSize = {width:0,height:0,aspect:... |
(function() {
'use strict';
angular
.module('jhipsterApp')
.controller('FixedDepositeAccountDeleteController',FixedDepositeAccountDeleteController);
FixedDepositeAccountDeleteController.$inject = ['$uibModalInstance', 'entity', 'FixedDepositeAccount'];
function FixedDepositeAccountDel... |
/*
* selena
* https://github.com/enytc/selena
*
* Copyright (c) 2014 EnyTC Corporation
* Licensed under the BSD license.
*/
'use strict';
module.exports = {
/*
* GET /
*/
index: {
method: 'GET',
auth: global.requireLogin,
fn: function (req, res) {
res.stat... |
module.exports = {
LOGIN_PAGE_TITLE: 'Iniciar sesión en Amazon',
}
|
import React from "react";
import Logo from "../Logo";
import { MdAddShoppingCart, MdAccountCircle, MdSearch } from "react-icons/md";
import styles from "./styles.module.scss";
export default () => {
return (
<>
<nav className={styles.navbar}>
<div className={styles.container}>
<div>
... |
import React from "react";
import VideoListItem from './video_list_item';
const VideoList = (props) => {
return <div>
<ul>
{props.videos.map(el => {
return <VideoListItem
data={el}
key={el.etag}
onVideoSelect={props.onVideoSelect}
/>
})}
</ul>
</div>
}
export default VideoList; |
import { xToken } from "../keys/monobank";
var myHeaders = new Headers();
myHeaders.append("X-Token", xToken);
var requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow",
};
fetch("https://api.monobank.ua/personal/client-info", requestOptions)
.then((response) => response.text())
.then((r... |
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const dev = {
entry: [
'react-hot-loader/patch',
'./src/index.js',
],
output: {
path: path.resolve(__dirname, 'build/'),
filename: 'app.js',
p... |
const vm = new Vue({
el: '#main-app',
data() {
return {
ssh_list: [],
ssh_live_list: [],
ssh_die_list: [],
proxy_list: [],
settings: {
process_count: 20
},
temp_settings: {
process_count: ... |
window.eventdone = {};
window.loadAsyncScript = function(url, onLoadFunction) {
var script = document.createElement('script');
script.type = 'text/javascript';
document.body.appendChild(script);
script.onload = onLoadFunction;
script.src = url;
};
window.executeOnEventDone = function(eventName, ca... |
'use strict';
function CarPrototype() {
this.carName = '';
this.carColor = '';
};
var redInfernus = new CarPrototype();
redInfernus.carName = 'Infernus';
redInfernus.carColor = 'Bright red';
var blueFord = new CarPrototype();
blueFord.carName = 'Ford';
blueFord.carColor = 'Dark blue'; |
import * as actionTypes from '../actions/actionTypes';
const initialState = {
song_id:0,
audios:[],
passwordText:"Enter Password",
submitText:"Submit",
};
let reducer = function (state = initialState, action) {
switch (action.type) {
case actionTypes.UPDATEAUDIO_CONTENT:
return {... |
const {model, Schema} = require("mongoose");
const tournamentSchema = new Schema({
name: String,
username: String,
restrictions: [String],
rules: [String],
active: Boolean,
participants: [{
name: String,
status: Boolean
}],
fights: [{
fighterOne: String,
... |
// Use axios for requests and set API key for every request
// Set axios default X-Riot-Token header to apikey
const axios = require('axios');
axios.defaults.headers.common['X-Riot-Token'] = require('./config.json').apiKey;
// Get a sumoner by name and returns his ID
// Takes an object with the endpoint to use and th... |
'use strict'
let mongoose = require('mongoose')
let Schema = mongoose.Schema
let UserSchema = new Schema({
firstname: {
type: String,
required: true
},
lastname: {
type: String,
required: true
},
email: {
type: String,
required: true
},
password: {
type: String
},
followed... |
import { routerMiddleware } from 'connected-react-router'
import { applyMiddleware, compose, createStore } from 'redux'
import createSagaMiddleware from 'redux-saga'
import thunkMiddleware from 'redux-thunk'
import { wsMiddleware } from '../middlewares/ws'
import createRootReducers from '../reducers'
import { SagaMana... |
import './index.scss'
import 'fullpage.js/dist/jquery.fullpage.css'
import '../common/js/common.js'
import $ from 'jquery'
import 'fullpage.js'
let JUMP_STATE = false;
let PAGE_INDEX = 0;
class Home {
constructor() {
this.speed = 200;
this.isMobile = this.checkIsMobile();
this.$menu = $('... |
import LongdoMap from './components/LongdoMap.vue'
import LongdoMapMarker from './components/LongdoMapMarker.vue'
import LongdoMapPopup from './components/LongdoMapPopup.vue'
export {
LongdoMap,
LongdoMapMarker,
LongdoMapPopup
}
|
import React from 'react';
import styles from "./Nav.module.css"
import Heading from "../../../Utility/Heading"
function Navbar() {
return (
<nav className={styles.nav}>
<Heading size="2rem" text="Aget" color="orange" />
</nav>
)
}
export default Navbar;
|
import styled from 'styled-components'
export default styled.input`
font-size: 12px;
&:focus {
border: 2px solid transparent;
outline: 1px solid #5E9ED6;
}
`
|
import React, { Component } from 'react';
import { Menu } from 'semantic-ui-react'
import { NavLink } from 'react-router-dom';
import Login from '../Login/Login'
import NavLogin from './NavLogin'
import NavLogout from './NavLogout'
import {connect} from 'react-redux'
import { compose } from 'redux';
import { firebaseCo... |
jQuery( function( $ ) {
var $pCactions = $( '#p-cactions' );
$pCactions.find( 'h5 a' )
// For accessibility, show the menu when the hidden link in the menu is clicked (bug 24298)
.click( function( e ) {
$pCactions.find( '.menu' ).toggleClass( 'menuForceShow' );
e.preventDefault();
})
// When the hidden ... |
import React from 'react';
import Router from 'react-router';
import {Provider} from 'react-redux';
import Store from './js/data/store';
import Login from './js/pages/login';
import Dashboard from './js/pages/dashboard';
import Problems from './js/pages/problems';
import Problem from './js/pages/problem';
import Rankin... |
import fs from 'fs';
import pngjs from 'pngjs';
const PNG = pngjs.PNG;
function addPoint(y, x, hue) {
const _x = Math.floor(x * zoom + width * 0.5);
const _y = Math.floor(y * zoom + height * 0.5);
if (_x >= 0 && _x < width && _y >= 0 && _y < height) {
map[_y][_x] += hue;
}
}
function sineInterp(x, min, m... |
const createReduce = (initState, reduces) => (state = initState, action) => {
let _reduce = reduces[action.type]
if(typeof _reduce == 'function') {
if (action.payload) {
action.error && console.log('err!!!', action.payload)
return _reduce(state, action.payload, action.params)
} else {
return _reduce... |
export default {
siteName: '服务登记管理系统',
minSiteMame: 'Yong Bo',
tokenKey: 'Authorization',
USER_NAME_KEY: 'USER_NAME',
MUTATION_FORM_TREE_DATA: "MUTATION_FORM_TREE_DATA",
V_FORM_COMPONENTS_NAME: 'validateMyForm',
TAX_BALANCE_EXCEL_OUT: '/oms/report/taxBalance/excelOut',
TAX_BALANCE_IMPORT... |
/*JSX_OPTS
--add-search-path t/compile_error/208.nested-node_modules
*/
import "importer.jsx";
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.