text
stringlengths
7
3.69M
export const postRequest = async (body) => { const response = await fetch('/message', { method: 'POST', body: JSON.stringify(body), headers: { "Content-type": "application/json; charset=UTF-8" } }); const responseJson = await response.json(); console.log(resp...
function solve(arr) { let count=0; for (let i = 0; i < arr.length-1; i++) { for (let j = 1; j < arr[i].length; j++) { let current=arr[i][j]; if (current==arr[i+1][j]) { count++; } else if (current==arr[i][j-1]) ...
import React from 'react'; import './header.css'; const Header = (props) => { return ( <header className="text-center py-4"> <div className="container"> <h1 className="mb-4 app-logo"><a href="/" className="text-light">Lista de Tareas</a></h1> {props.children} </div> </header> ); } export default ...
import React, { Component } from 'react' import styled from 'styled-components' import { H2 } from '../../mia-ui/text' import { Loading } from '../../mia-ui/loading' import StoryList from '../StoryList' import CreateStoryButton from '../CreateStoryButton' import PropTypes from 'prop-types' import { LinkStyled } from '....
import './Card.css'; import Box from "./Box"; import formatNumber from "./util"; import numeral from "numeral"; function Card({countryInfo}) { return ( <div className="container"> <Box title="Coronavirus Cases" cases={formatNumber(countryInfo.todayCases)} total={numeral(countryInfo.cas...
define(['frame', 'editor'], function (ngApp, editorProxy) { 'use strict' /** * */ ngApp.provider.controller('ctrlPage', [ '$scope', '$location', 'srvEnrollApp', 'srvEnrollPage', function ($scope, $location, srvEnrollApp, srvAppPage) { var _oApp window.onbeforeunload = functio...
import * as THREE from 'three'; //export default canvas => { class SceneManager { constructor(canvas) { this.canvas = canvas; this.screenDimensions = { width: canvas.width, height: canvas.height } this.scene = this.buildScene(); this.renderer =...
const express = require('express'); const RateLimit = require('express-rate-limit'); const authentication = require('../authentication'); const authRouter = new express.Router(); const db = require('../database'); authRouter.post('/register', authentication.register); authRouter.post('/login', authentication.login); ...
import React from 'react' import PropTypes from 'prop-types' // Components import { reduxForm, Field } from 'redux-form' import {CheckboxList, SearchableSelect, Input, FieldWrapper} from '../../components/forms' import {createTranslate} from '../../../locales/translate' import {Form} from '../../components/controls/Se...
function parseGenericResponseError(res) { if (parseInt(res.status) >= 400) { return 'Connection failed with code ' + res.status; } if (res.readyState === 0 || res.statusText.toLowerCase() == 'error') { return 'Connection failed with unspecified error'; } return String(res); } export...
import React from 'react'; import PropTypes from 'prop-types'; import styles from './Memeviewer.module.css'; import {BASE_IMG_URL} from '../../config/config'; const Memeviewer = (props) => ( <svg className={styles.Memeviewer} data-testid="Memeviewer" viewBox={'0 0 '+ (props.meme.image?`${props.meme.image.w} ${props....
import React from 'react'; {/* import {withRouter, Link} from 'react-router-dom';*/} class Navi extends React.Component{ constuctor() { this.onLogIn = this.onLogIn.bind(this); } onLogIn = () =>{ alert('Login Here'); let path = '/CreateAccount'; t...
import passport from 'passport'; import { signin, signup, verifiEmail, resendVerification } from './controllers/authController'; import { resetPassword, verifyResetPassword, resetPasswordNew } from './controllers/resetPasswordController'; import { fetchUsers } from './controllers/usersController'; import { categoriesCo...
//vimrioゲームのJavaScript var width=800; var height; var offsetleft=0; var offsetright=0; var cvsw,cvsh; var stagenum=0; var game=null; var errorcnt=0; var stageIndex=0; var initialize=false; var keymap=[]; var keymapindex=0; var initchars=["$","^"]; var prekey=""; $(function() { if(localStorage) { var mapst = local...
import { createStore, applyMiddleware, compose } from 'redux'; import createSagaMiddleware from 'redux-saga'; import createReducer from './reducers'; import productSaga from '../src/containers/ProductDashboard/sagas'; export default function configureStore() { const initialState = {}; const sagaMiddleware = cre...
class App { constructor() { } createDOM() { this.listen() const main = this.createEl('main', 'body') this.createEl('div', main, { 'class': 'form' }) this.createEl('div', main, { 'class': 'contacts' }) this.createEl('div', main, { 'class': 'contact' }) this.router = new Router() } ...
class MonthValidator { constructor() { } validate(value) { return { isValid: /^((?!MISSING)[\s\S])*$/.test(value), message: 'Must consist of literals (december|dec). Bibtex-normalizer default: MISSING' }; } } export default (new MonthValidator());
import $ from "jquery"; import 'bootstrap/dist/css/bootstrap.min.css'; import "./mystyle2.scss"; import "./carousel.js";
export const url = 'mongodb+srv://dbUser:newpassword321@cluster0.9buvk.mongodb.net/notesdb';
import gql from 'graphql-tag' import objFragment from './obj' import groupFragment from './group' import imageFragment from './image' import mediaFragment from './media' import contentFragment from './content' const fragment = gql` fragment StoryFragment on story { id title slug description templ...
/* * val4 is an array of 3 numbers that range from [0,1000] * size is the number of pixels for width and height * use p5.js to draw a round grawscale glpyh within the bounding box */ function gray_glyph(values, size) { //determine the center of the circle var center = size/2; //draw a black background for th...
/* * ybm * https://github.com/qiu8310/ybm * * Copyright (c) 2015 Zhonglei Qiu * Licensed under the MIT license. */ var ybm = require('../'); ybm( { name: 'single-async', maxTime: 1, // 如果是异步,参数必须是 done; // 另外你可以用 benchmark.js 默认的 defer 属性,参考这里的第二个 Example:http://benchmarkjs.com/docs#Benchmark...
(function () { angular .module('driverCheck') .controller('loginCtrl', loginCtrl); loginCtrl.$inject = ['$location','authentication']; function loginCtrl($location, authentication) { var vm = this; vm.pageHeader = { title: 'Sign in' }; if(authentication.isLoggedIn()) $location.pat...
function setup() { createCanvas(400, 400); } function draw() { background(220); for (var x = 25; x <= 375 ; x= x+50){ for ( var y = 25; y <=375 ; y=y+50){ ellipse(x,y,50,50); } } }
/** * Created by Administrator on 2017/1/1 0001. */ // 对象写法 var module1 = new Object({ _count : 0, m1 : function () { console.log('module1.m1'); }, m2 : function () { console.log('module1.m2'); }, m3 : function () { console.log('module1.m3'); } });
import React from 'react'; import './index.scss'; import { Link, NavLink } from 'react-router-dom'; import { AiOutlineHome, AiOutlineCalendar, AiOutlineTag, AiOutlineBell, AiOutlineDown } from 'react-icons/ai'; import { FiSearch } from 'react-icons/fi'; import * as Routes from '../../assets/js/Routes'; import Logo...
'use babel' const fs = require('fs'); const stackedArea = require('stacked-area'); const moment = require('moment'); const NOW = '2018-09-11 12:00'; const NUMBER_OF_TEST_IMAGES = 12; let actuals = []; let expected = []; let settings; function makeTestSettings() { settings = {}; let now = moment(NOW); set...
'use strict'; const _ = require('lodash'); const dcp = require('dcp'); const Benchmark = require('benchmark'); function resolveFunc(obj) { return _.transform(obj, (result, funcStr, key) => { result[key] = new Function(`return ${funcStr}`)(); }); } class Executor { constructor(info, res) { this._async ...
let search_outer = new Vue({ el: '#search-outer', data: { inputWord: '', //保存的是临时的搜索关键字,主要是为了上下键能回到原来关键字 tempWord: '', //设置搜索框的宽度 width: 300, left: (document.documentElement.clientWidth - 300) / 2, top: 120 }, watch: { width: function () { ...
$.extend({ websocket:function(type,callback) { var socket; if (!window.WebSocket) { window.WebSocket = window.MozWebSocket; } var domain = document.domain; if (window.WebSocket) { // ws://"+domain+":9090/ws?type=event// 智能检测 // ws://"+domain+":9090/ws?type=traffic_warning// 路况预警 // ws://"+doma...
import R from '../R/R' import { render } from './render' const RD = { render } // class Demo extends R.Component { // constructor() { // this.state = { // name: "zzx" // } // } // setState() { // } // render() { // return ( // <div> // </div> // ) // } // } const el...
(() => { const app = Stimulus.Application.start(); app.register("greeter", class extends Stimulus.Controller { static get targets() { return ['input', 'output']; } connect() { } greet(e) { e.preventDefault(); let value = ...
const test = require('tape'); const flatten = require('./flatten.js'); test('Testing flatten', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof flatten === 'function', 'flatten is a Function'); t.deepEqual(flatten([1, [2], 3, 4])...
import React, { Component } from "react"; import AddCustomer from "./Component/AddCustomer" import AddProduct from "./Component/AddProduct"; import AddSale from "./Component/AddSale"; import { Route, BrowserRouter as Router } from "react-router-dom"; import Customer from "./Component/Customer"; import Product from "./C...
import React from 'react'; import {Grid, Typography, Fade } from '@material-ui/core'; import '../index.css'; export default class App extends React.Component { render(){ return( <Grid className="Screen_Challenger" container spacing={0} direction="column" alignItems="center" ...
import axios from 'axios' const baseURL = process.env.CONVERSION_URL || 'http://localhost:3001' export async function getRoman(num) { const url = 'toRoman' const result = await axios.get(`${url}/${num}`, { baseURL }) return result.data } export async function getArabic(str) { const url = 'toArabic' c...
/* * * scaleManagementApi.js * * Copyright (c) 2016 HEB * All rights reserved. * * This software is the confidential and proprietary information * of HEB. * */ 'use strict'; /** * Constructs the API to call the backend for scale management api. */ (function () { angular.module('productMaintenanceUiApp')...
import axios from 'axios'; const nums = '0123456789'; export default { metodoPost: (valores, matricula, texto, data) => { axios({ method: 'post', url: "https://backend-icc.herokuapp.com/salvaValores", //"https://backend-icc.herokuapp.com/salvaValores" "http://localhost:9000/salvaValores" head...
import ava from 'ava' import permutations from '../src/index.js' const components = { Button: ` import React from 'react' const Button = ({ big, color, outline, title, padding, config, children, ...props }) => { const style = { display: 'inline-block', padding: padding, borde...
'use strict' const btoa = require('btoa') const uuidv4 = require('uuid/v4') const authorizer = require('./helpers/authorizer') const createHelper = require('./helpers/create') const getHelper = require('./helpers/get') const updateHelper = require('./helpers/update') const deleteHelper = require('./helpers/delete') con...
import Head from 'next/head' import Image from 'next/image' import Layout from '../components/Layout' export default function Home() { return ( <div> <nav className="py-10" > <div className="absolute inset-y-0 right-0 h-[600px]" > <Image src="/cok.png" quality={100} ...
// conecting fun.js file var fun = require('./fun.js'); // using inquirer var inquirer = require("inquirer"); // using inquirer(user input) inquirer.prompt({ type: 'rawlist', name: 'input', message: 'select your choice', choices: ["buy product","see the list of product"] }) //then function .then(functi...
// define window size var width = window.innerWidth, height = window.innerHeight; // creating an svg element var svg = d3.select("body") .append("svg") .attr("width", width) .attr("height", height); // create two svg group elements, one for the base map //and one for the earthquake points var group = ...
import React, { PureComponent } from 'react'; import { DataProvider, Series, Collection, LineChart } from '@cognite/griff-react'; /* Since NOAA Api has no timestamps on their objects we generate some based on their idx */ const generateDataPoints = ({ timeDomain, }, telemetry) => { const data...
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; /* class Square extends React.Component { render() { return ( <button className="square" onClick={() => this.props.onClick()} > {this.props.value} </button> ); ...
import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import { margin, compose } from 'styled-system'; import { createPropTypes } from '@styled-system/prop-types'; import { getRectFor, lerp } from '../../helpers/geometry'; import { noop, isNotTouchEvent } from '../../hel...
var game={ RN:4, CN:4, data:null, score:0, state:0, RUNNING:1, GAMEOVER:0, getGrids:function(){ for(var r=0,arr=[];r<this.RN;r++){ for(var c=0;c<this.CN;c++){ arr.push(""+r+c); } } return '<div id="g'+arr.join('" class="grid"></div><div id="g') +'" class="grid"></div>'; }, getCells:function...
const express = require('express') const routes = express.Router() const { getAllDrinks, getDrink, getDrinksBySupplier } = require('../actions/drinks') routes.get('/drinks', (req, res) => { return getAllDrinks() .then((drinks) => { res.send(drinks) }) .catch(console.error) }) routes.get('/drinks/...
import React from "react"; import "./CenterLine.css"; const CenterLine = props => <div className="box col-8">{props.children}</div>; export default CenterLine;
app.config(function ($stateProvider) { $stateProvider.state('home', { url: '/', templateUrl: 'js/home/home.html', controller: 'HomeController' }); }); app.controller('HomeController', function ($rootScope, $scope, $state, AuthService, AUTH_EVENTS, ToneFactory, keyConfigFactory, SexyBack...
import styled from 'styled-components' import logoChrome from '../../../images/logo-chrome.svg'; import logoFirefox from '../../../images/logo-firefox.svg'; import logoOpera from '../../../images/logo-opera.svg'; import Card from './Card/Card'; const cards = [ { id: 1, browser: 'Chrome', lo...
var searchData= [ ['call',['call',['../struct_s_k_e_l___fxns.html#ab2dcf212fdf13134020ff2fd607a5dc2',1,'SKEL_Fxns']]], ['cmd',['cmd',['../struct_v_i_s_a___msg_header.html#a6c989b8f8016b9a1d2a90fc8fc9529f9',1,'VISA_MsgHeader']]], ['codecclassconfig',['codecClassConfig',['../struct_engine___alg_desc.html#aab8259319...
"use strict"; const moment = require("moment"); const express = require('express'); const app = express(); const port = 3000; const person = require('./controllers/person.js'); app.set('view engine', 'ejs'); (async () => { await person.table(); })() app.use((req, res, next) => { moment.locale('pt-br') res....
'use strict'; const webpack = require("webpack"); const webpackConfig = require('./webpack.config.js'); const webpackStats = require('./webpack.stats.js'); async function pack() { console.log(`Packing ...`); // initialize the compiler: let compiler; try { compiler = webpack(webpackConfig); } catch (...
var express = require("express"), app = express(), path = require('path'), ejs = require('ejs'), request = require('request'), config = require('./config/config'); var options = { url: 'https://www.blueapron.com/api/users/orders/upcoming?include_wine=false', headers: config.api }; app.set('vie...
var users = require('../controllers/user.server.controller'); var authorization = require('../controllers/authorization.server.controller'); module.exports = function(app) { // Create a new user app.post('/api/users', users.create); // Authenticate a user app.post('/api/users/authenticate', users.authenticate); ...
function displayAccount() { document.getElementById("changeableText").innerHTML = "Account Settings"; } function displayPrivacy() { document.getElementById("changeableText").innerHTML = "Privacy Settings"; } function displayLanguage() { document.getElementById("changeableText").innerHTML = "Language...
function myRemoveWithoutCopy(arr, item) { for (let i = 0, len = arr.length; i < len; i += 1) { if (arr[i] === item) { arr.splice(i, 1); i -= 1; len -= 1; } } return arr; } const list = [1, 2, 3, 4] const expected = myRemoveWithoutCopy(list, 3) test('Has...
var apiEndpoint = 'https://jsonplaceholder.typicode.com/todos/1' var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { var responseObject = JSON.parse(this.responseText); console.log("Response from jsonplaceholder API"); ...
const { Roles } = require('../../../data/models'); module.exports = (req, res, next) => { const { roleId } = req.body; console.log(roleId) Roles .findBy({ 'roles.id': roleId }) .then(role => { console.log(role) if (role.length) { next(); } else { res.status(404).json({ m...
import Ember from 'ember'; import RevealPresentation from 'ember-reveal-js/controllers/reveal-presentation'; const { set } = Ember; export default RevealPresentation.extend({ presentation() { let viewRegistry = this.container.lookup('-view-registry:main'); // for < 1.12.0 support if (!viewRegistry) { ...
import React from 'react'; import useWindowEvent from './useWindowEvent'; import { getRectFor } from '../helpers/geometry'; import { getWindow } from '../helpers/window'; /** * Reusable hook that returns true when element is scrolled into view * * @param {Boolean} once // defaults to true. If set to false the inVie...
import React, { useContext } from 'react'; import LoginPage from './login'; import AuthContext from '../store/auth-context'; import HomePage from './home'; const Home = () => { const authCtx = useContext(AuthContext); return <>{authCtx.isLoggedIn ? <HomePage /> : <LoginPage />}</>; }; export default Home;
function genSiteURL(path) { return ROOT_URL + path; } function genMediaURL(path) { return ROOT_URL + path; } function genStaticURL(path) { return S3_URL + path; } const URLService = { genSiteURL, genMediaURL, genStaticURL }; export default URLService;
module.exports = input => { let grid = []; let gates = new Map(); let portals = new Map(); input.split('\r\n').forEach((row, y) => { grid[y] = row.split(''); }); const letter = (x, y) => grid[y] && grid[y][x] && grid[y][x].match('[A-Z]'); const get = (x, y) => grid[y] && grid[y][x] ? grid[y][x] : ' ...
import React, { Component } from 'react'; import '../stylesheets/project.css'; import PropTypes from 'prop-types'; export default class Project extends Component{ static propTypes = { title: PropTypes.string.isRequired, img: PropTypes.string.isRequired, alt: PropTypes.string.isRequired, src: PropTy...
import React,{useContext} from 'react' import {dataApi } from '../contexApi/dataContex' export const Alert = () => { const { alerts } = useContext( dataApi ) console.log(alerts) return ( alerts !== null && alerts.length > 0 && alerts.map(alert => <div key={alert.id} className={`alert...
$(function () { (function () { var ulobj = $(".show-list-con ul"); var picimg = $(".introShow .show-pic img"); var objimg = $(".introShow .show-shadow img"); ulobj.on("mouseenter", "li", function () { var imgsrc = $(this).children("img").attr("src"); $(this).a...
$(document).ready(function() { $('input[name=TYP]').focus(); //$('#myModal').on('shown.bs.modal', function () { //$('#iframePracownicy').focus(); //}); }); function valid($name,$validType) { $value=$('input[name='+$name+']').val(); $params='val='+$value+'&validType='+$validType; $('input[name='+$name+']').l...
import { takeEvery, takeLatest, delay } from 'redux-saga' import { call, put, select } from 'redux-saga/effects' import { loginWithPasswordFail, logoutFail, loginWithPasswordSuccess, logoutSuccess, setToken } from '@actions/login' import { LOGIN_WITH_PASSWORD_REQUEST, LOGOUT_REQUEST, WRITE_TOKEN_TO_STORAGE, R...
import React, {Component} from 'react'; class FoodDetail extends Component { render(){ console.log(this.props.item.image); return( <div className="detailsContainer"> <div className="imageContainer"> <img src={this.props.item.image} alt="Food...
var compmbox_2compress_8c = [ [ "mutt_comp_init", "compmbox_2compress_8c.html#a8440ad71a5e3d43cd2c836c777bccded", null ], [ "lock_realpath", "compmbox_2compress_8c.html#a8c82fa05ac9a30a1cd0e5c5b472ae066", null ], [ "unlock_realpath", "compmbox_2compress_8c.html#aa35e239a0ed2772ae5824c317276f83a", null ], ...
const req = require('./req'); const ipad = require('./ipad'); const usd = require('./usd'); const year = require('./year'); module.exports = { req, ipad, usd, year };
exports.seed = function(knex, Promise) { // Deletes ALL existing entries return knex('users').del() .then(function () { // Inserts seed entries return knex('users').insert([ {firstname: 'user', lastname: 'one', email:'one.user@email.com', password: 'user1'}, {firstname: 'user', last...
import React from 'react' import PropTypes from 'prop-types' import Todo from './Todo.js' const TodoLists = ({ todoList = [], onTodoClick }) => ( <ul> { todoList.map(d => ( <Todo key={d.id} text={d.text} completed={d.completed} onClick={ () =>...
import _ from 'lodash'; import AccessibilityModule from '@curriculumassociates/createjs-accessibility'; import Article from './Article'; import Button from './Button'; import ComboBox from './ComboBox'; import Img from './Img'; import ListBox from './ListBox'; import Link from './Link'; import ListItem from './ListItem...
const Home = () => { return <p className="homePage">Home page design starts here</p>; }; export default Home;
exports = module.exports = function(io) { io.sockets.on('connection', function (socket) { socket.on('chat message', function (msg, user) { console.log("Chatted"); io.emit('chat message', user + ": " + msg); var dt = new Date(); var txt = "\r\n" + user + ": " + m...
export default { OPENPOP: 'OPENPOP', CLOSEPOP: 'CLOSEPOP', INPUTVALUE: 'INPUTVALUE', CLICKOK: 'CLICKOK', SELECTVALUE: 'SELECTVALUE', ADDMONTH: 'ADDMONTH', SUBMONTH: 'SUBMONTH', ADDYEAR: 'ADDYEAR', SUBYEAR: 'SUBYEAR', }
import React, { Component } from 'react'; import { StyleSheet } from 'react-native'; import { Button, Icon, Text } from 'native-base'; const BackButton = ({ goBackFn, text }) => ( <Button onPress={goBackFn} title="backButton" transparent> <Icon name="arrow-back" style={[styles.backIcon, !!text && sty...
class Quiz { constructor(){ this.restartButton = createButton('Restart'); } diaplay(){ } getState(){ var gameStateRef = database.ref('gameState'); gameStateRef.on("value",function(data){ gameState = data.val(); }) } update(state){ database.ref('/').update({ gameStat...
const passport = require('passport'); const LocalStrategy = require('passport-local').Strategy; const GoogleStrategy = require('passport-google-oauth20').Strategy; const User = require('../models/User'); const bcrypt = require('bcrypt'); passport.use(new LocalStrategy({ usernameField: 'email',...
const express = require('express'); const router = express.Router(); const adminController = require('../controllers/adminController'); router.get('/formulario', adminController.admin); /*agregar ruta por post */ module.exports = router;
//guardara la autentication en el local storage //pero no sera visible localStorageService es de angular-local-storage.js (function () { 'use strict'; angular.module('app') .factory('authenticationService', authenticationService); authenticationService.$inject = ['$http', '$state', 'localStorageSer...
function splitKakaoTextIntoMessage(data) { const re = /\[[^\n\[\]]*\]\s\[오[전|후]\s\d:\d{2}\]/g; const messages = [...data.matchAll(re)]; const idxes = []; messages.forEach((message) => { idxes.push(message.index); }); idxes.push(data.length); messages.splice(0, messages.length); for (var i = 0; i < i...
var _viewer = this; var height = jQuery(window).height() - 50; var width = jQuery(window).width() - 200; //取消行点击事件 $(".rhGrid").find("tr").unbind("dblclick"); //每一行添加编辑和删除 $("#TS_BM_GROUP_DEPT .rhGrid").find("tr").each(function (index, item) { if (index != 0) { var dataId = item.id; $(item).find("...
import React from 'react'; import { connect } from 'react-redux'; import { Field, reduxForm, change } from 'redux-form'; import { MdSettings, MdDateRange } from 'react-icons/lib/md'; import { addSettingMember } from '../../../actions/member.actions'; import { getMemberSelected } from '../../../reducers/member.reducers'...
import { shallowMount } from "@vue/test-utils"; import Post from "./Post.vue"; describe("PostPage", () => { test("has the proper name", () => { const wrapper = shallowMount(Post, { stubs: ["router-link"], mocks: { $store: { state: { posts: [{ title: "foo", body: "bar" }...
var a1a1 = .15; var a2a2 = .35; var a1a2 = 1 - (a1a1 + a2a2); var p = a1a1 + (a1a2 / 2); var q = 1 - p; function create_next_generation() { a1a1 = p * p; a2a2 = q * q; a1a2 = 2 * p * q; } function rnd(number, decimals) { var shifter = Math.pow(10, decimals || 2); return Math.round(number * shifte...
import './pattern-control.less'; import template from './pattern-control.html'; import controller from './pattern-control.controller'; export default { bindings: {}, template, controller }
define(function (require, exports, module) { var Class, mask, closeTpl, titleTpl; mask = require('modules/widget/dialog/mask'); closeTpl = '<a href="javascript:void(0);" class="ico_close J_close">关闭</a>'; titleTpl = '<h3 class="dialog_title J_title">{title}</h3>'; /** * Example : * require(['dialog'], f...
import React from 'react'; import './footer.css'; import { FaLinkedin } from 'react-icons/fa' import { CgMail } from 'react-icons/cg' import { GiPhone } from 'react-icons/gi' import { IoLogoWhatsapp } from 'react-icons/io' import { FaInstagram } from 'react-icons/fa'; const Footer = () =>{ return( <div cl...
import React, { useEffect } from 'react'; import { observer, inject } from "mobx-react"; import Button from '@material-ui/core/Button'; import Dialog from '@material-ui/core/Dialog'; import DialogActions from '@material-ui/core/DialogActions'; import DialogTitle from '@material-ui/core/DialogTitle'; const DeleteUserDi...
import { observable, action } from 'mobx' class CartStore { @observable qtdCart = 0 @observable qtdTeste = 10 @action setQuantity(value){ this.qtdCart = value } } export default CartStore = new CartStore()
/** * MyBishop * @constructor * @param game - game instance where bishop will be used * @param {string} color - piece's color * @param representation - piece's internal representation for the server module * @param initialPosition - piece's initial position in the scene * @param file - file where piece object is...
var url = "https://fcc-weather-api.glitch.me/api/current?"; var res, temp, celsius; $(document).ready(function() { //if geolocation is available, do ajax call if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var lat = position.coords.latitude; var lon = ...
#!/usr/bin/env node require('dotenv').config() const Octokit = require('@octokit/rest') const octokit = new Octokit({ auth: process.env.GH_AUTH_TOKEN, previews: ['dorian-preview'] }) const [, , ...args] = process.argv const owner = args const options = octokit.repos.listForOrg.endpoint.merge({ org: owner, type: ...
const express = require('express'), path = require('path'), morgan = require('morgan'), mysql = require('mysql'), myConnection = require('express-myconnection'); const app = express(); // importing routes const customerRoutes = require('./routes/customer'); // settings app.set('port', process.env.POR...
const express = require("express"); const authMiddleware = require("../middleware/authmiddleware"); const blogRouter = express.Router(); const Blog = require("../models/blog"); blogRouter.get("/getblogs", async (req, res) => { try { const blogs = await Blog.find(); res.status(200).json(blogs); } catch (err...
/* jshint strict:false */ module.exports = { options: { join: true }, "src": { files: { 'dist/js/main.js': [ 'src/coffee/init.coffee', 'src/coffee/config/*.*', 'src/coffee/service/*.*', 'src/coffee/**/*.*' ] } } }