text stringlengths 7 3.69M |
|---|
var textInputSearch = document.getElementById("search");
var timeout = null;
textInputSearch.addEventListener("keyup", (e) => {
var spinner = document.createElement("div");
spinner.className = "loader";
document.getElementById("searchProduct").appendChild(spinner);
if (e.keyCode == 13) {
window.... |
import React from 'react';
import { Link } from 'react-router-dom';
import Panel from 'component/panel/index.jsx';
import TableList from 'component/table-list/index.jsx';
import Pagination from 'component/pagination/index.jsx';
import BaseUtil from 'util/base-util.jsx';
import Field from 'service/field-service.jsx';
i... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { showLoading, hideLoading } from 'modules/example/actions/loading';
// import { actionAjaxGetNewsList } from '../../actions/news.js';
import { Loading } from 'components';
import 'components/loading/loading.les... |
/*
* File: app/view/mainView.js
*
* This file was generated by Sencha Architect version 3.0.4.
* http://www.sencha.com/products/architect/
*
* This file requires use of the Sencha Touch 2.3.x library, under independent license.
* License of Sencha Architect does not include license for Sencha Touch 2.3.x. For mo... |
export const formatter = (v) => {
let timeDistance = (new Date().getTime() - new Date(v).getTime()) / 1000
if ((timeDistance / 60) < 1) {
return `1分钟前`
} else if ((timeDistance / 60) < 60) {
return `${Math.floor((timeDistance / 60))}分钟前`
} else if ((timeDistance / 60 / 60) < 24) {
... |
const ItemQtyLogger = require( './log/item.qty.log.js' ) ;
module.exports.ItemAdded = async ( itemData ) => {
const log = new ItemQtyLogger() ;
Object.assign( log, {
Type : 'add',
Item : itemData.Name,
Qty : itemData.LogQty,
}) ;
log.save() ;
} ;
module.exports.ItemPurchased ... |
import liquidityAskBid from '../../../utils/liquidity-ask-bid.json';
// eslint-disable-next-line import/prefer-default-export
export const generateChartData = () => liquidityAskBid;
|
let moduleLog = function () {
let log = (message) => {
console.log('log:' + message);
}
return {
log: log
}
}();
module.exports = moduleLog; |
import React from "react";
import { Link } from "react-router-dom";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { logoutUser } from "../../actions/authActions";
import { StyledNavbar, List, ListElement } from "../common/styles/Navbar";
const onLogoutClick = logoutUser => e => {
... |
const User = require('./../models/userModel');
// Set user id
exports.getMe = (req, res, next) => {
req.params.id = req.user._id;
next();
};
// Get user by param id
exports.getUser = async (req, res, next) => {
try {
const user = await User.findById(req.params.id);
return res.status(200).... |
import React from 'react';
import Users from './Users';
//import * as axios from 'axios';
import {follow, unfollow, setCurrentPage, toggleFollowingProgress, getUsersThunkCreator} from '../../redux/users-reducer';
import {connect} from 'react-redux';
import Preloader from '../common/preloader/Preloader.jsx';
import {wit... |
const {table} = require('table');
const color = require('colors');
const mysql = require("mysql");
/**
* Main database function for customers to connect and disconnect from database, view products
* and make purchases.
*/
let SQLmain = function () {
this.data = [
['Item Number'.blue, 'Description'.yell... |
var Marketplace = artifacts.require('Marketplace')
contract('Marketplace', function(accounts) {
const owner = accounts[0]
const alice = accounts[1]
const bob = accounts[2]
const charlie = accounts[3]
const emptyAddress = "0x0000000000000000000000000000000000000000"
/*
Test 1: Tests whether owner can ... |
export default firebaseConfig = {
apiKey: "AIzaSyCduuJq491xyTbkUJE8m1eXvxxZlRgXU9M",
authDomain: "moviesarea-c286b.firebaseapp.com",
projectId: "moviesarea-c286b",
storageBucket: "moviesarea-c286b.appspot.com",
messagingSenderId: "33453687652",
appId: "1:33453687652:web:6863a777f3b993d5683071",
... |
Messages = new Mongo.Collection("messages");
Chats = new Mongo.Collection("chats");
if (Meteor.isClient) {
Tracker.autorun(function () {
Meteor.subscribe("messages", {chat: Session.get("selectedChat")});
});
Meteor.subscribe("chats");
Template.message.helpers({
isAuthor: function () {
return th... |
import jwt from "jsonwebtoken";
import dotenv from "dotenv";
dotenv.config();
const authorization = async (req, res, next) => {
try {
// GET The JWT Token
const jwtToken = req.header("token");
if (!jwtToken) { // if it doesn'exist
res.status(403).send({
message: "You are not authorized",
... |
/**
* Configure your Gatsby site with this file.
*
* See: https://www.gatsbyjs.org/docs/gatsby-config/
*/
module.exports = {
siteMetadata: {
title: "KnoGeo",
description: "KnoGeo",
keywords: "KnoGeo",
siteUrl: `https://www.KnoGeo.com`,
},
plugins: [
{
resolve: "gatsby-plugin-robots-... |
!(function (NioApp, $) {
"use strict";
//////// for developer - User Balance ////////
// Avilable options to pass from outside
// labels: array,
// legend: false - boolean,
// dataUnit: string, (Used in tooltip or other section for display)
// datasets: [{label : string, color: string (... |
import React, {Component} from 'react'
import {omit} from 'lodash'
export default class Tabs extends Component {
componentWillMount() {
if (!this.state) {
this.setState({active: this.props.children.find(a => a.props.active).key})
}
}
componentWillReceiveProps(props) {
if (this.props.active !==... |
import C from '../constants/actions';
export default function showTour(state = false, action) {
switch (action.type) {
case C.SKIP_TOUR:
return false;
default:
return state;
}
}
|
import characteristics from './characteristics';
import originPropositions from './originPropositions';
import {selectOriginProposition, defaultSelectedOrigin} from './originPropositions';
import professionPropositions from './professionPropositions';
import {selectProfessionProposition, defaultSelectedProfession} from... |
/* Treehouse FSJS Techdegree
* Project 4 - OOP Game App
* app.js */
const startGame = document.querySelector("#btn__reset");
let game;
//const game = new Game();
startGame.addEventListener("click",() =>{
game = new Game();
game.startGame();
});
console.log(game);
const keyboards = document.querySelectorAll("... |
var emptyFunction = require('emptyFunction');
var Validator = require('Validator');
var Any = Validator('Any', {
test: emptyFunction.thatReturnsTrue,
assert: emptyFunction,
});
module.exports = Any;
|
import React, { PropTypes } from 'react';
import { Link } from 'react-router';
import FlatButton from 'material-ui/FlatButton';
import ContentAdd from 'material-ui/svg-icons/content/add';
const CreateButton = ({ basePath = '' }) => <FlatButton primary label="Create" icon={<ContentAdd />} containerElement={<Link to={`$... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsAirplay = {
name: 'airplay',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6 22h12l-6-6zM21 3H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4v-2H3V5h18v12h-4v2h4c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>`
};
|
(function () {
angular
.module('myApp')
.controller('GroupDigitViewController', GroupDigitViewController)
GroupDigitViewController.$inject = ['$state', '$scope', '$rootScope', '$sce'];
function GroupDigitViewController($state, $scope, $rootScope, $sce) {
$rootScope.setData('showMe... |
import {takeEvery, call, put} from 'redux-saga/effects'
import {fetchSearchId} from "../../api/fetch";
import {FETCH_ID_FETCHING} from "./types";
import {fetchIdFailed, fetchIdSuccess} from "./actions";
import {saveSearchId} from "../tickets/actions";
export function* onGetSearchId() {
try {
const id = yi... |
const {Router} = require('express');
const router = Router();
const jwt = require('jsonwebtoken');
const config = require('../config');
const verifyToken = require('../controllers/verifyToken');
/*
Para guardar los datos de las peticiones post es necesario que el body contenga exactamente los datos solicitados
en... |
import { Fresco } from '../../services/database';
// retourne une fresque par identifiant (PARCELLE)
const getFresco = async (req, res) => {
let { frescoId } = req.params;
try {
const fresco = await Fresco.find({ PARCELLE: parseInt(frescoId) }).value();
if (!fresco) {
return res.j... |
const $ = jQuery = jquery = require ("jquery")
const notification = require ("cloudflare/core/notification")
function initializeCustom ( prop = "value", on = "on" ) {
return function initialize ( event, data ) {
let value
if ( typeof prop === "object" && prop.constructor.name === "Array" ) {
value = prop.reduc... |
/*
* Module code goes here. Use 'module.exports' to export things:
* module.exports.thing = 'a thing';
*
* You can import it from another modules like this:
* var mod = require('prototype.flag');
* mod.thing == 'a thing'; // true
*/
var logger = require("screeps.logger");
logger = new logger("prototype.flag");
F... |
import React from 'react'
import PropTypes from 'prop-types'
import { NavLink } from 'react-router-dom'
import { Icon } from 'semantic-ui-react'
import classes from './StretchSidebarSub_2.module.scss'
const stretchSidebarSub_1 = props => {
const { navigations, showup, activateHandler, childPusher, actives } = props... |
// I think this connects everything to the database and use the logging.js module to allow you to console.log everything as it happens
const log = require('./logging.js') // accesses logging module
const dbConfigs = require('../knexfile.js') // accesses knexfile module that specifies the database to use
log.info('Conn... |
/* baseID is the ID of the element our widget lives in */
function ShardView (baseID) {
/* If this constructor is called without the "new" operator, "this" points
* to the global object. Log a warning and call it correctly. */
if (false === (this instanceof ShardView)) {
console.log('Warning: Sha... |
// For an introduction to the Blank template, see the following documentation:
// http://go.microsoft.com/fwlink/?LinkID=397704
// To debug code on page load in Ripple or on Android devices/emulators: launch your app, set breakpoints,
// and then run "window.location.reload()" in the JavaScript Console.
(function () ... |
Ext.define('cfa.view.Dashboards', {
extend: 'Ext.dataview.DataView',
xtype: 'dashboards',
config: {
title: 'CFA Mobile',
id: 'dashboard',
scrollable: false,
refs: {
main: 'main'
},
baseCls: 'dashboards-list',
itemTpl: [
'<div clas... |
import React from 'react';
import {Tab, Tabs, TabList, TabPanel} from 'react-tabs';
import RingCharts from './ring-charts';
require('./detail.scss');
export default class SlavesDetail extends React.Component {
calculatePercent(used, max) {
return Math.round((used / max) * 100);
}
renderTabHeaders(slaves) {... |
/**
* Created by xuwusheng on 15/11/30.
*/
define(['../app'], function (app) {
app.directive('pl4Query', ['$sce', function ($sce) {
return {
restrict: 'EA',
replace: true,
transclude: true,
//scope:{
// querySeting:'=',
// searc... |
/*jslint node: true */
"use strict";
var http = require('http');
var config = require('./config/config');
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
var cors = require('cors');
var timeout = require('connect-timeout');
var _portSocket = config.APP_PORT;
app.use(co... |
'use strict';
angular.
module('tourDetail').
component('tourDetail', {
templateUrl: '../static/templates/tour/tour-detail.template.html',
controller: ['$routeParams', 'Tour',
function TourDetailController($routeParams, Tour) {
var self = this;
self.tour = Tour.get({tourId: $route... |
// various functions for formatting data
/**
* baseName
* returns the basename of a filename
* greets to https://stackoverflow.com/questions/3820381/need-a-basename-function-in-javascript
*
* @param {string} str - string to get basename of. example: "test.json"
* @returns {string} base - basename of str. exam... |
if(moz) {
extendEventObject();
extendElementModel();
emulateAttachEvent();
}
function viewArc(aid){
if(aid==0) aid = getOneItem();
window.open("archives_do.php?aid="+aid+"&dopost=viewArchives");
}
function editArc(id, returnUrl){
location="AdminEditArticle.do?act=gettype&op=edit&id="+id+"&returnUrl=" + ... |
const video = document.getElementById("myvideo");
const canvas = document.getElementById("canvas");
const context = canvas.getContext("2d");
let trackButton = document.getElementById("trackbutton");
let updateNote = document.getElementById("updatenote");
let points = [];
start = false;
let isVideo = false;
let model =... |
import React from 'react'
// import { connect } from 'react-redux'
// import { BrowserRouter as Router, Route, Redirect } from 'react-router-dom'
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import Header from './components/Header'
import Signin from './components/Signin'
import Signup fro... |
angular.module('app.books')
.controller(
'BookAddController',
function($scope, $window, $location, bookService, Flash, $modal) {
'use strict';
$scope.title = 'title';
$scope.authors = [];
$scope.gridOptions = {
data : 'authors'
};
$scope.addNewBook = function() {
... |
'use strict'
import {
StyleSheet,
View,
Text,
ScrollView,
Dimensions,
} from 'react-native';
import React , {Component} from 'react';
import {connect} from 'react-redux';
import * as Progress from 'react-native-progress';
import TeamsLog from './teamsLog';
const navigationHeight = 30
const headerHei... |
const fs = require('fs').promises;
const findRegex = require('./find');
module.exports = {
async * parseFile(filename) {
try {
const code = await fs.readFile(filename)
yield* this.parseCode(code, filename);
} catch (error) {
yield JSON.stringify({ error, filename });
}
},
* parseCo... |
import React from 'react'
import Gallery from 'react-grid-gallery';
function Mars (props){
const date = props.date;
let IMAGES = [{
src: "https://c2.staticflickr.com/9/8817/28973449265_07e3aa5d2e_b.jpg",
thumbnail: "https://c2.staticflickr.com/9/8817/28973449265_07e3aa5d2e_n... |
import axios from 'axios'
const urlBaseMarvel = 'http://relatorio.prsonline.com.br/api/usuario'
const apiKey = '5e3735b69dc80e8bf8599e8dbd989b42'
export default {
getAllComics: (limit, callback) => {
const urlComics = urlBaseMarvel
axios.get(urlComics).then((comics) => {
if (callback) {
callba... |
// Import here...
const express = require("express");
const router = express.Router();
const films = [
{
id: 1,
title: "Bonnie and Clyde",
director: "Arthur Penn"
},
{
id: 2,
title: "Reservoir Dogs",
director: "Quentin Tarantino"
},
{
id: 3,
title: "Inception",
director: ... |
import React, { Component } from 'react'
import Navbar from './navbar'
import { Link } from 'react-router-dom'
import Servers from './servers'
import Dashboard from './readExcel'
import ReportWithChartJS from './reportWithChart'
class Home extends Component{
state ={
currentPage : ''
}
setCurrent... |
/**
* Created by Kevin Blondel on 05/03/2017.
*/
$.DNA = function () {
this.genes = [];
this.population = 200;
}; |
var BigNumber = require('bignumber.js');
var Tokensale = artifacts.require('./Tokensale.sol');
let presaleStartTime = 1512370800; // 1512568800; // Dec 6, 2pm UTC
let startTime = 1512371800; // 1512655200; // Dec 7, 2pm UTC
let hardCap = fromEtherToWei(5412); // at $462/ETH
let investmentFundWallet = "0xB4e817449b2fcD... |
import { Link } from 'react-router-dom'
import styles from './not-found.module.scss'
export default function NotFound() {
return (
<main className={styles.main}>
<h1>.404</h1>
<div>
The page you are trying to reach does not exist, or has been moved.
<Link className="link" to="/">Go to... |
export const getTodo = (state) => {
return state.taskReducer
} |
const solution = (S, K) => {
let separator = ' ';
let splitedString = S.split(separator);
let count = 0;
let arrayOfSms = [''];
let isItLastWord = index => index === (splitedString.length - 1);
const newSplitedArray = []
splitedString.forEach((el, index) => {
if (!isItLastWord... |
angular.module('myModule', [])
.directive('userListTag', function () {
return {
restrict: 'ECMA',
template: '<ul><li ng-repeat="user in users">{{ user.id }} {{ user.name }}</li></ul>',
replace: true,
controller: function ($scope) {
conso... |
/**
* Created by kingson·liu on 2017/3/12.
*/
goceanApp.controller('AddressCtrl', function ($scope, $rootScope, $state, $timeout, $stateParams, addressService, localStorageService,configService) {
var params = configService.parseQueryString(window.location.href);
if (params.passportId){
params.nickNa... |
$(window).scroll(function (event) {
$scroll = $(window).scrollTop();
$menu = $('header nav').first();
if ($scroll <= 3) {
$menu.removeClass('menu-active');
} else {
$menu.addClass('menu-active');
}
});
/* -----------------------------
Slider Testimonial Section
----------------------------- */
$(... |
var searchData=
[
['porta',['Porta',['../structPorta.html',1,'']]],
['processo',['Processo',['../classProcesso.html',1,'']]]
];
|
import React, { Component } from 'react';
import Attendee from './attendee.png';
import Bullet from './dot.svg';
import Quizz from './quizz.png';
import Venue from './venue.png';
import Speaker from './speaker.png';
import './index.module.css';
const SOCIAL_LINKS = [
{
name: 'facebook',
link: 'https://www.... |
import React, { Component } from 'react'
import RecommendItem from './RecommendItem'
export default class Find extends Component {
PLUBLICURL = process.env.PUBLIC_URL;
recommendMenu = [{
imgUrl: 'imgs/privateFM.jpg',
recommendDes: '私人FM'
}, {
imgUrl: 'imgs/everyDayRecommend.jpg',
recommendDes: '每日... |
/**
* Switchable - jQuery plugin to create a simple iOS style switcher for checkboxes.
* Copyright (c) 2014, Rogério Taques.
*
* Licensed under MIT license:
* http://www.opensource.org/licenses/mit-license.php
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* softwa... |
// Needs to be called with <script id="rca" data-year="2020" data-type="adult" src="..."></script> to work
// Default year is 2020
// type is: adult, train, para, junior, coxie
// Needs the store items like adult-membership, junior-membership, coxie-membership, etc.
// For example:
// <span id="arcextra"></span><script... |
export const titles = {
CONNECTION_ERROR: 'Connection Error',
USER_PROFILE_UPDATED: 'Profile update',
RESET_PASSWORD: 'Password reset',
EMAIL_CONFIRMATION: 'Email confirmation',
CONFIRMATION_EMAIL: 'Confirmation Email',
BASE_CURRENCY_CHANGE: 'Change in base currency',
TIMEZONE_CHANGE: 'Change in timezone'... |
import React, { useState, useEffect, useRef } from 'react';
import { useSelector, useDispatch } from "react-redux";
import { Link as RouterLink } from 'react-router-dom';
import { makeStyles } from '@material-ui/styles';
import {
Card,
CardContent,
CardMedia,
Typography,
Divider,
Link,
Avatar,
Button,
... |
import React from 'react'; // eslint-disable-line no-unused-vars
import { AlignmentToolbar } from '@wordpress/block-editor';
import { Fragment } from '@wordpress/element';
export const ParagraphToolbar = (props) => {
const {
paragraph: {
styleAlign,
},
onChangeStyleAlign,
} = props;
return (
... |
var map;
var graphicsLayer;
require(["esri/map", "esri/layers/ArcGISTiledMapServiceLayer", "esri/tasks/query", "esri/tasks/QueryTask", "dojo/data/ItemFileReadStore", "dijit/form/FilteringSelect", "esri/layers/GraphicsLayer",
"esri/symbols/SimpleFillSymbol", "esri/graphic",
"dojo/dom", "dojo/on", "dojo/domReady!"],... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
const controladorIndex_1 = __importDefault(require("../controlador... |
export default {
basket: {
"title": "Cesta",
"loading": "Espera. Estamos actualizando tu cesta...",
"removeItem": "eliminar {{name}} de tu cesta",
"empty": "Tu cesta está vacía",
"remainingUntilFreeShipping": "Añade otra {{amount, currency}} a tu pedido para tener envío gratuito.",
"totalPrice... |
module.exports = {
title: 'CSS Tricks',
description: '记录常用的 CSS 技巧',
themeConfig: {
nav: [
{ text: '主页', link: '/' },
{ text: 'Github', link: 'https://github.com/onecun' },
],
sidebar: [
['/', '首页'],
{
title: '技巧',
collapsable: false,
children: [
... |
import { args } from '@kuba/router'
import h from '@kuba/h'
import text from '@kuba/text'
function component () {
return (
<text.Strong master dark xxs medium>{args.email}</text.Strong>
)
}
export default component
|
const greeter = (name = 'Guest') => {
console.log(`Hi, ${name}`);
}
greeter('Beto')
greeter(); |
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(45, 250 / 300, 1, 2000);
camera.position.z = 150;
scene.add(camera);
const ambientLight = new THREE.AmbientLight(0xaaaaaa, 0.4);
scene.add(ambientLight);
const pointLight = new THREE.PointLight(0xdddddd, 0.8);
camera.add(pointLight);
const ... |
//adding to an array
//add at the end
let a = [1, 2, 3];
console.log(a);
a.push(4);
console.log(a);
//add at the beginning
a.unshift(0);
console.log(a);
//Removing an item from an array from the end
a.pop();
console.log(a);
//removing an item from the beginning
a.shift();
console.log(a);
//remove at a random posi... |
{
"phoneList": [
{
"id": "001",
"name": "Nexus S",
"img": "Samsung.jpg",
"snippet": "Fast just got faster with Nexus S!",
"age": 0
},
{
"id": "002",
"name": "Nokia X",
"img": "Nokia.j... |
// Load required modules...
var mongoose = require('mongoose');
// Define the schema for our space time model
var spacetimeSchema = mongoose.Schema({
uid: String,
time: Number,
type: String
});
// Create the model for space times and expose it to our app
module.exports = mongoose.model('Spacetime', spa... |
const connection = require("../config/connection.js");
var orm = {
selectAll: function(table, cb){
const queryString = `SELECT * FROM ${table};`;
connection.query(queryString, function (err, result) {
if (err) {throw err;};
cb(result);
});
},
insertOne: func... |
//验证手机号
export default {
isMObile: function(value){
var val = value.replace(/\ +/g, "");
if (!value.match("^((13[0-9])|(14[0-9])|(15[0|1|2|3|5|6|7|8|9])|(17[0-9])|18[0-9])\\d{8}|(170\\d{8})$")) {
return true;
}
},
lengthCheck: function(value, length){
var value = ... |
/* eslint-disable no-extend-native */
/**
* 获取当前字符串hashCode
*/
String.prototype.getHashCode = function () {
var hash = 1315423911
var i = null
var ch
for (i = this.length - 1; i >= 0; i--) {
ch = this.charCodeAt(i)
hash ^= ((hash << 5) + ch + (hash >> 2))
}
return (hash & 0x7FFFFFFF)
}
/**
* 删除... |
/* eslint-disable no-undef */
describe('Favorties view', () => {
it('Should display no favorites yet if no favorites are added', () => {
cy.visit('http://localhost:3000/favorites')
cy.get('h3').contains('No favorites yet')
})
it('Should have a back to home button to take users back to game', () => {
... |
var struct________line________________number________________table____8js__8js_8js =
[
[ "struct____line________number________table__8js_8js", "struct________line________________number________________table____8js__8js_8js.html#a0972131f05347ca1c549bc4337c3dc3d", null ]
]; |
import React, { Component } from 'react';
import Link from 'next/link'
import { getTVshowDetails } from '../lib/moviesLib'
import Layout from '../components/Layout'
import TvModal from '../components/TvModal'
import { Spinner } from 'react-bootstrap';
class TV extends Component {
static getInitialProps({ req, r... |
module.exports = {
schema: {
enums: require("./enums"),
keywords: require("./keywords"),
typeDefs: require("./type-defs"),
},
content: {
breakfasts: require("./breakfasts"),
coffeeBreaks: require("./coffee-breaks"),
lunches: require("./lunches"),
organizers: require("./organizers"),
... |
import React from 'react';
import DeleteIcon from '@material-ui/icons/Delete';
import VisibilityIcon from '@material-ui/icons/Visibility';
import ProductCardForList from '../../SharedComponents/Product/ProductCardForList';
import { useStateValue } from '../../StateProvider/StateProvider';
const CartProducts = (props) ... |
const { expect } = require("chai");
const { YoTest, assert } = require("yo-unit");
const { YoGenerator, YoHelper } = require("../index");
describe("mergePromptOrOption test", () => {
describe("mergePromptOrOption this.prompt test", () => {
class FakeGenerator extends YoGenerator {
async prompting() {
... |
import React from 'react'
import PropTypes from 'prop-types'
import { Spinner, Alert } from 'reactstrap'
import { useIpfsFilesUpload } from 'hooks/useIpfs'
export default function IpfsUploader ({ dir, onDone = () => {} }) {
const path = useIpfsFilesUpload(dir)
if (path == null) {
return (
<Alert color=... |
import { willMount, paint } from '@kuba/h'
import { urlFor } from '@kuba/router'
import component from './component'
import supabase from '@kuba/supabase'
@paint(component)
class Auth {
@willMount
logOut () {
supabase
.auth
.signOut()
.then(() => location.assign(urlFor('logIn')))
return t... |
import { showLoading, hideLoading } from 'react-redux-loading';
import {
getUsers,
userAddAnswerToQuestion,
userAddNewQuestion,
} from './userActions';
import {
_getUsers,
_getQuestions,
_saveQuestion,
_saveQuestionAnswer,
} from '../utils/Data';
import { addNewQuestion, getQuetions, answerQuestion } from... |
'use strict';
{
$('#logout-button').click((e) => {
e.preventDefault();
$.post('/logout', (res) => {
window.location.replace('/');
});
});
}
|
import mongoose, { Schema } from 'mongoose';
const TeamSchema = new Schema({
name: {
type: String,
required: true,
unique: true
},
league: {
type: mongoose.Schema.Types.ObjectId,
ref: 'League'
},
year: {
type: Number,
required: true
},
coach: {
type: String,
required: ... |
$(function() {
window.$Qmatic.components.dropdown.profileSelection = new window.$Qmatic.components.dropdown.BaseDropdownComponent('#prioListModal')
})
|
TQ.floatingPopulationStatistics = function (dfop){
function search(orgId){
var condition = $("#searchByCondition").val();
var initParam = {
"organizationId": orgId
}
if(condition == '请输入姓名或身份证号码'){
initParam = {
"organizationId": orgId,
"searchFloatingPopulationVo.logOut":0,
"searchFloatingP... |
import uiModules from 'ui/modules';
import FilterBuilder from 'plugins/t4p-graph-plugin/services/filterBuilder';
import GraphBuilder from 'plugins/t4p-graph-plugin/services/graphBuilder';
uiModules.get('t4p-graph-plugin').controller('GraphVisController', function ($scope, $element, Private, courier) {
const queryF... |
'use strict';
var express = require('express');
var bodyParser = require('body-parser');
var favicon = require('serve-favicon');
var logger = require('morgan');
module.exports = function () {
var _publicPath;
var _app = express();
var _router = express.Router;
return {
name : 'http',
attach : fu... |
import mongoose, { SchemaTypes } from 'mongoose';
import httpStatus from 'http-status';
import APIError from '../helpers/APIError';
import { SchemaOptions } from '../helpers/utils';
/*
* *****************
* Inputs Schema
*******************
*
* An Input is a given response to a question
*
* Details :
* -----... |
import React, { Component, PropTypes } from 'react';
import { Router, Route, IndexRoute, browserHistory, Link } from 'react-router';
import { connect } from 'react-redux';
import action from '../../Action/Index';
import { Tool, merged } from '../../Container/Tool';
import { DataLoad, DataNull, Header, TipMsgSignin, Get... |
'use strict'; // javascript 严格说明
module.exports = {
/**
* 模块内容定义
* @public
*/
"define": {
"id": "app-error-request-handler",
/** 模块名称 */
"name": "应用程序异常处理",
/** 模块版本 */
"version": "1.0"
},
/**
* 处理应用程序进程异常
* @param {object} app 应用程序实例
* @return {void} ... |
import React from 'react';
import ReactDOM from 'react-dom';
import {Provider} from 'react-redux'
import App from './App';
import StoreGlobal from './reducers/driver'
ReactDOM.render(
<Provider store={StoreGlobal}>
<App />
</Provider>
, document.getElementById('root')
);
// store.dispatch({
// type:'add',
... |
const initialState = {
user_id: 0,
first_name: "",
last_name: "",
email: "",
profile_pic: "",
};
const UPDATE_USER = "UPDATE_USER";
const LOGOUT_USER = "LOGOUT_USER";
export function updateUser(userObj) {
return {
type: UPDATE_USER,
payload: userObj,
};
}
export function logoutUser() {
return... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.