text stringlengths 7 3.69M |
|---|
import React from "react";
import { Redirect, Route, Switch } from "react-router-dom";
import SignIn from "../pages/SignIn/SignIn";
import SignUp from "../pages/SignUp/SignUp";
function UnauthorizedRoutes() {
return (
<Switch>
<Route exact path="/sign-in" component={SignIn} />
<Route exact path="/sig... |
import React, { Component } from 'react';
import Footer from '../../components/Footer';
import Header from '../../components/Header';
import Axios from 'axios';
import { withRouter } from "react-router-dom";
class ProductSetting extends Component {
constructor(props) {
super(props);
this.state = {... |
$(document).ready(function() {
//refs
var container = $('.cds-container'); //container
var albumApi = 'https://flynn.boolean.careers/exercises/api/array/music'; //api
$.ajax({
url: albumApi,
method: 'GET',
success: function(data) {
var album = data.response;
console.log(album);
// init handleba... |
import axios, { ERROR_CODES } from '../../api/config';
//Make GET request for vendors
export const REQUEST_VENDORS = 'REQUEST_VENDORS';
//Receive requested vendors
export const RECEIVE_VENDORS = 'RECEIVE_VENDORS';
//Notify UI that request has failed
export const NOTIFY_VENDOR_REQUEST_FAILURE = 'NOTIFY_VENDOR_REQUEST... |
var Peepub = require('pe-epub');
var fs = require('fs');
var outputFilename = './book.json';
fs.writeFile(outputFilename, JSON.stringify(book, null, 4), function(err) {
if(err) console.log(err);
console.log("JSON saved to " + outputFilename);
});
var epubJson = require('./book.json'); // see examples/example.j... |
import WordpressFeedPage from './WordpressFeedPage';
export default WordpressFeedPage;
|
import React from 'react';
import { useSelector } from 'react-redux';
import { Loader, CardGroup } from 'semantic-ui-react';
import { ErrMsg, EventLink } from '../../components';
import { BACKEND } from '../../config';
import { useAPI } from '../../hooks';
const ParticipatedEvent = () => {
const { token } = useSelec... |
'use strict';
var gulp = require('gulp');
var connect = require( 'gulp-connect' );
var rjs = require('gulp-requirejs');
var files = [
"./app/scripts/modules/**/**/**/*.js",
"./app/scripts/modules/**/**/**/*.html",
"./app/scripts/**/**/**/*.js",
"./app/scripts/**/**/**/*.html",
... |
import React, { Component } from 'react'
import MonacoEditor from 'react-monaco-editor'
import './App.css'
const prefix = 'json-'
const defaultCode = `return json`
const flagNames = ['slow', 'simple']
class App extends Component {
constructor() {
super()
this.state = { ...this.load(), result: '' }
}
lo... |
/* flow */
export const IDLESTATUS_AWAY = 'AWAY'
export const IDLESTATUS_INACTIVE = 'INACTIVE'
export const IDLESTATUS_EXPIRED = 'EXPIRED'
export const IDLE_STATUSES = [IDLESTATUS_AWAY, IDLESTATUS_INACTIVE, IDLESTATUS_EXPIRED]
|
import React, { useState } from "react";
import Filter from "./Filter";
import QuoteMobile from "./QuoteMobile";
import backIcon from "./icons/back.svg";
import plusIcon from "./icons/plus.svg";
const ContentMobile = (props) => {
const [contentMobileActivated, setContentMobileActivated] = useState(false);
const [n... |
'use strict';
const express = require('express');
const uuid = require('uuid/v4');
const logger = require('./logger');
const BookmarksService = require('./bookmarks-service');
const bookmarkRouter = express.Router();
const bodyParser = express.json();
bookmarkRouter
.route('/bookmark')
.get((req, res, next) => {... |
module.exports = {
1 : {
mails: {
emailConfirmationSubject: 'Confirmación de correo',
emailConfirmationMessage: 'Para confirmar su corre, de clic en el siguiente link:',
passwordRecoverSubject: 'Recuperación de contraseña',
passwordRecoverMessage: 'Para reesta... |
// Creates the addCtrl Module and Controller. Note that it depends on the 'geolocation' module and service.
var addCtrl = angular.module('addCtrl', ['geolocation', 'gservice', 'Message']);
addCtrl.controller('addCtrl', function($scope, $http, $rootScope, geolocation, gservice, Message) {
$scope.authData = $rootScope... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
/**
* @name: 队列queue
* @description: 实现数据结构——队列
* @problem: 通过数组实现队列是有问题的,原因在于dequeue这个操作的时间复杂度是O(n)
* getSize: 获取栈的元素个数
* isEmpty: 查看栈是否为空
* enqueue: 插入元素
* dequeue: 取出元素
* getFront: 获取队首元素
*/
class Queue {
constructor () {
this.data = []
}
getSize () {
return this.data.length
}
isEmpty (... |
import styled from 'styled-components';
export const Transition = styled.div`
opacity: ${props => props.in ? 1 : 0};
visibility: ${props => props.in ? 'visible' : 'hidden'};
-webkit-transition: all 0.15s ease-in;
transition: all 0.15s ease-in;
`; |
var camelcase = require('camelcase')
module.exports = [
{
type: 'input',
name: 'name',
message: 'What is the name of the component?',
filter: answer => camelcase(answer, {pascalCase: true})
},
{
type: 'list',
name: 'type',
message: 'What type of component should I create?',
choice... |
/**
* Represents the container area for the main page
*
* @ngdoc module
* @name ff.dashboardModule
*/
angular.module('ff.dashboardModule', [])
.config(require('./ff.dashboard.routes.js'))
.controller('ffDashboardController', require('./ff.dashboard.controller.js'))
|
var oTab = document.getElementById("tab");
var tHead = oTab.tHead;
var oThs = tHead.rows[0].cells;
var tBody = oTab.tBodies[0];
var oRows = tBody.rows;
function bindData() {
var frg = document.createDocumentFragment();
for (var i = 0; i < data.length; i++) {
var cur = data[i];
cur.name = cur.na... |
import React, { useState, useEffect } from 'react';
import { FlatList } from 'react-native';
import Styled from 'styled-components/native';
import BigCatalog from '~Components/BigCatalog';
const Container = Styled.View`
height: 300px;
margin-bottom: 8px;
`;
const BigCatalogList = ({ url, onPress }) => {
... |
import React, { Component } from "react";
import PropTypes from "prop-types";
import TextField from "@material-ui/core/TextField";
class Location extends Component {
render() {
return <TextField id="standard-basic" label={this.props.label} />;
}
}
export default Location;
|
import React, { Component } from 'react'
import AvatarEditor from 'react-avatar-editor'
import Select from 'react-select'
import Dropzone from 'react-dropzone'
import 'react-select/dist/react-select.css'
import ProfileView from './ProfileView'
import { createProfile, uploadPicture, profileToPayload } from './api'
imp... |
/**
* 文件上传服务
* @author heroic
*/
/**
* Module dependencies
*/
var path = require('path'),
Uploader = require('../plugins/uploader'),
uploader = new Uploader(),
LocalStrategy = require('../plugins/local_uploader'),
QiniuStrategy = require('../plugins/qiniu_uploader'),
config = require('../config');
/** ... |
/**
* 业务工具方法
*/
import { getAlbum, getMvDetail } from '@/api'
import { isDef, notify } from './common'
import router from '@/router'
export const createSong = (song) => {
const { id, name, img, artists, duration, albumId, albumName, mvId, ...rest } = song
return {
id,
name,
img,
artists,
du... |
/* --------------------------- INTUIT CONFIDENTIAL ---------------------------
categorySummary.js
Written by Date
Jason Harris 08/12/09
Revised by Date Summary of changes
Lane Roathe 09-08-10 [S715] TopOnly now expands topLevel sections to show collapsed subs
Lane Roathe 09/17/10 [DE1703] get show me st... |
// =====================
// provider list
// =====================
//
+function($){
//
//
provider.list = {
// ======================================================================
// Emoji
//
emoji: {
selector: 'emoji',
callback: 'initEmojione',
css: '',
js: ... |
import Link from '@/components/mdx/Link'
const PostNavigation = ({ next, prev }) => {
return (
<div className="divide-gray-200 text-sm font-medium leading-5 dark:divide-gray-700">
{(next || prev) && (
<div className="flex justify-between py-4">
{prev && (
<div>
<... |
/**
* @name JSON Editor
* @description JSON Schema Based Editor
* Deprecation notice
* This repo is no longer maintained (see also https://github.com/jdorn/json-editor/issues/800)
* Development is continued at https://github.com/json-editor/json-editor
* For details please visit https://github.com/json-editor/jso... |
const chromium = require('chrome-aws-lambda');
const { eagateLogin, eagateLogout } = require('./module/eagate');
const { doJanken } = require('./module/janken');
const doEvent = async (event) => {
const browser = await chromium.puppeteer.launch({
args: chromium.args,
defaultViewport: chromium.defaultViewpor... |
import axios from 'axios';
import { FETCH_POSTS, CREATE_POST, GET_POST, DELETE_POST } from './types';
const ROOT_URL = 'http://reduxblog.herokuapp.com/api';
const API_KEY = '?key=fdgfh3tf36';
export const fetchPosts = () => {
const request = axios.get(`${ROOT_URL}/posts${API_KEY}`);
return { type: FETCH_POSTS, pa... |
const router = require("express").Router();
const { response } = require("express");
const userController = require("../../controllers/userController");
const User = require("../../models/user.js");
//login route
router.post("/",async (req,res) => {
console.log(req.body);
console.log("you're in api user / to cre... |
module.exports = {
templates: {
path: __dirname + '/html/'
},
mime_type: {
js: 'text/javascript',
css: 'text/css'
}
};
|
$(window).on(
'load',
function() {
var uname = null;
var pass = null;
var dab = null;
var mt = null;
$(document).on(
'click',
'#butt',
function() {
uname = $('#uname').val();
pass = $('#pass').val();
... |
var hbs = require('express-hbs');
var express = require('express');
var fs = require('fs');
var recursion = require('./recursion.js');
var app = express();
app.set('view engine', 'hbs');
app.set('views', __dirname + '/views');
app.engine('hbs', hbs.express3({
partialsDir: __dirname + '/views/partials'
... |
exports.install = function (Vue, options) {
Vue.prototype.$success = function (msg) {
this.$notify({
title: '成功',
message: msg,
type: 'success',
duration: 2000
})
}
Vue.prototype.$error = function (msg) {
this.$notify({
titl... |
const express = require("express");
const MessageController = require("../controllers/MessageController");
const ProductController = require("../controllers/ProductController");
const BasketController = require("../controllers/BasketController");
const OrderController = require("../controllers/OrderController");
const ... |
const express = require('express')
const router = express.Router();
//FutsalCourts model
const Ground = require('../../../models/groundModel');
//Get Futsal Courts from api/futsalCourts
router.get('/',(req,res)=>{
Ground.find()
.then(Ground=> res.json(Ground))
})
//Post Futsal Courts to api/futsalcourt... |
'use strict';
/* JavaScript will go here */
console.log("Hello world!"); //System.out.println
var message = "Hello World!";
message = "haha";
console.log(message);
//Make a new string variable for the value "The iSchool is my school"
var school = "The iSchool is my school";
//Log out the string
console.log(sc... |
import * as serve from './server'
class PotluckRecipeApi {
static createPotluckRecipes(recipeIds) { //take an array of recipe IDs and a potluckid
const request = new Request(`${serve.PRODUCTION_SERVER}/potluck_recipes`, {
method: 'POST',
headers: new Headers({
'Content-Type': 'application/js... |
module.exports =
angular
.module('cpApp', ['ui.router'])
.run(function($state) {
});
require('./index.html');
require('../../node_modules/daterangepicker/daterangepicker.css');
require('./style.sass');
require('./main/main.controller');
require('./routing.config');
|
'use strict';
var assert = require("chai").assert
, linearRegression = require("../lib/everpolate.js").linearRegression
describe('Linear regression function', function () {
var xValues = [0, 1, 2, 3, 4, 5]
, yValues = [2, 3, 4, 5, 6, 7]
, regression = linearRegression(xValues, yValues)
it('Returns an ... |
/*
Noble characteristic notifcation example
This example uses Sandeep Mistry's noble library for node.js to
subscribe to a characteristic that has its notify property set.
The startScanning function call filters for the specific service
you want, in order to ignore other devices and services.
For a peri... |
var db = require('../../models/DB_InitTest.js');
var testModel = require('../../models/TestModel.js');
var isTesting = false;
module.exports.isTesting = function(){
return isTesting;
};
module.exports.initTestDB = function(callback){
isTesting = true;
db.createMsgInfoTableForTest(function(result){
if(!result.sta... |
$(function() {
$.cookie('test_cookie');
var cookie = $.cookie('test_cookie');
if(cookie == 1) {
//cookieが保存されていたらアラートを表示
alert('cookieがあります');
} else {
//cookieが保存されていなかったらモーダルを表示
$.magnificPopup.open({
items: {src: '#modal'},
type: 'inline',
closeOnBgClick:true
})
}
... |
var SELECTOR_ADD_OBJECT_BTN = '.top-section-home .btn.btn-primary';
var SELECTOR_ADD_OBJECT_FORM_TITLE = '.modal-content .title input[name=title]';
var SELECTOR_MODAL_SUBMIT_BTN = '.modal-footer .btn.btn-primary';
module.exports = {
load: function() {
var client = this.client;
return this.client
.url(f... |
db.tareas.insert({
title : 'establecer requisitos',
description: 'requisitos del proyecto definidos y consensuados con cliente',
status : 'done',
tags : ['desarrollo','diseño','marketing','finanzas']
});
db.tareas.insert({
title : 'presupuestar',
description: 'presupuesto... |
import React from 'react';
import PropTypes from 'prop-types';
import LinearGradient from 'react-native-linear-gradient';
const GradientBackground = ({ children, style, error }) => (
<LinearGradient
style={{ flex: 1, ...style }}
colors={error === true ? ['#F90000', '#FF4000'] : ['#0090FF', '#60DFDE']}
>
... |
define(['apps/system3/demo/demo.controller'], function (app) {
app.controller("demo.controller.typography", function ($scope) {
$scope.$watch("$viewContentLoaded", function () {
})
});
});
|
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import WidgetList from 'components/dashboard/button/widgetList';
import ButtonList from 'containers/dashboard/button/buttonList';
import FontAwesome from 'react-fontawesome';
import { fetchWidget... |
'use strict';
angular.module('beerMeApp')
.controller('QuestionnaireCtrl', function ($scope, $routeParams, likeButton, Questionnaire, $location) {
Questionnaire.counter = 0;
console.log('counter = ', Questionnaire.counter)
$scope.beername = Questionnaire.initialBeers[0].name;
$scope.imgUrl = Questio... |
import React from 'react';
import PixelGrid from './PixelGrid';
export default class GridWrapper extends React.Component {
shouldComponentUpdate(newProps) {
const { cells } = this.props;
return newProps.cells !== cells;
}
render() {
const { props } = this;
return (
<PixelGrid
cells... |
let locationInput = document.querySelector("#Trip_Location");
locationInput.addEventListener("keyup", (e) => {
let locationText = e.target.value;
let googleQuery = "https://www.google.com/search?q=things+to+do+in+";
let newQuery = googleQuery + locationText.split(" ").join("+");
document.querySe... |
let IStore = require('./IStore.js');
var fs = window.require('fs');
var path = window.require('path');
class NWStore extends IStore {
constructor(){
super();
this.root = nw.App.dataPath + path.sep;
this.fs = fs;
}
}
module.exports = NWStore;
|
const Telegraf = require('telegraf')
const app = new Telegraf(339280148:AAG2sB7Jjh6CQcWsj4ffGo2EllkwLLf0i2Q)
app.command('start', (ctx) => {
console.log('start', ctx.from)
ctx.reply('Welcome!')
})
app.hears('hi', (ctx) => ctx.reply('Hey there!'))
app.on('sticker', (ctx) => ctx.reply('👍'))
app.startPolling()
|
import React from 'react';
import styled from "styled-components";
import {AiOutlineArrowRight} from "react-icons/ai"
import img from "./Assets/board.png"
import img1 from "./Assets/costo.png"
import img2 from "./Assets/google.png"
import img3 from "./Assets/fender.png"
import img4 from "./Assets/space.jpg"
export con... |
import React, {Component} from 'react';
import {View, Text, ImageBackground, Image, TouchableOpacity, Alert, TextInput, Dimensions}from 'react-native';
import { Notifications } from 'expo';
import Constants from 'expo-constants';
import * as Location from 'expo-location';
import * as Permissions from 'expo-permission... |
//app.js
const api = require("utils/request.js")
App({
navigateToLogin: false,
onLaunch: function() {
wx.hideShareMenu();
let that = this;
/**
* 初次加载判断网络情况
* 无网络状态下根据实际情况进行调整
*/
wx.getNetworkType({
success(res) {
const networkType = res.networkType
if (networkTyp... |
import {createReducer} from '../../action-reducer/reducer';
import {mapReducer} from '../../action-reducer/combine';
const create = (key) => {
const prefix = ['basic', key];
const edit = createReducer(prefix.concat('edit'));
const toEdit = ({activeKey}, {payload={}}) => {
const key = payload.currentKey || ac... |
// !Scheduled Classes Grid
StudentCentre.grid.AttendanceScheduledClasses = function(config) {
config = config || {};
Ext.applyIf(config,{
id: 'studentcentre-grid-attendance-scheduled-classes'
,url: StudentCentre.config.connectorUrl
,baseParams: { action: 'mgr/attendance/scScheduledClassG... |
$(function(){
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$(".autocomplete").select2({
width: "100%",
maximumSelectionLength : 1
});
$(".tag").select2();
$(".autocomplete-cases").select... |
// JavaScript Document
var channel_account_add_btn_ststus=1;
$(function(){
//loginHeight();
//显示当前列表td未显示的内容
$(".tablelist_tbody td").mouseover(function(){
//当前对象宽度
//var objwidth = $(this).width();
var status = true;
var text = $.trim($(this).html());
//... |
_.max = function(collections,arg){
var maxItem;
var maxValue;
var currentValue;
for(var i in collections){
if(!maxItem) {
maxItem = collections[i];
continue;
}
maxValue = Base.getValue(maxItem,arg);
currentValue = Base.getValue(collections[i],arg);
... |
'use strict';
import * as React from 'react';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import * as EventManager from 'modules/events';
import * as settings from 'modules/settings';
import './style';
class Errors extends React.Component {
state = {
isHide: true,
upworkError: ... |
;(function() {
let detectBitness = function() {
// Detect is OS is 64 bit
const indicators64Bit = [
"x86_64",
"x86-64",
"Win64",
"x64;", // Mind the semicolon! Without it you will have false-positives.
"amd64",
"AMD64",
... |
var db=require('./db.js')
var utils=require('./utils.js');
exports.otherRegister = otherRegister;
exports.getCode=getCode;
exports.register=register;
exports.login=login;
exports.changePassword=changePassword;
exports.userinfo=userinfo;
//第三方用户的注册\登录
async function otherRegister(params,callBack){
if(null!=params.... |
/*
*description:经销网络
*author:fanwei
*date:2014/04/25
*/
define(function(require, exports, module){
var global = require('../global/global');
//var fenye = require('../../../../global/js/widget/dom/fenye');
var scrollLoad = require('../../../../global/js/widget/dom/scrollLoad');
function Sale() {
... |
import { combineReducers } from 'redux'
import { isBusy, hasErrored, listUsers, setUser, editUser } from './admin'
import { loginIsPending, loginHasErrored, userIsAdmin, sessionChange } from './session'
import { forecast } from './weather'
// This is what controls the state object shape
export default combineReducers... |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
// import Shoe from './shoe';
import axios from 'axios';
class ShoesList extends Component {
constructor(props) {
super(props);
this.state = {
allShoes: []
}
}
// method to retrieve the... |
var attributeArray = [];
var total = 0;
var numbers = [];
var dieCount = 0;
function attributeGen() {
return 1 + Math.floor(Math.random() * 6);
}
while ( dieCount < 4 ) {
numbers.push(attributeGen());
dieCount += 1;
}
numbers.sort();
numbers.shift();
numbers.forEach(function(number) {
total += number;
});
alert... |
import createToken from './createToken';
import addToken from './addToken';
// import validateToken from './validateToken';
// import createTokenRecord from './createTokenRecord';
export default {
createToken,
addToken,
// validateToken,
// createTokenRecord,
};
|
require('dotenv').config();
const
bodyParser = require('body-parser'),
express = require('express'),
bcrypt = require('./lib/bCrypt.js'),
db = require('./db/db.js');
var app = express();
/** bodyParser.urlencoded(options)
* Parses the text as URL encoded data (which is how browsers tend to send form dat... |
const BasePage = require ('./base_page/basePage');
const Helper = require('../helpers/helper');
const logger = require('../../config/logger.config');
const EC = protractor.ExpectedConditions;
class NewDataEntryPage extends BasePage {
constructor () {
super();
this.helper = new Helper();
thi... |
import { cloudBusinessApiUrl } from "../../utilities/constants";
import { SET_SUPPLIES_LIST, CREATE_SUPPLY, UPDATE_SUPPLY } from "../actionTypes";
import { SET_ALERT, REMOVE_ALERT } from "../actionTypes";
/*************get supplies list************/
export const getSuppliesList = idToken => async dispatch => {
const... |
class Player{
constructor(){
this.index=null;
this.distance=0;
this.name=null;
this.rank=null;
}
//Updating the player count in other player's device
getPlayerCount(){
var playerCountRef=database.ref('playerCount')
playerCountRef.on("value",(data)=... |
import React from 'react';
import {
Title,
TextBlock,
InvasivePotential,
Resources,
Resource,
Summary,
SexualReproduction,
AsexualReproduction,
EcologicalNiche,
PopulationDensity,
EnvironmentImpact,
ManagementMethod,
ManagementApplication,
OriginalArea,
SecondaryArea,
Introduction,
Breeding,
CaseImage... |
"use strict";
var normalize = require('normalize-path');
module.exports = {
create: function (req, res) {
let titulo1 = req.param('titulo1'),
titulo2 = req.param('titulo2'),
titulo3 = req.param('titulo3'),
titulo4 = req.param('titulo4'),
titulo5 = req.param('titulo5'),
titulo6 = req.param('ti... |
QUnit.module( "modules with async hooks", hooks => {
hooks.before( async assert => { assert.step( "before" ); } );
hooks.beforeEach( async assert => { assert.step( "beforeEach" ); } );
hooks.afterEach( async assert => { assert.step( "afterEach" ); } );
hooks.after( assert => {
assert.verifySteps( [
"before",
... |
'use strict'
const JollofCommand = require('../util/JollofCommand');
const jollof = require('jollof');
const log = jollof.log;
const appPaths = require('../../appPaths')
class DataCommand extends JollofCommand {
/**
* @description this is the description of your script
* @method description
* @return {String}... |
var Modeler = require("../Modeler.js");
var className = 'Typedemographicsaccount';
var Typedemographicsaccount = function(json, parentObj) {
parentObj = parentObj || this;
// Class property definitions here:
Modeler.extend(className, {
sortcode: {
type: "string",
wsdlDefinition: {
minOcc... |
import React, { useEffect, useState } from 'react'
import PropTypes from 'prop-types'
import { getComicStories } from '../../../services/comics.service'
import StoryCard from '../../stories/story-card'
import Spinner from '../../spinner'
import NoContent from '../../no-content'
function ComicStories(props) {
const... |
global.api.File.board_add_file = function( doc ){
global.api.REQUIRES.MongoDB.MongoClient.connect(global.DB.CONFIG.driver_connect_url , function(err, db) {
global.CSJLog.log("Connected correctly to server");
//ToDo function 으로 분리하기;
var Long = require('mongodb').Long;
var d = new Date();
var r ... |
/************************************************************************** \
| Subitup Schedule View |
| Author: Robert Arango |
| Date: 10/17/2012 |
| File: GenerateSchedule.js |
| Info: This script reads all the shifts that are pulled from subitup |
| through Retr... |
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
template: './index.html',
filename: 'index.html',
inject: 'body'
});
module.exports = {
context: path.resolve(__dirname, 'client')... |
import styled from 'styled-components';
const Wrapper = styled.div`
display: flex;
min-height: 100vh;
flex-direction: column;
overflow: hidden;
position: relative;
background: #fffff3;
`;
const Layout = ({ children }) => {
return <Wrapper>{children}</Wrapper>;
};
export default Layout;
|
import React, { Component } from 'react';
import { FoldingCube } from 'better-react-spinkit'
class SpinnerComponent extends Component {
render() {
return (
<div className="spinner-container">
<FoldingCube size={100} color='#26B4FF'/>
</div>
);
}
}
export default SpinnerComponent; |
export const getPlayers = playerInfo => dispatch => {
const players = [];
playerInfo.find({ fileName: 'gameAnalysis' }, (err, docs) => {
docs.map(d => {
const player = {
title: d.TeamvsTeam,
_id: d._id
};
players.push(player);
});
players.sort((a,b) => (a.title > b.tit... |
// console.log('working?');
var favRecipe = {
title: 'Guacamole',
servings: 3,
ingredients: ['avacado','lemon','salt','onion']
};
//cmd-shift-L multiline shortcut
console.log(favRecipe.title);
console.log("Serves", + favRecipe.servings);
console.log("Ingredients: ");
for (var i = 0; i < favRecipe.ingr... |
import React, { useState } from 'react';
import { withStyles, ThemeProvider } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
import Grid from '@material-ui/core/Grid';
import AddFromExistingForm from 'components/AddFromExistingForm';
import ActionItemForm from 'components/ActionItemForm... |
import React from 'react'
import PropTypes from 'prop-types'
import { withStyles } from '@material-ui/core/styles'
class Toolbar extends React.PureComponent {
render() {
const {
classes,
children,
show
} = this.props
if (!show) {
return null
}
return (
<div classNa... |
import { renderString } from '../../src/index';
describe(`Return a random item from the sequence.`, () => {
it(`The example below is a standard blog loop that returns a single random post.`, () => {
const html = renderString(`{% set contents = ['cats'] %} {% for content in contents|random %}
<div class="po... |
import ProfProfileForm from './ProfProfileForm';
export default ProfProfileForm; |
/**
* Created by yishan on 17/4/9.
*/
/**
* 由于 支持 Object.defineProperty()的访问属性的方法 完全支持需要IE9以上 IE8不完全实现
* 所以一般创建访问器属性 使用下面的这种方法
* @type {{_name: string}}
*/
var person = {
_name:'lc'
};
person.__defineGetter__('name', function () {
return this._name;
});
person.__defineSetter__('name', function (val) {
... |
/**
* Created by xiaojiu on 2016/11/19.
*/
define(['../../../app','../../../services/platform/settle-accounts/examineBlaOutInService'], function (app) {
var app = angular.module('app');
app.controller('examineBlaOutInCtrl', ['$rootScope', '$scope', '$stateParams','$state', '$sce', '$filter', 'HOST', '$windo... |
let url = "https://jsonplaceholder.typicode.com/users/1";
const fetchPromise = fetch(url);
console.log(fetchPromise);
// fetchPromise
// .then(res => {
// console.log(res);
// });
// function callback1(res) {
// console.log(res);
// };
// fetchPromise
// .then(callback1);
fetchPromise
.then((res) =... |
import muster, {
applyTransforms,
arrayList,
count,
eq,
filter,
get,
head,
length,
location,
ref,
variable,
} from '@dws/muster-react';
import 'todomvc-app-css/index.css';
import loadItems from '../utils/load-items';
export default function createGraph() {
return muster({
itemCount: ref('it... |
/*
* fil: js.js
* purpose: introdction to jQuery
*/
console.log('file: js/js.js loaded');
// A $( document ).ready() block.
// ... codeing from here ...
/*
THE DOCUMENTATION MAY CONFUSE YOU A BIT, SO HERE'S A HOWTO
DON'T
please, don't use this sample:
https://samples.openweathermap.org/data/2.5/weath... |
const mongoose = require("mongoose");
let productoSchema = new mongoose.Schema({
idArticulo: String,
nombre: String,
descripcion: String,
precio: Number,
modelo: String
});
module.exports = mongoose.model("producto", productoSchema);
|
../../../../shared/src/generic/reducers.js |
// JavaScript - Node v8.1.3
Test.assertEquals(f(100), 5050);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.