text
stringlengths
7
3.69M
import mongoose from "mongoose"; const userSchema = mongoose.Schema( { name: { type: String, required: true, }, email: { type: String, required: [true, "Please add an email"], unique: true, match: [ /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/, "Plea...
const { ValidationError } = require('./ValidationError'); const ok = function ok(value, message) { if (!value) { throw new ValidationError(message); } return value; }; const notNull = function notNull(value, message) { if (value === null) { throw new ValidationError(message); } return value; }; m...
import React from 'react'; import '../styles/styles.css' import { BrowserRouter as Router, Switch, Route } from 'react-router-dom'; import { Link } from 'react-router-dom'; export default function Nav(props) { return ( <div> <nav className="nav"> <Link style={{ color: "black", t...
export default (meth, url)=>{ return new Promise((resolve, reject)=>{ let xhr = new XMLHttpRequest(); xhr.open(meth,url); xhr.addEventListener('load',()=>{ resolve(xhr.responseText); }); xhr.addEventListener('error',()=>{ reject(xhr.statusText); }) xhr.send(); }); }...
/* var years = [1990,1986, 1993,2007,1967]; function arrayCalc(arr,fn){ var arrRes =[]; for(var i =0; i<arr.length; i++){ arrRes.push(fn(arr[i])); } return arrRes; } function calculateAge(el){ return 2021-el; } function isFullAge(el){ return el >= 18; } function maxHeartRate(el){ re...
/* global describe, it */ require('simple-mocha'); var models = require('models'); var User = models.User; var authCtrl = require('controllers/auth'); var _ = require('lodash'); var assert = require('assert'); describe( 'Auth controller', function(){ describe('should register a new user', function( ){ var t...
// Assignment Code // Array of special characters to be included in password var specialCharacters = [ "@", "%", "+", "\\", "/", "'", "!", "#", "$", "^", "?", ":", ",", ")", "(", "}", "{", "]", "[", "~", "-", "_", ".", ]; // Array of numeric characters to be included in p...
import React, { useEffect, useState, useCallback } from 'react' import Link from 'next/link' // This is an Isomorphic link // The server-side rendered mark-up will include an `href` attribute const IsomorphicLink = props => { const [hasMounted, setHasMounted] = useState(false) // This is effectively `componentDid...
/** * images-task.js * ============== * Optimize images. * */ module.exports = (gulp, plugins, config) => { gulp.task('images', () => { const options = { imagemin: { progressive: true, interlaced: true } }; return gulp.src(config.globs.img.src) .pipe(plugins.ne...
P.views.workouts.priv.Program = P.views.workouts.priv.Abstract.extend({ onRender: function() { P.views.workouts.priv.Abstract.prototype.onRender.call(this); this.rProgram.show(new P.views.workouts.view.ProgramLink({ program: this.model.get('program_id') })); }, onDelete: function() { P.commo...
const FtpSrv = require('ftp-srv'); const fs = require('fs'); const ftpServer = new FtpSrv({ username: "111", password: "111", root: "./", port: 21, greeting: ["Hello ", "Looking of somthing ?",] }); ftpServer.on('login', (data, resolve, reject) => { if (data.password === '111') { if (!...
let assert = require('chai').assert let request = require('supertest-as-promised') let app = require('../../app') let db = require("../../app/models") let userName = "aaaaaa" let body = "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...
var HomePage = require ('../Pages/HomePage.page.js'); describe ('Home', ()=> { beforeEach(function(){ browser.waitForAngularEnabled(false); browser.get('https://www.ssa.gov/'); }); it('should have correct page title', ()=> { expect(browser.getTitle()).toEqual('The Uni...
import React from 'react'; import PropTypes from 'prop-types'; import Card from './Card'; import Slider from 'react-slick'; import sliderOptions from './sliderOptions'; import dataCleaner from '../helpers/dataCleaner'; const Favorites = ({ favoriteItems, userFavArray, userId, removeFavorite }) => { return ( <div...
let str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' export function generateHash(len = 16) { let result = '' for (let i = 0; i < len; i++) { let random = parseInt(Math.random() * 62) let letter = str.charAt(random) result += letter } return result }
const e = require("express"); const Especiali = require("../../Models/Especiales/Especialidades"); function guardarEsp(req, res) { console.log('Endpoint de guardar especiales ejecutado'); const newEsp = new Especiali(); const { codigo, nombre, ingrediente, precio, detalle, foto } = req.body; newEsp.cod...
var AUTH0_CLIENT_ID='YGfHgtkVCYNqK1mr2MiOlhjezWnHldzU'; var AUTH0_DOMAIN='amliuyong.auth0.com'; var AUTH0_CALLBACK_URL=location.href; var API_BASE_URL = "https://i56bou5pk9.execute-api.us-east-1.amazonaws.com/dev"; var global_config = { AUTH0_CLIENT_ID, AUTH0_DOMAIN, AUTH0_CALLBACK_URL, API_BASE_URL };
/* eslint-disable @typescript-eslint/no-var-requires */ const defaultTheme = require('tailwindcss/defaultTheme'); module.exports = { purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'], darkMode: false, // or 'media' or 'class' theme: { extend: { fontFamily: { sans: ['P...
// return 1 if string s is properly bracketed, 0 otherwise const brackets = s => { const left = {'(':')', '[':']', '{':'}'}; const right = {')':'(', ']':'[', '}':'{'}; const stack = []; const chars = s.split(''); for(let c of chars) { if(left[c]) stack.push(left[c]); if(right[c] && stack.pop() != c) ...
import React from 'react' import { View, StyleSheet , Text } from 'react-native' import AppColors from '../Colors/AppColors' import { widthPercentageToDP as wp, heightPercentageToDP as hp } from 'react-native-responsive-screen'; import Paddings from '../Enums/Paddings'; import Title from '../Components/Title' import Ti...
const Car = require('mongoose').model('Car') module.exports = { addCarView: (req, res) => { res.render('adminPanel/createCarView'); }, createCar: (req, res, next) => { let carData = req.body let objForCreation = { brand: carData.brand, model: carData.model, ...
var React = require('react'); exports.collect = function collect(node, predicate, options) { options = options || {}; var blackboxComponents = Boolean(options.blackboxComponents); var found = []; if (node === false || node == undefined || node === null) { return found; } if (predicate(node)) { fo...
var entry = require('./common/entry') var publicKey = require('./common/public-key') var strict = require('./strict') module.exports = strict({ type: 'object', properties: { type: {const: 'confirm'}, publicKey, entry } })
// Write your code in this file! function scuberGreetingForFeet(tripDistance) { if (tripDistance <= 400) { return 'This one is on me!';} else if (tripDistance > 2500) { return 'No can do.';} else if (tripDistance >2000) { return 'I will gladly take your thirty bucks.' ;} else { ...
var searchData= [ ['searchchar',['searchChar',['../shell_8c.html#adc513a5c9f6df8f1a54c83193a362499',1,'shell.c']]], ['sh_5fcd',['sh_cd',['../sh__command_8c.html#a9aa0f977496ed2eb3dcef2c34f088009',1,'sh_command.c']]], ['sh_5fcommand_2ec',['sh_command.c',['../sh__command_8c.html',1,'']]], ['sh_5fecho',['sh_echo',...
import React from 'react'; import ReactDOM from 'react-dom'; import Main from './pages/main'; import About from './pages/About'; import Where from './pages/Where'; import Contact from './pages/Contact'; import Home from './pages/Home'; import Portfolio from './pages/Portfolio'; import NavBar from './components/NavBar'...
import React from 'react'; export default class Item extends React.Component { static propTypes = { idx: React.PropTypes.number.isRequired, name: React.PropTypes.any.isRequired }; constructor() { super(); this.state = { checked: false }; } checkElement() { this.setState({ checked: !this.stat...
import React, { Component } from 'react' import styled from 'styled-components' import Layout from './Layout' import Icon from '../../assets/images/notice/construct.png' const Image = styled.img` width: 150px; height: 150px; ` class ComingSoon extends Component { render() { return ( <Layout t...
import { extendObservable } from "mobx"; class ListaData { constructor() { extendObservable(this, { tareas: [] }); this.agregarTarea = this.agregarTarea.bind(this); this.eliminarTarea = this.eliminarTarea.bind(this); } agregarTarea(tarea) { console.log(tarea); this.tareas.push(tarea); } ...
import AbstractView from "./AbstractView.js"; export default class extends AbstractView { constructor(params) { super(params); } async getHtml(isLoggedIn, role) { return ` <!--Navbar--> <nav class="navbar navbar-expand-md navbar-light"> <!-- Left / Navbar brand --> <div clas...
(function($) { /* Name: jq Placeholder For IE; Author:Kingwell Leng; Date:2015-09-25; Version:1.0; */ function log(msg, type) { var t = type || 'log'; try { console[t](msg); } catch (ev) {} } window.log = log; //存放绑定元素,用于重置显示状态; $.placeholder = { input: [], resetStatus: function() { var l...
$(document).ready(function() {var formatter = new CucumberHTML.DOMFormatter($('.cucumber-report'));formatter.uri("src/test/resources/agileProject.feature"); formatter.feature({ "name": "Agile project sign in", "description": "", "keyword": "Feature", "tags": [ { "name": "@AgileProject" } ] }); f...
function show(id) { document.getElementById('sky').setAttribute('src', '#' + id); }
import React from 'react' import { Container, Row} from 'react-bootstrap' import FullName from './profile/FullName' import Adress from './profile/Adress' import ProfilePhoto from './profile/ProfilePhoto' const Main = () => { return ( <Container> <Row className= "mt-3"> ...
const path = require("path"); const fs = require("fs"); const sass = require("sass"); function debounce(fn, wait) { let timer = 0; return () => { if (!!timer) clearTimeout(timer); timer = setTimeout(() => fn.apply(this, arguments), wait); }; } const input = path.join(__dirname, "src", "scss", "apollo.sc...
const Data={ products: [ { id: '1', name: "Nike Shirt", image: "https://static.nike.com/a/images/c_limit,w_592,f_auto/t_product_v1/152648de-6352-4aff-a8d5-b72ac8868200/sportswear-mens-t-shirt-MK2TR1.png", price: 10, brand: "Nike", ratin...
const Web3 = require('./web3/web3'); const EthereumTx = require('ethereumjs-tx') const keythereum = require('keythereum'); const readlineSync = require('readline-sync'); const os = require('os'); const path = require('path'); const fs = require('fs'); const autoBind = require('auto-bind'); const url = require('url'); c...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by an Apache-style license that can be // found in the LICENSE file. "use strict"; // FIXME(slightlyoff): Fetch the default policy from storage/preferences. // chrome.storage.sync.set({defaultPolicy: defaultPolicy...
import httpStatus from 'http-status'; import validation from 'express-validation'; import mongoose from 'mongoose'; import { ValidationError, APIError } from '../../helpers/errors'; export default (err, req, res, next) => { let message; if (err instanceof ValidationError) { return next(err.toAPIError()); }...
"use strict"; const express = require("express"); const checkAccountSession = require("../controllers/account/check-account-session"); const createAccount = require("../controllers/account/create-account-controller"); const login = require("../controllers/account/login-controller"); const activate = require("../contro...
import Vue from 'vue' import App from './App.vue' Vue.config.productionTip = false import './assets/iconfont/iconfont.css' import './assets/scss/style.scss'; import router from './router' import VueAwesomeSwiper from 'vue-awesome-swiper' import 'swiper/dist/css/swiper.css' Vue.use(VueAwesomeSwiper, /* { default glob...
// 异常!!! // 输出全局可用变量_dirname的值 console.log('文件的目录是:' + _dirname); console.log('文件的绝对路径是:' + _filename);
import React from "react"; import { Link, Router } from "react-router-dom"; import { createBrowserHistory } from "history"; import "./App.css"; const defaultHistory = createBrowserHistory(); function App({ history }) { console.log(window); return ( <Router history={history || defaultHistory}> <div cla...
var isPwValid = false; $(document).ready(function() { $("#form_signup").submit(function(){ alert("hello"); }); $("#input_re_pw").change(function() { if ($("#input_pw").val() == "") { isPwValid = false; return; } if ($("#input_pw").val() != $("#input_re_pw").val()...
export default class CurrencyUtil { /** * matchs a curancey code to a currancy symbol ex: usd->$ * @param {string} currency * @returns string */ static getSymbol = (currency) => { return currancy_symbols[currency.toLowerCase()] || '$' } /** * converts cents to dollars * @param {int} cent...
const Recipe = require('../models/recipe'); // const { deleteOne } = require('../models/user'); module.exports = { index, create, show, update, delete: deleteOne, userRecipes }; async function userRecipes(req, res) { console.log('text', req.params.id); const recipes = await Recipe.find...
require('dotenv').config(); const express = require('express'), session = require('express-session'), massive = require('massive'), bodyParser = require('body-parser'), auth = require('./authentication') prod = require('./productFunctions'), orders = require('./orders'); const { ...
var mongoose = require('mongoose') var orderItems = new mongoose.Schema({ orderCompany : { type: String, default: '' }, projectName : { type: String, default: '' }, items : [{ itemNumber : { type: String, default: '' }, standard : { type: String, default: '' }, cadNumber : { type: String, default...
//tabs.js import React from 'react'; import { View, Text, TouchableOpacity } from 'react-native'; import s from './style' const tw = (imanagerTab,tab)=>imanagerTab===tab?[s.bfwTap,s.bfw]:s.bfw const bf = (imanagerTab,tab)=>imanagerTab===tab?[s.bf,s.bfTap]:s.bf const Tabs = ({imanagerTab,switchImanagerTab}...
// Code Challenge #1 // If I give you a string of repeating characters, return a string each character following by the number of times it occurs. // Example: “aabbbc” => “a2b3c1” const defaultString = 'abccggddauuj' let reduceObj = defaultString.split('').reduce((acc, value)=>{ return { ...acc, [value]: acc...
const express = require('express'); const router = express.Router(); const path = require('path'); const async = require('async'); const category = require('../proxy/category'); const tool = require('../utility/tool'); router.get('/', (req, res, next) => { async.parallel([ // 获取配置 function (cb) { ...
import React from 'react'; import styled from 'styled-components'; import PropTypes from 'prop-types'; import EyeHideSVG from '../../svg/eye-hide.svg'; import EyeShowSVG from '../../svg/eye-show.svg'; const FilterMinMaxContainer = styled.section` width: 100%; display: grid; grid-template-columns: 20% 30% 20% 30%...
import React from 'react'; const DisplayBox = ({ selectedProduct }) => { return ( <div id="displayBox"> <img className="displayImg" src={selectedProduct.image} /> <div className="displayDetails"> <h4>{selectedProduct.name}&nbsp;<span>({selectedProduct.year})</span></h4> <div className...
import * as React from 'react'; import {NavigationContainer} from '@react-navigation/native'; import {createNativeStackNavigator} from '@react-navigation/native-stack'; import {AppBottomTab} from './src/navigation'; const Stack = createNativeStackNavigator(); export default function App() { return ( <Na...
const LocalStrategy = require("passport-local").Strategy; const uniqid = require('uniqid'); const db = require('../db'); const bcrypt = require('bcrypt'); const invalid = function(input) { if(input === null || input === undefined || input === '') { return true; } return false; } module.export...
 var orderItemMapping = { "Items": { key: function(item) { return ko.utils.unwrapObservable(item.Id); }, create: function(options) { return new ItemViewModel(options.data); } } }; ItemViewModel = function (data) { var self = this; ko.mapping.from...
var xmlHttp; var inc_Q_id_Answer; var Answer_chooz="O"; var answer_found_to_mark; var quest_details=""; var time_remain_alert = 0; function openloader(){ document.getElementById("error").innerHTML ='<img src="Server_Pictures_Print/images/loader.gif" class="img-responsive" alt="Uploading...."/>'; document.getElem...
'use strict'; angular.module('myApp.dashboard', ['ngRoute','ui.bootstrap','myApp.data-access','ui.filters']) .config(['$routeProvider', function($routeProvider) { $routeProvider.when('/dashboard', { templateUrl: 'dashboard/dashboard.html', controller: 'DashboardCtrl' }); }]) .controller('DashboardCtrl', fu...
import axios from 'axios' const VueAxios = { install: function(Vue){ if (this.installed) return; this.installed = true; Vue.axios = axios; Object.defineProperty(Vue.prototype, "$http",{ get() { return axios } }) }...
import { Alert } from "bootstrap"; import React, { Component } from "react" import { Link } from "react-router-dom"; export default class Login extends Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); this.handleFormSubmit = this.handleFormSubmit.bind(t...
import React from "react"; import ComingSoon from "./ComingSoon"; function Help() { return ( <> <ComingSoon /> </> ); } export default Help;
import configuration from "../../lib/configuration"; import profile from "../../lib/profile"; import chai from "chai"; import chaiAsPromise from "chai-as-promised"; import _ from "lodash"; chai.use(chaiAsPromise); const expect = chai.expect; const assert = chai.assert; describe("Profile", () => { it("getNightwatch...
$(document).ready(function(){ getLocation(); // Button swaps units between C and F when clicked $('#button').click(function(){ var currTemp = $('#temp').html(); var tempNum = parseInt(currTemp); var tempUnits; if (currTemp.indexOf("F") >= 0){ tempUnits = "C"; tempNum = Math.round(...
import React from 'react' import TodoListItem from './todo-list-item' const TodoList = ({ todos, trigger, deleteItem }) => { const items = todos.map(t => ( <TodoListItem {...t} deleteItem={() => deleteItem(t.key)} triggerImportant={() => trigger('important', t.key)} triggerDone={() => trigger('...
const Appacitive = require('appacitive'); const promise = Appacitive.initialize({ apikey: "MEk6aMTDtliwwwQvQgT7GXNS+Ak8P7FI6Q/pqYTpgVY=", env: "sandbox", appId: "168002687610258053" }); function contractUserObject(userData) { let user = {}; user.username = userData.username; user.password = use...
// export const test = 'http://127.0.0.1:8000'; export const test = 'http://192.168.193.128:8000'; // export const test = 'http://120.79.232.23:8000'; /** * 真正的请求 * @param url 请求地址 * @param options 请求参数 * @param method 请求方式 * @param header 头文件 */ function commonFetcdh(url, options, header='', method = 'GET') { ...
// var clarg = process.argv.slice(2); // console.log(clarg); // function revString(clarg) { // for (var i = 0; i < clarg.length; i++) { // var arg = clarg[i]; // for (var j = arg.length - 1; j >= 0; j--) { // var revString = ""; // revString += arg[i]; // } // } // return clarg; // } //...
/*global PIFRAMES */ // Initial draft by John Taylor, Rewritten by Cliff Shaffer, November 2020 $(document).ready(function() { "use strict"; var av_name = "NFAFS"; var av = new JSAV(av_name); var Frames = PIFRAMES.init(av_name); // Frame 1 av.umsg("Here we give a formal definition for Nondeterministic Fini...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* admin.js :+: :+: :+: ...
import React, { Component } from "react"; import { StyleSheet, Text, View, Dimensions, Image, ImageBackground} from 'react-native'; import { VictoryChart, VictoryLegend, VictoryAxis, VictoryBar, VictoryTheme } from "victory-native"; import wasteImg from '../../assets/triangle_small.png'; import moneyImg from '../../ass...
import React from 'react'; import {Link, Redirect} from 'react-router-dom'; import AccountService from '../services/AccountService.js'; import NavBar from './NavBar'; import HomePage from './HomePage'; class Account extends HomePage { constructor(props) { super(props); this.state = { i...
function verification(contrat) { var bool = false if(!contrat.civilite) { console.log("Veuillez saisir une civilité"); bool = true; } if(!contrat.nom) { console.log("Veuillez saisir un nom"); bool = true; } if (!contrat.prenom) { console.lo...
// INSTANTIATION var APP = require("/core"); var DB = require("/db"); var Utils = require("/utils"); var args = arguments[0] || {}; var familyListController = this; var user_token = Ti.App.Properties.getString("user_token",false); var action = DB.INSERT; var actual_page = 1; var total_paginado = 10; var descargand...
import React, { Component, Fragment } from 'react' import { connect } from 'react-redux' import Nav from '../Nav' import SearchBar from '../SearchBar' import Gifs from '../Gifs' import * as actionTypes from '../../actions' class Favorites extends Component { constructor(props) { super(props) this.state = {...
import React, { Component } from 'react'; import { connect } from 'react-redux'; import Button from 'components/Button'; import MeetingsListItem from './components/MeetingsListItem'; import './style.css'; import future from 'images/future.png'; import past from 'images/past.png'; class MeetingsList extends Component {...
var mailHelper = require('sendgrid').mail; var mailer = { content: new mailHelper.Content("text/plain", "Welcome to Chinmaya Vrindavan Events. \n " + "\n " + "Have a great day! \n " + "Chinmaya Vrindavan Events Team"), sendMail: function (fromMail, toMail, subject, customContent) { ...
import React from 'react' import Form from 'react-bootstrap/Form' import { Button, Container, Col, Row } from 'react-bootstrap' import { createGame, getAllPlayers } from '../../lib/api' import { useForm } from 'react-hook-form' import { useHistory } from 'react-router-dom' import { getPayLoad } from '../../lib/auth' f...
class Measurer { constructor(fontFamily) { const dom = document.createElement('canvas'); this.ctx = dom.getContext('2d'); this.fontFamily = fontFamily; this.cache = {}; } text(text, fontSize = 16) { const key = `${text}${fontSize}`; if (this.cache[key]) { return this.cache[key]; ...
// pages/total/total.js import * as echarts from '../../ec-canvas/echarts'; const app = getApp() let interval = null let interval1 = null function initChart(canvas, width, height, dpr) { const chart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr // new ...
import Vue from 'vue' import Router from 'vue-router' import welcome from '@/components/welcome' import choose from '@/components/choose' import choose2 from '@/components/choose2' Vue.use(Router) export default new Router({ routes: [ { path: '/', name: 'welcome', component: welcome }, ...
const User = require('../Model/UserModel') exports.bindwithUser =async(req,res,next)=>{ if (!req.session.isLoggIn) { return next() } try{ let user = await User.findById(req.session.user._id) req.user = user next() } catch(err){ next(err) } } exports.dashboardAthenticate =async(req,res...
'use strict'; /** * This module provides the proxy configuration for the dev server. */ module.exports = function (grunt) { var getProxyConfig = function () { var backend = grunt.option('backend') || 'local'; if (backend === 'local') { return [ { context: ['/rest'], host:...
import React, {Component} from 'react'; import {View,Text,StyleSheet,FlatList,TouchableHighlight,ActivityIndicator} from 'react-native'; import { connect } from 'react-redux'; import ContatoItem from '../components/ContatoList/ContatoItem'; import { getContactList ,createChat} from '../actions/ChatActions'; expo...
/* * * More info at https://github.com/JawaJava/Jakarta-Cute-Dropdown/blob/master/LICENSE * * Copyright (c) 2015, Jawa Java, Rudy Hermawan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Sof...
; 'use strict'; import '../styles/app.scss'; import frontReducer from './reducers/front-reducer'; import rightReducer from './reducers/right-reducer'; import topReducer from './reducers/top-reducer'; import leftReducer from './reducers/left-reducer'; import backReducer from './reducers/back-reducer'; import downReduc...
// Finish the solution so that it sorts the passed in array of numbers. If the function passes in an empty array or null/nil value then it should return an empty array. // For example: // solution([1, 2, 10, 50, 5]); // should return [1,2,5,10,50] // solution(null); // should return [] // function solution(nums){ ...
import React from "react" import { Provider } from "react-redux" // import createStore from "./src/store/createStore" import { createStore as reduxCreateStore, applyMiddleware, compose } from 'redux'; import thunk from 'redux-thunk' import reducer from './src/store/reducer' // import rootReducer from '.'; const wind...
import mongoose from 'mongoose'; const companySchema = new mongoose.Schema({ name: { type: String, trim: true }, description: { type: String, trim: true }, punchcard_lifetime: { type: Number, min: 0 } }); if (!companySchema.options.toJSON) { companySchema.options.toJSON = {}; } if (!companySchema.options.toObje...
const DATE = new Date(); const YEAR = DATE.getFullYear(); const MONTH = DATE.getMonth() + 1; const DAY = DATE.getDate(); const WEEKTABLE = { common: { cn: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'], cns: ['日', '一', '二', '三', '四', '五', '六'], en: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fr...
import React, { Component } from 'react' export default class Counter extends Component { increment = () => { const { select_number } = this.refs this.props.increment(select_number.value * 1) } decrement = () => { const { select_number } = this.refs this.props.decreme...
const { searchHotActivityList, searchProductId } = require('../Model/search'); const getHotActivity = (req, res) => { searchHotActivityList() .then((activityList) => { res.json(activityList); }) .catch((err) => { throw err; }); }; const getProductInfo = (req, res) => { searchProductId(...
var variables________________________________8________________8js________8js____8js__8js_8js = [ [ "variables________________8________8js____8js__8js_8js", "variables________________________________8________________8js________8js____8js__8js_8js.html#aa20e08551125f5d35a89f1acae12b279", null ] ];
import React, { Component } from 'react'; import ReactDOM from 'react-dom'; import InputBar from './components/input_bar'; import TaskList from './components/task_list'; //const App = () => <h1>Hello World</h1>; class App extends Component { constructor(props) { super(props); this.state = { task: [] ...
/** * performance.now cross-browser * @author Colin Mutter <colin.mutter@gmail.com> */ /** * Deps */ var bind = require('./bind'); /** * Determine nav start offset w/o global polyfill for unsupprted clients */ var nowOffset; if (typeof window.performance === 'undefined' || !window.performance.timing) { nowOf...
'use strict'; window.app = (function (angular) { var appVersion = 1; var app = angular.module('app', ['ngMaterial']); app.controller('mainController', ['$scope', function ($scope) { $scope.btnClick = function (e) { $scope.result = 'Clicked: ' + new Date().toLocaleString(); }; ...
var mostrarSite = true const site = 'www.augustoludovice.com' console.log('Hello Word!') console.log('Meu nome é Augusto!') console.log('E eu estou aprendendo Node.js com o Guia do programador') if(mostrarSite){ console.log(site) }
import inView from "in-view"; require('../menu'); inView.threshold(0.6); inView('.service') .on('enter', (el) => { document.body.setAttribute(`class`, el.getAttribute(`data-section`)); }) .on('exit', (el) => { // document.body.setAttribute(`class`, ``); });
var searchData= [ ['reorder_5fgraphs',['reorder_graphs',['../main_8cpp.html#a6ab5cc576d7a5d4a62cbac77ef88c364',1,'main.cpp']]], ['reorder_5fmatrix',['reorder_matrix',['../main_8cpp.html#a89793f8c7939fe2032afeb0295764fb6',1,'main.cpp']]] ];
import actionTypes from 'constants/action-types'; export default { open: () => ({ type: actionTypes.uploadModalState.OPEN }), close: () => ({ type: actionTypes.uploadModalState.CLOSE }) };
const fs = require('fs'); const http = require('http'); const PORT = process.env.PORT || 3050; const server = http.createServer(); // var movies = { success: null, movies: [] }; // var names = ['Interstaller', 'Anatolia', 'MUSTAFA KEMAL ATATURK']; // const success = 1; // movies.success = success; // names.forEac...