text
stringlengths
7
3.69M
/*import React from 'react'; import Layout from '../components/Layout'; import PageFooter from '../components/PageFooter'; import SideBar from '../components/Sidebar/index' import Rgallery from '../components/Rgallery' import Shoptop from '../assets/images/sdcoast-1920x1438.jpg' import { Link } from 'gatsby' import {...
import Perkeep from './perkeep.js'; export default function (config) { return new Perkeep(config); }
import InfoBlock from "./InfoBlock.js"; import InfoImage from "./InfoImage.js"; import InfoDetails from "./InfoDetails.js"; export default function AssetData({ data }) { const { id, hostName, ip, riskScore, history } = data; return ( <InfoBlock> <InfoImage src="/windows-96.png" ...
"use strict" var Role = function () { this.ID; this.MasterRoleID; this.Name; this.Description; this.Overhead; this.UserID; this.isActive; this.OrganizationID; // Declare a function to load the current Organization data set // this.load = loadRoleData; // function loadRoleD...
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import './FiltersBar.sass'; import { FilterCheckbox, FilterRadiobutton } from '../index'; class FiltersBar extends Component { constructor(props) { super(props); this.state = { isVisible: true }; } componentDidM...
/** * Created by Administrator on 2016/8/12 0012. */ //第一次搞面向对象的,想用一个类似接口的东西下次可以直接用 function SlideObj(obj){ this.obj = obj; this.obj.on("touchstart",onTouchStart); this.obj.on("touchmove",onTouchMove); this.obj.on("touchend",onTouchEnd); this.obj.slideToUp = function(){}; this.obj.slideToDown ...
$(document).ready(function () { $("#namef").keyup(function(e) { var regex = /^[a-zA-Z ğüşıöçĞÜŞİÖÇ]*$/; if (regex.test(this.value) !== true) date_msg("Dikkat!", "Ad Alanına alfabetik Karakter Giriniz") this.value = this.value.replace(/[^a-zA-Z ğüşıöçĞÜŞİÖÇ]+/, ''); }); $("#i...
const express = require('express'); const app = express(); const bodyParser = require('body-parser'); const useragent = require('express-useragent'); const fs = require('fs'); const morgan = require('morgan'); const path = require('path'); const { mongoose } = require('./config/db'); const { routes } = require('./conf...
import React, {Component} from 'react'; const valorantUrl = 'https://valorant-api.com/v1/agents/'; class CharacterSpecs extends Component{ constructor(props) { super(props); this.state = { charactersInfo: [], uuid: props.match.params } } component...
module.exports = { mode: 'jit', purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'], darkMode: false, // or 'media' or 'class' theme: { extend: { maxWidth: { site: '1280px', }, colors: { body: '#08090a'...
var Matrix4 = require('./KTMatrix4'); var Vector2 = require('./KTVector2'); var Vector3 = require('./KTVector3'); var KTMath = require('./KTMath'); var GeometryBillboard = require('./KTGeometryBillboard'); function Mesh(geometry, material){ if (!geometry || !geometry.__ktgeometry) throw "Geometry must be a KTGeometry...
//游戏数据 var gamedata = { //分享图文 shareData: new Array(), //跳转游戏列表 gamelist: new Array(), //控制数据 control: { showMore: false,//是否显示更多游戏 showGamelist: false,//是否显示游戏列表 bannerRefreshTime: 0,//banner刷新时间 homeBannerRatio: 0,//首页banner显示概率 uglyShare: false,//诱导分享 ...
import Point from './Point.js'; /** * 判断点击区域是否在任意图形内 * Long may the sun shine :) * * @author Owen * @email [email protected] * @github github/numerhero * @date 2017-02-03 * @param {Array} shape 图形的个个点组成的坐标 * @param {Object} test 触点对象 * @return {Boolean} ...
import React from 'react'; import style from './App.css'; const Title = props =>{ return( <div className={style.Title}> <h1>To Do List</h1> no. of tasks {props.data.length} </div> ); } export default Title;
//加载数据表格 $('#dg').datagrid({ //url: webRoot + 'common/query?groupid=' + groupid, //为了适应多个地方对该页面的调用,这里加载datagrid的url采用调用者传递的url进行查询,调用者去实现对应的请求查询 url : webRoot + url, fit: true, //设置自适应高度 fitColumns: true, //设置自适应宽度 sortName: 'id', sortOrder: 'desc', pagination: true, //设置分页 rownu...
let timeAtStart; let interval; let time; let table; let startButton; let timeElapsedDisplayFormat; // the game works correctly only with even number of cells const nbCellsX = 4; const nbCellsY = 4; let randomColors = []; let foundCells = []; let pressedCells = []; let gamePaused = false; let gameStarted = false; /...
/*global define*/ define([ 'jquery', 'underscore', 'backbone', 'templates', 'baseview' ], function ($, _, Backbone, JST) { 'use strict'; var PagesItemView = Backbone.BaseView.extend({ template: JST['app/scripts/templates/pages/item.hbs'], tagName: 'article', id: function () { return 'page-' + this.m...
angular.module('app') .controller('IntroCtrl', function($scope, $rootScope, $ionicPopup, $http) { $rootScope.showl = false; $rootScope.showr = false; $(".bubble").animate( { left: '42%', opacity: '1' }, 1000); $scope.nofu...
export const IS_ACTIVE = "true", IS_NOT_ACTIVE = "false"; /** * Returns the value of a given attribute * @param {AccessibleNode} ay * @param {String} attributeName * @return {String} attribute's value */ export function get(ay, attributeName) { var value = ay._.rawAttrs.attributeName || ay.element.getAttribute...
function loadVerifyPage() { var url = window.location.href; url = url.split('#').pop().split('?').pop(); var pageurl = url.substring(0, url.lastIndexOf('/')); pageurl = pageurl + "/verify.html"; document.getElementById("suvpage").value = pageurl; } $(document).keyup(function (e) { /* Enter key ...
import Component from '@glimmer/component'; import debugLogger from 'ember-debug-logger'; import { action } from '@ember/object'; import { htmlSafe } from '@ember/template'; import { isPresent } from '@ember/utils'; import { tracked } from '@glimmer/tracking'; export default class TwyrToasterInnerComponent extends Co...
"use strict"; /** Map of all colors in game, assigned here to make it easier to modify */ let colorMap = new Map(); colorMap.set("border", "rgb(84, 84, 69)"); colorMap.set("floor", "rgb(119, 119, 98)"); colorMap.set("wall", "rgb(255, 255, 255)"); colorMap.set("lava", "rgb(237, ...
function BookNow(guestName,guestEmail,guestPax,guestPackages,guestRemarks){ let url= 'https://api.sheety.co/d3ae687f2d39df38048b413e482c249e/bookingApp/bookings'; let body = { booking: { name:guestName, email:guestEmail, pax:guestPax, packages:guestPackages...
var elements = require('../elements'); /** * Show the element (remove the class .hidden) * * @name Element#show * @method * */ /** * Show the elements (remove the class .hidden) * * @name ElementsArray#show * @method */ elements.addMethodWithoutArgumentsReturnThis('show'); /** * Hide the element (add the...
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModu...
(function() { 'use strict'; angular .module('iconlabApp') .controller('ArticleDetailController', ArticleDetailController); ArticleDetailController.$inject = ['$scope','$state', '$rootScope', '$stateParams', 'DataUtils', 'entity', 'Article', 'User','Principal']; function ArticleDetailC...
const PubSub = require('../helpers/pub_sub.js'); let movies = []; const StudioGhibli = function () { this.movies = [] this.directors = [] } StudioGhibli.prototype.getData = function () { return fetch('https://ghibliapi.herokuapp.com/films/') .then(response => response.json()) .then((data) => new Promi...
class Point{ constructor(xCoordinate, yCoordinate) { this.xCoordinate = xCoordinate; this.yCoordinate = yCoordinate; } toString(){ return 'Координата X: ' +this.xCoordinate+ ', Координата Y: ' + this.yCoordinate; } valueOf(){ return 'Координата X: ' +this.xCoordinate+...
import React from 'react'; import { BrowserRouter, Switch, Route } from 'react-router-dom'; import product from 'Pages/Product'; import recentList from 'Pages/RecentList'; function Routes() { return ( <BrowserRouter> <Switch> <Route exact path="/" component={product} /> <Route exact path="/...
/* adiciona classe js ao html, caso o js esteja desativado o conteudo continua aparecendo */ var root = document.documentElement; root.className += " js"; /* função responsável por calcular a distância entre cada elemento com a classe anime e o topo da página. .offset() retorna os valores de left e top dentro...
/* @flow */ import './cdn.js' import './accounts.js' import './accounts-config.js' import './accounts-email.js' import './browser-policy.js' import './startup.js'
import { useRef, useState, useEffect, useContext } from 'react'; import { SocketContext } from './../../../contexts/SocketContext'; import classes from './Player.module.css'; const Player = (props) => { const socket = useContext(SocketContext); const videoRef = useRef(''); const videoContainerRef = useRef('')...
import React from 'react'; import store from 'store'; import { getLikes, getWhiskey, getSearches, changeFavorite } from 'api/data'; import Suggestions from 'ui/suggestions'; import UserSearches from 'ui/userSearches'; import SearchInput from 'ui/searchInput'; import { Link } from 'react-router'; import StarRating from ...
$(document).ready(function () { /* |-------------------------------------------------------------------------- | ADDING RATE FUNCTION |-------------------------------------------------------------------------- | WHEN THE ADD RATE FORM SUBMIT BUTTON IS CLICKED |----------------------------------------------------------...
var pubSubSubscriber = pubSubHubbub.createServer(options); var topic = "http://testetstetss.blogspot.com/feeds/posts/default"; var hub = "http://pubsubhubbub.appspot.com/"; pubSubSubscriber.on("subscribe", function(data){ console.log(data.topic + " subscribed"); }); pubSubSubscriber.listen(port); pubsub.on("list...
module.exports = function argsort(d) { let ind = [] let tmp for (i = 0; i < d.length; i++) { ind[i] = i } for (i = 0; i < d.length; i++) { for (j = 0; j < d.length-1; j++) { if (d[j] > d[j+1]) { tmp = d[j]; d[j] = d[j+1]; d[j+1] = tmp; tmp = ind[j]; ind[j]...
import {Component} from 'react' import './index.css' class ShowHide extends Component { state = { isFirstNameVisible: false, isLastNameVisible: false, } onChangeStatusOfFirstName = () => { this.setState(prevState => ({ isFirstNameVisible: !prevState.isFirstNameVisible, })) } onChangeS...
import {change} from 'redux-form' import { addProduct, deleteProduct, changeCompany, submitOrder } from '../../../modules/Orders' export default { handleSubmit: ({dispatch}) => values => { dispatch(addProduct(values)) dispatch(change('formNewOrder', 'quantity', '')) dispatch(change('formNewOrder'...
module.exports = [ { type: 'list', name: 'preset', message: 'Select from one of the following presets to scaffold your Vue project:', choices: [ { name: 'Base (A basic Vuetify application)', value: 'base' }, ], default: 'base', } ]
const keyMirror = require('keymirror'); const api = require('../lib/api'); const log = require('../lib/log'); const Status = keyMirror({ FETCHED: null, NOT_FETCHED: null, FETCHING: null, ERROR: null }); const getInitialState = () => ({ infoStatus: Status.NOT_FETCHED, title: '', descriptio...
import PostMessage from '../models/postMessages.js'; import mongoose from 'mongoose'; export const getPosts = async (req, res) =>{ const {page} = req.query try{ const LIMIT = 8; const startIndex = (Number(page) - 1) * LIMIT; const total = await PostMessage.countDocuments({}); ...
var name = "Jenne"; function sayHello() { console.log("Hello " + name); } (function(window){ var jenneGreeter = {}; jenneGreeter.name = "Jenne" jenneGreeter.sayHello = function sayHello() { console.log("Hello " + jenneGreeter.name); } var greeting = "Hello "; jenneGreeter.sayHello = function sayHello() { c...
const { SlashCommandBuilder } = require('discord.js'); const Twitter = require('twitter'); module.exports = { data: new SlashCommandBuilder() .setName('tweet') .setDescription('Post tweet album images.') .addStringOption((option) => option.setName('url').setDescription('URL of tweet.').setRequired(...
define([ 'jquery', 'underscore', 'backbone' ], function($, _, Backbone){ window.MapView = Backbone.View.extend({ tagName: 'canvas', className: 'gameMap', initialize: function() { //console.log('maptime') _.bindAll(this, 'render'); this.collection.bind('change', this.render); this.collecti...
/** * Description of utils. * * * @author: Ilya Petrushenko <[email protected]> * @since: 24.01.19 9:16 */ import moment from 'moment' import { getFirstAllowedDay, today, getDate, } from './utils' describe('Test utils functions', () => { it('test getFirstAllowedDay', () => { const booked = ...
import { menuHttp, linkHttp, tagHttp, dailyHttp, postsHttp } from './resource' export default { getMenu: (id) => menuHttp.get({id: id}), getLink: () => linkHttp.get(), getTag: () => tagHttp.get(), getDaily: (data) => dailyHttp.get({start_id: data.start_id}), getPosts: (data) => postsHttp.get({id: d...
function login() { let user_id = $("#user").val(); let user_pw = $("#password").val(); $.ajax({ type: "POST", url: "/login/check", data: { userid_give: user_id, userpw_give: user_pw }, success: function (response) { if (response['user_data'] == null) { alert("아이디/비밀번호를 확인하세요"); ...
import React, { Component } from 'react'; import { View, Text, Dimensions, Image ,StyleSheet,TouchableOpacity} from 'react-native'; import { Entypo, AntDesign, FontAwesome5, FontAwesome, Feather, EvilIcons, MaterialCommunityIcons, Octicons} from '@expo/vector-icons'; const width = Dimensions.get('window').width const ...
import {expect} from 'chai' //import Item from './Item' import React from 'react' //import ReactTestUtils from 'react-addons-test-utils' /*const renderer = ReactTestUtils.createRenderer(); renderer.render( <Item id={"123"} text={"text"} active={true} toggleActive={() => { console.log("toggleActive") ...
let placeBanner = () => { document.querySelector('#vb-nome').innerHTML = window.localStorage.getItem('bannerNome'); document.querySelector('#vb-banner').innerHTML = `<img src="${window.localStorage.getItem('bannerUrl')}">`; window.localStorage.removeItem('bannerNome'); window.localStorage.removeItem('ba...
import React from "react"; import { StyleSheet, Text, TouchableOpacity, View } from "react-native"; import { MaterialCommunityIcons } from "@expo/vector-icons"; const NewListingButton = ({ onPress }) => { return ( <TouchableOpacity onPress={onPress}> <View style={styles.container}> <MaterialCommuni...
// Đăng nhập export const DANG_NHAP = 'DANG_NHAP'; // Đăng ký export const DANG_KY = 'DANG_KY'; // lưu lại navigation export const KHOI_DONG_APP = 'KHOI_DONG_APP'; /* Quản lý thành viên */ // Đếm số thành viên export const DEM_SO_THANH_VIEN = 'DEM_SO_THANH_VIEN'; // Thêm thành viên khi chọn số người export const THE...
export default () => { const $btn = $('.js-megamenu-toggle') const openMenu = function() { $(this) .children('.js-megamenu-body') .addClass('is-show') } const closeMenu = function() { $(this) .children('.js-megamenu-body') .removeClass('is-show') } $btn.hover(openMenu, close...
import * as ActionTypes from './ActionTypes'; export const Tasks = (state = { isLoading: true, errMess: null, tasks: [] }, action) => { switch(action.type) { case ActionTypes.ADD_TASK: const newTask = action.payload; return {...state, tasks: state.tasks....
import React from 'react'; import './SeatPlan.scss'; export default function SeatPlan() { return ( <div> SeatPlan </div> ) }
// Variables // Multiple line variables const firstName = "Vladimir"; const myAge = 35; const yourAge = 34; const isNice = true; let isUndefined; let nullType = null; let myArray = [1, 2, 3]; console.log(firstName); console.log(myAge); console.log(isNice); console.log(isUndefined); console.log(nullType); consol...
import React,{useEffect, useState} from "react" import "./insert-item-styles.css" export default function InsertItem() { const [maxItemNo, setMaxItemNo] = useState([]); useEffect(() => { async function fetchData() { const res = await fetch("http://localhost:5000/maxitemno/availitems/"); res ...
import React from 'react'; import Encounter from '../connectors/Encounter'; import Welcome from '../components/Welcome'; import Revelations from '../connectors/Revelations' class DisplayContainer extends React.Component { constructor(props) { super(props); } componentDidMount() { fetch('/api/v1/users.js...
// Generated from grammars/Calculator.g4 by ANTLR 4.7.1 // jshint ignore: start const CalculatorVisitor = require('./lib/CalculatorVisitor').CalculatorVisitor; class Visitor extends CalculatorVisitor{ // Visit a parse tree produced by CalculatorParser#calculator. start(ctx) { return this.visitCalculator(ctx); } ...
'use strict' const fp = require('fastify-plugin'); const { responseError, responseSuccess } = require('../service/Response'); const { encrypt, decrypt } = require('../service/Encryption'); const nodemailer = require('nodemailer') let result = null; module.exports = fp(function (fastify, opts, next) { fastify .de...
import React from "react" import Layout from "../components/layout" import Blocks from "../components/blocks" const SignIn = () => ( <Layout whiteNav={true}> <Blocks content={[ { id: `hero`, block: `hero`, headline: `Reset your password` }, { id: `reset-form`, ...
class SoloEndScreen extends GameObject { constructor() { super("SoloEndScreen"); } } export default SoloEndScreen;
/** * @ngdoc component * @module app * @name main * * @description * A component which serves as the main View of the application. */ (function (angular) { 'use strict'; function MainController(navigationService) { var ctrl = this; ctrl.gridConfig = { cols: 2, r...
/** * Configure your Gatsby site with this file. * * See: https://www.gatsbyjs.com/docs/gatsby-config/ */ module.exports = { /* Your site config here */ siteMetadata: { title: "Welcome to my website ~ Jon Johnson", url: "https://www.jonj.io", description: "I'm a Software Engineer and creator ...
import React from 'react' const Functional = ({state , capital, children}) => { return ( <div> <h1>The capital city of {state} is {capital}</h1> {children} </div> ) } export default Functional;
const labels = document.querySelectorAll('.form-control label'); labels.forEach(label => { label.innerHTML = label.innerText .split('') .map((letter, idx) => `<span style="transition-delay: ${idx * 50}ms">${letter}</span>`) .join(''); }); //We convert the text of the innerHTML into an ARRA...
var site = { lib: {}, common: { InitMap: { home: function () { elf('#Preview input[type=radio]').on('click', function (ev) { elf().g('DownloadButton').setAttribute('href', this.value); }); }, blog: function () { elf('#BlogSide').scrollFollow({ side: 'right', sideOffset: 0, ...
$(document).ready(function(){ ocultaCiudades() seleccionCiudad() }); function ocultaCiudades(){ $(".ciudades #chi").hide(); $(".ciudades #bc").hide(); $(".ciudades #coa").hide(); $(".ciudades #dur").hide(); $(".ciudades #gua").hide(); $(".ciudades #jal").hide(); $(".ciudades #mic").hide(); $(".ciuda...
import React from 'react' const Oeration = ({ operation }) => { console.log(operation) return ( <tr> <td>{operation.log}</td> <td>{operation.time}</td> </tr> ) } export default Oeration
/** This is an example of the html we want generated! * <div>... <select id='title_select' class='selector'> <option value='Other'>Choose topic and subtopic</option> </select> <br> <input type='checkbox' id='bonus'>Include a bonus</input> <button type='button' id='updatebackground'>Change Background</but...
import { sayGodbye } from './models'; export default (request, response) => { response.success(sayGodbye()); };
import React, { Component } from 'react'; import 'react-bootstrap'; import { HashRouter, Switch, Route, Link } from 'react-router-dom'; class PaintingArchive extends Component{ constructor(props) { super(props); this.state = {paintings:[] } } componentDidMount(){ if(this.props.p...
webpackJsonp([3],{1:function(n,c){},7:function(n,c,t){"use strict";t(1)}},[7]);
require('dotenv').config() module.exports = { siteMetadata: { title: `Alexandra Vlad - Photography`, description: `Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.`, author: `@av`, siteUrl: `https://alexan...
function setup(){ createCanvas(400, 300); background(255); } function draw() { background(15); }
//app var toDoList = []; list = document.getElementById('todo_list') toggleButton = document.getElementById('toggle_list'); removeButtonSelect = document.getElementById('removeBtn'); textBox = document.createElement('input'); textBox.type = 'text'; list = document.querySelector('ul'); iconCreate = document.createEleme...
const reEmail = /^\S{1,}@\S{1,}\.\S{2,3}$/ const reComma = /,\s?/ export const validate = email => { return { value: email, valid: reEmail.test(email), } } export const splitStringByComma = (emailsStr = '') => { const emails = emailsStr.split(reComma).filter(email => email) return emails }
import { getUrlParams } from './utils'; import { getDetailFn,getNameListFn, getDetailNameListFn } from './industry'; import { getAddress } from './citys'; import { queryBankList,querySubBranch } from './bank' // mock tableListDataSource let tableListDataSource = []; let reviewListDataSource = []; let statusList = [{t...
import React, { Component } from 'react'; import './App.css'; import { connect } from 'react-redux'; import { add_reminder,remove_reminder,clean_reminder } from './actions/' import moment from 'moment'; class App extends Component { constructor(props) { super(props); this.state = { text: '', dueD...
import React, { useEffect, useState } from 'react'; import axios from 'axios'; import styled from 'styled-components'; //ui import { Switch, Route, Link, Redirect } from 'react-router-dom'; import Landing from './screens/landing/landing.screen'; import Dashboard from './screens/dashboard//dashbaord.screens'; import '....
import React from 'react' import { connect } from "react-redux"; import { UniqueName,createRealUser } from "../store/actions/authActions"; import Spinner from 'react-spinner-material'; import {Redirect} from 'react-router-dom' function extraComponent(props) { const saveNcontinue = (e) => { e.preventDefa...
function setup () { createCanvas (500,500); background (100,200,10); } function draw () { fill (20,30,10); ellipse (width/2,height/2,10,20); }
import React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router'; import { getRestaurantsList } from 'actions/RestaurantsListActions'; import Subheader from 'material-ui/Subheader'; import Paper from 'material-ui/Paper'; import RestaurantCard from 'components/Card/RestaurantCard'; ...
var config = { id:"xx-shell", tagId:"explore-horizontal::shell", ratio: { width: 640, height: 1140 }, development: { datasUrl: "../../datas/xx-shell/content.json" }, production: { datasUrl: "//www.lequipe.fr/explore-horizontal/xx-shell/datas/content...
import "antd/lib/switch/style/css"; import Switch from "antd/lib/switch"; export default Switch;
import React, { Component } from 'react'; import { connect } from 'react-redux'; import { createProduct, getProductByIds, deleteProduct } from '../../store/actions/productAction'; import PropTypes from 'prop-types'; import { withRouter,Link } from 'react-router-dom'; import { Badge, Card, CardBody, CardHeader, Col, Pag...
import React from 'react' import ContentBox from './content-box.jsx' import Styles from './../styles.js' const style = { color: Styles.textColor, fontFamily: Styles.fontFamily, fontSize: Styles.h1Size, fontWeight: '300', textAlign: 'center' } type titleHeaderType = { children: React.Element } const Title...
//Cuda functions var noCuda = 1 //Provides: caml_sys_system_command function caml_sys_system_command() { //console.log("caml_sys_system_command"); return 0; } //Provides: spoc_cuInit function spoc_cuInit() { //console.log(" spoc_cuInit"); return 0; } //Provides: spoc_cuda_compile function spoc_cuda_...
const { gClient, restClient } = require("../tool/request"); const jwt = require("jsonwebtoken"); const config = require("../config/config"); const injectGadmin = function (req, res, next) { console.dir("当前的req参数"); console.log(JSON.stringify(req.url)); isInit = req.url.indexOf("store"); let magento; if (!...
var _ = require('lodash'); var React = require('react'); var EmptyComponent = React.createClass({ render: function() { return false; }, }); module.exports = function getRestrictRoles(UserStore) { return function restrictRoles(roles, Component, AlternativeComponent) { AlternativeComponent = AlternativeCo...
import React, {PropTypes} from 'react'; import {truncate} from '../Helpers'; const Sha = ({build, truncateMaxLength}) => { if (!build.commitInfo) { return null; // TODO: find this info somewhere else, then } const commitLink = build.commitInfo.current.url; return ( <span className="sha"> <a hre...
//function ageCalculator(date) //return new date.timestamp; //console.log(ageCalculator(date)); var date = new date('January 31,1980 11:20:00') function ageCalculator(date) { var diff = Date.now() - date.getTime(); var age = new Date(diff); return Math.abs(age.getUTCFullYear() - 1980); }; c...
const jwt=require("jsonwebtoken") const secret="jhdsjadkahdjashdkjhanmmc23vnxmcv5448njds54ifeijfiesjkfsldfj" module.exports=function(req,res,next){ const authToken=req.headers['authorization'] if(authToken!=undefined){ const bearer=authToken.split(' '); const token=bearer[1]; try{ const decoded...
import React, { Component } from 'react' import { Container } from './styles' import { bindActionCreators } from 'redux' import { connect } from 'react-redux' import { Creators as UsersActions } from '../../store/ducks/users' class Alert extends Component { render() { const { error } = this.props if (error) { ...
/* * @lc app=leetcode id=1139 lang=javascript * * [1139] Largest 1-Bordered Square * * https://leetcode.com/problems/largest-1-bordered-square/description/ * * algorithms * Medium (45.81%) * Likes: 124 * Dislikes: 34 * Total Accepted: 7.2K * Total Submissions: 15.8K * Testcase Example: '[[1,1,1],[1,...
export const secrets = { facebookAppId: '2005654466400264' };
var plusOne = function(digits) { for (let i = digits.length - 1; i >= 0; i--) { if (digits[i] < 9) { digits[i] = digits[i] + 1; return digits; } else { digits[i] = 0; } } // if we have [9, 9] digits.unshift(1); return digits; // doesn't work for numbers that are really...
import React from "react"; import api from "../../libs/api"; import SelectDatePopover, { dateCalculator } from "./selectDatePopover"; import moment from "moment"; import BlockUi from "react-block-ui"; import { withTranslation } from "~/i18n"; import StatisticPopover from "./statisticPopover"; class DashboardStatistic e...
module.exports = `-----BEGIN RSA PRIVATE KEY----- MIIJJwIBAAKCAgEAnAQMQ1nLI4Gf941phu8G74AuGZDmKSVKFU8/1+f75v5jP/JI SV+xxhWe/a2KXdvIJTt8CtVFfE4L7E5P9MVF9HIfmm3O6H3PZpyx/dnGfcA3KuC6 ODMahMHi91HDL91DxWFHtvvB7XVkR6HrJqA/xz9aIiEdxJESsMIfbex5NeuyO3oC hKRnshIAdLbrYznYQivgfmHF1oQbSF8kQfCa2aLMojDT85mOl5ABHAJxim3G5rJr VjKZDCDe2j...
import CustomerService from "../../services/CustomerService"; export const fetchCustomers = async ({state, commit}) => { await CustomerService.index(state.nextPage, state.limit, state.searchKey) .then(response => { const { data : { meta: meta } } = response; const { data : { data: c...