text stringlengths 7 3.69M |
|---|
import FbGroupShareModel from "./models/FbGroupShareModel";
import i18n from '../i18n';
var FB_GROUP_SHARE_MODEL = null;
const DASHBOARD_TIME_REFRESH_DATA = 10 * 60000;
const TABLE_SHOW_TYPES = [
{ value: 0, text: i18n.t('dashboard.table.show-in-grid') },
{ value: 1, text: i18n.t('dashboard.table.show-in-stac... |
import tw from 'tailwind-styled-components'
/** Div which contains Logo svg */
export const HeaderUserIconLiner = tw.div`
mx-3
flex-shrink-0
` |
class Zim {
constructor(name, age) {
this.age = age;
this.name = name;
}
static
printName(obj) {
console.log(obj.name);
}
}
var zimc1 = new Zim("Zim", 21)
Zim.printName(zimc1)
function zim(name, age){
this.name = name;
this.age = age;
}
zim.pro... |
$(document).ready(function(){
console.log("ready");
var launchtimer = setInterval(incrementTimer, 1000);
const {ipcRenderer} = require('electron')
ipcRenderer.on('daemons-windows-get-all-response', (event, arg) => {
console.log(arg) // prints "pong"
})
ipcRenderer.send('daem... |
/**
* @file components/ConfirmDialog.js
* @author leeight
*/
import {defineComponent} from 'san';
import Dialog from './Dialog';
export default defineComponent({
template: `<template>
<ui-dialog open="{=open=}" s-ref="dialog" skin="confirm" width="{{width}}" on-close="onCloseDialog" on-confirm="onConfirmD... |
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import './Issue.css';
class Issue extends Component {
constructor(props) {
super(props);
this.state = {
issueNumber: undefined,
assignedTo: undefined,
escrow: undefined,
value: undefined,
addIssueValue: ... |
import { DEBIT_ATTACHMENT_TYPE } from "../../../configs/attachmentType.config";
const { DEBIT_NOTE, RECEIPT, OTHERS } = DEBIT_ATTACHMENT_TYPE;
export const MODEL_ATTACHMENT = [
{
attachments: [
{
name: "Debit Note",
type: DEBIT_NOTE
}
]
},
{
attachments: [
{
... |
function capitalWord(string) {
return string[0].toUpperCase() + string.slice(1).toLowerCase();
}
function lowerCamelString(string) {
let arrOfStr = string.split(" ");
let newString = "";
arrOfStr.forEach((element) => {
newString += capitalWord(element);
});
newString = newString[0].toLowerCase() + new... |
const { server: electronConnectServer } = require('electron-connect');
const TARGET = {
main: 'electron-main',
renderer: 'electron-renderer'
};
const AVAILABLE_TARGETS = [TARGET.main, TARGET.renderer];
function createElectronReloadWebpackPlugin(options = {}) {
let server = null;
function restartOrRel... |
module.exports = {
user: 'b28cd0a337cf8a',
pass: '68141ba0d93995',
host: 'smtp.mailtrap.io',
port: 2525
} |
import React from "react";
import { graphql } from "gatsby";
import "./styles.scss";
import Layout from "../../../components/Layout";
const Post = props => {
const post = props.data.markdownRemark;
const {
title,
description,
date,
location,
locationEmoji,
} = post.frontmatter;
return (
... |
require('babel-register');
require('babel-polyfill');
var HDWalletProvider = require("truffle-hdwallet-provider");
var infura_apikey = "55094ac1f57f4ffaa2be7fc764a14d15";
var mnemonic = "traffic bracket depth radar labor double knock ritual ozone ball crisp dune";
var testRpcMnemonic = "civil silk monster coffee acces... |
import React, { Component } from "react";
import "./PlantDetails.css";
import userDB from '../Database/UserDB';
import Chart from './Chart.js';
class PlantDetails extends Component {
constructor(props){
super(props);
this.intervalID = null;
this._isMounted = false;
this.state = {
chartData:{},
chartD... |
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import SignUpInForm from "./components/SignUpInForm";
import Footer from "./components/Footer";
import React, { Component } from 'react';
import 'whatwg-fetch';
const App = () =>(
<Router>
<div>
<Switch>
... |
(function () {
"use strict";
function GameConsole(gameArea, gameSpeed, maxGameSpeed, speedX) {
this.gameArea = gameArea;
this.gameSpeed = gameSpeed;
this.maxGameSpeed = maxGameSpeed;
this.speedX = speedX;
this.level = 1; // game level starts at 0
this.score = 0;
... |
// @flow
// Imports
// ==========================================================================
import chai, { expect } from 'chai';
import _ from '//src/nodash';
import t from 'tcomb';
import type { $Refinement } from 'tcomb';
import * as nrser from '//src/';
// Types
// ========================================... |
import "./App.css";
import { useState, useEffect } from "react";
import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom";
import axios from "axios";
import Comments from "./Comments";
import Pagination from "./Pagination";
import Pagination2 from "./Pagination2";
import Button from "./button";
... |
import React from 'react'
import {Text,SafeAreaView} from 'react-native'
import CalculadoraCoder from './Components/Calculadora'
export default () => {
return (
<CalculadoraCoder/>
)
}
|
import {
rhythm,
scale,
colors,
fonts,
transitions
} from '../../../lib/traits'
export default {
root: {
fontFamily: fonts.display,
background: colors.maroon
},
wrapper: {
padding: rhythm(1),
maxWidth: '80rem',
margin: '0 auto',
textAlign: 'left'
},
title: {
fontSize: sc... |
'use strict'
const axios = require('axios')
const crypto = require('crypto')
const JPush = require('jpush-sdk')
module.exports = class Push {
constructor(config) {
this.config = config
this.client = JPush.buildClient(config.key, config.secret)
this.auth = new Buffer(config.key + ':' + config.secret).t... |
import React from 'react';
import PropTypes from "prop-types";
import {useSelector} from "react-redux";
import {gameSelectors} from "core/game";
export const Resource = ({resource}) => {
const value = useSelector((state) => gameSelectors.getResourceValue(state, resource));
const max = useSelector((state) => ... |
/*EXPECTED
hello
*/
class _Main {
static function hello () : void {
log "hello";
}
static function say () : void {
return _Main.hello();
}
static function main(args : string[]) : void {
_Main.say();
}
}
|
/**
* @properties={typeid:24,uuid:"5967688D-69EE-4A3A-80CA-F69FE64626E6"}
*/
function gotoEdit()
{
_super.gotoEdit();
controller.focusField(elements.fld_codice.getName(), true)
}
/**
* @param {JSFoundSet<db:/ma_anagrafiche/ditte_turni>} _foundset
* @param {String} [_program]
*
* @return {Number}
*
* @proper... |
export default {
// login
login: '/login', // 登陆 post
register: '/register', // 注册 post
resetLoginPassword: '/resetLoginPassword', // 忘记密码
getCodeForMobile: '/baseVerify/sendCodeForMobile', // 获取短信验证码 post
getVerifiCode: '/baseVerify/getVerifyCode', // 获取验证码 get
getLoginInfo: 'getLoginInfo', // 获取登陆信息
l... |
import React from "react";
import { Link } from "react-router-dom";
import { makeStyles, Typography, Grid, Container } from "@material-ui/core";
const SectionOne = () => {
return (
<Grid container className="intro-text">
<Grid item xs={12} sm={12} md={12} lg={12}>
<Text />
</Grid>
</Grid>... |
/* jshint node: true */
'use strict';
var path = require('path');
var fs = require('fs');
var Funnel = require('broccoli-funnel');
var unwatchedTree = require('broccoli-unwatched-tree');
var mergeTrees = require('broccoli-merge-trees');
var replace = require('broccoli-string-replace');
var stew = require('broccoli-st... |
import React, { Children, Component } from 'react'
import cn from 'classnames'
class Row extends Component {
static defaultProps = {
style: {},
}
shouldComponentUpdate(nextProps) {
return nextProps.style.paddingRight !== this.props.style.paddingRight
|| nextProps.rowData !== this.props.rowData... |
import { useState } from "react";
import "../css/NavBar.css";
import { Link } from "react-router-dom";
import { HamburgerSlider as Hamburger } from "../../node_modules/react-animated-burgers";
const NavBar = () => {
const [open, setOpen] = useState(false);
function toggle() {
setOpen(!open);
}
function c... |
const express = require('express');
const PORT = process.env.PORT || 3001;
const jobRouter = require('./routes/jobRouter')
const userRouter = require('./routes/userRouter')
const recruiterRouter = require('./routes/recruiterRouter')
const cors = require('cors')
const bodyParser = require('body-parser');
const logger =... |
import { Axes } from '@nivo/axes';
import { ResponsiveLine } from '@nivo/line';
import { computeXYScalesForSeries } from '@nivo/scales';
import PropTypes from 'prop-types';
import React from 'react';
import { hashMemo } from '@/utils/hashData';
import injectStyles from '@/utils/injectStyles';
import { COLORS, NIVO_CHA... |
import {Component} from '../../Component.js';
/**
* Create an ECharts based LineChart component.
*
*/
export class LineChart extends Component {
/**
*
* Create a new instance of a ECharts LineChart component.
*
* @param {Object} opts - The configuration of the Component.
* @param {string|jquerySele... |
const brand_name = document.getElementById("brand-name");
const login_link = document.getElementById("login-link");
const register_link = document.getElementById("register-link");
brand_name.addEventListener("mouseover", () => {
brand_name.id = "brand-name-hover-active";
});
brand_name.addEventListener("mouseout", ... |
//var V = {};
var Model = function ( Character, meshs, txt ) {
THREE.Group.call( this );
this.visible = false;
this.isFirstFrame = true;
this.isFirstPlay = false;
this.is3dNoz = false;
this.character = Character;
this.isLockHip = true;
this.isSkeleton = false;
this.rShadow = f... |
import routerx from 'express-promise-router';
import phoneRouter from '../apps/phone/url';
const router = routerx();
router.use('/phone', phoneRouter);
export default router;
|
$( ".flag" ).click(function() {
$("#content-flag").attr("style", "display:block!important");
});
function selectedPrefix(obj){
var prefix = $(obj).data('prefix-flag');
var pais = $(obj).data('pais');
var host = "http://"+window.location.host;
$("#content-flag").attr("style", "display:none!importan... |
import './App.css';
import { Box, Button, Card, CssBaseline, Input, List } from '@material-ui/core';
import React, { useContext, useEffect, useRef, useState } from 'react';
import { AppContext } from './context/AppContext';
import Messages from './components/Messages';
import io from "socket.io-client";
const App = ... |
let commonConfig = require('./webpack.common.js');
let webpack = require('webpack');
let webpackMerge = require('webpack-merge');
let helpers = require('../helpers');
let config = webpackMerge(commonConfig,
{
plugins: [
new webpack.optimize.UglifyJsPlugin({
parallel:true,
... |
import config from './config'
import { stopSubmit } from 'redux-form'
import { createActions } from '../common/actions'
const prefix = 'AUTH/'
const actions = [
'LOG_IN',
'SET_USER',
'LOG_OUT'
]
export const Actions = createActions(prefix, actions)
export const ActionCreators = {
loginUser: (username, passwo... |
import styled from 'styled-components';
export const FiltersConatiner = styled.div`
display: flex;
flex-direction: row;
width: 485px;
justify-content: space-between;
`;
|
import React from "react";
import { Route } from 'react-router-dom';
//import MuseumDetailPage from "./pages/MuseumDetailPage.js";
//import { Route, Switch } from "react-router-dom";
import MuseumListContainer from "./component/MuseumList/MuseumListContainer";
import MuseumDetailContainer from "./component/MuseumDetail... |
import cartItem from './cart-item.component.jsx';
export default cartItem; |
import { useEffect, useState } from "react";
import { useFavorites } from "../../contexts/FavoriteContext";
import "./styles.css";
export const FeaturedMovie = ({ item }) => {
const { favorites, setFavorites } = useFavorites();
const [inList, setInList] = useState(false);
let releaseDate = new Date(item.first_a... |
import React from "react";
import isEqual from "lodash/isEqual";
import ImagePlaceholder from "../../bezopComponents/Images/ImagePlaceholder";
import { getJsonString } from "../../helpers/logic";
import Validator from "../../helpers/validator";
import { Grid, withStyles, Paper } from "../../../node_modules/@material-ui... |
var frontexpress = (function () {
'use strict';
/**
* HTTP method list
* @private
*/
var HTTP_METHODS = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'];
// not supported yet
// HEAD', 'CONNECT', 'OPTIONS', 'TRACE';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
re... |
import React from "react";
import "./VidCall.css";
import VideoChat from "./components/InfoBar/Room/VideoChat";
const App = () => {
return (
<VideoChat />
);
};
export default App;
|
// getSelector.js (c) 2011, Lim Chee Aun. Licensed under the MIT license.
module.exports = (function(d){
if (!d.querySelector) return function(){};
// https://github.com/mathiasbynens/mothereffingcssescapes
function cssEscape(str) {
var firstChar = str.charAt(0),
result = '';
if (/^-+$/.test(str)){
... |
import React, { Component } from 'react';
import {
ListView,
RefreshControl,
View,
Text,
StyleSheet,
Image,
TouchableHighlight,
BackAndroid,
Platform } from 'react-native';
import QueryString from 'query-string';
export default class HeadlineListScene extends Component {
constructor(props) {
s... |
//Function to display different messages based on the selection the user makes whether it's a Convio donation share or not.
function show_mssg(q){
if(q=="y"){
document.getElementById('mssg1').style.visibility = 'visible';
document.getElementById('mssg1b').style.visibility = 'visible';
document.getElementBy... |
import React, { useState } from 'react';
import Axios from 'axios';
import { withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import Place from './Place';
import { setUser, setCompany } from '../../mightyDucks/authReducer';
import { findCompany } from '../../ShawnsTests/utils';
function Re... |
var Promise = require('promise')
var urlGenerateResponse = require('./url')
function generateResponse(processed, res, request) {
return new Promise((fulfill, reject) => {
if (processed.pastebinId !== undefined) {
processed.responseUrl = 'https://pastebin.com/raw/'+processed.pastebinId
... |
import {take, put,call,fork} from 'redux-saga/effects'
import * as API from "../api"
import * as actions from '../actions';
import Message from '@/components/Message'
//获取列表
export function* userFetchList () {
while(true){
let postAction = yield take(actions.USER_FETCH_LIST);
yield put(actions.userL... |
import { TWEET_DELETE } from './actionType'
import axios from 'axios'
export const deleteTweets = id => ({ type: TWEET_DELETE, id })
export const deleteTweetsAsync = id => {
return dispatch => {
axios
.delete(
'https://reactnetwork-fdc20.firebaseio.com/tweets/' + id + '.json'
)
.then(r... |
import React from "react";
import HomeBaner from '../reutilizable/Baner';
import FooterPage from '../reutilizable/FooterPage';
import CardsPage from '../reutilizable/CardsPage';
import BlogPage from '../reutilizable/BlogPage';
import {
Container
} from "mdbreact";
class Inicio extends React.Component {
render... |
document.addEventListener("DOMContentLoaded", () => {
const monsterCollection = document.getElementById("monster-container")
const pageBack = document.getElementById('back');
const pageForward = document.getElementById('forward')
const createMonsterFrom = document.getElementById("add-monster-form")
fetch('... |
import {
validUsername,
isExternal
} from "../utils/validate.js";
var SvgIcon = function() {
Vue.component('svg-icon', {
name: 'SvgIcon',
template: '<div><div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" /><svg v-else :class="svgClass" aria-hid... |
'use strict';
var fs = require('fs');
var assert = require('assert');
var co = require('co');
/*---------- callback ----------*/
fs.readFile('file1.txt', (err, data) => {
if (err) throw err;
// console.log('callback--', data.toString());
});
/*---------- Promise ----------*/
function readFilePromise(path) {
re... |
/**
* Created by lusiwei on 2016/9/23.
*/
'use strict';
import { SET_USER } from '../actions/user'
export function user(state = {}, action) {
switch (action.type) {
case SET_USER:
return Object.assign({}, action.user);
default:
return state;
}
}
|
import React from "react";
import PropTypes from "prop-types";
import { Image, StyleSheet, View, TextInput, Button, Text } from "react-native";
import { connect } from "react-redux";
import Colors from "../constants/Colors";
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff",
... |
import styled from 'styled-components'
export const RangeInputs = styled.div`
display: flex;
justify-content: space-between;
> div {
align-items: flex-end;
}
input {
outline: none;
border: 0;
font-weight: bold;
font-size: 24px;
line-height: 24px;
max-width: 75px;
}
span {
... |
'use strict';
define([], function () {
function config($routeProvider) {
$routeProvider.when('/PatientReg', {
templateUrl: 'Patient_Registration/_patientRegistration.html',
controller: 'PatientRegiCtrl'
})
.when('/PaymentRecvForm', {
templateUrl: ... |
const { compareSync } = require('bcrypt');
const express = require('express');
var methodOverride = require('method-override')
const router = express.Router();
const db = require("../models");
const strava = require('strava-v3');
const axios = require('axios');
//middleware
router.use(methodOverride('_method'))
//... |
'use strict';
const reader = require('../lib/reader.js');
require('jest');
let paths = [`${__dirname}/../data/one.txt`, `${__dirname}/../data/two.txt`, `${__dirname}/../data/three.txt`];
describe('Read Files Module', function() {
describe('with incorrect file path', function() {
it('should return an error', fu... |
// ============================================================================== //
// ============================================================================== //
// SETUP ======================================================================== //
// =====================================================... |
//constant File
|
alert("fast")
|
var http = require('http');
var url = require('url');
var cheerio = require('cheerio');
var couchtunerHost = 'couchtuner.ch';
var crypto = require('crypto');
http.createServer(function (req, res) {
function loadPage(options, callback) {
var request = http.request(options, function (res) {
var data =... |
const actions = {
selectTool(context, id) {
context.commit('selectTool', id)
}
}
export default actions
|
import React, { useState, useEffect } from "react";
import CardBack from "../components/CardBack";
import CardFront from "../components/CardFront";
import HandDisplay from "../components/HandDisplay";
const Game = ({ dbUrl, userPlayer}, props) => {
// console.log('userPlayer number', userPlayer)
const [gameId, setGa... |
const express=require("express");
const app=express()
const bodyParser=require("body-parser")
const excel = require('excel4node');
const fs = require('fs');
const path = require('path');
let dirPath = __dirname;
dirPath = dirPath.replace(/\\/gm, "/") + "/";
const port=9000;
let workbook = new excel.Workbook();
ap... |
import React from "react";
import TablaEvaluaciones from '../components/Tablas/TablaEvaluaciones'
import FormEvaluaciones from '../components/Forms/FormEvaluaciones'
import { Row, Col, Modal, ModalHeader, ModalBody, Button } from "reactstrap";// reactstrap components
import API from "../components/server/api";
import N... |
function listarPaises() {
$.post("archivos/phps/listarPaises.php").done(function(data) {
$.each(data, function(key, propiedad) {
$("#paisEmpresa").append("<option value='" + propiedad.idPais + "'>" + propiedad.pais + "</option>");
});
});
}
function listarDepartamentos(idPais) {
$("#departamentoEmp... |
const electron = require('electron').remote;
var express = require('express')
var app = express();
var bodyParser = require('body-parser');
var path = require('path');
var fs = require('fs-extra');
const cors = require('cors')
// const userDataPath = electron.getPath('userData');
// // We'll use the `configName` p... |
class CentralMessage {
constructor(st) {
augment(this, st)
}
adjust() {}
draw() {
const tx = this.__
const w = tx.tw - lab.mode.sidePanel.w
const h = tx.th
const len = this.label.length
tx
.back(lib.cidx('baseHi'))
.face(lib.cid... |
var numero = 1
switch (numero) {
case 1:
console.log("soy un 1");
break; //se usa el break para detener la validacion y que no pase a los otros casos
case 2:
console.log("soy un 2");
break;
case 100:
console.log("si soy un 100");
break;
default: //... |
function mostrar()
{
var repeticion;
var numero;
repeticion = prompt ("ingrese cantidad de veces");
repeticion = parseInt(repeticion);
while (isNaN(repeticion) || repeticion < 1){
repeticion = prompt ("ingrese unicamente numeros");
repeticion = parseInt(repeticion);
}
for (numero = 1; numero <= repetici... |
import React, { Component } from "react";
import "./ImageCSS.css";
export default class Image extends Component {
constructor(props) {
super(props);
}
render() {
console.log(this.props.src);
return (
<div className="col-md-6">
<div className="description">{this.props.description}</div>
... |
export const List = (state, action) => {
if (typeof state === "undefined") {
return {
tableList: []
};
}
switch (action.type) {
case "tableList":
console.log(state, '&&&&&&');
return Object.assign({}, state, {
tableList: action.payload
});
case "os":
return '24';
default:... |
import React, { Component } from "react";
import Panel from "./Panel";
import Api from "../api/Api";
export default class MainProducts extends Component {
constructor() {
super();
this.state = {newProducts: [], featuredProducts: []};
}
componentWillMount() {
fetch(`http://${Api.getBaseUrl()}/public... |
import fetch from '@/utils/fetch'
/**
* login 校验用户和密码是否正确
* @param { String } username 用户名称
* @param { String } password 用户密码
* @return {[type]} [description]
*/
export function login(username, password) {
return fetch({
url: '/user/login',
method: 'post',
data: {
username,
pa... |
import React from "react";
import "./artist.css";
const Fourth = () => {
return (
<div className="container">
<div className="card">
<img
class="card-img-top img-fluid"
src="https://www.lamontagne.fr/photoSRC/Gw--/guillaume-dottin-magicien_4584013.jpeg"
alt=""
... |
(function () {
"use strict";
describe("AddDevicePairingModalService", function () {
var service, $modal;
beforeEach(inject(function(_$injector_) {
service = _$injector_.get("AddDevicePairingModalService");
$modal = _$injector_.get("$modal");
}));
describe("isPairableDevice", function ... |
import {
REQUEST_LOADING,
REQUEST_SUCCESS,
REQUEST_FAILED,
GET_REQUESTS_LOADING,
GET_REQUESTS_SUCCESS,
GET_REQUESTS_FAILED,
} from '../constants/request.js';
export const request = (mediaId, mediaType) => ({
mediaId,
mediaType,
type: REQUEST_LOADING,
});
export const requestSuccess = () => ({
type... |
const mongoose = require('mongoose');
const sharedFun = require('../services/sharedFun');
const Bluebird = require("bluebird");
const _ = require('lodash');
const async = require('async');
// const sharp = require('../controller/sharp');
/*---------- Imgs Schema------------*/
const MySchema = mongoose.Schema({
fileD... |
import { ActionsTypes } from '../actions';
const initialState = {
isFetchingAverage: false,
isFetchingUsersCalifications: false,
average: '',
califications: [],
};
export default function reputation(state = initialState, action = {}) {
switch (action.type) {
case ActionsTypes.AVERAGE_CALIFICATION_REQUES... |
before('protect from forgery', function () {
protectFromForgery('bb8221367e3490cd21e362b1400df121e8a47957');
});
|
slide[MODULEID].buildThumbList = function()
{
for (var i=0;i<this.umg_titles.length ;i++ )
{
var item = "";
if (this.umg_mouseoverbehavior == "moveto")
{
item = "<a href='javascript:void(0);' onmouseover='slide[MODULEID].navigateTo("+i+")' class='umg_page' id='page[MODULEID]_"+i+"'>"+jQuery(this.umg... |
/*$Rev: 1947 $ Revision number must be in the first line of the file in exactly this format*/
/*
Copyright (C) 2009 Innectus Corporation
All rights reserved
This code is proprietary property of Innectus Corporation. Unauthorized
use, distribution or reproduction is prohibited.
$HeadURL: http://info.in... |
import Joi from 'joi';
import pool from '../database/dbConnection';
import { queryUsersByEmail } from '../database/queries';
import { newUserSchema, loginSchema } from '../utilities.js/inputSchema';
export default class UserValidation {
static handleSignup(request, response, next) {
const { error } = Joi.valida... |
/**
* Created by Manideep.
*/
$(document).ready(function(){
$('#submitbutton').click(function(){
var searchTerm = $('#searchbar').val();
var wikiurl = "https://en.wikipedia.org/w/api.php?action=opensearch&search="+ searchTerm +"&format=json&callback=?";
$.ajax({
type: "GET",
... |
/*
* PB_JIT -- Q1-controller.js
*
* Author: @pablo
*
* Purpose: controller for Q1 page
*
* Version: 1.0.0 ... |
const { entity, field } = require('@herbsjs/gotu')
const Repository = require('../src/repository')
const assert = require('assert')
describe('Repository', () => {
const givenAnRepositoryClass = (options) => {
return class ItemRepositoryBase extends Repository {
constructor() {
... |
class Scissors {
} |
let capture = document.querySelector("#capture");
capture.onclick = element => {
chrome.tabs.captureVisibleTab(
null,
{ format: "jpeg", quality: 100 },
dataUrl => {
let a = document.createElement("a");
a.href = dataUrl;
a.download = `capture_${formatDate(new Date(), "yyyyMMddHHmmss")}.j... |
/* eslint-disable func-style,no-return-await */
const qiniu = require('qiniu');
module.exports = class extends think.Service {
/**
* 七牛上传
* @param filePath 要上传文件的本地路径
* @param key 上传到七牛后保存的文件名
* @returns {*}
*/
async upload(filePath, key, option, istoken = false) {
// this.cacheKey = this.tablePr... |
export { classname } from './classname'
export { path } from './object_path'
export { t } from './i18n'
|
module.exports = function(sequelize, DataTypes) {
var Categorie = sequelize.define(
"Categorie",
{
name: {
type: DataTypes.STRING,
allowNull: false,
validate: {
len: [45]
}
},
color: {
type: DataTypes.STRING,
allowNull: false,
... |
import React from 'react'
import { Button, Card } from 'react-bootstrap'
import { useDispatch, useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
import WeatherIconSmall from '../components/WeatherIconSmall'
import { locationAutocompleteSearch } from '../actions/acuuWeatherApiActions'
con... |
import { TabbedPage, TabbedPageTab as Tab, TitleHeader, DescriptionHeader } from "layout";
import { FormattedMessage as T } from "react-intl";
import { default as SignTab } from "./SignMessage";
import { default as ValidateAddressTab } from "./ValidateAddress";
import { default as VerifyMessageTab } from "./VerifyMessa... |
const Player = require('../models/player');
module.exports = {
createNewPlayer: (req, res) => {
const params = req.body.player;
const newPlayer = Player({...params});
newPlayer.save((err) => {
if (err) return console.error(`Error saving: ${err}`);
console.log('Successfully created');
res.send({successf... |
const express = require('express');
//import functions from db.js to utilize
const db = require('../data/db.js');
const router = express.Router();
router.get('/', (req, res) => {
db.find()
.then(posts => res.status(200).json(posts))
.catch(error => {
console.log(error);
res.status(500).json({ error: "The po... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.