text stringlengths 7 3.69M |
|---|
/*
* Global clause object and operator object, which models the conditionals and their relationships.
*/
var all_operators = {};
var all_clauses = {};
var initial_groups = {};
var colorPalette = ['cs-1','cs-2','cs-3'];
function getSubclauses(clauseObj) {
var cList = {};
for(var clause in clauseObj) {
if(clauseOb... |
define([
'client/controllers/module',
'common/modules/visitors-realtime',
'client/collections/realtime',
'client/views/visualisations/visitors-realtime'
],
function (ModuleController, RealtimeModule, RealtimeCollection, VisitorsRealtimeView) {
return ModuleController.extend(RealtimeModule).extend({
visu... |
import HttpHelper from './http-helper';
import Storage from './storage';
class Utils {
constructor(args = {}) {
const { baseUrl } = args;
this.baseUrl = baseUrl;
this.httpHelper = new HttpHelper();
this.storage = new Storage();
}
getAll() {
return {
httpHelper: this.httpHelper,
... |
/**
* Created by Vincent on 2014/5/15.
*/
YIGO.ui.portal.intro = function(force){
var version = 1;
var cKey = 'yigoPortalIntro'+version;
var start = document.cookie.indexOf(cKey),end;
var date = new Date();
date.setTime(date.getTime() + 30*24*60*60*1000);
if(start<0)
document.cookie = ... |
import React from 'react';
import { withRouter } from 'react-router-dom';
import { Query, graphql, compose } from 'react-apollo';
import gql from 'graphql-tag';
import { Polyline } from 'react-leaflet'
import { withStyles } from '@material-ui/core/styles';
import Toolbar from '@material-ui/core/Toolbar';
import Paper ... |
const hola = "hola ";
function name(params) {
console.log('hola');
} |
/* eslint-disable no-undef */
window.addEventListener('load', () => {
/* Set up a Realtime client that authenticates with the local web server auth endpoint */
var result = document.getElementById('result');
result.value += 'On login page now\n';
function login(e) {
e.preventDefault();
result.value += '... |
'use strict';
const heredoc = require('heredoc'),
sendQuery = require('./helpers/accessDb').sendQuery,
getAllFriends = require('./getAllFriends');
const getUserQuery = heredoc(function () {/*
SELECT * FROM users WHERE key = ?;
*/});
const getUserFromWalletIdQuery = heredoc(function () {/*
SELECT * FR... |
/* eslint-disable indent */
module.exports = {
friendlyName: 'Tester',
description: 'Tester.',
inputs: {},
exits: {
success: {
description: 'Tester: persons were found',
responseType: ''
},
notFound: {
description: 'Tester: no persons... |
import React, { useState } from 'react';
export default function Wishlist() {
const [hoverstate, setHoverstate] = useState();
const mouseEnter = (i) => {
const change = new Array(9).fill(0);
change[i] = 1;
setHoverstate(change);
};
const mouseLeave = (i) => {
const change = new Array(9).fill(0);
change[i... |
var scriptFiles= [
'node_modules/jquery/dist/jquery.min.js',
'node_modules/bootstrap/dist/js/bootstrap.bundle.js',
'source/js/wizard.js',
]
module.exports = {
scripts: scriptFiles
}; |
import React from "react";
export default function Info(props) {
return (
<div className="radio-info">
<h3 className="btm-txt">CURRENTLY PLAYING</h3>
<p className="radio-info-msg">{props.radioName}</p>
</div>
);
}
|
//工厂应该有厂长,来决定运行哪条生产线
// 消费者->子类
var gongchang={};//定义工厂
//工厂生产衣服方法
gongchang.chanyifu=function(argument){
this.gongren=50; //工人属数量
this.shengchangxiaolv=2;//生产效率
console.log("我们有"+this.gongren+"个工人");
console.log("生产了"+this.gongren*this.shengchangxiaolv+"件衣服")
}
//工厂生产鞋子方法
gongchang.chanxie=function(){
console.log... |
import Vue from 'vue'
import Vuex from 'vuex'
import actions from './actions.js'
import mutations from './mutations.js'
import getters from './getters.js'
Vue.use(Vuex)
// 存放着组件中信息的状态
const state = {
toPageName: '', //页面返回的路由名字
loginname: '', //用户名称
formPageName: '', //页面来的路由名字
clientDetail: '', //获取的联系人详情
... |
exports.donasi = (id, BotName, tampilTanggal, tampilWaktu, instagram, whatsapp, kapanbotaktif) => {
return `DONASI ${BotName}
*${tampilTanggal}* ⚡️
*${tampilWaktu}* ⚡️
(Waktu Server)
KALIAN BISA DONASI MENGGUNAKAN
🛡 *PULSA*: 089630171792
🛡 *DANA* : 089630171792
🛡 *Untuk yang lain tanyakan*: https://wa.me/62... |
const updatePrice = () => {
const kitters = document.getElementById('booking_number_of_kiters');
kitters.addEventListener('change', function(){
const price_per_day = parseInt(document.getElementById('experience_price_per_day').innerHTML);
document.getElementById('btn-submit-booking').value = "Book for " + p... |
import { LitElement, html } from 'lit-element';
import { connect } from 'pwa-helpers';
import { deleteFilm } from '../src/redux/actions.js';
import { store } from '../src/redux/store.js';
class ListElement extends connect(store)(LitElement) {
render() {
return html`
<div>
<style>
li {
... |
angular.module('lisaApp')
.controller('foodCtrl', ['$scope', '$stateParams', '$rootScope', '$ionicScrollDelegate'
, 'AlimentoService', '$ionicLoading', '$timeout'
, function ($scope, $stateParams, $rootScope, $ionicScrollDelegate
, AlimentoService, $ionicLoading, $timeout) {
var sc = $scope;
var rs =... |
/*-----------------------------------------------
collision3.js
3剛体の衝突
------------------------------------------------*/
var canvas; //canvas要素
var gl; //WebGL描画用コンテキスト
var camera; //カメラ
var light; //光源
var numRigid = 3;
var rigid = [];
var dummy;
var floor0;
var coord = [];//座標軸表示用
var pl... |
import React from 'react';
import PropTypes from 'prop-types';
import NewsTabsNav from './NewsTabsNav';
import NewsList from './../NewsList';
/**
* Компонент "Табы новостей"
*/
function NewsTabs({
items,
selectedIndex
}) {
return (
<div>
<NewsTabsNav>
{items.map(item => (
<span key... |
module.exports = {
name: 'cd',
description: 'Testing for cooldown commands',
cooldown: 5,
execute(message) {
message.channel.send(`Cooldown command`);
},
};
|
import React from "react";
import ReactDOM from "react-dom";
// import './assets/css/argon-dashboard-react.css'
// import './assets/css/argon-dashboard-react.css.map'
// import './assets/css/argon-dashboard-react.min.css'
// import './assets/fonts/nucleo.eot'
// import './assets/fonts/nucleo.ttf'
// import './assets/f... |
module.exports = require('./dist/react-code-prettify.js'); |
let numbers = [];
for (let i = 1; i <=25 ; i+=1) {
numbers.push(i)
}
console.log(numbers) |
angular.module('WeathersService', [])
.factory('WeathersService', function ($http, SettingFactory) {
var baseUrl = "http://localhost:8080/weathers";
return {
dailyWeather: function () {
var place = SettingFactory.getCity();
var setting = SettingFactory.getSetting();
var dailyUrl... |
/*
* Copyright (C) 2021 Radix IoT LLC. All rights reserved.
*/
import angular from 'angular';
import fileStoreBrowserTemplate from './fileStoreBrowser.html';
import './fileStoreBrowser.css';
import sha512 from 'js-sha512';
const localStorageKey = 'fileStoreBrowser';
class FileStoreBrowserController {
static ge... |
/**
* File Description: Invite manager, where actual business logic related to token generation, validation, check lies
*/
const mongoose = require('mongoose');
const config = require('../config/index');
const random = require('../common/helpers/random');
const self = this;
/**
* function to generate invitation t... |
const btRecibir = document.querySelector("#jsonAstr");
const btMandar = document.querySelector("#srtAjson");
const inPrimerNombre = document.querySelector("#fname");
const inApellido = document.querySelector("#lname");
const inEdad = document.querySelector("#edad");
const inCorreo = document.querySelector("#correo");
... |
var loadedCount = 0;
var limit = 10;
var skills = ["c#", "vb", "test", "a", "ab", "abc", "abcd", "abcde", "abcdef", "abcdefg", "abcdefgh", "abcdefghij"];
var selectedSkills = [];
var courses = ["BSCS", "BSMA", "COE", "ECE", "BSIT", "BSA"];
var selectedCourses = [];
var jobTitles = ["Programmer", "Software Engineer"... |
{
"document_tone": {
"tone_categories": [
{
"tones": [
{
"score": 0.564948,
"tone_id": "anger",
"tone_name": "Anger"
},
{
"score": 0.157435,
"tone_id": "disgust",
"tone_name": "Disgust"
},... |
var WsModel = function(model) {
var data = model;
{
if (!(data.pages instanceof Array)
|| data.pages.length === 0) {
data.pages = [ [] ];
}
if (!(data.runningTitles instanceof Array)) {
data.runningTitles = [];
}
}
function getPreferredIndex(page, item) {
var index = -1;
var i = 0;
va... |
function saveChange() {
var user = {};
user.lastName = $("#mf1").val();
user.firstName = $("#mf2").val();
user.patronymicName = $("#mf3").val();
user.login = $("#mf4").val();
$.ajax({
type: 'POST',
url: '/api/profile/update',
headers: {
'X-CSRF-TOKEN': $('meta... |
import Carousel from "./Carousel";
import "./MyWork.css"
const MyWork = (props) => {
return(
<div id="my-work" style={{marginBottom:'20px'}}>
<div style={{height:"725px"}} className="myWork">
<h1>My Work</h1>
<Carousel />
</div>
</div>
)... |
const header = document.getElementsByTagName("logo")[0].nodeValue
header.addEventListener('click',function(){
window.location.href = "/WEB-INF/crm/home"
})
|
import React from 'react'
import { connect } from 'react-redux'
import TagList from '../common/TagList'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import {
UPDATE_FIELD_RECORD_EDITOR,
REMOVE_KEY
} from '../../constants'
const mapStateToProps = state => ({
keyList: state.recordEditor.keyL... |
import Player from '../prefabs/Player'
import Mouse from '../prefabs/Mouse'
import NumberBox from '../prefabs/NumberBox'
export default class Level2 extends Phaser.State {
constructor() {
super()
}
create() {
// physics
this.physics.startSystem(Phaser.Physics.ARCADE)
this.p... |
/* eslint-disable react/jsx-filename-extension */
/* eslint-disable linebreak-style */
import React, { useState, useEffect} from 'react';
import PageDefault from '../../../Componentes/PageDefault';
import FormField from '../../../Componentes/FormField';
import Button from '../../../Componentes/Button';
export default ... |
// Generated by CoffeeScript 1.7.1
(function() {
var INTERVAL, SIZE, per_page, wall, wall_id;
if (!String.prototype.trim) {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "");
};
}
wall_id = null;
wall = {};
SIZE = 5;
per_page = SIZE;
INTERVAL = 3000;
windo... |
const toggle = document.querySelector(".nav__toggle");
const navLinks = document.querySelector(".nav__links");
navLinks.classList.remove("open");
function openNav() {
toggle.classList.add("open");
navLinks.classList.add("open");
window.addEventListener("click", closeNav);
}
function closeNav() {
toggle.classList... |
const todoInput = document.querySelector('.todo-input');
const todoButton = document.querySelector('.todo-button');
const todoList = document.querySelector('.todo-list');
const filterTodo = document.querySelector('.filter-todo');
document.addEventListener('DOMContentLoaded', function (e) {
getTodo();
});
todoButton.... |
import BorderConfig, { borders } from './border'
import ColorConfig, { color } from './color'
import GridConfig, { grid } from './grid'
import PaddingConfig from './padding'
import RadiusConfig, { radius } from './radius'
import SizingConfig, { sizing } from './sizing'
import TypographyConfig, { typography } from './ty... |
export default function () {
const example = document.getElementById('example')
const newText = document.createTextNode('Hola Mundo')
example.appendChild(newText)
} |
import React from 'react';
import './App.css';
import NestedComponentsExample from './nesting_components/nested_components_main_container';
import ComponentStateAndInteractions from './component_state_and_interactions/component_state_and_interactions_main_container';
import ConditionalRendering from './conditional_rend... |
import CONFIG from "web.config";
import MasterPage from "components/website/master/MasterPage";
import BasicLayout from "components/diginext/layout/BasicLayout";
import { useRouter } from "next/router";
import Header from "components/website/elements/Header";
import DashkitButton from "components/dashkit/Buttons";
impo... |
// redux
// import store from '@/store';
// import { changeShowChartStatus, getChartData } from '@/store/actions';
// import { GET } from '@/plugins/fetch/';
import AppConfig from '@/AppConfig';
import scene from '@/three/scene';
import { Group } from 'three';
import {
jsonLoader
} from '@/three/loaders';
import {... |
(function() {
"use strict";
/*
Home module for displaying home page content.
*/
var app;
app = angular.module("koan.home", ["ngRoute", "monospaced.elastic", "koan.common"]);
app.config(function($routeProvider) {
return $routeProvider.when("/", {
title: "KOAN Home",
templateUrl: "module... |
class File {
constructor(options) {
const {
id,
name = 'default',
figures = [],
} = options
this.id = id
this.name = name
this.figures = figures
}
}
export default File
|
import Department from '../../../../../models/erp/department'
import User from '../../../../../models/auth/user'
import Employee from '../../../../../models/erp/employee'
export default [
{
prop: 'username',
label: '用户名',
trim: true,
rule: { required: true, validator: async(rule, value, form, defaultForm, call... |
import React, { useEffect, useRef, useState } from 'react';
import { useDispatch } from 'react-redux';
import { makeStyles } from '@material-ui/styles';
import MaterialTable from 'material-table';
import PropTypes from 'prop-types';
import PerfectScrollbar from 'react-perfect-scrollbar';
import { useUserPreferencePagin... |
require('./zepto.min');
require('./zepto-tap');
var $ =require('./jquery-1.10.1.min.js');
var load = require('./loadfooter.js');
load.loadHtml(3); |
import Pieces from './Pieces';
class King extends Pieces {
constructor(player) {
super(player, (player === 1 ? "https://upload.wikimedia.org/wikipedia/commons/4/42/Chess_klt45.svg" :
"https://upload.wikimedia.org/wikipedia/commons/f/f0/Chess_kdt45.svg"));
}
possibleMove(srcIndex, destIndex) {
return (
src... |
import { getAccessToken } from "./getAccessToken"
import { URL, credentials, WS_DEMO_URL } from './data'
import { TradovateSocket } from "./socket/tvSocket"
const syncSocket = new TradovateSocket({debugLabel: 'sync data'})
const main = async () => {
const { accessToken, userId } = await getAccessToken(URL, cred... |
/* eslint-env node */
module.exports = function(grunt) {
"use strict";
var SOURCE_FILES = [
"Gruntfile.js",
"src/**/*.js",
"test/*.js"
];
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
clean: {
options: {},... |
/* eslint-disable import/no-anonymous-default-export */
import {nanoid} from 'nanoid'
export default {
name: 'course',
type: 'document',
title: 'Course',
fields: [
{
name: 'title',
type: 'string',
title: 'Title',
description: 'Titles should be catchy, descriptive, and not too long',... |
angular.module('starter.services', [])
.factory('Missions', function($http) {
// Might use a resource here that returns a JSON array
// Some fake testing data
var missions = [];
return {
download: function() {
return $http.get("http://artifact-server.azu... |
import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import moment from "moment";
import AppRouter from "./routers/AppRouter";
import configureStore from "./store/configureStore";
import getVisibleExpenses from "./selectors/expenses";
import "./styles/styles.scss";
impo... |
import { connect } from 'react-redux';
import SignupPasswordScreen from '../components/SignupPasswordScreen';
import { apiSignup, signupSavePassword, navigatePush } from '../actions';
const mapStateToProps = (state) => {
return {
error: state.authState.error ? state.authState.error.message : ''
};
};
const m... |
import React from "react";
import "./App.css";
import PostList from "./components/PostList";
import PostNew from "./components/PostNew";
import PostShow from "./components/PostShow";
import { BrowserRouter, Route, Switch } from "react-router-dom";
function App(props) {
return (
<div className="App">
<Brows... |
//第一个
for (var i = 0; i < 5; i++) {
setTimeout(function() {
console.log(i,",");
}, 1000);
}
console.log(i,"->");
//第二个
// var output = function (i) {
// setTimeout(function() {
// console.log(i);
// }, 1000);
// };
// for (var i = 0; i < 5; i++) {
// output(i); // 这里... |
import React,{useState} from 'react'
import Dudeme_Logo from "../IMAGES/Dudeme_Logo.png";
import image1 from "../IMAGES/image1.png";
import cart from "../IMAGES/cart.png"; //category-1
import category1 from "../IMAGES/category1.png";
import product1 from "../IMAGES/product1.jpg";
import watch from "../IMAGES/watch.png... |
/**
* A module that contains all functions to handle user requests
* Accesses functions from userModel
* @module users/userController
*/
var users = require('./userModel.js');
var jwt = require('jwt-simple');
var db = require('../db');
module.exports = {
/**
* Calls three functions from userModel.
* Checks... |
import styled from 'styled-components'
import { useDispatch, useSelector } from 'react-redux'
import { updateProfilePhoto,logout, showDialog, updateProfile,showToast } from '../../features/appSlice'
import authFetch from '../../utils/authFetch'
import { SERVER_URL } from '../../Constants/api'
import { ReactComponent as... |
/**
* Created by Yonatan.Vainer on 7/9/2015.
*/
angular.module('UsersController', [])
.controller('UsersController', ['UsersManagerService','AuthService','FileUploader', function(UsersManagerService,AuthService,FileUploader){
var vm = this;
vm.name = "";
vm.username = "";
vm.pass... |
/**
* @param {string} address
* @return {string}
*/
var defangIPaddr = function(address) {
address = address.split(".");
defIP = "";
for (let i = 0; i < address.length - 1; i++) {
defIP += address[i] + "[.]";
}
return defIP + address[address.length - 1];
};
|
var express = require('express');
var app = express();
var git = require('simple-git');
app.post('/', function (req, res) {
console.log(__dirname);
git(__dirname)
.pull(function(err, update) {
if(err){
console.log(err);
}
require('child_process').exec('npm restart',function(e... |
import React from 'react';
import PropTypes from 'prop-types';
import { graphql } from 'gatsby';
import { global, styles } from '@storybook/design-system';
import styled from 'styled-components';
import Helmet from 'react-helmet';
import Release from './Release';
const { GlobalStyle } = global;
const { pageMargins, ... |
import {TopPanel} from "./components/topPanel.js";
import {IconButton} from "./components/iconButton.js";
import {SiteForm} from "./components/siteForm.js"
let appContainer = document.querySelector("#app-container");
let leftOptions =[
"HOME",
"FAQS",
"CONTACT",
"USD"
].map(optionName=>{
let option... |
function nthPrime(n) {
const primes = [2];
let test = 3;
while(primes.length < n) {
if(isPrime(test)) {
primes.push(test);
}
test += 2;
}
return primes.pop();
function isPrime(num) {
const stopPoint = Math.sqrt(num);
for(const prime of primes)... |
var link = document.querySelector(".hostel-search");
var popup = document.querySelector(".modal-date");
var date = popup.querySelector("[name=date-arrival]");
link.addEventListener("click", function (evt) {
evt.preventDefault();
popup.classList.toggle("modal-show");
date.focus();
});
|
var movedata =[
{Nov:0,Name:"Petal Dance",Type:"Grass",Attack:156,Wait_time:5},
{Nov:1,Name:"Vine Whip",Type:"Grass",Attack:237,Wait_time:5},
{Nov:2,Name:"Synthesis",Type:"Grass",Attack:0,Wait_time:5},
{Nov:3,Name:"Tackle",Type:"Normal",Attack:163,Wait_time:5},
{Nov:4,Name:"Take Down",Type:"Normal",... |
const express = require('express');
const router = express.Router();
const { ensureAuthenticated, forwardAuthenticated } = require('../config/auth');
const Job = require('../models/Job');
// Dashboard
router.get('/post-Job', ensureAuthenticated, (req, res) =>
res.render('post-job', {
user: req.user
})
);
rou... |
function solve(input) {
const saveValidData = {};
const letterPattern = /[a-zA-Z]{1,}/;
for (let i = 0; i < input.length; i++) {
line = input[i].split(/--|=|<</g);
if (line === "Stop!") {
return;
}
if (line.length !== 4) {
continue;
}
let [name, length, count, organism] = li... |
import React, { useState } from 'react'
import { render, fireEvent } from '@testing-library/react'
import FieldBase from '../index'
const TestComponent = props => {
const [value, setValue] = useState('')
const onChange = e => setValue(e.target.value)
return (
<FieldBase {...props}>
<input
va... |
const UserManager = artifacts.require("UserManager");
const User = artifacts.require("User");
/**
* accounts[0] : admin
* accounts[1] : master
* accounts[2] : user, presidium
* accounts[3] : user
*/
contract("UserManager", accounts => {
it("建立并检索用户合约", () => {
return UserManager.deployed()
... |
import React, { Component, PropTypes } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import AccountsUIWrapper from './AccountsUIWrapper.jsx';
import { Meteor } from 'meteor/meteor';
//import Selectors from './Selectors.jsx'
import { VolunteerDB } from '../api/volunteers.js';
//import Volunte... |
import CommunicationLoading from "./Loading";
import BsModal from "./BsModal";
export {
CommunicationLoading,
BsModal,
}
|
import React, { Component } from 'react';
import {
Text,
View,
ListView,
ScrollView,
StyleSheet,
Dimensions,
Platform,
} from 'react-native';
import { Tile, List, ListItem } from 'react-native-elements';
import Communications from 'react-native-communications';
import GiftedSpinner from 'rea... |
import React from "react";
import Grid from "@material-ui/core/Grid";
import { makeStyles } from "@material-ui/core/styles";
import Paper from "@material-ui/core/Paper";
import Typography from "@material-ui/core/Typography";
import Checkbox from "@material-ui/core/Checkbox";
import { Box } from "@material-ui/core";
... |
X.define("modules.message.systemBulletin",["model.messageModel"],function (messageModel) {
//初始化视图对象
var view = X.view.newOne({
el: $(".xbn-content"),
url: X.config.message.tpl.systemBulletin
});
//初始化控制器
var ctrl = X.controller.newOne({
view: view
});
ctrl.rende... |
'use strict';
/* @author Rachel Carbone */
var app = angular.module('editor.controllers', []);
app.controller('ErrorPagesCtrl', ['$rootScope', '$scope', '$state', '$timeout',
function($rootScope, $scope, $state, $timeout) {
$scope.timer = 5;
$timeout(function () {
$scope.goTo... |
'use strict';
import angular from 'angular';
import DetectModule from './detect/detect.module';
import DialogboxModule from './dialogbox/dialogbox.module';
import TableModule from './table/table.module';
/**
* @const {String} ComponentsModule
*/
const ComponentsModule = angular
.module('app.components', [
Det... |
$(function () {
// ****************************************
// U T I L I T Y F U N C T I O N S
// ****************************************
// Updates the form with data from the response
function update_form_data(res) {
$("#inventory_id").val(res.id);
$("#inventory_name").val(re... |
const logger = require("./src/logger");
const exportLogger = logger();
module.exports = exportLogger;
|
import React from 'react';
import Dialog from '@material-ui/core/Dialog';
import DialogTitle from '@material-ui/core/DialogTitle';
import { DialogContent,DialogContentText,Button,DialogActions } from '@material-ui/core';
export default function(props){
const [selectedDate, setSelectedDate] = React.useState(new Date(... |
var _ = require('underscore');
var TransitionBase = require('./transitionbase.js');
var GotoTransition = function(newState) {
TransitionBase.call(this, 'goto');
this.newState = newState;
};
module.exports = GotoTransition;
|
function ex29(arrSpeed) // arrSpeed = Array(speedSlow, speedFast, speedMedium);
{
var exDiv = '#ex29';
var dynamicDiv = '#mainDivDynamic29';
var getParentHeight = $('.games-inner-container').height();
var getParentWidth = $('.games-inner-container').width();
$(exDiv).css('height',getParentHeight... |
#!/usr/bin/node
import readlineSync from 'readline-sync';
import { getAnswer } from './functions';
const chalk = require('chalk');
const game = (description, getQuestion, getCorrectAnswer, isValidAnswer) => {
console.log(chalk.yellow('*************************************************'));
console.log(
chalk.y... |
const hola = (hola = undefined) => {
return `Mi nombre es ${hola}`;
}
hola("kevin"); |
import './App.css';
import Header from './components/Header';
import User from './components/User';
import {useState} from 'react';
function App() {
const [friends , setFriends] = useState(["asdasdsa","asdasd234"]);
return (
<div>
<User name = "orçun" islog = {false}/>
<Header/>
<Header/>
... |
import React from 'react';
import { Form, Button } from 'semantic-ui-react';
class EditUserModal extends React.Component {
constructor(props) {
super(props)
this.state = {
user: this.props.user
}
}
handleOnChange = (event) => {
const {id, value} = event.tar... |
import React from 'react';
import './index.css';
const Footer = () => {
return (
<div className='footer-wrapper'>
<div className='container'>
<div className='row'>
<div className='col'></div>
<div className='col-5'>
<a href='#header'>
<i className='fa f... |
import Vue from "vue";
import VueRouter from "vue-router";
import Intro from "../views/Intro";
import About from "../views/About";
import Greeting from "../views/Greeting";
import Stack from "../views/Stack";
import Roadmap from "../views/Roadmap";
Vue.use(VueRouter);
const routes = [
{
path: "/",
name: "i... |
// выводить ошибки в JSON формате
const { isCelebrateError } = require('celebrate');
const BadRequestError = require('../../errors/400_BadRequestError');
module.exports = (err, req, res, next) => {
if (isCelebrateError(err)) {
const customError = err.details.get('body') || err.details.get('params');
throw n... |
module.exports = [
'You are supah dupah', 'You are beautiful'
];
//write a function that iterates through an array
//and randomly selects an item in the array. use math.ranom()?
|
exports.run = (bot, msg, args) => {
msg.member.voice.channel.join().then(connection => console.log("connected on user : " + msg.author.id)).catch(console.error);
} |
// However, escaping can be disabled with the |s operator, so use this wth care
{ contents | s }
|
/*
EXERCISE 45:
Using the ES2015 class syntax, create a class called Person with a constructor setting the properties
"name", "weight", and "age", and a default property called "isAlive" set to true
For example:
const myPerson = new Person('Steve',160,35);
//myPerson should be {... |
Meteor.publish("transactions", function(options, criteria, searchString){
if (searchString == null || searchString == '')
{
searchString = "";
}
var criteriaMap = {"Account ID":"acctId", "Transaction Code":"tranCode", "Base Currency":"baseCurrency",
"Currency":"currency", "Amount":"amount", "Time... |
// 个人项目
module.exports = {
text: "项目",
link: "/projects/",
items: [
{ text: "ToDb", link: "https://github.com/xingcxb/todb" },
{ text: "goKit", link: "https://github.com/xingcxb/goKit" },
],
};
|
/** app.js , definition of modules pertaining
to main view in index.html **/
"use strict";
angular.module('musicApp', [])
.controller('MainCtrl',[ '$http',function ($http) { // the array includes a list of dependencies in string format, last argument is function which defines what controller does. controller definit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.