text stringlengths 7 3.69M |
|---|
import { extend } from '../../core/utils/extend';
import { Component } from '../../core/component';
import DataHelperMixin from '../../data_helper';
var ItemsOptionBase = Component.inherit({}).include(DataHelperMixin);
class ItemsOption extends ItemsOptionBase {
constructor(diagramWidget) {
super();
this._di... |
/**
* This is a basic gulpfile showing a configuration for creating a build process
* that copies assets to a build folder, converts html templates into js, and
* places them in the template cache of a module. In this example, we tell
* gulp-ng-html2js to use a module with the same name as our main module which
* ... |
import React, {useState, useEffect} from 'react'
import { Table } from 'react-bootstrap'
import { formatNearAmount } from "near-api-js/lib/utils/format";
import tokenIcon from './tokenIcon'
import { coinList } from './Dash'
const Account = ({contract, accountId, ausdContract}) => {
const _coinList = coinList.filt... |
const Header = ({ header }) => {
return (
<div className="container">
<h1 className="display-4 fst-italic">{header}</h1>
<hr />
</div>
);
};
export default Header;
|
import React, { useEffect, useState } from 'react'
import DoneOutlineIcon from '@material-ui/icons/DoneOutline';
import { Avatar } from '@material-ui/core'
import CancelIcon from '@material-ui/icons/Cancel';
import db from "../../Firebase"
import { useStateValue } from "../../StateReducer/StateProvider"
import firebase... |
module.exports.RikkiTikkiAPI = module.parent.exports.RikkiTikkiAPI || module.parent.exports;
module.exports = require('./lib'); |
const devConfig = {
API_URL: 'API_URL'
}
const prodConfig = {
API_URL: 'API_URL'
}
export default __DEV__ ? devConfig : prodConfig |
const fs = require("fs");
const util = require("util");
const axios = require("axios");
const inquirer = require("inquirer");
const generateMarkdown = require('./generateMarkdown');
const questions = [
"Project title",
"Project Description"
];
function writeToFile(fileName, data) {
const markdown = generateMark... |
import './side_nav.html';
import { Meteor } from 'meteor/meteor';
import { ReactiveDict } from 'meteor/reactive-dict'
import { Template } from 'meteor/templating';
import { FlowRouter } from 'meteor/kadira:flow-router';
Template.side_nav.onCreated(function () {
this.state = new ReactiveDict;
const current = FlowRo... |
document.getElementById('startGame').onclick = function() {
var iframe = document.createElement('iframe');
var container = document.getElementById('gameContainer');
iframe.id = "gameBox";
iframe.src = 'game.html';
container.appendChild(iframe);
this.style.display = "none";
};
... |
import * as React from "react";
export default class EditProjectForm extends React.Component {
render() {
// const { project, loading } = this.props;
return(
<form action="/">
<div className="edit-group">
<div className="form-input-flex edit edit-form"... |
var DeviceModel = Backbone.Model.extend({
defaults: {
tag: "ๅ
จ้จๆฑๆป"
},
render :function(attributes){
var temp = "";
if(this.attributes[attributes.tag + "_low_ratio"]){
temp += "<td style='background:" + attributes.colors + "'>"
temp += "<span>{{" + attributes.t... |
let blog="Azul web"
let nombre="Isabel"
console.log("Hola "+nombre+" bienvenida a: "+blog) |
/*
* Write a function that generates every sequence of throws a single
* player could throw over a n-round game of rock-paper-scissors.
*/
var rockPaperScissors = function(n, combos){
combos = combos || [[]];
if(n < 1) { return combos; }
var choices = [['rock'], ['paper'], ['scissors']];
var current = [];
... |
var firebaseConfig = {
apiKey: "AIzaSyC_Dzph-_yI-iTTMz4SYz6Xnoe9ZcKcJ3E",
authDomain: "project-name-d329b.firebaseapp.com",
databaseURL: "https://project-name-d329b.firebaseio.com",
projectId: "project-name-d329b",
storageBucket: "project-name-d329b.appspot.com",
messagingSenderId: "8040... |
function conquer(x,y){
if (waiting)
return;
socket.emit("conquer", {x: x, y:y});
document.getElementById("status").innerHTML = "Recovering...";
document.getElementById("status").style.color = "red";
waiting = true;
setTimeout(function(){
document.getElementById("status").innerHTML = "Ready";
document.getEle... |
import React, { createContext, useState, useMemo } from "react";
import * as Space from "react-spaces";
import { Switch, Route, Redirect, Link } from "react-router-dom";
import { ReportDashboard } from "./ReportDashboard";
import { ReportCapability } from "./ReportCapability";
import { ReportDepartment } from ".... |
#!/usr/bin/env node
'use strict';
var readline = require('readline');
var async = require('async');
var gumyen = require('gumyen');
var writeUTF16 = require('./util').writeUTF16;
function main(args) {
var fs = require('fs-extra');
var path = require('path');
var config = require(path.join(process.cwd(), 'plgc... |
OC.L10N.register(
"lib",
{
"today" : "แแฆแแก",
"yesterday" : "แแฃแจแแ",
"last month" : "แแแกแฃแ แแแแจแ",
"last year" : "แแแแ แฌแแแก",
"seconds ago" : "แฌแแแแก แฌแแ",
"None" : "แแ แ",
"Username" : "แแแแฎแแแ แแแแแก แกแแฎแแแ",
"Password" : "แแแ แแแ",
"__language_name__" : "__language_name__",
... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
angular.module('appMain').controller('listParcController',function($scope,$http){
//get parceiros from DB
listaParceiros();
... |
/**
* Created by Happy Life on 2017/2/11.
*/
// ๅๅปบไธไธชๆๅกๆจกๅ
angular.module("movieApp.service",[])
.service("$movieServ",function () {
}); |
describe("testing BowlingGame HTML page",function(){
beforeEach(function() {
// browser().reload();
browser().navigateTo('Bowling.html');
// add player 1
input('Name').enter('Player1');
element('#add_user_btn',"Add Player Button").click();
input('Name').enter('Player2');
... |
const readBooks = require('./callback.js')
const books = [
{ name: 'LOTR', timeSpent: 3000 },
{ name: 'Fidas', timeSpent: 2000 },
{ name: 'Kalkulus', timeSpent: 4000 },
{ name: 'komik', timeSpent: 1000 }
]
// Tulis code untuk memanggil function readBooks di sini
let waktu = 10000
const getPosts = (wakt... |
/**
* Created by StarkX on 08-Mar-18.
*/
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const ObjectId = Schema.Types.ObjectId;
let mongooseHidden = require('mongoose-hidden')();
let langList = [ 'en-us' ];
const UserSchema = new Schema({
handle : { type : String, trim : true, required : ... |
import { connect } from 'react-redux';
import { Redirect } from 'react-router';
function RedirectToFirstPage(props) {
const { userInfo, location } = props;
const { pathname } = location;
return (<div>
{ userInfo ? ( pathname === '/' ? <Redirect to='/userCenter'/> : <Redirect to={pathname}/>) : '' }
</div>)... |
/**
* Created by kanak on 1/6/16.
*/
var datepicker1 = $('#datepicker1');
var datepicker4 = $('#datepicker4');
datepicker4.on('change', function () {
var date_from = datepicker1.val();
var new_date_from = new Date(date_from);
var date_to = datepicker4.val();
var new_date_to = new Date(date_to);
i... |
import React, {Component} from 'react';
import {Text, TouchableOpacity} from 'react-native';
import { connect } from 'react-redux';
import { employeeCreateAction, employeeCreateWith } from '../actions';
import { Card, CardSection} from './common/';
import EmployeeForm from './EmployeeForm';
class EmployeeCreate exte... |
const webpack = require('webpack');
const autoprefixer = require('autoprefixer');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const bourbon = require('node-bourbon').includePaths;
const config = require('./webpack.config.js');
config.devtool = 'cheap-module-eval-source-map';
config.entry = {
'sanj... |
import React, { Component } from 'react';
import 'datatables.net-dt/css/jquery.dataTables.css'
import 'datatables-bulma/css/dataTables.bulma.css'
// import 'jquery/dist/jquery.min'
// import 'datatables.net-dt/js/dataTables.dataTables'
// import 'datatables-bulma/js/dataTables.bulma'
const $ = require('jquery')
$.Dat... |
/******************************************************************************************************************************
COMMING SOON PAGE
*******************************************************************************************************************************/
(function($) {
/**
* Set your date he... |
class FSM {
/**
* Creates new FSM instance.
* @param config
*/
constructor(config) {
if (!config) {
throw new Error('config is\'not passed');
}
this.config = config;
this.initialState = config.initial;
this.state = config.initial;
... |
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint @typescript-eslint/no-var-requires: "off" */
const { join } = require('path');
module.exports = {
rootDir: join(__dirname, '..'),
displayName: 'lint',
runner: 'jest-runner-eslint',
testMatch: ['<rootDir>/**/*.ts'],
};
|
function init() {
var divBiaoQian = document.getElementById('agou')
divBiaoQian.innerHTML=''
divBiaoQian.setAttribute('style','height:200px;width:280px;background-color:pink;margin-left:400px;margin-top:400px')
}
window.onload = init;
|
// >>> Section: Key state class
// The key state class contains detailed information about a keys state
function KeyState()
{
var pressed_time = 0.0; // Time the key has been pressed or 0.0 if currently not pressed
var pressedframe_time = 0.0; // Time the key has been pressed in this frame or 0.0 if currently not... |
var exp = '';
var res = '';
$("#clear").click(function (){
$(".result-text").text('0');
$(".type-text").text('');
exp = '';
res = '';
this.blur();
});
$("#equal").click(function() {
this.blur()
})
$(".btn").css('outline','none');
$("#clear, #equal").click(function(){
this.focus();
this.blur();
}
)
$(".... |
const SilverFocusable = require('silver-focusable')
/**
* <%= projectName %>
* @class
*/
export class <%= projectName %> extends SilverFocusable {
constructor(opt) {
super(opt)
}
/**
* initView ๆจกๆฟๆนๆณ
* @memberOf <%= projectName %>.prototype
* @method initView
* @param {Object} style ๆ ทๅผๅๆฐ
* ... |
/***
* Em um parque de diversรตes nos pedem
* um programa para verificar se os passageiros da montanha-russa podem entrar no brinquedo.
*
* Crie uma funรงรฃo podeSubir() que receba dois parรขmetros:
* altura da pessoa;
* se estรก acompanhada.
*
* Deve retornar um valor booleano (TRUE, FALSE) que indique se a pes... |
var mysql = require("mysql");
var inquirer = require("inquirer");
var connection = mysql.createConnection({
host: "localhost",
port: 3306,
user: "root",
password: "Priyansh0518",
database: "bamazon"
});
connection.connect(function(err) {
if (err) throw err;
managerView();
});
function managerView() {
... |
import {
identifier,
validation,
stringHandler,
} from '../util'
export default {
install: function(Vue, options){
Vue.prototype.$identifier = identifier;
Vue.prototype.$validation = validation;
Vue.prototype.$stringHandler = stringHandler;
}
}
|
$(document).ready(function() {
$('#usernameLoading').hide();
$('#username').blur(function(){
alert("IT DID SOMETHING?");
$('#usernameLoading').show();
$.post("../functions/checkuser.php", {
username: $('#username').val()
}, function(response){
$('#usernameResult').fadeOut();
... |
/**
* Authors: Diego Ceresuela, Raรบl Piracรฉs and Luis Jesรบs Pellicer.
* Date: 16-05-2016
* Name file: auth.controller.js
* Description: Controller for provide twitter authentication, necessary jwt.
*/
(function() {
'use strict';
var passport = require('passport');
var mongoose = require('mongoose');
... |
import { Link } from 'react-router-dom';
import { BulletList } from 'react-content-loader';
import useProfiles from '../../../hooks/useProfiles';
import useFollowUser from '../../../hooks/useFollowUser';
import Button from '../../Button';
import * as S from './styles';
const Suggestions = () => {
const { status, ... |
const Product = require('models/Product');
exports.write = async (ctx) => {
const { name, description, price, discountRate, imageUrl } = ctx.request.body;
const product = new Product({
name: name,
description: description,
price: price,
discountRate: discountRate,
image... |
////////////// Express settings... /////////////
const express = require('express');
const app = express();
const PORT = process.env.PORT || '3000';
app.listen(PORT, () => {
console.log(`Server running on http://localhost:${PORT}`)
});
////// Google Trends API .../////////////
const googleTrends = require('google-t... |
import DashView from "@/components/Dash.vue";
import NotFoundView from "@/components/404.vue";
// Import Views - Dash
import Links from "@/components/views/Links.vue";
const routes = [{
path: "/",
component: DashView,
children: [{
path: "links",
alias: "",
component: Links,
name: "Links",
me... |
import React from 'react';
import {Button} from 'antd';
import './AboutUs.css';
function AboutUs() {
return (
<>
<section id='about-us'>
<div className='about-wrapper'>
<h3 className='about-h3'>Welcome</h3>
<h2 className='about-h2'>About Vegetables</h2>
<p className='about-p'>
... |
var addItemModel = function () {
this.submitEvent = new Event(this);
this.getCategoriesEvent = new Event(this);
this.editEvent = new Event(this);
}
addItemModel.prototype.submit = function (data) {
$.ajax({
url: '/register',
type: 'POST',
data: { data: data },
... |
const UserResolver = require('./users/index');
const CourseResolver = require('./courses/index');
const ForumQuestionResolver = require('./forumQuestions/index');
const { globalAutocomplete } = require('./global/globalAutocomplete');
const RootResolver = {
...UserResolver,
...CourseResolver,
...ForumQuestionReso... |
// Example: snowpack.config.mjs
// The added "@type" comment will enable TypeScript type information via VSCode, etc.
/** @type {import("snowpack").SnowpackUserConfig } */
export default {
plugins: [
// https://www.npmjs.com/package/@snowpack/plugin-typescript
[
"@snowpack/plugin-typescript",
{... |
function solve(arr) {
return Math.max.apply('', arr);
} |
import { createFile, updateFile, deleteFile, findFile, fetchFiles, paginateFiles} from '../../services/FileService'
import {AuthenticationError, ForbiddenError} from "apollo-server-express";
import {
FILE_SHOW,
FILE_UPDATE,
FILE_CREATE,
FILE_DELETE
} from "../../permissions/File";
export default {... |
// leanModal v1.0 by Ray Stone - http://finelysliced.com.au
(function($) {
$.fn.extend({
leanModal : function(options) {
var defautOptions = {
top : 100,
overlay : 0.5
};
options = $.extend(defautOptions, options);
retu... |
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.controllers' is found in controllers.js
ang... |
angular.module('myfavor', []);
|
angular
.module("empresa.service", [])
.factory('empresa', ['$http', 'auth', function($http, auth) {
// Might use a resource here that returns a JSON array
var headers = {};
headers[API.token_name] = auth.getToken();
var dataEmpresa = {};
dataEmpresa.getSucursal = funct... |
const { rword } = require('rword')
const wd = require('word-definition')
const ON_DEATH = require('death')
const log = require('single-line-log').stdout
const fs = require('fs')
let totalWordsToDownload = null
let wordsDownloaded = 0
let avgResponseTime = null
//todo timeout
let getTimeElapsedMs = start => {
let... |
import {updateSession} from "../services/SessionService";
const sessionMiddleware = (req, res, next) => {
if (req.user) updateSession(req.user)
next()
}
export default sessionMiddleware |
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { getDetails } from '../services/movieApis';
import styles from './MovieDetail.css';
const MovieDetail = ({ match }) => {
const [details, setDetails] = useState({});
useEffect(() => {
getDetails(match.params.movie_id... |
function buildFunctions() {
var arr = [];
for (var i = 0; i < 3; i++) {
//console.log("in loop: " + i);
arr.push(function() {
console.log(i);
});
}
//console.log("after loop: " + i);
return arr;
}
var functions = buildFunctions();
functions[0]();
functions[1]();
functions[2]();
function buildFun... |
import highlights from './highlights';
import { combineReducers } from 'redux';
const rootReducer = combineReducers({
highlights,
});
export default rootReducer;
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class TextRendererEditor {
constructor(tbody, config, projectClient, editConfig) {
this.fields = {};
this.pendingModification = 0;
this.tbody = tbody;
this.editConfig = editConfig;
this.projectClient... |
'use strict'
module.exports = (sequelize, Sequelize) => {
const Game = sequelize.define('Game', {
home_team: {
type: Sequelize.INTEGER,
allowNull: false
},
away_team: {
type: Sequelize.INTEGER,
allowNull: false
},
score_home: {
type: Sequelize.INTEGER
},
score_away: {
type: Sequelize.... |
var N = Number(2400);
var n = 3500;
console.log(typeof(N));
console.log(typeof(n));
console.log(N.toFixed(2));
console.log(n.toFixed(2));
console.log(5 .toFixed(2));
console.log("");
console.log(n.toExponential(3));
console.log(n.toPrecision(5));
console.log("");
var i = 10;
console.log(i);
console.log(-i);
console.l... |
const router = require('express').Router();
const { dbToRes, reqToDb } = require('../../../utils');
const { Projects, Jobsheets, Components } = require('../../../data/models');
const { getUserInfo, getUserOrganizations } = require('../../middleware/users');
router.get('/:id/jobsheets', getUserOrganizations, async (req... |
const router = require('koa-router')()
var NeihanModel = require('../model/Neihan');
var ad = require('../conf/ad.json')
router.prefix('/neihan');
router.get('/', async(ctx, next) => {
let page = ctx.request.query.page || 1
let id = ctx.request.query.id
let type = ctx.request.query.type || ""
let arr ... |
$(function (){
$("fnameErrorMsg").hide();
var error_fname = false;
var error_lname = false;
var error_email = false;
var error_pass = false;
var error_repass = false;
var error_addr = false;
var error_mob = false;
var error_dob = false;
var name_regex = /^[a-zA-Z]+$/;
var email_regex = /^... |
const { EventEmitter } = require('events');
const Dispatcher = require('../dispatcher');
const CHANGE_EVENT = 'change';
const _settings = {
checkForUpdatesOnStartup: true
};
class SettingsStore extends EventEmitter {
emitChange() {
this.emit(CHANGE_EVENT);
}
addChangeListener(callback) {
this.on(C... |
todoApp.service('LoginService', ['AuthService', '$http', '$q', function(AuthService, $http, $q) {
return {
'checkAuth': function(user) {
var defer = $q.defer();
$http.post('/auth', {email : user.email, password: user.password}).success(function(resp){
console.log("Going to AuthService to set token in brow... |
$(function () {
//ๆฅ่ฏข็จๆท็ปๅฝ็ถๆๅๅ ่ฝฝ็จๆทๅ่ฝ
$.ajax({
url:"../../stuIndexLoginer.do",
type:"get",
dataType:"json",
success:function(data){
console.log(data);
//ๅคๆญ็จๆทๆฏๅฆ็ปๅฝ
if(data=="101"){
location.href="login.html";
}else{
$(".sname").text(data.fullName); //่ฎพ็ฝฎ็จๆท็ปๅฝๅ
$(".toExam").click(function(){
... |
// NOTE: Do not fix lint issues with this file!
// It is expected to fail ESLint validation for testing purposes.
class Foo{
speak(){
console.log("hello");
}
}
let foo=new Foo();
foo.speak( )
|
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js').then(function (registration) {
// Registration was successful
console.log('ServiceWorker registration successful with scope: ', registration.scope);
}).catch(function (err) {
// registration failed :(
console.log('Service... |
'use strict';
const app = require('./app');
const port = process.env.PORT || 3000;
const logger = require('./logger');
// Database connection
require('./db-connection')();
const server = app.listen(port, function() {
logger.info('Server listening on port ' + port);
}); |
import React from 'react';
import {compose} from 'redux';
import {DragSource, DropTarget} from 'react-dnd';
import ItemTypes from '../constants/itemTypes';
import connect from '../libs/connect';
import NoteActions from '../actions/NoteActions';
import LaneActions from '../actions/LaneActions';
import Notes from './Note... |
function selectionSort(arr) {
var _a;
for (var i = 0; i < arr.length; i++) {
var min = i;
for (var j = i + 1; j < arr.length; j++) {
if (arr[min] > arr[j]) {
min = j;
}
}
if (i !== min) {
_a = [arr[min], arr[i]], arr[i] = _a[0],... |
export { TransactionChart } from './transaction-chart'; |
// packages
const inquirer = require("inquirer");
const axios = require("axios");
const puppeteer = require("puppeteer");
const generateHTML = require("./generateHTML.js");
let html;
let profileFinal;
// User is prompted in Terminal for their Github Username
function getName() {
const username = inquirer.prompt({... |
import axios from 'axios'
const base_url = 'https://jsonplaceholder.typicode.com';
const baseConnection = axios.create({
baseURL: base_url
});
const axiosAPI = ({
getUsers: () => baseConnection.get('/users'),
createUser: (
id,
name,
username,
email
) => baseConnecti... |
var sql = require('../../connect_db');
var message = function (message) {
this.sender = message.sender;
this.receiver = message.receiver;
this.message = message.message;
};
message.loadAvailableUsersMessages = function (user, result) {
sql_query = "select * from tedi.messages where messages.r... |
import React from 'react';
import { Link } from 'react-router';
const Icon = React.createClass({
handleDeleteBoard: function() {
this.props.onDeleteBoard({
id: this.props.id,
board: this.props.boardID
});
},
render: function () {
return (
<div className="icons">
<Link to={t... |
const data = [{
durationAvg: 168.5,
durationMin: 147,
durationMax: 190,
durationLast: 147,
durationSum: 337,
sessionCount: 2,
requestSum: 18,
requestAvg: 9,
username: "jhon.doe",
__typename: "SessionsByUser"
}, {
durationAvg: 250,
durationMin: 250,
durationMax: 250,
... |
var discipline = require('./discipline');
var media = require('./media');
var bookshelf = require('../custom_modules/bookshelf').plugin('registry');
module.exports = bookshelf.model('disciplinemedia', {
tableName: 'disciplinemedia',
discipline: function () {
return this.hasOne(discipline);
},
me... |
/**
* ๅคๆญไธไธชๅผๆฏไธๆฏnullใ
*
* @since V0.1.3
* @public
* @param {*} value ้่ฆๅคๆญ็ฑปๅ็ๅผ
* @returns {boolean} ๅฆๆๆฏnull่ฟๅtrue๏ผๅฆๅ่ฟๅfalse
*/
export default function (value) {
return value === null;
};
|
var Controls = {
id: "fo-controls",
actions: ['start', 'restart', 'pause', 'unpause', 'close'],
buttons: {},
element: null
}
Controls.init = function() {
}
Controls.action = function (e) {
var btn = e.target
if (btn.hasAttribute('data-action') && !btn.hasAttribute('disabled')) {
Controls.onclic... |
import React from 'react';
import Note from './Note.jsx';
import Masonry from 'react-masonry-component';
import './NotesGrid.less';
export default class NotesGrid extends React.Component{
render() {
const masonryOptions = {
itemSelector: '.Note',
columnWidth: 250,
gutter: 10,
... |
'use strict';
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
(function () {
// Get all of the images that are marked up to lazy load
var images = document.querySelect... |
// @desc this component displays all email subscribers
// @author Sylvia Onwukwe
import React from "react";
// @material-ui/core components
import Grid from "@material-ui/core/Grid";
// core components
import GridItem from "../../components/Grid/GridItem";
import Card from "../../components/Card/Card";
import Snackbar ... |
import React from 'react'
import { Link } from 'react-router-dom'
import './Footer.css'
const Footer = (props) => (
<footer className="footer-section pt-3">
<div className="container">
<div className="row">
<div className="col-sm-3 offset-sm-6 col-xs-12">
... |
import { RELOAD_FLOCK_LIST } from './flockTypes';
const initialState = {
flockList: [],
};
const flock = (state = initialState, action) => {
switch (action.type) {
case RELOAD_FLOCK_LIST: {
// simple refresh, No reduction
if (!action.flockList) {
return initialState;
}
return {... |
import React from 'react';
export default React.createClass({
labels: {
N: 'none',
L: 'low',
M: 'moderate'
},
componentDidMount() {
$('.water.tooltipped').tooltip();
},
render() {
var water = this.props.water.map((waterCode) => {
var cls = 'tool... |
import React from 'react';
import PropTypes from 'prop-types';
const Question = (props) => {
const {question, onAnswer} = props;
return(
<div>
<h2>Question: {question.question}</h2>
<div className="btnPart">
{question.answers.map((answer, index) =>
... |
import React, {useEffect} from 'react';
import {Link} from '@reach/router';
import axios from 'axios';
import DeleteButton from './DeleteButton';
const UserParent = ({users, setusers}) => {
useEffect(()=>{
axios.get("http://localhost:8000/api/user")
.then(res => setusers(res.data))
... |
import React, { Component } from 'react';
import { Row, Col } from "reactstrap";
import ReactPaginate from "react-paginate";
import { CarCard, Filter, Sort, SearchBox } from "./../components";
import { Common } from '../utils';
// Component for rendering the cars and it's functionality
export class CarsContainer ext... |
console.log("Starting migration to schema 98");
var path = "/integrations/:INTEGRATION_ID/";
console.log("Fetching path: " + path);
var obj=jsondb.get(path);
obj["description"]="UPGRADE INTEGRATION DESCRIPTION"
jsondb.update(path, obj);
console.log("Migration to schema 98 completed");
|
//const precioOriginal = 120;
//const descuento = 18;
function calcularPrecioConDcto(precio, dcto) {
const porcentajePrecioConDcto = 100 - dcto;
const precioConDcto = (precio * porcentajePrecioConDcto) / 100;
return precioConDcto;
}
//Soluciรณn #1: arrays y switch
// let coupons = [
// "comboForYou15",... |
const budgets = [100, 120, 100, 120, 150];
const M = 400;
const solution = (budgets, M) => {
let answer = 0;
const sum = budgets.reduce((acc, cur) => {
return acc + cur;
}, 0);
//console.log(budgets);
if (sum <= M) {
let max = 0;
for (let i = 0; i < budgets.length; i++) {
if (budgets[i] > m... |
import React, { Component } from 'react';
import { Form, Button, Input, Upload, Icon, notification, Select } from 'antd';
import './EditToon.css';
import { fetchToonById, deleteToonThumbnail, fetchToonThumbnailById, uploadEditToon, uploadEditToonExceptFile } from '../util/APIAdmin';
const { Dragger } = Upload;
const { ... |
new Vue({
el:"#app",
data:{
gameIsOn:true,
gameStart:false,
showhome:false,
showdetails:false,
names:['linas','urshala'],
selectfrom:['Newton','Ellen','Einstien','pink floyd','luffy','rez','friends','love','hate','life'],
arr1:[],
arr2:[],
... |
import {
GET_CINEMAS_BY_ID_REQUEST,
GET_CINEMAS_BY_ID_SUCCESS,
GET_CINEMAS_BY_ID_FAILURE,
} from "../constants/heThongRap";
const initialState = {
selectedCinema: {},
isLoading: false,
error: null,
};
function selectedCinemaReducer(state = initialState, action) {
switch (action.type) {
case GET_CINE... |
// import Login from './Login';
import Register from './Register';
import Login from './Login';
import Profile from './Profile';
import Verification from './Verification';
import ResetCode from './ResetCode';
import ForgetPassword from './ForgetPassword';
import CreateNewPassword from './CreateNewPassword';
import Dash... |
import {EventEmitter} from 'events';
import dispatcher from '../dispatcher';
class SnippetStore extends EventEmitter {
constructor () {
super();
this.snippets = [];
}
receiveSnippets (snippets) {
this.snippets = snippets;
this.emit('change');
}
getAll () {
return this.snippets;
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.