text stringlengths 7 3.69M |
|---|
const tipoDeSuscripcion = "Expertplus";
// switch (tipoDeSuscripcion) {
// case "Free":
// console.log("Solo puedes tomar los cursos gratis");
// break;
// case "Basic":
// console.log("Puedes tomar casi todos los cursos de Platzi durante un mes");
// break;
// case "Expert":
// ... |
const plugins = [
require("tailwindcss")("./tailwind.js"),
require("autoprefixer")
];
if (process.env.NODE_ENV === "production") {
plugins.push(
require("postcss-purgecss")({
content: ['../**/*.html.eex']
})
);
}
module.exports = {
plugins: plugins
};
|
var userController = require('../controllers/UserController');
module.exports = function (app) {
app.post('/user/getUserBy', function (req, res) {
console.log('/user/getUserBy', req.body)
userController.getUserBy(req.body, function (err, task) {
if (err) {
res.send(err... |
const express = require('express')
const user = express.Router()
const cors = require('cors')
const jwt = require("jsonwebtoken")
const bcrypt = require('bcrypt')
const User = require("../models/User")
user.use(cors())
const World = require("../models/World")
var nodemailer = require('nodemailer');
var $usuario = 'm... |
import * as uuid from "uuid";
import
export default function createCustomer(reader){
const customerNew = {
id : uuid.v4(),
firstname : "",
lastName : "",
email : "",
birthday : "",
city : "",
country : "",
};
reader.question ("firstname ", (firs... |
import React from 'react';
const InputWrapper = ({reduxFormData, ...rest}) => do {
<input {...rest} value={reduxFormData.value} onChange={reduxFormData.onChange}/>
}
export default InputWrapper;
|
// Configure moment.js
moment.locale('en', {
calendar: {
lastDay: '[yesterday]', // switch these three to initial lowercase
sameDay: '[today at] LT', //
nextDay: '[tomorrow at] LT', //
lastWeek: '[last] dddd',
nextWeek: 'dddd [at] LT',
sameElse: 'D MMM YYYY'
}
});
// Initialize y... |
var primeirovalor = parseInt(prompt("Digite o primeiro Valor: "))
var segundovalor = parseInt(prompt("Digite o segundo valor: "))
var operaçoes = prompt("Digite 1 para multiplicação, 2 para divisão, 3 para subtração e 4 para multiplição")
if (operaçoes == 1) {
var resultado = primeirovalor * segundovalor
... |
function valida_login() {
var user = document.getElementById('login').value;
var senha = document.getElementById('senha').value;
var tag = true;
if (user == "") {
alert("Parece que você esqueceu de preencher o login.");
tag = false;
}
if (senha == "") {
alert("Parece que ... |
const mongoose = require('mongoose');
const Mixed = mongoose.Schema.Types.Mixed;
const pointSchema = new mongoose.Schema(
{
type: {
type: String,
enum: ['Point'],
},
coordinates: {
type: [Number],
default: undefined,
},
},
{ _id: false }
);
const translatedSchema = new mo... |
/* global describe, beforeEach, it, browser, expect */
'use strict';
var CoursesPagePo = require('./courses.po');
describe('Courses page', function () {
var coursesPage;
beforeEach(function () {
coursesPage = new CoursesPagePo();
browser.get('/#/courses');
});
it('should say CoursesCtrl', function (... |
import {PRODUCT_DELETE, PRODUCT_ADD, PRODUCT_UPDATE, PRODUCT_LOAD} from '../actions'
import { CATEGORIES } from '../../constants';
const initialState = {
list: [{
id: 0,
name: 'Bier',
price: 3.50,
createdBy: 0,
category: CATEGORIES.DRINKS,
timestamp: 1560461260985
... |
import React from 'react';
import classes from './Modal.css';
import Backdrop from '../Backdrop/Backdrop';
import Aux from '../../../hoc/Wrapper';
const Modal = (props) => {
return (
<Aux>
<Backdrop show={props.show}>
<div className={classes.modal}>
<div clas... |
const { Router } = require('express');
const Animal = require('../models/Animal');
module.exports = Router()
.post('/', (req, res, next) => {
Animal
.insert(req.body)
.then(animal => res.send(animal))
.catch(next);
})
.get('/', (req, res, next) => {
Animal
.find()
.then(an... |
var express = require('express');
var mysql = require('./dbcon.js');
var app = express();
app.set('port',3000);
var CORS = require('cors');
app.use(CORS());
var handlebars = require('express-handlebars').create({defaultLayout:'main'})
app.engine('handlebars',handlebars.engine);
app.set('view engine','handlebars');
v... |
import React from "react"
const TableOfContents = ({ html }) => {
return (
<div>
<h2>📚 Table of Contents</h2>
<div className="toc" dangerouslySetInnerHTML={{ __html: html }} />
</div>
)
}
export default TableOfContents
|
var express = require('express');
var MongoClient = require('mongodb').MongoClient
var bParser = require('body-parser');
var app = express();
var counter = 0;
var enteredTask;
app.use(function (req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers",... |
var jotaTranscend2 = function(){
var self = function(data){
this.newdoc = null;
this.doc = null;
this.coll = [];
this.recovery = null;
this.total = 0;
this.obtained = 0;
this.getFrom = 0;
this.increase = false;
this.action = null;
this.output = [];
this.filter = [];
this.totalp... |
import React from 'react'
/**
* Componente para crear la tarjeta de los cursos
* @param {string} title Título del curso
* @param {string} image Imagen del curso
* @param {string} link Enlace hacia donde abrirá el curso seleccionado
* @returns CourseCard
*/
function CourseCard({title, image, link}) {
return ... |
'use strict'
const cities = [
'San Jorge',
'San Francisco',
'San Fernando del Valle de Catamarca',
'San Antonio Oeste',
'Salta',
'Rufino',
'Rosario',
'Río Tercero',
'Río Segundo',
'Río Gallegos',
'Río Cuarto',
'Río Ceballos',
'Rawson',
'Rafaela',
'Quitilipi',
'Punta Alta',
'Puerto Mad... |
(function(){
var closeButton = $('.order-button_close'),
modalForm = $('#modalForm');
$(document).ready(function() {
var submitButton = $('#submit');
submitButton.on('click', function(e){
var name = $('#username').val(),
tel = $('#tel').val();
if(name && tel) {
e.preventDefaul... |
const fs = require('fs')
module.exports = class Service{
static async getInfo(options){
let name = options.name
}
} |
/**
* @author Shreya Jain
*/
const Constants = require('./constants');
const RailRoad = require('./RailRoad');
class RailRoadMonopoly {// implements Monopoly{
constructor(propertiesIncluded) {
this.propertiesIncluded = propertiesIncluded;
}
updateRents() {
for(i=0;i<propertiesIncluded.length... |
// Filename: collections/Entries.js
define([
'jquery',
'underscore',
'backbone',
'models/Entry'
], function($, _, Backbone, Entry){
return Backbone.Collection.extend({
model: Entry,
initialize: function(){
},
parse: function(response) {
return response.data;
},
url: '/api/content.json',
c... |
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dev: {
files: {
'library/css/style.css': 'library/scss/style.scss',
'library/css/ie.css': 'library/scss/ie.scss'
},
options: {
sourceMap: t... |
import React from "react"
const FacebookIcon = ({ width, height, className, strokeColor }) => (
<svg
id="facebook-icon"
xmlns="http://www.w3.org/2000/svg"
className={className}
width={width}
height={height}
viewBox="0 0 220.09 220.09"
>
<title>Facebook Page Icon</title>
<path
... |
import { combineReducers } from 'redux'
import { routerReducer } from 'react-router-redux'
import MovieReducer from "./MovieReducer"
import AppReducer from "./AppReducer"
export default combineReducers({
routing: routerReducer,
appReducer: AppReducer,
movieReducer: MovieReducer
}) |
const fs = require("fs");
const { FB } = require("fb");
// const React = require("react");
// const ReactDOMServer = require("react-dom/server");
app.get("/api/products", passport.authenticate("userPrivate"), (req, res) => {
const {
q,
page,
perPage,
sort,
order,
category,
dateFrom,
d... |
var util = require('util'),
semver = require('semver');
function isValidVersion(value) {
return semver.valid(value);
}
function increment(version, increment) {
increment = increment || 'patch';
if (['major', 'minor', 'patch'].indexOf(increment) === -1) {
return increment;
} else {
... |
import React from 'react'
import Spinner from '../layout/Spinner'
import UserItem from './UsersItem'
import PropTypes from 'prop-types'
const Users = ({ users, loading }) => {
if (loading) {
return <Spinner />
}
else {
return (
<div style={UserStyle}>
{
... |
/*global window */
(function() {
"use strict";
var hashFuncSsimple = {
// Generate a key
genKey: function(len) {
return Math.random().toString(36).substring(2, len + 2);
},
// Return the computed Answer
genAnswer: function(k, M) {
var i;
var output = 0;
for (i = 0; i < k... |
//args[0] contains the numbers N, M and J. (J is number of jumps)
//args[1] contains the star position, R and C
//args[2] to args[2+J] contains the jumps.
//(R, C) with jump (-2, 3), Joro will go to position (R-2, C+3).
function solve(args){
var rowColJumps = args[0].split(' ').map(Number),
n = rowColJumps[0],
m =... |
"use strict";
/* You need the module.exports when testing in node. Comment it out when you send your file to the browser */
//module.exports = { findTitles, findAuthors, addBook }; //add all of your function names here that you need for the node mocha tests
let library = [
{ title: "The Road Ahead", author: "Bill... |
import {
cardsGetStands,
cardsGetMatch,
cardsGetSaveMyTeam,
getCardsTeamById,
cardsDetailTeam,
} from "./cardsHtml.js";
const base_url = "https://api.football-data.org/v2/";
const API_KEY = "8ff6f688c8a944d9a005fad7d831c4b3";
const id_tim = 2021;
const stands_url = `${base_url}competitions/${id_tim}/standing... |
import React from 'react';
import {Header} from './components/Header';
import {Banner} from './components/Banner'
import {Skills} from './components/Skills'
import{Projects} from './components/Projects'
import {Experience} from './components/Experience'
import {Contact} from './components/Contact'
import './App.css';
... |
const io = require("socket.io-client")
//const SERVER_URL = 'http://133.68.112.250:55555'
// const SERVER_URL = 'http://localhost:55555'
const SERVER_URL = 'https://zooneserver.herokuapp.com'
class SocketConnector{
constructor(){
this.socket = null
this.connect()
this.initEventListener()
this.initSocketEven... |
const projects = [
{
'id': '1',
'name': 'Project1',
'shortDescription': 'Sample short description',
'description': "This is a sample description for project1",
'start': '2016',
'image': 'http://placehold.it/200x200',
'cover': '11.jpg',
'link': 'https://myProject1',
},
{
'id': '... |
// http://josscrowcroft.github.com/open-exchange-rates/
var agent = require('superagent')
, cheerio = require('cheerio')
, moment = require('moment')
, feedParser = require('feedparser')
, _ = require('underscore');
cheerio.prototype.make = function(dom, context) {
if(dom.cheerio) return dom;
dom = (_.isA... |
const mongoose = require('mongoose');
mongoose.set('useCreateIndex', true)
const evaluationSchema = mongoose.Schema({
_id: mongoose.Schema.Types.ObjectId,
reviser: { type: mongoose.Schema.Types.ObjectId, required: true, ref: 'User' },
proposal: { type: mongoose.Schema.Types.ObjectId, required: true... |
// Kodilla task 11_4
function Phone(brand, price, color, isOverRated) {
this.brand = brand;
this.price = price;
this.color = color;
this.isOverRated = isOverRated;
}
Phone.prototype.printInfo = function() {
console.log("Phone brand is " + this.brand + ", color is " + this.color + ", for the price ... " + th... |
import React from 'react'
import {compose, withPropsOnChange, withState, withHandlers, onlyUpdateForKeys} from 'recompose'
import {withStyles} from '@material-ui/core/styles'
import Paper from '@material-ui/core/Paper'
import Table from '@material-ui/core/Table'
import TableBody from '@material-ui/core/TableBody'
impo... |
import Helper from '@ember/component/helper';
export default Helper.extend({
compute([string]) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
});
|
const join = require('../leftJoin/left-join');
const Hash = require('../hashtable');
const leftHash = new Hash(33);
const rightHash = new Hash(33);
describe('it should take two tables and do a left join on key', () => {
it('should return an array of arrays with all values from left table and any values from rig... |
/**
* Copyright (c) Benjamin Ansbach - all rights reserved.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
const AbstractInt = require('./AbstractInt');
const BC = require('./../../BC');
const Endian = require('./../../Endian');
co... |
const express=require('express')
const fs=require('fs')
const mongodb=require('mongodb')
// const mongoose=require('mongoose')
const mongoose = require('mongoose');
const path=require('path')
const bodyParser = require('body-parser')
const cors=require('cors')
const app = express();
const route = require('./routes/ro... |
import git from '..'
import fs from 'fs'
import stream from 'stream'
import streamEqual from 'stream-equal'
import { copyFixtureIntoTempDir } from 'jest-fixtures'
describe('pack', () => {
test('git.pack', async () => {
// Setup
let dir = await copyFixtureIntoTempDir(__dirname, 'test-pack.git')
// Test
... |
/*
* this file contains all routes regarding the users
*/
const showPages = require("../util/showPages");
const authentication = require("../util/authentication");
const userFunctions = require("../util/usersFunctions");
module.exports = function (app) {
app.get(["/Profile", "/profile"], function... |
import React from 'react';
const firstName = "Giuseppe";
const lastName = "Vigneri"
const date = new Date();
const styles = {
color:'red',
fontWeight:'bold',
fontSize: '24px',
}
styles.color = 'blue';
const Arrow = (props) => (
<div>
<p style={styles}>Questa è un'arrow function!</p>
... |
import firebase from "firebase/app";
// Add the Firebase services that you want to use
import "firebase/auth";
import "firebase/firestore";
import "firebase/storage";
let config = {
apiKey: process.env.REACT_APP_FIREBASE_APIKEY,
authDomain: process.env.REACT_APP_FIREBASE_AUTHDOMAIN,
databaseURL: process.env.REACT_... |
const path = require('path')
const fs = require('fs')
const { promisify } = require('util')
const { zip, omit } = require('lodash')
const glob = require('glob')
const cheerio = require('cheerio')
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const CopyPlugin = require('copy-webpack-plugin')
const... |
const $ = jQuery = jquery = require ("jquery")
const common = require ("cloudflare/common")
const notification = require ("cloudflare/core/notification")
function initialize ( event, data ) {
$(data.section).find ("[name='value']").val ( data.response.result.value )
$(data.section).removeClass ("loading")
}
functio... |
var csv = require("./Csv");
var csvs = ["GameData.csv", "GameData.tsv"];
var json = csv.parse(csvs[0], 'csv');
csv.writeJson("GameData.json", json);
csv.writeHtml("GameData.html", json); |
/**
* Module dependencies.
*/
const mongoose = require('mongoose'),
// config = require('../../config/config'),
Schema = mongoose.Schema;
/**
* GameLog Schema
*/
const GameLog = new Schema({
id: {
type: Number
},
playerId: {
type: String
},
gameId: {
type: String
},
winner: {
type: ... |
var browserify = require('browserify');
var gulp = require('gulp');
var source = require('vinyl-source-stream');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
/** JS **/
var browserify_tasks = [];
browserify_tasks.forEach(function(task){
... |
function ApplicationController(allControllers) {
this.foodController = allControllers["foodController"]
this.formController = allControllers["formController"]
}
ApplicationController.prototype = {
bindListeners: function() {
this.foodController.bindFoodListeners()
this.formController.bindFormListerns()
... |
'use strict';
import React from 'react';
import {
View,
} from 'react-native';
module.exports = View;
|
import React from 'react';
import './App.css';
import Hero from "./Hero.js"
import Language from "./Languages.js";
import Education from "./Education.js"
import 'bulma/css/bulma.css';
import heroImage from "./images/heroImage.jpg";
function App() {
return (
<div>
<section className="App" class="hero">
... |
export const utilService = {
saveToStorage,
loadFromStorage,
makeId,
getRandomColor,
};
function saveToStorage(key, value) {
localStorage.setItem(key, JSON.stringify(value) || null);
}
function loadFromStorage(key) {
let data = localStorage.getItem(key);
return data ? JSON.par... |
const express = require("express");
const controller = require("./controller");
const { verifyToken } = require("../../utils/verifyToken");
const router = express.Router();
const handler = express.Router();
handler.post("/:teamId", verifyToken, controller.createRequest);
handler.delete("/", verifyToken, controller.de... |
//Global Variables
var schoolName="Vision Public School";
var schoolLogoPath="img/TreeVision.png";
var menu1="Academics";
var menu2="Branches";
var menu3="Admin";
var menu1_options = ["Curriculum", "Faculty"];
var menu1_options_location = ["home.jsf", "https://www.google.com"];
var menu2_options = ["New Y... |
const Noise = window.noise
const frame = document.getElementById('container')
function createCanvas (dpi = 1) {
let canvas = document.createElement('canvas')
const width = parseInt(window.getComputedStyle(frame).width)
const height = parseInt(window.getComputedStyle(frame).height)
canvas.width = width * dpi
... |
// Javascript is the language I have used for the longest time
const foo = x => y => x + y;
|
const express = require("express");
const { Client } = require("pg");
const router = express.Router();
const queries = require("../db/queries");
router.get("", (req, res) => {
const user_id = req.cookies["user_id"];
const client = new Client();
client
.connect()
.then(() => {
const sql = queries.ge... |
// Avoid `console` errors in browsers that lack a console.
(function() {
var method;
var noop = function () {};
var methods = [
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
'markTimeline', 'profile',... |
var util = require('./util'),
run = require('./shell').run,
config = require('./config'),
when = require('when'),
sequence = require('when/sequence'),
GitHubApi = require('github'),
repoPathParse = require('repo-path-parse'),
log = require('./log'),
tracker = require('./tracker');
var n... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsPackages = {
name: 'packages',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.04 6.01h-16v2h16v-2zM18.02 2.01H6.01v2H18.02v-2zM2 10v2h2v8a2 2 0 002 2h12a2 2 0 002-2v-8h2v-2zm9 9H6v-2h5z"/></svg>`
};
|
jest.unmock('postgraphile-core');
import pgPool, { poolConfig } from '../../__tests__/utils/pgPool';
import { postgraphile } from '..';
const COMMON_OPTIONS = {
exitOnFail: false,
};
test('When the handler is created using a Pool object, it can be released without triggering an error', async () => {
let handler ... |
/**
* Created by cl-macmini-149 on 31/01/17.
*/
'use strict'
const Joi = require('joi');
//create logger
const log = require('Utils/logger.js');
const logger = log.getLogger();
var gigHandler= require( 'handler/config/gigHandler.js' );
const HttpErrors = require('Utils/httperrors.js');
module.exports={};
module.ex... |
/*
* ProGade API
* http://api.progade.de/
*
* Copyright (c) 2012 Hans-Peter Wandura (ProGade)
* You can find the Licenses, Terms and Conditions under: "http://api.progade.de/api_terms.php" or "./license.txt"
*
* Last changes of this file: Nov 07 2012
*/
/*
@start class
@description
[en]This class has meth... |
var currentRecord = { data: {} };
var pageSize = 19;
Ext.Loader.setConfig({ enabled: true });
Ext.require([
'Ext.data.*',
'Ext.util.*',
'Ext.view.View',
'Ext.ux.DataView.DragSelector',
'Ext.ux.DataView.LabelEditor'
]);
//促銷折扣列表
Ext.define('GIGADE.PROMODISCOUNT', {
extend: 'Ext.data.Model',
... |
$(function() {
// Datepicker
$("input[type='text'].input-datepicker").pickadate({
formatSubmit: 'yyyy-mm-dd',
hiddenName: true
});
function EraseDelegate(key, route, selector) {
return function(e) {
var ele = $(this);
var itemId = ele.data(key);
... |
const http = require('http');
const { req$, resp$ } = require('../streams/streams');
const { sendWithCode } = require('../handlers/sendWithCode');
const { filter, tap } = require('rxjs/operators');
class ServerManager {
listen(port, cb) {
const server = this._createServer();
server.listen(port, cb)
}
_p... |
const solution = require('./index');
test('finds the minimum absolute sum of two elements of a', () => {
const a = [1, 4, -3];
expect(solution(a)).toEqual(1);
});
test('finds the minimum absolute sum of two elements of a', () => {
const a = [1, 7, -3, -7];
expect(solution(a)).toEqual(0);
});
test('finds the ... |
function CenterPiece(color, threeDimContext, children) {
this.context = threeDimContext;
this.color = color;
this.children = children;
}
CenterPiece.prototype.Draw = function(transformation) {
this.context.setTransformation(transformation);
DrawCenterCube(this.context, this.color);
l... |
angular.module('influences')
.controller('newArtistCtrl', function($scope, artistService, $state, allArtists, allGenres) {
this.createArtist = function(artist) {
artistService.createArtist(artist)
.then(function(res) {
console.log('Res is', res, 'in artistService');
$state.go('artist', {id: res.id... |
import React, { Component } from 'react'
import { ScrollView, Text } from 'react-native'
import PropTypes from 'prop-types'
import { Query } from 'react-apollo'
import get from 'lodash.get'
import repository from './repository.query'
import Loading from '../../common/Loading'
import RepositoryDetails from '../../common... |
import React from 'react';
let DashboardHeader = (props) => {
return (
<div className="row">
<div className="col-xs-12">
<h4 className="text-right user-name-display">Hi, User</h4>
<hr />
</div>
</div>
);
}
export default DashboardHeader;
|
/**
* Created by tanmv on 14/04/2017.
*/
'use strict';
const Redis = require('ioredis');
let list_redis = [];
module.exports = (conf, callback) => {
let connect_type = conf.connect;
let redis;
let bFirst = true;
if(connect_type === 'default') {
redis = new Redis(conf.default);
} else if(connect_type === 'sen... |
var x = 0;
|
angular.module('IssueTracker.common.service', [])
.factory('mainService', [
'$http',
'$q',
'BASE_URL',
function($http, $q, BASE_URL) {
function getAllUsers() {
var deferred = $q.deferred;
var request = {
method: 'GET'... |
import React from 'react';
import svgUkraine from '../images/ukraine.svg';
import TextTranslator from "../components/TextTranslator";
function Ukraine() {
return (
<div className="services">
<div className="container">
<section className="ui centered grid">
<div className="row">
... |
const utils = {
getRandomId: function getRandomId(maxValue) {
return Math.floor(Math.random() * maxValue + 1);
}
};
module.exports = utils;
|
import React, { Component } from "react";
import APIServices from './apiservices';
import * as d3 from "d3";
import './bar.css';
import d3Tip from "d3-tip";
import Loader from 'react-loader-spinner';
const apiServices = new APIServices();
class TopFiveODs extends Component {
constructor(props) {
super();
th... |
import { router } from "./router";
import { renderComponent } from "../component/render-component";
import { bootstrap } from "../bootstrap";
export class RountingModule {
constructor(routes, dispatcher,modules) {
this.routes = routes;
this.dispatcher = dispatcher;
this.modules = modules;
... |
({
/**
* Opens Modal Popup For New Competitor Product
*
* @param {Component}
* component
* @param {Event}
* event
* @param {Helper}
* helper
* @return {}
*/
addnew : function(component, event, helper) {
component.set("v.activeRow", -1);
component.set("v.modal... |
import React, { Component } from 'react'
import { Modal, Segment, Label, Icon, Divider } from 'semantic-ui-react'
import './ViewData.css'
export default class ViewData extends Component {
state={
selected: null,
filename: this.props.filename,
rawData: this.props.rawData,
analyzed: t... |
var timer = (function () {
"use strict";
var countDownInterval,
startTime,
expiryTime,
hourElem,
minuteElem,
secondElem,
diffInMs,
diffInSecs,
amountOfHours,
amountOfSeconds,
amountOfMinutes,
hourElementId,
minuteEl... |
//TRENO
//RUOTE Materiale, Geometria
var ruotaGeometry = new THREE.CylinderGeometry(1.2, 1.2, 0.2, 100);
var ruotaMaterial = new THREE.MeshStandardMaterial({
map: new THREE.TextureLoader().load('img/treno/ruote1.jpg'),
side: THREE.DoubleSide
});
//ruota anteriore destra
var ruotaDxA = new THREE.Mesh... |
$(document).ready(function() {
var ie = document.all ? 1 : 0;
if(ie){
$("#pubtextarea").val("你在想什么?");
$("#pubtextarea").css("color","#A9A9A9");
}
$backToTopFun = function() {
var st = $(document).scrollTop(), winh = $(window).height();
(st > 0)?$('#totop').show():$('#tot... |
/**
* Created by xiaojiu on 2017/8/11.
*/
'use strict';
define(['../../../app','../../../services/logistics/orderReceipt/customerReceivingConfirmationService'], function (app) {
var app = angular.module('app');
app.controller('customerReceivingConfirmationCtrl',['$rootScope','$scope','$state','$sce','$interva... |
'use strict';
function getLangFr() {
return {
home: {
label: "Appartement"
},
dungeon: {
label: "Dongeon",
description: "Petit dongeon miteux, seulement un matelas et des toilettes... Des chaines et autres menottes pendent aux murs."
},
cl... |
var lat="";
var lng="";
var addressName="";
$(function () {
$("li").eq(2).addClass("underLine");
$("#inpDate").datepicker({
minDate: 0,
dateFormat: "yy-mm-dd"
});
$("#inpDate").datepicker().datepicker("setDate", new Date());
$("#inpTime").timepicker({
timeFormat: 'h:mm p',
... |
function mispelled(firstStr,secondStr) {
let strLength = firstStr.length,match = 0;
for(let i = 0,j = 0;i < strLength;i++) {
if(firstStr[i] === secondStr[j]) {
match++;
j++;
}
if(firstStr[j] === secondStr[i]) {
match++;
j++;
}
... |
const { Detail } = require("../Models/");
const saveData = (req, res) => {
const tutorial = {
title: "Abhishek Aryan",
description: "Desc",
};
Detail.create(tutorial)
.then((data) => {
res.status(201).json({
msg: "data saved",
data,
});
})
.catch((err) => {
... |
const express = require('express')
const { allUsers, userById, read, listOrders, listOrdersByUser, } = require('../controllers/user')
const router = express.Router()
router.get('/', allUsers)
router.get('/:userId', read)
router.get('/user-orders/:userId', listOrdersByUser)
//middlewere
router.param('userId', userBy... |
var operacion;
var num1;
var num2;
var aux;
do{
num1 = prompt("Introduzca el numero1: ");
if(isNaN(num1)){
alert("El valor introducido no es un numero");
}
}while(isNaN(num1));
do{
num2 = prompt("Introdusca el numero2: ");
if(isNaN(num2)){
alert("El valor introducido no es un n... |
var test = require('tape')
test('It just works', (t) => {
// throw "error"
t.ok(1, 'Redeployed on 12-06-2020 19:33!' )
t.end()
})
|
import React from "react"
class ZipSearch extends React.Component {
constructor() {
super()
this.state = {
cities: []
}
this.zipSearch = this.zipSearch.bind(this)
}
zipSearch(e) {
const output = document.getElementById("output")
output.innerHTML... |
const path = require('path');
module.exports = [
{
target: 'electron12-main',
entry: './src/main.ts',
output: {
filename: 'main.js',
path: path.join(__dirname, 'build'),
},
module: {
rules: [
{
test: /\.... |
class StartPage extends Base {
constructor(app) {
super();
this.app = app;
this.app.recipes.sort((a, b) => b.likes - a.likes);
this.filteredCards = [];
this.selectedCategory = [];
this.sliceNr = 0;
}
showMoreCards(e) {
const sliced = $('.recipeCard:hidden').slice(0, 8).show(10);
$... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.