text stringlengths 7 3.69M |
|---|
export default {
blogTitle : "Hablando Con Máquinas",
blogDescription : "Blog personal sobre informática y programación",
authorName : "Jonay Godoy",
social_networks: {
twitter: "https://twitter.com/godoyjonay",
github: "https://github.com/jonayGodoy"
},
linkPrefix : "/hablan... |
var column_num;
var row_num;
var environmentNameValue;
$(document).ready(function(){
$("#myTable td").click(function() {
if (typeof environmentNameValue == "undefined" || environmentNameValue == null || environmentNameValue==""){
$( "#addEnvErrorMsg" ).html("Please configure environment first!")... |
var searchData=
[
['state_5ftype_0',['state_type',['../classAIFriendOfStatefulTask.html#a5ec41fa75a5eda7923dc635a97e7b707',1,'AIFriendOfStatefulTask::state_type()'],['../classAIStatefulTask.html#a5bdb546808c3ff5820246f45b8a54973',1,'AIStatefulTask::state_type()']]]
];
|
function getBuildBody(project,organization,azurePipelineId){
return({
"triggers": [
{
"branchFilters": [
"+refs/heads/master"
],
"pathFilters": [],
"batchChanges": false,
"maxConcurrentBuildsPerBr... |
import React, { memo } from "react";
// grid
import { AgGridReact } from "ag-grid-react";
const RowDragging = () => {
return (
<div
className="ag-theme-balham"
style={{ height: "500px", width: "750px" }}
>
<AgGridReact />
</div>
);
};
export default memo(RowDragging);
|
$(".cate-title").click(function () {
$(".cate-list").stop().slideToggle();
});
$(".lt-menu").click(function () {
$(".lt-aside").toggleClass("lt-out");
$(".main-head,body").toggleClass("pl-180");
});
$(".login-out").click(function () {
$.ajax({
type: "GET",
url: "/employee/employeeLogout",
... |
const Generator = require('yeoman-generator');
const yosay = require('yosay');
const chalk = require('chalk');
module.exports = class extends Generator {
constructor(args, opts) {
super(args, opts);
this.hasBeenRecordedInFidjOvh = true;
this.templateName = 'app2021'; //'app2021'; //'app2018' ''ionic2020... |
import React, { Component } from 'react';
import './App.css';
import Button from './components/Button';
import DogFigure from './containers/DogFigure';
import ADJECTIVES from './data';
class App extends Component {
state = {
dogURL: null,
mediaType: null,
caption: 'Finding doggos.',
};... |
import styled from "styled-components";
export const StyledLanding = styled.div`
height: 100vh;
background: url(require("../resources/mohammad-metri-421904-unsplash.jpg"));
background-size: cover;
background-repeat: no-repeat;
`;
|
const replace = (content, regexp, callback) => {
let result = content;
let match, matchValues = [];
while(match = regexp.exec(content)) {
const { index } = match;
[ old ] = match; length = old.length;
const replacement = callback(null, match);
matchValues.unshift({ index, length, replacement })
}
matchValu... |
(function(){
var cssClasses = ["cke-index-primary", "cke-index-secondary", "cke-index-tertiary", "cke-index-reference"];
var defaultText = ["primary", "secondary", "tertiay", "see ..."];
IndexTermManager = function(){
this.indexterms = {};
this.termCount = 0;
this.globalVisibility ... |
define(function(require) {
var $ = require('jquery');
var HTTP = require('http');
var uploadButton = document.getElementById('upload');
var data = {};
function readData(event) {
var files = event.target.files;
if (files && (window.File && window.FileReader && window.FileList && window.Blob)) {
for ... |
'use strict';
var unsatisfiedRequirement = {
};
function insertRequires(instance, requireArray) {
for (var i = 0; i < requireArray.length; i++) {
if (!instance._components[requireArray[i]]) {
instance._components[requireArray[i]] = unsatisfiedRequirement;
}
}
}
function insertPro... |
lolDmgApp.directive('matchInfo', function(){
return {
restrict: 'E',
templateUrl: '/templates/pages/match/index.html'
};
});
lolDmgApp.directive('matchChampions', function(){
return {
restrict: 'E',
templateUrl: '/templates/pages/match/matchChampions.html'
};
});
lolDmgApp.directive('matchVsLi... |
import React, { Component } from 'react';
import Search from './Search';
import { contacts, getContactes} from '../Service/DataService';
class Home extends Component {
constructor(props) {
super(props);
this.state = {}
}
render() {
return (
<div className="container d1" ... |
//**** TAREAS DE ALUMNOS ****//
$("#alumno-tareas").on("click", function(){
$(".loader").css("display", "block");
// Cargamos tras el inicio de la página todas las tareas a realizar por el usuario.
$.ajax({
type: "POST",
dataType: "json",
async: false,
url: "../../Ver_tareas",
succes... |
require('!style!css!dc/web/css/dc.min.css');
var dc = require('dc');
var d3 = require('d3');
var crossfilter = require('crossfilter');
var DataTransformer = require('./data.transformer.js');
var TitleHoldVolumeChart = require('./titlechart.js');
var LibraryHoldChart = require('./librarychart.js');
var HoldVolumeChar... |
/**
* Created by ssanchez on 28/03/16.
*/
var gulp = require('gulp'),
sass = require('gulp-sass'),
cleancss = require('gulp-clean-css'),
uglify = require('gulp-uglifyjs');
gulp.task('css', function () {
return gulp
.src('./statics/css/*.scss')
.pipe(sass().on('error', sass.logError))
... |
/**
* Created by Administrator on 2017/4/4.
*/
angular.module("turnPage")
.directive("turnPageNum",function () {
return{
restrict:"ACE",
replace:true,
templateUrl:'../turnPage/turnPage_template.html',
controller:['$scope','$routeParams','$http','allActivity'... |
/*
* grunt-tight-sprite
* https://github.com/uhop/grunt-tight-sprite
*
* Copyright (c) 2013 Eugene Lazutkin
* Licensed under the New BSD license.
*/
"use strict";
var iconPath = "tests/icons/";
module.exports = function(grunt) {
grunt.initConfig({
tight_sprite: {
sprite1: {
options: {
hide: icon... |
const leagueKey = '?api_key=' + Config.leagueKey;
const request = require('request');
const requestError = new Error('There is something wrong with your request. Check your spelling or try again later.');
const serverError = new Error('There was a server error in processing your request. Try again later.');
exports.g... |
var express = require('express');
var app = express();
var isMobile = require('cloud/utils/mobile-detection');
app.set('views','cloud/views');
app.set('view engine', 'ejs');
app.use(express.bodyParser());
app.get('/', function(req, res) {
if (isMobile(req)) {
res.render('index');
} else {
res.render('inde... |
/*
VUEX Data Store.
Copyright (c) 2019. Scott Henshaw, Kibble Online Inc. All Rights Reserved.
*/
import Vue from 'vue'
import Vuex from 'vuex'
import TelemetryRecord from '@/../lib/TelemetryRecord';
import Connection from '@/../lib/Connection'
Vue.use( Vuex )
const cloud = new Connection()
// Modules
// Store with ... |
import React from 'react';
import SliderItem from '../SliderItem/SliderItem'
const Slider = () => {
return(
<div className="features-slider_items">
<SliderItem bgImage={'1.svg'} label={'Первое целевое преимущество'}/>
<SliderItem bgImage={'2.svg'} label={'Второе целевое преимущество'}/>
... |
const { req } = require('../../framework/index.js');
const typeMap = {
COMMON: 'common',
BLACKLIST: 'blacklist',
ATTENDANCE: 'attendance',
};
const getList = (data) => {
const {
type, cid, pid, codes,
superAdmin, companySuperAdmin,
page, size, attendanceGroupId,
} = data;
if (type === typeMap.... |
import { render } from '@testing-library/react';
import Display from './display';
describe('Display', () => {
it('should render successfully', () => {
const { baseElement } = render(<Display />);
expect(baseElement).toBeTruthy();
});
});
|
const MongoClient = require('mongodb').MongoClient;
const ObjectID = require('mongodb').ObjectID;
const config = require('../config.json');
const errors = require('../errors.json');
const logger = require('../utils/logger');
const connect = () => {
return new Promise((resolve, reject) => {
MongoClient.conn... |
Discourse.KbFilterSetView = Discourse.View.extend({
templateName: 'javascripts/diaedu/templates/filter_set',
// handle clicks on checkboxes
click: function(e) {
// send an event to the router if the click was on a checkbox
if ($(e.target).is('.ember-checkbox'))
this.get('controller').send('filterCh... |
import React from 'react'
import {
View,
Text,
StyleSheet,
TouchableOpacity,
TextInput,
} from 'react-native'
import { SearchBar } from 'react-native-elements'
import { Ionicons } from '@expo/vector-icons';
import Searchbar from './SearchBar'
const Header = ({ navigation }) => {
return (
... |
// JavaScript Document
// Preload Functions for Dreamweaver
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.le... |
const MULTIPLIER = 1;
const CURSOR_PX = 32;
let currentPosX = 0;
let currentPosY = 0;
let screenOffset = 0;
let textMatrix = [];
function init() {
//TODO Handle different resolution from 320*200 to 1280*800
document.addEventListener("keydown", handleKey);
writeStartupScreen();
}
function handleKey(event) ... |
Trello.Views.CardShow = Backbone.CompositeView.extend({
template: JST['card_show'],
events: {
'click .remove-card-button': 'removeCard',
'click .new-card-button': 'addCard'
},
tagName: 'li',
addCard: function () {
},
initialize: function (options) {
this.listenTo(this.model,"sync",this.r... |
/**
* Created by nisabhar on 3/14/2016.
*/
define(['ojs/ojcore', 'knockout', 'pcs/startform/services/startformDataService', 'pcs/util/pcsUtil', 'pcs/pcsform/pcsFormUtil' ,'ojs/ojknockout', 'ojs/ojdialog',
'ojs/ojbutton', 'pcs/pcs.attachments', 'ojL10n!pcs/resources/nls/pcsSnippetsResource'
],
functi... |
$(function(){
$(".bg-slogo>div").click(function(){
$(".leftimg").addClass("pc-img");
$(".weichat-login").addClass("pc-login");
$(".chform").hide();
$(".change").show();
})
})
|
/* global PassThroughNode, extend */
var Looper = function(audiolet) {
"use strict";
PassThroughNode.call(this, audiolet, 1, 1);
this.linkNumberOfOutputChannels(0, 0);
this.time = 0;
this.seconds = 0;
this.beatLength = 0;
this.lastBeatTime = 0;
this.callback = false;
};
extend(Loope... |
function wait(ms) {
var d = new Date();
var d2 = null;
do { d2 = new Date(); }
while (d2 - d < ms);
}
function tweenQuadOut(t, b, c, d) { //QUADRATIC EASE OUT
t = t / d;
value = -1 * c * t * (t - 2) + b;
return value;
}
function tweenLinear(t, b, c, d) { //LINEAR EASE
value = c * t /... |
console.log("I have crippiling zestpression");
M.AutoInit();
var userDrinkForm = $("#alchiSearch");
var userFoodForm = $("#foodSearch");
var userFoodInput = $("#userFoodInput");
var userDrinkInput = $("#userDrinkInput");
var zestME = $("#zestME");
var foodFave = JSON.parse(localStorage.getItem("foodFave")) || [];
var ... |
import { h, app } from "hyperapp"
/** @jsx h */
const toWords = number => {
const wordIndex = {
0: 'zero', 1: 'one', 2: 'two', 3: 'three', 4: 'four',
5: 'five', 6: 'six', 7: 'seven', 8: 'eight', 9: 'nine',
10: 'ten', 11: 'eleven', 12: 'twelve', 13: 'thirteen', 14: 'fourteen',
15: 'fifteen', 16: 'sixt... |
import React from 'react';
import { useTranslation } from 'react-i18next';
const App1 = () => {
const {t} = useTranslation();
return (
<div>
{t('Hi', {firstName:'sumit', lastName:'kumar'})}
</div>
);
}
export default App1;
|
export const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
export const daysNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
export const renderMinutes = minutes => {
if (/^\d$/.test(min... |
// Naming
// node - HTML Node
// component - class, function or object which can be used to create HTML node(s)
// componentObject - what a class or function component renders, is used to create the HTML node
var framework = (() => {
const nodes = {};
const definedComponentProps = new Set(['type', 'text', 'childre... |
// Keep all classes in one file to increase page speed by optimizing http requests
class ExcerciseContent {
constructor(id = 0, content = "", answers = [], correct = "", type = 1) {
this.id = id;
this.content = content;
this.answers = answers;
this.correct = correct;
this.ty... |
import React, { Component } from 'react';
import { Form } from 'antd';
import Input from 'sub-antd/lib/input';
import Checkbox from 'sub-antd/lib/checkbox';
import Radio from 'sub-antd/lib/radio';
import message from 'sub-antd/lib/message';
import axios from 'axios';
import Cookies from 'js-cookie';
import { type, scop... |
import React, { Component, PropTypes } from 'react';
import Signup from '../components/auth/Signup';
export default class SignupPage extends Component {
render() {
const { register, login, loadLocale, pushState } = this.props.children;
return (
<div id="SignupPage">
Please Signup:
<Sign... |
console.log('running pets.js')
const speciesCells = document.querySelectorAll('.species')
// console.log(speciesCells)
// Need to add an event listener to each cell
// individually; can't just say speciesCells.addEventListener
speciesCells.forEach((cell) => {
cell.addEventListener('mouseover', (event) => {
even... |
import { splitStartupRedux } from 'utils/WebpackSplit';
const startup = function(element){
import('mgmt/Dashboard/containers/Root').then((Component) => {
import('mgmt/Dashboard/store/configureStore').then((store) => {
splitStartupRedux(element, Component.default, store.default);
});
... |
const redis = require("redis")
const REDIS_PORT = process.env.REDIS_PORT || 6379
const client = redis.createClient(REDIS_PORT)
client
.once("connect", () => {
console.log(`redis connected on port ${process.env.REDIS_PORT}`)
})
.on("error", (error) => {
console.error(error)
})
module.exports = {
cli... |
// import Adonais from './Adonais'
// import Parallax from './Parallax'
// import Feature from './Feature'
// import Sky from './Sky'
export { default as Pages } from './Menu'
export const Figure = ({ img, alt, children }) => {
return <p className="Figure">
<img src={img} alt={alt}/><br/>
{children}
</p>
... |
'use strict';
module.exports = function (GroupPermissionsUsers) {
var groupController = require('../../server/lvr/groupPermissionsUsers/server-groupPermissionsUsers.js');
GroupPermissionsUsers.recoverPassword = function (values, cb) {
var app = GroupPermissionsUsers.app;
var... |
/**
* Created by lawrence on 08/01/2018.
*/
|
/**
* 我的/系统消息
*/
import React, { Component, PureComponent } from 'react';
import {
StyleSheet,
Dimensions,
View,
Text,
Button,
TouchableHighlight,
Image,
TouchableOpacity,
ScrollView,
Platform,
} from 'react-native';
import { connect } from 'rn-dva';
import moment from 'moment';
import Header f... |
angular
.module('SFsecrets', [
'ngRoute',
'satellizer',
'uiGmapgoogle-maps'
])
.controller('MainController', MainController)
.controller('SecretsIndexController', SecretsIndexController)
.controller('SecretsNewController', SecretsNewController)
.controller('SecretsShowController', SecretsShowCon... |
(function (w, $) {
'use strict';
var baseUrl = $('base').attr('href');
var form = $('#form');
selectPosition();
form.on('submit', saveData);
function saveData(event) {
event.preventDefault();
var formData = form.serializeArray();
$.ajax({
method: 'POST',
... |
const {ObjectID} = require('mongodb');
global.resolvers = {
Cohort: async ({cohortId}, data, {mongo: {Cohorts}}) => {
return await Cohorts.findOne({_id: new ObjectID(cohortId)});
},
}
|
var sql = require("mssql");
var {failureResponseBody,successResponseBody} = require('../../helpers/response')
var {sendMailToReceipt} = require('./sendingMail')
var {newTicketMatrix,sqlParametersforSP} = require('./responseMatrix')
var routeMapping = require('../../helpers/matrix.json')
async function createTicket(r... |
import React, { Component, useState } from "react";
import PropTypes from "prop-types";
const GenericInput = ({ error, isFocused, ...restProps }) => (
<>
<input
id="input"
{...restProps}
style={error && isFocused ? { background: "red" } : {}}
/>
{error && isFocused && <label htmlFor="in... |
import React, { Component } from 'react';
import { StyleSheet, ScrollView, View, Alert, Text, Button, TouchableOpacity } from 'react-native';
import { List, ListItem, Icon, Badge } from 'react-native-elements';
import {
AdMobBanner,
} from 'react-native-admob';
import { practice } from '../data/RC1/lesson1';
import... |
var panelTpl = require('../../tpl/articles/panel.html')
var menuTpl = require('../../tpl/articles/menu.html')
var data = {
button: null,
sections: [],
articles: null
}
function init(){
// 底部菜单
$(".m-footer-nav .item").click(function(e){
e.stopPropagation();
$(this).children("div").show();
$(this).sibli... |
class Car {
constructor(x, y) {
this.x = x;
this.y = y;
this.canvas = document.getElementById('my-canvas');
this.ctx = this.canvas.getContext('2d');
this.width = 50;
this.height = 50;
this.img = new Image(this.width, this.height);
this.img.src = 'image... |
function convert(x)
{
//converting
return x*60;
}
console.log(convert(5)+ ' seconds');
console.log(convert(3)+ ' seconds');
console.log(convert(2)+ ' seconds'); |
var Cloudant = require('cloudant');
var acc = 'e7de31b0-4208-46f8-b8ff-dac1114bdf91-bluemix';
var id = 'catignitimentselledirlyd';
var pass = 'tFk3A37NLPFLClbcMNe7QPCa';
var HOUSE_LOAN_INTEREST = 0.02,
CONSUMPTION_LOAN_INTEREST = 0.15,
DEPOSIT_INTEREST = 0.015;
// exports.getCustomer = function(id, successCallbac... |
import React, { useState, useEffect } from 'react';
import Menu from './components/Menu.js';
import Categories from './components/Categories.js';
import Data from './components/Data.js';
const allUniqueCategories = ['all', ...new Set(Data.map(item => item.category))];
function App() {
const [items, setItems] = useSt... |
import {getProtocol} from './Tool';
const delay = ({url, timeout}) => {
return new Promise((resolve, reject) => {
setTimeout(() => reject(url + '请求超时'), timeout * 1000)
})
}
const get = ({url, params = {}, headers = {}, timeout = 8}) => {
const paramArr = []
if (Object.keys(params).length !== ... |
import React,{Component} from 'react';
import {connect} from 'react-redux'
import { Table, Button ,Breadcrumb, BreadcrumbItem , Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import {increase2,setzero,deletePro,changeQ} from '../actions'
const mapStateToProps = (state)=>{
return {
carts... |
/*
*
* 文件名称:Description.js
* 摘 要:單一商品修改和新增 描述頁面
*
*/
var PRODUCT_ID = '', OLD_PRODUCT_ID = '';
Ext.onReady(function () {
var frm = Ext.create('Ext.form.Panel', {
id: 'frm',
layout: 'anchor',
defaults: { anchor: "95%", msgTarget: "side", labelWidth: 130 },
border: false... |
import React from 'react';
import {
Text,
View,
Image,
StyleSheet
} from 'react-native';
const Header = () => {
return (
<View style={styles.container}>
<Image
style={styles.logo}
source={require('../assets/icons/baseline_insights_black_24dp.png')}/>
<Text style={style... |
/*
Copyright 2016-2018 Stratumn SAS. 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 applicable l... |
/**
* data module
* @author Markus J Doetsch mdular.com
*/
/* global app:true */
app.registerModule('data', function () {
"use strict";
var url = 'http://localhost:8888/',
id;
var init = function () {
var frameId = document.querySelector('#frameId');
frameId.addEventListener('c... |
import React from "react";
import {Form, Input, Button, Checkbox, message} from 'antd';
import axios from 'axios';
const layout = {
labelCol: {
span: 8,
},
wrapperCol: {
span: 16,
},
};
const tailLayout = {
wrapperCol: {
offset: 8,
span: 16,
},
};
class signup e... |
/* eslint-disable no-restricted-syntax */
/* eslint-disable no-plusplus */
const ROW_NUM = 8;
const COL_NUM = 10;
class TableInsert {
constructor() {
this.tds = [];
this.title = null;
const update = this.update.bind(this);
this.activeIndex = new Proxy(
{},
{
set(obj, prop, value) ... |
//Javascript function to get which item is selected from the dropdown menu
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
|
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsHouseSiding = {
name: 'house_siding',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 12h3L12 3 2 12h3v8h2v-2h10v2h2v-8zM7.21 10h9.58l.21.19V12H7v-1.81l.21-.19zm7.36-2H9.43L12 5.69 14.57 8zM7 16v-2h10v2H7z"/></svg>... |
import React from "react";
import ReactDOM from "react-dom";
import DataTable from "./dataTable.js";
import "semantic-ui-css/semantic.min.css";
import { Container, Segment } from "semantic-ui-react";
var people = [
{ id: "1", name: "Michael", age: "26", gender: "Male" },
{ id: "2", name: "Maria", age: "32", gend... |
import React, {Component} from 'react';
import Details from './Details';
class ProfessionPropositions extends Component {
render() {
let isPropSelected = (prop) => {
return prop.id === this.props.selectedProfessionProposition.id;
};
let getPropositionList = this.props.professionPropositions.map((p... |
var searchData=
[
['jack_5fdescription_5ft_453',['jack_description_t',['../structjack__description__t.html',1,'']]],
['jack_5fposition_5ft_454',['jack_position_t',['../structjack__position__t.html',1,'']]],
['jack_5fproperty_5ft_455',['jack_property_t',['../structjack__property__t.html',1,'']]],
['jack_5fringbu... |
(function() {
'use strict';
angular
.module('acmeApp')
.controller('AnsweredQuestionnaireDialogController', AnsweredQuestionnaireDialogController);
AnsweredQuestionnaireDialogController.$inject = ['$timeout', '$scope', '$stateParams', '$uibModalInstance', 'entity', 'AnsweredQuestionnaire',... |
import React from 'react'
import {mount} from '@shopify/react-testing'
import Blog from '../'
import PostBlurb from "../../PostBlurb/PostBlurb"
import '@shopify/react-testing/matchers';
describe('<Blog />', () => {
it('has 3 PostBlurb components', () => {
const wrapper = mount(<Blog />);
expect(wrapper).toCo... |
import React from "react";
import Button from "@material-ui/core/Button";
import CssBaseline from "@material-ui/core/CssBaseline";
import TextField from "@material-ui/core/TextField";
import Link from "@material-ui/core/Link";
import Grid from "@material-ui/core/Grid";
import Typography from "@material-ui/core/Typograp... |
// 最新音乐相关API
import { request, requestWithoutLoading } from './axios'
const API = '/netease-api'
// 最新音乐首页列表
export const getTopSongs = (type) => request.get(API + `/top/song?type=${type}`)
// 相似音乐
export const getSimiSongs = (id, option) =>
requestWithoutLoading.get(API + `/simi/song?id=${id}`, option)
// 获取歌词
e... |
import appErrors from '../../utils/applicationErrors';
/**
*
* @param {EntityType} entity
* @return {function(action:ActionType): function(...[*]=)}
*/
export default (entity) => {
return (action) => {
return (req, res, next) => {
try {
next( new appErrors.ForbiddenError() );
} catch (e)... |
module.exports = function(app) {
var task = require('./controller');
app.route('/')
.get(task.return_entry);
app.route('/index')
.get(task.return_homepage);
app.route('/contact')
.get(task.return_contact);
app.route('/about')
.get(task.return_about);
... |
import React, {Component} from 'react';
import {inject, observer} from 'mobx-react';
import './profile.css';
class ProfileMenu extends Component {
constructor() {
super();
this._handleLogout = this._handleLogout.bind(this);
}
_handleLogout() {
const {_auth_, onClose} = this.prop... |
import React from 'react';
import './categories.css'
const Categories = ({list}) => {
return (
<div className='column column-categories'>
<h2 className='subtitle'>Categorías</h2>
{
list && list.categories && list.categories.map((cat) => (
... |
module.exports = (function(){
var express = require('express'),
bodyParser = require('body-parser'),
path = require("path");
var app = new express();
routerList = {};
app.use("/css", express.static("views/css"));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({extended: false}));
... |
'use strict'
const CONTENT_TYPE_HEADER = 'content-type'
/**
* The friendly 'res.send' method
* No comments needed ;)
*/
module.exports.send = (options, req, res) => (data = 200, code = 200, headers = null, cb = () => {}) => {
if (headers !== null) {
Object.keys(headers).forEach((key) => {
res.setHeader... |
import React, { Component } from 'react';
import cognitiva from './../../../assets/img/cognitiva-logo.svg';
import cariola from './../../../assets/img/cariola-logo.svg';
import logo from './../../../assets/img/lexnova-logo.svg';
import Notification from './../../../components/Notification';
class Recover extends Com... |
/**
* Created by waf on 11/4/15.
*/
//main.js
require.config({
paths: {
//libs
jquery: "node_modules/jquery/dist/jquery",
move : "lib/move/move.min"
}
});
//Activate app
requirejs(['js/main']); |
const Discord = require('discord.js');
const client = new Discord.Client();
const prefix = '.'
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
client.user.setGame(`.help | .inv | ${client.guilds.size} Servers `,"http://twitch.tv/iMericPvP")
console.log('')
console.log('')
console.lo... |
import { Component } from "../component";
export class Day extends Component {
constructor(parentSelector, tagName, className, dayName = " ", dayNumber = " ", color) {
super(parentSelector, tagName, className);
this.dayName = dayName;
this.dayNumber = dayNumber;
this.weekend = false;
this.vacatio... |
export function countsAsAYes(input) {
return (input[0] === 'y' || input[0] === 'Y');
} |
'use strict';
var should = require('should'),
mongoose = require('mongoose'),
Toon = require('../models/toon');
var toon;
mongoose.connect('mongodb://localhost/tooner-test');
describe('Toon Model Unit Tests:', function() {
beforeEach(function(done) {
toon = new Toon({
buildTitle: 'Toon Title',
... |
const jwt = require('jsonwebtoken');
const redis = require("redis");
function readAppel(req, res) {
if (req.session.logged) {
const token = req.header('Authorization').replace('Bearer ', '');
try {
const payload = jwt.verify(token, process.env.JWT_SECRET)
console.log(paylo... |
// @flow
import { combineReducers } from 'redux';
import { handleActions } from 'redux-actions';
import _ from 'lodash';
import * as actions from '../actions';
import type { Pokemon, PokemonNames, ComparablePokemon } from '../types/pokemons';
const pokemonNamesFetchingState = handleActions({
[actions.fetchPokemonNa... |
import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import { getUserInfo, getPersonalInfo } from '@common/api';
import Nav from '../../components/nav/index';
import UserInfos from './components/userInfos/index';
import FavoriteList from './components/favoriteList/index';
import Foot... |
const mathLibrary = {
calculateProduct(...rest) {
console.log("please use the multiply method instead");
console.log(
this.multiply(...rest)
);
return this.multiply(...rest);
},
multiply(a,b) {
return a*b;
}
};
const result = mathLibrary.calculateProduct(2,3);
|
import React from "react";
import PropTypes from "prop-types";
import ReactSVG from 'react-svg'
import styles from "./styles.module.scss";
import {
Grid,
Image,
} from "semantic-ui-react";
import _ from "lodash";
import ModelInfoModal from "./../ModelInfoModal";
import { TABLE_TYPE, COUNTRY } from "../../conf... |
import { Container, Row, Col } from 'reactstrap';
import style from './priceComparisonTable.scss';
export default () => (
<div className="priceComparisonTable">
<Container>
<Row className="pctHeader align-items-center">
<Col md={{ size: 3, offset: 6 }} xs={6} sm={6} className="pcTableLogo">
... |
(function(w) {
'use strict';
var $document = w.document.documentElement,
objects = [],
$body = w.document.getElementsByTagName('body')[0],
screenHeight = 0,
updateScreenHeight = function() {
screenHeight = w.innerHeight || $document.clientHeight || $body.clientHeight... |
import { Book } from '../model/book.js';
export const addBook = async (req, res) => {
const { title, author, publishedYear } = req.body
try {
const newBook = new Book({
title,
author,
publishedYear
})
const dbResponse = await newBook.save()
... |
import React, { useContext, useState } from 'react';
import {
Text,
View,
TouchableWithoutFeedback,
Keyboard,
KeyboardAvoidingView
} from 'react-native';
import { Button, Snackbar } from 'react-native-paper';
import firebase from './config';
import { AppContext } from './AppContext';
import Input from './Inpu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.