text stringlengths 7 3.69M |
|---|
import React from 'react';
import './App.css';
import Header from "./components/Header/Header";
import Nav from "./components/Nav/Nav";
import { BrowserRouter } from "react-router-dom";
import { ThemeProvider, createMuiTheme, responsiveFontSizes } from '@material-ui/core/styles';
function App() {
return (
... |
import React from "react";
import icon from "./icon.png";
import { NavLink } from "react-router-dom";
import s from "./Header.module.css";
import Auth from "./Auth/Auth";
function Header(props) {
return (
<header className={s.header}>
<NavLink to="/">
<img src={icon} alt="icon" />
</NavLink>
... |
'use strict'
const express = require('express');
const path = require('path');
const favicon = require('serve-favicon');
const logger = require('morgan');
//const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');
const config = require('./config');
const tool = require('./tool');
cons... |
import React from 'react';
import { Box } from '@sparkpost/matchbox';
import { tokens } from '@sparkpost/design-tokens';
import { PlayCircleFilled, PauseCircleFilled } from '@sparkpost/matchbox-icons';
import styled, { keyframes } from 'styled-components';
const move = keyframes`
0%, 100% { transform: translateY(0);... |
const fs = require('fs');
const read = async (f_path, callback) => {
fs.readFile( f_path, (err, data) => {
console.log(data.toString());
})
}
const write = async (f_path, content, callback) => {
fs.writeFile(f_path, content, (err) => {
if (err) {
console.error('Error writing on... |
// Component for popup message
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { setPopup } from './actions';
class Popup extends React.PureComponent {
constructor(props) {
super(props);
this.animationListener = this.animationListener.bind(this);
... |
import React, { useState } from "react";
import NotesList from "./NotesList";
import SearchField from "./SearchField";
import styled from "styled-components";
const Sidebar = () => {
const [search, setSearch] = useState("");
const handleChange = (e) => {
setSearch(e.target.value);
};
return (
<>
... |
/* eslint-disable */
'use strict';
const fs = require('fs')
const paths = require('./paths');
// todo get process.args
const args = [...process.argv].slice(2)
fs.createReadStream(`${paths.envFiles}/.env.${args[0]||'default'}.js`)
.pipe(fs.createWriteStream(paths.dotenv));
|
var tape = require('tape')
var m = require('../util')
var mount = m.mount
var unmount = m.unmount
tape('mount manifest at root', function (t) {
var manf = {}
mount(manf, [], {thing: 'async'})
t.deepEqual(manf, {thing: 'async'})
mount(manf, ['foo'], {thing: 'async'})
t.deepEqual(manf, {thing: 'async', f... |
'use strict';
const IGLU_SCHEMA_PREFIX = 'iglu:'; // TODO: Refactor: this constant is duplicated
const IGLU_SCHEMA_REGEX = RegExp('^iglu:([a-zA-Z0-9-_.]+)/([a-zA-Z0-9-_]+)/([a-zA-Z0-9-_]+)/((?:[0-9]+-)?[0-9]+-[0-9]+)$');
let isMyJsonValid = require('is-my-json-valid');
class Schema {
constructor (json) {
if (j... |
import React, { Fragment, useState, useEffect } from 'react';
import { useHistory} from 'react-router-dom';
import {Input, Select, DatePicker, Button, Cascader } from 'antd';
const { Option } = Select;
const { RangePicker } = DatePicker;
const { TextArea } = Input;
import './search-condition-list.less'
import { lib } f... |
/**
*
*/
/**
* 标准的 搜索栏 按钮栏 表格 页面,拉升表格 填充整个页面
*/
var adjustCommonTablePage = function(){
var windowHeight = $(window).innerHeight();
var searchboxHeight = $('.ik-searcharea').outerHeight();
var menubarHeight = $('.ik-menubar').outerHeight();
var paginatorHeight = $('.ik-datatable .ui-paginator').o... |
/**
* Loading this script file extends all flowlet objects with
* validation capabilities.
*/
(function () {
Flowlet.Factory.extend ( {
/**
*
*/
withValidationIcon : function () {
var form =
this
.withElementWrap... |
/* remove this comment and place your JavaScript here */
/*
When did you start studying for exams?
a. 1 month in advance of course(1pt)
b. I start organzing 2 weeks in advance and study the week before(2pt)
c. I'll probably pull an all nighter before each one(3pt)
d. WHAT EXAMS(4pt)
What do you see yourself d... |
import React from "react";
import { createStackNavigator } from "@react-navigation/stack";
import Initial from './layouts/Content/InitialScreen';
import Login from './layouts/Content/Login/LoginScreen';
import Signup from './layouts/Content/Signup/SignupScreen';
import EmailSign from './layouts/Content/Signup/EmailScr... |
import React, { Component,Fragment } from 'react';
import { Container, Row, Col } from 'react-bootstrap';
import bulletPoint from './../../asset/images/bulletPoint.webp';
import {Link} from "react-router-dom";
class services extends Component {
render() {
return (
<Fragment>
<Co... |
import React from 'react';
import logo from '../../assets/logo.svg'
import './LoginPage.scss'
function Login() {
return (
<div className="login-page">
<div className="login-container">
<img src={logo} alt="logo"/>
<div className="">
<div className="input-form">
<label>... |
import { BINDGROUP_VIEW } from "./constants.js";
/**
* Options to drive shader processing to add support for bind groups and uniform buffers.
*
* @ignore
*/
class ShaderProcessorOptions {
/** @type {import('./uniform-buffer-format.js').UniformBufferFormat[]} */
uniformFormats = [];
/** @type {import('... |
import React, { Fragment } from 'react';
import { Link } from 'gatsby';
import styled from 'react-emotion';
import NavigationList from './navigation';
const TitleContainer = styled('div')`
margin: 0 auto;
width: 85%;
padding: 1.45rem 1.0875rem;
display: inline-block;
`;
const HeaderText = styled('h1')`
margin:... |
import React from "react";
import "./Logo.scss";
import moneysafeLogo from "./assets/moneysafe.svg";
export const logoSizes = {
SM: "sm",
MD: "md",
LG: "lg"
};
export const assets = {
MONEYSAFE: moneysafeLogo
};
const COMPONENT_CLASS = "v-logo";
export const Logo = ({ size, asset, ...otherProps }) => (
<i... |
const axios = require('axios');
const getLugarLatLng = async(nombre) => {
const encodedUrl = encodeURI(nombre)
console.log(encodedUrl);
const instance = axios.create({
baseURL: `https://restcountries-v1.p.rapidapi.com/name/${encodedUrl}`,
headers: { 'x-rapidapi-key': '2425a40b9bmsh0... |
// const Ravepay = require('flutterwave-node');
// // This is the Flutterwave API Credentials
// const rave = new Ravepay(PUBLICK_KEY, SECRET_KEY, false);
// rave.Card.charge(
// {
// "cardno": "5438898014560229",
// "cvv": "564",
// "expirymonth": "10",
// "expiryy... |
const { setInterval, clearInterval } = require('long-timeout')
const { toMilliseconds } = require('./../../durationConverter')
class IntervalTaskRunner {
run(task) {
this.timeout = setInterval(task.fn, toMilliseconds(task.timing))
}
stop(task) {
clearInterval(this.timeout)
}
}
module.exports = Interva... |
rawexample = true;
|
const path = require('path');
module.exports = {
port: 80,
apiVersion: '/api/v1'
};
|
import React from "react";
function HelpScreen(props) {
return <div>Help</div>;
}
export default HelpScreen;
|
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
// Jobs database schema
const jobSchema = new Schema({
url: String,
title: String,
company_name: String,
category: String,
job_type: String,
publication_date: Date,
candidate_required_location: String,
salary: String,
description: ... |
// Aula 17 - 20/09/2021
// Métodos Avançados
// ex10Flat.js
// Flat = Plano
// Método Insere um sub-array dentro do array principal
let numeros = [1,2,3,[4,5,[6,7]]]; //[array principal,[sub-array[sub-array]]
// => Método Insere um subarray no array pai
console.log(numeros);
novoArray = numeros.flat(2);
console.log(... |
var iszoomon = false;
var port = chrome.runtime.connect({name: "backpage"});
var message = "";
function commication(){
chrome.runtime.onConnect.addListener(function(port){
port.postMessage({fromBack:"here"});
port.onMessage.addListener(function(msg){
console.log(msg.fromRunning);
i... |
if (typeof(PhpDebugBar) == 'undefined') {
// namespace
var PhpDebugBar = {};
}
/**
* @namespace
*/
PhpDebugBar.Widgets = (function($) {
var widgets = {};
/**
* Replaces spaces with and line breaks with <br>
*
* @param {String} text
* @return {String}
*/
var html... |
import React, {useState, useEffect, useRef} from 'react'
import {ApiService} from '../../../services/apiService'
const Balance = () => {
let walletData;
let user;
let api;
const [wallet,setWallet] = useState([]);
async function getWallet() {
api = new ApiService();... |
const twitterDecoder = (function(){
const twDomains = ["twitter.com", "mobile.twitter.com"];
const twMainSelector = '.r-rthrr5, .r-150rngu, .r-1obr2lp';
const profileSelector = '.r-1cad53l, .r-ku1wi2';
const contentSelector = '.r-779j7e, .r-1j3t67a, .r-1w50u8q.r-o7ynqc';
const twEmojiSelectors = [
{
... |
/* jshint esversion: 6 */
import * as React from 'react';
import expect from 'expect';
import { configure, shallow } from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
import renderer from 'react-test-renderer';
import * as actions from '../actions/audioActions';
import RevertAction from '../components/contr... |
var React = require('react');
var Router = require('react-router');
var ReactBootstrap = require('react-bootstrap');
var $ = require('jquery');
var CityLinkList = require('./city-link-list');
var GoogleCalendar = require('./social/google-calendar');
var TwitterTimeline = require('./social/twitter-timeline');
var DevCo... |
// @flow
import React from 'react';
import { View, StyleSheet, Text } from 'react-native';
import {
UIColor,
UIComponent,
UIStyle,
UIActionImage,
UIUnfold,
} from '../services/UIKit';
import icoExpand from '../assets/ico-expand.png';
import icoCollapse from '../assets/ico-collapse.png';
const sty... |
(function($) {
var members = {
private : {
create : function(options) {
var $self = $(this);
if (!$self.data('pdDialog')) {
$self.hide();
$self.addClass('pd-dialog-window');
$self.css({
'position' : 'absolute',
'left' : '50%',
'top' : '50%',
'margin-left' : - ... |
'use strict';
const path = require('path');
module.exports = function (grunt) {
grunt.file.mkdir(path.join(__dirname, 'build'));
grunt.initConfig({
eslint: {
options: {
fix: true
},
target: ['lib/**/*.js']
},
mochaTest: {
... |
const co = require('co')
const Tool = require('./tool')
const Sunspot = require('../models/sunspot')
class ResetConnectionsStateTool extends Tool {
runTool() {
return co(function *(){
yield Sunspot.remove({})
console.log('ALL CONNECTIONS REMOVED')
})
}
}
let tool = new ResetConnectionsStateToo... |
({
getTeamsWeeksPostDataFirstTime : function(component,event,helper) {
let whichWeek = component.get("v.whichWeek");
let startDate = component.get("v.startDate");
let endDate = component.get("v.endDate");
// start showing loader
helper.showLoader(component,event,helper);
... |
'use strict'
const pump = require('pump')
const from = require('from2')
const through = require('through2')
const csv = require('csv-write-stream')
const fs = require('fs')
const oneStationAtATime = (stations) => {
const keys = (function* (obj) {
for (let key in obj) yield key
})(stations)
return from({objectMo... |
const express = require('express')
const bodyParser = require('body-parser')
const config = require('config')
const routes = require('./routes/providers')
const app = express()
app.use(bodyParser.json())
app.use('/api/providers', routes)
app.listen(config.get('api.port'), () => console.log('Api it\'s working!'))
... |
import React from 'react';
import RNBluetoothClassic from 'rn-bluetooth-classic';
import {
Container,
Text,
Header,
Left,
Button,
Icon,
Body,
Title,
Subtitle,
Right,
} from 'native-base';
import {
FlatList,
View,
StyleSheet,
TextInput,
TouchableOpacity,
} from 'react-native';
import { Buff... |
"use strict";
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
Object.defineProperty(expor... |
#!/usr/bin/env node
'use strict';
var base64 = require('../base64'),
argv = require('optimist').argv;
if (argv._[0]) {
process.stdout.write(base64(argv._[0]));
}
else {
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(data) {
process.stdout.write(base64(data... |
import Reqwest from 'reqwest';
const key = 'P5ABZ-72QK5-V5AIG-Q6BXO-TZMZS-ZXF5Y';
class Api {
search(keyword, boundary = 'region(深圳)') {
return Reqwest({
url: 'https://apis.map.qq.com/ws/place/v1/search',
type: 'jsonp',
data: {
keyword: encodeURI(keyword),
boundary: encodeURI(b... |
/*
* Test qu'une liste {Array} contienne (ou non) un objet qui possède au moins
* les propriétés définies dans +props+.
*
* @param arr {String} Nom de la variable dans l'application (donc sans "APP")
* @param props {Object} Liste des propriétés à comparer (p.e. {id:12, class:'Fiche'})
* ... |
import React from 'react';
import Hero from '../../sections/Hero';
import MainFeatures from '../../sections/MainFeatures';
import Banner from '../../sections/Banner';
import SmallerFeatures from '../../sections/SmallerFeatures';
import OtherProducts from '../../sections/OtherProducts';
import CallOut from '../../secti... |
import React, {useState, useEffect} from 'react';
import { View, FlatList, Text, Image, Modal, TouchableOpacity } from 'react-native';
import firebase from 'react-native-firebase'
import FastImage from 'react-native-fast-image'
import { styles } from './styles';
import ModalStore from './ModalStore'
const ItemList = ... |
var TREE_ITEMS = [
['Verwaltung von Online-Shops', null,
['Über diese Onlinehilfe', '../../intro_about.html'],
['Einleitung', '../../ov_task.html',
['Shopmanager Überblick', '../../ov_task.html',
['Kataloge und Produkte', '../../ov_task.html#ov_task_pim'],
['Content-Management', '../../ov_task.html#o... |
window.onload = function() {
var gifArray = ["jello", "trip", "puppy", "fire", "twerk"];
function renderGifBtns(){
$("#buttonBox").empty()
for(var i=0; i<gifArray.length; i++){
var newGifBtn = $("<button>");
$(newGifBtn).attr("id", gifArray[i]).addClass("gifButton btn btn-primary btn-lg").html(gifArray[i]);
$... |
var searchData=
[
['ti_5fsdo_5fce_5fosal_5fmemory_5fallocparams',['ti_sdo_ce_osal_Memory_AllocParams',['../structti__sdo__ce__osal___memory___alloc_params.html',1,'']]]
];
|
import bs from 'browser-sync'
import { styles } from './styles.js'
import { scripts } from './scripts.js'
import { assets } from './assets.js'
import pkg from 'gulp'
import { prepareHtmlDev } from './prepare-html-dev.js'
import { convertHBS } from './hbs.js'
const { series, watch } = pkg
export const server = bs.crea... |
import axios from 'axios'
import {BASE_URL} from './config'
export function getArtistList () {
return new Promise((resolve, reject) => {
axios.get(`${BASE_URL}/top/artists?offset=0&limit=100`)
.then(res => {
resolve(res.data)
})
.catch(err => reject(err))
})
}
expor... |
import React, { useState, useEffect } from 'react';
import { BrowserRouter as Router, Route } from "react-router-dom";
import axios from 'axios';
import List from "./components/List";
import View from "./components/View";
import AddEdit from "./components/Add-Edit";
import 'bootstrap/dist/css/bootstrap.min.css';
impo... |
'use strict';
angular
.module('tagstered')
.factory(
'InstagramAuthService',
[
'$http',
'$sce',
'$window',
function($http, $sce, $window) {
var apiURL = '/tagstered/auth/';
return {
getClientId : getClientId,
getUserByAccessToken : getUserByAccessToke... |
const browser = require('../../../../codeceptCommon/browser')
const BrowserWaits = require('../../../support/customWaits')
class AddUserPage{
constructor(){
this.container = $('exui-staff-add-edit-user-form')
this.headerTitle = $('exui-staff-add-edit-user-form .govuk-heading-xl')
this.f... |
import ExpFrameBaseComponent from '../exp-frame-base/component';
import VideoRecord from '../../mixins/video-record';
import layout from './template';
import Em from 'ember';
import { observer } from '@ember/object';
let {
$
} = Em;
/**
* @module exp-player
* @submodule frames
*/
/**
* A frame to collect a v... |
var EnumerationInstance = function(enumeration, value){
this.enumeration = enumeration;
this.value = value;
};
EnumerationInstance.prototype.constructor = EnumerationInstance;
module.exports = EnumerationInstance; |
const express = require('express');
const speakersRoute = require('./speakers');
const feedbackRoute = require('./feedback');
const router = express.Router();
module.exports = ({ feedbackService, speakerService }) => {
router.get('/', (req, res) => {
res.render('pages/index', { pageTitle: 'Welcome' });
});
... |
// Responde las siguientes preguntas en los comentarios:
// ¿Cuál tipo de promedio elegiste para trabajar?
//--> Rango Medio
// ¿Qué casos de uso tiene tu tipo de promedio?
// --> Es una medidas útil que nos ayuda a analizar un conjunto de datos.
// Al ver los datos necesitamos entender cómo se extienden.
// ¿Cómo... |
import java.util.*;
import java.io.*;
class Node {
Node left;
Node right;
int data;
Node(int data) {
this.data = data;
left = null;
right = null;
}
}
class Solution {
/*
class Node
int data;
Node left;
Node right;
*/
public static int height(Nod... |
$(function() {
console.log("ready!");
$("#agreeToTermsCheckbox").click(checkIfToEnableOpenIssueButton);
$("#submitQuestionModalBtn").click(function() {
$("#submitQuestionFormBtn").click();
});
});
function checkIfToEnableOpenIssueButton() {
if ($("#agreeToTermsCheckbox").prop("checked... |
// pages/my/my.js
import My from './my-model.js'
const my =new My()
Page({
//页面的初始数据
data: {
isLogin:false
},
//生命周期函数--监听页面加载
onLoad: function (options) {
let token = wx.getStorageSync('token')
this.setData({isLogin:token})
console.log('token',token)
},
goMap(e) {
wx.navigateTo({
... |
const getters = {
// getObj: state => {
// return state.obj
// }
}
export default getters
|
import React, { useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { clearToCart, removeFromCart } from '../../actions/cart'
import Checkout from '../../components/Checkout'
import Message from '../../components/Message'
import { orderCreate } from '../../actions/order'
import Loader... |
import React from 'react';
import Row from "./Row";
const ProducTable = ({category1,category2}) => (
<table className="striped z-depth-2">
<thead>
<tr>
<th>Name</th>
<th>Item Price</th>
</tr>
</thead>
<tbody>
<tr>
<td> <h5>{ category1[0].category}<... |
import React from 'react'
import axios from 'axios';
import PostPreview from '../../components/PostPreview'
class Home extends React.Component {
constructor(props){
super(props);
this.state = {
posts: []
}
}
async componentDidMount() {
await axios.get('http://localhos... |
import produce from 'immer';
import { FETCH_COUNTRIES, FETCH_COUNTRIES_SUCCESS, FETCH_COUNTRIES_FAIL, CHANGE_SEARCH, CHANGE_REGION } from "./actionTypes";
export const INITIAL_STATE = {
loading: false,
error: false,
countries: false,
search: '',
region: ''
};
function rootReducer(state = INITIAL_STATE, acti... |
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { graphql, compose } from 'react-apollo';
import { Link } from 'react-router-dom';
import { LineContainer, VContainer, FlexContainer } from '@xinghunm/widgets';
import {
serverAddressQuery, c... |
import React, {Component} from 'react';
import {BottomNavigation, BottomNavigationItem} from 'material-ui/BottomNavigation';
import Paper from 'material-ui/Paper';
import MdIconLibraryBooks from 'material-ui/svg-icons/av/library-books';
import MdIconHome from 'material-ui/svg-icons/action/home';
import MdIconAccountCir... |
var map;
var layer;
var layerOptions;
var overlay;
var myLatLng;
MyOverlay.prototype = new google.maps.OverlayView();
function MyOverlay(image, center, options) {
this.image_ = image;
this.center_ = center;
this.options_ = options;
this.div_ = null;
if (options.map) {
this.setMap(options.... |
"use strict";
/**
* ToastJs.
* A simple Tudú implementation of a toast engine.
*
* @param {HTMLElement} container - The container element for
* all the toasts.
*/
function Toast(container) {
var container = container;
var className = 'toast';
/**
* Creates a simple basic toast.
*
* @param {st... |
import { withRouter } from "react-router";
import React from "react";
import "../CSS/Setting.css";
class Setting extends React.Component {
handleToOpensourcePage = () => {
this.props.history.push("/opensource");
};
handleToTradeHistoryPage = () => {
this.props.history.push("/profileset");
};
handleTo... |
'use strict';
define(['jquery', 'wdn'], function ($, WDN) {
$.noConflict(true);
var jQueryWarning = false;
Object.defineProperty(WDN, 'jQuery', {
configurable: false,
get: function get() {
if (!jQueryWarning) {
jQueryWarning = true;
if (console && console.warn) {
console.warn('Using jQuery via... |
import {STANDARD_SEMITONES, CENTS_PER_STANDARD_SEMITONE, transposeFrequency} from 'util/music';
import findBaseFrequency from './findBaseFrequency';
export default function findBaseFrequencies(semitones, rootFrequency) {
const frequencies = [];
for (let i = 0; i < semitones; i++) {
frequencies.push(findBaseFre... |
const Berita = require(model + "pengguna/berita.model")
const KategoriBerita = require(model + "pengguna/kategori_berita.model")
const storage = require(base+'service/Storage');
async function index(req, res){
let data = await this.DB('SELECT * FROM pengguna.kategori_berita kb INNER JOIN pengguna.berita b ON kb.id... |
import React from 'react';
const BannerTitle1 = () => {
return (
<h1 className='header-title'>
Odkryj siebie <span>na nowo</span> razem z naszą <span>kolekcją</span> mody
</h1>
);
}
export default BannerTitle1; |
import React, { Component, propTypes } from 'react';
import './scores.css';
import Apphead from '../apphead/apphead.js';
import Element from './scoresview.js';
const league = [
{ name: 'RPL', url: 'databox.json' },
{ name: 'EPL', url: './epl.json' },
{ name: 'LL', url: './LL.json' },
{ name: 'Bundesliga', url:... |
$(document).ready(function(){
$("#shop_id_ajax").change(function(){
var id = $(this).val();
$.ajax({
type: "POST",
url: BASE_URL + 'shop/get_shop_category/'+ id,
data: "ajax",
async: true,
success: function(data){
$("#shop_category_ajax").html(data);
}
})
});
$(document).on("click", "... |
var React = require('react');
var ApiUtil = require('../util/api_util.js');
var IndexItem = React.createClass({
_onHover: function() {
ApiUtil.updateHoveredBench(this.props.id);
},
_offHover: function() {
ApiUtil.updateHoveredBench(null);
},
render: function() {
return (
<div onMouseEnter... |
const config = require("../config")
const db = require("../db")
const getDataFromDB = require("./getDataFromDB")
const pino = require("../pino")
const cleanDB = async board => {
pino.trace("cleanDB for board /%s/",board)
pino.fatal("cleanDB should not be called right now!!")
try{
const now = Date.now()
... |
// convert integer to string with filled 0s
// 2 => 002, 34 => 034
const toNumberLength = (value, len = 3) => {
const res = String(value)
let zeros = '',
diff = len - res.length
while(diff > 0) {
zeros += '0'
diff--
}
return zeros + res
}
/**
* Shuffles array in place. ES6 version
* @param {Array} a items... |
var parse = require('css-parse');
var Handle = function (css) {
this.styleSheet = parse(css);
this.handles = [];
this.finalHandle = new Function();
};
Handle.prototype.use = function (properties, func) {
if (arguments.length == 1) {
this.handles.push({
properties: '*',
func: arguments[0]
});
return;
... |
const { CryptoCoin } = require('../../../app/models');
const coinObjects = require('../objects/crypto_coins');
exports.addMultipleCoins = (userId = 1) => {
const coins = coinObjects.coinsArray.map(coin => ({ ...coin, userId }));
return CryptoCoin.bulkCreate(coins);
};
|
import React, { useContext, useEffect, useState } from "react";
import styled from "styled-components";
import { EmailsContext } from "../../stores/emails-store";
import CheckboxList from "./checkbox-list";
import CheckboxSummary from "./checkbox-summary";
import SelectInput from "./select-input";
const SelectBox = st... |
const { TestWatcher } = require("@jest/core");
const Employee = require("../lib/Employee.js");
test("can set name via constructor argument", () => {
const testName = "Danny";
const a = new Employee(testName);
expect(a.name).toBe(testName);
});
test("can set id via constructor argument", () => {
const ... |
let express = require('express'),
app = express(),
request = require('request'),
port = process.env.PORT || 3000;
//Settings
app.set("view engine","ejs");
app.use(express.static(__dirname+ "/public"));
//Routes
let landingRoute = require('./routes/landing');
let optionsRoute = require('./rout... |
// Create a new date instance dynamically with JS
let d = new Date();
let newDate = d.getMonth()+'.'+ d.getDate()+'.'+ d.getFullYear();
// Personal API Key for OpenWeatherMap API
const apiKey = '01a0aa6f1009f8f5b17fb28c08c6c55e'
// Event listener to add function to existing HTML DOM element
const generate = document.... |
import React, {Component} from 'react';
import Zahlavi from '../rozlozeni/Zahlavi';
import Zapati from '../rozlozeni/Zapati';
export default class ONas extends Component {
mockA = {
odkaz: "http://portal.chmi.cz/",
obr: "./obrazky/reference/160px-CHMI_logo.svg.png",
popis: "Webové... |
import {
GraphQLList,
GraphQLFloat,
GraphQLObjectType,
GraphQLEnumType,
GraphQLInputObjectType,
GraphQLString
} from 'graphql'
export const GeometryEnum = new GraphQLEnumType({
name: 'GeometryEnum',
values: {
Point: {
value: 'Point'
},
Polygon: {
value: 'Polygon'
},
Line... |
import React, { Component } from 'react'
import {db} from '../firebase'
import MappBar from './mAppBar'
class CourseDetails extends Component {
state = {
eligibility:null,
title:null,
price:null,
image:null
}
componentDidMount(){
const data = db.collection("Classe... |
export const SET_NAME = 'SET_NAME';
export const SET_AGE = 'SET_AGE';
export const HOME_LIST = 'HOME_LIST'; |
'use strict'
/**
* Dot notation field test
**/
var _ = require('lodash'),
hooks = require('../test-helper/drop-create-hooks'),
should = require('should'),
async = require('async'),
models = require('../test-helper/models'),
DottedModel = models.DottedModel,
DottedScopedModel = models.DottedScopedModel
... |
import React from 'react';
import './thread.css';
import { Link } from 'react-router-dom';
class ThreadBody extends React.Component {
render() {
return (<div className="article">
<Link to={'/post/'+this.props.postId}>
<div>
<div className="title">
<h3>{this.props.titl... |
'use strict'
const Config = use('Config')
const ResponseHelper = use('ResponseHelper')
const StudentRepository = use('StudentRepository')
class AddController {
async add ({ request, response, transform }) {
// Get request body
const studentDetails = request.only(['user_id', 'school_id', 'name', 'phone_numbe... |
var keystone = require('keystone');
//var handlebars = require('')
var handlebars = require('handlebars');
handlebars.registerHelper('splitDesc', function(description) {
var description = description.split("\r\n");
var final = '';
for (var i= 0 ; i < description.length ; i++){
final = final + "<p>" + descrip... |
import React, { useState, useEffect, useContext } from 'react'
import './Navbar.css'
import PersonIcon from '@material-ui/icons/Person';
import FavoriteBorderIcon from '@material-ui/icons/FavoriteBorder';
import SearchIcon from '@material-ui/icons/Search';
import { Link } from 'react-router-dom'
import { FirebaseContex... |
var chalk = require('chalk');
var reporter = {
onSuccess: function(testName) {
console.log(chalk.green('Success: ' + testName + ' passed'));
},
onError: function(err) {
var failMessage = err.stack.split('\n')[0];
var lineOfFail = err.stack.split('\n')[2].replace(' at', '');
console.log(chalk.red(f... |
/* $Rev: 739 $
* $HeadURL: http://source.innectus.com/svn/innectus/trunk/loom/App/build/js/jsheaderdev.txt $
* $Id: jsheaderdev.txt 739 2010-02-13 00:55:43Z tesanto $
*
* Copyright (C) 2009 Innectus Corporation
* All rights reserved
* This code is proprietary property of Innectus Corporation.
* Unauthorized us... |
'use strict';
const gulp = require('gulp');
const ignore = require('gulp-ignore');
const istextorbinary = require('istextorbinary');
const conflict = require('gulp-conflict');
const installBinaryFiles = function (options) {
const src = options.src;
const srcDir = options.srcDir;
const destDir = options.destDir;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.