text stringlengths 7 3.69M |
|---|
const productService = require('../services/ProductsServices');
const httpStatus = require('../constants/http-status-codes.json');
const apiResponse = require('../helpers/apiResponse');
const mailer = require("../utility/mailer");
// Retrieve all Accounts from the database.
exports.findAll = async function (req, res) ... |
import SearchBoxUserAddressList from "./component/SearchBoxUserAddressList";
import FormUserAddressInfo from "./component/FormUserAddressInfo";
import { Switch,Route } from "react-router-dom";
function App() {
return (
<div className="App">
<Switch>
<Route exact path="/" component={SearchBoxUserAdd... |
/* eslint no-plusplus: 0 */
import React from 'react';
import { Container, Header, Body, Icon, Right, Content, Form, Item, Label, Input, Radio } from 'native-base';
import { Text, View, TouchableOpacity, StatusBar, ToastAndroid, Alert, AsyncStorage, StyleSheet } from 'react-native';
import PropTypes from 'prop-types';... |
import Head from "next/head"
import Image from "next/image"
import { useEffect, useState } from "react"
import styles from "./firstPanel.module.css"
import useMediaQuery from '@material-ui/core/useMediaQuery';
// one panel that turns into gold, one panel "leave your mark, make your marks on the web", one panel "build ... |
import React from 'react';
import { TabNavigator } from 'react-navigation';
import { Text, View, Image, StyleSheet } from 'react-native';
import MapComponent from '../../components/MapComponent/MapComponent';
import ProfileComponent from '../../components/ProfileComponent/ProfileComponent';
import RespondingComponent ... |
/**
* Created by grahamn on 01/04/2015.
*/
(function ($) {
$(document).ready(function() {
$(".box").click(function() {
$(this).toggleClass("clicked");
})
});
}(jQuery)); |
// import logo from './logo.svg';
import { useState, useEffect } from 'react'
import './App.css';
import AllStations from './components/Allstations'
import CardSelected from './components/cardSelected'
import {listAllStations} from './functions/Stationsfunc'
function App() {
const [allstations, setAllstations] = ... |
$(document).ready(function(){
head_select();
});
function head_select(){
$(".operation-nav").find("ul li a").removeClass("select");
$(".operation-nav").find("ul li a[mark=statistics]").addClass("select");
$(".left-body").find("ul li a").removeClass("select");
$(".left-body").find("ul li a[mark=user]").addClass("se... |
import React from 'react';
import './App.css';
import { useSelector, useDispatch, shallowEqual } from 'react-redux';
import { fetchQuote } from './actions';
import BeatLoader from 'react-spinners/BeatLoader';
export default function App() {
// using the shallowEqual check to prevent unnecessary re-renders
// sugge... |
function writeButton(){
} |
import React from 'react'
import styled from 'styled-components'
import { slide } from './animations'
import { Link } from './ui'
export default function ProjectCard ({ img, url, name, date, description }) {
const [flipped, setFlipped] = React.useState(false)
return (
<Wrapper onClick={() => setFlipped(a => !... |
import React from "react";
import {
StyleSheet,
Text,
View,
Image,
FlatList,
SafeAreaView,
Dimensions,
} from "react-native";
import { useNavigation } from "@react-navigation/native";
import { TouchableOpacity } from "react-native-gesture-handler";
import cardFrente from "../../assets/images/CardFrente.pn... |
function prompt_fun(a){
$(a).after("<div id='Layer1'></div>");
if($('body').height()>$(window).height()){
$('#Layer1').height($('body').height());
}else{
$('#Layer1').height($(window).height());
}
$('#Layer1').width($('body').width());
$(a).css({left:($('body').width()-$(a).width())/2,top:$(window).scrollT... |
import * as mixins from "codogo-utility-functions";
import styled, { css, } from "styled-components";
import PropTypes from "prop-types";
import React from "react";
import { Icon, } from "../Links";
// --------------------------------------------------
// --------------------------------------------------
const Con... |
import React, { Component, PropTypes } from 'react';
import title from '../../util/title';
import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';
/**
* An Input component for a select box, using an array of objects for the options
*
* Pass possible options as an array of obj... |
import { Button, Container, Grid, makeStyles, TextField } from '@material-ui/core';
import { Link } from "react-router-dom";
import React, { useState } from 'react';
import Login from '../login/Login';
const useStyles = makeStyles((theme) => ({
root: {
'& .MuiTextField-root': {
margin: theme.spa... |
#target Illustrator
#targetengine main
// script.name = Swap Object Colors.jsx;
// script.required = Exactly two paths selected;
// script.parent = Herman van Boeijen, www.nimbling.com // 07/12/13;
// Big thanks to CarlosCanto and MuppetMark on the Adobe Illustrator Scripting Forums
if ( app.documents.lengt... |
const colors = {
lightCyan: '#e0fbfc',
lightSeaGreen: '#1b9aaa',
ming: '#27717A',
sapphire: '#12636d',
verdigris: '#44acb9',
}
export default colors;
|
const $sh = require('shelljs')
const fs = require('fs')
const rollup = require('rollup')
const babel = require('rollup-plugin-babel')
const localResolve = require('rollup-plugin-local-resolve')
const buildDir = './build'
/*
*/
const srcDir = {
root: './src',
scss: './src/styles/',
webassembly: './static/pdfwebvi... |
const cp = require('child_process');
const { shell } = require("electron");
const {AutoLanguageClient} = require('atom-languageclient')
class ClangdClient extends AutoLanguageClient {
constructor () {
// enable debug output
// atom.config.set('core.debugLSP', true);
super();
}
getGrammarScopes () { ... |
/*
Ejercicio 106
Crear un documento con el nombre ej106.js
Declarar la función obtenerIDUsuario que retorna un valor number con el número 50
Declarar la función usuarioValido que retorna un valor boolean
En esta función obtener el ID del usuario con la función obtenerIDUsuario
Si el ID del usuario es mayor que 30 reto... |
import Vue from 'vue';
import Router from 'vue-router';
import Home from './views/Home.vue';
Vue.use(Router);
export default new Router({
mode: 'history',
base: process.env.BASE_URL,
routes: [
{
path: '/',
name: 'Home',
component: Home,
},
{
path: '/report',
name: 'Repo... |
import React from 'react'
import {
Form
} from 'reactstrap'
import "./index.css"
import Csctgr from './csctgr'
import Logistic from './logistic'
import Actplt from './actplt'
import Pro from './pro'
const Items = ({csctgr})=>(
<div>
<Form className="mform">
<Csctgr csctgr={csctgr}/>
<Logistic />
<Actplt />
... |
$(function(){
function render(){
setTimeout(function(){
$.ajax({
type:'get',
url:'/cart/queryCart',
dataType:'json',
success:function(info){
console.log(info);
if(info.error){
location.href = 'login.html?retUrl='+location.href;
ret... |
import { Route } from 'react-router'
import React from 'react'
import AppHandler from './components/AppHandler'
export default (
<Route handler={AppHandler} path='/' />
)
|
import APIError from '../../helpers/APIError';
import Question from '../question.model';
// @ts-ignore
import mockData from './questions.mock.json';
/**
* Insert the DB seeds for Questions collection
*/
function run() {
Question.collection.count({}).then(count => {
if (count === 0) {
Question.insertMany... |
new Vue({
el: '#result-table',
data: function() {
return {
visible: false,
tour: 13,
gameList: [
{
team_first: {
name: 'Кристал Пэлас',
flag: 'kristal-pelas.jpg'
},
team_second: {
name: 'Сток Сити',
flag: 'stok-siti.jpg'
},
... |
import React from "react";
export default function tableHeader() {
return (
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">The word</th>
<th scope="col" className="d-lg-none">Word id</th>
<th scope="col">Added</th>
<th scope="col">Pra... |
var app = angular.module("blog", []);
app.config(function($routeProvider){
$routeProvider
.when('/', {
templateUrl: 'blog.html',
controller: 'BlogCtrl'})
.when('/post/:id', {
templateUrl: 'post.html',
controller: 'PostCtrl'});
});
app.controller("BlogCtrl", function($scope, ... |
import Modeler from 'camunda-bpmn-js/lib/camunda-platform/Modeler';
import diagram from '../resources/diagram.bpmn';
import 'camunda-bpmn-js/dist/assets/camunda-platform-modeler.css';
import './app.css';
const modeler = new Modeler({
container: '.canvas',
propertiesPanel: {
parent: '.properties'
}
});
mod... |
// @flow
const naughtyTags = ['porn', 'nsfw', 'mature', 'xxx'].reduce(
(acc, tag) => ({ ...acc, [tag]: true }),
{}
);
export const isClaimNsfw = (claim: Claim): boolean => {
if (!claim) {
throw new Error('No claim passed to isClaimNsfw()');
}
if (!claim.value) {
return false;
}
const tags = cl... |
$(function() {
var addActiveClassToNav = function() {
var pathName = document.location.pathname,
activePath = pathName.split('/')[1],
activeNavLink = $('nav ul li a[href="/' + activePath + '"]');
$('nav ul li').removeClass('active');
activeNavLink.parent().addClass('... |
import React, { Fragment } from 'react';
import { Provider } from 'react-redux';
import App, { Container } from 'next/app';
import { ApolloProvider } from 'react-apollo';
import withRedux from 'next-redux-wrapper';
import initStore from '../libs/store';
import withApollo from '../libs/withApollo';
import './_app.scss'... |
const models = require('../models');
const sendError = (err, res) => {
res.status(500).send(`Error while doing operation: ${err.name}, ${err.message}`);
};
exports.findAll = function findAll(req, res) {
const searchText = req.query.searchText ? `%${req.query.searchText}%` : '%%';
const limit = req.query.pageSiz... |
import React from 'react';
class UploadBox extends React.Component {
render() {
return(
<div className="ms_upload_box">
<h2>Upload and Share Your Music With The World</h2>
<img src="images/svg/upload.svg" alt=""/>
<div className="ms_upload_btn">
... |
"use strict";
const sqlUp =
"ALTER TABLE rolePermissions ADD CONSTRAINT FK_ROLE_PERMISSIONS_TO_ROLES FOREIGN KEY (roleId) REFERENCES roles(id);";
const sqlDown =
"ALTER TABLE rolePermissions DROP FOREIGN KEY FK_ROLE_PERMISSIONS_TO_ROLES;";
module.exports = {
up: (queryInterface, Sequelize) => {
return query... |
import "./App.css";
import LandingPage from "./components/Landing";
import States from "./components/UserComponents/states";
import Cities from "./components/UserComponents/Cities";
import { path, Route } from "react-router-dom";
import Resources from "./components/Resources/Resources";
import { VaccinePage } from "./c... |
import Button from './Button'
const TrainingsPlan = ({title}) => {
// static examples of some training plans
return(
<header className = 'Contain'>
<div className = 'trainPlans'>
<h1>{ title}</h1>
<Button color ='rgb(116, 0, 0)' text ={'Add'} />
... |
import React, { Component } from "react";
import Label from '../../components/LabelComponent';
import {Button, ButtonToolbar, Overlay, Popover} from "react-bootstrap";
//import "../css/AddBucketStyleSheet.css";
export default class ItemDetail extends Component {
constructor(props, context) {
super(props, ... |
var Phaser = Phaser || {};
var GameTank = GameTank || {};
GameTank.StartState = function () {
"use strict";
GameTank.BaseState.call(this);
};
GameTank.StartState.prototype = Object.create(GameTank.BaseState.prototype);
GameTank.StartState.prototype.constructor = GameTank.StartState;
GameTank.StartState.prototyp... |
/**
* Created by jkret on 25/12/2017.
*/
import React, {Component} from 'react';
import axios from 'axios';
import _ from 'lodash';
import '../../style/index.css';
import {List} from '../../components';
import {Customer as C} from '../../models';
import Customer from './Customer';
import CustomerDetails from './Cust... |
const mongoose = require('mongoose');
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const User = require('../models/user');
// Creates a user
exports.users_signup = (req, res, next) => {
User.find({email: req.body.email})
.exec()
.then(user => {
if (user.length ... |
import $ from 'jquery';
class DepWithSelector {
constructor() {
this.dep = $("#depost_btn");
this.with = $("#withdraw_btn");
this.formDep = $("#deposit-form");
this.formWith = $("#withdraw-form");
this.events();
}
events() {
// var that = this;
this.dep.click(this.toggleDepOpe... |
//! \brief Log the update of idTable.
var logUpdateIdTable = function() {
console.log('updateIdTable:' + logoot.idTable);
}
//! \brief Print method prototype.
var logPrototype = function(args, name) {
var prototype = '';
prototype += ' #-> ' + name + '(';
for (var argsId = 0; argsId < args.length; ++ argsId)... |
'use strict';
var Dispatcher = require('../dispatcher/dispatcher');
var ActionTypes = require('../dispatcher/actionTypes');
var EventEmitter = require('events').EventEmitter;
var assign = require('object-assign');
var CHANGE_EVENT = 'change';
var ContactDataStore = assign({}, EventEmitter.prototype, {
addChangeList... |
class OutputComponent {
constructor() {
this.root = this._createComponent();
}
_createComponent() {
const component = document.createElement('ul');
return component;
}
addChild(childNode) {
this.root.appendChild(childNode);
}
getComponent() {
return this.root;
}
} |
/**
* P.views.ReportsAbstract is a base class for simple charts.
*
* @class
* @classdesc Abstract class representing a chart view.
*/
P.views.ReportsAbstract = P.views.Layout.extend({
templateId: 'reports.layout',
ui: {
chart: '.js-chart'
},
events: {
'change .js-display': 'onAttrSelect',
'mo... |
import React from 'react'
import { Modal, Grid, FormGroup, Col, Button, ControlLabel, FormControl } from 'react-bootstrap'
import '../../css/Modal.css'
const EditCardModal = (props) => {
return (
<Modal show={props.showModal} onHide={props.toggleShow}>
<Modal.Header closeButton>
<Modal.Title>Edit... |
export default {
primary: "#ff0083",
dark: "#0a1218",
light: "#efefef"
}; |
import React from 'react';
import {
Platform,
StyleSheet,
TextInput,
TouchableOpacity,
View,
} from 'react-native';
import {color} from '../../theme';
import {responsive} from '../../utils';
import {Text} from '../text/text';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons... |
import React from 'react';
import styles from './Navigation.css';
function Navigation() {
return (
<div className={styles.normal}>
Component: Navigation
</div>
);
}
export default Navigation;
|
import {
REQUEST_ORDERS_SUBMISSION, RECEIVE_GAME_DATA, ORDERS_SUBMISSION_ERROR
} from '../actions/actionTypes';
const defaultState = { loading: false, error: false }
export default function gameDataStatus(state = defaultState, action) {
switch (action.type) {
case REQUEST_ORDERS_SUBMISSION:
return { loa... |
var thumb17="TkSWZ9/CYkrrc5VP0dIfEmWzpWcz3FP6jmPx9rlbjigAvDzIbgJzza2DuUGJO6ELfhjc1KFIUqlRn/gKsUwjzdDI+u7b9DM4XSUJjXksWz75BgmIezs7U8NrvrjAeZM3aoDLh2QaGueSvvnvKy60DtVP2IpMfLmGxy4QsspuS15GGUmskpI2nEIkTzKIrx5FfQLgvR05DCeSipF0IRMtlJhxv1Y23hRERL6tT8xld0ZQVa/d6rc/T05mNT/a1jEHPCBUwoeuVqk9bZh5UqOS1tY9fL/ItP3U//jKqt7/mh0II7ZUWp... |
angular.module("instaWall")
.factory("instagram", function($resource) {
return {
fetchPic: function(callback) {
var api = $resource("https://api.instagram.com/v1/users/self/media/recent/?&client_id=:client_id&callback=JSON_CALLBACK&access_token=:access_token", {
... |
import React, { Component } from 'react'
import { Text, View, Dimensions, ScrollView } from 'react-native'
import { Header, Container, Content, Footer, Icon, Button, Row } from 'native-base'
import {Actions}from 'react-native-router-flux'
var { height, width } = Dimensions.get('window');
class Terms extends Component... |
import React, {Component} from 'react';
import classNames from 'classnames';
import css from './TrainingStatusFilter.styl';
export default class TrainingStatusFilter extends Component {
render () {
return (
<div className={classNames(css.root)}>
<button className="btn btn-all">Al... |
var slideObj,dropObj;
$(function () {
// declaration
slideObj = $("#LayoutSection_ControlsSection_sliderContent").data("ejRotator");
slideObj.option("change", "onChange");
dropObj = $('#LayoutSection_PropertySection_itemMove... |
// © 2019 Fraffel Media. MultiBot is created by FAXES (FAXES#8655). View the license!
const Discord = require("discord.js");
const botconfig = require("../../botconfig.json");
module.exports.run = async (bot, message, args) => {
if (!message.channel.name.startsWith(`ticket-`)) return message.channel.send(`You... |
/*
Copyright 2016-2018 Stratumn SAS. 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
Unless required by applicable l... |
import React from 'react';
class CartItem extends React.Component{
render(){
const {price , title , qty} = this.props.product;
const {
product,
onDecreaseQuantity,
onIncreaseQuantity,
onDeleteQuantity} = this.props;
return(
<div c... |
/**
* 申请售后 选择类型
*/
import React, { Component, PureComponent } from "react";
import {
StyleSheet,
Dimensions,
View,
Text,
Button,
Image,
ScrollView,
TouchableOpacity
} from "react-native";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import actions ... |
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
get myX() {
return this.x;
}
set myX(value) {
this.x = value;
}
toString() {
return `(${this.x}, ${this.y})`;
}
static myStatic() {
}
}
let inst = new Point(1,4);
console.log(Point.mySt... |
import React, {PropTypes} from 'react';
import Footer from './Footer';
import AddTodo from './AddTodo';
import VisibleTodoList from './VisibleTodoList';
const TodoApp = () => (
<div>
<h2>To do</h2>
<AddTodo />
<VisibleTodoList />
<Footer />
</div>
);
TodoApp.propTypes = {
p... |
import React, {Component} from 'react';
import {Card } from 'reactstrap';
import {connect} from 'react-redux';
import {withRouter , Link} from 'react-router-dom';
const mapStateToProps = state => {
return{
products: state.products
}
}
const RenderCreams = ({ product }) => {
const creams = prod... |
import React from 'react'
const UnreadTipBox = ({state,number}) => {
return(
<div className = 'countinfoBox'
style = {{display : number == 0 ? 'none' : 'block'}}
>
<div className = 'unreadMsg'>
<div className = 'upArrow icon-gm'></div>
<div className = 'unreadMsgContent'>{number}条未读... |
export const functionStart = {
name: 'functionStart',
match: '\\(',
onMatch: (match, program, context) => {
context.push({name: 'function'})
// TODO
context.push({name: 'functionArguments' || 'functionBody'})
},
}
|
Template.channelSubmit.events({
'submit form': function (e) {
e.preventDefault();
var channel = {
name: $(e.target).find('[name=name]').val()
};
Meteor.call('channelInsert', channel, function (error, result) {
//display the error to the user and abort
... |
// Read JSON javascript
// Essentials +++++++++++++++++++++++++++++++++++
const fs = require('fs');
function jsonReader(filePath, cb) {
fs.readFile(filePath, (err, fileData) => {
if (err) {
return cb && cb(err)
}
try {
const object = JSON.parse(fileData)
... |
'use strict';
module.exports = function(grunt) {
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
// Automatically load required Grunt tasks
require('jit-grunt')(grunt, {
cafemocha: 'grunt-cafe-mocha'
});
// Configurable paths for the application
var appConfig ... |
/**
*
*/
// Classe
Calculadora = function (marca){
this.marca = marca;
// Métodos
this.descobrirMaior = function(idCampo1,idCampo2){
var n1 = document.getElementById(idCampo1).value;
var n2 = document.getElementById(idCampo2).value;
if (n1 > n2){
window.alert(n1 + " é maior que " + n2);
}else if (... |
import React from "react";
import {Button, Modal, Dropdown, ButtonGroup, Form} from 'react-bootstrap';
export default class ExerciseModal extends React.Component {
constructor(props) {
super(props);
this.resetState();
}
resetState = () => {
this.state = {
show: false,
date: this... |
var fs = require('fs');
var options = {encoding:'utf8', flag:'r'};
console.time('时间经过起点');
fs.readFile('test.txt', options, function(err, data){
if(err){
console.log('Failed');
}else{
console.log(data + '异步');
console.timeEnd('时间经过终 点');
}
});
console.log('-----1');
var fd = fs.readFileSyn... |
import React from "react";
import { withRouter, Link } from "react-router-dom";
import { connect } from "react-redux";
import Api from "../data/Api";
import { ReactComponent as Spinner } from "../assets/svg/spinner.svg";
import { Calendar, momentLocalizer } from "react-big-calendar";
import moment from "moment";
import... |
$(document).ready(function() {
$('input')[0].oninput = function() {
sNamepattern = /^[A-Za-z]+$/;
sName = $('#userName').val();
if (sName.match(sNamepattern)) {
$('#uincorrect').css("display", "block");
$('#name').addClass("has-success");
... |
console.log('all new fun')
window.addEventListener("load", init);
function checkPrices(offers) {
for (let offer of offers) {
//console.log(offer);
}
console.log(offers)
selectOffer(offers[0]);
}
function selectOffer(offer) {
offer.click()
}
function init() {
let checkExist = setInter... |
/*
*author:秦浩
*Create date: 2009-05-18
*Description: 更新指定物流公司联系人
*/
function UpdateWuLiuJS(id)
{
this.id = id;
this.name = $.trim($("#txtContactor"+id).val());
this.photo = $.trim($("#txtContactorPhone"+id).val());
this.URL = "./CallBack/UpdateWuLiu.ashx?" + new Date(); //接收客户端参数的服务器处理程序
}
... |
// Particle Module
// TO DO: add lifespan
"use strict";
define(["vector"], function(Vector) {
var Particle = function () {
function Particle(point, velocity, acceleration) {
this.position = point || new Vector(0, 0);
this.velocity = velocity || new Vector(0, 0);
this.acceleration = acceleratio... |
const utternance = new SpeechSynthesisUtterance();
utternance.rate = 2;
utternance.lang = "pt-BR";
function speak() {
speechSynthesis.speak(utternance);
}
function stop() {
speechSynthesis.cancel();
}
function setText(event) {
utternance.text = event.target.innerText;
}
|
import model from "../models/models.js";
const food = {
model: model.Food,
createFood: function (req, res) {
if (!req.body) {
res.status(400).json("Post HTTP Data not provided");
}
const { food, name, image_url, cents } = req.body;
const Food = food.model;
const Create = new Food({
... |
import { makeStyles } from "@material-ui/core/styles";
const useStyles = makeStyles(theme => ({
container: {
paddingTop: "2rem",
width: "90%",
margin: "0 5%",
float: "left",
display: "flex",
flexDirection: "row-reverse",
justifyContent: "center",
flexWrap: "wrap",
[theme.breakpoin... |
test2 += '\tExternal BODY (script8.js)\n'; |
import React from "react";
import GPXMap from './components/Map';
import Overlay from './components/Overlay';
import Loader from './components/Loader';
import Draw from './components/Draw';
import {SportsLib} from '@sports-alliance/sports-lib';
import { saveAs } from 'file-saver';
import { serializeObjv2 } from './ut... |
/*
* VUE STORE
*/
import Vue from 'vue';
import Vuex from 'vuex';
import {
addStorePropertyItem,
addStorePropertyItems,
updateStoreProperty,
updateStorePropertyItem,
removeStorePropertyItem,
} from './utilities';
/*
* Enable stores.
*/
Vue.use(Vuex);
/*
* Export a configured store.
*/
export default new V... |
/**
* 화면 초기화 - 화면 로드시 자동 호출 됨
*/
function _Initialize() {
// 단위화면에서 사용될 일반 전역 변수 정의
$NC.setGlobalVar({
// 마스터 데이터
masterData: null,
// 온라인 데이터
subData: null,
onStockInfoViewTimeout: null
});
$NC.setInitDatePicker("#dtpOrder_Date"); // 예정일자
$NC.setInitDatePicker("#dtpBu_D... |
const StringStatistics = (value) => {
const original = typeof value === "string" ? value : "";
const trimmed = original.trim();
return {
paragraphs: trimmed ? (trimmed.match(/\n+/g) || []).length + 1 : 0,
words: trimmed ? (trimmed.replace(/['";:,.?¿\-!¡]+/g, "").match(/\S+/g) || []).length ... |
/**
* Created by rs on 08/01/17.
*/
import RootComponent from './Components/RootComponent'
import {Route, IndexRoute} from 'react-router'
import React from 'react';
import RideAdd from './Containers/RideAddContainer'
import MemberAdd from './Containers/MemberAddContainer'
import PlaylistsAdd from './Containers/Playli... |
import alt from '../alt';
class ModalActions{
showLoginModal(){
this.dispatch({});
}
closeLoginModal(){
this.dispatch({});
}
showRegisterModal(){
this.dispatch({});
}
closeRegisterModal(){
this.dispatch({});
}
showVerificationModal(){
this... |
import React from 'react';
import { StyleSheet, Text, View} from 'react-native';
export default class Wrong extends React.Component {
state={
usertitle:'',
lives:0,
initials:''
}
componentDidMount(){
var { navigation } = this.props;
var user = navigation.getParam('userobj');
temp=user.getF... |
import React from 'react';
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
import logo from './logo.svg';
import './App.css';
import Clock from './Clock';
import SolarSystemCollection from './SolarSystemCollection';
import Navbar from './Navbar';
import Homepage from './Homepage';
import Object... |
import React from 'react';
import './About.css'
function About(){
return(
<>
<div className='About'>
<h1> About Conway's Game Of Life</h1>
<h2> The Rule:</h2>
<div className='surround'>
<ul>
For a space that is 'populated':
... |
/*
* @Description:
* @Author: rodchen
* @Date: 2020-10-26 14:13:46
* @LastEditTime: 2020-10-29 11:07:35
* @LastEditors: rodchen
*/
/* eslint-disable import/no-unresolved */
import React from 'react';
import { useModel, useIntl, history, getLocale } from 'umi';
import { PageContainer } from '@ant-design/pro-layou... |
"use strict";
var archetype = require("../../archetype");
var mergeWebpackConfig = archetype.devRequire("webpack-partial").default;
module.exports = function () {
return function (config) {
return mergeWebpackConfig(config, {
devtool: "inline-source-map"
});
};
};
|
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var mongooseUniqueValidator = require('mongoose-unique-validator');
var schema = new Schema({
firstname: {
type: String,
required: true
},
lastname: {
type: String,
required: true
},
password: {
type: ... |
$(document).ready(function() {
$("#quiz form").submit(function(event) {
var yourNameInput = $("input#yourName").val();
var customName = $("input:radio[name=customName]:checked").val();
var yourNewName = yourNameInput.concat(customName)+"!";
var favoriteColor = $("#color").val();
var favoriteLocati... |
/* Set the width of the side navigation to 250px and the left margin of the page content to 250px and add a black background color to body */
function openNav() {
document.getElementById("mySidenav").style.width = "250px";
document.getElementById("main").style.marginLeft = "250px";
document.body.style.b... |
const ExpressError = require('../helpers/expressError');
const jwt = require('jsonwebtoken');
const { SECRET } = require('../config');
function authenticateJWT(req, res, next){
try {
const tokenFromBody = req.body._token;
const payload = jwt.verify(tokenFromBody, SECRET);
req.user = payload; // create a... |
import React, { useRef, useLayoutEffect, useEffect, useState } from 'react';
import styled from 'styled-components'
import { getReferencedMousePos, constrain } from '../utility/getMousePos';
const Line = styled.line`
stroke-width: 6;
stroke: ${props => props.color};
stroke-linecap: round;
`
const Circle =... |
import React from 'react'
import '../css/myFavorite.scss'
import shoucang1 from '../static/home/收藏夹.png'
import shoucang2 from '../static/home/收藏夹(黑白).png'
class MyFavorite extends React.Component{
render() {
return(
<div id={'myFavorite'}>
<div id={'myFavoriteTitle'}>
... |
module.exports = {
name: 'ember-cli-datepicker',
included: function(app) {
this._super.included(app);
app.import('bower_components/momentjs/moment.js');
app.import('bower_components/pikaday/pikaday.js');
app.import('bower_components/pikaday/css/pikaday.css');
}
};
|
import {
FETCH_TICKETS_FAIL,
FETCH_TICKETS_FETCHING,
FETCH_TICKETS_SUCCESS,
SAVE_ID, SAVE_SLICED_TICKETS,
SAVE_SORTED_TICKETS,
SAVE_TICKETS
} from "./types";
const initialState = () => ({
tickets: [],
slicedTickets: [],
stop: false,
searchId: null,
fetchStatus: 'idle'
})
e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.