text stringlengths 7 3.69M |
|---|
import { cid } from "is-ipfs"
import remove from "lodash/remove"
export default function makeIPFSUrl(
url,
ipfsHost = "https://gateway.pinata.cloud/ipfs/"
) {
if (cid(url)) return `${ipfsHost}${url}`
const urlArray = url.split("/")
const cidIndex = urlArray.findIndex((curr) => cid(curr))
const newCidPath ... |
/**
* Created by chaijiang on 2017/3/31.
*/
import React, {Component} from 'react'
import AppDispatcher from '../dispatcher/AppDispatcher'
import AppStore from '../stores/AppStore'
import Pandect from './parts/FeedRefresh/Pandect'
import { Row, Col } from 'antd';
import { Select } from 'antd';
const Option = Selec... |
document.getElementById("notifier").innerHTML = "It's X's turn"
var win = "n";
function winChecker() {
if (cell1.childNodes[1].innerHTML == cell2.childNodes[1].innerHTML && cell1.childNodes[1].innerHTML == cell3.childNodes[1].innerHTML && cell1.childNodes[1].innerHTML != "") {
document.getElementById(... |
/**
* @properties={type:4,typeid:36,uuid:"2CFECE56-F6C0-42D8-840F-59ADBFA2DB24"}
*/
function tutti_i_dipendenti()
{
return ditte_pianificazione_to_ditte_pianificazionerighe && ditte_pianificazione_to_ditte_pianificazionerighe.getSize() > 0 ? 1 : 0;
}
|
/*a = parseInt(prompt("Enter the number"));
confirm(a*a);
var minute, hour, day, year;
minute = 1;
hour = minute * 60;
day = hour * 24;
year = day * 365;
confirm(hour);
confirm(day);
confirm(year);
a = parseInt(prompt("Enter first number"));
b = parseInt(prompt("Enter second number"));
alert(a+b);
alert(a-b);
alert(a*... |
import React, { Component } from 'react';
import Intro from "./components/Intro";
import CountryData from "./components/CountryData";
class App extends Component {
state = {
screenPhase: false
}
render() {
const screen = this.state.screenPhase ? <Intro/> : <CountryData/>
return (
<div>
{scr... |
const { data } = require("jquery");
module.exports = {
findAll: function(req){
return new Promise(function(resolve, reject) {
req.getConnection(function(err,connection){
let sql = 'SELECT * FROM countries where 1 = 1'
let condition = []
... |
/*
* ! Ext JS Library 3.1.0 Copyright(c) 2006-2009 Ext JS, LLC licensing@extjs.com
* http://www.extjs.com/license
*/
NavMenu = function(config) {
NavMenu.superclass.constructor.call(this, Ext.apply({
region : 'west',
title : '系统菜单',
split : true,
width : 160,
minSize : 175,
maxSi... |
import axios from 'axios'
const article = {
state :{
articleInfo: {},
pageLoading: false
},
mutations:{
GETARTICLE(state,info) {
state.articleInfo = info
}
},
actions:{
getArticle({commit, state}, params){
return new Promise( (resolve... |
import React from 'react';
import {Players} from './../api/players';
import PropTypes from 'prop-types'; // ES6
export default class Player extends React.Component{
render(){
//return <h4>Player class</h4>;
//need to use back ticks on this
let itemClassName = `item item--position-${this.props.player.ran... |
/**
* @license
* Copyright 2014 Google Inc. All Rights Reserved.
*
* 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 requir... |
var numero = 1
{
var numero = 2
console.log('dentro = ', numero)
}
console.log('fora =', numero)
/**
* Vai ser 2, para os dois console.log
* Pois, como já dito o var so tem dois escopos, se ele não tiver em uma função, então ele será declarado como variavél de escopo Global
*/
|
export const LIGHT_THEME = 'LIGHT_THEME'
export const DARK_THEME = 'DARK_THEME'
|
document.body.onkeypress = function(){document.body.classList.toggle('liked')} |
import { combineReducers } from 'redux';
import * as types from './drinksTypes';
const drinks = (state = {}, { type, payload }) => {
switch (type) {
case types.GET_DRINKS:
return payload.data;
default:
return state;
}
};
const filter = (state = [], { type, payload }) => {
switch (type) {
... |
/* ------------------------------------
sec161 テキストボックスの値を取得
-------------------------------------*/
function sec161() {
const value161 = document.querySelector('#input161').value;
if (value161) {
alert(value161);
} else {
alert('テキストを入力してください');
}
}
/* ------------------------------------
sec162 テキストボックスの変更を... |
let x = 1280;
let y = 606;
let hourCircleSize = 250;
let hourCircleXaxis = hourCircleSize;
let minCircleSize = 200;
let minCircleXaxis = minCircleSize;
let secCircleSize = 150;
let secCircleXaxis = secCircleSize;
function setup() {
createCanvas(x,y); // make an HTML canvas element width x height pixels
}
function dr... |
import React, { useState } from 'react';
import { useEffect } from 'react/cjs/react.development';
import ProductForm from './ProductForm'
import axios from 'axios'
import {navigate} from '@reach/router'
import DeleteProduct from './DeleteProduct'
const ProductEdit = props => {
const {products, id, setProducts} = ... |
require('./TriviaScene.styl');
import React, { PropTypes, Component } from 'react';
import { UIScene } from '../ui';
import { connect } from 'react-redux';
import { TriviaChoice } from '../sections';
import _ from 'underscore';
@connect((state, { params }) => ({
trivia: state.trivias.get(params.triviaId),
}))
class ... |
export default {
updateSelectedMenuId(state, menuId) {
state.selectedMenuId = menuId;
}
} |
import Layout from '../components/Layout'
import SignupComponent from '../components/auth/SignupComponent'
const Signup = () => {
return (
<Layout>
<h2 className="text-center pt-4 pb-4">Signup</h2>
<div className="row flex-center">
<div className="col md-6 sm-6">
<SignupComponent/>
</div>
</di... |
// <!--
// Etapy w tym projekcie
// HTML
// 1. utwórz element <button> i <ul> w <body>
// JS
// 1. pobierz element button za pomocą metody querySelector i przypis wynik do zmiennej
// 2. ustaw nasłuchiwanie (metodę addEventListener) na click na pobrany element button
// 3. jako drugi argument metody adEventListener p... |
var AnimationRadix = new RadixTree(null, undefined);
AnimationRadix.set("delta", function (token, stream, keyframe) {
stream.i += 5;
keyframe.isDelta = true;
});
Globals.private.parse2 = function(stream){
var temp = stream.data.substring(stream.i);
var nums = temp.match(/\s+(-?[\d\.]+)\s+(-?[\d\.]+)\s?/);
... |
export default class ChessHuman {
isHuman() {
return true;
}
async requestMove(fen) {
// do nothing... wait for a drag and drop event
return {};
}
choosePromotion(source, target, choices) {
// lets do this the easy way for now
while (true) {
const choice = prompt(
`Choose o... |
import { createAction } from '@reduxjs/toolkit';
export const login = createAction('auth/login');
export const logout = createAction('auth/logout');
export const getProductsSuccess = createAction('products/get');
export const getWishlist = createAction('wishlist/get');
export const addWishlistProduct = createActio... |
class PlayerEditor extends React.Component {
state = {
player: {}
}
findPlayerById = (id) =>
findPlayerById(id)
.then(player => this.setState({player}))
componentDidMount = () => {
const id = window.location.search.split("=")[1]
this.findPlayerById(id)
... |
import React, { Component, Fragment } from 'react';
import { Container, Form,Col,Button, Row } from 'react-bootstrap';
class consultantAndCareerAdvisorReg extends Component {
render() {
return (
<Fragment>
<div className="page__bg ">
<Container>
... |
/* exported TOOLS */
'use strict';
/**
* tools for works with strings.
*
* @version 1.0
*/
var TOOLS = (function() {
// define exportable methods of the module
var exports = {};
/**
* truncate string and adds three dots if too long.
*
* @param {string} string - a string that you want to truncate.
... |
/**
* http通用工具函数
*/
import axios from 'axios';
import { message } from 'antd';
import * as config from './config';
const toQueryPair = (key, value) =>{
///<summary>将键值对转为URL参数</summary>
if (typeof value == 'undefined') {
return key;
}
return key + '=' + encodeURIComponent(value === null ? '' : String(va... |
import $ from 'jquery';
import _ from 'lodash'
import Backgrid from 'backgrid';
import Epoxy from 'igui_root/node_modules/backbone.epoxy/backbone.epoxy';
import Utils from 'igui_root/src/scripts/utils';
var TableRadioCellView = Backgrid.Cell.extend(Epoxy.View.mixin());
TableRadioCellView = Utils.extend.call(TableRa... |
/* eslint-disable jsx-a11y/click-events-have-key-events */
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
import React, { useState } from 'react';
import Carousel from 'react-bootstrap/Carousel';
const ControlledCarousel = ({ currentStyle }) => {
const [index, setIndex] = useState(0);
const ... |
import React from 'react';
import { toggleEditingSections, fetchMenu, addSection, removeSection, addSubject, removeSubject } from '../../redux/actions';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import PropTypes from 'prop-types';
import SidebarItem from './SidebarItem';
cla... |
'use strict';
var templates = {
rankingCard: document.getElementById('ranking_card_template'),
exchangesListItem: document.getElementById('exchanges_listitem'),
scanProfileListItem: document.getElementById('scan_profiles_listitem'),
triggerListItem: document.getElementById('trigger_listitem')
}
var storage = ... |
'use strict';
angular.module('AdBase').factory('loginResource',['$http', function($http){
var service = {};
var urlBase = '/adbase.server/rest/logins',
searchInput = {
entity:{},
start:0,
max:100,
fieldNames:[]
},
entity = {};
service.create = function(entit... |
import React, { useState, useRef, useEffect } from "react";
import "./app.css";
import Newposts from "./utils/newpost/Newposts";
import Editposts from "./utils/EditPosts/Editposts";
import Allposts from "./utils/AllPosts/Allposts";
import { Stats } from "./utils/stats/stats";
import { Comments } from "./utils/comment... |
import { quizData } from '../data.js';
export function questionToDelete() {
//Let user choose which question to delete
const deleteTheQuestion = window.prompt(
'Enter the question you want to delete!'
);
//filter the questions list ad removing only the deleted question:
quizData.questions = quizData.ques... |
import { Link } from "react-router-dom";
import tw from 'tailwind-styled-components'
export const StyledIntroItemNavLink = tw(Link)`
text-blue-700
hover:underline
` |
import express from 'express';
import path from 'path';
const bodyParser = require('body-parser');
const app = express();
const port = process.env.PORT || 3000;
app.use(express.static(path.resolve('build')));
app.use(bodyParser.json());
app.get('/*', (req, res) => {
res.sendFile(path.resolve('build/index.html'));... |
//------------------slider--------------------------------
theimage = new Array();
// Format: theimage[...]=[image URL, link URL, name/description]
theimage[0]=["images/1.jpg", "", "Leopards in yala"];
theimage[1]=["images/2.jpg", "", "Elephants in yala"];
theimage[2]=["images/3.jpg", "", "Birds in yala"];
theimage[3]... |
import DS from 'ember-data';
export default DS.Model.extend({
givenName: DS.attr('string'),
familyName: DS.attr('string'),
nickname: DS.attr('string'),
identicon: DS.attr('string'),
isActive: DS.attr('boolean'),
isStaff: DS.attr('boolean'),
demographics: DS.hasMany('demographic'),
chil... |
/**
* @name CourseCard
*
* @author Chris Holle
* @author Mario Arturo Lopez Martinez
*
* @overview Card to be used to display course name and projects under a
* certain course when activated.
*
* @param {string} name name of course
* @param {string} semester current Semester
* @param {string} active true if ... |
const appConfig = {
version: '__version__'
};
export default appConfig;
|
import carOne from "../assets/car1.png";
import carTwo from "../assets/car2.png";
import carThree from "../assets/car3.png";
import carFour from "../assets/car4.png";
import carFive from "../assets/car5.png";
import carSix from "../assets/car6.png";
const rides = [
{
img: carOne,
title: "Taxi",
persons: ... |
function loadLogin(){
$('#google').click(loginGoogle);
$('#facebook').click(loginFaceBook);
$('#github').click(loginGitHub);
$('#twitter').click(loginTwitter);
localStorage.removeItem('userLogged');
// Initialize Firebase
var config = {
apiKey: "AIzaSyB65JCI354B-wD5TjaDDscMWqrYl_NHL... |
import React from "react";
import {
ScrollView,
StyleSheet,
View,
TextInput,
Text,
Button
} from "react-native";
import { Avatar, ListItem } from "react-native-elements";
import Icon from "react-native-vector-icons/MaterialIcons";
import { findFollows, emptyFindFollows } from "../actions/findFollowsAction";... |
/*==================================================
Prototype
====================================================*/
Swiper.prototype = {
isSafari: (function () {
var ua = navigator.userAgent.toLowerCase();
return (ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') <... |
import {
MODAL_OPEN,
MODAL_CLOSE,
POSTS_REMOVE_CONFIRM,
WEATHER_CITY_SELECTED,
} from '../../types';
export default (state = false, action) => {
switch (action.type) {
case WEATHER_CITY_SELECTED:
case POSTS_REMOVE_CONFIRM:
return true;
case MODAL_CLOSE:
return false;
case MODAL_... |
export { styled, setup } from './styled';
export { extractCss } from './core/update';
export { css, glob, keyframes } from './css';
|
'use strict';
const path = require('path');
module.exports = {
async loadTemplates(provider) {
const createFilePath = path.join(provider.serverless.config.servicePath,
'.serverless', 'configuration-template-create.json');
const updateFilePath = path.join(provider.serverless.config.servicePath,
'... |
/**
* @fileoverview Layout based utils to enforce common patterns
* @author Gabriel Womble
*/
import { VARIANTS } from 'lib/constants';
const { OVERLAY, SIDEPANEL } = VARIANTS;
/**
* Gets the sidepanel variant based on media query
* @returns {string} sidepanelVariant
* @param {boolean} isMobile - isMobile bool... |
import './style.scss';
import { Header } from './components/header';
console.log(`this is index`);
// SET INITIAL APPLICATION STATE
let STATE = [];
function getPokes() {
fetch('https://pokeapi.co/api/v2/pokemon/')
.then((res) => res.json())
.then((res) => {
STATE = [...res.results];
console.log... |
module.exports = (function() {
function generateBackground() {
var $bg = $('<div id="popoutBackground" style="position:absolute;z-index:999;width:100%;height:100%;background-color:black;opacity:.6"></div>')
$('body').append($bg)
}
function setPosition($elem, id, callback) {
$elem.attr('id', 'pop-'+id)
$('b... |
$('document').ready(function() {
$('div[data-async-partial]').each(function(){
var element = $(this);
var url = element.data('async-partial');
$.get(url, function(data) {
element.html(data)
})
})
});
|
import firebase from "firebase"
const firebaseConfig = {
apiKey: process.env.REACT_APP_API_KEY,
authDomain: process.env.REACT_APP_DOMAIN,
databaseURL: process.env.REACT_APP_DB_URL,
projectId: process.env.REACT_APP_PROJECT_ID,
storageBucket: process.env.REACT_APP_STORAGE,
messagingSenderId: process.env.REAC... |
const base = require('../base')
// 和彩云网盘
const pName = 'com.chinamobile.mcloud'
/**
* 打开
*/
let open = () => {
// 启动
base.app.relaunch(pName)
base.sys.allowToOpen()
// 等待应用打开
waitForPackage(pName)
}
let sign = () => {
open();
// 点击“签到”
id('actionbar_sign').findOne(5000).click()
// 如果出现“发现新版本”则关... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Icon } from 'semantic-ui-react'
import * as actions from '../actions';
class RouteSchedule extends Component {
getArrivingTrainData(line){
//console.log(this.props.currentRoutes.root.routes.route);
//filter t... |
const n = 123;
function solution(n) {
let temp = String(n);
let answer = 0;
for (let i = 0; i < temp.length; i++) {
answer += parseInt(temp[i]);
}
return answer;
}
console.log(solution(n));
|
var pgp = require('pg-promise')();
var cn = {
host: '52.203.57.70',
port: 5432,
database: 'fide',
user: 'normal',
password: 'Normal2017!123'
};
var db = pgp(cn);
db.connect()
.then(obj => {
console.log("Connection with database succeeded.");
obj.done();
})
.catch(error => {
console.lo... |
import React, { useEffect, useState } from "react";
import ReactDOM from 'react-dom';
import SearchAppBar from './header';
import Home from './home';
import Search from './search';
import Me from './me';
import Movie from './movie';
import People from './people';
import User from './user';
import Help from './Help';
i... |
var _0x9e7d = ['c3RyaW5n', 'c3BsaXQ=', 'Y29uc3RydWN0b3I=', 'ZGVidQ==', 'aW5pdA==', 'Y2hhaW4=', 'YXBwbHk=', 'cmVwbGFjZQ==', 'fHx8fHx8fHxhfHxkfGNsYXNzfHJlbGF0ZWR8cG9zdHxifGl0ZW18Y3xpbXBvcnRhbnR8dHxxfHNwYW58dGh1bWJuYWlsU2l6ZXxwfGhyZWZ8bGl8eHx2YXJ8dnx0aXRsZXxmdW5jdGlvbnxpbnxzdW1tYXJ5fGlmfHd8QXxyZXBsYWNlfGFsdHxyfHl8bGVuZ3Ro... |
import React from 'react';
const Button = props => (
<div className="btn center-align">
Submit
</div>
);
export default Button; |
import React from 'react';
import Radium from 'radium';
const styles = {
container: {
background: 'rgba(255,255,255,0.4)',
color: '#555',
transition: 'all 0.4s cubic-bezier(.17,.67,.17,.88)',
},
focusedContainer:{
background: '#fff',
},
iconContainer: {
float: 'left',
width: '44px',
... |
// @flow
import * as React from 'react';
import { HeaderBackButton } from 'react-navigation';
import { HeaderTitle, type NavigationType } from '@kiwicom/mobile-navigation';
import { Translation } from '@kiwicom/mobile-localization';
import { defaultTokens } from '@kiwicom/mobile-orbit';
import MoreInfoScene from '../... |
import "antd/lib/timeline/style/css";
import Timeline from "antd/lib/timeline";
export default Timeline;
|
const app = getApp();
const http = require("./../../../utils/http.js");
const qiniuUploader = require("./../../../utils/qiniuUploader");
const uploader = require("./../../../utils/uploadImage");
Page({
data: {
logs: [],
imageArray: [],
uploadToken: null,
attachments: [],
private: false,
text... |
var globalVar;
function main(message) {
var localVar = "asdfasdfdsaf";
alert(message);
}
|
var app = {
models:{},
views:{}
};
_.extend(app, Backbone.Events); |
import React from 'react';
import './App.css';
class App extends React.Component {
constructor(props) {
super(props);
this.state = {
data: [],
isFetching: true,
isLanguageRus: true, // false = eng // true = rus
};
}
componentDidMount() {
const gettingData = async () => {
await fetch('https://ap... |
import models from '../../../models';
export default function (req, res, next) {
return models.user.findOne({
where: {
id: req.user.id
}
}).then(user => {
return models.favorite_bar.create({
users_id: user.id,
bars_id: req.body.bars_id,
created_by: user.id,
is_active: 1
... |
var audio_History = []
const favRemove = id => ipcRenderer.send('favRemove', id)
const newHistItem = (info) => {
audio_History.push(info)
console.log(audio_History)
}
ipcRenderer.on('setHistory', (event, args) => {
const a = args.length - 1
console.log(args)
const b = args[a]
con... |
/* eslint-disable no-undef */
import React from 'react'
import '@testing-library/jest-dom/extend-expect'
import { render, fireEvent } from '@testing-library/react'
import Blog from './Blog'
const noop = () => null
const blog = {
id: 'foo',
title: 'best blog',
author: 'B Blogger',
likes: 1000,
url: 'someurl'... |
import * as types from '../constants/ActionTypes'
export function increment(index) {
return {
type: types.INCREMENT_COUNTER,
index: index
}
}
export function decrement(index) {
return {
type: types.DECREMENT_COUNTER,
index: index
}
}
export function addComponent() {
return {
type: types... |
'use strict';
// ### Dependencies
var UsersStore = require('../../stores/users-store');
var UsersActions = require('../../actions');
var ProfileAvatar = Reach.component('User.ProfileAvatar');
var User = Reach.model('User');
/**
* Profile
* =======
*
* Renders a profile card with the users avatar and... |
const express = require('express');
const router = express.Router();
const orderController = require('./controller');
const userMiddleware = require('../../middleware/user-middleware');
router.get('/order/:uid', orderController.getOrder);
router.get('/orders', userMiddleware.authMiddleware, orderController.getOrders)... |
var matrixScore = function(A) {
//togglerow
let flipCol = [];
let flipRow = [];
for (let i = 0; i < A.length; i++) {
flipCol[i] = A[i].slice();
flipRow[i] = A[i].slice();
}
for (let i = 0; i < flipCol.length; i++) {
let row = flipCol[i];
if (row[0] === 1) {
... |
'use strict'
/** @typedef {import('@adonisjs/framework/src/Request')} Request */
/** @typedef {import('@adonisjs/framework/src/Response')} Response */
/** @typedef {import('@adonisjs/framework/src/View')} View */
// /** @type {typeof import('@adonisjs/lucid/src/Lucid/Model')} */
const UserTask = use('App/Models/UserT... |
const dbconnection = require('../config/connection');
exports.getCities = () => dbconnection.query('SELECT * FROM citys ;'); |
/*
* Copyright (C) 2021 Radix IoT LLC. All rights reserved.
*/
import dataPointTagsEditorTemplate from './dataPointTagsEditor.html';
import './dataPointTagsEditor.css';
class DataPointTagsEditorController {
static get $$ngIsClass() { return true; }
static get $inject() { return ['maDataPointTags']; }
... |
import strategySchema from '../schemas/strategySchema'
import mongoose from 'mongoose'
const Strategy = mongoose.model('strategy', strategySchema)
export default Strategy
|
! function() {
"use strict";
function e(e) {
var t = [];
for (var i in e) e.hasOwnProperty(i) && e[i] && t.push(i);
return t.join(" ")
}
var t = null;
Polymer({
is: "paper-drawer-panel",
behaviors: [Polymer.IronResizableBehavior],
properties: {
... |
const checkbox_numbers = document.getElementById('numbers')
const checkbox_uppercase = document.getElementById('uppercase')
const checkbox_lowercase = document.getElementById('lowercase')
const checkbox_symbols = document.getElementById('symbols')
const checkbox_length = document.getElementById('length')
const t... |
import Controller from '@ember/controller';
export default Controller.extend({
actions: {
saveProduct() {
this.model.save();
this.transitionToRoute('product');
}
}
});
|
import _ from 'lodash'
import Utils from 'igui_root/src/scripts/utils';
import Backgrid from 'backgrid';
import TableHeaderView from 'igui_root/src/scripts/widgets/table/TableHeaderView';
import TableBodyView from 'igui_root/src/scripts/widgets/table/TableBodyView';
var TableGridView = Utils.extend.call(Backgrid.Grid... |
const express = require("express");
const app = express();
let html = `
<html>
<style>
body{
margin: 0;
padding: 0;
background: #272727;
color: #fff;
font-family: sans-serif
}
.main{
display: flex;
justify-content: center;
align-items: center;
... |
import React from "react";
import { Segment } from "semantic-ui-react";
import { useDispatch } from "react-redux";
import { BACKEND_HOST } from "./ip";
export function ChartNoteCard(props) {
const dispatch = useDispatch();
const showNote = size => {
dispatch({ type: "CHANGE_MODAL", key: "display", payload: "note"... |
self.addEventListener('push', e => {
const data = e.data.json();
e.waitUntil(
self.registration.showNotification(data.title, {
body: data.body
//icon: "icon url"
})
);
});
|
const db = require('../database');
const opencage = require('opencage-api-client');
const opencage_apikey = require('../opencageUser');
module.exports = {
async alignAllAddresses(req, res) {
console.log("alignAllAddresses()");
const addressQuery = `SELECT * FROM Address WHERE Addressid > 1000 AND ... |
const express = require('express')
const router = express.Router()
const indexRoutes = require('./index')
const userRoutes = require('./user')
// imports all routes to one file
router.use('/', indexRoutes)
router.use('/user', userRoutes)
module.exports = router |
// Variables
// ----------------------------------
// Modules
var path = require('path'),
sh = require('shelljs'),
cli = require('cli-color');
// Messages
var error = cli.red.bold,
info = cli.cyan,
done = cli.green;
// Check
var nodeCheck = sh.which('node'),
gitCheck = sh.which('git');
// Pa... |
define(["foo"], function (_foo) {
"use strict";
for (let _i = 0; _i < _foo.array.length; _i++) {
let elem = array[_i];
console.log(elem);
}
}); |
function cancel(command, tour) {
return function() {
localStorage[command] = true;
tour.cancel();
}
}
function dashboard() {
var tour = new Shepherd.Tour({
defaults: {
classes: 'shepherd-theme-arrows',
}
});
tour.addStep('step1', {
text: "Why don... |
const test = require('tape');
const isEmpty = require('./isEmpty.js');
test('Testing isEmpty', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof isEmpty === 'function', 'isEmpty is a Function');
t.equal(isEmpty(new Map()), true, '... |
import React from 'react'
import { Element } from 'react-scroll';
import ToyInfo from "../ToyInfo/ToyInfo";
import styles from "./WebPages.module.css"
import { ToyItems } from "../../../../store/contents/portfolio/ToyItems";
import webpageList from "../../../../assets/images/webpages"
import LazyItem from "../../../Laz... |
/**
* @license
* Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be f... |
(function(exports) {
var ALL_NUMBERS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var numberCollection = new Collection(ALL_NUMBERS);
var imagePathCollection;
function initialize() {
$.get('/numeralia_images', function(imagePaths) {
imagePathCollection = new Collection(imagePaths);
generateQuestion();
... |
import React, {Component} from "react"
import "./switchDot.scss"
export default class SwitchDot extends Component {
constructor(props){
super(props);
this.state = {
dots: this.props.dots,
currentdot: 0,
}
}
handledot=(val)=>{
this.setState({
currentdot: val,
})
this.p... |
import axios from "./axios";
import User from "../util/user";
export const getCategory = () => axios.get("/category");
export const updateCategory = params => {
const token = User.getToken();
return axios.post("/category", params, {
headers: {
token
}
});
};
|
var fs = require('fs'),
path = require('path'),
util = require('util'),
logger = require('morgan'),
bodyParser = require('body-parser'),
express = require('express'),
cookieParser = require('cookie-parser'),
config = require('./config'),
server = express(),
ipAddress = (process.env... |
import {combineReducers} from 'redux';
import authenticate from './authenticate';
import leftMenu from './leftMenu';
import globalMessages from './globalMessages';
import pageLoading from './pageLoading';
export default combineReducers({
authenticate,
leftMenu,
globalMessages,
pageLoading
});
|
import { Track } from '../core/Track.js';
export class Flag extends Track {
constructor( o = {}, parent ) {
super( o, parent )
this.type = 'flag'
this.needPrev = true;
this.h = 84;
this.hmax = Math.floor(( this.h - this.tt - this.tb )/18)-1;
this.init();
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.