text stringlengths 7 3.69M |
|---|
var playlist = pls = {
DEFAULT_VIDEO_ID: 'QcvjoWOwnn4',
list: {},
videoIndexes: [],
playedSoFar: [],
continuousPlayback: true,
playOrResumeCurrentVideo: function() {
playr.player.loadVideoById(playr.videoId);
playlist.highlightCurrentVideo();
//if (storedTime > 0.0) {
// seekToSeconds(store... |
import currency from '../currency'
import {
fetchBtcRequest,
fetchEthRequest,
fetchBtcSuccess,
fetchBtcFailure,
fetchEthFailure,
fetchEthSuccess,
selectOffset
} from '../../actions/currency'
describe('Сurrency reducer', () => {
describe('action fetchBtcRequest', () => {
it('изменяет isBtcLoading на... |
// Higher Order Functions
//We call functions that accept functions as parameters "higher order functions."
//This is actually something special about JavaScript. Not all languages
//allow us to pass other functions as parameters to functions!
// sendMessage is a higher order function as it accepts a parameter called ... |
/**
* png.js - The catch-all PNG optimizer task
*
* Copyright (c) 2012 DIY Co
*
* 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
*
* Unles... |
const MatrixBase = [1, 0, 0, 1, 0, 0]
// ctx.transform.apply(ctx,Matrix)
export default class Matrix {
constructor() {
let x
if (arguments.length > 0) {
x = Array.prototype.slice.call(arguments)
} else {
x = MatrixBase
}
for (const p in x) {
this[p] = x[p]
}
this.length ... |
import FileSaver from 'file-saver'
import XLSX from 'xlsx'
export function downloadExcel(dataArr, nameArr, excelName) {
// dataArr二维数组,存放导出数据,不可为空
// nameArr一维数组, 允许空数组(默认sheet)
// excelName, 导出excel文件名,不允许为空
const defaultCellStyle = { font: { name: '', sz: 11, color: 'FF00FF88' }, fill: { fgColor: { rgb: 'FFF... |
import fetch from 'node-fetch';
/**
* Gets the horoscope for a given sign
* @method getHoroscope
* @param {String} sign the sign of question
* @param {String} time yesterday, today, tomorrow
* @return {Promise}
* date: body.date,
* horoscope: body.horoscope,
* sunsign: body.sunsig... |
import React from "react";
import { BrowserRouter as Router, Route, Link, IndexRoute, Redirect } from "react-router-dom";
import { HEADER_LINKS } from "./common.props";
import Utility from "../lib/util";
export default class PageBody extends React.Component {
constructor(props) {
super(props);
this.state = ... |
/// <reference path="jquery-3.3.1.js" />
$(document).ready(function () {
compression.Init();
});
var compression = {
before: 0,
after:0,
Init: function () {
$('.comp').click(function () {
compression.compressInput();
});
$('.decomp').click(function () {
... |
var count_click_Funnel = 0;
(function(){
var DEFAULT_HEIGHT = 400,
DEFAULT_WIDTH = 600,
DEFAULT_BOTTOM_PERCENT = 1/3;
window.FunnelChart = function(options) {
/* Parameters:
data:
Array containing arrays of categories and engagement in order from greatest expected funnel engagement t... |
const enter = () => {
document.getElementById("tag-line").classList.add('hidden');
document.getElementById("enter-r").classList.add('hidden');
document.getElementById("enter-l").classList.add('hidden');
document.getElementById("app").classList.remove('centered');
document.getElementById("ledger").classList.re... |
var session = require('express-session');
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var compression = require('compression');
var routes = req... |
/***
* module dependencies
*/
const should = require('should'),
sinon = require('sinon'),
Package = require('./index');
let _create, _resolve, _access,
_token = {
id: "token-test-123",
client_id: "client-test-123",
owner_id: "owner-test-123",
scopes: [
"scope-a... |
'use strict';
const tableName = 'logs';
module.exports = {
up: (queryInterface, dataTypes) => queryInterface.createTable(tableName, {
id: {
type: dataTypes.STRING,
defaultValue: dataTypes.UUIDV4,
allowNull: false,
primaryKey: true
},
session_... |
/**
* Created by Administrator on 2016/8/22.
*/
Ext.define('Overrides.Template', {
override: 'Ext.Template',
/**
* @private
* Do not create the substitution closure on every apply call
*/
evaluate: function(values) {
var me = this,
useFormat = !me.disableFormats,
... |
import React, { Component } from 'react';
import { fire, base } from './fire';
import firebase from 'firebase'
import firestore from 'firebase';
import {
BrowserRouter as Router,
Route,
Link
} from 'react-router-dom';
import Feed from './components/Feed';
import Settings from './components/Settings';
import Props... |
// Configuración de Firebase
const firebaseConfig = {
apiKey: "AIzaSyC_yF5Y90-GsKfO7fZWmS6OQFv5Gj7B8a8",
authDomain: "cmyk-orange.firebaseapp.com",
projectId: "cmyk-orange",
storageBucket: "cmyk-orange.appspot.com",
messagingSenderId: "179241068454",
appId: "1:179241068454:web:5e1763ec4bbee8ef5d5167"... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const SeasonSchema = new Schema({
userId: { type: Schema.Types.ObjectId, ref: 'users', required: true },
roleType: { type: Number, required: true },
startingSR: { type: Number, required: true },
SR: { type: Number, required: true },... |
import React, { Component } from 'react';
import { AppRegistry, Platform, StyleSheet, Text, Dimensions,
PermissionsAndroid, View, FlatList,
TouchableHighlight, TouchableOpacity, Image, Alert,
Button, AsyncStorage, NativeAppEventEmitter, NativeEventEmitter, NativeModules, ListView, ScrollView} from 'react-nat... |
import { MaybeLink, } from "../toolbox";
import PropTypes from "prop-types";
import React from "react";
import styled from "styled-components";
const EntryWrapperLink = styled(MaybeLink)`
display: flex;
width: 100%;
position: relative;
overflow: hidden;
`;
const EntryWrapper = ( { children, externalUrl, internal... |
const express = require("express");
const router = express.Router();
const post = require("../controller/postController");
router.get("/post", post.findAll);
router.get("/post/:postId", post.findOneByPostId);
router.post("/post", post.create);
router.put("/post/:postId", post.updateByPostId);
router.delete("/post", p... |
import React, { useState,useReducer, useEffect } from "react";
import { useForm } from "react-hook-form";
import { createStyles, makeStyles, Theme } from "@material-ui/core/styles";
import TextField from "@material-ui/core/TextField";
import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core... |
var Modeler = require("../Modeler.js");
var className = 'Typeukinvestorrecord';
var Typeukinvestorrecord = function(json, parentObj) {
parentObj = parentObj || this;
// Class property definitions here:
Modeler.extend(className, {
result: {
type: "string",
wsdlDefinition: {
minOccurs: 0,
... |
export function CartReducer(state = {
cartItems: []
}, action){
switch(action.type){
case "INITIALIZE_CART": {
state = {...state}
return state
}
case "CART_LOADED": {
state = {...state}
state['cartItems'] = action.payload
retur... |
import React from 'react'
const ModDark = () => {
const style = {
oscuro: {
backgroundColor: '#092D53',
color: '#fff',
}
}
const cambiarModo = () => {
let cuerpoweb = document.body;
cuerpoweb.classList.toggle('oscuro');
}
return... |
import React from 'react';
import {View, Text, TouchableOpacity, StyleSheet, Image, Dimensions, Alert, FlatList} from 'react-native';
import PropTypes from "prop-types";
import Colors from "../constants/Colors";
import OrderArrayItem from './OrderArrayItem';
const {width: SCREEN_WIDTH, height: SCREEN_HEIGHT} = Dimensi... |
function showAlert(){
alert("注意:本站内容为学习使用,不作任何商业用途,所有数据均为测试数据。" +"\n" + "本站暂时只支持内核为webKit的谷歌浏览器,360浏览器极速模式。" + "\n" + "请点击确认继续加载本站内容。");
};
$(function(){
//顶部导航栏
var navlists=$(".nav_ul li");
for (var i = 0; i < navlists.length; i++) {
navlists.eq(i).attr("class",i);
if (i==0) {
navlists.eq(i).attr("class", ... |
import React from 'react'
import {ListItem} from '@material-ui/core'
import {getColor} from './getColor'
class CommentContainer extends React.Component {
showCommentID = (comment) => {
console.log(comment.id)
console.log(comment.room_id)
}
render() {
const range = (start, stop, step) => Array.from(... |
// console.log uses standard output to log msg to the console, and also controls line spacing to give in new line
// PROCCESS STANDARD OUTPUT will write Strings but will not give you a new line automatically
process.stdout.write("Hello ");
process.stdout.write("World \n\n\n\n");
// Array of questions
var questions = ... |
// 别误会, 就是特意导出一个空函数
export default () => {} |
(function() {
function int(x) {
return x | 0;
}
function svg_element(tag) {
return document.createElementNS('http://www.w3.org/2000/svg', tag);
}
var rt = {};
rt.mkGlobalScope = function() {
var o = Object.create(null);
function def(name, x) {
Object... |
// TODO: split routes into individual files
// TODO: don't hardcode 'article_' and 'page_' id prefixes
exports.register = (server, options, next) => {
server.route([
{
method: 'GET',
path: '/collections',
config: {
handler: (request, reply) => {
reply(options.collections);
... |
import React from 'react';
import PropTypes from 'prop-types';
import AudioVolumeVisualization from '../audioVolumeMeter/AudioVolumeVisualization.js';
import AudioPreview from '../components/AudioPreview.jsx';
import {AudioSpeakerDetector} from 'phenix-web-sdk';
import colors from '../../styles/colors.css';
import {sel... |
import actionTypes from "../actionTypes";
import makeActionCreator from "./makeActionCreator";
export const setScreenName = makeActionCreator(
actionTypes.SET_CURRENTUSER_SCREEN_NAME,
"name"
);
export const setPhone = makeActionCreator(
actionTypes.SET_CURRENTUSER_PHONE,
"phone"
);
export const setEmail = make... |
'use strict'
const { Trait } = require('@northscaler/mutrait')
const property = require('@northscaler/property-decorator')
const { IllegalArgumentError } = require('@northscaler/error-support')
const { StreetAddress } = require('../entities/Location')
/**
* Imparts a `streetAddress` property with backing property `_... |
class Left {
static of(value) {
return new Left(value)
}
constructor(value) {
this._value = value
}
map(fn) {
return this
}
}
class Right {
static of(value) {
return new Right(value)
}
constructor(value) {
this._value = value
}
map(fn) {
return Right.of(fn(this._value)... |
import React from 'react';
const userInput = ( props ) => {
const style = {
backgroundColor: 'blue'
}
return(
<input type="text"
onChange={props.change}
value={props.name}></input>
);
}
export default userInput; |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsFilterCenterFocus = {
name: 'filter_center_focus',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0... |
// Provides dev-time type structures for `danger` - doesn't affect runtime.
/* global danger, fail, warn */
import { CLIEngine } from 'eslint'
/**
* Eslint your code with
*/
export default async function eslint(config, extensions) {
const allFiles = danger.git.created_files.concat(danger.git.modified_files)
con... |
import createElement from '../../assets/lib/create-element.js';
function createCardTemplate({ image, price, name }) {
return `<div class="card">
<div class="card__top">
<img src="/assets/images/products/${image}" class="card__image" alt="product">
<span class="card__price">€${price.to... |
// result
export const ADD_RESULT = 'ADD_RESULT';
|
(function (angular, appSuite) {
"use strict";
function constructor($mdDialog,studentService) {
var vm = this;
vm.studentData = {};
debugger;
}
constructor.$inject = ["$mdDialog","studentService"];
angular.module("student").controller("addNewStudentController", c... |
/**
* Created by xiaojiu on 2017/5/6.
*/
/**
* 4pl Grid thead配置
* check:true //使用checkbox 注(选中后对象中增加pl4GridCheckbox.checked:true)
* checkAll:true //使用全选功能
* field:’id’ //字段名(用于绑定)
* name:’序号’ //表头标题名
* link:{
* url:’/aaa/{id}’ //a标签跳转 {id}为参数 (与click只存在一个)
* click:’test’ //点击事件方法 参数test(index(当前索引),... |
const selectors = {
OVERWATCH_FOOTER: "#footer",
COMPETITIVE_STATS: "#competitive",
COMPETITIVE_DROPDOWN_MENU: "#competitive > section:nth-child(2) > div > div.flex-container\\@md-min.m-bottom-items > div.flex-item\\@md-min.m-grow.u-align-right > div > select",
OPTIONS: "#competitive > section:nth-child... |
const gulp = require('gulp');
const fs = require('fs');
const rename = require('gulp-rename');
const environment = process.env.ENVIRONMENT || 'dev';
gulp.task('copy-default-json', function() {
fs.stat('./config/default.json', function(err, stat) {
if(err != null && environment === 'dev') {
return gulp.... |
(function() {
var toString = Object.prototype.toString;
function isArray(it){
return toString.call(it) === '[object Array]';
}
function isObject(it){
return toString.call(it) === '[object Object]';
}
function _merge(a, b){
for(var key in b){
if(isArr... |
/**
* title: Address.jsx
*
* date: 12/23/2019
*
* author: javier olaya
*
* description: component to get users Address
*/
import React from 'react';
import PropTypes from 'prop-types';
import Picture from './Picture';
import SaveIcon from '../pictures/SaveIcon.svg';
import Search from '../pictures/Search.svg';
... |
import { createStore, applyMiddleware, compose } from 'redux'
import rootReducer from '../reducers/rootReducer'
import initialState from './initialState';
import logger from 'redux-logger' // Without configuration
import thunk from 'redux-thunk'
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || c... |
const formidable = require("formidable");
const fs = require("fs");
const Upload = require("../models/upload");
exports.getAllUpload = (req, res) => {
Upload.find({})
.sort({ date: -1 })
.exec((err, data) => {
if (err) throw err;
res.render("home", { data: data });
});
};
// POST all upload
... |
/**
* The baseclass for queryengines
* @abstract
*/
Freja.QueryEngine = function() {};
Freja.QueryEngine.prototype.getElementById = function(document, id) {
// getElementById doesn't work on XML document without xml:id
var allElements = document.getElementsByTagName("*");
for (var i= 0; i < allElements... |
const express = require('express');
const mongose = require('mongoose');
const config = require('./config');
const authController = require('./app/controllers/auth.controller');
const morgan = require('morgan');
const bodyParser = require('body-parser');
const app = express();
let port = process.env.PORT || 1337;
mon... |
import React, { useState, useEffect } from 'react';
import sqlFormatter from 'sql-formatter';
import {
Button, Row, Col, message,
} from 'antd';
import brace from 'brace';
import 'brace/theme/sqlserver';
import 'brace/mode/mysql';
import AceEditor from 'react-ace';
const handleOnload = (e) => {
// console.log('l... |
var checksum = require('../../model/checksum');
var config = require('../../config/config');
module.exports = function (app) {
app.post('/pgredirect', function(req,res){
console.log("in pgdirect");
res.render('pgredirect.ejs',{'config' : config});
});
};
//vidisha |
// 搜索接口
// 请求相关函数
const { get } = require('../request')
// utils
const {
getRandomVal,
mergeSinger
} = require('../utils')
// 歌曲图片加载失败时使用的默认图片
const fallbackPicUrl = 'https://y.gtimg.cn/mediastyle/music_v11/extra/default_300x300.jpg?max_age=31536000'
// 响应成功code
const CODE_OK = 0
const token = 5381
// 注册热门搜索接口
... |
'use strict';
var React = require('react');
var UIKernel = require('uikernel');
var createClass = require('create-react-class');
var RecordForm = createClass({
mixins: [UIKernel.Mixins.Form],
componentDidMount: function () {
this.initForm({
fields: ['name', 'phone', 'age', 'gender'],
... |
(function (wijmo, $, data) {
'use strict';
var grid = new wijmo.grid.FlexGrid('#mdFlexGrid'),
cv = new wijmo.collections.CollectionView(data.getData(100));
grid.initialize({
autoGenerateColumns: false,
columns: [
{ header: 'Country', binding: 'country', width: '*' },
... |
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.definePrope... |
(function () {
'use strict';
angular
.module('Mobilot')
.factory('LanguageService', LanguageService);
LanguageService.$inject = [
'$log',
'$translate'
];
function LanguageService (
$log,
$translate
) {
/// LanguageService
var service =
{
/// constants
LANGUAGES: {
GERMAN: 'de_DE',
E... |
import React from "react"
import PropTypes from "prop-types"
import style from './Notification.module.css'
export default function Notification({ message }) {
return (
<>
<h2 className={style.title}>{message}</h2>
</>
)
}
Notification.propTypes = {
message: PropTypes.string.isRequired,
}
|
module.exports = function(deployer) {
deployer.deploy(FundingHub);
deployer.autolink();
deployer.deploy(Project);
};
// module.exports = function (deployer) {
// var fundingHub;
// deployer.then(function () {
// console.log('Deploying FundingHub...');
// return FundingHub.new("FugueWeb FH... |
import {Box} from "src/geo/Box.js";
import {Vector} from "src/geo/Vector.js";
import {Point} from "src/geo/Point.js";
import {codeDistanceUnitCellSize} from "src/braid/CodeDistance.js";
import {DetailedError} from "src/base/DetailedError.js";
import {UnitCellSocket} from "src/braid/UnitCellSocket.js";
import {PlumbingP... |
import React, { useState, useEffect, useRef } from "react";
import Header from "../components/Header";
import { Link as RouterLink } from "react-router-dom";
import {
Flex,
Text,
Center,
Image,
Tabs,
TabList,
TabPanels,
Tab,
TabPanel,
Button,
Avatar,
LinkBox,
useColorModeValue,
Skeleton,
SkeletonCircle,... |
var Phaser = Phaser || {};
var CrazyBird = CrazyBird || {};
CrazyBird.Cat = function(gameState, position, texture, group, properties) {
"use strict";
CrazyBird.Prefab.call(this, gameState, position, texture, group, properties);
game.physics.p2.enable(this);
this.body.setCollisionGroup(this.gameState.collid... |
'use strict'
import { Meteor } from 'meteor/meteor';
import { Counts } from 'meteor/tmeasday:publish-counts';
import { Feeds } from '../imports/api/feeds';
Meteor.publish('feeds', function(options, searchString) {
var user = Meteor.users.findOne({
_id: this.userId
});
if(options.sort) {
var where = {
... |
import React from 'react'
import './category-item.styles.scss'
import {withRouter} from 'react-router-dom'
const CategoryItem = ({categoryId,imageUrl,history,match}) => (
<div className='collection-item'>
<div className='image' onClick={()=>history.push(`${match.url}/${categoryId}`)}
st... |
module.exports = function(Item){
//Item.disableRemoteMethod("create", true);
Item.disableRemoteMethod("upsert", true);
Item.disableRemoteMethod("updateAll", true);
Item.disableRemoteMethod("updateAttributes", true);
Item.disableRemoteMethod("find", true);
Item.disableRemoteMethod("findById", true);
Item.disableR... |
$(function() {
var categories = [];
var names = [];
var tabs = [];
// create tab names and categories from result-list items
$("#source-list-results > li ").each(function() {
categories.push($(this).attr("data-category"));
names.push($(this).attr("data-name"));
});
var ... |
const mongoose = require('mongoose');
const Tipo = mongoose.model('Tipo', {
nombre: String,
foto: String,
descripcion: String,
modoPreparacion: Array,
beneficios: Array
});
module.exports = Tipo; |
import logo from "./logo.svg";
import "./App.css";
import { CourierProvider } from "@trycourier/react-provider";
import { Toast } from "@trycourier/react-toast";
import { Inbox } from "@trycourier/react-inbox";
function App() {
return (
<div className="App">
<header className="App-header">
<Courier... |
import React, { Component } from "react";
import { Link } from "react-router-dom";
import isEmpty from "../../../validation/is-empty";
import { Redirect } from "react-router-dom";
import {
addMovieToCollection,
removeMovieFromCollection
} from "../../../actions/movieActions";
import PropTypes from "prop-types";
/... |
import React from 'react'
import './mineInfo.css'
import { connect } from 'react-redux'
import { withRouter } from 'react-router-dom'
import ChangeStNo from './changeStNo/changeStNo'
class MineInfo extends React.Component {
goto_changeAavatar(){
this.props.history.push("/mine/ChangeAvatar")
}
render() {
... |
// pages/order/order.js
let app = getApp();
let baseUrl = app.globalData.baseUrl;
const utils = require('../../utils/util.js')
const regeneratorRuntime = require('../../lib/runtime')
var page = 1;
Page({
/**
* 页面的初始数据
*/
data: {
showModel:false,
cur:'',
index:'',
Tindex:'',
statuindex:'',... |
export default function get(req, res) {
const title = `Dictionaries`
res.render(`Dictionaries/Dictionaries`, {
[title]: true,
title,
})
}
|
import React from 'react';
import Header from './Header';
const App = props => {
return (
<>
<Header count={12} />
<ul>
<li>Item One</li>
<li>Item Two</li>
</ul>
</>
)
};
export default App;
|
(global.webpackJsonp = global.webpackJsonp || []).push([ [ "components/views/fc_icon" ], {
"1e41": function(n, e, t) {
t.r(e);
var c = t("bbec"), o = t.n(c);
for (var i in c) [ "default" ].indexOf(i) < 0 && function(n) {
t.d(e, n, function() {
return c[n];
... |
import React, { Component, PropTypes } from 'react';
import { reduxForm, Field, formValueSelector } from 'redux-form';
import inputField from './../../components/ModalWindows/inputField';
import { withGoogleMap, GoogleMap, Polygon, Marker } from 'react-google-maps';
import DrawingManager from 'react-google-maps/lib/dra... |
/* @flow */
import React, { Component } from 'react';
import {
View,
Text,
StyleSheet,
} from 'react-native';
import LocalizedStrings from 'react-native-localization';
export default class global_data {
// const backgroundColor = '#2c3e50';
// global.backgroundColor = backgroundColor;
constructor(){
... |
import React from 'react'
import {connect} from 'react-redux'
import {fetchGists} from '../saga/gists'
class About extends React.Component{
constructor(){
super(...arguments)
this.getList = this.getList.bind(this)
}
componentWillMount(){
this.props.getList()
}
getList(){
... |
Ext.define('Gvsu.modules.refs.view.CustomersForm', {
extend: 'Core.form.DetailForm',
titleIndex: 'name',
layout: 'border',
defaults: {
margin: '0',
},
width: 450,
height: 100,
buildItems: function() {
var me = this;
return [{
xtype:... |
class Path {
constructor(seed, canvasX, canvasY) {
this.seed = seed;
// maximum number of points on the svg path
this.maxPoints = 10;
// x and y coordinates of the desired svg canvas size
this.maxX = canvasX;
this.maxY = canvasY;
// maximum stroke width on the svg path
this.maxWidth = ... |
import DataType from 'sequelize';
import Model from '../sequelize';
// TODO: maybe it is better to just refer to Wallet with walletId
const Reward = Model.define(
'Reward',
{
id: {
type: DataType.INTEGER(11),
allowNull: false,
primaryKey: true,
autoIncrement: true,
},
amount: {... |
import React from 'react';
import PropTypes from 'prop-types';
import FieldStyled from './FieldStyled';
const Field = ({
value,
changeValue,
placeholder,
name,
type,
getErrorMessage,
}) => {
const handleChange = (evt) => {
changeValue(evt.target.name, evt.target.value);
};
const handleFocus = ()... |
export const ApiCalls = {
get: {
photos: "https://api.unsplash.com/photos/curated"
}
};
|
module.exports = function(app) {
require('./controllers/cryptids_controller')(app);
require('./directives/cryptid_form_directive')(app);
};
|
export const GET_ERRORS = "GET_ERRORS";
export const CLEAR_ERRORS = "CLEAR_ERRORS";
export const SET_CURRENT_USER = "SET_CURRENT_USER";
export const GET_PROFILE = "GET_PROFILE";
export const GET_DOGS = "GET_DOGS";
export const GET_DOG = "GET_DOG";
export const DELETE_VACCINATION = "DELETE_VACCINATION";
|
ui.Checklist = function() {
ui.Checklist.base.constructor.call(this);
};
wr.inherit(ui.Checklist, wr.View);
ui.Checklist.prototype.create = function() {
this.node = wr.div_c("ui_checklist");
};
ui.Checklist.prototype.enter = function() {
ui.Checklist.base.enter.call(this);
};
ui.Checklist.prototype.exit = ... |
import React from 'react';
import styled from 'styled-components';
import { Route, Link, Redirect } from 'react-router-dom';
import'../App.css'
const Splash = styled.div`
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 98vh;
h4 {
margin-top: 10%;
background-color... |
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import { Form, Input, Button, Card, Radio } from 'antd';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';
import styles from './Edit.less';
const FormItem = Form.Item;
const { TextArea }... |
module.exports.run = async (PREFIX, message, args, bot) => {
message.channel.send("Pong!")
};
module.exports.config = {
name: "ping",
d_name: "Ping",
aliases: []
}; |
import React from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { connect } from 'react-redux';
import Panel from './Panel.jsx';
import FormGroup from './FormGroup.jsx';
import { submitForm } from '../actions/others';
class Others extends React.PureComponent {
construc... |
var express = require('express');
var router = express.Router();
var async = require('async');
var _ = require('underscore');
var api = require('local-cms-api');
var Pager = require('local-pager');
var tkd = require('../tkd.json');
var pageId = require('./pageId.json');
var request = require('request');
var Cache = re... |
// Write a function that returns the product of every value in an array of numbers
function productOfArray(arr) {
// DO stuff
// if the array length is 0 return 1
if (arr.length === 0) {
return 1;
}
// return array[0] multiplied by the value of productOfArray on the array with the first element taken off
... |
const raiseStatus = (response) => {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
const err = new Error(response.status);
throw err;
};
const getGameData = () => fetch("https://opentdb.com/api.php?amount=10&category=9&difficulty=easy&type=multiple")
.then(raiseStatus);
... |
var chatModel = require('../../models/ChatModel');
var userlistModel = require('../../models/UserModel');
var fs = require('fs');
var path = require('path');
var stopWords = require('fs').readFileSync(path.join(__dirname, "../../stopWords.txt"), 'utf8').toString().split(",");
var testCtrl = require('./testCtrl.js');
f... |
// 1. functions as abstraction
var work = function() {
var name = "*** WORK FUNCTION ***";
console.log(name + "\nworking hard!");
}
var play = function() {
var name = "*** PLAY FUNCTION ***";
console.log(name + "\nPLAYING hard !");
}
var doIt = function(f) {
console.log("<<< BEGIN doIt(f) >>> " + ... |
import React, { useEffect, useState, Fragment } from "react"; // eslint-disable-line no-unused-vars
import { Route, Link } from "react-router-dom"; // eslint-disable-line no-unused-vars
import styled from "styled-components";
import { axiosWithAuth } from "../../../helpers/axiosWithAuth";
import axios from "axios"; // ... |
import { createStore } from 'vuex'
export default createStore({
state: {
themeId: 0,
language: 'cn',
},
mutations: {
CHANGE_THEME(state, i) {
state.themeId = i
},
CHANGE_LANGUAGE(state, i) {
state.language = i
},
},
... |
document.addEventListener('DOMContentLoaded', () => {
console.log('JavaScript loaded');
const newListButton = document.createElement("button");
newListButton.textContent= 'Delete';
const body = document.querySelector("body");
body.appendChild(newListButton);
newListButton.addEventListener('click', handl... |
import _ from 'lodash';
import {
isJsonString,
jsonIsEqual,
} from '@/helpers/utils';
export default {
handleChangePage: function handleChangePage(page) {
this.getItems(page);
},
handleSizeChange: function handleSizeChange(size) {
this.pageSize = size;
this.getItems(1);
},
handleSortChange: ... |
const ChainUtil = require('../chain-util');
const { DIFFICULTY, MINE_RATE } = require('../config');
// Create the block class with a file called block.js.
// Each black has a `lastHash`, `hash`, `data, `nonce`, `diffculty` and `timestamp` attribute.
class Block {
constructor(timestamp, lastHash, hash, data, nonce, d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.