text
stringlengths
7
3.69M
import React, { Component } from "react" import "./Mapview.scss" import { loadModules } from "react-arcgis" // import { loadModules } from "../../../../../public/data/data" var data = [ //json数据 { "name":"长城", "x":116.016033, "y":40.364233, "desc":"长城(Great Wall),又称万里长城,是中国古代的军事防御工程,是一道高大、坚固...
import React from 'react'; const ErrorIcon = () => ( <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <circle cx="12" cy="12" r="9" fill="#CF176C" /> <path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 ...
import React from "react"; import './index.css'; import { Button, Tooltip, message} from "antd"; import {CopyOutlined } from '@ant-design/icons'; export default class Getandcopy extends React.Component { constructor(props) { super(props); this.copyRef = React.createRef(); this.state = { ...
import React from 'react'; import {gestureHandlerRootHOC} from 'react-native-gesture-handler'; import {Navigation} from 'react-native-navigation'; import {Provider} from 'react-redux'; import SplashScreen from './SplashScreen'; import DetailsScreen from './src/Components/Details'; console.ignoredYellowBox = [ 'Warnin...
$(document).ready(function() { // Using translate.js <https://github.com/tinoni/translate.js> // Part 1 of 2 of translate.js: Constructing the dictionary var dict = { "Proximos Eventos": { // Translations for "Tour" es: "Proximos Eventos", en: "Upcoming Events" }, "Próximamente": { //...
let commands = require('../../../src/commands'); describe('clap slash command', () => { test('function exists', () => { expect(typeof commands.clap).toBe('function') }) }) describe('save slash command', () => { test('function exists', () => { expect( typeof commands.save).toBe('function') ...
/** * Created by duoyi on 2017/3/8. */ const Koa = require('koa') const path = require('path') const staticSever = require('koa-static') // 处理URL const router = require('koa-router')() // api编写 const START = require('./router') // 处理返回参数体 const bodyParser = require('koa-bodyparser') // rest const rest = require('./mi...
class staticObject{ constructor(vPos, vDim, oOptions){ this.pos = vPos || new vector(0,0); this.dim = vDim || new vector(16,16); this.swiss(oOptions, "all"); //game.renderer.push(this); } } staticObject.prototype.centerOver = function(oObj){ ...
const Engine = Matter.Engine; const World = Matter.World; const Bodies = Matter.Bodies; var stone, rubber, hammer, plane; function setup() { createCanvas(800, 700); engine = Engine.create(); world = engine.world; plane = new Plane(400, 690, 800, 20); hammer = new Hammer(100, 20); rubber = new Rubber(650, 600...
'use strict'; let Layout = Reach.component('Layout.BaseLayout'); let theme = require('../theme.js'); export default class BaseView extends React.Component { render () { return ( <Layout theme={theme} /> ); } }
module.exports = function (app) { app.directive('quizLogin', [quizLogin]); function quizLogin() { return { template: require('./login.template.html'), scope: { user: "=", }, controller: function ($scope, $mdDialog) { $...
sap.ui.define([ "sap/ui/core/mvc/Controller", "sap/ui/core/routing/History", "sap/ui/core/UIComponent" ], function(Controller, History, UIComponent) { "use strict"; return Controller.extend("sap.f.sample.ShellBarWithSplitApp.controller.BaseController", { USER_SESSION_PATH: "currentUser", getRouter() { ret...
import React from 'react' import Auth from 'AuthService' import Avatar from 'components/Avatar' import { Button, Input } from 'forms/material/Material' import { Grid, Cell } from 'Grid' var Register = React.createClass({ getInitialState() { return { email: '', first_name: '', ...
$(document).ready(function(){ verificar_editar(); verificar_borrar(); }); function verificar_editar(){ $.ajax({ url: '/cuentas/notificar_editar_empresa/', dataType: 'json', success : function(response){ if (response.result == true){ showNotificationSucces...
var compare = require('../lib/index.cjs.js'); var expect = require('chai').expect; describe('版本号比较测试', function () { it('v1大于v2', function () { expect(compare('11.23.2', '11.21.2')).to.be.equal(true); }); it('v1大于v2', function () { expect(compare('11.23.20000', '11.23.00001')).to.be.equal(true); }); ...
process.env.NODE_ENV = "test" const db = require("../db"); const request = require("supertest"); const app = require("../app"); beforeAll(async () => { await db.query(`CREATE TABLE books ( isbn TEXT PRIMARY KEY, amazon_url TEXT, author TEXT, language TEXT, pages INTEGER, p...
const jwt = require('jsonwebtoken'); const httpEnum = require('../enum/Ehttp'); const auth = (request, response, next) => { const authHeader = request.headers.authorization; if (!authHeader) { return response.status(httpEnum.httpStatusCode.UNAUTHORIZED).json({ message: 'Token is required!' }); } ...
import { api } from "./api"; const fetchUserByName = (username) => ( api.get('users/' + username) ); const fetchUsers = (activated = true) => ( api.get('users', { params: { Activated: activated } }) ); const deleteUser = (username)=> ( api.delete('users/' + username) ); const createUser = (use...
import { render, Component, zero_react_create } from './zero-react.js' class MyComponent extends Component{ render(){ return <div><h1>zero component</h1> {this.children} </div> } } render(<MyComponent id="a" class="c"> <div>abc</div> <div/> <div/> </MyComponent>, docume...
import { applyMiddleware, bindActionCreators, combineReducers, createStore } from "redux"; import Reducer from "./reducer"; import StateConnector from "./state-connector"; import { convertDirectoryNotationToObject } from "./utils"; /* ##################################################################### Publ...
// 任务类型及状态值 module.exports = { 'DEFAULT': { name: '无任务', }, 'BUILD': { name: '构建', states: { 'init': '未执行', 'process': '进行中', 'failure': '失败', 'success': '成功', } }, 'INSTALL': { name: '安装包', states: { 'init': '未执行', 'process': '进行中', 'failure':...
App.factory("Concursos", function($resource) { return $resource("/api/concursos"); });
module.exports = { // 对服务器的配置 devServer: { host: 'localhost', // host和port设置nodejs启动服务的端口 port: 8888, proxy:{ // 代理跨域 '/api': { // 遇到'/api'路径时进行下面的操作 target: 'http://mall-pre.springboot.cn', // 将'/api'前面的源地址换成这个,和下面的参数配合使用 changeOrigin: true, pathRewrite: { '/api...
import Typography from "@material-ui/core/Typography"; import Grid from "@material-ui/core/Grid"; import {BaristaPageCard} from "../BaristaPageCard"; import {useDispatch, useSelector} from "react-redux"; import {useEffect} from "react"; import {fetchProducts} from "../../../redux/slices/productsSlice"; import {Circular...
import React from "react"; import PropTypes from "prop-types"; import cn from "classnames"; const Section = ({ className, sectionTitle, isVisibleTitle = false, children, }) => { return ( <section className={className}> <h2 className={cn({ "visually-hidden": !isVisibleTitle })}> {sectionTitl...
/* * Adapted from code by Brian Donohue */ 'use strict'; const adafruitIO_username = 'example'; exports.handler = function (event, context) { try { console.log("event.session.application.applicationId=" + event.session.application.applicationId); if (event.session.new) { onSessionSta...
import React, { useRef } from 'react' import config from "../../config" const Header = (props) => { const current_user = props.locals && props.locals.current_user const inputSearchRef = useRef() const handleKeyDown = (e) => { if(e.keyCode === 13) { window.open(`https://www.google.com.hk/#hl=zh-CN&q=site:cnode...
const express = require('express') const router = express.Router() router.use(express.json()) const Joi = require('joi') const uuid = require('uuid') const mongoose = require('mongoose') const objectId = require('mongoose').objectid //needed to access by id const jwt = require('jsonwebtoken') const tokenKey = require(...
var defaultUrl = "https://mhsprod.jira.com"; document.addEventListener('DOMContentLoaded', function () { document.querySelector('button').addEventListener('click', save); onload(); }); function onload() { var url = localStorage.getItem("url"); var projectKey = localStorage.getItem("projectKey"); i...
var gulp = require('gulp'); var sass = require('gulp-sass'); var postcss = require('gulp-postcss'); var autoprefixer = require('autoprefixer'); var cssnano = require('cssnano'); var sourcemaps = require('gulp-sourcemaps'); var browserSync = require('browser-sync').create(); var paths = { styles: { src: "sr...
(function() { 'use strict' angular .module('atentamente') .factory('authModal', authModal) function authModal($uibModal, Auth) { var service = { openRegister: openRegister, openLogin: openLogin, close: close } var currentModal return service function openRegister() { ...
import axios from 'axios'; const spotifyBaseUrl = 'https://api.spotify.com'; const clientId = '96bc7b491f9e41b694ac65c3985a6270'; const redirectUri = 'http://localhost/genre-gradient/callback'; axios({ url: `${spotifyBaseUrl}/v1/browse/categories`, method: 'GET' }).then( response => { console.log(response) }, e...
import React, { Component } from "react"; import PDFview from "../PDFview/PDFview" import "./Documents.scss"; class Documents extends Component { constructor(props) { super(props); this.state = { documents: [], show_pdf: false, pdf_url: "", }; this.handleOnClick = this.handleOnClic...
import { all } from "redux-saga/effects"; import watchStories from "./stories"; import watchAutocompletes from "./autocompletes"; export default function* rootSaga() { yield all([watchAutocompletes(), watchStories()]); }
'use strict'; import React, { Component } from 'react'; import { Link } from 'react-router'; export default ({ cookie, plusItemzToCart }) => ( <div className="col-xs-18 col-sm-6 col-md-3"> <div className="thumbnail"> <div className="cookieContainer"> <img className="cookieImage" src={cookie.photo}...
import {useState,useEffect} from 'react' const useStickyState = (initialState,key) => { const [state, setState] = useState(()=> (JSON.parse(localStorage.getItem(key)) ?? initialState)) useEffect(() => { localStorage.setItem(key,state) }, [state]) return [state,setState] } export default use...
const types = { SET_PET: "SET_PET", }; export const setPet = (pet) => { return { type: types.SET_PET, payload: pet, }; };
/** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, images: { domains: ['https://kimzerovirus.github.io'], format: ['image/png', 'image/webp', 'image/jpeg'], }, // webpack(config) { // config.resolve.modules.push(__dirname); // return config; // }, env: { BASE_URL: proc...
import { FETCH_DATA } from '../actions/search_actions'; import { receiveAllTasks } from '../actions/task_actions'; import { fetchData } from '../util/search_api_util.js'; let defaultState = {}; const SearchMiddleware = ({ dispatch }) => next => action => { const searchSuccess = data => { dispatch(receiveAllTa...
//https://www.hackerrank.com/challenges/utopian-tree/problem function growthCyles(cycles) { let total = 0 cycles++ for (index = 0; index <= cycles; index++) { index % 2 ? total += 1 : total *= 2 } return total } function utopianTreeGrowth(treeGrowth) { const result = Array() result.push(...treeGrowth.slice...
/** * Created by Brandon Garling on 12/4/2016. */ const Sequelize = require('sequelize'); const databaseManager = require('../user_modules/database-manager'); const configMap = require('./maps/config.map'); module.exports = {}; /** * A Config model, this holds user information * @type {*} */ const Config = datab...
import * as actionTypes from './actionTypes'; // an action creator export const increment = () => { return { type: actionTypes.INCREMENT }; }; export const decrement = () => { return { type: actionTypes.DECREMENT }; }; export const add = n => { return { type: actionTypes.ADDITION, addend: n...
function onSignIn(googleUser) { var profile = googleUser.getBasicProfile(); console.log('ID: ' + profile.getId()); console.log('Name: ' + profile.getName()); console.log('Image URL: ' + profile.getImageUrl()); console.log('Email: ' + profile.getEmail()); // send data to LoginController var ...
import { addPendingOrder, addConfirmedOrder } from "./actionTypes"; export const addPendingOrderAC = (pendingOder) => ({ type: addPendingOrder, pendingOder, }); export const addConfirmedOrderAC = (confirmedOrder) => ({ type: addConfirmedOrder, confirmedOrder, });
import logo from './logo.svg'; import './App.less'; import { Button } from 'antd'; import 'antd/dist/antd.css'; import './index.css'; import { Layout, Menu, Breadcrumb } from 'antd'; import { UserOutlined, LaptopOutlined, NotificationOutlined } from '@ant-design/icons'; const { SubMenu } = Menu; const { Header, Conte...
import Vue from 'vue'; import Router from 'vue-router'; import TheIndex from '@/components/TheIndex'; import IssueList from '@/components/IssueList'; import AdditionalPage from '@/components/AdditionalPage'; import ColleagueList from '@/components/ColleagueList'; import AuthorList from '@/components/AuthorList'; impor...
import React from 'react' const Planet = () => { return <div className="planet"></div> } export default Planet
// Concatenação de String const nome = 'Nicolas' const concatenacao = "Ola" + nome + "!" // Jeito "feio" de concatenar const template = `Olá ${nome}!` // Usando Template console.log(template) // Expressões matemáticas console.log(`1 + 1 = ${1+1}`) // Chamando Funções const up = texto => texto.toUpperCase() console...
"use strict"; exports.getRelativeOffset = getRelativeOffset; function getRelativeOffset(targetElement, sourceElement) { var offset = { left: 0, top: 0 }; var currentElement = sourceElement; while (currentElement && currentElement !== targetElement) { var parentOffsetElement = currentElement.offse...
let getNombre = async () => { return 'Juan Diego Osorio Castrillón' } let getNombre2 = () => { return new Promise((resolve, reject) => { setTimeout(() => { resolve('Juan') }, 3000); }) } let saludo = async () => { let nombre = await getNombre2(); return `Hola ${nombre...
/** * @author Hamza Waqas <hamzawaqas@live.com> * @since 4/3/15 */ ; (function () { 'use strict'; var expect = require('chai').expect, Clue = require('../'); describe('#clue', function() { describe('validates', function() { it('initialization and instance', function() { expect(Cl...
import React, { Component } from 'react'; import Todoinput from './Todoinput'; import Todoing from './Todoing'; import './todolist.css'; export default class Todolist extends Component { constructor(){ super(); this.state = { todoF:JSON.parse(localStorage.getItem('Ndone')) ||[], ...
define([ 'sgc-mongoose-model', 'chai' ], function(RemoteModel, chai)  { 'use strict'; return function() { var expect = chai.expect; var Model = RemoteModel.Model; var Collection = RemoteModel.Collection; describe('Test Model validation ', function() { it('test vali...
/** * 睡眠 * * @export * @param {*} millisecond 毫秒 */ export async function sleep(millisecond) { await (() => new Promise((resolve) => setTimeout(resolve, millisecond)))(); }
var player = { pos: null, render: true, img: null, scale: { width: 55, hieght: 55 }, movespeed: 3, bounds: { x: 0, y: 0 }, animations: {}, animationFrame: 1, animationFrameCounter: 0, currentAnimation: 'idle', lastAnimation: 'idle', Spawn: function (pos) { this.pos = pos this.animations...
$(document).ready(function() { var reader = new FileReader(); reader.addEventListener('load', function() { $('.image-view').attr('src', reader.result); $('.image-original').attr('src', reader.result); }, false); $('.image-upload').on('change', function() { reader.readAsDataURL(this.files[0]); }); $('.filter...
"use strict"; dinnerApp.controller('PaymentCtrl', [ '$scope', '$state', 'UserManager', 'SharedService', 'LoadingService', 'InitService', function($scope, $state, $userManager, $sharedService, $loadingService, $initService ...
import * as pokemonActions from './pokemons' export { pokemonActions }
(function(angular) { 'use strict'; // Referencia para o nosso app var app = angular.module('app'); // Cria o controlador de autenticação app.controller('ProfileController', ['$scope', '$location', 'User', function($scope, $location, User) { $scope.authUser = User.getAuthenticated(); // Redireciona para a ...
import React from 'react' import { Provider } from 'react-redux' import Navbar from './Navbar' import FrontPage from './FrontPage' import { Route, Switch } from 'react-router-dom' import PostPage from './PostPage' const App = ({ store }) => { return ( <Provider store={store}> <div className="page layout"> <...
'use strict'; const hakukentta = document.getElementById('hakukentta'); const nappi = document.getElementById('nappi'); const tulostusloota = document.getElementById('tuloslaatikko'); // kun nappia painetaan nappi.addEventListener('click', function () { // hae hakukentän teksti (value) const hakusana = hakuk...
/* * @Author: huangyuhui * @Date: 2020-11-06 15:43:48 * @LastEditors: huangyuhui * @LastEditTime: 2020-11-19 11:25:49 * @Description: 全局过滤器 * @FilePath: \customs-system\src\filters\index.js */ /** * boolean 转 文字 过滤器 (自带语言) * @param { number | boolean } value 需要转换的值 * @return {string} * @example true | forma...
export { default } from './ImageSM'
let readlineSync = require('readline-sync'); let days_worked = readlineSync.question("Days worked:") days_worked = (days_worked*30); let ps4=200; let Samsung_phone=900; let TV=500; let game_skin=9.99; let total = (days_worked /ps4 |0 ); let total1 = (days_worked /Samsung_phone |0); let total2 =(days_worked...
const express=require('express') const morgan=require('morgan') const cors=require('cors') const axios=require('axios') const app=express() const mongoose=require('mongoose') const Person=require('./models/Person') const url=process.env.MONGODB_URI morgan.token('data',(req) => { if(req.body!==undefined) return JS...
/* * grunt-maven * https://github.com/adam/grunt-maven-npm * * Copyright (c) 2014 Adam Dubiel * Licensed under the Apache-2.0 license. */ 'use strict'; module.exports = function(grunt) { var gruntCWD = process.cwd(); grunt.initConfig({ jshint: { all: [ 'package.json...
module.exports = function () { let popupClose = document.querySelector('.popup-close'); let popupCont = document.querySelector('.popup-home__wrap'); let popupHome = document.querySelector('.popup-home'); let popupTitle = popupHome.querySelector('.popup-home__title'); let popupSquare = popupHome.que...
__resources__["/naughty.js"] = {meta: {mimetype: "application/javascript"}, data: function(exports, require, module, __filename, __dirname) { function Circle(x, y, r, color) { this.x = x; this.y = y; this.r = r; this.fateX = -10; this.fateY = -10; this.destX = -10; this.destY = -10; this.alpha = 0; ...
import React, { useRef, useState, useEffect } from 'react' import ReactDatePicker from 'react-datepicker' import { useField } from '@unform/core' import { registerLocale } from 'react-datepicker' import es from 'date-fns/locale/pt-BR' import 'react-datepicker/dist/react-datepicker.css' import './styles.css' registerLoc...
import React from "react"; import { Input } from "antd"; import { useRouter } from "next/router"; import { useSelector, useDispatch } from "react-redux"; import styled from "styled-components"; import { fetchPosts } from "../../actions/fetchPosts"; import { UPDATE_TEXT_SEARCH, UPDATE_CURRENT_PAGE } from "../../actions/...
function renderSurveys(surveys) { var surveysHTML = surveys.map(function(survey){ return ` <form class="mx-auto my-5 w-50"> <h1>${survey.title}</h1> <hr/> ${renderFields(survey.fields)} <button class="btn btn-primary" type="submit">...
import React from 'react'; import Delete from './Delete'; import Edit from './Edit'; import EditForm from './EditForm'; class Overview extends React.Component{ constructor(props){ super(props); this.handleEditClick =this.handleEditClick.bind(this); this.resetState = this.resetState.bind(this); this.s...
'use strict' const path = require('path') function readPkg (root) { return require(path.resolve(root, 'package.json')) } module.exports = readPkg
const RecipesTypes = { SET_RECIPES: 'recipes:set', SET_RECIPE: 'recipe:set', } export default RecipesTypes
import styled from '@emotion/styled'; const Notepad = styled.div` height: 193px; width: 136px; background: linear-gradient( to bottom, #f17777 0, #f17777 34px, #fff 34px, #fff 62px, #cee8ef 62px, #cee8ef 66px, #fffefe 66px, #fff 90px, #cee8ef 90px, #cee8ef 94px, #f...
const app = getApp() Page({ data: { type: null, id:null, companyName: null, now: null, shop_name: null, begin_date: null, end_date: null, recruit_name: null, content: null, selectedWorkType: null, selectedWorkPlace: null, selectedJobType: null, selectedMoneyType: nu...
App.HomeBooktabLocationController = Ember.Controller.extend({ filter: { selectedDay: { id: '2' }, selectedLocation: { id: '1' } }, selectedLocationChanged: function() { // trigger filter here and get items from server this.transitionToRoute('home.booktab.location.items', this.get('filter.selected...
module.exports = (item, headerStructure, index) => { return Object.assign( {}, headerStructure, {number: index + 1}, item, { date: item.date .toISOString() .substr(0, 10) .replace(/-/g, '‑'), // Replace hyphen-minus with hyphen description: item.description.trim...
import React from "react"; import LoadingDots from "./components/LoadingDots"; // import './App.css'; function App() { return ( <div className="App"> <div className="display-flex"> <LoadingDots /> </div> </div> ); } export default App;
import React from 'react' import AppBar from "@material-ui/core/AppBar"; import Toolbar from "@material-ui/core/Toolbar"; import Typography from "@material-ui/core/Typography"; import Button from "@material-ui/core/Button"; import Container from "@material-ui/core/Container"; import {makeStyles} from "@material-ui/core...
const express = require('express'); const bodyParser = require('body-parser'); const sqlite = require('sqlite3'); let app = express(); app.use(bodyParser.json()); app.use(express.static('public')); var initDatabase = (conn) => { conn.run('CREATE TABLE IF NOT EXISTS messages(id INTEGER PRIMARY KEY, subject TEXT NO...
"use strict" // stuff for browser interact with server const express = require('express'); const passport = require('passport'); const cookieSession = require('cookie-session'); const GoogleStrategy = require('passport-google-oauth20'); const port = 51296 const googleLoginData = { clientID: '345177041735-u836nsbrf...
/* @flow */ /* ********************************************************** * File: test/jestSetup.js * * Brief: Sets up the Jest environment. Runs before each test * suite. Passed as argument to runTest.js * * Authors: Craig Cheney * * 2017.11.06 CC - Document created * **************************************************...
const lowerCaseDrivers = (drivers) => { return drivers.map(driver => driver.toLowerCase()) }; const nameToAttributes = (drivers) => { return drivers.map(driver => { let first = driver.split(' ')[0] let last = driver.split(' ')[1] return {firstName: first, lastName: last} }) }; cons...
module.exports = { 'The story show page contains the story title': browser => { browser.page.storyShowPage().navigate() browser.expect.element('#app').to.be.visible.after(5000) browser .expect.element('h2') .to.be.visible.after(2000) .and.to.have.text.that.equals('Monochrome example sto...
module.exports = (bh) => { bh.match('map__container', (ctx) => { ctx.attr('id', 'map'); }); };
const discord = require('discord.js'); module.exports.run = async(client, message, args) => { const muteUser = message.mentions.members.first() || message.guild.members.cache.get(args[0]); const muteRole = message.guild.roles.cache.find(r => r.name === 'muted'); if(message.mentions.users.size < 1) r...
export default () => { const speed = 1000 $('a[href^="#"]').on('click', function() { const target = $(this.hash) if (!target.length) return const targetY = target.offset().top $('html,body').animate({ scrollTop: targetY }, speed, 'easeOutExpo') return false }) }
const express = require('express'); const path = require('path'); const mongoose = require('mongoose'); const cookieParser = require('cookie-parser'); const logger = require('morgan'); require('dotenv').config({ path: '.env' }); const cors = require('cors') const helmet = require('helmet') const router = require('./n...
const youtubeDecoder = (function(){ const ytDomain = '.youtube.com'; const mainDescSelector = '#description.ytd-video-secondary-info-renderer'; const commentSectionSelector = 'ytd-comments#comments, ytm-comment-section-renderer'; const commentSelector = 'ytd-comment-renderer, ytm-comment-renderer'; ...
// Design Basic Game Solo Challenge // This is a solo challenge // Your mission description: // Overall mission: Miner Tom has to dig out 3 pieces of good diamond // Goals: to collect 3 pieces of good diamond // Characters: Miner Tom // Objects: Miner, diamond // Functions: Explore(), a function to explore diamonds...
import React from 'react'; import CollocationSuccessImg from '@/icons/Collocation/collocate_success.svg'; import Link from 'next/link'; import ContentLessTopBar from '@/components/TopBar/content_less_header'; import Button from '@/components/Button'; import withAuth from '@/core/utils/protectedRoute'; const Collocatio...
var numero = prompt(parseFloat("informe um numero menor ue 10: ")) if(isNaN(numero)){ alert("O valor digitado não é um numero") }else{ while(numero <= 10){ console.log("while:"+numero) numero++ } do { console.log("do:"+numero) numero++ } while(numero <= 10) for...
import React, { Component } from "react"; import Comment from "./Comment"; import "./Comments.css"; import Comments from "./Comments"; import { getComments, postComment } from "../../services/movieService"; import { getCurrentUser } from "../../services/authService"; class index extends Component { constructor(props)...
const topics = ["Angry", "Disgusted", "Fearful", "Happy", "Sad", "Surprised"]; for (let i = 0; i < topics.length; i++) { $("#buttonArea").append("<button type='button' class='btn btn-light gif-button' data-search='" + topics[i] + "'>" + topics[i] + "</button>") let queryURL = "https://api.giphy.com/v1/gifs/sea...
let userNumber = prompt("Type your number"); function getTheNumber(a) { console.log(a); } getTheNumber(userNumber);
export default (name) => console.log(`Hello there, ${name}!`); const createCard = (Title,Poster,Plot,Ratings,Rated,id,Production,Runtime,Released,Genre,Director) => { let tempCard = ""; tempCard += `<div class="MovieCard">`; tempCard += `<div class="titlebox"><h2 class="MovieTitle">${Title}</h2><img alt="...
let divide = () => { return 2000 / 100 } const square = (number) => { return number * number } const add = (num1, num2) => { return num1 + num2 }
/*When the user accepts the ToS, they should be taken to the Home Screen*/ function accept(){ window.location.href = "homeScreen.html"; } /*When the user declines the ToS, the app should close*/ function decline(){ navigator.app.exitApp(); }
$(document).ready(function(){ $('.side-li').each(function(index){ $(this).click(function(){ $('.side-li').children().removeClass('li-active'); $('.side-li').eq(index).children().addClass('li-active'); }); }); $('.container-title a:first-child').click(function(){ $('.side-bar').toggle('fast'); $('.conta...