text stringlengths 7 3.69M |
|---|
import * as PropTypes from 'prop-types';
import * as React from 'react';
import Label from '../label/label';
import { uuid4 } from '../../../utils/utils';
/**
* @uxpincomponent
*/
export default class TextInput extends React.Component {
constructor(props) {
super(props);
this.state = { id: uuid4() };
}
... |
import styled from "styled-components";
import Title from "~/components/atoms/title/Title";
const TitlePrimitive = function ({alignment, underline, ...props}) {
return <Title {...props}>{props.children}</Title>;
};
const StyledTitle = styled(TitlePrimitive)`
${(props) => props.alignment != "left" && `text-align: ... |
const config = {
backendURL: process.env.BACKEND_URL || '127.0.0.1:3000'
}
export default config;
|
import http from 'http';
const Prometheus = require('prom-client');
const collectDefaultMetrics = Prometheus.collectDefaultMetrics;
collectDefaultMetrics();
export const guildGauge = new Prometheus.Gauge({
name: 'bot_guild_gauge',
help: 'The amount of guilds the bot is in',
});
export const messagesSentCounter ... |
import { withStyles, makeStyles } from "@material-ui/core/styles";
import { useContext } from "react";
import { StateContext } from "./StateProvider";
import Table from "@material-ui/core/Table";
import TableBody from "@material-ui/core/TableBody";
import TableCell from "@material-ui/core/TableCell";
import TableHead f... |
function isGuest() {
return (req, res, next) => {
if(req.user == undefined){
return next();
}
res.redirect('/');
}
}
function isAuth() {
return (req, res, next) => {
if(req.user != undefined){
return next();
}
res.redirect('/auth/login')... |
const path = require('path');
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const postcss = require('postcss');
const postcssPresetEnv = require('postcss-preset-env');
const {
CleanWebpackPlugin
} = require('clean-webpack-plugin');
modul... |
import React from 'react'
import { Provider } from 'react-redux'
import { cleanup, fireEvent, render } from '@testing-library/react-native'
import DATA from '../../../constants/DATA'
import Search from './Search.tsx'
import configureStore from 'redux-mock-store'
import * as action from '../../redux/actions/fairHandActi... |
import React from 'react'
import axios from 'axios'
/* Component structure:
class Name extends React.Compoenent {
methods, variables..
render() {
return(
>> JSX here <<
)
}
}
*/
class ExampleApp extends React.Component {
constructor() { // ... |
// example data format
// 연감, 명예의전당, 왕조, etc
const initialState = {
};
export default function historyReducer(state = initalState, action) {
switch(action.type) {
default:
return state;
};
}; |
import React, { Component, Fragment } from 'react';
import { Container, Text } from 'react-pixi-fiber';
import Box from 'Client/Components/Box';
import FlatButton from 'Client/Components/FlatButton';
import Animated from 'animated';
const AnimatedBox = Animated.createAnimatedComponent(Box);
const sleep = ms => new Pr... |
import React from 'react';
import styled from "styled-components";
const Button = styled.button`
border: 0;
outline: 0;
padding: 8px 1em;
color: #fff;
font-size: 20px;
font-weight: 600;
border-radius: 20px;
background-color: transparent;
border: 2px solid #490055;
transition: all 240ms ease-in-ou... |
(function () {
"use strict";
angular.module("vcas").service("MessagesService", MessagesService);
/* @ngInject */
function MessagesService($modal, MessageEntityTypes, ApiService) {
var baseUrl = "https://10.0.249.83:8090" + "/services/MessagingService/";
return {
generateOSM: generateOSM,
... |
// pages/financial/fdetail/fdetail.js
Page({
/**
* 页面的初始数据
*/
data: {
swiperInfo: {
imgUrls: [
'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
'http://img06.tooopen.com/images/201... |
import React from 'react';
import {render, screen, cleanup} from '@testing-library/react'
import userEvent from '@testing-library/user-event';
import {act} from 'react-dom/test-utils'
import PractitionerCard from '../PractitionerCard';
import * as questionnaireTemplate from '../../assets/questionnaire.json'
afterEach(... |
'use strict';
const fs = require('fs');
class BitmapTransform {
constructor() {
this.buf = null;
this.fileHeaderBuf = null;
this.detailHeaderBuf = null;
this.imageBuf = null;
this.fileHeader = null;
this.detailHeader = null;
}
open(file, callback) {
fs.readFile(file, ... |
if (typeof(JS_LIB_LOADED)=='boolean')
{
if (typeof(JS_FILESYSTEM_LOADED)!='boolean')
include(jslib_filesystem);
/**
* Globals
*/
var JS_DIR_FILE = "dir.js";
var JS_DIR_LOADED = true;
var JS_DIR_DIRECTORY = 0x01; // 1
var JS_DIR_DEFAULT_PE... |
import babel from 'rollup-plugin-babel';
import uglify from 'rollup-plugin-uglify';
import { minify } from 'uglify-es';
export default {
entry: 'lib/frontexpress.js',
format: 'iife',
sourceMap: true,
moduleName:'frontexpress',
dest: 'frontexpress.min.js',
plugins: [
babel({
... |
function checkVotingKey(web3, func, key, contractAddr, cb) {
var funcParamsNumber = 1;
var standardLength = 32;
SHA3Encrypt(web3, func, function(funcEncode) {
var funcEncodePart = funcEncode.substring(0,10);
var data = funcEncodePart
+ toUnifiedLengthLeft(key.substr(2));
call(web3, key, contrac... |
import express from 'express'
import adminController from '../controller/admin-controller'
let router = express.Router()
router.post('/add-admin', adminController.addAdmin)
router.post('/get-admin', adminController.getAdmin)
router.post('/update-admin', adminController.updateAdmin)
router.post('/delete-admin', adminC... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import Icon from '../Icon/Icon';
import {
matchType,
logoutType,
usernameType,
avatarType,
} from '../../constants/types';
import * as authActions from '../../redux/actions/authActi... |
/**
* ALLOWS FOR THE CONNECTION TO THE DB
*/
const mongoose = require('mongoose');
require('colors');
// function for connecting to the db
const connectDb = async () => {
// connect to the db
const conn = await mongoose.connect(process.env.MONGODB_URI, {
useUnifiedTopology: true,
useNewUrlPar... |
var family = function(){
this.id=0
this.money =0
this.expenses=0
this.saving=0
}
module.explort = {family} |
console.log("hello");
console.log("hello 2");
var x =10;
var y =47;
console.log(x+y);
|
/*
var bgpic='http://files.jb51.net/image/xunyun1980.jpg';var bgurl='https://www.xunyun.com/act/gaofang?utm_source=jb51&utm_medium=cpc&utm_term=%E7%BD%91%E9%A1%B5&utm_content=%E9%A6%96%E9%A1%B5%E5%85%A8%E5%B1%8F&utm_campaign=%E9%AB%98%E9%98%B21%E5%85%83';
jQuery('body').attr('style','background: #fff url('+bgpic+') c... |
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
// app.use(bodyParser.urlencoded({ extended: true}));
// app.post('/example', (req, res) => {
// res.send(`Full name is:${req.body.fname}.`);
// });
exports.dashboard = function(req, res){
var user... |
let x = 0;
for (let i = 2; i < process.argv.length; i++) {
x = x + Number(process.argv[i]);
}
console.log(x);
|
'use strict';
var url = require('url');
var redis = require('redis');
var platformFiles = require('./platform_files');
var logging = require('./logging');
var log = logging.setup(__filename);
process.on('message', function(msg) {
log.debug('Received a request from mommy and daddy: %s', JSON.stringify(msg));
va... |
// @flow
import * as React from 'react';
export type BookingDetail = {|
+id: string,
+isPastBooking: boolean,
+bookingId: number,
+arrivalCityId: string,
+arrivalTime: Date,
+departureTime: Date,
+authToken: string,
|};
const defaultState = {
id: '',
isPastBooking: false,
bookingId: 0,
arrivalC... |
import Mongoose from 'mongoose';
const Schema = Mongoose.Schema;
var PostSchema = new Schema({
title: String,
description: String,
img: {
rel: String,
href: String,
},
});
PostSchema.index({ name: 1});
let Post = Mongoose.model('Post', PostSchema);
export default Post; |
import express from "express";
import authRoutesMethods from "../../authorisation/routeMethods";
const router = express.Router();
function initRoutes(app) {
/* POST Login. */
router.post('/token', app.oauth.grant());
router.get('/login', authRoutesMethods.isAuthorised, authRoutesMethods.login);
/* ... |
import styled from "styled-components";
export const KeyButton = styled.button`
width: ${(p) => p.width};
font-family: var(--main-font);
border: 0;
outline: 0;
display: flex;
justify-content: center;
align-items: center;
font-size: 2.2rem;
padding: 1.2rem 0.5rem;
border-radius: 0.5rem;
cursor: po... |
// Generated by https://pagedraw.io/pages/9009
import React from 'react';
import './tab_selected.css';
function render() {
return <div className="tab_selected-tab_selected-1">
<div className="tab_selected-0">
<div className="tab_selected-path-1">
<div className="tab_selected-0-0... |
import React, { Component } from "react";
import { Redirect, Switch, Route, Link } from "react-router-dom";
import { Navbar, Nav, NavDropdown } from 'react-bootstrap';
import { withRouter } from "react-router";
import "./Dashboard.css";
import Master from "../master/Master";
import Pos from "../pos/Pos";
import Index... |
import React, { useState,useEffect } from 'react';
import Movie from "./Movie";
import TextField from '@material-ui/core/TextField';
import Button from '@material-ui/core/Button';
import SearchIcon from '@material-ui/icons/Search';
import {makeStyles} from "@material-ui/core/styles";
import styles from "../styles/Searc... |
describe("@summary tag", function() {
var docSet = jasmine.getDocSetFromFile('test/fixtures/summarytag.js'),
doc = docSet.getByLongname('Sam')[0];
it("sets the doclet's 'summary' property to the tag value", function() {
expect(doc.summary).toBe('I do not like green eggs and ham!');
});
});
|
// If deployed, use the deployed database. Otherwise use the local mongoHeadlines database
var MONGODB_URI = process.env.MONGODB_URI || "mongodb://localhost:27017/mongoHeadlines";
mongoose.connect(MONGODB_URI);
|
var age = 0;
var gender = -1;
var working = 0;
var travel = 0;
var job = 0;
var abroad = 0;
var cb_tick = false;
var close_contact = 0;
var checked_boses = 0;
var chk_symp1_yes_value_val = 0;
var severe_status_val = 0;
var checked_boses2 = 0;
var checked_boses3 = 0;
var score = 0;
var quiz_score = 0;
f... |
// Inicializo los botones e inputs principales y les agrego sus listeners de eventos
// BOTON AGREGAR
let btnAgregar = document.querySelector("#btnAgregar");
btnAgregar.addEventListener("click", agregar);
// INPUT DE SELECTOR DE TIPO
let tipo = document.querySelector('#tipo');
tipo.addEventListener("click", i... |
import React, { Component, Fragment } from 'react'
import { Button } from 'rebass'
import Icon from './Icon'
class AlignmentButtons extends Component {
handleClick = alignment => e => {
e.preventDefault()
if (this.props.onChange) {
this.props.onChange(alignment)
}
}
render() {
c... |
'use strict';
// #!include DeviceListView.js
// #!include DeviceView.js
// initialization
$("#devicesLink").addClass("active");
var ui = React.createElement(
"div",
{ className: "row" },
React.createElement(
"div",
{ className: "col-md-4" },
React.createElement(DeviceListView, n... |
module.exports=(function () {
var data = { properties: [], extensions: [], rules: [], ruleComponents: [], dataElements: [], hosts: [], environments: [] }
var addProperty = (property) => {
data.properties.push(property)
}
var getProperty = (propertyId) => {
// console.log(propertyId);
... |
export const JobData = [
{
company: "Microsoft via KarmHub",
title: "Software Engineer",
description: "",
points: [
"Collaborate and develop feature work on enterprise customer data platform.",
"Create unit tests for existing codebase.",
],
image: "msft-icon.jfif",
technologies... |
/* @flow */
import React from 'react'
import PropTypes from '../../utils/PropTypes.js'
import Formsy from 'formsy-react'
import { VelocityComponent } from 'velocity-react'
import classNames from 'classnames'
import styles from './Input.css'
const Input = React.createClass({
propTypes: {
className: PropTypes.str... |
export const CREATE_POLYGON = "CREATE_POLYGON";
export const EDIT_POLYGON = "CREATE_POLYGON";
export const RENDER_MAP_DEFAULTS = "RENDER_MAP_DEFAULTS";
export const RESET_MAP_DEFAULTS_SUCCESS = "RESET_MAP_DEFAULTS_SUCCESS";
|
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {fetchAllPostsIfNeeded, fetchCategoryPostsIfNeeded, addPost} from '../actions/posts';
import {connect} from 'react-redux';
import {Button, Card, Container, Loader, Menu, Message, Modal} from 'semantic-ui-react';
import Header from './Hea... |
const Dai = artifacts.require("Dai");
const DaiContract = artifacts.require("DaiContract");
module.exports = async function(deployer, _network, accounts) {
await deployer.deploy(Dai);
const dai = await Dai.deployed();
await deployer.deploy(DaiContract, dai.address);
const daiContract = await DaiContract.deploy... |
var oneall_js_protocol = (("https:" == document.location.protocol) ? "https" : "http");
document.write(unescape("%3Cscript src='" + oneall_js_protocol + "://clevernotesie.api.oneall.com/socialize/library.js' type='text/javascript'%3E%3C/script%3E"));
oneall.api.plugins.social_login.build("social_login_container", ... |
import {setEntries, next, vote} from '../src/actions';
import {List, Map} from 'immutable';
import {expect} from 'chai';
describe('Actions', ()=> {
it('creates SET_ENTRIES action', ()=> {
const entries = List.of('T', 'D');
expect(setEntries(entries)).to.deep.equal({type: 'SET_ENTRIES', entries});
});
... |
// @flow
import { handleActions } from 'redux-actions';
import {
setText,
setMessage,
setError,
reset,
} from '../actions/chat';
import { chatMessage } from '../typing/types';
type stateType = {
messages: Array<chatMessage>,
text: string,
error: boolean,
}
export const initialState: stateType = {
mes... |
import jwt from "jsonwebtoken";
import config from "../config/auth.config.js";
// function to verify if token is valid or not
const verifyToken = async (req, res, next) => {
const token =
req.body.token || req.query.token || req.headers["x-access-token"];
// if token does not exist:
if (!token) {
return ... |
module.exports = [
['0x851fb899da7f80c211d9b8e5f231fb3bc9eca41a', 1000],
['0x74f72193E880cD5E903CB3cfD2d282fC5F214b28', 1000],
['0x86Da253817DC599059e3AD5A1F098F7b96aBf34c', 1000],
['0x6a1cf24c645db2e37141fa12e70cb67e56b336f3', 1000]
] |
seajs.config({
base: './modules/config-base/'
})
define(function(require) {
var test = require('../../test')
var a = require('a')
test.assert(a.name === 'a', a.name)
test.done()
})
|
import React from "react";
function Header() {
return (
<div className="row bg-dark py-5">
<div className="text-white">
<h1>Chat with me!</h1>
</div>
</div>
);
}
export default Header;
|
const handleTransitioned = event => {
if (event.propertyName !== "transform") return;
event.path[0].classList.remove("playing");
};
const handleKeyPress = event => {
const audio = document.querySelector(`audio.${event.key.toLowerCase()}`);
if (audio === undefined) return;
const key = document.querySelector... |
var searchData=
[
['traiter',['traiter',['../classArrivee.html#a736bc94f357d2e45b30b9bac19e6d983',1,'Arrivee::traiter()'],['../classDepart.html#a2f791f13cc90635dffa097bfe00cd830',1,'Depart::traiter()'],['../classEvenement.html#acdd3bcdfd567c85a61416a4e5c3f11de',1,'Evenement::traiter()']]]
];
|
import { createAction } from 'redux-actions';
export const DRAWER = 'UI/DRAWER';
export const drawer = createAction(DRAWER, 'open');
export const openDrawer = createAction(DRAWER, () => true);
export const closeDrawer = createAction(DRAWER, () => false);
|
import React from 'react';
import styled from '@emotion/styled';
const ModalFooter = styled.footer`
${modalFooter}
font-family: 'Nanum Gothic', sans-serif;
color: #ffffff;
background-color: #6055CD;
border: 1px solid #6055CD;
height: 120px;
.choice {
font-weight: bold;
height: 70px;
border-b... |
export default (tabs) => {
return {tabs};
}
|
import { swap } from '../../utils/array-utils';
import { lessThan } from '../../utils/compare-utils';
import builder from '../../utils/sort-builder';
function sortFunction() {
let selectionLength = this.elements.length - 1;
for(let i = 0; i < selectionLength; i++) {
let smallestIndex = getIndexForSmal... |
const {db,student}=require('./model')
const task=async ()=>{
try{
await db.sync()
//insert a student
const students=await student.findAll({
where:{age:{$gt: 12}},
order:[
['age','DESC'],
['name','ASC'],
]
})
student... |
/**
* Created by I305845 on 21/05/2016.
*/
// load the things we need
var mongoose = require('mongoose');
// define the schema for our user's predictions
var userPredictionsTeamsSchema = mongoose.Schema({
teamID: Number,
user_id: String,
_team: String,
score: Number
});
module.exports = mongoose.mod... |
describe('mocha-fibers', function(){
it('should callback with async errors', function(done) {
process.nextTick(function() {
done(new Error('foo'));
});
});
});
|
import React from 'react';
import {api} from '../api/apiUsuarios';
export class CadastrarUsuario extends React.Component{
constructor(props){
super(props);
this.state = {
usuario :
{
Nome : "",
Email : "",
Senha: "",
... |
/**
* Created by user on 31.03.15.
*/
'use strict';
angular.module('email-validation-directive', []).directive('vemail', function () {
//var EMAIL_REGEXP = new RegExp('^[a-z0-9]+(\.[_a-z0-9]+)*@@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,50})$', 'i');
//var EMAIL_REGEXP = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4... |
// max_age를 0으로 함으로써, 유효기간이 0이라 삭제됨.
// 즉, 로그아웃을 만들게 된다. (쿠키가 사라져서 해당 이름이 없음.)
export default (req, res) => {
res.setHeader("Set-Cookie", "a_name=Mike;Max-Age=0;HttpOnly,Secure");
res.statusCode = 200;
res.json({ message: 'ok'})
}
|
<script type="text/javascript">
$('.showGameInfo').on('click', function()
{
$($(this).siblings('.gameInfo')[0]).toggleClass('hidden');
})
// WHEN YOU CHOSSE TO PLAY V GUEST (PERSON WITHOUT ACCOUNT)
// CREATES INPUT FOR THEIR NAME
var guestInput = document.createElement('input');
$(guestInput).attr('placeholder', 'Op... |
'use strict';
angular.module('sharedServices').directive('loadingModal', function ($uibModal) {
return {
restrict: 'EA',
link: function link(scope, element, attributes) {
scope.$on("loading-started", function (e) {
element.css({ "display": "" });
});
... |
import React from 'react'
import { View, StyleSheet, Image, FlatList } from 'react-native'
import { withTheme, Caption, Surface } from 'react-native-paper'
import { Icon } from 'react-native-elements'
import PropTypes from 'prop-types'
import { NumberPicker } from '.'
import peopleIcon from '../assets/images/people.png... |
import test from "ava";
import Template from "../src/Template";
import TemplateData from "../src/TemplateData";
import Pagination from "../src/Plugins/Pagination";
test("No data passed to pagination", async t => {
let tmpl = new Template(
"./test/stubs/paged/notpaged.njk",
"./test/stubs/",
"./dist"
);
... |
//home page links
$('#gitLink').click(function(){
window.open('https://github.com/LiliCecilia23', '_blank');
});
$('#liLink').click(function(){
window.open('https://www.linkedin.com/in/lili-clift/', '_blank');
});
//portolio links
$('#code1').click(function(){
window.open('https://github.com/LiliCecilia... |
/** Method Actions */
export const updateReduxMethods = methods => ({
type: 'UPDATE|REDUX|METHODS',
payload: methods
}) |
import React from 'react'
import styles from '../hero.modules.css'
const LabelAnnotation = ({
text,
from = [0, 0],
to = [0, 0]
}) => {
const x = from[0]
const y = from[1]
const offsetX = to[0] - from[0]
const offsetY = to[1] - from[1]
return (
<g transform={ `translate(${x}, ${y})` }>
<lin... |
import { posts } from 'modules/Posts'
// Find all data-filter and add the event listener
// Data-filters are data-attribute
export const initialize = () =>
document.querySelectorAll("[data-filter]").forEach(
filter => setButtonAction(filter, filter.dataset.filter)
)
// Add the event listener and the filter ty... |
let featureExtractor;
let nn;
let loss;
let labels;
// A function to be called when the model has been loaded
function modelReady() {
document.getElementById("ready_model").innerHTML = "MobileNet загружена!"
}
function setup() {
noCanvas();
// Extract the already learned features from MobileNet
featureExt... |
import logo from './logo.svg';
import './App.css';
// import userEvent from '@testing-library/user-event';
import { useState } from 'react';
function App() {
const [todo,settodo] = useState('');
const [todos,settodos] = useState([]);
const [editMode,seteditMode] = useState(false);
const [currentIndex,setcurre... |
'use strict';
var SRC_PATH = './src';
var DIST_PATH = './dist';
// var TMP_PATH = './.tmp';
var TMP_PATH = DIST_PATH;
// TODO:
// js vendor
var gulp = require('gulp');
var g = require('gulp-load-plugins')();
var runSequence = require('run-sequence').use(gulp);
var memRev = require('./utils/gulp-memrev');
var del = ... |
import React, { useContext, useEffect, useState } from "react";
import "./Modal.css";
import { Context } from "../../../../../context/Context";
import { updateHashtags } from "../../../../../actions/actions";
const HashtagsModal = ({ isOpen, handleClose }) => {
const { todayTweets, hashtags } = useContext(Context);... |
export default angular.module('app.components.filters', [])
// 解析电影 & 电视类型
.filter('parseGenre', () => {
const originGenres = require('./origin-genres').default;
return (genres) => {
const result = [];
for (const genre of genres) {
originGenres.forEach((or... |
// Whenever the window resizes, call the handleResize function
d3.select(window).on("resize", handleResize);
// When the browser loads, loadChart() is called
loadChart();
function handleResize() {
var svgArea = d3.select("svg");
// If there is already an svg container on the page, remove it and reload the chart
... |
/**
* Created by 724291943 on 2017/6/6.
*/
var express = require('express')
var api = express.Router()
var Tag = require('../models/tag')
api.get('/getTags', function (req, res) {
Tag.findAll(function (tags) {
var json = []
tags.forEach(function (val) {
var flag = 0
for(var index in json){
... |
import React from 'react';
import Toggle from 'react-toggle';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import classnames from 'classnames';
import styles from './styles.module.css';
const Moon = () => <span className={classnames(styles.toggle, styles.moon)} />;
const Sun = () => <span cla... |
var tradeFinanceApp = angular.module('tradeFinanceApp');
tradeFinanceApp.factory('registrationService', function($http) {
var register = {};
register.registeruser = function(user) {
return $http({
method : "POST",
url : 'register',
data : user
});
}
return register;
});
|
import React from 'react';
export const SearchBox=(props)=>{
return <input type='search' placeholder={props.placeholder} onChange={props.handleChange}/> ;
} |
"use strict";
require("core-js/modules/es.array.concat");
require("core-js/modules/es.array.filter");
require("core-js/modules/es.array.for-each");
require("core-js/modules/es.array.from");
require("core-js/modules/es.array.join");
require("core-js/modules/es.array.reduce");
require("core-js/modules/es.regexp.ex... |
/**
* Created by zhaozailin on 2016/11/13.
* 使用oninput重构
*/
var inputNumber = (function () {
// 初始化
var init = function (domObj, config) {
// 初始化配置信息
var curConfig = initConfig(config);
for (var i = 0; i < domObj.length; i++) {
handlePerDom(domObj.eq(i), curConfig);
... |
let hw3_p_e_points = {
1: 3,
2: 3,
3: 3,
4: 3,
5: 1,
6: 3,
7: 2,
8: 2,
};
let hw3_p_e_cases = {
1: [
['add(0, 0, 0)', 0],
['add(1, 2, 5)', 8],
['add(1, 2, -4)', -1]
],
2: [
['multiply(0, 0, 0)', 0],
['multiply(1, 2, 5)', 10],
['... |
/// <reference types="cypress" />
describe("Verify AirQo Documentation Home Page", () => {
it("Verify page is reachable", () => {
cy.visit("http://localhost:3000/#/");
});
it.skip("Verify AirQo logo is present and visible", () => {
cy.get("section > .cover-main").eq(0).should("be.visible");
});
it.... |
/**
* @fileOverview The model class FootballAssociation with attribute definitions and storage management methods
* @authors Gerd Wagner & Juan-Francisco Reyes (modified by Mina Lee)
* @copyright Copyright 2013-2021 Gerd Wagner (Chair of Internet Technology) and Juan-Francisco Reyes, Brandenburg University of Techn... |
import app from './app.js'
import dotenv from 'dotenv'
import colors from 'colors'
import connectDB from './config/db.js'
dotenv.config({ path: 'backend/config/config.env' })
connectDB()
const PORT = process.env.PORT || 5000
app.listen(
PORT,
console.log(
`Server running in ${process.env.NODE_ENV} mode on p... |
import React,{ Component } from 'react';
import LoginForm from './LoginForm';
import { connect } from "react-redux";
import {addFlashMessage} from "../Actions/Creators/flashMessages";
import {userLoginRequest} from "../Actions/auth";
import PropTypes from 'prop-types';
class Login extends Component {
render(){
... |
export const LOGIN_SUCCESS = 'LOGIN_SUCCESS';
export const LOGIN_REQUEST = 'LOGIN_REQUEST';
export const LOGIN_ERROR = 'LOGIN_ERROR';
export const LOGOUT = 'LOGOUT';
export const SERVERS_REQUEST = 'SERVERS_REQUEST';
export const SERVERS_SUCCESS = 'SERVERS_SUCCESS';
|
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import {SafeAreaView, StyleSheet, StatusBar, View, Text, Modal} from 'react-native';
import WeekView from 'react-native-week-view';
import ReservationForm from "./ReservationFo... |
import * as R from '../../utils/ramda/index'
import * as Api from '../api'
import { promisify, isComplete } from '../../utils/util'
import request from '../../utils/request'
import wxUtil from '../../utils/wxUtil'
import {
DEGREE_TYPE, GENDER_TYPE,
BASIC_FIELD, EDUCATION_FIELD, WORK_FIELD,
} from '../../macro'
Pag... |
'use strict';
angular.module('users')
.directive('passwordValidator', ['PasswordValidator', "$popover", function(PasswordValidator,$popover ) {
return {
require: 'ngModel',
link: function(scope, element, attrs) {
var validationPopover = $popover(element, {
contentTemplate: 'validationErrorsTmp.html',
h... |
$('document').ready(function() {
var width = 1300,
height = 550;
//using the Winkel tripel projection for minimal distortion
var projection = d3.geo.winkel3()
.scale(182)
.translate([width / 2, height / 2])
.precision(.1);
var path = d3.geo.path()
.projection(projection);
//the la... |
$(function (){
var chartSeries = {};
Filterometry.Photo = Backbone.Model.extend({
idAttribute: "id",
});
Filterometry.User = Backbone.Model.extend({
idAttribute: "id",
initialize: function (options) {
this.id = options.id;
this.url = '/api/user/' + this... |
const {groupBy} = require('../../Functions/groupBy')
const dirImpression = require('../../models/directoryImpression')
const allowedFields = ["userId", "clickedBy"]
const moment = require('moment')
testing = (data) => {
console.log(data)
}
dbFields = (data) => {
console.log(data)
let obj = {};
allowedF... |
var application_root = __dirname;
var express = require('express');
var logger = require('morgan');
var models = require('./models');
var bodyParser = require('body-parser');
var app = express();
var $ = require('jquery');
var request = require('request');... |
import React, {Component} from 'react';
import '../../../../node_modules/bootstrap/dist/css/bootstrap.min.css';
import Card from 'react-bootstrap/Card';
import CardDeck from 'react-bootstrap/CardDeck';
import Button from 'react-bootstrap/Button';
import Form from 'react-bootstrap/Form'
import FormControl from 'react-b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.