text stringlengths 7 3.69M |
|---|
/**
* Created by I305845 on 21/05/2016.
*/
// load the things we need
var mongoose = require('mongoose');
// define the schema for our matches model
var matchesSchema = mongoose.Schema({
matchID: Number,
team1: String,
team2: String,
kickofftime: Date,
winner: String,
team1score: String,
... |
module.exports = function () {
return function (context) {
console.log('# Search RegEx Hook');
console.log(context.method);
const query = context.params.query;
for (let field in query) {
if(query[field].$search && field.indexOf('$') == -1) {
console.log('## inside $search');
que... |
const fetch = require('node-fetch');
const to = require('await-to-js').default;
// make array of numbers since each cafe id is just a sequential number starting at 0
const cafeNumbers = Array.from(Array(25).keys());
const main = async () => {
const cafeData = await Promise.all(cafeNumbers.map(async (v) => {
v =... |
import { merge } from "lodash";
import {
RECEIVE_CURRENT_USER,
LOGOUT_CURRENT_USER
} from "./../actions/session_actions";
import { RECEIVE_CHATS, RECEIVE_CHAT } from "./../actions/chat_actions";
import { CLEAR_ORDER } from "./../actions/order_actions";
import {
RECEIVE_MESSAGE,
RECEIVE_MESSAGES
} from "./../act... |
const TABLE_NAME = 'counter';
exports.seed = function (knex, Promise) {
return knex(TABLE_NAME)
.del()
.then(() => {
return knex(TABLE_NAME).insert({ value: 0 });
});
};
|
var $ = require('fe:widget/js/base/jquery.js');
var cookie = require('fe:widget/js/base/cookie.js');
var events = require('fe:widget/js/lib/events.js');
var config; // login组件的配置项
var userinfo; // 用户信息
var instance; // 登录实例
var isPc = true; // 通过屏幕尺寸判断是否pc,登录框width*1.5为pc
var login;
var loginFlag;
// var pa... |
require("dotenv").config();
//required to import the keys.js file
var keys = require("../keys");
//get the key data from keys
var spoonacularId = keys.AppKeys.SpoonId;
//const path = require("path");
const axios = require("axios");
//const router = require("express").Router();
//const bookController = require("..... |
let txtExample = document.getElementById("txtExample");
let dvFound = document.getElementById("dvFound");
let objects = [
{ color: "#FF0000", height: 100, width: 300 },
{ color: "#FFFF00", height: 200, width: 200 },
{ color: "#ff0000", height: 300, width: 100 },
];
function makeDivs() {
for (va... |
import ContentSubmission from "./ContentSubmission";
export default ContentSubmission;
|
jQuery(document).ready(function() {
/** Function select2 */
if (document.getElementById('searchProductSelect2')) {
$('#searchProductSelect2').select2({
ajax: {
url: queryVariantProduct,
dataType: 'json',
method: 'POST',
delay: 2... |
const db = require('./../models');
const queries = require('../queries');
db.query(queries.airport.dropTable).then((data) => {
});
db.query(queries.airlines.dropTable).then((data) => {
});
|
import React from 'react';
import ReactDOM from 'react-dom';
import { CookiesProvider } from 'react-cookie';
import './google-fonts.css';
import './reset.css';
import './index.css';
import registerServiceWorker from './registerServiceWorker';
import Header from './Modules/Main/Header'
import Body from './Modules/Main/... |
/*global beforeEach, describe, it, assert, expect */
'use strict';
describe('ProfileInfo Collection', function () {
beforeEach(function () {
this.ProfileInfoCollection = new PipedriveTest.Collections.ProfileInfo();
});
});
|
import { React } from 'react';
import { injectGlobal } from 'styled-components';
import { Grid, Row, Column } from './Grid';
import { Form, TextInput, TextInputArea, RadioBox, CheckBox, Label, Fieldset, Select, Legend } from './Forms';
import { Anchor, H1, H2, H3, H4, H5, H6, Strong } from './Typography';
import { Rul... |
var ga = ga || function(){};
|
const asar = require('asar');
const npm = require("npm")
const { join } = require('path');
const diff = require('diff');
const fs = require('fs');
const { app } = require('electron');
const hashfile = require("sha256-file")
const MergeTrees = require("merge-trees")
const Module = require("module");
const app... |
'use strict';
const fs = require('fs');
const meow = require('meow');
const request = require('request');
const SmallRepoSize = 150;
const cli = meow(`
Usage
$ scour-github <search-term>
Options
--html Output results in HTML
--ignore-small Ignore "small" repositories
--min-size={value} Min... |
import Model, { attr, hasMany } from '@ember-data/model';
export default class PanelModel extends Model {
@attr layoutRowClass;
@attr layoutColumnClass;
@attr otherClasses;
@hasMany('illustration', { async: false }) illustrations;
}
|
const { app, BrowserWindow, remote } = require( 'electron' )
const https = require( 'https' )
let win;
var createWindow = function createWindow () {
// Create the browser window.
win = new BrowserWindow( { width: 800, height: 600 } );
global.getAddress = getAddress;
// and load the index.html of the app.
... |
require('dotenv').config()
const mongoose = require("mongoose");
class DB {
constructor() {
const app = express();
const dbURI = process.env.MONGODB_URI
mongoose.connect(this.dbURI)
then((result) => app.listen(3000))
}
}
|
function playSound(e) {
const audio = document.querySelector(`audio[data-beat="${e.keyCode}"]`);
if (!audio) return;
audio.currentTime = 0;
audio.play();
hideAllDots(e);
const dot = document.querySelector(`.dot[data-beat="${e.keyCode}"]`);
dot.style.display = 'block';
setTimeout(hideA... |
//add search fields
$(document).ready(function () {
var maxField = 10; //Input fields increment limitation
var addButton = $('.add_button'); //Add button selector
var wrapper = $('.add-group'); //Input field wrapper
var x = 1; //Initial field counter is 1
var fieldHTML =
'<div class=" side... |
export default {
theme: 'modern',
skin_url: '/tinymce/skins/lightgray',
codesample_content_css: '/prism/prism.css',
statusbar: false,
autoresize_min_height: 500,
language_url: '/tinymce/langs/zh_CN.js',
plugins: `print preview searchreplace autolink directionality visualblocks visualchar... |
/*global Backbone */
var App = App || {};
(function () {
// Create Foods Collection View
App.Views.Foods = Backbone.View.extend({
tagName: 'ul',
className: 'selected-result',
// listen to collection add event. Then call a method to create an element and append to the DOM.
initialize: function(){
this.c... |
import React from 'react';
import Search from '../Images/iconsearch2.png';
import Plus from '../Images/plus.svg';
import SettingIcon from '../Images/settings.svg';
import Pencil from '../Images/pencil.svg';
import { Link } from "react-router-dom";
//Compontente stateless com interface principal da tela administrativa
... |
const navbar = document.querySelector('.fixed-top');
window.onscroll = () => {
if (window.scrollY > 300) {
navbar.classList.add('nav-active');
} else {
navbar.classList.remove('nav-active');
}
}; |
import styled from 'styled-components';
const BookingSummaryListWrapper = styled.div`
display: block;
margin-bottom: 8px;
`;
export default BookingSummaryListWrapper |
import React, { Component } from 'react';
import {TodoForm, TodoList} from './components/todo';
import {addTodo, generateId, findById, toogleTodo, updateTodo} from './lib/todoHelpers'
import './App.css';
class App extends Component {
state = {
todos: [
{id: 1, name: 'Item for todo 1', isComplete: false },
... |
var app = window.angular.module('app', []);
app.controller('mainCtrl', mainCtrl);
var api_root = "/message";
function mainCtrl($scope, $http) {
$scope.name = "";
$scope.sendingMessage = "";
$scope.pin = "";
$scope.retrievePin = "";
$scope.retrieveName = "";
$scope.retrievedMessage = "Secret Mes... |
$('.menu-title').click(function(){
$('.menu-title').removeClass('active');
$(this).addClass('active');
});
$('.sub-menu li').click(function(){
$('.sub-menu li').removeClass('active');
$('.sub-menu li .fa-star').removeClass('fa-star').addClass('fa-star-o');
$(this).addClass('active');
$(this).find('i').rem... |
app.factory("User", function($http, $cookies) {
var url = "/api/usuario/"
return {
login: function(rfc, pass) {
return $http.post(url + 'entrar/', {
rfc: rfc,
pass: pass
});
},
signup: function(razon, email, rfc, pass) {
... |
const MyPureComponent = () => {
return (
<h1>MyPureComponentTest</h1>
)
}
ReactDOM.render(
<MyPureComponent />,
document.getElementById('myPureComponent')
)
|
import React, { Component } from 'react';
import Panel from 'react-bootstrap/lib/Panel';
import './Post.css';
class Post extends Component {
render() {
return (
<Panel>
<Panel.Heading> {this.props.title} </Panel.Heading>
<Panel.Body> {this.props.content} </Panel.Body>
</Panel>
);... |
import React, { Component } from "react";
import {
View, Text, StyleSheet
} from "react-native";
export default class HinhChuNhatComponent extends Component {
render() {
return (
<View style={ao.ti}>
<Text>{this.props.textComponent} - {this.props.text2}</Text>
</... |
const { Client, Message, MessageEmbed } = require("discord.js");
const BoltyUtil = require("../../classes/BoltyUtil");
/**
*
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
module.exports.run = async (client, message, args) => {
if (!message.member.permissions.has("ADMINISTRATOR... |
requirejs.config({
baseUrl: "js"
});
requirejs(["./a"], function(a) {
// a.js和b.js文件在baseUrl目录下可以正常进行,但如果在其他路径,报错
a.method();
console.log("Success!");
}); |
import React, { Component } from "react";
import { Container } from "./styles";
//conectar nosso componente com o redux
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import { Creators as RepositoriesActions } from "../../store/ducks/repositories";
import { ActivityIndicator, Text } ... |
const text = {
fontFamily: 'Acme'
};
const label = Object.assign({}, text, {
color: '#fff',
fontSize: '32px',
});
const title = Object.assign({}, label, {
align: 'center',
backgroundColor: '#2DAA58',
fontSize: '64px'
});
const button = Object.assign({}, label, {
fontSize: '64px',
align: 'center',
})... |
import React from 'react';
import {NavLink} from "react-router-dom";
const NavigationItem = (props) => {
return <NavLink style={{
textDecoration: "none",
fontWeight: "bold",
textTransform: "capitalize",
color: "black",
margin: '5px'
}}
to={props.to}
... |
export const FETCH_SUMMONER = 'FETCH_SUMMONER';
export const RECEIVE_SUMMONER = 'RECEIVE_SUMMONER';
export const fetchSummoner = (summoner) => ({
type: FETCH_SUMMONER,
summoner
});
export const receiveSummoner = (summoner) => ({
type: RECEIVE_SUMMONER,
summoner
});
|
$(function () {
/*相应变色*/
$('.column-header ul li').on('mouseover', function () {
$(this).addClass('active').siblings().removeClass('active');
/*相应变色*/
var index = $.inArray(this, $(this).parent().children().toArray());
var $div = $(this)
.parent().parent()
... |
// AppRoot.jsx
import React from 'react';
import ListStore from '../stores/ListStore';
import AppDispatcher from '../dispatcher/AppDispatcher';
// Sub components
import NewItemForm from './NewItemForm';
// Method to retrieve state from Stores
let getListState = () => {
return {
items: ListStore.getItems()
};
... |
if ('workbox' in self) {
workbox.precaching.precacheAndRoute(self.__precacheManifest || []);
}
self.addEventListener('push', event => {
const message = JSON.parse(event.data.text())
const { title } = message
const { url } = message
const options = {
body: message.body,
icon: message.icon,
badge: message.bad... |
export const convert = (totalMinutes) => {
const minToHour = (totalMinutes / 60);
const hours = Math.floor(minToHour);
const minuteResult = (minToHour - hours) * 60;
const minutes = Math.round(minuteResult);
return {
toHours: hours,
toMins: minutes
}
}
export const twoDigitsFormat ... |
import styles from '../../styles/components/slider.module.css'
import { files } from './files'
export default function Slider() {
return (
<div className={styles.caroussel}>
<div className={styles.gallery}>
<img src={files[0].src} alt="" />
<div className={styles.texts}>
<h1>{fi... |
/**
* Created by sanya on 20.04.2016.
*/
'use strict';
angular.module('app')
.controller('RootController', ['$scope', '$uibModal', function ($scope, $uibModal) {
$scope.showWorkoutHistory = function () {
var dialog = $uibModal.open({
templateUrl: 'partials/workout-history.html... |
DefaultScript.global.expect = remember(null, '@expect', function $logic$(scopes, step, stepName, actualValue, onException) {
var label = '@expect(actual: ' + DefaultScript.global.type(actualValue) + ')';
return remember(null, label, function $trap$(scopes, step, stepName, expectedValue, onException) {
if (actua... |
// 2 below will be add in the future development
// for future require bootstrap-datetimepicker
// for future require bootstrap_datetimepicker/dates
//= require jquery3
//= require jquery_ujs
//= require rails-ujs
//= require bootstrap-sprockets
//= require sweetalert2
//= require sweet-alert2-rails
//= require bootst... |
import React, {useState} from 'react';
import './search-bar.css'
import Autosuggest from 'react-autosuggest';
const SearchBar = ({searchKeyword, onQuerySelected}) => {
const [suggestions, setSuggestions] = useState([]);
const [value, setValue] = useState("");
const handleSearch = async (keyword) => {
... |
import axios from "axios";
export const FETCH_SMURFS = "FETCH_SMURFS";
export const FETCHED_SMURFS = "FETCHED_SMURFS";
export const ADDING_SMURF = "ADDING_SMURF";
export const ADDED_SMURF = "ADD_SMURF";
export const DELETING_USER = "DELETING_SMURF";
export const DELETED_USER = "DELETED_SMURF";
export const UPDATING_SMU... |
const ACTIONS = {
JOIN_SERVER: 'JOIN_SERVER',
SET_WINNER: 'SET_WINNER',
SET_GAME_DATA: 'SET_GAME_DATA',
SET_PLAYER_NUMBER: 'SET_PLAYER_NUMBER',
SET_ROOM: 'SET_ROOM',
SET_TURN: 'SET_TURN',
SET_ERRORS: 'SET_ERRORS',
SET_ERROR_EXIST: 'SET_ERROR_EXIST',
CLEAR_ERRORS: 'CLEAR_ERRORS',
};
export default ACT... |
// Register Card template
Vue.component('card', {
template: '#cardTpl',
data: {
ticks: [],
skipped: false,
flipped: false
},
computed: {
completed: function() {
if (this.skipped) return true;
else return (this.done >= this.repeat);
}
},... |
/**
* Route Mappings
* (sails.config.routes)
*
* Your routes map URLs to views and controllers.
*
* If Sails receives a URL that doesn't match any of the routes below,
* it will check for matching files (images, scripts, stylesheets, etc.)
* in your assets directory. e.g. `http://localhost:1337/images/foo.jpg`... |
var _viewer = this;
var height = jQuery(window).height() - 50;
var width = jQuery(window).width() - 200;
//取消行点击事件
$(".rhGrid").find("tr").unbind("dblclick");
//每一行添加编辑和删除
$("#TS_BM_GROUP_USER .rhGrid").find("tr").each(function (index, item) {
if (index != 0) {
var dataId = item.id;
$(item).find("td... |
import React from 'react';
import gql from 'graphql-tag';
import { useRouter } from 'next/router';
import { useMutation } from '@apollo/react-hooks';
import Form from './styles/Form';
import formatMoney from '../lib/formatMoney';
import Error from './ErrorMessage';
import { useForm } from '../hooks/useForm';
export co... |
//==================================
// NEWS READER
//==================================
/*
Composite pattern is used for this solution
To extend the code with new type like hastag,
we will have to create a method name called
hashtagFormatter that will consume the factory
function 'formatterInterface' using functio... |
import React, { Component } from "react";
import NavBar from "./components/NavBar/NavBar";
import TopDestinations from "./components/TopDestinations/TopDestinations";
import Products from "./components/Products/Products";
import MainContent from "./components/MainContent/MainContent";
import Form from "./components/For... |
const state = [{
href: "flexBoxGallery/",
text: "Simple Flexbox Gallery"
},
{
href: "intervalTimer/",
text: 'Interval Timer'
},
{
href: "calculator/",
text: 'Calculator'
},
{
href: "taskList/",
text: 'Task List'
},
{
href: "randomPonyName/",
text: 'MLP Name Genera... |
const {
AkairoClient,
CommandHandler,
ListenerHandler,
} = require("discord-akairo");
const { Intents } = require("discord.js");
const { join } = require("path");
const { CreatePrompt } = require("../Utility/CreatePrompt");
const config = require("../config");
const { CreateEmbed } = require("../Utility/CreateEmb... |
import React from 'react'
import { storiesOf } from '@storybook/react'
import DragContainer from '../components/DragContainer.js'
storiesOf('DragContainer', module)
.add('testing', () => {
class Foo extends React.Component {
render () {
return (
<div
ref={this.props.dragConta... |
import React from 'react'
import { connect } from 'react-redux'
class Layers extends React.PureComponent {
render() {
const { layers, layer, opacity, setOpacity } = this.props
if (!layers || !layers.length) return null
return (
<div>
<input type="range"
min={... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const Breed = new Schema(
{ title: String },
{ collection: 'breeds' }
);
const toResponse = (breed) => {
const { id, title } = breed;
return { id, title };
};
module.exports = {
Breed: mongoose.model('breeds', Breed),
toResponse,
};
|
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, {Component} from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Navigator, //存放界面你的栈的容器
} from 'react-native';
//引入主界面
var Home = require('./js/TabBottom');
//相当于application,Navigatory一定要在应... |
/**
* Created by liu 2018/6/5
**/
import React, {Component} from 'react';
import {Form, Select, Input, Radio, Button, DatePicker, message} from 'antd';
import moment from 'moment'
const RadioGroup = Radio.Group;
const Option = Select.Option;
const FormItem = Form.Item;
function hasErrors(fieldsError) {
return ... |
import { Text, View, Image, ScrollView, StyleSheet, Alert, TouchableOpacity, AppState, StatusBar } from 'react-native'
import React from 'react';
import expect from 'expect';
import Enzyme, { shallow } from 'enzyme';
import { Provider } from "react-redux";
import Adapter from 'enzyme-adapter-react-16';
import store fr... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (Vue) {
Vue.directive('touch', {
bind: function bind(el, binding, vnode) {
var type = binding.arg; // 传入点击的类型
var coordinate = {}; // 记录坐标点的对象
var time... |
/**
* @param {number[]} numbers
* @param {number} target
* @return {number[]}
*/
//same solution as twosum
var twoSum = function (numbers, target) {
const N = new Map();
for (let i = 0; i < numbers.length; i++) {
N.set(numbers[i], i);
// stills work the arr is non-descreasing,
//if at least two n e... |
import React from 'react';
import { shallow } from 'enzyme';
import Stars from '../client/src/components/Stars.jsx';
import { stars } from './testDummyData.js' ;
describe('Stars', () => {
it('should be defined', () => {
expect(Stars).toBeDefined();
});
it('should render correctly', () => {
const tree = s... |
let btnNav = document.querySelector('.mobile');
let links = document.querySelector('.links');
let btnClose = document.querySelector('.close');
let btnLinks = document.querySelectorAll('li');
let titleCapa = document.querySelector('.titulo__capa');
let target = document.querySelectorAll('.animate');
let animateClass = ... |
function reverseWords(string){
var stringArr = string.split(' '),
newArr =[];
stringArr.forEach(element => {
newWord = ""
for (i = element.length; i > 0; i--){
newWord += element[i - 1]
console.log(element, i)
}
newArr.push(newWord)
});
return newArr.join(' ')
}
console.lo... |
class Card {
// getTemplate - возвращает только шаблон, на вход получает данные любой карточки,
// на выходе только разметка, для единственной любой карточки
constructor(api) {
this.api = api;
}
getTemplate(cardName, cardLink, cardLikes, cardOwnerID, cardID) {
return `<div class="place-card"... |
var mongoose = require('mongoose'),
encryption = require('../utilities/encryption'),
userSchema = mongoose.Schema({
username: {
type: String,
require: '{PATH} is required',
unique: true
},
firstName: {
type: String,
require: '{P... |
var DaylightMap, updateDateTime;
var eu = ["EL", "ES", "FR", "HR", "IT",
"CY", "LV", "BE", "BG", "CZ", "DK", "DE",
"EE", "IE", "LT", "LU", "HU", "MT", "NL",
"AT", "PL", "PT", "RO", "SI", "SK", "FI",
"SE"];
function randomChoice(arr) {
return arr[Math.floor(Math.random() * arr.length)];
}
DaylightMap = function() {
... |
import React from 'react'
const HomeScreen = () => {
return (
<div>
<h1>Welcome<br></br></h1>
</div>
)
}
export default HomeScreen
|
import React, { useContext } from 'react';
import { Link } from 'react-router-dom'
import { SetlistContext } from '../../contexts/SetlistContext'
import './styles.css'
import NavBar from '../../components/NavBar'
export default function ShowAllSetlists({ match }) {
const { setlists, loading, handleDelete } = useC... |
const multer = require("multer");
const multerS3 = require("multer-s3");
const aws = require("aws-sdk");
const { secretAccessKey, accessKeyId, region } = require("../config/keys");
aws.config.update({
secretAccessKey: secretAccessKey,
accessKeyId: accessKeyId,
region: region // region of your bucket
});
const s... |
$(document).ready(function() {
faq.forEach(function(entry, index) {
generateEntry(entry, index);
});
var followScroll = true;
$(".toc-entry").click(function() {
var index = this.id.match(/toc-entry-(.*)/);
if (index) {
$('html, body').animate({
scrollTop: $("#entry-" + index[1]).offset()... |
// import React from "react";
// import PropTypes from "prop-types";
// import { withStyles } from "@material-ui/core/styles";
// import CircularProgress from "@material-ui/core/CircularProgress";
// const styles = theme => ({
// progress: {
// margin: theme.spacing.unit * 0,
// }
// });
// function CircularI... |
const express = require('express');
const auth = require('../middleware/auth');
const photoController = require('../controllers/photo-controller');
const multer = require('multer');
const storage = require("../middleware/multerStorage");
const upload = multer({storage:storage.storageConfig, fileFilter: storage.fileFi... |
'use strict';
/**
* @ngdoc overview
* @name appApp
* @description
* # appApp
*
* Main module of the application.
*/
angular
.module('meanDemoApp', [
'ngResource',
'ngSanitize'
]);
|
let deadpoll = {
nombre: 'Juan',
apellido: 'OC',
poder: 'Endeudarse',
getNombre: function () {
return `${this.nombre} ${this.apellido} - poder: ${this.poder}`
}
}
console.log(deadpoll);
let { nombre: primerNombre, apellido, poder } = deadpoll
console.log(primerNombre, apellido, poder); |
const express = require("express");
const dotenv = require("dotenv");
const cors = require("cors");
const router = require("./api/routes");
const fileUpload = require("express-fileupload");
const app = express();
dotenv.config();
app.use(express.json());
app.use(cors());
app.use(
fileUpload({
createParentPath: ... |
const fileContents = (
software,
artist,
imageDescription,
userComment,
copyright,
pixels
) =>
JSON.stringify({
exif: {
software,
artist,
imageDescription,
userComment,
copyright,
dateTime: new Date()
},
pxif: {
pixels
}
});
export default fileC... |
export default function test(input) {
return (/^[A-Z]/i.test(input));
} |
import React, { useState } from "react";
import Logo from "./Logo";
import { Button, Grid } from "@material-ui/core";
//import {AppDecorator} from '@your-scope/storybook'
//dummy, aslong as not imported from storybook by previous line
import { AppDecorator } from "./AppDecorator";
import A from "./A";
export default f... |
let listState = {
url: '',
template: require('./list.html'),
controller: 'list.controller as list'
}
export default listState
|
var template = require('./template.marko')
var data = {
msg:"Hello Marko!"
}
template.render(data,function (err,output) {
console.log(output);
})
|
var annotated =
[
[ "fsml", null, [
[ "Action", "classfsml_1_1Action.html", "classfsml_1_1Action" ],
[ "AstStep", "structfsml_1_1AstStep.html", "structfsml_1_1AstStep" ],
[ "AstState", "structfsml_1_1AstState.html", "structfsml_1_1AstState" ],
[ "AstMachine", "structfsml_1_1AstMachine.html",... |
import React, { useEffect } from "react";
import styled from "styled-components";
import { useSelector, useDispatch } from "react-redux";
import { color } from "../../styles/global";
import { Paperclip, Smile, SendArrow } from "../../components/Icons";
import { fetchMessages } from "../../actions";
import Message fro... |
import styled from 'styled-components';
const PassWordInput = styled.input.attrs({
type: 'password',
padding: props=> props.size || '0.5em',
})`
border: 1px solid dodgerblue;
border-radius: 5px;
color: green;
margin: ${props=> props.margin};
`;
export default PassWordInput; |
import React from 'react';
import { shallow } from 'enzyme';
import NumberOfEvents from '../NumberOfEvents';
describe('<NumberOfEvents />, component', () => {
let NumberWrapper;
beforeAll(() => {
NumberWrapper = shallow(<NumberOfEvents />)
})
test('textbox renders', () => {
expect(Numb... |
// @flow
import { type Middleware } from 'redux'
import { showError } from '../../components/services/AirshipInstance.js'
import { type Action, type RootState } from '../../types/reduxTypes.js'
export const errorAlert: Middleware<RootState, Action> = store => next => action => {
try {
const out: any = next(act... |
import "./css/style.scss";
import "./css/media.scss";
import "./js/scripts";
|
import React from "react";
<section className="section-packages">
<div className="u-center-text u-margin-bottom-huge">
<h2 className="heading-packages">Elite Training Packages</h2>
</div>
<div className="row">
<div className="col-1-of-3">
<div className="cardP">
<div clas... |
'use strict';
/**
* @ngdoc function
* @name quiverCmsApp.controller:UsersCtrl
* @description
* # UsersCtrl
* Controller of the quiverCmsApp
*/
angular.module('quiverCmsApp')
.controller('UsersCtrl', function ($scope) {
});
|
const authCtrl = {};
const express = require("express");
const bcrypt = require("bcrypt");
const User = require("../models/User.Model");
const jwt = require("jsonwebtoken");
const checkAuth = require('../middleware/check-auth');
authCtrl.login = (req,res,next) => {
let FindedUser;
User.findOne({username: req... |
import React from 'react';
import _ from 'lodash';
import {
Button,
DatePicker,
Select,
Input,
Row,
Col,
Table,
Modal,
Tooltip,
Form,
Icon,
Spin,
InputNumber,
Card,
Popconfirm,
message,
Tabs,
Divider,
} from 'antd';
import ReportTable from '@/components/ReportTable/index'; // 报表组件
im... |
import { Route, Redirect, Switch } from "react-router-dom";
import BookContainer from "../BookContainer/BookContainer";
import BookDetails from "../BookDetails/BookDetails";
import Error from "../Error/Error";
import Header from "../Header/Header";
import React, { Component } from "react";
import styled from "styled-co... |
const { response } = require('express');
const { mongo } = require('mongoose');
const fetch = require('node-fetch');
const Empresa = require('../models/empresa');
const crearAgencia = async (req, res = response) => {
const empresa = req.empresa;
const idAgencia = mongo.ObjectId();
if (empresa.agenciaDefaul... |
$("#loginform").submit(function(e){
e.preventDefault();
var username = $("#username").val();
var password = $("#password").val();
$("#flash_message").empty();
if(username == "" && password == ""){
$("#flash_message").append("<div class='alert alert-danger'>" +
"Both fields are re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.