text stringlengths 7 3.69M |
|---|
import Post from './post';
import {connect} from '../data';
export default connect(({match}) => `${match.url}/data.json`)(Post);
|
'use strict'
var map, infoclientpos, marker, infoWindow;
var ERRSTRING = "<strong>Error! </strong>";
var SUCCSTRING ="<strong>Success! </strong>";
var HIDEMARKER = true;
var lat0=44;
var lng0=8;
var lat1=45;
var lng1=9;
function clean_str(str){
str=str.replace(/è/gi,'e\'');
str=str.replace(/é/gi,'e\'');
... |
function validate(){
alert("start..");
var employee_name = $("#employee_name").val();
if (employee_name == null || employee_name == "") {
$("#employee_namemsg").html("<font color='red'>用户名不能为空</font>");
return false;
} else {
$("#employee_namemsg").html("");
return true;
}
var employee_loginname = $("#... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const mongoose = require("mongoose");
const DataAccess_1 = require("../DataAccess");
class GroupExpenseSchema {
static get schema() {
let schemaDefinition = {
reportType: {
type: Number,
... |
import path from 'path';
import tape from 'tape';
import av from 'av';
import AudioInFile from '../src/node/source/AudioInFile';
import Logger from '../src/common/sink/Logger';
// class Asserter extends BaseLfo {
// constructor(asserter, sampleRate, frameSize, buffer) {
// super();
// this.asserter = asser... |
'use strict';
const https = require('https');
const fs = require('fs');
const qs = require('querystring');
const crypto = require('crypto');
const exec = require('child_process').execSync;
const property = require('@rokid/property');
const context = require('@rokid/context');
const logger = require('@rokid/logger')('a... |
'use strict';
const Controller = require('egg').Controller;
class ruleController extends Controller {
async list() {
const ctx = this.ctx;
ctx.body = await ctx.service.rule.list({ ...ctx.request.body });
}
}
module.exports = ruleController;
|
"use strict";
(function() {
angular
.module("softCity")
.controller("showController", [
'$scope',
'$http',
'$stateParams',
'auth',
'$timeout',
'greenBar',
ShowControllerFunction
]);
function ShowControllerFunction($scope, $http, $stateP... |
'use strict';
module.exports = (sequelize, DataTypes) => {
const Config = sequelize.define('Config', {
scene: DataTypes.INTEGER,
gaslimit: DataTypes.INTEGER,
gasprice: DataTypes.INTEGER
}, {
tableName: 'config',
comment: "配置",
sequelize
});
Config.associate = function(models) {
// a... |
import messages from './messages';
import connection from './connection';
import events from './events';
export default {
messages,
connection,
events,
};
|
/**
* Created by Osvaldo on 20/10/15.
*/
var Manager = require('./manager.js');
var utility = require('util');
var Model = require('../model/dispositivo.js');
var hub = require('../../hub/hub.js');
var Mensagem = require('../../util/mensagem.js');
utility.inherits(DispositivoManager, Manager);
/**
* @constructor
... |
/******************************************************************************
*
* PROJECT: Flynax Classifieds Software
* VERSION: 4.1.0
* LICENSE: FL43K5653W2I - http://www.flynax.com/license-agreement.html
* PRODUCT: Real Estate Classifieds
* DOMAIN: avisos.com.bo
* FILE: PHOTO_GALLERY.JS
*
* The softwar... |
// head {
var __nodeId__ = "std_layouts_cp__main";
var __nodeNs__ = "std_layouts_cp";
// }
(function (__nodeNs__, __nodeId__) {
$.widget(__nodeNs__ + "." + __nodeId__, {
options: {},
_create: function () {
this.bind();
},
_setOption: function (key, value) {
... |
import httpClient, { buildPath } from './api.service'
const baseUrl = 'comics'
/**
* Get Comic List
* @param {Object} params
* @returns {Promise}
*/
export const getComics = (params = {}) => httpClient.get(baseUrl, { params })
/**
* Retrieve a comic resource by id
* @param {Number|String} id Comic id
* @param ... |
const { Client } = require('@elastic/elasticsearch')
const client = new Client({ node: 'http://localhost:9200' })
const startTheMagic = async () => {
//const pingResult = await client.ping();
//console.log(pingResult);
//const pingResult = await client.cluster.health();
//console.log(pingResult);
/... |
const chai = require("chai");
const assert = chai.assert;
const proxyquire = require("proxyquire");
describe("/lib/strategies/webapp-strategy", function(){
console.log("Loading webapp-strategy-test.js");
var WebAppStrategy;
var webAppStrategy;
before(function(){
WebAppStrategy = proxyquire("../lib/strategies/w... |
var $btnTop = $('.scrollTopBtn')
$('window').on('scroll', function(){
if ($(window).scrollTop() >= 100) {
$btnTop.fadeIn();
} else {
$btnTop.fadeOut();
}
});
$btnTop.on('click', function () {
$('html,body').animate({scrollTop:0}, 1000)
}); |
export default class instaService {
constructor() {
this._apiBase = "http://localhost:3000"; // _- это неизменяемое значение
}
//поля классов, нативный api
//ассинхронная функция es7 => async - await
// fetch - это api, который делает запрос к серверу
getResource = async url => {
const res = awa... |
import React from 'react';
import './Card.css';
const Card = (props) => {
console.log(props);
return (
<div className="info">
<img src={props.avatar_url} alt="profile pic" width="75"/>
<div className="name">
<h2>{props.name}</h2>
</div>
<d... |
function sumOfMissingNums (arr) {
const numberArr = arr.filter(x => x.match(/\d+/g))
const maxNum = Math.max(...numberArr)
const minNum = Math.min(...numberArr)
const range = [...Array(maxNum - minNum + 1)].map((_, i) => minNum + i)
return range.length - numberArr.length
}
const result = sumOfMissingNums(['... |
import { toast } from 'react-toastify';
const success = (message, url) => {
url ?
toast.success(`${message}`, {
onClose: () => window.location.href=`/${url}`,
autoClose: 1000
}) :
toast.success(`${message}`, {
autoClose: 1000
})
}
const error = message => {
toast.error(`${message}`,{
autoC... |
import { connect } from "react-redux";
import { HistoryPopup } from "../../../components/utils/popups/HistoryPopup";
import { clearAllTransactions } from "../../../state/actions/customer-actions";
import { STATUS_LOADING, STATUS_SAVE_COMPLETE } from "../../../state/actions";
const mapStateToProps = state => {
retu... |
import React from "react";
const _404 = () => {
return (
<div id="error">
<h1>404 Error!!</h1>
<p>You are on the wrong path.</p>
</div>
);
}
export default _404;
|
var path = require('path');
var webpack = require('webpack');
var Dotenv = require('dotenv-webpack');
var combineLoaders = require('webpack-combine-loaders');
module.exports = {
entry: [
'webpack-hot-middleware/client',
path.resolve(process.cwd(), 'app/entry')
],
output: {
path: path.resolve(process.... |
var net = require("net");
var server = net.createServer(function (c) {
console.log("Server connected");
});
server.listen(8080, function () {
console.log("Server started on port 8080");
});
|
const path = require('path')
const assert = require('assert')
const {DataFlow, IdentityError, DataError} = require('../lib')
describe('class DataFlow', () => {
flow = null
it('constructor()', () => {
let schema_dir1 = path.join(__dirname, 'schema1')
let schema_dir2 = path.join(__dirname, 'sch... |
export { default as Typography } from './Typography'
export { default as Button } from './Button'
export { default as ThemeProvider } from './ThemeProvider'
|
export default {
route: {
currentPage: 'Dashboard'
},
user: {
login: {
ok: true
}
}
};
|
export const AUTH_LOGIN = 'auth/login';
export const AUTH_LOGIN_SUCCESS = 'auth/loginSuccess';
export const AUTH_LOGIN_FAILED = 'auth/loginFailed';
export const AUTH_SIGN_UP = 'auth/signUp';
export const AUTH_SIGN_UP_SUCCESS = 'auth/signUpSuccess';
export const AUTH_SIGN_UP_FAILED = 'auth/signUpFailed';
export const ... |
module.exports = {
presets: ['@babel/preset-typescript', '@babel/preset-env'],
plugins: ['remove-template-literals-whitespace']
};
|
import React from 'react'
import { Link } from 'react-router-dom'
export default function SearchBox({ location, history }) {
const searchformInput = React.createRef()
function handleSubmit(event) {
event.preventDefault()
const query = searchformInput.current.value
if (query !== '') {
history.p... |
var sp = require("serialport");
var fs = require("fs");
require("sugar");
module.exports = function SerialPort(io) {
var port;
var baud = require("./baudrate.json").baudrate;
var openCallback = function() {};
io.on('connection', function (socket) {
sendState(socket);
socket.on('serial-... |
/* Functionality */
/* Search functionality */
function enableSearch() {
search.addEventListener('keyup', function() {
if (search.value != '') {
pageTitle.innerHTML = 'Searching...' + search.value;
ajaxGet('api/search/?key=' + this.value, addProducts);
} else {
pa... |
$(document).ready(function () {
var issaKnife = document.createElement('audio');
issaKnife.setAttribute('src', 'issaknife.mp3');
function makeNewPosition(){
var nh = Math.floor(Math.random() * $(window).height());
var nw = Math.floor(Math.random() * $(window).width());
return [nh... |
// JavaScript Document
//讓捲軸用動畫的方式移動到到指定的位罝======================
$(function(){
$(".scrollgo").click(function(){
var sGoTo = $(this).attr("rel"); //取得目標物的id class
var $body = (window.opera) ? (document.compatMode === "CSS1Compat" ? $('html') : $('body')) : $('html,body'); //修正 Opera 問題
$body.animate({
... |
const express = require("express");
const mongoose = require("mongoose");
const router = express.Router();
const returnRouter = function(io, auth) {
// Load message model
require("../models/Message");
const Message = mongoose.model("messages");
// Getting index page and loading messages
router.get("/", auth... |
// Generated by CoffeeScript 1.4.0
(function() {
$(function() {
var CIRCLE, ELLIPSE, FIRST_POINT, LINE, NUM_CANVAS, POLYGON, POLYLINE, RECT, SECOND_POINT, WAIT, actionCircle, actionEllipse, actionLine, actionPolygon, actionPolyline, actionRect, dist, ellipsePlot, getMousePos, i, performAction, _i, _ref, _results... |
// Copyright 2012 Dmitry Monin. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applica... |
import fetch from 'isomorphic-fetch'
const fetchLogsState = (path) => {
return {
types: ['FETCH_STATE_REQUEST', 'FETCH_STATE_SUCCESS', 'FETCH_STATE_FAILURE'],
shouldCallAPI: (state) => true,
callAPI: () => fetch(path, {
credentials: 'same-origin',
}),
payload: {}
}
}
const fetchLogsDate ... |
global.api.String = {};
|
// 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 Layout from './components/Layout'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
import IndexPage fr... |
import {CHANGE_THEME, DECREMENT, DISABLE_BUTTONS, ENABLE_BUTTONS, INCREMENT} from './types.js'
export const increment = () => {
return {
type: INCREMENT
}
}
export const decrement = () => {
return {
type: DECREMENT
}
}
export const asyncIncrement = (dispatch) => {
dispatch(disable... |
//グローバル
var facility = new Array(); //施設
//施設クラス
function Facility(_name, _lat, _lng, _address, _tel, _url, _num ){
this.name = _name;
this.lat = _lat;
this.lng = _lng;
this.address = _address;
this.tel = _tel;
this.url = _url;
this.num = _num;
}
//マップ描画
function drawMap(){
//numのパラメーターの受け取り
var ... |
import React from 'react';
export default class ToDoList extends React.Component {
constructor(props){
super(props);
this.state = {
todos: ["Learn JS", "Learn Redux", "Learn React"],
todos2: ["Learn JS", "Learn Redux", "Learn React"],
todos3: ["Learn JS", "Learn Redux", "Learn React"],
... |
import { exec } from "child_process"
import test from "tape"
import cliBin from "./utils/cliBin"
import { fixturePath } from "./utils"
test("wrong input file", (t) => {
exec(
`${ cliBin }/testBin ${ fixturePath }/nonexistent`,
(err, stdout, stderr) => {
t.ok(
err,
"should return an err... |
"use strict";
class EqnElementScalar {
constructor(equation, callbackBase, idPrefix, options) {
this.equation = equation;
this.callbackBase = callbackBase;
this.idPrefix = idPrefix;
this.$elem = undefined;
const defaults = {
value: 0,
};
this.opti... |
var ColladaLoader = function ()
{
this.ready = false;
this.initialized = false;
this.data = {
'indices' : [],
'positions' : [],
'textureCoords' : [],
'normals' : [],
'vertexColors' : [],
}
this.loader = null;
this.rawModel = null;
}
ColladaLoader.prototype.loadColladaModel =... |
import {remote} from 'webdriverio';
const start = async () => {
const browser = await remote({
capabilities: {
browserName: 'chrome'
}
});
browser.url('http://10.24.48.120/bee/');
const login_input = await browser.$('input[name="j_username"]');
await login_input.setValue('crm0260');
const password_input... |
function etsiSarjoja() {
const haku = document.getElementById('hakuteksti').value
fetch(`https://api.tvmaze.com/search/shows?q=${haku}`)
.then(vastaus => vastaus.json())
.then(series => {
console.log(series);
const app = document.getElementById('app');
app.innerHTML = series.map(({show}) => `
<div c... |
import React, { Component } from 'react';
import { Layer, Feature } from "react-mapbox-gl";
class FeatureLayer extends Component {
render() {
return (
<Layer
type="symbol"
id="marker"
layout={{"icon-allow-overlap": true, "icon-image": "circle-s... |
var input=[['0001','Roman Alamsyah','Bandar Lampung', '21/05/1989','Membaca'],
['0002','Dika Sembiring','Medan','10/10/1992','Bermain gitar'],
['0003','Winona','Ambon','25/12/1965','Memasak'],
['0004','Bintang Senjaya','Martapura','6/4/1970','Berkebun']]
function dataHandling(){
var index=0
while(index<input.lengt... |
import React from 'react';
import {StyleSheet} from 'react-native';
import theme from '../constants/theme';
import { Input } from 'react-native-elements';
export default AppInput = (props) => {
const { color, placeholder, action, keyboardType, icon } = props
return (
<Input
placeholder={p... |
const express = require("express");
const router = express.Router();
const BetterDB = require("better-sqlite3");
const getProjectNew = require("../library/getProjectNew");
const getExperiment = require("../library/getExperiment");
const buildProjectView = require("../library/buildProjectView");
/**
* Express.js route... |
const arr = [1,2,3,4,5,6,7,7,8,6,10];
const findDupes = (arr) => {
const observed = {};
for(let i = 0; i < arr.length; i++) {
if(observed[arr[i]]) {
return arr[i]
} else {
observed[arr[i]] = arr[i];
}
}
return false;
}
console.log(findDupes(arr)); // Returns 7
const findDupes2 = (arr... |
import React from 'react';
import { Table, Button, Modal, Checkbox } from 'antd';
import httpSevice from '../utill/httpservice';
import configreducer from '../configreducer';
import configactions from '../configactions';
import { withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import invioc... |
import { useParams, Route } from "react-router";
import Comments from "../components/comments/Comments";
import HighlightedQuote from "../components/quotes/HighlightedQuote";
const DUMMY_DATA = [
{ id: "q1", author: "sam", text: "Learning code is not easy" },
{ id: "q2", author: "jhon", text: "Learning react is fun... |
const rp = require("request-promise");
const errors = require('request-promise/errors');
const fs = require("fs");
//認証情報定義
const clientId = "input client id here";
const clientSecret = "input client secret here";
//接続先定義
const oauthUrl = "https://api.ce-cotoha.com/v1/oauth/accesstokens"
const ttsUrl = "htt... |
import React, { Component } from 'react';
import api from '../../services/auth';
import imgmedicos from '../../assets/imagens/img-medicos-2.png'
import barrinha from '../../assets/imagens/1x/barrinha.png'
import imgprontuario from '../../assets/imagens/ambulance-architecture-building-263402.jpg';
import imgApp from '..... |
const express = require('express')
const bodyParser = require('body-parser')
const session = require('express-session')
const passport = require('passport')
const TwitterStrategy = require('passport-twitter')
const uuid = require('uuid/v4')
const security = require('./helpers/security')
const auth = require('./helpers/... |
/* global THREE */
let renderer, scene, camera
let controls
let magenta
let light1
let water
setup()
draw()
function setup () {
scene = new THREE.Scene()
// scene.background = new THREE.Color(0xF7BDFF)
const ar = window.innerWidth / window.innerHeight
camera = new THREE.PerspectiveCamera(75, ar, 0.1, 1000)
... |
const {Plane, Vec3, Polyline3d, shaders} = spritejs.ext3d;
const vertex = `
precision highp float;
attribute vec3 position;
attribute vec3 next;
attribute vec3 prev;
attribute float side;
attribute vec4 color;
attribute float seg;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
uniform vec2 uResolution;
... |
require('../build/build.js')
|
import express from 'express';
import cors from 'cors';
import bodyParser from 'body-parser';
import * as users from './users';
console.log(users);
const app = express();
const usersRouter = express.Router('/api/users');
usersRouter
.post('/api/users/register', users.createAccount)
app
.use(cors()) // connexion ... |
'use strict';
(function () {
var Url = {
UPLOAD: 'https://js.dump.academy/kekstagram',
LOAD: 'https://js.dump.academy/kekstagram/data'
};
var Method = {
POST: 'POST',
GET: 'GET'
};
var Status = {
SUCCESS: 200,
NOT_FOUND: 404,
NOT_AUTHORIZED: 401,
INVALID_REQUEST: 400
};
... |
import keyBy from 'lodash/keyBy'
import {connect} from 'react-redux'
import PropTypes from 'prop-types'
import PatientDetail from '../common/PatientDetail'
import {getSessionPatientDetail} from '../../actions/patients'
import React, { Component } from 'react'
class Patient... |
$("#card").flip({
axis: 'y',
trigger: 'manual'
});
// finish this
$(document).ready(function() {
// show share link
$(".card-share").click(function() {
console.log("blueberries are wonderful.");
$(".share-input").toggleClass('active');
});
// change english / other language button
$(".show-en... |
import React from 'react';
import "../i18n";
import { useTranslation } from 'react-i18next';
function Header({styleA, styleB, text, subtext}){
const { t } = useTranslation();
return (
<div className={styleA}>
{t(text)}
<p className={styleB}>
{t(subtext)}</p>
</div>
);
}
export default ... |
import React from 'react'
function StartGameBtn (props) {
let {startGame, gameStatus} = props
let color = gameStatus === 'begin' ? '#96908d' : '#79421e'
return (
<button className="begin-btn"
onClick={startGame}
disabled={gameStatus === 'begin'}
style={{
... |
/*global define */
(function() {
"use strict";
var jsav, // The JSAV object
jsavGraph,
solArr,
Answer,
gnodes,
guessedAns,
From,
To,
Solution,
userInput; // Boolean: Tells us if user ever did anything
var visited;
var hamiltonianCycle_KA = ... |
WMS.module('Articles.List', function(List, WMS, Backbone, Marionette, $, _) {
var Views = List.Views;
List.Controller = Marionette.Controller.extend({
prefetchOptions: [
{ request: 'get:article:list', name: 'articles' }
]
, regions: [{
name: 'panelRegion'
, viewName: '_panel'
, View... |
'use strict'
angular.module('tutorialize')
.component('tutolist', {
templateUrl: './components/tuto-list/tuto-list.html',
controller: TutoList,
bindings: {
tutos: '<'
}
})
function TutoList($resource, $scope) {
this.focusedTuto = -1;
this.onTutorialClick = (index)... |
// pages/answer/index.js
const app = getApp();
import api from '../../utils/api/api.js';
/***
* 判断用户滑动
* 左滑还是右滑
*/
const getTouchData = (endX, endY, startX, startY) => {
let turn = "";
if (endX - startX > 50 && Math.abs(endY - startY) < 50) { //右滑
turn = "right";
} else if (endX - startX < -50 && Math... |
// TODO: Step 1
// 'use strict'
// const Hapi = require('hapi')
//
// const server = new Hapi.Server()
// server.connection({
// host: 'localhost',
// port: 8000
// })
//
// server.route({
// method: 'GET',
// path: '/',
// handler: (request, reply) => {
// reply('hello hapi!')
// }
// })
//
// server.... |
import React, { Component } from 'react'
export default class FormGroup extends Component {
render() {
const { inputId, title, value, handleInputChange} = this.props;
return (
<div>
<label className='label' htmlFor={inputId}>{title}</label>
<input
value={value}
onCha... |
import {map, omit} from 'lodash'
// local libs
import {PropTypes, assertPropTypes, plainProvedGet as g} from 'src/App/helpers'
const
sponsorsModel = process.env.NODE_ENV === 'production' ? null :
PropTypes.objectOf(PropTypes.shape({name: PropTypes.string}))
export default (sponsors) => {
sponsors = o... |
import React, { Component } from 'react'
import meme from '../../img/meme.png'
import './header.css';
export class Header extends Component {
render() {
return (
<header>
<img src={meme} alt="mem" />
<h1>Mem Generator</h1>
</header>
)
}
}
... |
require(['../main'], function() {
require(['login']);
}); |
var formulario = $("#form_reg")
function isValidForm(form){
var config = {}
var rcheck = 0
var ccheck = 0
for (var i = 0; i < form[0].length; i++) {
if (form[0][i]['tagName'] == 'INPUT' || form[0][i]['tagName'] == 'TEXTAREA' || form[0][i]['tagName'] == 'SELECT') {
if (form[0][i]['type'] !== 'reset' &... |
module.exports = function(db){
console.log(db);
}; |
let userName;
let userAge;
let userSurname;
let newUser;
let shoppingList;
let userOnline;
let userSalary;
let cursorCoordinates;
console.log('Hello world');
userName = 'Kazimir94';
console.log('userName' , userName);
const userAdress = 'UA';
console.log('useruserAdress' , userAdress); |
/*
Given an array of integers.
Find maximum product obtained from multiplying 2 adjacent numbers.
Notes:
Array will contain at least 2 elements.
Aarray may contain positive/negative numbers and zeroes.
Input >> Output Examples
adjacentElementsProduct([1,2,3]) ==> return 6
Explanation:
Max product obtained from m... |
$(function() {
$("#modal-recipeNotes").focus(function(event) {
// Erase text from inside textarea
$(this).text("");
// Disable text erase
$(this).unbind(event);
});
});
$('#btnSaveRecipe').click(function(e) {
e.preventDefault();
let title = $('#title').tex... |
'use strict';
var ghpages = require('gh-pages'),
path = require('path');
ghpages.publish(
path.join(__dirname, 'src'), {
dotfiles: true,
message: 'Auto-generated commit'
},
function(err) {
if (err) {
throw err;
} else {
console.log('Site has been deployed!');
}
}
);
|
const readline = require('readline')
const input = readline.createInterface(process.stdin)
console.log("Загадано число в диапазоне от 0 до 100")
let rnd = Math.floor(Math.random()*(100+1)) // случайное число
input.on('line', (data) =>
{
if (data>rnd) {console.log("Больше")}
if (data<rnd) {console.log("Меньше... |
//функция создание астероида
function creatureAsteroid() {
//создаем элемент div
asteroid = document.createElement("div");
//присвамваем ему класс asteroid для задания свойств css
asteroid.className = "asteroid";
//добавляем на поле
full.appendChild(asteroid);
}
//функция определения количества... |
import './App.css';
import Roller from './components/Roller/Roller'
function App() {
return (
<div className="App">
<Roller />
</div>
);
}
export default App;
|
// Require mongoose package
const mongoose = require('mongoose');
//Define RecipeSchema
const RecipeSchema = new mongoose.Schema({
name: {
type: String,
trim: true
},
ingredients: {
type: String,
trim: true
},
description: {
type: String,
trim: true
}
}, {
timestamps: {
create... |
angular.module("internship").directive("unorderedList", function() {
return function(scope, element, attrs) {
var data = scope[attrs["unorderedList"]];
var propertyName = attrs["listProperty"];
if (angular.isArray(data)) {
var listElem = angular.element("<ul>");
ele... |
export { default as sayHello } from './components/sayHello'
|
/* eslint-disable react/prefer-stateless-function */
import React, { Component } from 'react';
import { Container, Row, Col } from 'reactstrap';
import { connect } from 'react-redux';
import ScrollAnimation from 'react-animate-on-scroll';
import colors from '../config';
import '../App.css';
const email = 'anto.sauva... |
import React,{Component} from 'react'
import ButtonBox from '../../../shareComponent/ButtonBox'
export default class AddGroupModal extends Component {
addMoreGroupConfirm = () =>{
const value = this.refs.groups.value
const {addMoreGroupConfirm} = this.props
addMoreGroupConfirm(value)
}
... |
$(function($){
templateLoader.loadRemoteTemplate("ab-variation", "/templates/ab-variation.html", function(data){
new Views.ABExperimentView();
});
});
|
import React, { Component } from 'react';
import { Segment,
Grid, Icon, Divider } from 'semantic-ui-react'
import { CardComponent,
StatisticComponent,
ContentComponent,
ItemComponent } from 'components';
class MainContainer extends Component {
constructor(p... |
const posts = [
{title: 'Post One', body: 'Post one body'},
{title: 'Post Two', body: 'Post two body'}
];
//* ============= Synchronous way
// const createPost = (post) => {
// setTimeout(() =>{
// posts.push(post);
// },2000);
// };
// const getPosts = () => {
// setTimeout(() => {
// ... |
var makeQueue = function(){
// Hey! Copy your code from src/functional/queue.js and paste it here
var instance = Object.create(queueMethods);
// Use an object with numeric keys to store values
instance._storage = {};
instance._size = 0;
// Implement the methods below
return instance;
};
var queueMetho... |
import EmberObject from '@ember/object';
import Component from '@ember/component';
import { A } from '@ember/array';
import { resolve, reject } from 'rsvp';
import { module } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render, click, fillIn, triggerKeyEvent, triggerEvent, waitFor, waitUntil... |
// mw {name:'', opt: {}, middleware: () => {}}
class MiddlewareChain {
constructor(mw) {
this.mw = mw
}
_indexOf(name) {
for (let index = 0; index < this.mw.length; index++) {
if(name === this.mw[index].name) {
return index
}
}
return -1
}
value() {
return this.mw
}
getMiddlewares() {
retu... |
import React from "react";
import Logo from "./img/índice.jpg";
import MisionTic from "./img/logoMisionTic2022UdeA.png";
function FooterComponent() {
return (
<footer>
<div class="container-fluid">
<div class="row">
<div class="col">
<i... |
var dbparse = require('./dbparser');
/**
* Testing
**/
// removeUser('Patrick');
var patrick = {
username: "Patrick",
password: "Test",
location: "Oakland",
email: "Pavtran2@gmail.com"
}
// console.log(patrick);
// addUser(patrick);
var talents = {
'Piano': 5,
'Guitar': 7,
'Trumpet': 5
}
// User.fin... |
const axios = require('axios');
const fs = require('fs');
(async () => {
const url = 'https://iam.cloud.ibm.com/identity/token';
const params = new URLSearchParams();
params.append('grant_type', 'urn:ibm:params:oauth:grant-type:apikey');
params.append('apikey', process.env.OW_IAM_NAMESPACE_API_KEY);
const ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.