text stringlengths 7 3.69M |
|---|
import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import styles from './styles/allStyles';
import strings from '../res/strings';
import { SimpleCard } from './CommonComp';
/** Component to just show coming soon text for other new resume options */
export default class Co... |
import React, { Component } from 'react';
import { BrowserRouter as Router, Route, Link } from 'react-router-dom';
// import '..src/App.css';
import Header from './components/Header';
import Home from './components/pages/Home';
import Registration from './components/pages/Registration';
import Login from './components... |
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {withRouter} from 'react-router-dom';
import * as actions from '../actions';
import TodoList from '../components/TodoList';
import FetchError from '../components/FetchError';
import {getVisibleTodos, getIsFetching, getErrorMessage} fro... |
import React, { Component } from 'react'
import { app as firebase } from '../config/firebase'
export default (WrappedComponent) => {
class RequireAuth extends Component {
state = {
isLogin : null
}
componentDidMount(){
firebase.auth().onAuthStateChanged((user)=>{
console.log(user);
... |
const AlfaToken = artifacts.require("./AlfaToken.sol");
const AlfaTokenOffering = artifacts.require("./AlfaTokenOffering.sol");
const AlfaPayments = artifacts.require("./AlfaPayments.sol");
module.exports = function (deployer, network, accounts) {
console.log(`Accounts: ${accounts}`);
let alfaToken = null;
... |
angular.module('gt-gamers-guild.auth-ctrl', [])
.controller('AuthCtrl', function($scope) {
$scope.hello = 'hello';
});
|
(function() {
'use strict';
angular
.module('app')
.controller('CustomerAdminController', CustomerAdminController);
CustomerAdminController.$inject = ['customerFactory', '$state', '$stateParams'];
/* @ngInject */
function CustomerAdminController(customerFactory, $state, $statePara... |
function splitAndMerge(str, sp) {
return str.split(' ').map(function(word) {
return word.split('').join(sp);
}).join(' ');
};
function convert(object) {
return Object.keys(object).map(function(i) {
return [i, object[i]]
});
};
function toCamelCase(str) {
newString = str.replace(/(\_|\-... |
import React from 'react'
import HomeOutlinedIcon from '@material-ui/icons/HomeOutlined';
import './styles.css'
export default class Navbar extends React.Component{
render(){
return(
<div className="homeIcon">
<a href="/#/home"><HomeOutlinedIcon/></a>
</div>
... |
/**
* Test for debugger; keyword used in various contexts (in a function, in an
* dynamically evaluated functions, etc.)
*
* The test also verifies Issue 3082: Disable "debugger;" statements by converting
* them to conditional breakpoints.
*/
function runTest()
{
// Load test case page
FBTest.openNewTab(... |
/*
* C.Layer.Tile.TileSchema //TODO description
*/
'use strict';
C.Layer.Tile.yAxis = {
NORMAL: 0,
INVERTED: 1
};
C.Layer.Tile.TileSchema = C.Utils.Inherit(function (base, option) {
this._extent = option.extent;
this._tileWidth = option.tileWidth;
this._tileHeight = option.tileHeight;
t... |
var express = require('express');
var app = express();
var bodyParser = require('body-parser')
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: true }))
// parse application/json
app.use(bodyParser.json())
app.use(express.static(__dirname + '../../app'));
app.get('/', function(re... |
import { configure } from '@storybook/react';
function loadStories() {
require('../src/common/dropdown-toggle-select/index.story.js');
require('../src/navbar/index.story.js');
require('../src/editor/index.story.js');
require('../src/editor/toolbar/index.story.js');
require('../src/editor/toolbar/font-dropdow... |
import React, { Component } from 'react';
import Card from './Card';
import Info from './Info';
import WinningScreen from './WinningScreen';
class Board extends React.Component {
constructor(props, context) {
super(props, context);
this.state = {
cardData: [],
gameStatus: "stopped"
};
... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import {
View,
StyleSheet,
} from 'react-native';
import {
Text,
Card,
} from 'react-native-elements';
import propTypes from 'prop-types';
import BoardStatus from './board-status';
import Planning from './planning';
import Jour from ... |
import styled from 'styled-components'
const Wrapper = styled.div`
width: 25%;
height: 300px;
float: left;
border: none;
`;
export default Wrapper; |
module.exports = () => {
const jwt = require('jsonwebtoken');
const { appConfig } = require('../src/setup')();
async function generateAuthToken(user) {
const payload = {
exp: Math.floor(Date.now() / 1000) + 24 * 60 * 60, //24hour
_id: user._id,
email: user.email,
};
const token = jw... |
String.prototype.camelCase = function() {
// @todo - Tokenise with delim ' ' - Start every word with lower case and then remove white spaces
// concat all words to one string.
return this.charAt(0).toUpperCase() + this.toLowerCase().slice(1);
}
String.prototype.removeWhiteSpace = function() {
return this.repla... |
import React, { Component } from 'react';
import { Spin, Modal, Radio, Table, Input, Icon, Button, Popconfirm, Form, Checkbox, message, Row, Col, DatePicker, TimePicker, Select } from 'antd';
import {Link} from 'react-router';
import moment from 'moment';
const RadioGroup = Radio.Group;
const { TextArea } = Input;
cons... |
const connection = require('../database/connection');
module.exports = {
async index(req, res) {
const enterprise_id = req.userIdToken;
if (!enterprise_id) {
return res.status(400).json({ error: 'Enterprise authorization required.' });
}
const services = await connection('services').where('en... |
import React, { useState } from 'react';
import PropTypes from 'prop-types';
const Searchbar = ({
fetchPokemonByType
}) => {
const [ input, setInput ] = useState('')
const handleSubmit = event => {
event.preventDefault();
fetchPokemonByType(input);
setInput('');
}
return (
<form
clas... |
// import { baseURL } from '../urls';
// import sendPushMsg from '../services/sendNotification';
// export default function getUserPushToken(id, title, message) {
// const headers = new Headers();
// headers.append('Accept', 'application/json');
// fetch(`${baseURL}/retrieveToken/${id}`, { method: 'POST', ... |
import React, { Component } from 'react';
export default class Responsive extends Component {
render() {
return (
<section className="responsive">
<div className="container">
<div>
<img src="./assets/images/section4-macbook.png" alt="Macbook"/>
... |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { text } from '@storybook/addon-knobs';
import Card from '../_storybookWrappers/Card';
import Notices from './index';
import { notice } from '../../events';
const stories = storiesOf('Components|Notices', module).addParameters({
componen... |
import Const from '../Constants';
import defaultUser from 'Assets/defaultUser';
export const initialState = {
authenticated: null,
iaaAuth: null,
iaacheck: '',
groupName: '',
subgroups: [],
users: [],
loading: { users: false, subgroups: false },
registrationToken: false,
privGrpVis: true,
privGrpVi... |
angular.module('ngApp.directBooking').controller('DirectBookingCollectionDateTimeController', function ($scope, $uibModal, $uibModalInstance, $translate, PackageLength, toaster, ShipFromCountryId, DirectBookingService, $rootScope) {
$scope.closePopUp = function () {
$scope.PlaceBookingObj.Type = "Close";
... |
import moment from 'moment';
const AERIS_CLIENT_ID = '0eMxRAeeo9ePYk9HdurS7';
const AERIS_CLIENT_SECRET = 'E57wbnHxx1Ebkq81ClFh1U6DoN2ZzQfEUJ8xMj2V';
export function getForecastForCity(city) {
return fetch('https://api.aerisapi.com/forecasts/'+city+'?client_id='+AERIS_CLIENT_ID+'&client_secret='+AERIS_CLIENT_SECRET... |
'use strict';
var express = require('express');
var router = express.Router();
var Message = require('../models/message');
//route for message
router.get('/', (req, res) => {
Message.findAll(function(err, messages){
if(err){
return res.status(400).send(err);
}
console.log(mes... |
window.onload = _ => {
let canvas_ref = document.getElementById("canvas").getContext("2d");
canvas_ref.canvas.addEventListener("mousemove", function(event) {
let x = event.clientX - canvas_ref.canvas.offsetLeft;
let y = event.clientY - canvas_ref.canvas.offsetTop;
document.getElementById("mouse_position_tracker... |
import classTemplates from './classTemplates';
export default class CharacterClass {
constructor(key) {
this.key = key;
const classTemplate = _.findWhere(classTemplates, {key: key});
this.label = classTemplate.label;
}
} |
const SERVER_URL = 'http://localhost:5000';
const loggedin = localStorage.getItem('isAuthenticated');
const user = localStorage.getItem('user');
const deviceId = localStorage.getItem('deviceID')
if (!loggedin) {
const path = window.location.pathname;
if (path !== '/login' && path !== '/registration') {
... |
/*global ODSA */
$(document).ready(function() {
"use strict";
var av_name = "LazyLists7CON"; // Illustrate and develop the is.map function
var av = new JSAV(av_name);
var code = ODSA.UTILS.loadConfig({av_name: av_name}).code;
var pseudo = av.code(code[0]).show();
var n = 31;
// var a... |
/**
* Common JavaScript
*/
$(document).ready(function() {
$(".autoHidePane .autoHidePaneDelete").click(function(){
$(this).parents(".autoHidePane").animate({ opacity: "hide" }, "fast");
});
// Show auto hide message if it contains something
if (($('#autoHideMessage').text() != '')) {
$('.autoHidePane').css... |
import React, { useState } from 'react';
import './style.css';
export const Card = (props) => {
const [display, setDisplay] = useState(false);
const handleClick = () => {
setDisplay(!display);
};
return (
<div className="card">
<div className="container">
<div className="container__left... |
/**
* Created by Administrator on 2015/12/10 0010.
*/
/*
使用方法:
<div id="operation-infosel" class=" patientlist_infosel">
<p>筛选方式<i></i></p>
<ul>
<li><a href="#">编辑</a></li>
<li><a href="#">删除</a></li>
<li><a href="#">添加</a></li>
<li><a href="#">登陆</a></li>
<li><... |
var searchData=
[
['nbmots',['nbMots',['../structSolution.html#a60e0881a49e593091d2210dd49f2f51a',1,'Solution']]]
];
|
import {
buildProgressWindowDiv,
buildHeaderWrapperDiv,
buildProgressSummaryParagraph,
buildLoadedSoFarParagraph,
buildParsedSoFarParagraph,
buildUserInfoParagraph,
buildUserWarningParagraph,
buildHeaderFieldsWrapper,
} from "./../../../src/js/helpers/progressWindowHelpers";
import { expect } from "chai";
impo... |
/* global jQuery */
(function elementorAnchor($) {
// Fixes missing anchor on elementor widget pagination.
// https://github.com/elementor/elementor/issues/4703
$(document).ready(() => {
const $widget = $('.elementor-widget-woocommerce-products');
if (!$widget.attr('id')) {
$widget.attr('id', $widg... |
import React from 'react';
import _ from 'lodash';
import { Link } from 'react-router-dom';
import ItemCard from './ItemCard';
import DashboardBtn from './DashboardBtn';
const OrderItems = props => {
return (
<div>
<div className='order-items-header'>
<h4>Your upcoming order:</h4>
<Link to=... |
//Agregar, Editar y Eliminar Carrera
function agregarCarrera() {
alert("Carrera Agregada Existosamente");
header("Location: carreras.html");
}
function editarCarrera(codigo) {
$("#edit").val(codigo);
$('#formularioEditarCarrera').submit();
}
function eliminarCarrera(codigo) {
var r = confirm("¿Est... |
// 자바스크립트에서 array에 추가하는 방법은 array.push(), array[index] = value 방법이 있다
// 주의점은 append함수는 지원하지 않는다.
let foods = ['a', 'b', 'c'];
foods.push('d')
foods[4] = 'e'
console.log(foods);
console.log('-----------------------------------------')
// 배열 중복 제거
const arr = [1,1,3,4,5,1,4,2]
const newArr = [...new Set(arr)]
... |
(function() {
/* Start angularLocalStorage */
'use strict';
var penguinGame = angular.module('milan.world.factory', ['penguin.LocalStorageService','pascalprecht.translate']);
penguinGame.factory('worldFactory', function($http, localStorageService, $translate, $sce, $location) {
var BASE = DEBUG... |
import React, { Component } from 'react';
import TextField from '@material-ui/core/TextField';
import { connect } from 'react-redux';
import Select from '@material-ui/core/Select';
import MenuItem from '@material-ui/core/MenuItem';
import './TaskCreator.css';
import FormControl from '@material-ui/core/FormControl';
imp... |
const express = require('express');
const router = express.Router();
router.get('/me', (req, res) => {
res.render('me.ejs');
});
router.get('/me/skills', (req, res) => {
res.render('skills.ejs');
});
router.get('/me/projects', (req, res) => {
res.render('projects.ejs');
});
router.get('/me/contactinfo... |
var request = new XMLHttpRequest();
request.open('GET', 'img/svg.html', true);
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
var node = document.createElement('div');
node.classList.add('svg');
node.innerHTML = request.responseText;
document.body.insertBefore(node, do... |
import React from 'react';
import { Route } from 'react-router-dom';
import ProviderLayout from '../Layout/ProviderLayout';
export default function ({component: Component, ...rest}) {
return (
<Route {...rest}>
<ProviderLayout>
<Component/>
</ProviderLayout>
</Route>
)
} |
export default {
fake: () => {
throw 'fake required'
},
count: 10,
pre: () => {
// no-op
},
post: (data) => {
return data
},
generate: function() {
const data = []
for (let i = 0; i < this.count; i++) {
data.push(this.fake())
}
return data
}
}
|
import React, { useState, useEffect, useRef } from "react";
const ContainerQoute = () => {
const [quotes, setQuotes] = useState('');
const changeColor = useRef();
const backgroundColors = ['#FF6633', '#FFB399', '#FF33FF', '#FFFF99', '#00B3E6',
'#E6B333', '#3366E6', '#999966', '#99FF99', '#B34D4D',
'#80B3... |
export const BASE_URL = process.env.NODE_ENV === 'production'
? 'https://api.tesla.students.nomoredomains.icu'
: 'http://localhost:3000';
export const register = (email, password, name) => {
return fetch(`${BASE_URL}/signup`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Con... |
$(document).ready(function() {
getCountryCode();
$("#guest").on("click", function() {
deleteAllCookies();
});
$("#indian-donation-button").on("click", function() {
$(".submit-button,.login-button").attr("disabled", "disabled");
$("#donationmodelpopup").modal();
$("#login-form,#guest").show();
... |
import VenusAtmosphere from "./VenusAtmosphere.js";
class Venus {
constructor() {
const geom = new THREE.SphereGeometry(0.86, 40, 40);
this.atmosphere = new VenusAtmosphere();
const mat = new THREE.MeshPhongMaterial({
map: new THREE.TextureLoader().load("./assets/img/venus_surface.jpg")
});
... |
/**
* Created by xuwusheng on 16/1/27.
*/
define(['../app'], function (app) {
app.directive('topMenu', [function () {
return {
restrict:'EA',
replace:true,
transclude:true,
template:'<div ng-transclude></div>',
link: function ($scope,el,attr) {
... |
import React from 'react';
import { connect } from 'react-redux';
import { Redirect } from 'react-router-dom';
import { login } from './actions';
import Login from './Login';
class LoginPage extends React.Component {
state = {
redirect: false
}
login = ({email, password}) => {
return this.props.login({... |
'use strict';
module.exports = function (tblcard_static) {
};
|
import React from 'react';
import s from './ProfileInfo.module.css';
import Preloader from '../../common/preloader/Preloader';
import ProfileData from './ProfileData';
const ProfileInfo = (props) =>
{
if (!props.profile) {
return <Preloader />
}
return (
<div className={s.descriptionBlock}>... |
//
//= require authorization
//= require cable_consumer
//= require_tree ./channels
|
import Orientation from 'react-native-orientation';
import React, { Component } from 'react';
import { StyleSheet,BackHandler } from 'react-native';
import { Container,Button,Title,Content,Header, View,Text, Left, Body, Icon } from 'native-base';
import QRCodeScanner from 'react-native-qrcode-scanner';
import { Permis... |
/**
* Created by sgupta on 6/18/16.
*/
angular.module('oms.interceptors.soa',['ngStorage'])
.config(['$httpProvider',function($httpProvider) {
var interceptor = ['$q','$sessionStorage',function($q,$sessionStorage) {
return {
'request':function(config) {
//... |
import React, { Component } from "react";
import { NavLink, Route } from "react-router-dom";
import "./App.css";
class App extends Component {
render() {
return (
<div className="App">
<NavLink to="/register">Sign Up</NavLink>
<NavLink to="/login">Sign In</NavLink>
<NavLink to="/jok... |
var agregarTarea = function(){
var lista = document.getElementById("lista"),
tarea = document.getElementById("tareaA"),
nuevaTarea = document.getElementById("boton");
var tarea = tareaA.value;
var nuevaTarea = document.createElement("div");
var contenido = document.createTextNode(tarea);
var icono = docu... |
import {
MESSAGES_LOADED_SUCCESS,
MESSAGES_LOAD,
MESSAGE_LOAD,
MESSAGES_LOAD_FAIL,
MESSAGE_INFO_LOADED_SUCCESS,
MESSAGE_INFO_LOADING_FAIL,
MESSAGE_COUNTER_SUCCESS,
} from './types';
import {
SECRET_KEY,
DEVICE_OS,
MESSAGES_LOADING_URL,
MESSAGE_LOADING_URL,
} from './constants';
import axios from '... |
/* eslint-env browser */ /*- global SVGAnim */
import SVGAnim from '@artdeco/snapsvg-animator'
// const json = require('./menu.json')
const menuContainer = document.getElementById('menu')
const width = 1226
const height = 818
const assignListeners = () => {
setTimeout(() => {
const about = menuContainer.queryS... |
import React from 'react';
import PropTypes from 'prop-types';
const ResultList = props => {
const { projects } = props;
return projects.map(value => (
<table key={value.projectId}>
<tbody>
<tr>
<th>Project Name</th>
<th>Project Description</th>
<th>Job Number</th>
... |
var express = require('express');
var router = express.Router();
var adminFunc = require('../../controllers/admin');
router
.post('/signup', adminFunc.signup)
.post('/login', adminFunc.login);
module.exports = router;
|
// Safe IIFE
(function(global, $) {
//
// Return a new empty object
const Greetr = function(firstName, lastName, language) {
return new Greetr.init(firstName, lastName, language);
};
// Hidden withing the IIFE and never directly accessible
const supportedLangs = ["en", "es", "fi"];
// Inf... |
// https://www.sanwebe.com/2014/08/css-html-forms-designs
import React from 'react';
//import useForm from '../hooks/useForm';
import useForm from '../hooks/useForm';
const initialValues = {
name: '',
email: '',
comment: '',
};
// const Api = useFetch('https://jsonplaceholder.typicode.com/users');
const AddComme... |
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import { useSelector } from 'react-redux';
// Components
import Home from './containers/Home/Home';
import Products from './containers/Products/Products';
import Show from './containers/Show/Show';
import Cart from './containers/Cart/Cart';
imp... |
import Vue from 'vue';
import Router from 'vue-router';
import Home from '../pages/Home'
import Res from '../pages/Res.vue'
import ResDetail from '../components/ResDetail'
Vue.use(Router)
var router = new Router({
mode:'history',
routes: [
{
path:'/',
component:Home
},
{
path:'/home... |
/**
* @param {number} N
* @return {number}
*/
var monotoneIncreasingDigits = function(N) {
var str = String(N);
str = str.split('');
var n = str.length, j = n;
for (var i = n-1; i>0; i--) {
if(str[i] >=str[i-1]) continue;
--str[i-1];
j = i;
}
for(var i = j; i<n; i++) {
str[i] = '9';
}
... |
import React from 'react';
import { connect } from 'react-redux';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { setFilter, initializeMOBrowser, dismissMOsFetchError } from './mobrowser-actions';
import './mo-panel.css';
import { addTab } from '../layout/uilayout-actions';
import { Classes, ... |
'use strict'
const Event = use('Event')
const Mail = use('Mail')
Event.on('forgot::password', async (data) => {
await Mail.send('auth.emails.password_reset', data, (message) => {
message
.to(data.user.email)
.from('hello@podcast.com')
.subject('Password reset link')
})
})
Event.on('password... |
export const RESET_ERROR = "RESET_ERROR";
export const USER_LOGIN_REQUEST = "USER_LOGIN_REQUEST";
export const USER_LOGIN_SUCCESS = "USER_LOGIN_SUCCESS";
export const USER_LOGIN_FAILURE = "USER_LOGIN_FAILURE";
export const USER_LOGOUT = "USER_LOGOUT";
|
angular.module('sxroApp')
.factory('PlatesInspectionFactory', function($http, $rootScope) {
return {
allPlatesExceptInstack: function() {
return $http.get($rootScope.baseUrl + 'allplatesexceptinstack');
},
containersWithSlotsAvailable: function() {
return $http.get($rootScope.... |
var express = require('express');
var router = express.Router();
var restaurantsController = require('../controllers/restaurantsController');
/* ADD RESTAURANT */
router.post('/', restaurantsController.addRestaurant);
/* SHOW RESTAURANTS */
router.get('/', restaurantsController.showRestaurants);
/* DELETE RESTAURANT... |
({
jsLoaded: function(component, event, helper) {
console.log('canvas ready to go');
},
handleClick : function(cmp, event) {
var instructions = [{name: "publisher.selectAction", payload: {actionName:"Case.Email"}},
];
console.log(Sfdc)
Sfdc.canvas.publisher.pub... |
/*
* AST Mail Sender Helper
*
* Copyright 2015 Astralink Technology
*
* Version 2.3
* Release date - 2015-05-12
* Released by - Fong Shi Wei
*
* Change Log
* ----------
*
*/
var config = _require('/config/webConfig');
var mailSendingConfig = config.mailConfig();
var sendgridKey = mailSendingConfig.sendGrid... |
import ifElse from "crocks/logic/ifElse"
import isString from "crocks/predicates/isString"
const reverse = ifElse(
isString,
s =>
s
.split("")
.reverse()
.join(""),
xs => Array.prototype.slice.call(xs, 0).reverse()
)
export default reverse
|
import React from 'react';
import echarts from 'echarts';
class Bar extends React.Component{
componentDidMount(){
this.init()
}
init(){
const myCharts = echarts.init(document.getElementById('main2'))
const option = {
color: ['#3398DB'],
tooltip : {
trigger: 'axis',
axi... |
$('.cls-10').click(function(){
$(this).addClass('active').siblings().removeClass('active')
$(`[data-box=${$(this).data('item')}]`).fadeIn().siblings().hide();
}) |
let arr = []
function generatearr(arr) {
for (let i = 0; i < 1100; i++) {
arr.push(Math.random() * 1100)
}
return arr
}
function max(arr) {
let max = -1000000
let min = 1000000
let median = 0
for (let i = 0; i < arr.length; i++) {
if (max < arr[i]) {
max = arr[i]... |
import React from 'react';
import PropTypes from 'prop-types';
import * as S from './styles';
const ErrorLabel = ({ text, action }) => (
<S.ErrorLabel>
<S.ErrorLabel.Text>{text}</S.ErrorLabel.Text>
{action && <S.ErrorLabel.Action onClick={action} />}
</S.ErrorLabel>
);
ErrorLabel.defaultProps = {
action... |
/*global module*/
const webpack = require('webpack');
const path = require('path');
const glob = require('glob');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
var entryMap = getEntrys();
module.exports = env => {
var isProdEnv = env && env.prod;
return {
entry: entryMap,
resolve:... |
'use strict';
const response = require('../res');
const connection = require('../conn');
exports.listKritik = function(req, res) {
connection.query('SELECT * FROM v_kritikdansaran', function (error, rows, fields){
if(error){
console.log(error)
} else{
response.ok(rows, res)... |
import {GET_CATEGORY_LIST} from '../action_types'
const initState = []
export default function(perState=initState,action){
const {type,data} = action
let newState
switch (type) {
case GET_CATEGORY_LIST:
newState = [...data.reverse()]
return newState
default:
... |
export { default } from './BtnBox5.js'
|
import React, { useState, useEffect } from "react";
import { NavLink, Link } from "react-router-dom";
import SearchPanel from "../SearchPanel/SearchPanel";
import AuthForm from "../AuthForm/AuthForm";
import MessageForm from "../MessageForm/MessageForm";
import "../../App.css";
import "./style.css";
const Header = pro... |
import React, { Component } from "react";
import PersonListItem from './PersonListItem';
import firebase from '../data/Firebase';
import { Link } from 'react-router-dom';
class PersonList extends Component {
constructor(props) {
super(props);
this.ref = firebase.firestore().collection('People');
this.un... |
//import logo from './logo.svg';
import './App.css';
import {Container, Button, Form} from 'react-bootstrap';
import Amplify from "aws-amplify";
import { API } from 'aws-amplify';
import { useLocation } from 'react-router-dom';
import queryString from query-String;
import awsExports from "./aws-exports";
Amplify.conf... |
quitsmokingApp.BankbookFacade = function() {
this.bankbookProxy = clone(new quitsmokingApp.BankbookProxy(this));
this.bankbookCommand = clone(new quitsmokingApp.BankbookCommand(this));
this.bankbookMediator = clone(new quitsmokingApp.BankbookMediator(this));
quitsmokingApp.BankbookFacade.prototype.retrieveMed... |
import request from 'supertest';
import { when } from 'jest-when';
import { updateLogEvent } from '../../middleware/logging';
import { sendRetrievalRequest, sendUpdateRequest } from '../../services/gp2gp';
import app from '../../app';
jest.mock('../../config/logging');
jest.mock('../../middleware/logging');
jest.mock(... |
const express = require('express');
const router = express.Router();
const itemsController = require('../controllers/items');
const movieController = require('../controllers/movies');
const showController = require('../controllers/shows');
const personController = require('../controllers/persons');
router.get('/', i... |
var input1 = document.getElementById('js-input');
var select = document.getElementById('js-select');
var input2 = document.getElementById('js-input2');
var button = document.getElementById('js-btn');
var textarea = document.getElementById('js-area');
// textarea.style.fontSize = '48px'
button.addEventListener('click'... |
import React, { Fragment } from 'react';
import { shape, arrayOf, number, string } from 'prop-types';
import { FormattedMessage } from 'react-intl';
import { mergeClasses } from '@magento/venia-ui/lib/classify';
import Pagination from '@magento/venia-ui/lib/components/Pagination';
import RichContent from '@magento/veni... |
import React, { Component } from 'react';
import './styles/design.scss';
import SubHeader from './subHeader';
// trip list images
import tripListSketch1 from './resources/planitScreens/trip-list-sketch-1.jpg';
import tripListSketch2 from './resources/planitScreens/trip-list-sketch-2.jpg';
import tripListLofi1 from './r... |
const ControlForm = React.createClass({
getInitialState() {
return {
image: this.props.initialImage,
rows: this.props.initialRows,
columns: this.props.initialColumns,
curviness: this.props.initialCurviness,
barHeight: this.props.initialBarHeight
... |
const crypto = require('crypto');
const util = require('util');
const randomBytes = util.promisify(crypto.randomBytes);
const token = async () => {
const rawToken = await randomBytes(32);
return rawToken.toString('hex')
}
module.exports = token; |
console.log('printed 3');
|
/**
Author: Denis Zavgorodny denis.zavgorodny@gmail.com
17.07.14
Plugin for autoresize textarea
Fix original height calculate method
*/
$.sceditor.plugins.autoheight = function() {
var base = this;
var $editorContainer;
var $wysiwygBody;
var $wysiwygEditor;
base.signalReady = function(){
$editorContainer ... |
import CodeDemo from './CodeDemo';
it('calculates half-price discout', () => {
const discounter = new CodeDemo(0.5);
expect(discounter.calcNewPrice(100.00)).toBe(50.0);
}); |
/**
* @author Shreya Jain
*/
const Color = require('./MonopolyColor');
const Player = require('./player');
class Fortune {
constructor(string,wealthImpact) {
this.string=string;
this.wealthImpact = wealthImpact;
}
toString() {
return this.string;
}
applyWealthImpact(player) {
pl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.