text stringlengths 7 3.69M |
|---|
import { render, screen, cleanup, act } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import Todo from "../../components/Todo";
import axios from "axios";
describe("Todo", () => {
beforeEach(() => {
axios.patch = jest.fn((url, body) => {
const { description } = body;
... |
import React, { useState } from "react"
import mm from "../constants/mmData"
import inches from "../constants/inchData"
const BikeTable = () => {
const [sizeInMM, setSizeInMM] = useState(true)
const [activeMm, isActiveMm] = useState(true)
const [activeInches, isActiveInches] = useState(false)
const tableMm = ... |
const express = require('express');
const port = process.env.PORT || 3001;
require('./db/mongoose') // will make the file run in the background
const userRouter = require('./routers/user')
const taskRouter = require('./routers/task')
const app = express();
const bcrypt = require('bcryptjs');
// app.use((req,res,next)... |
/*
输入矩阵,从外向里以顺时针依次打印每个数字
例如,输入矩阵:
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
则依次打印出数字1,2,3,4,8,12,16,15,14,13,9,5,6,7,11,10.
*/
// 分成left, right, top, bottom四个边界,每次循环left++, right--, top++, bottom--
function printMatrix(matrix) {
var row = matrix.length
var col = matrix[0].length
var result = []
if (row... |
import axios from 'axios'
import { BASE_URL , contentHeaders } from './config'
export function userList(users) {
return {
type: 'USER_LIST',
userList: users
};
}
export function addingUser(bool) {
return {
type: 'ADDING_USER',
addingUser: bool
};
}
export function editingUserId(userId) {
re... |
export const SQL_CONNECTION_CONFIG = {
user: 'Chaya',
password: '1111',
port: 1433,
server: 'DESKTOP-BDKRIBR\\NEW_SQLEXPRESS',
database: 'waterClean'
} |
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import AvatarEditor from 'react-avatar-editor'
import styled from 'styled-components'
import { Container } from 'rebass'
import { userCircle } from 'react-icons-kit/fa/userCircle'
import { rotateRight } from 'react-icons-kit/fa/rotateRight... |
var express= require('express');
var bodyParser =require('body-parser');
var mongoose= require ('mongoose');
var Schema =mongoose.Schema;
mongoose.connect('mongodb://localhost/paises');
var userSchemaJSON={
nombre:String,
apellido:String,
email:String,
edad:Number
};
var user_schema=new Schema(userSchema... |
/**
* mui.init
* @param {type} $
* @returns {undefined}
*/
(function($) {
$.global = $.options = {
gestureConfig: {
tap: true,
doubletap: false,
longtap: false,
hold: false,
flick: true,
swipe: true,
drag: true,
pinch: false
}
};
/**
*
* @param {type} options
* @returns {undefin... |
/**
The "common" bundle contains elements common to all applications
(sandbox, player, recorder, editor).
*/
import errorBundle from './error';
import replayBundle from '../player/replay';
import recordBundle from '../recorder/record';
import langBundle from '../lang/index';
import buffersBundle from '../buffers';... |
import React, { Component } from 'react';
class ColorSection extends React.Component {
constructor(props){
super(props);
}
render(){
const manaColors = this.props.colors.map((c, index) => (
<Color key={c.id} {...c} handleChange={this.props.handleChange}/>
))
return (
<div>
{manaColors}
</d... |
/**
* IdeeController
*
* @description :: Server-side logic for managing idees
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
*/
module.exports = {
};
|
module.exports = {
clauses: require('./clauses'),
constants: require('./constants'),
} |
/**
* Created by fdr08 on 2016/7/1.
*/
import "../../style/css/awesome.less";
import "../../style/css/base.less";
import "../../style/css/com.less";
import "../../style/css/register.less";
import {core} from "../common/com";
var register = {
els: {
form: $(".form"),
submit: $("#submit"),
... |
var expect = chai.expect;
describe("Class : Species",function(){
var factory = d3scomos.SBMLFactory();
describe("constructor",function(){
it('Should have tests to validate the inheritance chain');
it('should validate passed params',function(){
expect(factory.getSpecies).to.throw(TypeError);//no params passed
... |
/**
* URL utils.
*
* - Collect and structure information from URLs
*
*/
/**
* Get location href.
*/
export const getHref = () => window.location.href;
/**
* Get location origin.
*/
export const getOrigin = () => window.location.origin;
/**
* Get port based on URL or location.
*/
export const getPort = (ur... |
//8B Tell the user that you're thinking of a number between 1 and 100 (go ahead and hard-code this number). Prompt the user to guess the number (and keep asking them if they get it wrong), then congratulate them when they guess correctly. This is a re-do of Atomic JS-06C.
var number = 12;
var userNumber = parseIn... |
/**ZHL.GRANR--权限函数,保留,请勿覆盖**/
var commissionArr = [[5,8],[3,4],[1,1]];
ZHL.GetQueryString=function(url, key) {
if (url.indexOf('?') != -1) {
var url_arr1 = url.split('?');
var url_arr2 = url_arr1[1].split('&');
for (var k in url_arr2) {
var tmp = url_arr2[k].spl... |
import React from 'react';
import './App.css';
import Header from './Header';
import Box from './Box';
import Footer from './Footer';
class App extends React.Component{
render()
{
return(
<div>
<Header name="Header" />
<Box name="Box1" color="purple" />
<Box name="Box2" color="... |
KangoAPI.onReady(function () {
var storage = kango.storage;
var area = document.getElementById('config');
area.value = storage.getItem('editorconfig');
function store() {
storage.setItem('editorconfig', area.value);
}
var lastTimeout = 0;
area.addEventListener('keyup', function () {
clearTim... |
const userRouter = require('express').Router();
const { Joi, celebrate } = require('celebrate');
const { isEmail } = require('validator');
const auth = require('../middlewares/auth');
const {
createUser,
login,
getProfile,
updateProfile,
} = require('../controllers/users');
// роут регистрации пользователя
use... |
const express = require("express");
const SocketServer = require("ws").Server;
const uuid = require("uuid/v1");
const PORT = 8080;
const jwt = require("jsonwebtoken");
const exjwt = require("express-jwt");
const bodyParser = require("body-parser"... |
(function(angular) {
"use strict";
var module = angular.module("address-book", []);
function config() {
}
module.config(config);
})(window.angular); |
(function($) {
$('.tables').maphilight({
stroke:false
});
$('#fillInfo').hide();
$('#reservationDone').hide();
let freeTables = Array.prototype.slice.call(document.getElementsByClassName('table-free')),
takenTables = Array.prototype.slice.call(document.getElementsByClassName('table-taken')),
chose... |
import tv4 from 'tv4'
import { postAirportSchema, putAirportSchema, distanceSchema } from './validatorSchema'
export async function postValidate (req, res, body) {
let result = await tv4.validateResult(body, postAirportSchema)
if (result.error) {
let err = {
error_type: 'validation',
status_code: 4... |
import React from 'react';
import { Layout, Menu, Breadcrumb } from 'antd';
import {
UserOutlined,
BarsOutlined,
SettingOutlined
} from '@ant-design/icons';
import { withRouter } from 'react-router-dom';
import { Input } from 'antd';
const { Header, Content, Footer, Sider } = Layout;
class LayoutComponet e... |
const commonConfig = require("./webpack.common");
const devConfig = {
...commonConfig,
// devServer: {
// port: 3000,
// },
devtool: "inline-source-map",
};
module.exports = devConfig;
|
export const resume = `# Qi
Front End Engineer
# Availability
* html, css, js
* jquery, vue, react
# Work Experience
* 上海垓方
# Projects
* [www.gigacre.com](http://www.gigacre.com/)
# My Source
* [vue_teris](https://qishaoxuan.github.io/vue_tetris/)
* [CSS Tricks](https://qishaoxuan.github.io/css_tricks/)
* [JS ... |
// pages/myFollow/myFollow.js
Page({
data: {
},
onLoad: function (options) {
},
personalpage: function (e) {
var id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/personalpage/personalpage?id='+id,
})
}
}) |
'use strict'
/**
* @memberOf ElonaJS
* @property {ElonaJS.Utils.File} File A collection of File utilities
* @namespace ElonaJS.Utils
* @description Hi, this is a description.
*/
let Utils = {
File: require("./file.js"),
Math: require("./math.js"),
Parse: require("./parse.js")
}
module.exports = Utils... |
import React from 'react';
import { Link } from 'react-router-dom';
const Header = (props) => {
const { title } = props;
return (
<header className="contents-header">
<h1>{ title }</h1>
<nav >
<Link to="/"> HOME </Link>
<Link to="/todo"> Todo App </Link>
<Link to="/tic"> TicTacToe! </Link>
</n... |
$(document).ready(function(){
//Cover image animation
$('.container').mouseover(function(){
$('#cover').fadeTo(1500, 1.00);
});
setTimeout(function(){
$('#cover img').attr('src', 'Family_Map_Graphic_Large.gif');
}, 3000);
$('#cover img').click(function(){
$('.container').fadeOut(1500, 0);
$('#louisa').fa... |
import request from '../plugins/axios'
export function getArticleList (pageNum = 0, pageSize = 8) {
return request({
url: '/articles',
method: 'GET',
params: {
pageNum: pageNum,
pageSize: pageSize
}
})
}
export function getArticleTotal () {
return request({
url: '/articles/total'... |
import Component from '../Component';
import PageState from '../states/PageState';
/**
* The `Page` component
*
* @abstract
*/
export default class Page extends Component {
oninit(vnode) {
super.oninit(vnode);
this.onNewRoute();
/**
* A class name to apply to the body while the route is active... |
/**
* CollapsibleMenu.js
* Created by Thiago Cardo (thiago.cardoso@easydev.com)
*/
if("undefined"==typeof jQuery) throw new Error("Collapsible Menu requires jQuery");
(function ( $ ) {
$.fn.collapsiblemenu = function () {
//var menu = $( this ).find('ul.nav')
var menu = $( this ).find(' ul.nav... |
import React, { Component } from 'react';
import { Row, Col } from 'react-bootstrap';
import FirestoreServices from 'services/FirestoreServices';
import './styles.css';
export class CarouselEditModal extends Component {
constructor() {
super();
this.state = {
carouselItems: [],
modalFlag: false... |
FlashCards.Views.Cards = Backbone.View.extend({
render: function(){
this.$el.html(
HandlebarsTemplates['cards/index'](blah));
return this;
}
}); |
import React, { Component } from 'react';
import { Route, Redirect } from 'react-router-dom';
import firebase, { auth, provider } from '../../firebase';
import { Container } from 'reactstrap';
import store from "../../store"
class Logout extends Component {
componentDidMount() {
auth.signOut()
... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Table } from 'semantic-ui-react';
import { findAll as findAllDrivingTypes} from '../../actions/drivingTypes';
import { findAll as findAllFuelTypes} from '../../actions/fuelTypes';
class FuelConsumptionAvgsTable extends Component ... |
var app = angular.module('completesetAdd', ['toastr','angularjs-dropdown-multiselect']);
app.controller('compsetAddCtrl', function ($scope, comsetSer, $state, toastr) {
$scope.showed=true
$scope.changSelect1 = function(){
if($scope.comset.countType=="WHOLE"){
$scope.xmz = false;
$scope.one = false;
... |
$(function(){
//添加编辑一级目录
$(".first_menu").click(function(){
var $e = $("#firstmenu");
var $this = $(this);
//清空信息
$e.find("input").each(function(){
if( $this.attr("type") != "radio" )
{
$this.val("");
}
})
$e.find(".menu_icon i").attr("class" ,"");
$e.find(".errormsg").empty();
$e.find("... |
function countLetters(str){
var result ={};
for(var i = 0; i < str.length; i++){
let currentChar = str[i];
if(result[currentChar]){
result[currentChar]++
}else{
result[currentChar] = 1;
}
}
return result;
}
countLetters("Lighthous... |
import React from 'react';
import {
BodyContainer,
ContainerDash,
} from '../../global';
import Specifications from '../../components/Specifications';
import Menu from '../../components/Menu';
import InfoUser from '../../components/InfoUser';
const Specification = () => {
return (
<BodyContainer... |
import { StyleSheet, Platform, Dimensions } from "react-native";
import * as FontSizes from "../utils/fontsSizes";
const deviceHeight = Dimensions.get("window").height;
const deviceWidth = Dimensions.get("window").width;
import Globals from '../constants/Globals';
export default favoriteStyles = StyleSheet.create({
... |
import curry from "crocks/helpers/curry"
import identity from "crocks/combinators/identity"
import cycleRightBy from "./cycleRightBy"
const cycleLeftBy = curry((amount, leftVal, rightVal) =>
cycleRightBy(amount, rightVal, leftVal).swap(identity, identity)
)
export default cycleLeftBy
|
/*
* @Descripttion:
* @version: 1.0
* @Author: Ankang
* @Date: 2021-05-19 00:14:32
* @LastEditors: Ankang
* @LastEditTime: 2021-05-19 22:49:53
*/
const http = require('http')
const fs = require('fs')
const { join, extname } = require('path')
const mimes = require('./libs/mime')
const qs = require('q... |
// Generated by CoffeeScript 1.9.2
(function() {
var apiKey, sendgrid;
apiKey = 'ehyLECUeTeWzeCcbfRcQ2w';
sendgrid = require('sendgrid')('namejoshua', 'jojo782011');
module.exports = function(app) {
app.get('/wedding', function(req, res) {
return res.render('wedding/views/index');
});
app.g... |
"use strict";
async function queue() {
const message = await wait(1000);
return message;
}
|
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsViewSidebar = {
name: 'view_sidebar',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M16 20H2V4h14v16zm2-12h4V4h-4v4zm0 12h4v-4h-4v4zm0-6h4v-4h-4v4z"/></svg>`
};
|
$(function () {
//实例化树形菜单
$("#tree").tree({
// data : treeData,
// lines : true,
url: "loginAction_checkRole",
loadFilter: function(rows){
return convert(rows);
},
onClick : function (node) {
if (node.attributes&&node.attribu... |
import React from 'react';
// import BraftEditor from 'braft-editor';
import PropTypes from 'prop-types';
import {languageHelper} from '../../../../../tool/language-helper';
import Title from '../containers/title';
import UserInfor from '../containers/user-infor';
import Comments from '../comment-card-bar';
import Foo... |
'use strict'; //required for submission
// GENERAL TOOLS TO MAKE LIFE EASIER //
//parent and child required. content and ident optional (set to null if not needed).
function newChildNode(parent, child, content, ident){
let cell = document.createElement(child);
if (ident){cell.id = ident;}
cell.innerText =... |
var express = require('express');
var router = express.Router();
var Books = require('../db/model/books');
router.post('/list', (req, res) => {
const {bookType} = req.body;
Books.find({
bookType
})
.then((data) => {
res.send({
code: 1,
msg: "获取列表成功",
list: da... |
import * as d3 from 'd3'
import SVG_G from './svg_g'
export default class Crosshair extends SVG_G{
constructor (opts) {
super(opts)
this.chartDm = opts.chartDm
let _this = this
this.g.selectAll("rect") // For new circle, go through the update process
.data([0])
.enter()
.append("r... |
const yargs = require('yargs');
const run = require('./run');
const pkg = require('../../package.json');
module.exports = () => {
const argv = yargs.options({
port: {
alias: 'p',
description: 'Set port',
default: 3000,
},
})
.version(pkg.version).alias('version', 'v')
.argv;
ru... |
/*!
* SAP UI development toolkit for HTML5 (SAPUI5)
*
* (c) Copyright 2009-2014 SAP AG. All rights reserved
*/
jQuery.sap.declare("sap.m.TableSelectDialogRenderer");sap.m.TableSelectDialogRenderer={};
sap.m.TableSelectDialogRenderer.render=function(r,c){};
|
var app = angular.module('bfCodeTest', []);
app.controller('studentCtrl', function ($scope, $location, $http) {
console.log("StudentCtrl loaded.");
$http.get('http://localhost:8080/api/getStudents')
.then(function (response) {
$scope.students = response.data;
});
});
... |
require('dotenv').config();
const Cucumber = require('../src/index.js');
describe('Project methods', () => {
let cucumber;
beforeAll(() => {
cucumber = new Cucumber({
token: process.env.CUCUMBER_STUDIO_TOKEN,
clientId: process.env.CUCUMBER_STUDIO_CLIENT_ID,
uid: process.env.CUCUMBER_STUDIO_U... |
import React from 'react';
export default function ColSubject({day}) {
// const elmSub =lesson.map((item,index)=>
// <div key={index} >{item.name}</div>
// )
let elmSub = '';
try {
if(day.lesson){
elmSub = day.lesson.map((item,index)=>
<div className="text-le... |
const assert = require('assert')
const flow = require('./_flow')
let schema = '//atom/bcrypt_2abxy'
describe(`schema:${schema}`, () => {
it('version 2a', async () => {
let data = '$2b$10$KUng9EPlraYWHRiBjvDXPehS466Bgj6/YQUQgCwGoPYsPkEGCMO.i'
let e = flow.verify(schema, data)
assert.equal... |
define(['jquery', 'QDP'], function ($, QDP) {
"use strict";
// 平台启动时定义行政区划级联
// EVENT-ON:layout.started
QDP.on("layout.started", function () {
console.info("注册->系统运行后自动注册 - plugins-province");
$(document).on("change", "select", function (e) {
if (e.target.id == 'province_code' && $('#city_code').... |
//CREATE NEW CUSTOMER |
describe('Zia.GeometricPrimitive.createTorus', function() {
it('should create a primitive', function() {
var result = Zia.GeometricPrimitive.createTorus();
expect(result.positions.length).toBe(1089);
expect(result.positions[0].x).toBeCloseTo(0.00, 2);
expect(result.positions[0].y).toBeCloseTo(0.00, 2... |
/**
* Definition for a binary tree node.
* function TreeNode(val) {
* this.val = val;
* this.left = this.right = null;
* }
*/
function TreeNode(val) {
this.val = val;
this.left = this.right = null;
}
/**
* @param {TreeNode} root
* @param {number} L
* @param {number} R
* @return {number}
*/
var ra... |
const mongoose = require('mongoose')
const uniqVal = require('mongoose-unique-validator')
const url = process.env.MONGODB_URI
console.log('...', url)
mongoose.connect(url, { useNewUrlParser: true }).then(res => {
console.log('Connection Successfull')
}).catch(err => {
console.log('Error', err)
})
const personSc... |
import React from "react";
import { connect } from "react-redux";
import FavoriteList from "./FavoriteList.js";
import { setVisibilityFilter } from "../actions";
const menu = ["Accueil", "Versus", "DeFi"];
class Navigation extends React.Component {
state = {
areSelected: [true, false, false],
};
... |
import React from 'react';
import Logo from './logo';
export default function Construction() {
return (
<div style={{ textAlign: 'center', marginTop: '100px' }}>
{Logo[0]}
<h1>is coming soon</h1>
</div>
);
}
|
import { createStore, applyMiddleware } from 'redux';
// import logger from 'redux-logger';
import thunk from 'redux-thunk';
import reducers from './reducers';
const initalState = {
letters: '',
address: {},
rlc: 0,
};
export default () => createStore(
reducers,
initalState,
applyMiddleware(
// mode =... |
import React from "react";
// Utilities
// import { makeStyles } from "@material-ui/core/styles";
// Material UI Components
// Custom Components
// const useStyles = makeStyles((theme) => ({}));
export default function Footer(props) {
// const classes = useStyles();
return (
<section id="footer">
... |
module.exports = {
TIMEOUT: 3, // terminal cpu time limit (seconds)
LOG: true // logging
}
|
$(document).ready(function(){
$('#delete').on('click', "p", function(){
console.log('()()()()Hi');
// var thisId = $("#delete").attr("data-id");
// $.ajax({
// url : '/notes/' + thisId,
// method : 'post', //Delete does not work with IE7 or IE8, would have to use POST
// er... |
import React, { Fragment } from 'react';
import { NavLink } from 'react-router-dom';
import { connect } from "react-redux";
import { signOut } from "../../store/actions/authActions";
import Materialize from "materialize-css";
const SignedInLinks = ({loggedUser, signOut, authError }) => {
const onNavLinkClick = () => ... |
import React from 'react';
import RDTokenFaucetJSON from '../../bin/src/solc-src/RDTokenFaucet/RDTokenFaucet.json'
import {
getContractAddressFromStoreByName,
getConstructorParamFromABI,
loadConstructorParamsFromLocalStorage,
amountFromToken,
amountToToken,
} from '../bl/utility'
import Faucet from ... |
// home.module.routing.js
"use strict";
import { angular } from "angular";
import { homeIndex, homeAbout } from "./home.module.states";
homeRouting.$inject = ["$urlRouterProvider", "$stateProvider"];
function homeRouting($urlRouterProvider, $stateProvider) {
$urlRouterProvider.otherwise("/home");
$stateProvide... |
import React, {useEffect} from 'react'
import s from './DateInput.module.scss'
import calendar from './../../../assets/images/calendar-5.svg'
import {isAndroid} from 'react-device-detect'
import {format} from 'date-fns'
const DateInput = (props) => {
let data = new Date(props.field.value)
useEffect(() => {
... |
import {createStore} from 'redux';
import reducers from '../reducer';
import {persistStore, persistReducer} from 'redux-persist';
import storage from 'redux-persist/lib/storage';
import autoMergeLevel2 from 'redux-persist/lib/stateReconciler/autoMergeLevel2';
const persistConfig = {
key: 'root',
stor... |
P = {};
// Garbage. Cleanup later.
P.ENTER_KEY = 13;
P.CatchAll = function(error) {
if (error && error.stack) {
console.error('Promise:', error.stack);
} else {
console.error('Uncaught promise error');
}
};
P.noop = function() {};
P.stopEvent = function(event) {
if (!event) {
return;
}
if (e... |
function convertHTML(str) {
// :)
let match = {
'&':'&',
'<':'<',
'>':'>',
'"':'"',
'\'':"'"
};
let newArr = str.split('');
return newArr.map(char => match[char] || char).join('');
}
convertHTML("Dolce & Gabbana");
|
import React from 'react';
import { Form, Row, Col } from 'react-bootstrap';
import '../App.css';
export default function AdjustSettings(props) { // Adjust Settings Content
function renderHeaders(tableHeaders) { // this function renders availableHeaders to user
const transformedArr = []
for(let i =... |
import React from "react";
import ReactDOM from "react-dom";
import "./styles.css";
// test comment
// test comment from Github
const element = <h1>Hello World</h1>;
ReactDOM.render(element, document.getElementById("root"));
|
/**
* Facebook SDK implementation
* @author lars schuettemeyer
*/
/**
* Facebook SDK implementation
* Use of recommended Facebook code from https://developers.facebook.com/docs/reference/api/
*/
window.fbAsyncInit = function() {
FB.init({
appId : '173666146154788',
status : true,
cookie : tr... |
var express = require('express');
var router = express.Router();
router.get('/',function(req,res){
res.render('index', {"user":(req.session.theUser?req.session.theUser.fname:""), "invalidAccess": req.query && req.query.invalidAccess ? req.query.invalidAccess : false});
});
router.get('/index',function(req,res... |
// @flow
import {StyleSheet, Platform} from 'react-native';
import {FONT_BOLD} from '../../../constants/text';
import {GREY, SHADOW_GREY} from '../../../constants/colors';
const styles = StyleSheet.create({
root: {
backgroundColor: 'white',
},
titleContainer: {
padding: 20,
},
title: {
fontWeig... |
// ----------------------------------------------------------------------
// Fonction pour récupérer et afficher la dernière mesure
function displayLastMeasure() {
const request = new XMLHttpRequest();
// Open a new connection, using the GET request on the URL endpoint
request.open('GET', `http://192.168.... |
const data = {
userList: [
{
_id: "5ef38c4cdd254026e02b85d2",
index: 0,
guid: "e5e3d32f-0bc7-4d27-a0e8-592df92b6f4b",
isActive: true,
balance: "$1,800.53",
picture: "http://placehold.it/32x32",
age: 26,
name: {
first: "Brooke",
last: "Malone",
... |
module.exports = {
env: {
browser: true,
es2021: true,
'jest/globals': true,
node: true
},
extends: [
'standard',
'plugin:@typescript-eslint/recommended'
],
overrides: [
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
... |
/* import { MkError } from '../../../domain/Errors'
import { addAccessPlan } from '..'
import { AddPlanParams } from '../useCases'
const mockPlan = (fields: Partial<AddPlanParams>) => {
return {
name:"any_name",
description:"any_description",
value:10,
discount:2,
cycle:2,
access_key:1,
... |
function lan_mode_to_french(b) {
var a = {
router: "Routeur",
bridge: "Bridge",
};
if (a[b]) {
return a[b]
}
return "Routeur"
}
$(document).ready(function() {
$("#form_config").rpcform({
beforeSubmit: function(b, a) {
return true
},
suc... |
import React from 'react';
import { Table, Empty } from 'antd';
import _ from "lodash";
const columns = [
{
title: "Name",
dataIndex: "name",
},
{
title: "Placement",
dataIndex: "placement",
},
{
title: "Phone",
dataIndex: "phone",
},
{
title: "Email",
dataIndex: "email",... |
let visited = []
let n;
let bitSet = [];
function check(relation){
let map = new Map();
let temp = []
for(let i =0;i<visited.length;i++){
if(visited[i])
temp.push(i);
}
for(let i=0;i<relation.length;i++){
let s = "";
for(let j =0;j<temp.length;j++){
... |
import React from 'react';
import cn from 'classnames';
import style from './style.module.css';
export const TabRadio = ({
labelText,
checked,
value,
onChange }) => (
<label className={style["forecast-radio__label"]}>
<input
type="radio"
name="forecast-type"
className={style["forecast-... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isReactClass;
function isReactClass(maybe) {
if (typeof maybe !== 'function') {
return false;
}
var proto = maybe.prototype;
if (!proto) {
return false;
}
return !!proto.isReactComponent;
} |
import {sleep, FRAME} from "../util/sleep.js";
let frames = FRAME;
/**
* This allows you to customized frame rates
* @param {Number} v
*/
function setFrames(v){
frames = v;
}
/**
* Fires listener if task has not yet been killed
*/
async function listen(a, b, arr, l, task){
if(!task.killed()){
l... |
const db = require('../db/dreckl')
const abwesenheitDB = db.abwesenheit
const editAbwesenheit = (req, res, updateAbwesenheit) => {
abwesenheitDB.update(updateAbwesenheit.title,
updateAbwesenheit.description,
updateAbwesenheit.from,
updateAbwesenheit.until,
() => {
res.se... |
'use strict';
// this is in kyle/other.js
angular.module('kyle.other', [])
.controller('ddd', function($http, $scope, $q, $timeout) {
})
.controller('bindingDemo', function($scope) {
console.log("controller entered");
$scope.name = "";
var n = 0;
$scope.big = function() {
n++;
console.log("big() was calle... |
const allLongestStrings = inputArray => {
const longestWordLen = Math.max(...inputArray.map(w => w.length))
return inputArray.filter(word => word.length === longestWordLen);
} |
import React from 'react';
import Avatar from '@material-ui/core/Avatar';
import Button from '@material-ui/core/Button';
import CssBaseline from '@material-ui/core/CssBaseline';
import TextField from '@material-ui/core/TextField';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import Checkbox from '... |
import React, { useState } from 'react'
import './App.css'
import axios from 'axios'
const App = () => {
const [mail, setMail] = useState({destinatario: '', asunto: '', cuerpo: ''})
const leerInput = e => {
const campo = e.target.name
const valor = e.target.value
setMail({
...mail,
[campo]... |
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', msg => {
if (msg.content === '$help') {
msg.reply('$aboutclan,$rules, חוקים$, $עלהקלאן ');
}
});
client.on('message', msg => {
... |
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Card, Input, Button, message } from 'antd';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import JsxCodeView from '@/components/JsxCodeView';
import JsxApiView from '@/components/JsxApiView';
import PageView from '@/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.