text
stringlengths
7
3.69M
import React, { Component } from 'react'; class ResetButton extends React.Component { constructor(props){ super(props) } render(){ return( <div id="btn-div"> <button id="reset-btn" onClick={this.props.handleClick}>Reset</button> </div> ) } } export default ResetButton;
const https = require('https') const options = { hostname: 'www.google.com', port: 443, pathname: 'search', method: 'GET' } const request = https.request(options, (response) => { console.log(response.statusCode) response.on('data', (body) => { process.stdout.write(body) }) }) request.end()
TextBox = function (dbType,id,label,valueArray,tagCount,nVis,nEditable) { this.dbType = dbType; this.id = id; this.label = label; this.valueArray = valueArray; this.tagCount = tagCount; this.nVis = nVis; this.nEditable = nEditable; TextBox.baseConstructor.call(id,label,valueArray,tagCount); }; TextBox.prototype...
'use strict'; // const Git = require('nodegit'); const fse = require('fs-extra'); const shell = require('./shell').ShellUtils; const fs = require('fs'); class GitError extends Error { constructor(msg) { super(msg); this.status = 430; this.name = 'GitError'; } } class GitCMDBuilder { static _parseGi...
'use strict'; module.exports = function (app, id, vectorClock, otherServer, socket) { let controller = require('../controllers/controller'); controller.setup(id, [3000 + id, otherServer], socket); //Different routes //This first route is to send an artificial post to a certain server. app.route('/s...
import {reducer, ActionType} from './data.js'; import {filmDetails, films} from '../../mocks/test-mocks.js'; const ALL_GENRES = `All genres`; const SHOWN_MOVIES_NUMBER = 8; const SHOW_MORE_MOVIES_COUNT = 16; it(`Reducer without additional parameters should return initial state`, () => { expect(reducer(void 0, {}))....
let students = [{ 'id': 1, 'name': 'spiderman', 'games': ['cricket', 'football'], 'selected': false }, { 'id': 2, 'name': 'superman', 'games': ['cricket', 'hadudo'], 'selected': false }, { 'id': 2, 'name': 'ant man', 'games': ['cricket', 'tenis'], 'selected': fals...
const express = require("express"); const router = express.Router(); const receipts = require("../controllers/receipts.controller.js"); const tags = require("../controllers/tags.controller.js"); const multer = require("multer"); var storage = multer.diskStorage({ destination: function (req, file, cb) { cb(null, ...
import React from 'react'; import {connect} from 'react-redux'; import RenderAnsQUesRes from './renderAnQuesRes' class AnsQUesResult extends React.Component { constructor(props) { super(props); this.state = { idLogger: false, ansQUesId: '' } } idH...
/** * Created by a on 2017/10/30. */ const multer = require("multer"); //文件上传位置的配置 const storage = multer.diskStorage({ //保存路径,磁盘的路径 destination: function(req,file,cb) { // console.log(file); cb(null, "./public/images"); }, filename: function (req, file, cb) { var fileFormat = ...
/* jshint globalstrict:false, strict:false, unused: false */ /* global arango, assertEqual, assertTrue, ARGUMENTS, fail */ // ////////////////////////////////////////////////////////////////////////////// // / @brief test the sync method of the replication // / // / Copyright 2014-2021 ArangoDB GmbH, Cologne, Germany ...
import React from "react"; import { useState } from "react" import { useDispatch } from "react-redux" import { searchName } from "../actions"; import "./searchbar.css" function SearchBar() { const dispatch = useDispatch() const [name, setName] = useState(" ") function handleInputName(e) { e.preve...
import React from 'react'; import { Grid, Paper, Typography } from '@material-ui/core' import weatherImg from '../images/weatherImage.jpg' const FavoriteItem = ({ title, temp, desc }) => { return ( <Grid item md={3} xs={12} > <Paper className="weather-item" style={{backgroundImage: `url($...
/* jshint indent: 1 */ module.exports = function(sequelize, DataTypes) { return sequelize.define('achat', { id: { type: DataTypes.INTEGER(11), allowNull: false, primaryKey: true, autoIncrement: true }, Utilisateur_id: { type: DataTypes.INTEGER(11), allowNull: false, references: { model:...
/* * 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 Flow(i) { this.value = 0;//流量值 this.referPos = 0;//图像绘制参考坐标 this.timeTick = 0; this.lenTick = 0; this.$f...
//nodejs path const path = require('path'); const express = require('express'); const socketio = require('socket.io'); const message = require('./message'); //requried to serve socket const http = require('http'); const publicPath = path.join(__dirname, '../public'); const port = process.env.PORT || 3000; var app = e...
var businessList = { data:{ businessesUrl:$("#basePath").val()+"/businesses" }, init:function (param) { this.bindEvent(); }, bindEvent:function () { var _this = this; $("#search").click(function () { var title = $.trim($("#title").val()); ...
var express = require('express') var bodyParser = require('body-parser') var cors = require('cors') var app = express() app.use(bodyParser.urlencoded({extend: true})) app.use(bodyParser.json()) app.use(cors()) var port = process.env.port || 8000 var router = express.Router() router.get('/', function(req, res) { r...
//无状态组件,不需要引入{Component} import React from 'react'; //定义一个AmountBOX,利用函数返回组件,里面传的参数是从引用那里传过来的数据 const AmountBox=({text,type,amount})=>{ return( <div className="col"> <div className="card"> {/*模板字符串使用反引号 (` `) */} {/*来代替普通字符串中的用双引号和单引号。*/} {/*模板字符串可...
$(document).on("keydown","#main-search-bar input", function(e){ var code =e.which; var t=$(this); setTimeout(function(){ var text=t.val(); $.post('/ShareOn/geters/search.php',{search:text},function(d) { var json=JSON.parse(d); $("#main-search-bar .result").remove(); for(var i=0;i<json.length;i++){ c...
/** * eon.jquery.carriers ~ Version 1.40.0 * @author Serge Jamasb * @copyright the author * @license MIT/GPL */ !function (t, e) { t.fn.loadingOverlay = function (n, i) { var n = n === e ? !0 : !!n, o = t.extend({}, { cls: "ajax-cbox", cls_overlay: "ajax-cbox-overlay" }, i); return this.each(function...
var searchData= [ ['omnibase',['OmniBase',['../classOmniBase.html#ab8717851c5496b3311ba0b48114e8004',1,'OmniBase']]], ['omniethernet',['OmniEthernet',['../classOmniEthernet.html#a55e6473c599ca47a64d35f9194ad5603',1,'OmniEthernet']]], ['omnifirewire',['OmniFirewire',['../classOmniFirewire.html#af9298dc3107550d4da8...
/** * @param {string} s * @return {number} */ const longestUniqueCharacterSubstring = (s) => { let chars = s.split(''); let left = 0; let right = 0; let max = 0; let hash = {}; while (right < s.length) { let char = chars[right]; if (hash[char]) { left = Math.max(left, hash[char]); } ...
import React, {useState} from 'react' import Stone from '../img/even1.png' import Pepper from '../img/niyar1.png' import Cut from '../img/misparaim1.png' import CWin from '../img/misparaimWin.png' import PWin from '../img/peperWin.png' import SWin from '../img/rockWin.png' import {HashRouter as Router,Switch,Link , Rou...
const Augur = require("augurbot"); /*, DubAPI = require("dubapi"), WebhookClient = require("discord.js").WebhookClient, config = require("../config/dubtrack.json"), u = require("../utils/utils"); const icarus = new WebhookClient(config.id, config.token); var dubReady = false, dubBot = null, nowPlaying = n...
const express = require('express'); const router = express.Router(); const auth_function = require("./../../functions/auth"); const merchant_controller = require("./../../controllers/merchant/index"); // Get user details router.post("/fetch_user", merchant_controller.fetch_user); // Perform...
// pages/game/game.js Page({ /** * 页面的初始数据 */ data: { score: 0, level: 1, counter: 1 }, select: function (event) { console.log(event.target.dataset.test); if (event.target.dataset.test) { this.setData({ score: this.data.score + 1 }); } let boxes = []; ...
/** * 历史管理器 */ var Phaser = Phaser || {}; var BirdsAnimals = BirdsAnimals || {}; BirdsAnimals.HistoryManager = function(gameState) { "use strict"; Object.call(this); this.gameState = gameState; this.items = []; }; BirdsAnimals.HistoryManager.prototype = Object.create(Object.prototype); BirdsAnimals.Histo...
'use strict'; angular.module('app', ['ionic', 'services']) .run(function ($log, $ionicPlatform, $rootScope, $state, restoreSettings, settings, mode) { // https://github.com/angular-ui/ui-router/wiki/Frequently-Asked-Questions\ // #issue-im-getting-a-blank-screen-and-there-are-no-errors $rootScope.$on('$s...
'use strict'; /** *{type:'int'} */ module.exports = class IntCheck extends require('../base') { static get type() { return 'int'; } check(value) { if (typeof value !== 'number' || value % 1 !== 0) { return 'should be an integer'; } if ('max' in this.rule && value > this.rule.max) { r...
import express from 'express'; import {fetchSelect, fetchSelectBatch} from './select'; import {search} from './search'; const api = express.Router(); // 获取单个下拉列表 api.get('/select/:type', async (req, res) => { const result = await fetchSelect(req, req.params.type); res.send({result, returnCode: 0}); }); // 批量获取下拉...
import Application from './application'; import adaptServerData from './data/data-adapter'; const SERVER_URL = `https://es.dump.academy/pixel-hunter/`; const DEFAULT_NAME = `Default`; const APP_ID = 12132332721; const checkStatus = (response) => { if (response.ok) { return response; } Application.showError(...
import { createSlice } from "@reduxjs/toolkit"; const cartSlice = createSlice({ name: "cart", initialState: { pizzaList: [], cartCount: 0, total: 0, }, reducers: { addPizza: (state, action) => { state.pizzaList.push(action.payload); state.total += action.payload.price * action.paylo...
import { ROMAN_NUMBERS } from "../constants"; const FinderResult = ({ episode, title, releaseYear, director }) => ( <div className="bg-gray-100 flex px-6 py-4 rounded my-5 items-center"> <div className="bg-purple-500 rounded-full text-gray-100 font-semibold items-center justify-center h-14 w-14 mr-5 hidden sm:fl...
angular.module('ngApp.fuelSurCharge').factory('FuelService', function ($http, config) { var fuelService = function (fuelDetail) { return $http.post(config.SERVICE_URL + '/FuelSurCharge/SaveFuelSurCharge', fuelDetail); }; var GetOperationZone = function () { return $http.get(config.SERVICE...
require("../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/building/price/_top_filter" ], { "01d9": function(e, t, i) { i.d(t, "b", function() { return o; }), i.d(t, "c", function() { return c; }), i.d(t, "a", function() {}); ...
import React from 'react'; import { StyleSheet, View, Text, Dimensions } from 'react-native'; import { Actions } from 'react-native-router-flux'; const SignUpSection = () => ( <View style={styles.container}> <Text onPress={Actions.registerScreen} style={styles.text}>Регистрирай се</Text> ...
/** * Service */ angular.module('ngApp.setting').factory('SettingService', function ($http, config, SessionService) { var GetPieceDetailsExcelPath = function () { return $http.get(config.SERVICE_URL + '/Setting/GetPieceDetailsExcelPath'); }; var addAdminCharge = function (charges) { retu...
export const LOAD_MY_WISHLIST = 'my-project/wishlist/LOAD_MY_WISHLIST'; export const LOAD_MY_WISHLIST_SUCCESS = 'my-project/wishlist/LOAD_MY_WISHLIST_SUCCESS'; export const LOAD_MY_WISHLIST_FAILURE = 'my-project/wishlist/LOAD_MY_WISHLIST_FAILURE'; export const LOAD_SHARED_WISHLIST = 'my-project/wishlist/LOAD_SHARED_WI...
import $ from 'jquery'; // fecthWeather is an async operation. // The dispatcher WILL NOT wait // redux middleware, redux-promise has to be added when the store is created var fetchWeather = function(){ console.log("Fecthweather action in progrese...") const weatherUrl = 'http://api.openweathermap.org/data/2.5/w...
import React from 'react'; import {MDBListGroup, MDBListGroupItem, MDBRow} from 'mdbreact'; import PropTypes from 'prop-types'; import {withRouter} from 'react-router-dom'; import classes from './index.module.css'; import writeArticle from '../../assets/writeArticle.svg'; import writeQuestion from '../../assets/writeQu...
import React from "react"; import { Form, Input, Button } from "antd"; const FormItem = Form.Item; export default class LoginForm extends React.Component { constructor(props) { super(props); this.state = {}; } ref = this.props.formRef; loginSubmit = (e) => { e && e.preventDefault(); const _t...
import {maps} from "../services"; import Game from "../shared/Game"; import GameDriver from "../game-driver"; export class Play { mapNotFound = false; game = null; driver = null; view; async activate({mapId}, routeConfig) { try { this.map = await maps.get(mapId); ...
var SETTINGS = { api = 'http:...', trackJsToken = '12345' } // --Exemplo-- function MyApp() { if (!MyApp.instace) { MyApp.instace = this; } return MyApp.instace; }
var calculator = require('./calculator'); var multiply = (num1, num2) => num1 * num2; var divide = (num1, num2) => num1 / num2; var subtract = (num2, num1) => num2 - num1; var add = (num1, num2) => Number(num1) + Number(num2); module.exports = { multiply, divide, subtract, add }
const gcd = (a, b) => { if(a % b == 0) return b; else return gcd(b, a % b); } const lcm = (a, b) => { return (a * b) / gcd(a, b); } const cbn = (n, m) => { return lcm(n, m) / m; } module.exports.gcd = gcd; module.exports.lcm = lcm; module.exports.cbn = cbn;
import { dotnet } from '@microsoft/dotnet-runtime' import { color } from 'console-log-colors' async function dotnetMeaning() { try { const { getAssemblyExports } = await dotnet.create(); const exports = await getAssemblyExports("Wasm.Node.WebPack.Sample"); const meaningFunction = exports.Sa...
import React, { useState, useEffect } from 'react'; const MedCabinet = () => { const [searchTerm, setSearchTerm] = useState([]); const handleChange = event => { setSearchTerm(event.target.value); }; useEffect(() => { //filter through data here// }); return ( <div> <h1>Med Cabi...
import React, { useState } from 'react'; import { View, StyleSheet, TextInput, Button, Alert, Keyboard } from 'react-native'; import { THEME } from '../theme'; export const AddTodo = (props) => { const [value, setValue] = useState('') const pressHandler = () => { if (!value.trim()) { Alert...
import React from 'react'; import './Card.css'; import star from "./assets/order-page/star.svg"; import alarm_clock from "./assets/order-page/lightning_bolt.svg"; import lightning_bolt from "./assets/order-page/lightning_bolt.svg"; import person from "./assets/order-page/lightning_bolt.svg"; function Card(props) { ...
const schedule = require('node-schedule'); const exec = require('child_process').exec; schedule.scheduleJob('0 0 12 ? * TUE *', function() { exec('node decouverto-replica.js', console.log); });
define(['services/logger','durandal/app', 'viewmodels/account', 'viewmodels/changePasswordModal'], function (logger,app,Account,ChangePasswordModal) { var AccountModal = function() { ko.validation.configure({ insertMessages: false, decorateElement: true, errorElement...
import React from 'react' import { Link } from 'react-router-dom' class RightContent extends React.Component{ render(){ return ( <span> <Link to="/course/test/statistics/average">统计分析&gt;</Link> </span> ) } } export default RightContent
(function() { 'use strict'; // Define the component and controller we loaded in our test angular.module('components.students', []) .controller('StudentsController', function(Students) { var vm = this; vm.students = Students.all(); }) .config(function($stateProvider) { $stateProvider .stat...
/** * Created on 2016/4/15. * @fileoverview 请填写简要的文件说明. * @author joc (Firstname Lastname) */ class _MonkeyPagination extends MonkeyPagination { constructor (name, settings) { super(name, settings); let self = this; self.pickSettings(_.extend({ maxButtonCount: 10,...
import React, { Component } from 'react'; import cover from '../Assets/cover_dev.jpg'; import sitemap from '../Assets/cover.jpg'; import './WelcomeContainer.css'; export const WelcomeContainer = () => { const backgroundStyling = { background: `linear-gradient(to top, rgba(0, 0, 0), rgba(0, 0, 0, 0)), url(${cov...
export const GET_EMPLOYEES = "GET_EMPLOYEES"; export const POST_EMPLOYEES = "POST_EMPLOYEES"; export const DELETE_EMPLOYEES = "DELETE_EMPLOYEES"; export const PUT_EMPLOYEES = "PUT_EMPLOYEES";
import React, { useEffect, useState } from "react"; import axios from "axios"; import PropTypes from "prop-types"; import { useHistory } from "react-router-dom"; import "./postExemplar.scss"; import userPic from "../images/userPic.png"; const PostExemplar = ({ post }) => { const [avatar, setAvatar] = useState(userPi...
const socketio = require("socket.io"); let io; let player; let playerX; let playerO; let board = [ [0, 0, 0], [0, 0, 0], [0, 0, 0], ]; let win; let numMovimentos = 0; const endGame = (posX, posY, board, player) => { let end = false; if ( board[posX][0] === player && board[posX][1] === player && ...
var distance_array = []; $(document).ready(function(){ navigator.geolocation.getCurrentPosition(onSuccessGeolocation_cur, onErrorGeolocation_cur); }); function onSuccessGeolocation_cur(position) { loop(position.coords.latitude, position.coords.longitude); var ans = []; $.each(distance_array, func...
/// <reference path="knockout-2.3.0.js" /> /// <reference path="jquery-2.0.3.js" /> var firstAlbumId = 0; function Artist(artistId, artistName) { var self = this; self.ArtistId = ko.observable(artistId); self.Name = ko.observable(artistName); self.ArtistAlbumsUrl = ko.computed(function () { r...
import React, { useState, useMemo, useCallback } from "react"; import { QuestionContext } from "./QuestionContext"; import { getQuestions, createQuestion, editQuestion, deleteQuestion, } from "../../api/questionsApi"; const QuestionState = ({ children }) => { const [questions, setQuestions] = useState([]); ...
import React from "react"; import {useDispatch} from "react-redux"; import PropTypes from "prop-types"; import momentTz from "moment-timezone"; import Typeahead from "react-bootstrap-typeahead/lib/components/Typeahead"; import {updateClock} from "../../store/actions/actions"; const TimezoneAutocomplete = ({timezone, i...
class HTTP { constructor(base = '') { this.base = base this.interceptors = [] this.use = this.use.bind(this) this.add = this.add.bind(this) this.get = this.get.bind(this) this.post = this.post.bind(this) this.method = this.method.bind(this) } use(int...
var BALANCING_SYNC_URL = "https://sdtproduction.azure-api.net/balancingrs" var TRANSACTION_SYNC_URL = "https://sdtproduction.azure-api.net/transactionrs"; var SECURITY_SYNC_URL = "https://sdtproduction.azure-api.net/securityrs"; //Subscrption key var SUBSCRIPTION_KEY_NAME = "Ocp-Apim-Subscription-Key" var SUBSCRIPTION_...
import shoppath from './shoppath' const path = [{ path: '/receivables', name: '收款明细', meta: { title: '收款明细', noCache: true }, component: (resolve) => require(['../views/index.vue'], resolve), children: shoppath }] export default path;
function countvalues(value) { resplist = responsekeys.split(/,/); cnt = 0; for (respid in resplist) { listobj = document.forms['categorizationform'].elements['cat_' + resplist[respid]]; if (listobj.options[listobj.selectedIndex].value == value) { cnt++; } } return...
/** * 账户 * @type {mongoose.Schema} */ let mongoose = require('mongoose'); let Schema = mongoose.Schema; let AccountSchema = new Schema({ _id: Number, // 账户ID accountName: String, // 账户名称 // bankName:String, // 开户银行 accountNo:String, //账号 initMoney: {type:Number,default:0}, //初始金额 balance: {t...
import React, { Component } from 'react'; import './css/calculadora.css' //Containers import Somar from './../containers/SomarValor' import ResultadoDaSoma from './../containers/Resultado' class Calculadora extends Component { render() { const { title, tipo } = this.props return ( <div> <p c...
import React, { Component } from 'react' class SearchForm extends Component { state = { search: '' } submitSearch = (e) => { e.preventDefault(); this.props.onSubmitSearch({value: this.state.search}) } render() { return ( <form onS...
"use strict"; exports.__esModule = true; exports.FilemakerResponse = void 0; var Client_1 = require("./Client"); var Response_1 = require("./Response"); exports.FilemakerResponse = Response_1.FMResponse; exports["default"] = Client_1.Client;
// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: http://codemirror.net/LICENSE (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); else if (typeof define == "function" && define.amd) // AMD...
import CommentForm from './CommentForm' import CommentList from './CommentList' import Layout from './Layout' import Link from './Link' export { CommentForm, CommentList, Layout, Link, }
 var formulaire = document.getElementById('contact_form'); var tooltip = document.getElementById('tooltip'); function afficherMessage(message) { tooltip.innerHTML = message; tooltip.style.display = 'block'; tooltip.style.backgroundColor="silver"; tooltip.style.color="navy"; } ...
import React from 'react'; import { View, Image, Platform } from 'react-native'; import { slidelogo } from 'kitsu/assets/img/intro/'; import AnimatedWrapper from 'kitsu/components/AnimatedWrapper'; import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; import styles from './styles'; const A...
import React from 'react' import { StyledCurrencyValue, StyledValue, StyledCurrency } from './currency-value.style'; const CurrencyValue = ({ currency, value }) => { value = value.toFixed(2) return ( <StyledCurrencyValue> <StyledValue>{value}</StyledValue> <StyledCurrency>{currency}</StyledCurren...
function CerrarSesion() { localStorage.setItem("UserId", null); localStorage.setItem("User", JSON.stringify(null)); window.location.replace("../../index.html"); }
import React, { Component } from "react"; import "./ScoreBoard.css"; export default class PlayerList extends Component { constructor(props) { super(props); let playerCount = Object.keys(props.playerList).length; this.state = { playerList: props.playerList, playerCount: playerCount, }; } static getDeri...
import { useState } from 'react'; import { ChakraProvider, Grid, theme, Input, Flex, Collapse, InputGroup, InputRightElement, Spinner, } from '@chakra-ui/react'; import { SearchIcon } from '@chakra-ui/icons' import User from './User'; import History from './History'; function App() { const [showUse...
function FirstReverse(str) { let reverse = ""; str.split("").forEach(letter => { reverse = letter + reverse; }); return reverse; }
// @flow import React, { Component } from "react"; import { Container, Text, Item, Icon, List, ListItem, Card, CardItem // $FlowFixMe } from "native-base"; import store from "../store/store"; import type { Repo } from "./Repo"; import { getSorterProjectsWithScores } from "./projectsComparator"; imp...
'use strict'; var app = angular.module('myApp',['ngAnimate', 'ngMaterial', 'jkAngularCarousel','rzModule', 'ui.bootstrap']);
/** * @param {TreeNode} root * @return {boolean} */ const isSymmetric = (root) => { if (root == null) { return true; } let leftArr = bta(root.left, [], 'left'); let rightArr = bta(root.right, [], 'right'); if (leftArr.length !== rightArr.length) { return false; } let counter = 0; while (true...
/* 🤖 this file was generated by svg-to-ts*/ export const EOSIconsDirectionsRailway = { name: 'directions_railway', data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 15.5C4 17.43 5.57 19 7.5 19L6 20.5v.5h12v-.5L16.5 19c1.93 0 3.5-1.57 3.5-3.5V5c0-3.5-3.58-4-8-4s-8 .5-8 4v10.5zm8 1.5...
/*exports.seed = function (knex) { return knex("ship_specs") .truncate() .then(function () { return knex("ship_specs").insert( [ [ { id: "184", afterburner_speed: null, beam: "7.0", cargocapacit...
/** * @Copyright (c) 2019-present, Zabo & Modular, Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unl...
import RulesToggleSwitch from './RulesToggleSwitch'; export default RulesToggleSwitch;
import React from "react"; import { Button, List, Span, Paragraf, Item, Phone, Trash } from "./ContactList.styled"; import { Loaders } from "../Loader/Loader"; import { Icon } from "../Icon/Icon"; const ContactList = ({contacts, onDelete, deleting }) => { return ( <> <Item> {contacts.map(({id, name, nu...
module.exports = { port: 3010, session: { resave: true, // saveUninitialized: false, secret: 'myblog', name: 'myblog', maxAge: 2592000000 }, mongodb: 'mongodb://localhost:27017/blog' };
function DatabaseConnection() { this._url = 1; this._MongoClient = 2; this.setup() } DatabaseConnection.prototype.setup = function() { var MongoClient = require('mongodb').MongoClient; var url = "mongodb://localhost:27017/"; this._url = url; this._MongoClient = MongoClient; this._res = []; } Database...
function smoothScroll(duration){ $('a[href^="#"]').on('click', function(event){ var $this = $(this); //animate the auto scroll on nav link click var target = $( $this.attr('href') ); if(target.length){ event.preventDefault(); $(html_body).animat...
import ProductCard from "./ProductCard"; function Bakery() { return ( <div className="row"> <ProductCard img = "https://jagdishfarshan.com/Upload/Product/142/c3ab9f94c08149c38a14ff2b83199577.jpg" name="Lilo Chevdo" price="₹ 210.00 / 500gm"/> <ProductCard img = "https://jagdishfarshan.com/Upload/Produ...
var ws, connected = false, roboState = false, light = false; function start(websocketServerLocation) { ws = new WebSocket(websocketServerLocation); ws.onopen = function() { connected = true; console.log("Connected"); }; ws.onmessage = function(evt) { }; ws.onclose = function() { connected = false; console...
import React from 'react' import tw from 'twin.macro' // import { css } from 'styled-components/macro' //eslint-disable-line import AnimationRevealPage from 'helpers/AnimationRevealPage.js' import Hero from 'components/hero/TwoColumnWithInput.js' // import Features from 'components/features/ThreeColWithSideImage.js' //...
function Controller() { require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments)); this.__controllerPath = "Notifications/NotificationRow"; arguments[0] ? arguments[0]["__parentSymbol"] : null; arguments[0] ? arguments[0]["$model"] : null; arguments[0] ? argument...
import Phaser from 'phaser' import GameState from './states/BasicFixedGravity' class Game extends Phaser.Game { constructor (width, height, gameToRun) { super(width, height, Phaser.CANVAS, 'content', null) this.state.add(gameToRun, GameState, false) this.state.start(gameToRun) } } window.game = new ...
//API接口地址 const host = 'https://ccapi.wtvxin.com/api/'; const filePath = 'https://cc.wtvxin.com'; function formatNumber(n) { const str = n.toString() return str[1] ? str : `0${str}` } export function formatTime(date) { const year = date.getFullYear() const month = date.getMonth() + 1 const day = ...
const dateTime = { convertTo24Hrs : function(timestamp) { let getTime = new Date(timestamp) let minutes = getTime.getHours() > 10 ? getTime.getHours() : '0'+getTime.getHours() let seconds = getTime.getSeconds() > 10 ? getTime.getSeconds() : '0'+getTime.getSeconds() return `${minutes}...
var elixir = require('laravel-elixir'); require('laravel-elixir-bower-io'); elixir.config.production = true; elixir.config.assetsPath = 'lib/themes/ctl_theme'; elixir.config.publicPath = 'lib/themes/ctl_theme'; elixir.config.sourcemaps = false; elixir.config.css.sass.pluginOptions.includePaths = [ 'bower_component...
function pulsar(){ var respuesta; respuesta = prompt("¿Estas seguro que deseas realizar esta operación?",""); if(respuesta){ alert("Has respondido:"+respuesta); }else{ alert("Ha reusado contestar"); } }