text stringlengths 7 3.69M |
|---|
const PromptsArray = [
"Describe an experience where you were unsuccessful in achieving your goal. What lessons did you learn from this experience?",
"Describe an experience that forever changed your life and your outlook on life.",
"What movie, poem, musical composition, or novel has most influenced your l... |
export * from './superheroes.service';
export * from './todos.service'; |
import regeneratorRuntime from '../../../lib/regenerator-runtime'
import { connect } from '../../../lib/wechat-weapp-redux'
import { fetching, fetchend, clearError } from '../../../store/actions/loader'
import { clearWxRequestPayment } from '../../../store/actions/group'
import promisify from '../../../lib/promisify'
... |
export { SliderButton } from './SliderButton';
|
$(document).ready(function () {
const url = 'http://localhost:50401/api/game';
let ob = {
next: (value) => {
console.log(value.response)
print(value.response)
},
error: (err) => console.log(err),
complete: () ... |
/*
findCommunity 内在灵魂,沉稳坚毅
生成时间:Mon Aug 15 2016 破门狂人R2-D2为您服务!
【使用方法】:
1。 引入该文件
2. 在html中添加组件标签:
<tsy:find config="$opt">
</tsy:find>
3. 在 $opt中传入配置参数,需要传入callback,以及依赖对象函数,例如:
$opt:{
callback: function (res) {
alert(res)
},
target:'Community'
},
其中,会在点击之后,将所选中的项目作为res传入到callback中,
*/
define('fi... |
import React, { useState, useEffect } from 'react'
import { useRouter } from 'next/router'
import style from './character.module.css'
const API = 'https://rickandmortyapi.com/api/character/'
const productItem = () => {
//initialState
const [character, setCharacter] = useState({episode: []})
//get id
const {... |
export default {
VEHICLES: '/vehicle',
};
|
import React from 'react';
import Footer from './Footer/Footer';
const links = {
firstCol: [
{ href: 'https://video.ibm.com/contact-us', linkText: 'Contact' },
{ href: 'https://www.ibm.com/privacy/us/en/', linkText: 'Privacy' },
{ href: 'https://www.ibm.com/legal/us/en/', linkText: 'Terms of use' },
... |
const fetch = require('node-fetch');
const { URLSearchParams } = require('url');
class CucumberStudio {
constructor ({
token,
clientId,
uid,
projectId,
projectToken
}) {
this.token = token;
this.clientId = clientId;
this.uid = uid;
this.projectId = projectId || null;
this.pr... |
const initialState = { email: '', password: '', isAdmin: '', isAuth: false };
function reducer(state = initialState, action) {
switch (action.type) {
case 'SET_EMAIL_PASSWORD':
return {
...state,
email: action.payload.email,
password: action.payload.password,
};
case 'SET_... |
import React from "react";
import "./location.css";
import "./bulma.css";
function Location() {
return (
<div className="container location-container">
<div className="title-section">
<img src="/images/logo.svg" alt="" />
</div>
<div className="main-section">
<div className="mai... |
const router = require('./routes');
const errorHandler = require('./errorHandler');
module.exports = {
router,
errorHandler,
};
|
const AJV = require('ajv').default;
const addFormats = require('ajv-formats');
const ajv = new AJV({ useDefaults: true });
addFormats(ajv);
module.exports = ajv;
|
import { Emitter, ErrorEmitter } from '../../../helpers/emitter';
import { GetValues } from '../service/values';
class ValueController {
/**
* @description Pega uma ligação do banco.
* @param {Object} req
* @param {Object} res
*/
static async GetValues(req, res) {
const { _idCall, _idPlan } = req.p... |
import React from 'react';
import Enzyme, { shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import Header from './index';
import { findByDataId } from '../../utils';
Enzyme.configure({
adapter: new Adapter()
});
const setup = (props={}) => {
return shallow(<Header {...props} />);
}
de... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
// import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
// import { faUserPlus } from '@fortawesome/free-solid-svg-icons';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import ReCAPTCHA ... |
$(document).ready(function(){
// setup ul.tabs to work as tabs for each div directly under div.panes
$("ul.tabs").tabs(".content");
$("#overviewTable").flexigrid({
url: './../../app/controller/getOverview.php',
dataType: 'json',
colModel : [
{display: 'ID', name : 'id', width : 40, sort... |
jQuery(document).ready(function(){
jQuery('#facebook').on('click',function(){
console.log("facebook selected");
jQuery('#facebook-field').show();
})
jQuery('#twitter').on('click',function(){
console.log("twitter selected");
jQuery('#twitter-field').show();
})
jQuery('#other').on('click',function(){
con... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
var uname, id, password, fullname;
// -- ajax to add user ------
function addUser(id) {
if (checkValues(id)) {
$("#error... |
function pairElement(str) {
let result = [];
str
.split("")
.map(function(item){
if (item == "A"){
result.push([item,"T"])
} else if( item == "C"){
result.push([item, "G"])
} else if( item == "T"){
result.push([item, "A"])
} else if(item == "G"){
result.push([item, "C"])
... |
/**
* Created by pablo on 2/25/2016.
*/
/* global $J, isDefinedAndTrue, isDefined, Spinner, es, console */
/** Properties **/
/*
TODO: we may be able to align smState.smVals and saveDimensionSelections() values
SM Dimension values need to be updated in the following locations:
1. MASTER - > smState.smVals{}
... |
import React, { useState } from "react";
import { Container, Typography, Grid } from "@material-ui/core";
import SearchBar from "../../components/search-bar";
import SearchList from "../../components/search-list";
import ToggleButton from "@material-ui/lab/ToggleButton";
import Brightness2Icon from "@material-ui/icons/... |
/**
* Created by falvojr on 13/10/15.
*/
(function (io) {
'use strict';
angular.module('app')
.service('CoreService', CoreService);
CoreService.$inject = ['$http'];
/* @ngInject */
function CoreService($http) {
this.getDropboxImages = getDropboxImages;
this.onUpdateImage... |
module.exports = function parseRequestBody(request) {
return new Promise(resolve => {
const body = []
request.on('data', chunk => body.push(chunk))
request.on('end', () => {
const result = body.join('')
if (request.headers['content-type'] === 'application/json') {
resolve(JSON.parse(re... |
var colorWell
var defaultColor = "#0000ff";
window.addEventListener("load", choosecolor, false);
function choosecolor() {
colorWell = document.querySelector("#colorWell");
colorWell.value = defaultColor;
colorWell.addEventListener("input", changecolor, false);
colorWell.select();
}
function changec... |
import axios from 'axios';
import qs from 'qs';
var Banks = {
getAll: function(){
return axios.get(window.apiDomainUrl+'/banks/get-all', qs.stringify({}))
},
getAllByCountryId: function(countryId){
return axios.get(window.apiDomainUrl+'/banks/get-all-by-country-id?countryId='+countryId,... |
/**
* @license
*
* Copyright IBM Corp. 2020, 2021
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import { render } from 'react-dom';
import ArrowRight20 from '@carbon/icons-react/es/arrow--right/2... |
const Schema = require('mongoose').Schema;
const db = require('../config/db');
const Employee = db.model('Employee', {
name:String,
dateOfBirth:Date,
profession:String,
succesRate:Number,
loyalty:Number,
picture:String,
_employer: {
type: Schema.Types.ObjectId,
ref: 'Boss'
... |
import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from '@/views/Main.vue'
import Category from '@/views/CategoryNews'
import PieceOfNews from '@/views/PieceOfNews'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'home',
component: Main
},
{
path: '/category',
name: ... |
import React from "react";
import { Menu } from "semantic-ui-react";
import { Link } from "react-router-dom";
const FilterComponent = ({ address, index }) => {
return (
<Menu.Item key={index} as={Link} to={`/AddressBookForm/${address.id}`}>
{address.fName + " " + address.lName}
</Menu.Item>
... |
/**
* ReportsDailyLayout is the landing page for the daily reports page.
*
* It displays a chart of daily reps, sets or volume for a given month.
* @class
* @augments P.views.ReportsAbstract
*/
P.views.ReportsDailyLayout = P.views.ReportsAbstract.extend({
templateId: 'reports.layout',
period: 'daily',
rang... |
/**
* A utility function to make a network api call
*
* @param {string} apiUrl
* @return {Promise<Object>}
*/
export async function request(apiUrl) {
return fetch(apiUrl).then((resp) => resp.json());
}
|
import React from 'react';
const Ul = ({ listChildren }) => {
return <ul>{listChildren}</ul>;
};
export default Ul;
|
const HtmlWebPackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const path = require('path');
const TailwindCss = require('tailwindcss')
const Autoprefixer = require('autoprefixer');
const plugins = [
new MiniCssExtractPlugin({
filename: "styles.css",
... |
// Create new graph class and override some methods
function TracerouteGraph () {
this.link_distance = 150;
this.node_charge = -20;
}
// Override methods
TracerouteGraph.prototype = new D3Graph("d3-explain-graph");
// Add new graph
d3DirectedGraph = new TracerouteGraph();
force = d3DirectedGraph.getForce();
d... |
import React from 'react';
// Using map, filter, reduce
export class MapFilterReduce extends React.Component {
render() {
const users = [
{ name: 'Robin', isDeveloper: true },
{ name: 'Markus', isDeveloper: false },
];
const showUsers = false;
// if (!showU... |
/**
* Created by iyobo on 2016-04-24.
*
* For Common Nunjuck filters
* @param nunjucksEnv
*/
module.exports = function(nunjucksEnv){
nunjucksEnv.addFilter('shorten', function(str, count) {
return str.slice(0, count || 5);
});
nunjucksEnv.addFilter('showError', function(str) {
if(str){
return '<span cl... |
(function (src) {
var ctx = App.Model.Sound.context();
var _pitch = 0
, _speed = 1;
var player =
{ status: 'loading'
, position: null
, duration: null
, cuePoint: 0
, startedAt: null
, startedFrom: null
, updateTimer: null
, updateFPS: 30
, onupdate: null
,... |
import React from 'react'
import { faDiscord, faReddit } from '@fortawesome/free-brands-svg-icons'
import Icon from 'src/components/Icon'
export default () => (
<div className="progress section">
<h1 className="title">Where We're At</h1>
<h2 className="subTitle">We're currently hard at work developing this ... |
//1
let transport = prompt('Выберите транспорт');
if (transport == "а"){
alert("210")
}
else if (transport == "в") {
alert("60")
}
иначе если (транспорт == "м") {
alert("325")
}
else if (transport == "с") {
alert("1120")
}
else if (transport == "п") {
alert("300")
}
//2
номер фун... |
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import './CarouselX.css';
function CarouselX(props) {
const { id: uniqueID } = props;
const [activeSlide, setActiveSlide] = useState(0);
const [scrollPosition, setScrollPosition] = useState(0);
const [qtyPerPage, setQtyPerP... |
import axios from 'axios'
import firebase from 'firebase'
import * as Actions from '../actions/actionType'
firebase.initializeApp({
apiKey: "AIzaSyBOJwx3pKj--PkRrGJWKKoyCbnfeeu4X0o",
authDomain: "recipe-46932.firebaseapp.com",
databaseURL: "https://recipe-46932.firebaseio.com",
projectId: "recipe-46... |
/**
* Module dependencies
*/
var _ = require('lodash');
var Promise = require('bluebird');
module.exports = {
search: function(where, Model) {
var settings = Model.description.settings;
if (!where.q || settings.search.length === 0) return Promise.resolve(where);
var table = Model.adapter.id... |
var readlinesync = require('readline-sync');
score = 0;
var uname = readlinesync.question ("what's your name? ");
console.log ("welcome : " + uname + " Let's play the Quiz!!");
//function
function play (question,answer)
{
var userans = readlinesync.question(question);
if (userans == answer)
{
console.log (... |
const binarySearchRecursion = (target, array, startIdx = 0, endIdx = array.length - 1) => {
if (startIdx > endIdx) return -1;
const middleIdx = Math.floor((startIdx + endIdx) / 2);
if (array[middleIdx] === target) return middleIdx;
else if (array[middleIdx] < target) return binarySearchRecursion(target, array,... |
// 常量 恒量
const name = 'hanfei'
// name 不能重新赋值
const obj = {}
obj = {} // TypeError: Assignment to constant variable.
|
import React from 'react'
import { Component } from 'react'
import { remote } from 'electron'
import path from 'path'
import { api } from './electron-backend'
const { dialog, Menu, MenuSample } = remote
import Workspace from '../gatekeeper-frontend/containers/workspace-container.jsx'
import GatingErrorModal from '../ga... |
const fs = require('fs');
// Uncomment below for learnyounode
// console.log(fs.readFileSync(process.argv[2]).toString().match(/\n/g).length);
module.exports = filePath => fs.readFileSync(filePath).toString().match(/\n/g);
|
import {
calculateMediaRequirements,
validateMedia,
MediaRequirements,
} from './mappings/mediaRequirementsMapping';
export {
calculateMediaRequirements,
validateMedia,
MediaRequirements,
};
export default MediaRequirements;
|
import React from 'react';
import PropTypes from 'prop-types';
import {withStyles} from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
import CardHeader from '@material-ui/core/CardHeader';
import CardMedia from '@material-ui/core/CardMedia';
import CardContent from '@material-ui/core/CardConten... |
/*!
* SAP.${maven.build.timestamp} UI development toolkit for HTML5 (SAPUI5) (c) Copyright
* 2009-2014 SAP SE. All rights reserved
*/
/* ----------------------------------------------------------------------------------
* Hint: This is a derived (generated) file. Changes should be done in the underlying
* sour... |
import React, { Component } from "react";
import { Redirect } from "react-router-dom";
import { connect } from "react-redux";
//import * as actionType from "../../store/actions/actionTypes";
import { add_product } from "../../store/actions/productAction";
import {
Button,
Form,
FormGroup,
Label,
Input,
Form... |
$('#signupBtn').click(event => {
const email = $('#inputEmail').val();
$.ajax({
url: `http://tiny.cc/cl-email-api-test/?email=${email}`,
dataType: 'jsonp',
jsonpCallback: 'jsonCallback',
}).then(response => {
const { message } = response;
if (message.status_code === 200) {
$('#successAl... |
import React from "react";
import GlobalStyle from "./styles/global";
import Header from "./components/Header";
import Main from "./components/Main";
const myStyle = {
padding: "15px 0",
textAlign: "center",
fontSize: "2em",
fontWeight: "700",
martinTop: "100",
};
function App() {
return (
<>
<H... |
define([
'underscore',
'marionette',
'text!Templates/Bookmark/List.html'
],function(_, Marionette, template) {
var view = Marionette.ItemView.extend({
template: _.template(template),
events:{
},
initialize:function(options){
this.collection = options.col... |
import {PERCENTAGE_MAX} from "../../../constants"
import PropTypes from "prop-types"
import React from "react"
const getPercent = (number) => `${String(PERCENTAGE_MAX * number)}%`
const Hashtag = props =>
<div className="tweetItem hashtag">
<p>
<span className="bold">{props.title}</span> · <span className... |
let express = require('express');
let router = express.Router();
let User = require('../models/User');
let Department = require('../models/Department');
let Company = require('../models/Company');
let Post = require('../models/Post');
let Ids = require('../models/IdsNext');// 引入模型
// --------------------------------新增用... |
/*global ODSA */
// Inseh1234 slideshow
$(document).ready(function() {
"use strict";
var av_name = "ProofOfWork";
var config = ODSA.UTILS.loadConfig({av_name: av_name}),
interpret = config.interpreter; // get the code object
var av = new JSAV(av_name);
var topMargin = 50;
var left... |
import Characters from './characters';
import CharacterDetail from './characterDetail';
export { Characters, CharacterDetail };
|
import React from "react";
import styled from "styled-components";
import Token from "./Token";
const Card = styled.div`
width: 100%;
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: center;
`;
const TokenContainer = styled.div`
width: 90%;
display: flex;
flex-wrap: wrap;
flex-di... |
import React from 'react';
import PropTypes from 'prop-types';
import './Agree.css';
import AgreeModal from './AgreeModal.jsx';
const Agree = (props) => (
<div className="Agree">
<AgreeModal permissions={props.permissions} acceptPermissions={props.acceptPermissions} />
</div>
);
Agree.propTypes = {
... |
test("Hello World", () => {
})
// // test("This should Fail", () => {
// // throw new Error("Failure!")
// // })
// const calculateTip = (total, tipPercent = 0.25) => total + (total * tipPercent)
// test("Should calculate total with tip" , () =>{
// const total = calculateTip(10, 0.3)
// expect(total).... |
import React from 'react';
// use the isNaN method (is Not a Number). For example: isNaN(+"35") is false, isNaN(+"hello") is true
const Number = (props) => {
console.log("this is "+ props.id);
if (isNaN(props.id)) {
return <h1>The word is: {props.id}</h1>;
}
return <h1>The number is: {pr... |
/**
* A basic Hello World function
* @param {string} name Who you're saying hello to
* @param {any} data The object to be parsed
* @returns {string}
*/
module.exports = (name = 'world', data = {}, context, callback) =>
{
const method = context.http.method,
result = `webhook ${method} success`;
if (... |
function sum (array){
let sum = 0
for(let i = 0; i < array.length; i++)
{
sum = sum + array[i];
}
console.log(sum)
}
//Maximum number
function max(array)
{
let maxnumber= 0;
for( let i = 0; i < array.length; i++)
{
if(array[i] < maxnumber)
... |
// Date
// Não é possivel instanciar uma data de forma literal no JavaScript.
// 1 Contrutor vazio
var hoje = new Date();
// new Date(), sem parametro, retorna a data de hoje, porem esta data é manipulavel,
// pois é pegada do browser, que por sua vez a pega do sistema operacional.
hoje.getTime(); //1429446304392
// ... |
(function () {
angular.module('app').controller('navbarController', function ($rootScope, $scope, AuthService) {
var credentials = $scope.credentials = $rootScope.currentUser.credentials;
function permission(permissions_ids){
return permissions_ids.includes(credentials.... |
import { Body, Container, Icon, List, ListItem } from 'native-base';
import React from 'react';
import { ScrollView, StyleSheet, Text, View } from 'react-native';
import { connect } from "react-redux";
import { buscarMedicamentos, onChangeField } from "../../actions/medicamentos/MedicamentosAction";
import EstilosComun... |
import {mapValues, uniq, take} from 'lodash'
// local libs
import {PropTypes, assertPropTypes, plainProvedGet as g} from 'src/App/helpers'
import {galleryModel, openGraphDataModel} from 'src/App/VideoPage/models'
const
galleryModelProps = process.env.NODE_ENV === 'production' ? null : Object.freeze({
id: ... |
import axios from "axios"
const appProvider = axios.create({
baseURL: process.env.REACT_APP_BACKEND_API_URL
})
export default appProvider;
|
const request = require('request')
module.exports.forecast = (data, callback)=>{
const latitude = data.latitude;
const longitude = data.longitude;
console.log(latitude , longitude)
const weatherURL = 'https://api.darksky.net/forecast/b9d32216d290e072d1e1d71078c1ac6e/'+latitude+','+longitude;
requ... |
import React from 'react';
import {Button} from 'react-bootstrap';
class TextInput extends React.Component{
constructor(props){
super(props);
this.state = { newMessageText: '', messageCharactersLimit: this.props.charactersLimit || 200};
}
messageType = (messageText) => {
if(messageT... |
'use strict';
import Button from 'react-native-button';
import React, {
StyleSheet,
View,
Platform,
ScrollView,
Text,
Image,
WebView
} from 'react-native';
export default function () {
return (
<ScrollView style={styles.container}>
{(this.state.item.source) ?
<WebView
... |
const {
time,
loadFixture,
} = require("@nomicfoundation/hardhat-network-helpers");
const { anyValue } = require("@nomicfoundation/hardhat-chai-matchers/withArgs");
const { expect } = require("chai");
const { BigNumber } = require("ethers");
async function deployVerifierFixture() {
const Verifier = await e... |
const mongoose = require('mongoose');
const User = mongoose.model('User');
const Appointment = mongoose.model('Appointment');
const Meeting = mongoose.model('Meeting');
const SysFunction = mongoose.model('SysFunction');
const models = [User, Appointment, Meeting, SysFunction];
exports.clearAll = async (ctx, next) => {... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const timestamps = require('mongoose-timestamp');
const eventSchema = new Schema({
participants:[{
user: {type: Schema.Types.ObjectId, ref: 'User'},
role: {type: String, enum: ['organizer', 'sponsor', 'perfor... |
function createComment(sequelize, DataTypes) {
const Comment = sequelize.define('Comment', {
text: {
type: DataTypes.STRING,
},
}, {
classMethods: {
associate: (models) => {
Comment.belongsTo(models.User, { as: 'commenter' });
},
},
});
return Comment;
}
export default... |
/* variables locales de T_PRYCTGITHJLHU_357*/ |
var gens = {
fname: "Fname",
lname: "Lname",
cell: {
home: [],
mobile: ["9088836373", "9393327262"]
},
email: "fname.lname@google.com",
address: {
line1: "test block", //spread arr
city: "test city",
state: "test state",
zip: "303328",
country: "TestCountry"
},
... |
document.addEventListener("DOMContentLoaded",()=>{
if(window.innerWidth<701){
document.querySelector(".major").className = "col-12 major";
document.querySelector(".minor").className = "col-12 minor collapse";
}else{
document.querySelector(".major").className = "col-9 major";
document.querySelector("... |
// D.A.J. Hiep.
// Image turner function that takes urls as a parameter.
function imageturner(urls) {
// Select image and store in a variable called image.
var image = $(".test-image img");
// Image is hidden if not loaded.
image.removeClass("hidden");
// Create variable called turnNumber and set it's value to 0.
va... |
import React from 'react'
class Tag extends React.Component {
tagClick = () => {
}
tagHover = () => {
}
render () {
return (
<div className='tag' onClick={this.tagClick} onMouseOver={this.tagHover}>
<i className="fas fa-tag"/>
<p>{this.props.name}</p>
</div>
);
... |
const { User } = require("../models");
const bcrypt = require("bcrypt");
const jwt = require("jsonwebtoken");
const moment = require("moment");
//회원가입하기
exports.createUser = async (req, res, next) => {
const { userId, password, ...rest } = req.body;
try {
//이미 해당 유저가 존재할 경우
const exUser = await User.findOn... |
window.addEventListener("load", function(){
// LET'S SAY THAT WE HAVE A SIMPLE FLAT ARRAY
var data = ["marco", "occhetta", "1G", "15", "matteo", "colombo", "3A", "12"];
// DRAW HTML TABLE
var perrow = 4, // 3 items per row
count = 0, // Flag for current cell
table = document.createElement("t... |
const params = {
MaxResults: 10,
};
export default params; |
const { Client } = require("klasa");
const permissionLevels = require("./utils/PermissionLevels.js");
const config = require("./config.json");
const Raven = require("raven");
const RawEventStore = require("./utils/RawEventStore.js");
const Logger = require("./utils/Logger.js");
const capcon = require('capture-console')... |
import { fireEvent } from '@testing-library/react-native';
import React from 'react';
import Profile from 'components/Profile';
import UserController from 'controllers/UserController';
import strings from 'localization';
import { renderWithProviders } from 'test-utils/render';
jest.mock('controllers/UserController', (... |
import React, { Component } from "react";
import { Route, Redirect, Switch } from "react-router-dom";
import { ToastContainer } from "react-toastify";
import NavBar from "./components/UI/NavBar/NavBar";
import Movies from "./containers/Movies/Movies";
import LoginForm from "./components/UI/Form/LoginForm/LoginForm";
im... |
//D3 DEMO
//begin script when window loads
window.onload = setMap();
//set up choropleth map
function setMap(){
//set width, height
var width=1050, height=550;
//use queue.js to parallelize asynchronous data loading
var q = d3_queue.queue();
.defer(d3.csv, "data/StateData.csv") //load attribute... |
module.exports = function (grunt) {
grunt.initConfig({
copy: {
build: {
cwd: 'src',
// Modernizr loads in head, and JQuery tried to load first from CDN
src: ['**', '!**/*.scss', '!**/*.css', '!**/*.js', '!**/*.map', '!**/head.php', '!**/foot.php', '!... |
/**
* @param {string} S
* @param {string} T
* @return {string}
*/
var customSortString = function(S, T) {
let charToFreq = [];
for( let i = 0; i < T.length; i++) {
let c = T[i];
charToFreq[getCharIndex(c)] = charToFreq[getCharIndex(c)] ? charToFreq[getCharIndex(c)] + 1 : 1;
}
let afterString = "";
... |
// eslint-disable-next-line
import React, { Component } from 'react';
import RaisedButton from 'material-ui/RaisedButton';
import AppForm from './forms/AppForm';
class Applied extends Component {
constructor(props) {
super(props);
this.state = {
showComponent: false
};
this.handleClick = this.h... |
jest.mock('@lodgify/fetch-helpers');
jest.mock('../utils/getUrl');
jest.mock('./utils/getAdaptedPath');
jest.mock('./utils/getAdaptedHost');
jest.mock('../utils/setFunctionName');
import {
postJSON,
// eslint-disable-next-line import/named
postJSONReturnValue,
} from '@lodgify/fetch-helpers';
import { ORIGIN } ... |
/* eslint-disable class-methods-use-this */
import { View, Text, Button } from 'react-native';
import React from 'react';
import Toast from 'react-native-root-toast';
export default class ToastPlayground extends React.Component {
constructor(props) {
super(props);
this.onPress = this.onPress.bind(this);
}
... |
var express = require('express');
var route = express.Router();
var passport = require('passport');
var path = require('path');
route.post('/userLogin',
passport.authenticate('local', {
successRedirect: '/#/main',
failureRedirect: '/#/loginFail'
}) // end passport.authenticate
); // end userLog... |
import React from 'react';
import { shallow } from 'enzyme';
import Card from '../Card';
import { mockTossup } from '../../utils/mockData';
describe('Card', () => {
it('should match snapshot', () => {
const wrapper = shallow(<Card {...mockTossup} />);
expect(wrapper).toMatchSnapshot();
});
});
|
{
"class" : "Page::ring::ringpage"
}
|
export default {
beauties: [
{
id: 'CI2lhaFHlm3',
instagram: 'carinalee1105',
images: [
'https://instagram.ftpe12-2.fna.fbcdn.net/v/t51.2885-15/e35/p1080x1080/131395236_393878958336083_7893744875791018468_n.jpg?_nc_ht=instagram.ftpe12-2.fna.fbcdn.net&_nc_cat=111&_nc_ohc=bgRwOKOjNrkAX9KzN... |
import React from "react";
import { shallow } from "enzyme";
import { requestPasswordReset } from "../../../apiCalls/auth/requestPasswordResetActions";
jest.mock("../../../apiCalls/auth/requestPasswordResetActions");
import {
REQUESTPASSWORDRESET_ERROR_MESSAGE,
REQUESTPASSWORDRESET_SUCCESS_MESSAGE
} from "../../.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.