text stringlengths 7 3.69M |
|---|
const newsFeedItemTemplate = (title, index) => ({
block: 'li',
cls: 'news-feed__item',
content: title,
attrs: {
'data-id': index,
},
})
const newsFeedTemplate = function(news) {
return {
block: 'ul',
cls: 'news-feed',
content: news.reverse().map(newsFeedItemTempl... |
import React from "react";
import { withStyles, makeStyles } from "@material-ui/core/styles";
import Table from "@material-ui/core/Table";
import TableBody from "@material-ui/core/TableBody";
import TableCell from "@material-ui/core/TableCell";
import TableHead from "@material-ui/core/TableHead";
import TableRow from "... |
class BusInfo {
items = [];
callback = null;
//https://v0.ovapi.nl/line/
constructor(onItemsRecieved) {
var getUrl = window.location;
this.baseUrl = getUrl.protocol + "//" + getUrl.host + "/";
this.callback = onItemsRecieved;
}
render(targetDomObject) {
targetD... |
var config = {};
/* Web Application settings */
config.url = 'http://azulloft.com:8081'
config.appname = 'Azulloft'
config.locale = 'pt-BR';
/* Sport settings */
config.sports = {};
config.sports.on = 'on';
config.sports.off = 'off';
config.sports.tennis = 'tennis';
config.sports.bascketball = 'bascketball';
confi... |
import Product from "../../models/Product";
import * as Notifications from "expo-notifications";
export const DELETE_PRODUCT = "DELETE_PRODUCT";
export const UPDATE_PRODUCT = "UPDATE_PRODUCT";
export const CREATE_PRODUCT = "CREATE_PRODUCT";
export const SET_PRODUCT = "SET_PRODUCT";
import AsyncStorage from "@reac... |
import {seedToNumber} from "./seedToNumber";
const synonymProcessor = function (text, seed) {
let i = 0;
text = text.replace(/\[([^\]]*)\]/g, function (match, group) {
let synonymGroup = group.split("|");
if (synonymGroup.length == 1) return group;
const randomIndex = seedToNumber(seed, i, synonymGroup... |
/*jshint browser:true, devel:true */
/*global document */
var WPMLLanguageSwitcherDropdownClick = (function() {
"use strict";
var isOpen = false;
var toggle = function(switcher) {
var subMenu;
if (switcher !== undefined) {
subMenu = switcher.getElementsByClassName('wpml-ls-s... |
var Promise = require('bluebird'),
sinon = require('sinon');
module.exports = function() {
sinon.stub.resolves = function(value) {
return this.returns(Promise.resolve(value));
};
sinon.stub.rejects = function(err) {
if (typeof err === 'string') {
err = new Error(err);
... |
import React, { Component } from 'react';
import styled from 'styled-components';
import bgDesktop from './image/bgDesktop.png';
import bgMobile from './image/bgMobile.png';
const BgDinamic = styled.div`
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 80%;
margin: 0 auto;
`;
... |
import { createStackNavigator, createNavigationContainer } from 'react-navigation';
//LOCAL
import Splash from './src/screens/Splash';
import SignIn from './src/screens/SignIn';
const stackNavigator = createStackNavigator(
{
Splash: { screen: Splash },
SignIn: { screen: SignIn }
},
{
headerMode: 'non... |
import React from 'react'
import { BrowserRouter, Route, Switch } from 'react-router-dom'
// Base components
import Menu from './components/Menu'
import Header from './components/Header'
import Main from './components/Main'
// Pages/Views
import Welcome from './views/Welcome'
import Form from './views/Form'
import Ta... |
import React, { Component, Fragment } from 'react';
import { Grid, CircularProgress } from '@material-ui/core';
import { Portal } from 'react-portal';
import styled from 'styled-components'
const StyledGrid = styled(Grid)`
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(0, 0,... |
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { Switch } from 'react-router-dom';
import { ConnectedRouter } from 'connected-react-router';
import store, { history } from './core/store';
import Login from './authentication/screens/Login';
import Signup from './authentication... |
$(document).ready(function(){
//paķer text area tekstu
$("#register-form").validate({
// validācijas likumi
rules: {
name:{
required: true,
rangelength: [2, 6]
},
address: "required",
email: {
required: true,
... |
import React from 'react'
import firebase, { db } from '../firebase'
import Footer from '../Components/Footer'
import './log.css'
import VerticalTabs from './tabs'
import MappBar from '../Components/mAppBar'
import HelpPage from './mobile-profile'
export default class Login extends React.Component {
state = {
... |
var dynamic = $(".mid_col #dynamic");
var cardForm = dynamic.find("#cardForm");
var checkForm = dynamic.find("#checkForm");
var commonForm = dynamic.find("#commonFormInfo");
//append the common form (contact info) to both payment forms
cardForm.html(cardForm.html() + "\n" + commonForm.prop('outerHTML'));
che... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Query } from 'react-apollo';
import debounce from 'debounce';
import CurrencyInput from '../CurrencyInput/CurrencyInput';
import SliderInput from '../SliderInput/SliderInput';
import DisplayGraph from '../DisplayGraph/DisplayGraph';
... |
/* eslint-disable react/jsx-props-no-spreading */
import React, { useReducer, useEffect } from 'react';
import { ThemeProvider } from 'styled-components';
import { DataTableProvider } from '../DataTableContext';
import { tableReducer } from '../../reducer/tableReducer';
import TableRow from '../TableRow';
import Table... |
import React from 'react';
import { Link } from 'react-router-dom';
const AdminPanel = () => (
<header className="intro">
<h2>What would you like to do?</h2>
<div className="buttons">
<Link className="linkBtn dashboardBtn" to="/classroom/manage">
<i className="fa fa-th-l... |
"use strict"
var co = require('co')
, EJSON = require('mongodb-extended-json')
, ReadPreference = require('mongodb').ReadPreference
, ERRORS = require('../errors')
, okFalse = require('../util').okFalse;
class Command {
constructor() {
}
handle(connection, mongoClient, bson, originalOp, op, liveQueryHa... |
import styled from 'styled-components';
import { Cell } from '../TableCell/styled';
const TableColStyle = styled(Cell)`
${(props) => props.column.button && 'text-align: center'};
`;
export const ColumnSortable = styled.div`
display: inline-flex;
align-items: center;
height: 100%;
line-height: 1;
user-sele... |
import React from 'react';
import Link from '@docusaurus/Link';
import MailingListForm from '@site/src/components/MailingListForm';
import SVG from 'react-inlinesvg';
import classnames from 'classnames';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import useBaseUrl from '@docusaurus/useBaseUr... |
const webpack = require('webpack')
const WebpackDevServer = require('webpack-dev-server')
const config = require('../webpack.config')
const options = {
publicPath: config.output.publicPath,
hot: true,
inline: true,
historyApiFallback: true,
stats: {
colors: true,
hash: false,
timings: true,
ch... |
import React from "react";
import { useDispatch, useSelector } from "react-redux";
import { Checkbox, InputNumber } from "antd";
import { InputRangeContainer } from "../style";
import {
UPDATE_ANY_LENGTH,
UPDATE_DIMENSIONS_LENGTH_MIN_FT,
UPDATE_DIMENSIONS_LENGTH_MAX_FT,
UPDATE_DIMENSIONS_LENGTH_MIN_IN,
UPDAT... |
/**
* Server side for Banking Application.
* It implements Chain Replication algo
*/
/* Custom includes */
var reply = require('./Reply.js');
var request = require('./Request.js');
var logger = require('./logger.js');
var util = require('./util.js');
/* Config File include */
var config;
/* System includes */
var... |
/**
* @flow
*/
import LqInputWithKeyboardScene from './LqInputWithKeyboardScene';
import React from 'react'
import {
extractNativeValue,
} from './LqUtils';
type Props = {
onSet: (v: any) => void,
value: any,
editable?: boolean,
placeholder: string,
};
let LqStringEditScene = ({value, onSet, placeholder... |
require("dotenv").config();
var keys = require('./keys.js')
// NPM module for Twitter API
var Twitter = require("twitter");
// NPM module for Twitter API
var Spotify = require("node-spotify-api");
// NPM module for OMDB API
var request = require("request");
// NPM module used to read the random.txt file
var fs = ... |
// Copyright 2016 Zipscene, LLC
// Licensed under the Apache License, Version 2.0
// http://www.apache.org/licenses/LICENSE-2.0
const express = require('express');
const bodyParser = require('body-parser');
const _ = require('lodash');
const XError = require('xerror');
const APIInterface = require('./api-interface');
... |
const router = require('express').Router()
const { parser, requireSignin, userMiddleware } = require('../common-middlewares')
const { claimPayout, claimFooditems, changeLevel, paidUsers, paidUsersFood } = require('../controllers/admin')
const { register, userProfile,userProfile2,makePayment,updateContactDets,updateBank... |
// API key
const API_KEY = "pk.eyJ1Ijoia21pY2tleSIsImEiOiJja21oemZmZ2gwYzhpMnZxb2ptMHg5ZDNlIn0.IeFLAz65xBxny4I0I-jUWQ";
|
const safeHasOwnProperty = {}.hasOwnProperty;
export function getInt(value) {
if (typeof value === 'number' && value % 1 === 0) {
return value;
}
const strValue = String(value);
if (strValue.search(/^[+-]?[0-9]+$/) !== -1) {
return parseInt(strValue, 10);
}
return null;
}
export function getRand... |
import getWeb3 from "../utils/getWeb3"
import PAY_CONTRACT_ABI from "../abi/PayContractABI.json"
import ERC20_ABI from "../abi/IERC20ABI.json"
import { tokenInfo } from "../utils/tokenInfo"
import currency from 'currency.js'
export const PAY_CONTRACT_ADDRESS = "0x0a3c2723381573fedc238f0bb68a1899eb437384"
export const... |
const gameContainer = document.querySelector('.color-memory');
const gameStates = ['intro', 'phase1', 'phase2', 'phase3', 'results'];
const beginButton = document.querySelector('.color-memory__intro--cta');
const colorChoicesElem = document.querySelector('.color-memory__phase3--choices');
let correctColor = null;
be... |
// Delay function to pause execution to next line
const delay = ms => new Promise(res => setTimeout(res, ms));
const time = 300; // 5 hours
// Stay logged in button prompt
const stayLoggedInButton = $(".mat-focus-indicator.mat-btn-lg.btn-block.btn-brand-orange.mat-raised-button.mat-button-base");
// Boolean to check... |
'use strict';
var assert = require('chai').assert,
Chess = require('../chess'),
testData = require('./data/empty-board-moves-generation');
describe('Empty board moves', function () {
var pieces = Object.keys(testData);
pieces.forEach(testPieceMoves);
function testPieceMoves(pieceToken) {
des... |
$(document).ready(function(){
$('#message').faneIn('slow');
}); |
import React from 'react';
import { Flex, Text } from 'app/components/primitives';
import { useThemeContext } from '../../state/theme.state';
export default function DetailView({ navigation, route }) {
const { params } = route;
if (params) {
navigation.setOptions(params);
}
const [theme] = useThemeContext(... |
const auth = require('basic-auth')
const Credentials = require('../models/schema').Person
module.exports = function(request, response, next)
{
let user = auth(request);
if(user===undefined) response.status(403).send('Tienes que autenticarte')
pass = Buffer.from(user.pass).toString('base64')
Credenti... |
/* Exercício 1 */
function daisyGame(petalas){
if(petalas.constructor === Array){
if (petalas % 2 === 0){
return 'Love me not';
} else {
return 'Love me';
}
}
};
/* Exercício 2 */
function maiorTexto(textos)){
var maiorPalavra = textos[0];
for(var i = 1; i < textos.length; i++){
if(... |
const Util = {};
Util.inherits = function (subClass,superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
}
Util.randomVec = function (length) {
let rand_ang = 2*Math.PI*Math.random();
let x_comp = length * Math.sin(rand_ang);
let y_comp = length ... |
import alt from '../alt';
class ItemActions {
refreshItems() {
return "";
}
updateItems(items) {
return items;
}
newItem(item) {
return item;
}
updateItem(item) {
return item;
}
deleteItem(item) {
return item;
}
}
module.exports = alt.createActions(ItemActions);
|
/*!
* Loceo Javascript Library 1.0.1
* Copyright 2012 All rights reserved.
* Use of this source code is governed by a BSD-style license that can be found at https://loceo.se
*/
(function($){
var mets = {
"init":function(opt){
},
"city":function(opt,callback){
return this.each(function(){
var synclock=fa... |
import Price from './Price'
export {
Price,
}
|
// example/demo06-cocos-across-react/react-with-cocos/src/app.jsx
import { useCallback } from 'react';
import cs from './app.module.scss';
function App() {
const onCloseMusic = useCallback(() => {
document.querySelector('iframe').contentWindow.document.dispatchEvent(new CustomEvent('onCloseMusic'));
}, []);
... |
import HexLinks from './HexLinks';
export default HexLinks;
|
"use strict"
class User {
constructor(name, password) {
this.name = name
this.passwordHash = CryptoJS.MD5(password).toString()
this.pictureUrl = null
this.balance = 0
}
checkPassword(password) {
return this.passwordHash === CryptoJS.MD5(password).toString()
}
... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App';
import Home from './components/Home';
import TaskList from './components/TaskList';
// import LoginWithCredentials from './components... |
const a = [3,5,6,1,23,9,21,123,3];
function bubble (arr) {
for (let i = arr.length - 1; i > 1; i--) {
for (let j = 0; j < i; j++) {
if (arr[j] > arr[j + 1]) {
let temp = arr[j + 1];
arr[j + 1] = arr[j];
arr[j] = temp;
}
}
}... |
import {
SIGN_UP,
SIGN_UP_SUCCESS,
SIGN_UP_ERROR,
SIGN_IN,
SIGN_IN_SUCCESS,
SIGN_IN_ERROR,
MAKE_POST_SUCCESS,
FETCH_POSTS_SUCCESS,
FETCH_COMMENTS_SUCCESS,
FETCH_COMMENTS_ERROR,
LOG_OUT,
LOAD_SESSION,
FETCH_COMMENTS,
SEND_COMMENT_SUCCESS,
EDIT_POST_SUCCESS,
EDIT_COMMENT_SUCCESS,
DELETE_... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const marcaSchema = new Schema({
nombre: {
type:String,
required:true
},
descripcion:{
type:String,
required: false
},
imagen: String,
fechaAlta: {
type: String,
required: true
},
fechaBaja: {
type: Stri... |
const scraper = require('../scraper');
const {Spreadsheet} = require('adapters');
const main = async () =>
{
const adapter = new Spreadsheet(
{
data: 'data.xlsx',
parsingOptions:
{
type: 'file'
},
worksheets:
[
{
id: 0,
... |
export default [
'汉语 / Manderin',
'英语(美国) / English(US)',
'英语(英国) / English(UK)',
'英语(加拿大) / English(Canada)',
'英语(澳大利亚) / English(Australia)',
'英语(印度) / English(India)',
'英语(新西兰) / English(New Zealand)',
'英语(新加坡) / English(Singapore)',
'法语(法国) / French(France)',
'法语(北非) / French(North Africa)',
'... |
import Ember from 'ember';
export default Ember.Route.extend({
model(params) {
return Ember.RSVP.hash({
request: this.get('store').findRecord('contactRequest', params.request_id),
profiles: this.get('store').findAll('userProfile')
});
},
actions: {
goBack() {
this.replaceWith('cont... |
"use strict";
var _interopRequireWildcard = require("/Users/GemmaGarciaLopez/Desktop/parts_detect_repo/client/node_modules/@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("/Users/GemmaGarciaLopez/Desktop/parts_detect_repo/client/node_modules/@babel/runtime/helpers/interopRequireD... |
import React from 'react';
import styles from '../styles/styles';
import {WIDTH, HEIGHT, HEADER_STYLE} from '../styles/styles';
import {
View,
Image,
ScrollView,
ImageBackground
} from 'react-native';
import Text from '../components/animalText';
export default class VisitorsScene extends React.Component {
c... |
import React from 'react';
function ExchangeRateOption({currency}) {
return (
<option value={currency}>{currency}</option>
);
}
export default ExchangeRateOption; |
// import something here
import {auth} from 'firebase'
import {getMisCursos, getMisTemas} from './firebase'
import {setCursosWithTemas, setTemas, deleteDB, setUser} from './dexie'
export async function downloadCurso(curso){
await setCursoToMisCursos(curso)
await setCursoWithTemas(curso)
return curso
}
export ... |
document.write('the current version od the io.js' + process.version)
|
var myArrayOne = [];
var myArrayTwo =[];
function addTo() {
myArrayOne.push(document.getElementById("userinput").value);
//window.alert(myArray + " has been added to the array");
//The following line clears the text field after the input has been added to the array.
document.getElementById('userinput'... |
const input = document.getElementById('imageUpload')
let canvas;
canvas = faceapi.createCanvasFromMedia(input)
let fullFaceDescriptions = await faceapi.detectAllFaces(input).withFaceLandmarks().withFaceDescriptors() |
/* eslint-disable no-return-await,no-undef */
module.exports = class extends think.Model {
get relation () {
return {
metas: {
type: think.Model.HAS_MANY,
model: 'appmeta',
fKey: 'app_id'
}
};
}
async findByOrgId (orgId) {
const list = await this.where({org_id: org... |
import {createStore,combineReducers,applyMiddleware} from 'redux'
import thunk from 'redux-thunk'
import postReducer from '../reducer/postReducer'
const configureStore=()=>{
const store=createStore(combineReducers({
post:postReducer
}),applyMiddleware(thunk))
return store
}
export default configure... |
var map; //GoogleMap
var geocoder; //解析經緯度、地址工具
var clickMarker = []; //用戶手動點擊的Marker
var tempBound; //記錄Map邊界是否改變
var markers = []; //從服務器獲取的其它景點Marker陣列
var infowindow; //Marker的資訊視窗
var infowinCurMarker; //資訊視窗當前所使用的Marker
window.onload = function(){
document.getElementById("preIntroBtn").onclick = function(){
... |
import React, { Component } from 'react';
import Avatar from '../../components/Avatar/Avatar';
import NavLinks from '../../components/NavLinks/NavLinks';
import ShareLinks from '../../components/ShareLinks/ShareLinks';
import profileShot from '../../assets/j_lucas_profile.png';
import './NavigationView.css';
class Nav... |
var myVar;
function myFunction() {
myVar = setTimeout(showPage, 3000);
}
function showPage() {
document.getElementById("load").style.display = "none";
document.getElementById("memew").style.display = "block";
}
$('.anim').hover(function () {
$(this).fadeOut({
height: "100px... |
import React, { Component } from 'react';
import { connect } from 'react-redux'
import { adicionarElemento } from './actions'
export class Adicionar extends Component {
state = {
titulo: '',
texto: '',
autor: ''
}
handleChange = e => {
let _obj = {}
_obj[e.target.... |
import React from 'react'
import PropTypes from 'prop-types'
const StaffItem = ({ staff }) => {
return (
<tr>
<td>
{staff.Nm_User}
</td>
<td>
{staff.Fg_Admin === true ? (<p>Admin</p>) : (<p>Usuário</p>)}
</td>
</tr>
... |
import { StatusBar } from "expo-status-bar";
import React from "react";
import { StyleSheet, Text, View, ScrollView } from "react-native";
import Info from "../../Componentes/info";
import BotonAzul from "../../Componentes/BotonAzul";
import { Icon } from "react-native-elements";
import { styles } from "./Perfil-Public... |
var fs = require('fs')
, util = require('util')
, async = require('async')
, Connection = require('ssh2');
// TODO: escape
module.exports = connect;
function connect(username, host, key, callback) {
callback = callback || function() {};
var ssh = new SSH(username, host, key);
ssh.connect(function(err) ... |
//This app starts a server and listens on port 9001 for connections. For every other path, it will respond with a 404 Not Found.
const express = require ('express')
const app = express()
const port = 3031
const morgan = require('morgan')
const upload = require('express-fileupload')
const cors = require('cors')
//cons... |
$(function() {
//mobile-product-selected-list 商品篩選點擊展開樣式==========================
$('.product-selected-list > li > a').click(function () {
$(this).parent().toggleClass('active');
$(this).next('ul').toggleClass('active');
});
$('.product-selected-list > li > ul > li > a').click(function () {
$(this).pa... |
const baseURL = "https://api.mtb-connect.com:8080";
export default {
post(newUser) {
return fetch(`${baseURL}/register`, {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify(newUser)
}).then(resp => resp.json());
}
};
|
const CATALOG = [
{
id: 'el1',
name: 'Электроакуститечкая гитара Yamaha SLG200N n',
img: 'https://muz.by/upload/resize_cache/iblock/61e/210_200_1/61ec3a306157b5d8a91ba8466b93dfbc.jpg',
price: 2350,
},
{
id: 'el2',
name: 'Электроакуститечкая гитара Sigma GMC-ST... |
function solve(arr) {
let total = new Map();
for(let dataRow of arr) {
let [town, population] = dataRow.split(/\s*<->\s*/);
population = Number(population);
if(total.has(town)) {
total.set(town, total.get(town) + population);
} else {
total.set(town, popu... |
import "./edit_profile_modal.html";
import "/imports/ui/components/user_profile_fields/user_profile_fields.js";
import {
getProfileFromFields,
setProfileFields
} from "/imports/ui/components/user_profile_fields/user_profile_fields.js";
import {updateUserProfile, currentUser} from "/imports/api/users/methods.js"... |
const { join: joinPath } = require("path");
const sveltePreprocess = require("svelte-preprocess");
module.exports.preprocess = sveltePreprocess({
typescript: {
transpileOnly: true,
tsconfigFile: joinPath(__dirname, "tsconfig.json"),
compilerOptions: {
paths: {
"@mary-main/*": ["main/src/*"]... |
const { Model } = require('mongorito')
class User extends Model {}
module.exports = User
|
var cssAstFormatter = require('css')
var BASE64_ENCODE_PATTERN = /data:[^,]*base64,/
var _isTooLongBase64Encoded = function (declaration, maxEmbeddedBase64Length) {
return BASE64_ENCODE_PATTERN.test(declaration.value) && declaration.value.length > maxEmbeddedBase64Length
}
var _removeDataUrisFromRule = function (r... |
const fs = require('fs');
const currentVersion = require('../package.json').version;
const run = async() => {
const changelog = (await fs.promises.readFile(__dirname + '/../CHANGELOG.md')).toString().split('\n');
let currentChangelog = [];
let end = false;
let releaseFound = false;
let currentVersionPattern... |
const tape = require('tape');
const search = require('../src/search.js');
tape('wordSearch returns and array', function(t){
t.equal(Array.isArray(search('Buffy')), true, "wordSearch returns an array");
t.end();
})
tape('wordSearch returns all items that contain all letters in string', function(t){
t.deepEqual(... |
const expect = require('expect');
const rewire = require('rewire');
let app = rewire('./app');
describe('App', () => {
let db = {
saveUser: expect.createSpy()
};
// replace the db require in app.js
app.__set__('db', db);
it('should call saveUser with user object', () => {
const
username = 'Bo... |
//folder
export const CREATE_FOLDER = "CREATE_FOLDER";
export const UPDATE_FOLDER_NAME = "UPDATE_FOLDER_NAME";
export const UPDATE_FOLDER_COLOUR = "UPDATE_FOLDER_COLOUR";
export const CLOSE_CURRENT_FOLDER = "CLOSE_CURRENT_FOLDER";
//fetch_notes
export const SERVER_FETCH_NOTES = "SERVER_FETCH_NOTES";
export const SERVE... |
/*
mColorPicker
Version: 1.0 r38
Copyright (c) 2010 Meta100 LLC.
http://www.meta100.com/
Licensed under the MIT license
http://www.opensource.org/licenses/mit-license.php
*/
// After this script loads set:
// $.fn.mColorPicker.init.replace = '.myclass'
// to have this script apply to input.myclass,
// instead ... |
import React from "react";
import "./AccountSetting.css";
const AccountSetting = () => {
return(
<div>
<h4>Account Settings</h4>
<p className="text">You can only change your account number and account type</p>
<form className="setForm" id="form">
<input type="text" name="acc... |
import merge from 'lodash/merge';
import { withClientState } from 'apollo-link-state';
import { userState } from './login-state';
import { todoState } from './todo-state';
const state = [userState, todoState];
const createClientState = (cache) => {
const { defaults, Mutation, Query } = merge(...state);
return w... |
import React, {Component } from 'react';
import axios from 'axios'
export default class CreateFact extends Component {
constructor(props) {
super(props)
this.state = {
body: '',
author: ''
}
this.onChangeBody = this.onChangeBody.bind(this);
this.onChangeAuthor = this.onChangeAuthor.bi... |
/**
* Authors: Diego Ceresuela, Luis Jesús Pellicer, Raúl Piracés.
* Date: 16-05-2016
* Name file: index.js
* Description: This file contains the main behaviour of the web app.
*
* Launches all the web services listed in webservices,js
* PORT = 3000
* STATIC_CONTENT = ./app
*/
(function() {
'use strict'... |
'use strict'
const WebSocket = require('ws')
const MetagameServer = require('../metagame')
const uuid = require('uuid')
const assert = require('assert')
const mongodb = require('mongodb')
const util = require('util')
const co = require('co')
const utils = require('../core/utils')
const config = require('../sample_game... |
import React, { useState } from 'react';
export default () => {
const [colorChecked, setColorChecked] = useState([true,true,true,true,true]);
const [positionChecked, setPositionChecked] = useState([true, true, true, true]);
const colors = [
'#808071', // taupe
'#4d3326', // brown
... |
var passport = require('passport'),
LocalStrategy = require('passport-local').Strategy,
smfAuth = require('./integration/smf-auth');
var users = {};
// Passport session setup.
// To support persistent login sessions, Passport needs to be able to
// serialize users into and deserialize users out of the sess... |
const router = require('express').Router();
const authMiddleware = require('../../middlewares/authMiddleware');
const tiktokController = require('../../controllers/api/tiktokUsers/tiktokUsers.controller');
router.get('/',tiktokController.get);
router.get('/get-user/:id',tiktokController.getUser);
router.get('/search-... |
function n_vi_code(msgt){
switch(msgt){
case "EXIST":dfv = "用户已存在";break;
case "UNAUTH":dfv = "非法访问";break;
case "INT":dfv = "内部错误";break;
case "NONE":dfv = "没有数据或长度过短";break;
case "EXT-1006":dfv="数据不合法";break;
case "EXT-1007":dfv="数据不完整";break;
default:dfv = "未知错误:ERR"+msgt;}
return dfv;
}
function getpos(){... |
const URL_MEMBER = ' https://api.trello.com/1/members/';
const URL_BOARDS = ' https://api.trello.com/1/boards/';
const URL_LISTS = ' https://api.trello.com/1/lists/';
const URL_CARDS = 'https://api.trello.com/1/cards';
const API_KEY = 'e327c3e08523d8b0c0efca2189a7b372';
const API_TOKEN =
'fbb3cb59c7c63472fc502a0b65fb... |
import React from 'react';
import {Link, Container} from './Navigation.styled'
export default function Navigation() {
return (
<Container>
<Link to="/">Home</Link>
<Link to="/movies">Movies</Link>
</Container>
)
}
|
import React from 'react';
import {Card, Statistic, Image} from 'semantic-ui-react';
const UserCard = (props) =>{
const {name = 'lorem', date=Date.now(), answersAmount = 2222} = props || {};
const year = new Date(date).getFullYear();
return(
<Card>
<Image src='https://react.semantic-ui... |
export const COLUMN_REQUEST_ITEMS = [
{
header: "No.",
data: "externalId",
targets: [0],
width: "80px",
orderable: true,
className: "text-center"
},
{
header: "Description",
data: "description",
targets: [1],
width: "80px",
orderable: true,
className: "text-center"
... |
const https = require('https')
// const fetch = require('fetch')
// const fetch = require('node-fetch');
exports.handler = function(event, context, callback) {
// console.log("From new lambda function");
// console.log(JSON.stringify(event));
var msg = JSON.parse(event.body);
var m1 = JSON.stringify(msg.mes... |
$(document).ready(function() {
$( ".luke" ).click(function() {
$( ".luke" ).animate({
width: "40%",
fontSize: "3em",
borderWidth: "10px"
}, 1500 );
$( ".r2d2" ).animate({
width: "40%",
fontSize: "3em",
color: "red",
borderWidth: "10px"
}, 1500 );
});
});
var lukeskywalker = {
... |
"use strict";
exports.parse = function(fileName, data) {
var parser;
switch (fileName.substring(fileName.lastIndexOf(".")+1).toLowerCase()) {
case "stl":
parser = new stl();
break;
case "ply":
parser = new ply();
break;
case "obj":
parser = new obj();
break;
default: break;
}
return pa... |
const gulp = require('gulp');
const webpack = require('webpack-stream');
const uglify = require('gulp-uglify');
const browserSync = require('browser-sync').create();
const sass = require('gulp-sass');
const autoprefixer = require('gulp-autoprefixer');
const imagemin = require('gulp-imagemin');
const imageminMozjpeg = r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.