text stringlengths 7 3.69M |
|---|
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { showLoading, hideLoading } from 'modules/example/actions/loading';
// import { actionAjaxGetNewsList } from '../../actions/news.js';
import { BmuiConfirm } from 'components';
import 'components/bmui-confirm/bm... |
import React from "react";
import { NavLink } from "react-router-dom";
import Context from "../context";
import Config from "../config";
import { format } from "date-fns";
import "./Note.css";
import PropTypes from "prop-types";
function deleteNoteRequest(noteId, cb) {
fetch(`${Config.API_ENDPOINT}/api/notes/${noteI... |
// Ajax获取数据的工厂函数
window.Xhrfactory = function () {
this.xhr = null;
this.init();
};
window.Xhrfactory.prototype = {
// 初始化
init: function () {
this.create();
},
create: function () {
// 创建请求对象
if (window.XMLHttpRequest) {
this.xhr = new XMLHttpRequest();
... |
import update from 'immutability-helper'
import undoable, { excludeAction } from 'redux-undo';
import { createAction, handleActions } from 'redux-actions'
import { clockwise, combinePolygons } from '../utils/geometry'
export const initPolygons = createAction( 'INIT_POLYGONS' )
export const editPolygon = createAction... |
import React, { useState } from 'react';
const SearchBar = ({ onTermSubmit }) => {
const [ term, setTerm ] = useState('');
const onInputChange = (e) => {
return setTerm(e.target.value);
};
const onSubmit = (e) => {
e.preventDefault();
onTermSubmit(term);
};
return (
<div className="search-bar ui segmen... |
var eventsApp = angular.module('eventsApp', ['EventsModel', 'hmTouchevents']);
// Index: http://localhost/views/events/index.html
eventsApp.controller('IndexCtrl', function ($scope, EventsRestangular) {
// Helper function for opening new webviews
$scope.open = function(id) {
webView = new steroids.views.Web... |
// Exports //
import {returnRandomHexColor} from "./returnHexColor.js";
import {changeGuiColors, BUTTON_DARK_HOVER, BUTTON_LIGHT_HOVER} from "./darkAndLightMode.js";
import {button} from "./globals.js";
// Action on click //
button.addEventListener('click', changeOnClick);
function changeOnClick(){
const hexColor... |
const mongoose = require('mongoose');
const dotenv = require('dotenv');
//Connection to the database
dotenv.config()
mongoose.connect(process.env.DB_CONNECT,{
useNewUrlParser: true,
}).then(
console.log("Connection established")
).catch(
(e)=>console.log(e)
); |
'use strict';
/* Directives */
angular.module('resistor.directives', ['d3']);
|
function cb(data){
console.log(data)
}
function addScriptTag(src){
let lastscript=document.querySelector('.newscript');
if(lastscript){
document.body.removeChild(lastscript);
}
let script=document.createElement('script');
script.src=src;... |
module.exports = {
url : 'mongodb://localhost/RichApp-dev'
} |
import Vue from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store/index'
// import './registerServiceWorker'
import './plugins/iview.js'
import tqsdk from './plugins/tqsdk.js'
tqsdk.on('ready', function(){
store.commit('SET_TAGS_QOUTES_MAP', tqsdk.quotesInfo)
})
tqsdk.o... |
import {
getCategories,
getPosts,
getComments,
addToPosts,
getSinglePost,
addToComments,
getSingleComment
} from "../utils/ReadableAPI";
import generateUUID from '../utils/generateID';
export const GET_CATEGORIES = 'GET_CATEGORIES';
export const ADD_POST = "ADD_POST";
export const EDIT_POS... |
import { MM, MON } from "./actionTypes";
// export const enLang = lang => ({
// type: EN,
// payload: lang
// })
export const monLang = lang => ({
type: MON,
payload: lang
})
export const mmLang = lang => ({
type: MM,
payload: lang
}) |
define(['angular', 'jquery', 'rd.core', 'css!rd.styles.IconCss', 'css!rd.styles.IconFont',
'css!rd.styles.FontAwesome', 'css!rd.styles.Bootstrap'], function() {
var nInputApp = angular.module("rd.controls.Icon", ['rd.core']);
nInputApp.directive('rdkIcon', ['Utils', 'EventService', 'EventTypes', function(Utils, E... |
System.register(["./logRunningTime", "./lazy", "./throttle"], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
function exportStar_1(m) {
var exports = {};
for (var n in m) {
if (n !== "default") exports[n] = m[n];
}
ex... |
process.on('uncaughtException', function (err) {
console.info(err)
process.send({status: 'fatal', err: err})
process.exit()
})
const config = require('../config.json')
const requestStream = require('./request.js')
const FeedParser = require('feedparser')
const sqlConnect = require('./sql/connect.js')
const initA... |
import { makeStyles } from "@material-ui/core/styles";
export default makeStyles(theme => ({
paper: {
display: "flex",
flexDirection: "column",
alignItems: "center",
margin: theme.spacing(1),
marginTop: theme.spacing(20),
padding: 20,
background: "none",
border: "2px solid grey"
},
... |
/*
;============================================
; Title: week 6: Assignment 6.4
; Authors: Micah Connelly
; Date: 2020 January 19
; Description: Nested Object Literals
;===========================================
*/
/*
; Expected output:
; String of nested object literal
*/
// import
const header = require('../week... |
(function(){
'use strict';
function mailformController($scope, Upload, $timeout) {
$scope.uploadFiles = function(files) {
$scope.files = files;
angular.forEach(files, function(file) {
if (file && !file.$error) {
file.upload = Upload.upload({
url: 'url'... |
import React, {useState,useEffect} from 'react'
import HeadingWidget from "./heading-widget";
import ParagraphWidget from "./paragraph_widget";
import ListWidget from "./list-widget";
import ImageWidget from "./image-widget";
import {useParams} from "react-router-dom"
import EditableItem from "../editable-item";
import... |
require('dotenv').config()
var _ = require('underscore');
var providers = require('./providers');
module.exports = function(context) {
return {
whoIs: function(req, res) {
var name = formatName(req.params.name);
var userInfo = providers.slack(name);
var message = "User not found.";
if (us... |
/**
* Created by Iaroslav Zhbankov on 14.01.2017.
*/
var likes = document.querySelectorAll(".like");
likes.forEach(function (item, index) {
item.addEventListener("click", function () {
var url = '/like/' + $(this).attr("data-id");
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true)... |
/**
* Created by jiayi.hu on 7/24/17.
*/
import React, {Component, PropTypes} from 'react'
import $ from 'jquery'
const jobClass = [
{
id: 1,
imgSrc: './images/part1.png',
imgSrc_hover: './images/part1_hover.png',
department: '技术',
positions: [
{
... |
var eventsByCampaign = {} //global var to store events per campaign to be later used in marketing graph
var eventsPerCampaign = function(){ //api query to get numeric summary of events by campaign
// get jql script params for active users query
var avgEventsScript = $('#events-per-user-per-campaign-jql').html(... |
var PluginError = require('plugin-error')
, log = require('fancy-log')
, through = require('through2')
, aws = require('aws-sdk');
module.exports = function (options) {
options.wait = !!options.wait;
options.indexRootPath = !!options.indexRootPath;
var cloudfront = new aws.CloudFront();
if ('credential... |
var restify = require('restify');
var httpServer = restify.createServer();
var staticFiles = require('node-static');
var Photo = require('./PhotoController');
var conf = require('./config.js');
var fileServer = new staticFiles.Server(conf.directory);
httpServer.use(restify.bodyParser());
httpServer.get('/photo', Phot... |
//generuje kreatory akcji (dla generatora mapy dispatch) na podstawie deskryptorów
const generateActionCreators = (actionsDescriptors) => {
let actionCreators = {};
for (let key in actionsDescriptors) {
actionCreators[key] = payload => {
let action = { type: key };
if (Object.keys(actionsDescriptors[key]).len... |
// @flow
import {
createStore,
combineReducers,
compose,
applyMiddleware
} from 'redux'
import thunk from 'redux-thunk'
import domainReducer from '../../domain/redux/server/reducers'
import reducer from './reducers'
const reducers = combineReducers({
domain: domainReducer,
server: reducer
})
const middle... |
import request from '@/utils/request';
export function fetchList(query) {
return request({
url: '/survey',
method: 'get',
params: query,
});
}
export function getInformation(query) {
return request({
url: '/survey/get/information',
method: 'get',
params: query,
});
}
export function f... |
function processOrder(price, quantity, discount, serviceCharge, tax) {
if (!quantity) {
quantity = 1;
}
if (!discount) {
discount = 0;
}
if (!serviceCharge) {
serviceCharge = 0.1;
}
if (!tax) {
tax = 0.15;
}
return (price * quantity) * (1 - discount) * (1 + serviceCharge) * (1 + ta... |
'use strict';
/**
* Computes the point on a power basis curve.
*
* @param {Array|Number} a - the coefficients of the power basis (a<sub>0</sub> + a<sub>1</sub>u +...+ a<sub>n</sub>u<sup>n</sup>)
* @param {Number} u - the parameter value at which to evaluate the curve
*
* @returns {Number} - the function valu... |
'use strict';
angular.module('armchairApp')
.constant("baseURL","http://localhost:53475/")
.factory('furnitureFactory', ['$resource', 'baseURL', function($resource, baseURL) {
// var furns = [{suite1:[
// {
// name: 'Ekero',
// image: 'img/armchair1... |
/*This file shows how to return values using functions */
function add(n1, n2){
return n1 + n2;
}
//nothing will happen until we call the functions and log the results in the console.
/*
var a = add(2,2);
var b = add(a,2);
console.log(add(a,b));
*/ |
function parseStory(rawStory) {
const output = [];
const reg = /(\[\w+\]),?/g;
const individualWords = rawStory.split(' ');
for(let i=0; i< individualWords.length; i++){
let word = individualWords[i].split("[");
let onlyWord = word[0];
let objectOutput = {};
objectOutput.word = on... |
import React, { Component } from 'react';
import './DeleteQuestion.css';
class DeleteQuestion extends Component {
//_______________________
constructor() {
super();
this.state = {
data: [],
dlist: [],
}
this.handleRChange = this.handleRChange.bind(this);
this.handl... |
import React, { useState } from 'react';
import { Collapse, Button, CardBody, Card } from "reactstrap";
import "./Contacts.css"
const SoloContact = props => {
const [collapse, setCollapse] = useState(false);
const toggle = () => setCollapse(!collapse);
return (
<div>
{props.contactList.map( contac... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
function DateValidator() {
var date = new Date(document.getElementById("editPost:date").value);
if (date.toString() === "Inv... |
/**
* Dependencies.
*/
var CustomerGroupController = require('../../controllers/customerGroup');
module.exports = exports = function(server) {
console.log('Loading CustomerGroup routes');
exports.indexes(server);
exports.create(server);
exports.update(server);
exports.show(server);
exports.r... |
angular.module('chatApp')
.controller('LoginController',function($scope,$log,LogIn,AuthToken){
var onSuccess = function(data){
if(data.status == true){
$scope.msg = data.success;
AuthToken.setToken(data.token);
AuthToken.setName(data.username);
}else{
... |
export const ROLE = {
ADMIN: "admin",
TRAINER: "trainer",
PARTICIPANT: "participant"
};
export const ACTIONS = {
ADD_EMPLOYEE: 'ADD_EMPLOYEE',
ADD_TRAININGS: 'ADD_TRAININGS'
}; |
import React, { useState, useEffect } from 'react';
import './Cadastro.css';
export default function Cadastro() {
const [filmes, setfilmes] = useState([
{
id: 1,
nome: 'A Guerra do Amanhã',
imageUrl:
"https://br.web.img3.acsta.net/pictures/21/05/26/20/19/2966501.jpg",
... |
(function video (url) {
return $.h("video.postMediaVideo",
{ src: url, controls: "controls" })
})
|
const box = document.querySelector("#box")
const parameterInput = document.querySelector("#parameter-input")
const searchButton = document.querySelector("#search-button")
const responseBox = document.querySelector("#response-box")
const mainForm = document.querySelector("#main-form")
mainForm.addEventListener("s... |
import React from 'react';
import Anime from 'react-anime';
import styled from 'styled-components'
import cog from "../Images/cog.svg";
const Cog = styled.div`
content: ${({url}) => 'url(' + url + ');'}
height: 40vh;
margin: 30vh auto;
color: var(--dark-main)
`
export default function WaitingScreen() ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _set = require('babel-runtime/core-js/set');
var _set2 = _interopRequireDefault(_set);
exports.default = isTextStyleMarkCommandEnabled;
var _isNodeSelectionForNodeType = require('./isNodeSelectionForNodeType');
var _isNodeSelection... |
const express = require('express')
const cors = require('cors')
const app = express()
const actuatorRoute = require('./routes/actuatorRoute')
app.use(cors())
app.use('/actuator', actuatorRoute)
module.exports = app |
import express from 'express';
import {postOption, fetchJsonByNode} from '../../../common/common';
import {host} from '../../globalConfig';
let api = express.Router();
const service = 'tms-service';
// 获取UI标签
api.get('/config', async (req, res) => {
const module = await require('./config');
res.send({returnCode: ... |
'use strict';
if (!process.env.NODE_ENV) throw new Error('You must set the NODE_ENV environment variable');
require("@babel/polyfill");
const _ = require('underscore');
const createError = require('http-errors');
const uuidv4 = require('uuid/v4');
const testing = process.env.NODE_ENV === 'test';
const {
upload: ... |
var uploadElement = require('upload-element')
module.exports = function handleUploadTorrent(element, callback) {
uploadElement(element, function (err, files) {
return callback(err, files[0].file)
})
}
|
import React from "react"
// COMP
function ComponentC (props){
return(
<h1> {props.greeting1} </h1>
)
}
export default ComponentC |
import { requestLogin } from "@/api/api";
const state = {
jurisdiction: {},
};
const mutations = {
SAVE_JURISDICTION(state, payload) {
state.jurisdiction = payload;
},
};
const getters = {};
const actions = {
async getJurisdiction({ state, commit }, payload = {}) {
try {
const res = await reque... |
/*!
* SAP UI development toolkit for HTML5 (SAPUI5)
*
* (c) Copyright 2009-2014 SAP AG. All rights reserved
*/
jQuery.sap.declare("sap.viz.ui5.types.Datatransform");jQuery.sap.require("sap.viz.library");jQuery.sap.require("sap.viz.ui5.core.BaseStructuredType");sap.viz.ui5.core.BaseStructuredType.extend("sap.viz.ui... |
// Initialize Firebase
var config = {
apiKey: "AIzaSyCsAdORiADM5MKd6RFZnJOJzZwB0o6414w",
authDomain: "rpsgame-5c5dc.firebaseapp.com",
databaseURL: "https://rpsgame-5c5dc.firebaseio.com",
projectId: "rpsgame-5c5dc",
storageBucket: "",
messagingSenderId: "115703104064"
};
firebase.initializeA... |
var kontoutdragetApp = angular.module("kontoutdragetApp", []);
kontoutdragetApp.controller("CalculateController", ['$scope', function ($scope) {
}]);
|
var ladders = [
{ id: 1, height: 25 },
{ id: 2, height: 14 },
{ id: 3, height: 29 },
];
function findWhere(array, criteria) {
var prop = Object.keys(criteria);
return array.find(function(element) {
return element[prop] === criteria[prop]
});
}
var rightLadder = findWhere(ladders, {height: 25});
cons... |
import pieces from "./pieces/Piece";
import Player from "./pieces/Player";
const INIT_BONUS = 10000; //TODO: Figure out how much this should start at
const MS_PER_BONUS_POINT = 100; //10pts a second
export default class Game
{
board; //2D array containing all the pieces
playerPos; //current position... |
Ext.onReady(function () {
var BONUS_SATE = 0;
var PalletSuggest = Ext.create('Ext.form.Panel', {
id: 'PalletSuggest',
url: '/WareHouse/OutPalletSuggest',
bodyPadding: 30,
border:false,
width: 800,
items: [
{
html: '<div class="capion">... |
'use strict';
import { EventEmitter } from 'events';
import assign from 'object-assign';
import request from 'superagent';
import promise from 'bluebird';
import Parameters from '../utils/parameters';
var url = Parameters.url+'src/data/home.json';
var HomeStore = assign({}, EventEmitter.prototype, {
getData: fun... |
angular.module("komGikkApp")
.factory("properties", function ($http) {
return {
activitiesUrl: "/api/activities",
activityUrl: "/api/activity",
userUrl: "/api/user",
timeeventUrl: "/api/timeevent",
timeEventListUrl: "/api/timeevent/list",
... |
'use strict';
const Models = require('bookshelf-model-loader');
const NoticeLogging = Models.Base.extend({
tableName: 'noticeLogging',
hasTimestamps: ['timestamp'],
soft: false
});
module.exports = {
NoticeLogging: Models.Bookshelf.model('noticeLogging', NoticeLogging)
};
|
// config for ease of use of env variables
export const API = process.env.REACT_APP_API_URL;
|
import React from 'react';
import PropTypes from 'prop-types';
import styles from '../../styles/transaction.css';
import classnames from 'classnames';
const Transaction = (props) => {
return (
<div className={styles.outer}>
<div className={classnames(styles.ledger, styles.hash)}>{props.hash}</div>
<d... |
/**
* Created by xiaojiu on 2016/11/19.
*/
define(['../../../app','../../../services/platform/settle-accounts/profitorLossPayService'], function (app) {
var app = angular.module('app');
app.controller('profitorLossPayCtrl', ['$rootScope', '$scope', '$stateParams','$state', '$sce', '$filter', 'HOST', '$windo... |
function loadPercent() {
let xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
let responseBody = this.responseText;
let data = JSON.parse(responseBody);
let price = document.querySelectorAll(".price");
... |
var AreaView = Backbone.View.extend({
initialize: function (options) {
_.bindAll(this, "render", "addTaskList", "refreshTaskLists", "moveTask");
this.includeQuickLinks = options.includeQuickLinks;
this.model.get("taskLists").bind('add', this.addTaskList);
this.model.get("taskLists"... |
import React from "react";
import { Register } from "../../../components/auth/Register";
import { shallow } from "enzyme";
import toJson from "enzyme-to-json";
const mockRegisterfn = jest.fn();
const Props = {
errors: {}
};
let wrapper;
wrapper = shallow(<Register {...Props} registerUser={mockRegisterfn} />);
descr... |
module.exports = {
maxRequestBodySize: '64mb',
internalToken: process.env.INTERNAL_TOKEN,
webhookToken: process.env.WEBHOOK_TOKEN,
aesPassword: process.env.AES_PASSWORD,
};
|
import { resolve } from 'path';
import TsConfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
export default {
/**
* Function that mutates the original webpack config.
* Supports asynchronous changes when a promise is returned (or it's an async function).
*
* @param {object} config - original webpack ... |
$(function() {
$( '#now_date' ).html( new Date() );
var data_Coincheck = {};
var data_bitFlyer;
var data_Zaif;
var data_BtcBox;
var data_Quoinex;
var data_bitbank;
$.ajaxSetup({ async: false });
$.getJSON('https://coincheck.com/api/ticker', function(Coincheck) {
data_Coincheck = Coincheck;
$( ... |
const express = require('express');
const router = express.Router();
const db = require('../db/db');
const Gig = require('../models/Gig');
router.get('/', (req, res) =>
Gig.findAll()
.then((gigs) => {
console.log(gigs);
res.sendStatus(200);
})
.catch((err) => console.error(err.message))
);
module.export... |
var app = angular.module("IdeApp", []);
app.controller("IdeController", function($scope) {
$scope.hello = "Hello from IdeController";
}); |
const router = require('express').Router()
const Artist = require('../models').Artist
const Album = require('../models').Album
const Song = require('../models').Song
// list all songs
router.get('/', function (req, res) {
Song
.findAll({
attributes: ['id', 'title', 'duration'], include: [{
model: A... |
import Validator from '../validator'
function string() {
this.test = function test(value) {
return (
this.parent.test(value)
&& (
typeof value === 'string'
|| value instanceof String
)
)
}
return this
}
export default Validator.make(string)
|
/**
* Controller
*/
angular.module('ngApp.public').controller('OperationStaffConfirmShipment', function ($scope, $stateParams, toaster, ShipmentService, $translate) {
var setModalOptions = function () {
$translate(['FrayteError', 'CouldNotFindShipmentConfirmationDetail', 'CouldNotUpdateInformation']).t... |
#pragma strict
function StartGame(){
Application.LoadLevel("ExitScreen");
} |
var test = require('tape');
var redis = require('redis');
var Cachier = require('./');
test('Default MemStore Usage', function (t) {
var c = new Cachier();
c.get('a'
, function getUncached (key, cb) {
t.equal(key, 'a');
return cb(null, "some value for the key")
}
, function done(err, data) {
t.equals... |
/* Replay API */
import {call} from 'redux-saga/effects';
export default function (bundle) {
const replayApi = {};
bundle.defineValue('replayApi', replayApi);
/* For each event a number of handlers can be registered.
An event is replayed by calling (in registration order) the handlers
registered wit... |
import { registerNode, Group } from 'spritejs';
import { Transform } from 'ogl';
import Node3d from './node3d';
const _zOrder = Symbol('zOrder');
const _children = Symbol('children');
export default class Group3d extends Node3d {
constructor(attrs = {}) {
super(attrs);
this.setBody(new Transform());
th... |
var express = require('express'),
http = require('http');
var app = express();
app.use(function(req,res,next){
console.log('첫번째 미들웨어, 요청 처리함');
var userAgent = req.header('User-Agent'); // cli가 req할때 전달되는 헤더 값
var paramName = req.query.name; // 요청파라미터(쿼리스트링)중 name의 값을 확인
//cli에서 ge... |
import {SampleSaleAction,GetOneDataAction,GetTwoDataAction,ChangeIDAction} from "../../actions/ActionCreator"
export const mapStateToProps = (state)=>({
data:state
})
export const mapDispatchToProps = (dispatch)=>({
handleAsyncSampleSale(){
dispatch(SampleSaleAction())
},
handleGetOneData(){
... |
//MODELLI
//Modelli Ambiente
//Alberi
//prende due numeri integer random tra due valori inclusi
function getRandomIntInclusive(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}
//Tipologia albero 1
var loader = new THREE.JSO... |
function randInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min)) + min; //The maximum is exclusive and the minimum is inclusive
}
$.when( $.ready ).then(function() {
for (i=0; i<10; i++) {
var rot = "rotateX(" + randInt(50, 95).toString() + "deg)";
... |
const getHotServer = ({ confs, root }) => ({
host: "0.0.0.0",
allowedHosts: "all",
port: confs.hotPort ?? 8080,
liveReload: false,
hot: "only",
static: {
directory: root,
},
devMiddleware: {
publicPath: confs.assetsRoot || "",
writeToDisk: true,
},
});
export default getHotServer;
|
let partita1;
let partita2;
let partita3;
let partita4;
let partita5;
let audio1;
let audio2;
let audio3;
let audio4;
let audio5;
let a1 = false;
let a2 = false;
let a3 = false;
let a4 = false;
let a5 = false;
function setup() {
createCanvas(windowWidth, windowHeight);
imageMode(CENTER);
frameRate(30);
}
functi... |
import { DataTypes } from 'sequelize'; // Import the built-in data types
export default (sequelize, Sequelize) => {
const Result = sequelize.define('Result', {
resultId: {
type: DataTypes.UUID,
defaultValue: Sequelize.UUIDV1,
primaryKey: true,
allowNull: fal... |
import React from 'react';
import { withRouter } from 'react-router-dom';
// import './people-page.css';
import ErrorBoundary from '../error-boundary';
import { StarshipList } from '../sw-components';
const StarshipPage = ({ history }) => {
return (
<ErrorBoundary>
<StarshipList onItemSelecte... |
export default [
{
avatar: 'https://s.gravatar.com/avatar/b98917628cf7183cfe33752c78e52c78?s=120',
name: 'Diogenes Marcato Crespo',
login: '@dioh',
initials: 'DM',
email: 'diogenesmarcato@gmail.com'
}
]
|
// @flow
import * as React from 'react'
import { useSelector } from 'react-redux'
import styled from 'styled-components'
import { type Program, type ThemeType } from '../../types'
import Card from './card'
const Container: ThemeType = styled.div`
@media screen and (min-width: 700px) {
display: flex;
... |
import Board from '../board.js';
import Cell from '../cell.js';
const Directions = {
North: 0,
East: 1,
South: 2,
West: 3
};
class WilsonsAlgorithm {
static generate = (size, canvasSize, setHistory, setHistoryIndex, setCells) => {
let board = new Board(canvasSize, canvasSize, (size * 2) + 1, (size * 2) ... |
$(document).ready(function(e){
$('#start_date').datepicker({
inline: false,
altField : '#start_date_input',
altFormat : 'yy-mm-dd'
});
}); |
class Sprite extends THREE.Sprite {
constructor() {
var spriteMat = new THREE.SpriteMaterial();
super(spriteMat);
this.noSelect = true;
this.cv = document.createElement('canvas');
this.cv.width = 128;
this.cv.height = 128;
this.ctx = this.cv.getContext('2d');... |
import { Component } from 'react'
import { Container, Row, Carousel } from 'react-bootstrap'
import MenuPurchase from '../../../../services/menu.service'
import Spinner from './../../../shared/Spinner/Spinner'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faConciergeBell, faCarrot } from '@f... |
import React from 'react';
import {Step, Stepper, StepLabel} from 'material-ui/Stepper';
import RaisedButton from 'material-ui/RaisedButton';
import FlatButton from 'material-ui/FlatButton';
import ExpandTransition from 'material-ui/internal/ExpandTransition';
import TextField from 'material-ui/TextField';
import Selec... |
import React, { Component } from 'react';
class VerifyCode extends React.Component {
constructor(props) {
super(props);
this.state = {
verify: '',
verifyCode: this.props.verifyCode || []
}
}
componentDidMount() {
this.draw();
}
shouldComponentUpdate(){
return true;
}
onVerify(){
// this.props.... |
export const pizzaPrice = 30;
export const drinkPrice = 50;
export const partyPrice = 100;
export const foodPrice = 150; |
module.exports=function(request,response,next){
//以下几个响应头都极其重要
switch(request.headers.origin){
case "http://localhost:8080":
response.header("Access-Control-Allow-Origin","http://localhost:8080");
break;
case "http://localhost:8081":
response.header("Access-Control-Allow-Origin","http://localhost:8081");
... |
// Call the getAllProducts() function to display
// the products in the side modal
window.onload = getAllProducts();
window.onload = getAllImages()
// If the admin submits the
// product details to be updated, call the createProduct() function
document.getElementById('create_product').addEventListener('submit', createP... |
Nstagram.Models.Comment = Backbone.Model.extend({
initialize: function (options) {
this.urlRoot = '/api/comments/' + options["photo_id"];
}
});
|
;(function () {
$(document).ready( function() {
//start ready
$(window).scroll(function() {
if ($(this).width() > 1050) {
if ($(this).scrollTop() > 660 && $(this).scrollTop() < 1100) {
$('.main__about-us_inner:even').animate({left: '0'}, 500, 'easeOutBack');
$('.main__about-us_inner:odd').animate(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.