text
stringlengths 7
3.69M
|
|---|
var searchData=
[
['x',['x',['../structnode.html#a64dd8b65a7d38c632a017d7f36444dbb',1,'node::x()'],['../structcoord.html#ac3e93ff628aa19d2888c5f6fa26f430d',1,'coord::x()']]]
];
|
import { CHANGE_FIELD } from './constants'
export const changeField = (e) => ({
type: CHANGE_FIELD,
payload: e.target.value
})
|
// Chris Joakim, Microsoft, 2017/03/31
const express = require('express');
const router = express.Router();
// The build_timestamp.json file is generated by Grunt
const build_timestamp_obj = require("../build_timestamp.json");
router.get('/', function(req, res) {
var aname = 'azure-mcpoc';
var build = build_timestamp_obj['build_timestamp'];
var date = new Date();
var url = req.protocol + "://" + req.get('host') + req.originalUrl;
res.render('index', { appname: aname, currdate: date, builddate: build, url: url });
});
module.exports = router;
|
var controller = require('../index').getController();
/**
* Removes an event from their OOO calendar
* @param {Object} bot
* @param {Object} message
*/
module.exports = function remove(bot, message) {
bot.startPrivateConversation(message, function(err, convo) {
if (err) {
return console.trace(err);
}
// Make sure we have a user first
controller.storage.users.get(message.user, function(err, user) {
if (err) {
console.trace(err);
}
if (!user) {
convo.transitionTo('setup', 'I don\'t know you, let me introduce myself.');
return;
}
if (!user.events || !user.events.length) {
convo.addMessage('You have not added any events. Try adding one first.', 'default');
return;
}
// Parse our dates and reasons
var eventID = new Number(message.match[1]);
if (!user.events[eventID]) {
return convo.addMessage('I could not find the event with ID `' + message.match[1] + '`. Try using an event ID from `list`.', 'default');
}
// Store this event in the user object
var newEvents = [];
for (var i = 0; i < user.events.length; i++) {
if (i != eventID) {
newEvents.push(user.events[i]);
}
}
user.events = newEvents;
controller.storage.users.save(user, function() {});
convo.addMessage('I have removed that event.', 'default');
});
});
};
|
let userCheck = prompt('Password:', 'PASSWORD HERE')
if(userCheck == 'Beinecke2021') {
// document.getElementById('incorrect').classList.add("hidden")
alert('Verified!')
} else if(userCheck !== 'Beinecke2021') {
// document.getElementById('passcheck').classList.add("hidden")
window.location.replace("http://127.0.0.1/");
}
function startGame() {
window.location.href = "https://science.amukh1.dev/game.html";
}
|
export default function getChatUser(user, user_follow, directs){
for(var u of directs){
if(u.user === user){
for(var d of u.directs){
if(d.user === user_follow){
return d.messages;
}
}
return 'none';
}
}
return null;
}
|
const BC = require('@pascalcoin-sbx/common').BC;
const Int16 = require('@pascalcoin-sbx/common').Coding.Core.Int16;
const Endian = require('@pascalcoin-sbx/common').Endian;
const chai = require('chai');
const expect = chai.expect;
describe('Coding.Core.Int16', () => {
it('can encode unsigned Int16 values to bytes', () => {
expect(new Int16('test', true, Endian.LITTLE_ENDIAN).encodeToBytes(0).toHex()).to.be.equal('0000');
expect(new Int16('test', true, Endian.LITTLE_ENDIAN).encodeToBytes(1).toHex()).to.be.equal('0100');
expect(new Int16('test', true, Endian.LITTLE_ENDIAN).encodeToBytes(65535).toHex()).to.be.equal('FFFF');
expect(new Int16('test', true, Endian.BIG_ENDIAN).encodeToBytes(0).toHex()).to.be.equal('0000');
expect(new Int16('test', true, Endian.BIG_ENDIAN).encodeToBytes(1).toHex()).to.be.equal('0001');
expect(new Int16('test', true, Endian.BIG_ENDIAN).encodeToBytes(65535).toHex()).to.be.equal('FFFF');
// out of range
expect(() => new Int16('test', true).encodeToBytes(-1)).to.throw();
expect(() => new Int16('test', true).encodeToBytes(65536)).to.throw();
});
it('can decode unsigned Int16 bytes to int int', () => {
expect(new Int16('test', true, Endian.LITTLE_ENDIAN).decodeFromBytes(BC.from('0000'))).to.be.equal(0);
expect(new Int16('test', true, Endian.LITTLE_ENDIAN).decodeFromBytes(BC.from('0100'))).to.be.equal(1);
expect(new Int16('test', true, Endian.LITTLE_ENDIAN).decodeFromBytes(BC.from('FFFF'))).to.be.equal(65535);
expect(new Int16('test', true, Endian.BIG_ENDIAN).decodeFromBytes(BC.from('0000'))).to.be.equal(0);
expect(new Int16('test', true, Endian.BIG_ENDIAN).decodeFromBytes(BC.from('0001'))).to.be.equal(1);
expect(new Int16('test', true, Endian.BIG_ENDIAN).decodeFromBytes(BC.from('FFFF'))).to.be.equal(65535);
});
it('can encode signed int8 values to bytes', () => {
expect(new Int16('test', false, Endian.LITTLE_ENDIAN).encodeToBytes(0).toHex()).to.be.equal('0000');
expect(new Int16('test', false, Endian.LITTLE_ENDIAN).encodeToBytes(1).toHex()).to.be.equal('0100');
expect(new Int16('test', false, Endian.LITTLE_ENDIAN).encodeToBytes(-32768).toHex()).to.be.equal('0080');
expect(new Int16('test', false, Endian.LITTLE_ENDIAN).encodeToBytes(32767).toHex()).to.be.equal('FF7F');
expect(new Int16('test', false, Endian.BIG_ENDIAN).encodeToBytes(1).toHex()).to.be.equal('0001');
expect(new Int16('test', false, Endian.BIG_ENDIAN).encodeToBytes(-32768).toHex()).to.be.equal('8000');
expect(new Int16('test', false, Endian.BIG_ENDIAN).encodeToBytes(32767).toHex()).to.be.equal('7FFF');
// out of range
expect(() => new Int16('test', false).encodeToBytes(-32769)).to.throw();
expect(() => new Int16('test', false).encodeToBytes(32768)).to.throw();
});
it('can decode signed Int16 bytes to int', () => {
expect(new Int16('test', false, Endian.LITTLE_ENDIAN).decodeFromBytes(BC.from('0000'))).to.be.equal(0);
expect(new Int16('test', false, Endian.LITTLE_ENDIAN).decodeFromBytes(BC.from('0100'))).to.be.equal(1);
expect(new Int16('test', false, Endian.LITTLE_ENDIAN).decodeFromBytes(BC.from('0080'))).to.be.equal(-32768);
expect(new Int16('test', false, Endian.LITTLE_ENDIAN).decodeFromBytes(BC.from('FF7F'))).to.be.equal(32767);
expect(new Int16('test', false, Endian.BIG_ENDIAN).decodeFromBytes(BC.from('0000'))).to.be.equal(0);
expect(new Int16('test', false, Endian.BIG_ENDIAN).decodeFromBytes(BC.from('0001'))).to.be.equal(1);
expect(new Int16('test', false, Endian.BIG_ENDIAN).decodeFromBytes(BC.from('8000'))).to.be.equal(-32768);
expect(new Int16('test', false, Endian.BIG_ENDIAN).decodeFromBytes(BC.from('7FFF'))).to.be.equal(32767);
});
});
|
const pactum = require('../../src/index');
const request = pactum.request;
const config = require('../../src/config');
describe('Request', () => {
it('GET with baseurl', async () => {
request.setBaseUrl('http://localhost:9393');
await pactum
.spec()
.useInteraction({
request: {
method: 'GET',
path: '/users'
},
response: {
status: 200
}
})
.get('/users')
.expectStatus(200)
.inspect();
});
it('OPTIONS with baseurl', async () => {
request.setBaseUrl('http://localhost:9393');
await pactum
.spec()
.useInteraction({
request: {
method: 'OPTIONS',
path: '/users'
},
response: {
status: 204,
headers: {
'access-control-allow-methods': 'GET,HEAD,PUT,PATCH,POST,DELETE'
}
}
})
.options('/users')
.expectStatus(204)
.expectHeader(
'access-control-allow-methods',
'GET,HEAD,PUT,PATCH,POST,DELETE'
);
});
it('TRACE with baseurl', async () => {
request.setBaseUrl('http://localhost:9393');
await pactum
.spec()
.useInteraction({
request: {
method: 'TRACE',
path: '/users'
},
response: {
status: 200
}
})
.trace('/users')
.expectStatus(200);
});
it('withMethod & withPath', async () => {
request.setBaseUrl('http://localhost:9393');
await pactum
.spec()
.useInteraction({
request: {
method: 'HEAD',
path: '/users'
},
response: {
status: 200
}
})
.withMethod('HEAD')
.withPath('/users')
.expectStatus(200);
});
it('with baseurl override', async () => {
request.setBaseUrl('http://localhost:9392');
await pactum
.spec()
.useInteraction({
request: {
method: 'GET',
path: '/users'
},
response: {
status: 200
}
})
.get('http://localhost:9393/users')
.expectStatus(200);
});
it('with default header', async () => {
request.setBaseUrl('http://localhost:9393');
request.setDefaultHeaders('x', 'a');
await pactum
.spec()
.useInteraction({
request: {
method: 'GET',
path: '/users',
headers: {
'x': 'a'
}
},
response: {
status: 200
}
})
.get('http://localhost:9393/users')
.expectStatus(200);
});
it('with override default header to empty value', async () => {
request.setBaseUrl('http://localhost:9393');
request.setDefaultHeaders('x', 'a');
await pactum
.spec()
.useInteraction({
request: {
method: 'GET',
path: '/users',
headers: {
'x': ''
}
},
response: {
status: 200
}
})
.get('http://localhost:9393/users')
.withHeaders('x', '')
.expectStatus(200);
});
it('with override default header', async () => {
request.setBaseUrl('http://localhost:9393');
request.setDefaultHeaders('x', 'a');
await pactum
.spec()
.useInteraction({
request: {
method: 'GET',
path: '/users',
headers: {
'x': 'b'
}
},
response: {
status: 200
}
})
.get('http://localhost:9393/users')
.withHeaders('x', 'b')
.expectStatus(200);
});
it('with file - just path', async () => {
await pactum
.spec()
.useInteraction({
strict: false,
request: {
method: 'POST',
path: '/api/file'
},
response: {
status: 200
}
})
.post('http://localhost:9393/api/file')
.withFile('./package.json')
.expectStatus(200);
});
it('with file - path & options', async () => {
await pactum
.spec()
.useInteraction({
strict: false,
request: {
method: 'POST',
path: '/api/file'
},
response: {
status: 200
}
})
.post('http://localhost:9393/api/file')
.withFile('./package.json', { contentType: 'application/json' })
.expectStatus(200);
});
it('with file - key & path', async () => {
await pactum
.spec()
.useInteraction({
strict: false,
request: {
method: 'POST',
path: '/api/file'
},
response: {
status: 200
}
})
.post('http://localhost:9393/api/file')
.withFile('file-2', './package.json')
.expectStatus(200);
});
it('with file - key, path & options', async () => {
await pactum
.spec()
.useInteraction({
strict: false,
request: {
method: 'POST',
path: '/api/file'
},
response: {
status: 200
}
})
.post('http://localhost:9393/api/file')
.withFile('file-2', './package.json', { contentType: 'application/json' })
.expectStatus(200);
});
it('with json - path', async () => {
await pactum
.spec()
.useInteraction({
strict: false,
request: {
method: 'POST',
path: '/api/file',
body: {
"name": "pactum"
}
},
response: {
status: 200
}
})
.post('http://localhost:9393/api/file')
.withJson('./package.json')
.expectStatus(200);
});
afterEach(() => {
config.request.baseUrl = '';
config.request.headers = {};
});
});
|
import React, {Component} from 'react'
import Footer from '../widget/footer.jsx'
export default class Outdoor extends Component {
render() {
return <div className="layout outdoor">
<div className="content">{this.props.children}</div>
<Footer/>
</div>
}
}
window.theif7ohla4R = 'kai0xei5QueiCun1OhChigeeWo4Icheibaiv'
|
exports.seed = function(knex, Promise) {
// Deletes ALL existing entries
return knex('palettes').del()
.then(() => knex('projects').del())
.then(() => {
return Promise.all([
// Inserts seed entries
knex('projects').insert({
project_name: 'Ryans World'
}, 'id')
.then(project => {
return knex('palettes').insert([
{
palette_name: 'dirt boy',
color1: '#111111',
color2: '#222222',
color3: '#333333',
color4: '#444444',
color5: '#555555',
project_id: project[0]
}, {
palette_name: 'garbage man',
color1: '#222222',
color2: '#333333',
color3: '#444444',
color4: '#555555',
color5: '#666666',
project_id: project[0]
}
])
})
.then(() => console.log('SEEDING COMPLETE!'))
.catch(error => console.log(`Error seeding data: ${error}`))
]);
})
.catch(error => console.log(`Error seeding data: ${error}`))
};
|
'use strict'
var requestServiceDiscovery = require('./lib/request-service-discovery');
module.exports = requestServiceDiscovery;
|
var repositoriesElement = document.querySelector('#repositories');
function createContent(tagName, className) {
var tag = document.createElement(tagName);
if (className !== undefined) {
tag.classList.add(className);
}
return tag;
}
function createAnchor(text, href) {
var tag = createContent('a');
tag.textContent = text;
tag.href = href;
return tag;
}
function createParagraph(text, className) {
var tag = document.createElement('p');
tag.classList.add(className);
tag.textContent = text;
return tag;
}
function createRepoElement(repoName, repoHref, loginName, loginHref, description) {
var div = createContent('div', 'repo');
var h2 = createContent('h2', 'repo-name');
div.appendChild(h2);
var a = createAnchor(repoName, repoHref);
h2.appendChild(a);
var h3 = createContent('h3', 'login-name');
div.appendChild(h3);
var loginLink = createAnchor(loginName, loginHref);
h3.appendChild(loginLink);
var descriptionElement = createParagraph(description, 'description');
div.appendChild(descriptionElement);
return div;
}
function getRepos() {
for (var repo of githubData.items) {
//create dom stuff
var repoElement = createRepoElement(repo.name, repo.html_url, repo.owner.login, repo.owner.html_url, repo.description);
//add dom stuff to page
repositoriesElement.appendChild(repoElement);
}
}
getRepos();
|
const express = require("express");
const { Client } = require("pg");
const router = express.Router();
const bodyParser = require("body-parser");
const queries = require("../db/queries");
const transaction = require("../db/transaction");
const bcrypt = require("bcrypt");
const middleware = require("./middleware");
const formatSQL = require("pg-format");
router.use(bodyParser.urlencoded({ extended: false }));
const jsonParser = bodyParser.json({ limit: "5mb", extended: true });
// express.bodyParser({limit: '5mb'})
router.post("/", jsonParser, (req, res, next) => {
const user_id = req.cookies["user_id"];
transaction
.getPool()
.connect()
.then(client => {
client
.query(queries.begin)
.then(() => {
const sql = queries.insertPost;
let params = [
user_id,
false,
//req.body.status,
req.body.title,
req.body.description,
req.body.bills_included,
req.body.country,
req.body.city,
req.body.address,
req.body.price,
req.body.squares,
req.body.type,
//new Date(req.body.available_date),
//new Date(req.body.walkout_date),
req.body.furnished,
req.body.bed,
req.body.room,
req.body.pet,
req.body.parking,
req.body.wifi
];
return client.query(sql, params);
})
.then(results => {
let post_id = results.rows[0].id;
const sql2 = queries.insertImages;
let arrayImages = [];
req.body.images.forEach(img => {
arrayImages.push([post_id, img]);
});
let sql = formatSQL(sql2, arrayImages);
return client.query(sql);
})
.then(results2 => {
console.log(results2.rows[0].post_id);
const sql = "select * from posts where id = $1";
//let params = [results2]
res.status(200).json(results2);
transaction.commit(client);
})
/*.then(result => {
console.log("result: ", result);
res.status(200).json(result);
})*/
.catch(err => {
console.log("error", err);
client.query(queries.end);
transaction.rollback(client);
})
.then(() => {
client.release();
});
})
.catch(err => {
console.log("error", err);
res.status(401).json(err);
});
});
module.exports = router;
|
class Tab {
constructor(window, container, linksContainer, link, activeClass) {
this.container = container || '#tab-container';
this.link = link || 'a[data-tab]';
this.linksContainer = linksContainer || '#tab-links-container';
this.activeClass = activeClass || 'active';
this.loadInit();
this.activeTabInit();
}
load(href) {
$.get(href, (html) => {
$(this.container).html(html);
});
}
loadInit() {
$(document).on('click', this.link, (event) => {
let $this = $(event.currentTarget);
event.preventDefault();
$this.parents(this.linksContainer).find(`.${this.activeClass}`).removeClass(this.activeClass);
$this.parent('li').addClass(this.activeClass);
this.load(event.currentTarget);
});
}
activeTabInit() {
$(document).ready( () => {
let activeTab = $(this.linksContainer).find(`.${this.activeClass}`).find('a');
if (activeTab[0] != undefined) {
this.load(activeTab.attr('href'))
}
});
}
}
new Tab();
|
const misc = require('./misc');
const path = require('path');
const multer = require('multer');
const ImageCompanies = './src/images/companies/';
const storage = multer.diskStorage({
destination: (req, file, cb) => {
cb(null, ImageCompanies);
},
filename: (req, file, cb) => {
const fileName = path.basename(file.originalname);
const extension = path.extname(file.originalname);
const files = path.basename(
file.originalname,
path.extname(file.originalname)
);
const imageName =
files + '-' + Date.now() + path.extname(file.originalname);
const image = imageName
.toLowerCase()
.split(' ')
.join('-');
cb(null, image);
},
});
const upload = multer({
storage: storage,
limit: {
fileSize: (req, file, cb) => {
if (file.fileSize >= 1 * 1024 * 1024) {
cb(null, true);
} else {
cb(null, false);
return cb(new Error('file cannot more than 1MB'));
}
},
fileFilter: (req, file, cb) => {
if (
file.mimetype == 'image/png' ||
file.mimetype == 'image/jpg' ||
file.mimetype == 'image/jpeg' ||
file.mimetype == 'image/gif'
) {
cb(null, true);
} else {
cb(null, false);
return cb(new Error('allowed only .png, .jpg, .jpeg and.gif'));
}
},
},
});
module.exports = {
upload: multer({
storage: storage,
fileFilter: (req, file, cb) => {
if (
file.mimetype == 'image/png' ||
file.mimetype == 'image/jpg' ||
file.mimetype == 'image/jpeg' ||
file.mimetype == 'image/gif'
) {
cb(null, true);
} else {
cb(null, false);
return cb(new Error('allowed only .png, .jpg, .jpeg and.gif'));
}
},
}),
};
|
import {Dimensions, Platform} from 'react-native';
const X_WIDTH = 375;
const X_HEIGHT = 812;
const {height: D_HEIGHT, width: D_WIDTH} = Dimensions.get('window');
export const isIPhoneX = () => {
return Platform.OS === 'ios'
? (D_HEIGHT === X_HEIGHT && D_WIDTH === X_WIDTH) ||
(D_HEIGHT === X_WIDTH && D_WIDTH === X_HEIGHT)
: false;
};
export const initialLayout = {width: Dimensions.get('window').width};
|
const express = require("express");
const bbCController = require("../../Controllers/BebidasControl/BebidaCaliente");
const api = express.Router();
api.post("/agregar-BebidaCaliente", bbCController.guardarBC);
api.get("/bebCaliente", bbCController.getBebCal);
api.put("/updateBebCal/:id", bbCController.updateBebCal);
api.delete("/deleteBebCal/:id", bbCController.deleteBebCal);
module.exports = api;
|
getData(); //hämtar alltid data i början så du kan visa det på sidan.
//HÄMTA DATA
function getData() {
var request = new XMLHttpRequest();
//Skicka en getrequest till /getPosts, jag har definerat denna route i server.js
request.open("GET", '/getPosts');
request.send();
//DETTA ÄR DET DU BEHÖVER BRY DIG OM
//denna funktion körs när servern har svarat, och svaret hamnar i request.response;
request.onload = function(e) {
var response = request.response;
//Servern skickade över arrayen som en string, så nu måste vi parsa den tillbaks till array(objekt)
var data = JSON.parse(response);
if (data.length === 0) {
//do nothing
} else {
document.getElementById("data").innerHTML = "";
for(var i = 0; i < data.length; i++){
console.log(data[i]);
var author = data[i].author;
var textInput = data[i].textInput;
var createPelement = document.createElement("p");
createPelement.innerHTML = "Author: " + author + " <br> " + textInput ;
document.getElementById("data").append(createPelement);
}
}
}
}
function elinFunc() {
var input = document.querySelectorAll("#textInput, #author");
var author = input[0].value;
var textInput = input[1].value;
sendData(author, textInput);
location.reload()
}
//SKICKA DATA
//Samma sak, men nu gör vi en post request till servern på /sendPost och skickar med ett objekt
function sendData(tjo, hej) {
console.log("från sendData", tjo, hej);
var request2 = new XMLHttpRequest();
request2.open("POST", '/sendPost');
request2.setRequestHeader("Content-Type", "application/json");
//VI KAN BARA SKICKA STRINGS, SÅ GÖR OM OBJEKTET TILL EN STRING, OCH SKICKA ÖVER STRINGEN
//HÄMTA RÄTT INFO och skicka till SERVERN
var post = {author: tjo, textInput: hej};
//Här ska author också skickas
request2.send(JSON.stringify(post));
}
|
import React from 'react';
import { expect } from 'chai';
import { shallow } from 'enzyme';
import '../../../setup-tests';
import Button from './Button';
describe('<Button />', () => {
it('It renders', () => {
const button = shallow(
<Button onClick={() => console.log('text')}>Text</Button>,
);
expect(button).to.have.lengthOf(1);
});
it('It accepts all required props', () => {
const mockFunction = jest.fn();
const button = shallow(<Button onClick={mockFunction}>Text</Button>);
button.simulate('click');
expect(mockFunction.mock.calls.length).to.equal(1);
expect(button.text()).to.equal('Text');
});
});
|
import React from "react";
import styled from "styled-components";
import { Form } from "reactstrap";
import stripe from "../../../../assets/images/stripe.svg";
import { getAuth } from "../../../../utils/helpers";
import { useSelector } from "react-redux";
import {
getStripeLink,
} from "../../../../redux/actions/teacher";
import { Loading } from "../../../common";
const StyledPaymentMethods = styled.section`
.form-info {
padding: 30px 30px 10px;
display: flex;
justify-content: space-between;
align-items: center;
.stripe {
width: 75%;
display: flex;
border: 1px solid #b5beec;
border-radius: 4px;
padding: 10px 30px 10px 10px;
p {
margin: 0;
font-size: 14px;
margin: 0 30px 0 0;
text-align: left;
}
img {
width: 100px;
}
}
.find {
border: none;
font-size: 12px;
color: #ffffff;
font-weight: 500;
transition: 0.3s ease;
background: #54c052;
border-radius: 30px;
height: 40px;
margin-left: 30px;
width: 25%;
max-width: 200px;
line-height: 40px;
&:hover {
transform: translateY(-3px);
box-shadow: 0 4px 8px 0 #2d972b;
}
}
}
@media only screen and (max-width: 850px) {
.form-info .stripe {
p {
font-size: 12px;
}
img {
width: 85px;
}
}
}
@media only screen and (max-width: 762px) {
.form-info {
display: block;
.stripe {
width: 100%;
margin-bottom: 20px;
}
.find {
width: 150px;
margin-left: 0px;
}
}
}
@media only screen and (max-width: 540px) {
.form-info .stripe {
display: block;
padding: 10px;
p {
margin: 0 0 20px 0;
}
}
}
`;
function PaymentMethods() {
const storeTeacherStripe = useSelector((store) => store.teacher.stripe);
React.useEffect(() => {
getStripeLink();
// eslint-disable-next-line
}, []);
let stripeLink = storeTeacherStripe.link;
return (
<StyledPaymentMethods>
{storeTeacherStripe.loading ? (
<Loading />
) : (
<Form className="form-info">
<div className="stripe">
<p>
We use Stripe to make sure you get paid on time and to keep your
personal bank and details secure.
</p>
<img src={stripe} alt="stripe" />
</div>
<a className="find" href={stripeLink} target="_blank">
Access my account
</a>
</Form>
)}
</StyledPaymentMethods>
);
}
export default PaymentMethods;
|
import React from "react";
import {Button, Card} from "antd";
const Disabled = () => {
return (
<Card className="gx-card" title="Disabled">
<Button type="primary">Primary</Button>
<Button type="primary" disabled>Primary(disabled)</Button>
<br/>
<Button>Default</Button>
<Button disabled>Default(disabled)</Button>
<br/>
<Button type="dashed">Dashed</Button>
<Button type="dashed" disabled>Dashed(disabled)</Button>
<div className="gx-bg-grey gx-px-3 gx-pt-3">
<Button>Ghost</Button>
<Button disabled>Ghost(disabled)</Button>
</div>
</Card>
);
};
export default Disabled;
|
import mongoose from 'mongoose';
import qs from 'qs';
const isProductionEnv = process.env.NODE_ENV === 'production';
mongoose.Promise = global.Promise;
export default function mongo({
node1Host: customNode1Host,
node1Port: customNode1Port,
node2Host,
node2Port,
dbname: customDbname,
replset,
user,
pass,
}) {
const node1Host = customNode1Host || !isProductionEnv && 'mongo' || '';
const node1Port = customNode1Port || !isProductionEnv && '27017' || '';
const dbname = customDbname || !isProductionEnv && 'test' || '';
const nodes = [`${node1Host}:${node1Port}`];
if (node2Host) {
nodes.push(`${node2Host}:${node2Port}`);
}
const opt = {};
if (replset) {
opt.replicaSet = replset;
}
let optString = qs.stringify(opt);
if (optString) {
optString = `?${optString}`;
}
const uri = `mongodb://${nodes.join(',')}/${dbname}${optString}`;
const conn = mongoose.createConnection(uri, {
user,
pass,
server: {
socketOptions: {
keepAlive: 300000,
connectTimeoutMS: 30000,
},
},
replset: {
socketOptions: {
keepAlive: 300000,
connectTimeoutMS : 30000,
},
},
});
conn.on('connecting', () => {
logger.info(`[MongoDB Connection] Connecting: ${uri}`);
});
conn.on('connected', () => {
logger.info('[MongoDB Connection] connected');
});
conn.on('open', () => {
logger.info('[MongoDB Connection] opened');
});
conn.on('fullsetup', () => {
logger.info('[MongoDB Connection] one node connected');
});
conn.on('all', () => {
logger.info('[MongoDB Connection] all nodes connected');
});
conn.on('error', err => {
logger.info(`[MongoDB Connection] Error: ${err}`);
});
conn.on('disconnecting', () => {
logger.info('[MongoDB Connection] disconnecting...');
});
conn.on('disconnected', () => {
logger.info('[MongoDB Connection] disconnected');
});
conn.on('reconnected', () => {
logger.info('[MongoDB Connection] reconnected');
});
return conn;
}
|
import React from 'react';
import LeftArrowSvg from '../../assets/img/left_arrow.svg';
export default function Toolbar({ onBackPressed, title }) {
return (
<div className="bg-gray-700 p-3 flex items-center">
<LeftArrowSvg
onClick={onBackPressed}
className="hover:bg-gray-600 hover:border-gray-600 rounded-lg"
/>
<span className="text-gray-100 font-semibold text-xl ml-4">{title}</span>
</div>
);
}
|
/*global ODSA */
"use strict";
$(document).ready(function () {
var av_name = "Proof1NonRegularCON";
var av;
var xoffset = -30;
var yoffset = 0;
var circRadius = 20;
av = new JSAV(av_name);
MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}});
$(".avcontainer").on("jsav-message", function() {
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
});
// Slide 1
av.umsg("Suppose that $L_2$ is regular");
av.displayInit();
// Slide 2
av.umsg("If $L_2$ is regular then there exists a DFA $M$ that recognizes $L_2$.");
var g = av.ds.graph({directed: true});
var q0 = g.addNode("q0", {left: xoffset, top: yoffset + 100});
var q1 = g.addNode("q1", {left: xoffset + 80, top: yoffset + 100});
var e1 = g.addEdge(q0, q1);
var arrow1 = av.g.line(307, 130, 408, 130, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrow2 = av.g.line(510, 130, 625, 130, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrow3 = av.g.line(150, 130, 195, 130, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var qn = g.addNode("qn", {left: xoffset + 430, top: yoffset + 98});
qn.addClass('final');
var label = av.label("$.............$", {"top": yoffset + 100, "left": xoffset + 450});
var labelM = av.label("$M$", {"top": yoffset, "left": xoffset + 450});
g.layout();
av.step();
// Slide 3
av.umsg("$M$ has a finite number of states, say $k$ states.");
var labelK = av.label("$k$", {"top": yoffset + 73, "left": xoffset + 450});
var arrowK1 = av.g.line(xoffset + 440, yoffset + 100, xoffset + 240, yoffset + 100, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrowK2 = av.g.line(xoffset + 470, yoffset + 100, xoffset + 670, yoffset + 100, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
av.step();
// Slide 4
av.umsg("Consider a long string $a^kb^k \\in L_2$. The key point is that this string has more characters than there are states in the machine.");
var arrValues = ["a", "a", "...", "a", "b", "...", "b", "b"];
var arr = av.ds.array(arrValues);
var labelab1 = av.label("$k$", {"left": xoffset + 390, "top": yoffset + 250});
var labelab2 = av.label("$k$", {"left": xoffset + 512, "top": yoffset + 250});
var arrowa1 = av.g.line(xoffset + 380, yoffset + 278, xoffset + 340, yoffset + 278, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrowa2 = av.g.line(xoffset + 408, yoffset + 278, xoffset + 455, yoffset + 278, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrowb1 = av.g.line(xoffset + 500, yoffset + 278, xoffset + 455, yoffset + 278, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrowb2 = av.g.line(xoffset + 533, yoffset + 278, xoffset + 575, yoffset + 278, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
av.step();
// Slide 5
arrow2.hide();
arrow1.hide();
arrowK1.hide();
arrowK2.hide();
labelM.hide();
labelK.hide();
label.hide();
var arrow4 = av.g.line(320, 230, 210, 148, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrow5 = av.g.line(350, 230, 290, 148, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrow7 = av.g.line(307, 130, 347, 130, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var label1 = av.label("$........$", {"top": yoffset + 100, "left": xoffset + 385});
var arrow8 = av.g.line(407, 130, 447, 130, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var qi = g.addNode("qi", {left: xoffset + 250, top: yoffset + 100});
var arrow = av.g.line(477, 130, 527, 130, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var label2 = av.label("$.......$", {"top": yoffset + 100, "left": xoffset + 565});
var arrow9 = av.g.line(580, 130, 626, 130, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrow10 = av.g.line(410, 230, 560, 140, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrow11 = av.g.line(380, 230, 463, 148, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
av.umsg("Since there are $k$ states and $k$ a's (followed by some b's), some state $i$ in $M$ must be reached more than once when following the path of $a^k$.");
av.step();
// Slide 6
av.umsg("In that case, there is a loop with one or more a's (say $t$ a's for some $t \\geq 1$) along the path.");
var labela = av.label("$t$ a's", {"top": yoffset + 45, "left": xoffset + 480});
var label3 = av.label("...", {"top": yoffset, "left": xoffset + 485});
var qi1 = g.addNode(" ", {left: xoffset + 200, top: yoffset});
var qi2 = g.addNode(" ", {left: xoffset + 300, top: yoffset});
var e2 = g.addEdge(qi, qi2);
var e3 = g.addEdge(qi1, qi);
var e4 = av.g.line(497, 30, 472, 30, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var e5 = av.g.line(452, 30, 426, 30, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
g.layout();
av.step();
// Slide 7
av.umsg("Suppose we start at the initial state, traverse the same path for $a^kb^k$, but we traverse the loop of a's one additional time.");
av.step();
// Slide 8
av.umsg("We will end up in the same final state that $a^kb^k$ did, but our actual number of a's is $a^{k + t}$.");
arr.hide();
arrowa1.hide();
arrowa2.hide();
arrowb1.hide();
arrowb2.hide();
arrow10.hide();
arrow11.hide();
labelab1.hide();
labelab2.hide();
arrow4.hide();
arrow5.hide();
var arrValues2 = ["a", "a", "...", "a", "a", "...", "a", "b", "...", "b", "b"];
var arr2 = av.ds.array(arrValues2);
var labelaab1 = av.label("$k + t$", {"left": xoffset + 382, "top": yoffset + 250});
var labelaab2 = av.label("$k$", {"left": xoffset + 557, "top": yoffset + 250});
var arrowKt1 = av.g.line(xoffset + 372, yoffset + 277, xoffset + 293, yoffset + 277, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrowKt2 = av.g.line(xoffset + 420, yoffset + 277, xoffset + 500, yoffset + 277, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrowKt3 = av.g.line(xoffset + 550, yoffset + 277, xoffset + 500, yoffset + 277, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrowKt4 = av.g.line(xoffset + 573, yoffset + 277, xoffset + 620, yoffset + 277, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrow12 = av.g.line(280, 230, 210, 148, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrow13 = av.g.line(310, 230, 290, 148, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrow14 = av.g.line(380, 230, 460, 148, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
var arrow15 = av.g.line(460, 230, 560, 140, {"stroke-width": 2, "arrow-end": "classic-wide-long"});
av.step();
// Slide 9
av.umsg("Therefore, the string $a^{k+t}b^k$ is accepted by $M$, but this string is not in $L_2$. Contradiction!");
av.step();
// Slide 10
av.umsg("This must happen no matter what machine we created that can accept $a^kb^k$. Thus, $L_2$ is not regular.");
av.step();
// Slide 11
av.umsg("This is an example of the Pigeonhole Principle. The Pigeonhole Principle states that, given $n$ pigeonholes and $n+1$ pigeons, when all of the pigeons go into the holes we can be sure that at least one hole contains more than one pigeon.");
arr2.hide();
labelaab1.hide();
labelaab2.hide();
labela.hide();
label1.hide();
label2.hide();
label3.hide();
arrow.hide();
arrow1.hide();
arrow2.hide();
arrow3.hide();
arrow7.hide();
arrow8.hide();
arrow9.hide();
arrow12.hide();
arrow13.hide();
arrow14.hide();
arrow15.hide();
arrowKt1.hide();
arrowKt2.hide();
arrowKt3.hide();
arrowKt4.hide();
q0.hide();
q1.hide();
qi.hide();
qn.hide();
qi1.hide();
qi2.hide();
e1.hide();
e2.hide();
e3.hide();
e4.hide();
e5.hide();
var p1 = g.addNode("1", {left: xoffset + 50, top: yoffset + 100});
var p2 = g.addNode("2", {left: xoffset + 150, top: yoffset + 100});
var pi = g.addNode("i", {left: xoffset + 250, top: yoffset + 100});
var pn = g.addNode("n", {left: xoffset + 350, top: yoffset + 100});
var pn1 = g.addNode("n+1", {left: xoffset + 450, top: yoffset + 100});
var h1 = g.addNode("1", {left: xoffset + 50, top: yoffset + 200});
var h2 = g.addNode("2", {left: xoffset + 150, top: yoffset + 200});
var hi = g.addNode("i", {left: xoffset + 250, top: yoffset + 200});
var hn = g.addNode("n", {left: xoffset + 350, top: yoffset + 200});
g.addEdge(p1, h1);
g.addEdge(p2, h2);
g.addEdge(pn, hn);
g.addEdge(pi, hi);
var labelp1 = av.label("$.........$", {"left": 390, "top": 100});
var labelp2 = av.label("$.........$", {"left": 490, "top": 100});
var labelph1 = av.label("$.........$", {"left": 390, "top": 200});
var labelph2 = av.label("$.........$", {"left": 490, "top": 200});
var labelpg = av.label("Pigeon: ", {"left": 100, "top": 100});
var labelpg = av.label("Pigeonholes: ", {"left": 100, "top": 200});
var arrowph = av.g.line(664, 148, 470, 218, {"stroke-width": 1.5, "arrow-end": "classic-wide-long"});
g.layout();
av.step();
// Slide 12
av.umsg("In our case, the number of a's are the pigeons, and the states in the DFA are the pigeonholes. We can't distinguish the various possibilities for the number of a's, so we can't verify that they properly match the number of b's.");
av.recorded();
});
|
import React from 'react'
import { MenuButton } from '@components/menu';
import Logo from '@components/logo';
import Spotify from '@components/spotify';
export default class Header extends React.Component {
constructor(props) {
super(props)
this.headerWrapper = React.createRef();
window.addEventListener('scroll', this.handleScroll, false)
}
handleScroll = (e) => {
if( window.scrollY >= 75 ) {
this.headerWrapper.current.classList.add('collapse');
} else {
this.headerWrapper.current.classList.remove('collapse');
}
}
render() {
return (
<header role="main" ref={this.headerWrapper}>
<div className="header--wrapper">
<div className="logo--container">
<Logo />
</div>
</div>
<MenuButton />
</header>
)
}
}
|
import SpotifyWebApi from 'spotify-web-api-node';
import token from './token'
const spotifyApi = new SpotifyWebApi({
clientId: 'be5b6dcc37ab498e94497c68ab84f7d4',
clientSecret: '94699fc7f78d4fe6acd6d9310f5facf4'
});
spotifyApi.setAccessToken(token.replace('Bearer ', ''))
export default spotifyApi;
|
/**
* Creates new instance of Handlebars template provider.
* @param {Handlebars} $handlebars Handlebars factory.
* @constructor
*/
class TemplateProvider {
constructor ($handlebars) {
this._handlebars = $handlebars;
this._templates = Object.create(null);
}
/**
* Current Handlebars factory.
* @type {Handlebars}
* @private
*/
_handlebars = null;
/**
* Current set of registered templates.
* @type {Object}
* @private
*/
_templates = null;
/**
* Registers compiled (precompiled) Handlebars template.
* http://handlebarsjs.com/reference.html
* @param {string} name Template name.
* @param {string} compiled Compiled template source.
*/
registerCompiled (name, compiled) {
var specs = new Function('return ' + compiled + ';');
this._templates[name] = this._handlebars.template(specs());
}
/**
* Renders template with specified data.
* @param {string} name Name of template.
* @param {Object} data Data context for template.
* @returns {Promise<string>} Promise for rendered HTML.
*/
render (name, data) {
if (!(name in this._templates)) {
return Promise.reject(new Error('No such template'));
}
var promise;
try {
promise = Promise.resolve(this._templates[name](data));
} catch (e) {
promise = Promise.reject(e);
}
return promise;
}
}
module.exports = TemplateProvider;
|
$(function () {
$('.tab-show-btn span').each(function (index) {
$(this).click(function () {
$('.tab-show-btn span').removeClass('act').eq(index).addClass('act');
$('.tab-show-show').hide().eq(index).show()
})
})
$('.m3-btn p').each(function (index) {
$(this).click(function () {
$('.m3-btn p').removeClass('act02').eq(index).addClass('act02');
$('.m3-show').css('display','none').eq(index).css('display','table')
})
})
var $n=0;
setInterval(function () {
$n++;
if($n == $('.swiper-show').length){
$n =0
}
$('.swiper-show').hide().eq($n).show();
$('.swiper-btn span').removeClass('act03').eq($n).addClass('act03')
},2000)
})
|
import React, {Component} from "react"
import {
Link,
} from "react-router-dom";
import "components/restaurant/restaurant.css"
import Slider from "react-slick";
import StarRatings from 'react-star-ratings';
import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
import Moment from 'react-moment';
import 'moment-timezone';
export default class RestaurantDetail extends Component {
constructor(props) {
super(props);
this.state = {
rating: 0
}
;
this.changeRating = this.changeRating.bind(this);
}
changeRating( newRating ) {
this.setState({
rating: newRating
},
()=>console.log(this.state.rating));
}
render() {
if (this.props.restaurantDetail !== 0) {
const restaurantDetail = this.props.restaurantDetail;
const comment =
<div className="row">
<div className="col-12">
<div className="contact-form-area">
<form>
<div className="row">
<div className="col-1">
<img className="avatar" src="/img/bg-img/bg5.jpg"/>
</div>
<div className="col-11">
<input name="message" className="form-control" id="message"
placeholder="Message"
defaultValue={""} style={{borderRadius: "15px"}}/>
</div>
<div className="col-12">
<button className="btn delicious-btn mt-30" type="submit" style={{float: "right"}}>Post
Comments
</button>
</div>
</div>
</form>
</div>
</div>
</div>;
return (
<div>
{/* ##### Header Area End ##### */}
{/* ##### Breadcumb Area Start ##### */}
<div className="breadcumb-area bg-img bg-overlay"
style={{backgroundImage: 'url(/img/bg-img/breadcumb3.jpg)'}}>
<div className="container h-100">
<div className="row h-100 align-items-center">
<div className="col-12">
<div className="breadcumb-text text-center">
<h2>{restaurantDetail.name}</h2>
</div>
</div>
</div>
</div>
</div>
{/* ##### Breadcumb Area End ##### */}
<div className="receipe-post-area section-padding-80">
{/* Receipe Post Search */}
<div className="receipe-post-search mb-80">
<div className="container">
<form action="#" method="post">
<div className="row">
<div className="col-10">
<input type="search" name="search" placeholder="Search Receipies"/>
</div>
<div className="col-2 text-right">
<button type="submit" className="btn delicious-btn">Search</button>
</div>
</div>
</form>
</div>
</div>
{/* Receipe Slider */}
<div className="container">
<div className="row">
<div className="col-12">
<div className="receipe-slider">
<img src="/img/bg-img/bg5.jpg"/>
</div>
</div>
</div>
</div>
{/* Receipe Content Area */}
<div className="receipe-content-area">
<div className="container">
<div className="row">
<div className="col-12 col-md-8">
<div className="receipe-headline my-5">
<span><Moment>{restaurantDetail.updated_at}</Moment></span>
<h2>{restaurantDetail.name}</h2>
<div className="receipe-duration">
<h6 style={{fontStyle: "italic"}}>
<i className="fa fa-map-marker"
aria-hidden="true"/>
 {restaurantDetail.address}</h6>
<h6 style={{fontStyle: "italic"}}>
<i className="fa fa-phone"
aria-hidden="true"/>
 {restaurantDetail.phone}</h6>
<h6 style={{fontStyle: "italic"}}>
<i className="fa fa-clock-o"
aria-hidden="true"/>
 Open: 8h00 - 22h00</h6>
</div>
</div>
</div>
<div className="col-12 col-md-4">
<div className="receipe-ratings text-right my-5">
<div className="ratings">
<StarRatings
rating={this.state.rating}
changeRating={this.changeRating}
starRatedColor="gold"
starDimension="30px"
starHoverColor="gold"
starSpacing="3px"
/>
</div>
<a className="btn btn-myself">
<i className="fa fa-plus"
style={{color: "white"}}/>Follow
</a>
</div>
</div>
</div>
<div className="row" >
<Tabs>
<TabList className="row">
<Tab className="tab btn">Description</Tab>
<Tab className="tab btn">Menu</Tab>
</TabList>
<TabPanel style={{maxHeight: "1000px", overflow: "auto", textAlign: "justify"}}>
<h5>{restaurantDetail.description}</h5>
</TabPanel>
<TabPanel className="row" style={{maxHeight: "1000px", overflow: "auto"}}>
<div className="col-12 col-sm-6 col-lg-4">
<div className="single-best-receipe-area mb-30">
<img src="/img/bg-img/r1.jpg" alt="true"/>
<div className="receipe-content">
<a href="receipe-post.html">
Dog meat
</a>
<div className="ratings" style={{color: "grey"}}>
<i className="fa fa-money" aria-hidden="true" style={{color: "gold"}}/><a>35000VND</a>
</div>
</div>
</div>
</div>
<div className="col-12 col-sm-6 col-lg-4">
<div className="single-best-receipe-area mb-30">
<img src="/img/bg-img/r1.jpg" alt="true"/>
<div className="receipe-content">
<a href="receipe-post.html">
Dog meat
</a>
<div className="ratings" style={{color: "grey"}}>
<i className="fa fa-money" aria-hidden="true" style={{color: "gold"}}/><a>35000VND</a>
</div>
</div>
</div>
</div>
<div className="col-12 col-sm-6 col-lg-4">
<div className="single-best-receipe-area mb-30">
<img src="/img/bg-img/r1.jpg" alt="true"/>
<div className="receipe-content">
<a href="receipe-post.html">
Dog meat
</a>
<div className="ratings" style={{color: "grey"}}>
<i className="fa fa-money" aria-hidden="true" style={{color: "gold"}}/><a>35000VND</a>
</div>
</div>
</div>
</div>
<div className="col-12 col-sm-6 col-lg-4">
<div className="single-best-receipe-area mb-30">
<img src="/img/bg-img/r1.jpg" alt="true"/>
<div className="receipe-content">
<a href="receipe-post.html">
Dog meat
</a>
<div className="ratings" style={{color: "grey"}}>
<i className="fa fa-money" aria-hidden="true" style={{color: "gold"}}/><a>35000VND</a>
</div>
</div>
</div>
</div>
</TabPanel>
</Tabs>
</div>
<div className="row" style={{marginTop: "4em"}}>
<div className="col-12">
<div className="section-heading text-left">
<h3>Comment</h3>
</div>
</div>
</div>
<div className="row" style={{marginTop: "4em"}}>
<div className="col-12">
<div className="section-heading text-left">
<h3>Leave a comment</h3>
</div>
</div>
</div>
{comment}
</div>
</div>
</div>
</div>
);
}
else {
return (
<div></div>
);
}
}
}
|
$(document).ready(function(){
ancora_menu();
oque_fazemos();
contato();
planos();
$('img').css({'max-width':'100%'});
$('#menu').menuMobile();
var timeResize = 0;
$(window).resize(function(){
if(timeResize > 0 ){clearTimeout(timeResize);}
timeResize = setTimeout(initApp, 100);
});
});
function initApp(){
$("#studio .carousel").jCarouselLite({
btnNext: "#studio .next",
btnPrev: "#studio .prev"
});
$(".fancybox-effects-d").fancybox({
padding: 0,
openEffect : 'elastic',
openSpeed : 150,
closeEffect : 'elastic',
closeSpeed : 150,
closeClick : true,
helpers : {
title : {
type : 'float'
}
}
});
$('.fancybox-thumbs').fancybox({
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
arrows : false,
nextClick : true,
helpers : {
thumbs : {
width : 50,
height : 50
}
}
});
$('.fancybox-thumbs-2').fancybox({
prevEffect : 'none',
nextEffect : 'none',
closeBtn : false,
arrows : false,
nextClick : true,
helpers : {
thumbs : {
width : 50,
height : 50
}
}
});
$("#feature-carousel-holder .feature-carousel").featureCarousel({
trackerIndividual: false,
trackerSummation: false,
autoPlay: false,
leftButtonTag: '#feature-carousel-holder .carousel-left',
rightButtonTag: '#feature-carousel-holder .carousel-right'
});
cases();
}
//ancora menu
function ancora_menu(){
$('#menu a, #topo a, #planos a').click(function(){
var alvo = $(this).attr('href').split('#').pop();
$('html, body').animate({scrollTop: $('#'+alvo).offset().top - 100 }, 1700);
return false;
});
}
function contato(){
$(".link-entre-em-contato").click(function(){
$(".link-entre-em-contato").fadeOut(100);
$(".form-entre-em-contato").fadeIn(100);
});
$(".fechar-form").click(function(){
$(".form-entre-em-contato").fadeOut(100);
$(".link-entre-em-contato").fadeIn(100);
});
$(".link-solicite-orcamento").click(function(){
$(".link-solicite-orcamento").fadeOut(100);
$(".form-entre-em-contato-2").fadeIn(100);
});
$(".fechar-form-2").click(function(){
$(".form-entre-em-contato-2").fadeOut(100);
$(".link-solicite-orcamento").fadeIn(100);
});
}
function oque_fazemos(){
$(".box-1 .box-img ul li:eq(0)").click(function(){
$(".box-1").fadeOut(300);
$(".box-2,.ico-menu").fadeIn(300);
});
$(".box-1 .box-img ul li:eq(1)").click(function(){
$(".box-1").fadeOut(300);
$(".box-3,.ico-menu").fadeIn(300);
});
$(".box-1 .box-img ul li:eq(2)").click(function(){
$(".box-1").fadeOut(300);
$(".box-4,.ico-menu").fadeIn(300);
});
//------------------------------------------
$(".ico-menu li:eq(0)").click(function(){
$("#box-principal .box").fadeOut(300);
$(".box-3,.ico-menu").fadeIn(300);
});
$(".ico-menu li:eq(1)").click(function(){
$("#box-principal .box").fadeOut(300);
$(".box-2,.ico-menu").fadeIn(300);
});
$(".ico-menu li:eq(2)").click(function(){
$("#box-principal .box").fadeOut(300);
$(".box-4,.ico-menu").fadeIn(300);
});
}
function planos(){
$(".plano-light").click(function(){
$(".plano-descricao, #planos .box").fadeOut(300);
$(".box-planos,.plano-1").fadeIn(300);
});
$(".plano-gold").click(function(){
$(".plano-descricao, #planos .box").fadeOut(300);
$(".box-planos,.plano-2").fadeIn(300);
});
$(".plano-premium").click(function(){
$(".plano-descricao, #planos .box").fadeOut(300);
$(".box-planos,.plano-3").fadeIn(300);
});
$(".plano-sii9fit").click(function(){
$(".plano-descricao, #planos .box").fadeOut(300);
$(".box-planos,.plano-4").fadeIn(300);
});
$(".plano-premiumfull").click(function(){
$(".plano-descricao, #planos .box").fadeOut(300);
$(".box-planos,.plano-5").fadeIn(300);
});
$(".plano-platinumfull").click(function(){
$(".plano-descricao, #planos .box").fadeOut(300);
$(".box-planos,.plano-6").fadeIn(300);
});
}
function cases(){
var $container = $('#cases-gallery');
$container.isotope({
filter: $("#cases-filter li:first").attr('data-filter')
});
$('#cases-filter li').click(function(){
var selector = $(this).attr('data-filter');
$container.isotope({ filter: selector });
return false;
});
}
/*
function cases(){
$(".menu-case li").click(function(){
var index = $(this).index();
$(".menu-case li").removeClass("ativo");
$(".menu-case li:eq("+index+")").addClass("ativo");
});
$(".menu-case li:eq(0)").click(function(){
$(".cases").fadeOut(300);
$("#recentes").fadeIn(300);
});
$(".menu-case li:eq(1)").click(function(){
$(".cases").fadeOut(300);
$("#logotipos").fadeIn(300);
});
$(".menu-case li:eq(2)").click(function(){
$(".cases").fadeOut(300);
$("#identidade-completa").fadeIn(300);
});
}
*/
|
/**
* Created by nisabhar on 1/4/2017.
*/
define(['jquery','pcs/data-services/DataServices','pcs/dynamicProcess/model/DpInstance', 'pcs/dynamicProcess/model/DpDefinition'],
function($,DataServices, Instance , Definition) {
'use strict';
var resourceUrlConfig = {
'instanceList': '/dp-instances',
'processDefinitions': '/dp-definitions'
},
dataServices = DataServices.getInstance();
//making it a singleton
var instance;
function CreateInstance(options) {
var _state = {};
_state.options = options;
_state.processDefinitionsList = {};
/*
var dummydata = [{
activityName: 'Compact Auto Rental request for Jane Austen',
id: '1001',
application: 'Auto Claim',
colorCode: 'green',
initials: 'AC',
activityDescription: 'New auto claim request, raised whenever there is an incidence',
state: 'Active',
createTime: 'Thursday 16th November 2016',
createUserId: 'Mark Luther'
},
{
activityName: 'Home Loan request for John Steinback',
id: '1002',
application: 'Home Loan',
colorCode: 'blue',
initials: 'HL',
activityDescription: 'New home claim request, raised whenever someone come for Loan',
state: 'Active',
createTime: 'Thursday 16th November 2016',
createUserId: 'james Cooper'
},
{
activityName: 'Auto Claim request for Jack London',
id: '1003',
application: 'Auto Claim',
colorCode: 'green',
initials: 'AC',
activityDescription: 'New auto claim request, raised whenever there is an incidence',
state: 'Active',
createTime: 'Thursday 16th November 2016',
createUserId: 'Mark Luther'
},
{
activityName: 'Home Loan request for John Steinback',
id: '1004',
application: 'Home Loan',
colorCode: 'blue',
initials: 'HL',
activityDescription: 'New home claim request, raised whenever someone come for Loan',
state: 'Active',
createTime: 'Thursday 16th November 2016',
createUserId: 'james Cooper'
},
{
activityName: 'Auto Claim request for Agatha Christie',
id: '1005',
application: 'Auto Claim',
colorCode: 'green',
initials: 'AC',
activityDescription: 'New auto claim request, raised whenever there is an incidence',
state: 'Active',
createTime: 'Thursday 16th November 2016',
createUserId: 'Mark Luther'
},
{
activityName: 'Home Loan request for William Shakespeare',
id: '1006',
application: 'Home Loan',
colorCode: 'blue',
initials: 'HL',
activityDescription: 'New home claim request, raised whenever someone come for Loan',
state: 'Active',
createTime: 'Thursday 16th November 2016',
createUserId: 'james Cooper'
}
];
*/
return {
//Do a client search search of the instance list
searchInstanceList: function(searchText) {
var promise = $.Deferred();
var list = _state.instanceList;
if (list === undefined) {
return promise.resolve([]);
}
var prunedList = [];
$.each(list, function(index, value) {
if (value.toString().toLowerCase().indexOf(searchText.toLowerCase()) !== -1) {
prunedList.push(value);
}
});
promise.resolve(prunedList);
return promise;
},
// Do a server call to get the list
fetchInstanceList: function(refresh, params) {
var url = resourceUrlConfig.instanceList;
var promise = $.Deferred();
if (!refresh) {
promise.resolve(_state.instanceList);
return promise;
}
var options = {
queryParams: params
};
dataServices.get(url, options, 'dp').done(function(data) {
var instanceList = data.items.map(function(item) {
return new Instance(item);
});
//put it in cache
_state.instanceList = params.aggregateInstances ? _state.instanceList.concat(instanceList) : instanceList;
promise.resolve(instanceList);
}).fail(function(error) {
promise.reject(error);
});
return promise;
},
fetchProcessDefinitions: function(refresh, allowedAction) {
if (!allowedAction){
allowedAction = 'read';
}
var url = resourceUrlConfig.processDefinitions + '?allowedAction=' + allowedAction;
var promise = $.Deferred();
if (!refresh && _state.processDefinitionsList && _state.processDefinitionsList[allowedAction]) {
promise.resolve(_state.processDefinitionsList[allowedAction]);
return promise;
}
var options = {};
dataServices.get(url, options, 'dp').done(function(data) {
var definitionsList = data.items.map(function(item) {
return new Definition(item);
});
_state.processDefinitionsList[allowedAction] = definitionsList;
promise.resolve(definitionsList);
}).fail(function(error) {
promise.reject(error);
});
return promise;
}
};
}
return {
getInstance: function(options) {
if (!instance) {
instance = new CreateInstance(options);
}
return instance;
}
};
});
|
var rs = require ('readline-sync')
var numeroLinhas = rs.question("Quantas linhas quer imprimir? ")
var i = 1
var asterisco = "*"
while (numeroLinhas <= 0){
var numeroLinhas = rs.question("Quantas linhas quer imprimir? ")
}
while (i <= numeroLinhas){
console.log(asterisco)
var asterisco = asterisco + "*"
i++
}
|
var express = require('express');
var router = express.Router();
var db=require('../dbconnect');
var md5 = require('md5');
var session = require('express-session');
var flash = require('connect-flash')
/* GET home page. */
router.post('/', function(req, res, next) {
if(!req.session.email)
{
var pass=md5(req.body.password);
var query="select * from signup where email=? and password=? ";
db.query(query,[req.body.email,md5(req.body.password)],function(err, db_data){
if(err) throw err;
numRows = db_data.affectedRows;
if(db_data.length)
{
// sessionData = req.session;
// var userDetails = {}
// //set the session
// sessionData.isLogin = 1;
// sessionData.name = req.body.name;
// sessionData.email = req.body.email;
//otherway
req.session.email=req.body.email;
res.redirect('/');
// res.render("homepage",{email:req.session.email});
}
else
{req.flash('notify','Wrong Email and Password');
res.render("index",{expressFlash:req.flash('notify')});
}
});}
else {
res.render("homepage",{email:req.session.email});
}
});
module.exports = router;
|
const path = require(`path`)
const slugify = require('slugify')
const { createFilePath } = require(`gatsby-source-filesystem`)
const fs = require('fs')
const grayMatter = require('gray-matter')
const PATH_TO_MD_PAGES = path.resolve('src/pages/markdown')
const { siteMetadata: { defaultLanguage } } = require('./gatsby-config')
const PAGE_TEMPLATE = path.resolve(`src/templates/pageTemplate.js`)
const SLUGOPTS = {
lower: true,
remove: /[*#.]/g,
}
const _getMarkdownNodeIdAndLanguage = node => {
const relativePath = path.relative(PATH_TO_MD_PAGES, node.absolutePath)
// e.g. static/code/my-project/en.md => { pageType: static, pageId: code/my-project, lang: en }
const tok = relativePath.split('/')
const pageType = tok[0]
const mdfile = tok[tok.length - 1]
const pageId = tok.slice(1, tok.length - 1).join('/')
const lang = path.basename(mdfile, '.md')
return { pageType, pageId, lang }
}
const _isMarkdownNode = n => n.internal.mediaType === `text/markdown`
const _loadMarkdownFile = n => grayMatter(fs.readFileSync(n.absolutePath, 'utf-8').toString())
const _generatePagePath = ({ pageType, pageId, date }) => {
if ('blog' === pageType) {
const [ year, month, day ] = date.split('-')
return `/archives/${year}/${month}/${day}/${pageId}`
} else {
return `/${pageId}`
}
}
const _wrapGraphql = graphql => async str => {
const result = await graphql(str)
if (result.errors) {
throw result.errors
}
return result
}
const _createMarkdownPages = ({ pages, getNode, createPage }, cb) => {
pages.forEach(({ id, relativePath }, index) => {
const node = getNode(id)
const { fields: { page: { path: pagePath, lang } } } = node
if (defaultLanguage === lang) {
createPage({
path: pagePath,
component: PAGE_TEMPLATE,
context: {
relativePath,
...(cb ? cb(index, node) : null)
},
})
}
})
}
// @TODO move to query!
exports.onCreateNode = ({ node, getNodes, actions }) => {
const { createNodeField } = actions
// From https://hiddentao.com/archives/2019/05/07/building-a-multilingual-static-site-with-gatsby
if (_isMarkdownNode(node)) {
// pageType = "blog" or "static"
// pageId = page slug
// lang = "en" or "zh-TW"
const { pageType, pageId, lang } = _getMarkdownNodeIdAndLanguage(node)
// these values are extracted from within the markdown
const { data: { title, date, draft }, content: body } = _loadMarkdownFile(node)
const pageData = {
pageId,
type: pageType,
path: _generatePagePath({ pageType, pageId, date }),
lang,
date,
draft: !!draft,
versions: []
}
// if is default language node then load in versions in other languages
if (lang === defaultLanguage) {
// generate all versions of the node (including default language version)
getNodes().forEach(n => {
if (_isMarkdownNode(n)) {
const r = _getMarkdownNodeIdAndLanguage(n)
if (r.pageId === pageId) {
const gm = _loadMarkdownFile(n)
pageData.versions.push({
lang: r.lang,
summary: gm.data.summary,
title: gm.data.title,
date: gm.data.date,
markdown: gm.content,
})
}
}
})
}
// this adds all the data above to Gatsby's internal representation of the node
createNodeField({
node,
name: 'page',
value: pageData,
})
}
}
exports.createPages = async ({ graphql, actions, getNode }) => {
const { createPage, createNodeField } = actions
const result = await graphql(`
query {
sourceData {
contacts {
code
unitname
description
county
firstname
lastname
email_gov
phone
ext
fax
title
city
address
state
phone
zip
ceofname
ceolname
ceoemail
ceophone
ceoext
ceofax
ceotitle
ceoaddr
ceocity
ceostate
ceozip
cfofname
cfolname
cfoemail
cfophone
cfoext
cfofax
cfotitle
cfoaddr
cfocity
cfostate
cfozip
foiafname
foialname
foiaemail
foiaphone
foiaext
foiafax
foiatitle
foiaaddr
foiacity
foiastate
foiazip
pafname
palname
paemail
paphone
paext
pafax
patitle
paaddr
pacity
pastate
pazip
tiffname
tiflname
tifemail
tifphone
tifext
tiffax
tiftitle
unittypeslug
slug
}
}
}
`)
result.data.sourceData.contacts.forEach((node) => {
createPage({
path: node.slug,
component: path.resolve(`./src/templates/unit.js`),
context: {
contact: node,
},
})
})
const _graphql = _wrapGraphql(graphql)
const { data: { allFile: { nodes: staticPages } } } = await _graphql(`
{
allFile( filter: { fields: { page: { type: { eq: "static" } } } } ) {
nodes {
id
relativePath
}
}
}
`)
_createMarkdownPages({ pages: staticPages, getNode, createPage })
}
|
// ================================================================================
//
// Copyright: M.Nelson - technische Informatik
// Die Software darf unter den Bedingungen
// der APGL ( Affero Gnu Public Licence ) genutzt werden
//
// weblet: dbadmin/query/jointree
// ================================================================================
{
weblet.doc.oncontextmenu = function() { return false; }
weblet.obj.mkbuttons = [];
weblet.eleMkClass(weblet.frame, 'treemain', true);
//weblet.pdebug = 1;
var onmouseup = function(evt)
{
var weblet = evt.target.parentNode.weblet;
var action = evt.target.parentNode.action;
var root = evt.target.parentNode;
if (evt.button != 0 )
{
weblet.act_values['schema'] = action.tschema;
weblet.act_values['table'] = action.ttab;
weblet.act_values['tabnum'] = action.tabnum;
weblet.showdetail(action.tabnum);
}
}
var onclick = function(evt)
{
var open = false;
var weblet = evt.target.parentNode.weblet;
var action = evt.target.parentNode.action;
var root = evt.target.parentNode;
if (evt.button == 0 )
{
if ( evt.offsetX < 12 )
{
weblet.showTable(action.tschema, action.ttab, action.frame);
if (action.frame.firstChild == null) weblet.eleMkClass(root, 'treeleaf', true, 'tree');
else weblet.eleMkClass(root, 'menuopen', ( root.className.indexOf('menuopen') == -1 ));
}
else
{
weblet.act_values['schema'] = action.tschema;
weblet.act_values['table'] = action.ttab;
weblet.act_values['tabnum'] = action.tabnum;
weblet.setDepends('select');
}
}
evt.stopPropagation();
evt.preventDefault();
}
var ontouchstart = function(evt)
{
evt.target.starttime = evt.timeStamp;
}
var ontouchend = function(evt)
{
if ( (evt.timeStamp - evt.target.starttime) > 1000 )
evt.target.onmouseup({ target : evt.target, button : 1 });
}
weblet.mkElement = function(values, str, classname)
{
var tabnum = this.tabnum++;
var div = this.doc.createElement("div");
div.innerHTML = '<div class="treelink">' + tabnum + " " + str + '</div><div class="treemain"></div>';
div.firstChild.onclick = onclick;
div.firstChild.onmouseup = onmouseup;
div.firstChild.ontouchstart = ontouchstart;
div.firstChild.ontouchend = ontouchend;
div.className = classname;
div.weblet = this;
div.param =
{
joindefid : values[this.ppos.joindefid],
tschema : values[this.ppos.tschema],
ttab : values[this.ppos.ttab],
tcols : values[this.ppos.tcols],
fcols : values[this.ppos.fcols],
op : values[this.ppos.op],
typ : values[this.ppos.typ]
};
div.action =
{
tabnum : tabnum,
tschema : values[this.ppos.tschema],
ttab : values[this.ppos.ttab],
frame : div.lastChild,
};
div.action.frame.tables = {};
this.obj.divs[div.action.tabnum] = div;
return div;
}
weblet.showTable = function(schema,table,frame)
{
var param =
{
"schema" : "mne_application",
"table" : "joindef",
"cols" : "joindefid,tschema,ttab,fcols,tcols,op,typ",
"scols" : "tschema,ttab",
"fschemaInput.old" : schema,
"ftabInput.old" : table,
"sqlend" : 1
};
MneAjaxData.prototype.read.call(this, "/db/utils/table/data.xml", param);
var ele;
var i;
var str;
this.ppos = {};
this.ppos.joindefid = this.ids['joindefid'];
this.ppos.tschema = this.ids['tschema'];
this.ppos.ttab = this.ids['ttab'];
this.ppos.tcols = this.ids['tcols'];
this.ppos.fcols = this.ids['fcols'];
this.ppos.op = this.ids['op'];
this.ppos.typ = this.ids['typ'];
for ( i = 0; i<this.values.length; i++ )
{
if ( typeof frame.tables[this.values[i][this.ppos.joindefid]] == 'undefined')
{
str = this.values[i][this.ppos.tschema] + "." + this.values[i][this.ppos.ttab] + " ( " + this.values[i][this.ppos.fcols] + " : " + this.values[i][this.ppos.tcols] + " : " + this.values[i][this.ppos.op] + " ) - " + this.values[i][this.ppos.typ]
ele = this.mkElement( this.values[i], str, "tree");
frame.appendChild(ele);
frame.tables[this.values[i][this.ppos.joindefid]] = ele.action.tabnum;
}
}
}
weblet.showView = function(weblet)
{
var param =
{
"schema" : "mne_application",
"table" : "querytables",
"cols" : "joindefid,deep,tabnum,fcols,tschema,ttab,tcols,op,typ",
"scols" : "tabid",
"queryidInput.old" : weblet.act_values.queryid,
"sqlend" : 1
};
var max_tabnum;
MneAjaxData.prototype.read.call(this, "/db/utils/table/data.xml", param);
if ( this.values.length == 0 )
{
this.warning(this.txtSprintf("#mne_lang#Keine Werte für <$1> gefunden", "queryid: " + param["queryidInput.old"] ));
return;
}
this.ppos = {};
this.ppos.joindefid = this.ids['joindefid'];
this.ppos.deep = this.ids['deep'];
this.ppos.tabnum = this.ids['tabnum'];
this.ppos.tschema = this.ids['tschema'];
this.ppos.ttab = this.ids['ttab'];
this.ppos.tcols = this.ids['tcols'];
this.ppos.fcols = this.ids['fcols'];
this.ppos.op = this.ids['op'];
this.ppos.typ = this.ids['typ'];
var frame = this.frame;
var i;
var str;
var ele;
var deep;
var old_deep;
var frames = new Array();
this.tabnum = max_tabnum = parseInt(this.values[0][this.ppos.tabnum]);
str = this.values[0][this.ppos.tschema] + "." + this.values[0][this.ppos.ttab];
ele = this.mkElement( this.values[0], str, "tree menuopen");
frame.appendChild(ele);
ele.appendChild(ele.action.frame);
this.act_values['schema'] = this.values[0][this.ppos.tschema];
this.act_values['table'] = this.values[0][this.ppos.ttab];
this.act_values['tabnum'] = 0;
old_deep = 0;
for ( i = 1; i<this.values.length; i++ )
{
this.tabnum = parseInt(this.values[i][this.ppos.tabnum]);
if ( this.tabnum > max_tabnum ) max_tabnum = this.tabnum;
if ( this.values[i][this.ppos.deep] > old_deep )
{
frames[frames.length] = frame;
frame = ele.action.frame;
}
else if ( this.values[i][this.ppos.deep] < old_deep )
{
var j;
var deep = parseInt(this.values[i][this.ppos.deep]);
frame = frames[deep];
frames = frames.slice(0, deep);
}
old_deep = this.values[i][this.ppos.deep];
str = this.values[i][this.ppos.tschema] + "." + this.values[i][this.ppos.ttab] + " ( " + this.values[i][this.ppos.fcols] + " : " + this.values[i][this.ppos.tcols] + " : " + this.values[i][this.ppos.op] + " ) - " + this.values[i][this.ppos.typ]
if ( i == ( this.values.length - 1 ) || old_deep >= this.values[i+1][this.ppos.deep] )
ele = this.mkElement( this.values[i], str, "tree");
else
ele = this.mkElement( this.values[i], str, "tree menuopen");
frame.appendChild(ele);
frame.tables[this.values[i][this.ppos.joindefid]] = ele.action.tabnum;
}
this.tabnum = max_tabnum + 1;
}
weblet.mousedown = function(evt)
{
if ( evt.target.weblet != this ) return true;
var obj = evt.target;
var action = evt.target.action;
if ( typeof action != 'undefined' && typeof action.mousedown != 'undefined' ) eval(action.mousedown);
return true;
}
weblet.click = function (evt)
{
if ( evt.target.weblet != this ) return true;
var obj = evt.target;
var action = evt.target.action;
if ( typeof action != 'undefined' && action != null ) eval(evt.target.action.click);
return true;
}
//weblet.win.mneDocevents.addInterest("mousedown", weblet);
// weblet.win.mneDocevents.addInterest("click", weblet);
weblet.showValue = function(weblet)
{
var ele;
var i;
if ( weblet == null ) return;
this.frame.innerHTML = "";
this.tabnum = 0;
this.obj.divs = new Array();
if ( typeof weblet.act_values.queryid == 'undefined' || weblet.act_values.queryid == null || weblet.act_values.queryid == "" )
{
if ( typeof weblet.act_values.schema != 'undefined' && typeof weblet.act_values.table != 'undefined' )
{
this.act_values['schema'] = weblet.act_values.schema;
this.act_values['table'] = weblet.act_values.table;
this.act_values['tabnum'] = this.tabnum;
this.ppos = {};
this.ppos.joindefid = 0;
this.ppos.tschema = 1;
this.ppos.ttab = 2;
this.ppos.tcols = 3;
this.ppos.fcols = 4;
this.ppos.op = 5;
this.ppos.typ = 6;
var values = new Array('', weblet.act_values.schema, weblet.act_values.table, '', '', '', 1);
ele = this.mkElement(values, weblet.act_values.schema + "." + weblet.act_values.table, "tree");
this.frame.appendChild(ele);
}
else
{
var i;
this.act_values['schema'] = '';
this.act_values['table'] = '';
this.act_values['tabnum'] = 0;
this.setDepends("select");
}
}
else
this.showView(weblet);
}
weblet.getParam = function(p)
{
this.tabid = 0;
this.deep = 0;
if ( typeof this.frame == 'undefined' || this.frame.firstChild == null )
throw { message : "#mne_lang#Keine Tabellen definiert", stack: "/dbadmin/view/jointree/getParam()" }
p = this.getFrameParam(this.frame.firstChild, p);
return this.addParam(p, "janzahl", this.tabid);
}
weblet.getFrameParam = function(frame,p)
{
var i;
p = this.addParam(p, "jointabid" + this.tabid, this.tabid);
p = this.addParam(p, "joindeep" + this.tabid, this.deep);
p = this.addParam(p, "jointabnum" + this.tabid, frame.action.tabnum);
p = this.addParam(p, "joinjoindefid" + this.tabid, frame.param.joindefid);
p = this.addParam(p, "jointschema" + this.tabid, frame.param.tschema);
p = this.addParam(p, "jointtab" + this.tabid, frame.param.ttab);
p = this.addParam(p, "jointcols" + this.tabid, frame.param.tcols);
p = this.addParam(p, "joinfcols" + this.tabid, frame.param.fcols);
p = this.addParam(p, "joinop" + this.tabid, frame.param.op);
p = this.addParam(p, "jointyp" + this.tabid, frame.param.typ);
this.tabid++;
this.deep++;
for ( i = 0; frame.action.frame != null && i < frame.action.frame.childNodes.length; i++ )
p = this.getFrameParam(frame.action.frame.childNodes[i], p)
this.deep--;
return p;
}
weblet.showdetail = function(tabnum)
{
if ( typeof this.initpar.popup != 'undefined')
{
var popup = this.parent.popups[this.initpar.popup];
var p = {};
var i;
for ( i in this.obj.divs[tabnum].param ) p[i] = this.obj.divs[tabnum].param[i];
p.tabnum = tabnum;
p.div = this.obj.divs[tabnum];
popup.show(false,false);
if ( popup.weblet.showValue( { act_values : p } ))
popup.hidden();
popup.weblet.onbtnobj = this;
{
var timeout = function() { popup.resize.call(popup, popup.weblet.initpar.popup_resize != false, popup.weblet.initpar.popup_repos == true); }
window.setTimeout(timeout, 10);
}
}
return false;
}
weblet.onbtnok = function(button)
{
var i;
var div = button.weblet.act_values.div;
for ( i in div.param )
{
if ( div.param[i] != button.weblet.act_values[i] )
div.param.joindefid = '';
div.param[i] = button.weblet.act_values[i];
}
this.eleMkClass(div.firstChild, "modifyok", true, 'modify');;
div.firstChild.innerHTML = div.action.tabnum + " " + div.param.tschema + "." + div.param.ttab + " ( " + div.param.fcols + " : " + div.param.tcols + " : " + div.param.op + " ) - " + div.param.typ
}
weblet.ok_ready = function(weblet)
{
var i;
for ( i=0; i< this.obj.divs.length; i++ )
if ( typeof this.obj.divs[i] != 'undefined' )
this.eleMkClass(this.obj.divs[i].firstChild, "modifyno", true, "modify");
}
}
|
import React from "react";
import Layout from "../layout/Layout";
import SEO from "../utils/seo";
import Home from "../components/home/Home";
const IndexPage = () => (
<Layout>
<SEO title="Home" />
<Home />
</Layout>
)
export default IndexPage;
|
NodeCompare = function(){
this.ELEMENT_NODE=1;
this.ATTRIBUTE_NODE=2;
this.TEXT_NODE=3;
this.CDATA_SECTION_NODE=4;
this.ENTITY_REFERENCE_NODE=5;
this.ENTITY_NODE=6;
this.PROCESSING_INSTRUCTION_NODE=7;
this.COMMENT_NODE=8;
this.DOCUMENT_NODE=9;
this.DOCUMENT_TYPE_NODE=10;
this.DOCUMENT_FRAGMENT_NODE=11;
this.NOTATION_NODE=12;
this.attributes=[
"left",
"top",
"right",
"bottom",
"css_background-color",
"css_background-image",
"css_border-bottom-color",
"css_border-bottom-style",
"css_border-bottom-width",
"css_border-left-color",
"css_border-left-style",
"css_border-left-width",
"css_border-right-color",
"css_border-right-style",
"css_border-right-width",
"css_border-top-color",
"css_border-top-style",
"css_border-top-width",
"css_outline-color",
"css_outline-style",
"css_outline-width",
"css_border-bottom-left-radius",
"css_border-bottom-right-radius",
"css_border-top-left-radius",
"css_border-top-right-radius",
"css_box-shadow",
"css_direction",
"css_letter-spacing",
"css_line-height",
"css_text-align",
"css_text-decoration",
"css_text-indent",
"css_text-transform",
"css_vertical-align",
"css_white-space",
"css_word-spacing",
"css_text-overflow",
"css_text-shadow",
"css_word-break",
"css_word-wrap",
"css_-moz-column-count",
"css_-moz-column-gap",
"css_-moz-column-rule-color",
"css_-moz-column-rule-style",
"css_-moz-column-rule-width",
"css_-moz-column-width",
"css_list-style-image",
"css_list-style-position",
"css_list-style-type",
"css_font-family",
"css_font-size",
"css_font-weight",
"css_font-size-adjust",
"css_font-style",
"css_font-variant",
"css_color",
"css_position"
];
this.Compare = function(controlNode, testNode, type){
if (controlNode.nodeType != this.ELEMENT_NODE && testNode.nodeType != this.ELEMENT_NODE)
return 1; // 1 means same
if (controlNode.nodeType != this.ELEMENT_NODE || testNode.nodeType != this.ELEMENT_NODE)
return 0; // 0 means different
//assert controlNode.getNodeType() == Node.ELEMENT_NODE && testNode.getNodeType() == Node.ELEMENT_NODE;
var re = 0;
// 'Complete': all of the attributes must be matched. 'Partial': 75% of attributes must be matched
if(type==='partial'){
for(var i=0; i<this.attributes.length; i++){
var value1 = controlNode.getAttribute(this.attributes[i]), value2 = testNode.getAttribute(this.attributes[i]);
if (value1.toUpperCase() === value2.toUpperCase())
re ++;
}
return (re > (0.75 * this.attributes.length)) ? 1 : 0;
}else{
for(var i=4; i<this.attributes.length; i++){
var value1 = controlNode.getAttribute(this.attributes[i]), value2 = testNode.getAttribute(this.attributes[i]);
if (value1.toUpperCase() === value2.toUpperCase())
re ++;
}
return (re === this.attributes.length-4) ? 1 : 0;
}
};
};
|
exports.up = function(knex, Promise) {
return Promise.all([
knex.schema.createTable('search_history', function (table) {
table.uuid('id').primary()
table.uuid('user_id').notNullable().references('id').inTable('user')
table.string('location', 255).notNullable()
table.string('weather', 255)
table.datetime('created_at')
table.datetime('updated_at')
})
])
};
exports.down = function(knex, Promise) {
return Promise.all([
knex.schema.raw('SET FOREIGN_KEY_CHECKS=0'),
knex.schema.dropTable('search_history'),
knex.schema.raw('SET FOREIGN_KEY_CHECKS=1')
])
};
|
var static = require('node-static');
var fileServer = new static.Server('./webroot');
var port = process.env.PORT || 8000;
var ip = process.env.IP || "localhost";
require('http').createServer(function (request, response) {
request.addListener('end', function () {
fileServer.serve(request, response);
});
}).listen(port, ip);
console.log('Running on http://' + ip + ':' + port);
|
import React from 'react';
import ReactDOM from 'react-dom';
import './styles/index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import './styles/styles.scss'
import './styles/fonts/Sora-Bold.ttf'
import './styles/fonts/Sora-ExtraBold.ttf'
import './styles/fonts/Sora-SemiBold.ttf'
import './styles/fonts/Sora-Regular.ttf'
import './styles/fonts/Sora-Medium.ttf'
import './styles/fonts/Sora-Light.ttf'
import './styles/fonts/Sora-Thin.ttf'
import './styles/fonts/Sora-ExtraLight.ttf'
import './styles/App.css';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
|
const imageDir = './assets/images/works/';
const portfolioList = [
{
title: 'Roadtrip Planner',
image: `${imageDir}portfolio-roadtrip.jpg`,
pageLink: 'https://yuko-roadtrip-planner.herokuapp.com/',
codeLink: 'https://github.com/yuda0110/RoadtripPlanner',
description: 'This MERN application is a roadtrip planner where the user can enter their desired trips name, origin, destination, and stopover points which the google maps Directions API will use to calculate and display your road trip.\n' +
'\n' +
'Based off your journey\'s desired stopover points, we utilize the YELP API to show you the highest rated restaurants at the area of your stop that fit your budget.\n' +
'\n' +
'It notifies you when another user has planned a trip to your destination so you can hitch a ride.',
techs: [
'JavaScript',
'Node.js',
'Create React App',
'React Router Dom',
'Express',
'Mongoose',
'Axios',
'Socket.io',
'Socket.io-client',
'Dotenv',
'React-google-maps',
'React-google-places-autocomplete',
'Nodemon'
]
},
{
title: 'Google Books Search',
image: `${imageDir}portfolio-googlebook.jpg`,
pageLink: 'https://yuko-google-books-search.herokuapp.com/',
codeLink: 'https://github.com/yuda0110/GoogleBooksSearch',
description: 'React-based Google Books Search app. This project requires to create React components, work with helper/util functions, and utilize React lifecycle methods to query and display books based on user searches. Used Node, Express and MongoDB so that users can save books to review or purchase later. Also use React routing and socket.io to create a notification that triggers whenever a user saves a book.',
techs: [
'JavaScript',
'Node.js',
'Create React App',
'React Router Dom',
'Express',
'Mongoose',
'Axios',
'Socket.io',
'Socket.io-client'
]
},
{
title: 'Clicky Game',
image: `${imageDir}portfolio-clickygame.jpg`,
pageLink: 'https://yuda0110.github.io/ClickyGame/',
codeLink: 'https://github.com/yuda0110/ClickyGame',
description: 'A memory game with React. This assignment will require to break up your application\'s UI into components, manage component state, and respond to user events.',
techs: [
'JavaScript',
'Node.js',
'React.js',
'gh-pages'
]
},
{
title: 'Travelligence',
image: `${imageDir}portfolio-travelligence.jpg`,
pageLink: 'https://blue-project-2.herokuapp.com/',
codeLink: 'https://github.com/yuda0110/Travelligence',
description: 'This project is travel application for people who can’t decide where to take their next vacation. The application prompts the user to fill out a simple sign up form and our algorithm utilizes data from the users location, estimated age, estimated culture, and a few uploaded photos to recommend a country to visit.',
techs: [
'JavaScript',
'jQuery',
'Node.js',
'Express',
'Express-handlebars',
'Axios',
'Sequelize',
'Microsoft Computer Vision API',
'Passport',
'geoip-lite',
'agify.io',
'nationalize.io',
'genderize.io'
]
},
{
title: 'JS News Scraper',
image: `${imageDir}portfolio-newscraper.jpg`,
pageLink: 'https://yuko-news-scraper.herokuapp.com/',
codeLink: 'https://github.com/yuda0110/NewsScraper',
description: 'A web app that lets users view and leave comments on the latest news. The app scrapes stories from a news outlet and update the articles listed on the page when a user clicks on the load button.',
techs: [
'JavaScript',
'jQuery',
'Node.js',
'Express',
'Express-handlebars',
'Morgan',
'Nodemon',
'Axios',
'Cheerio',
'Mongoose'
]
},
{
title: 'Eat-Da-Burger',
image: `${imageDir}portfolio-burger.jpg`,
pageLink: 'https://yuko-sequelized-burger.herokuapp.com/',
codeLink: 'https://github.com/yuda0110/sequelized-burger',
description: 'A burger menu / ordering app with a homemade ORM. Used Node and MySQL to query and route data in your app, and Handlebars to generate HTML.',
techs: [
'JavaScript',
'jQuery',
'Node.js',
'Express',
'Express-handlebars',
'Morgan',
'Nodemon',
'Mysql2',
'Sequelize'
]
},
{
title: 'Friend Finder',
image: `${imageDir}portfolio-friendfinder.jpg`,
pageLink: 'https://yuko-friend-finder.herokuapp.com/',
codeLink: 'https://github.com/yuda0110/friend-finder',
description: 'A compatibility-based "FriendFinder" application -- basically a dating app. This full-stack site will take in results from your users\' surveys, then compare their answers with those from other users. The app will then display the name and picture of the user with the best overall match.',
techs: [
'JavaScript',
'jQuery',
'Node.js',
'Express',
'Morgan',
'Nodemon',
'Path',
'Ionicons'
]
},
{
title: 'Bamazon',
image: `${imageDir}portfolio-bamazon.jpg`,
pageLink: 'https://github.com/yuda0110/bamazon#what-each-command-should-do',
codeLink: 'https://github.com/yuda0110/bamazon',
description: 'Amazon-like storefront with the MySQL. There are 3 parts to the app.\n' +
'\n' +
'The 1st part, bamazonCustomer takes in orders from customers and deplete stock from the store\'s inventory.\n' +
'\n' +
'The 2nd part, bamazonManager shows products for sale, shows low inventory, adds to inventory, and adds new product.\n' +
'\n' +
'The 3rd part, bamazonSupervisor shows product sales by department and creates new department.',
techs: [
'JavaScript',
'Node.js',
'MySQL',
'inquirer',
'Console-table-printer'
]
},
{
title: 'LIRI Bot',
image: `${imageDir}portfolio-liri.jpg`,
pageLink: 'https://github.com/yuda0110/liri-node-app#what-each-command-should-do',
codeLink: 'https://github.com/yuda0110/liri-node-app',
description: 'LIRI is like iPhone\'s SIRI. However, while SIRI is a Speech Interpretation and Recognition Interface, LIRI is a Language Interpretation and Recognition Interface. LIRI will be a command line node app that takes in parameters and gives you back data.',
techs: [
'JavaScript',
'Node.js',
'Node-Spotify-API',
'Axios',
'Moment',
'DotEnv',
'fs'
]
},
{
title: 'GifTastic',
image: `${imageDir}portfolio-giftastic.jpg`,
pageLink: 'https://yuda0110.github.io/GifTastic/',
codeLink: 'https://github.com/yuda0110/GifTastic',
description: 'Use the GIPHY API to make a dynamic web page that populates with gifs of your choice.',
techs: [
'HTML',
'CSS',
'JavaScript',
'jQuery',
'GIPHY API',
'localStorage'
]
},
{
title: 'Star Wars RPG Game',
image: `${imageDir}portfolio-starwars.jpg`,
pageLink: 'https://yuda0110.github.io/unit-4-game/',
codeLink: 'https://github.com/yuda0110/GifTastic',
description: 'Interactive game for web browsers. Dynamically update the HTML pages with the jQuery.',
techs: [
'HTML',
'CSS',
'JavaScript',
'jQuery'
]
}
];
export default portfolioList;
|
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var Vehicle = /** @class */ (function () {
function Vehicle(year, color) {
this.year = year;
this.color = color;
}
Vehicle.prototype.toString = function () {
return this.year + " : " + this.color;
};
return Vehicle;
}());
var Car = /** @class */ (function (_super) {
__extends(Car, _super);
function Car() {
return _super !== null && _super.apply(this, arguments) || this;
}
return Car;
}(Vehicle));
var printFunc = function (vehicle) { return console.log(" " + vehicle); };
var vehicle = new Vehicle(2018, 'White');
var car = new Car(2018, 'Blue');
printFunc(vehicle);
printFunc(car);
|
export const enUS = {
default: [
"` 1 2 3 4 5 6 7 8 9 0 - = Backspace",
"Tab q w e r t y u i o p [ ] \\",
"CapsLock a s d f g h j k l ; ' Enter",
"Shift z x c v b n m , . / Shift",
"Control Space @ Control"
],
shift: [
"~ ! @ # $ % ^ & * ( ) _ + Backspace",
"Tab Q W E R T Y U I O P { } |",
'CapsLock A S D F G H J K L : " Enter',
"Shift Z X C V B N M < > ? Shift",
"Control Space @ Control"
],
caps: [
"` 1 2 3 4 5 6 7 8 9 0 - = Backspace",
"Tab Q W E R T Y U I O P [ ] \\",
"CapsLock A S D F G H J K L ; ' Enter",
"Shift Z X C V B N M , . / Shift",
"Control Space @ Control"
]
};
export const ruRU = {
default: [
"ё 1 2 3 4 5 6 7 8 9 0 - = Backspace",
"Tab й ц у к е н г ш щ з х ъ \\",
"CapsLock ф ы в а п р о л д ж э Enter",
"Shift я ч с м и т ь б ю . Shift",
"Control Space @ Control"
],
shift: [
'Ё ! " № ; % : ? * ( ) _ + Backspace',
"Tab Й Ц У К Е Н Г Ш Щ З Х Ъ /",
"CapsLock Ф Ы В А П Р О Л Д Ж Э Enter",
"Shift Я Ч С М И Т Ь Б Ю , Shift",
"Control Space @ Control"
],
caps: [
"ё 1 2 3 4 5 6 7 8 9 0 - = Backspace",
"Tab Й Ц У К Е Н Г Ш Щ З Х Ъ \\",
"CapsLock Ф Ы В А П Р О Л Д Ж Э Enter",
"Shift Я Ч С М И Т Ь Б Ю . Shift",
"Control Space @ Control"
]
};
|
import React from "react";
import styled from "styled-components";
import PropTypes from "prop-types";
import MediaCard from "../middleComponents/MediaCard";
import Avatar from "../BaseComponents/Avatar";
import { PurpleStar } from "../BaseComponents/SVGIcons";
import Text from "../BaseComponents/Text";
import { userType } from "../propTypes";
const NotifyCardLeft = styled.div`
display: flex;
justify-content: flex-end;
flex-direction: row;
width: 100%;
`;
const NotifyCardContent = styled.div`
margin-top: 9px;
`;
function NotificationCard({ notification }) {
const left = (
<NotifyCardLeft>
<PurpleStar large />
</NotifyCardLeft>
);
const headLeft = notification.user && notification.user.avatarSrc && (
<Avatar user={notification.user} hoverable small />
);
const content = (
<>
<div>
<Text>来自 </Text>
<Text bold>{notification.user.name}</Text>
<Text> 的推文</Text>
</div>
<NotifyCardContent>
<Text secondary>{notification.desc}</Text>
</NotifyCardContent>
</>
);
const p = { left, headLeft, content };
return <MediaCard {...p} />;
}
NotificationCard.propTypes = {
notification: PropTypes.shape({
user: userType.isRequired
}).isRequired
};
export default NotificationCard;
|
import React from 'react';
import styled from 'styled-components';
import { Container } from 'react-bootstrap';
export const Bio = () => (
<Container>
<Text>
<h1>Hi There ...</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Asperiores laboriosam placeat beatae commodi eum ut, provident, porro maxime excepturi laborum mollitia laudantium natus fugit, aspernatur ducimus exercitationem voluptas maiores cumque.
</p>
</Text>
</Container>
)
const Text = styled.div`
text-align: center;
padding: 50px;
p {
font-size: 20px;
margin-top: 20px;
}
`;
|
function index(req,res){
res.send("hola");
}
module.exports ={
index:index
}
|
import { createStore } from "redux";
import cartReducer from "./reducers";
function loadState(){
const state = localStorage.getItem('cart');
if (state !== null) {
return JSON.parse(state)
}
return{
cart:[]
}
}
function saveState(state){
console.log('saveState..')
localStorage.setItem('cart', JSON.stringify(state))
}
const store = createStore(cartReducer,loadState())
store.subscribe(() => {
saveState(store.getState())
})
export default store;
|
(function() {
'use strict';
angular
.module('app')
.config(config);
/* @ngInject */
function config($stateProvider, $urlRouterProvider, $authProvider) {
// TODO: setup a global for the domain
$authProvider.loginUrl = '/api/v1/auth/login';
$authProvider.signupUrl = '/api/v1/auth/register';
}
}());
|
'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('projects',{
id:{type: Sequelize.INTEGER, primaryKey: true, autoIncrement: true},
usertId: {
type: Sequelize.INTEGER,
references:{
model:'users',
key: 'id',
user: 'name',
phone: 'cell_phone_number',
e_mail: 'email'
},
onDelete: 'CASCADE'
},
nameProject: {type: Sequelize.STRING, required: true},
projectDescription: {type: Sequelize.TEXT, required: true},
budget: {type: Sequelize.FLOAT, required: true},
createdAt: Sequelize.DATE,
updatedAt: Sequelize.DATE
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.dropTable('projects');
}
};
|
'use strict';
angular.module('main')
.controller('UserCtrl', function (
$log,
$ionicAuth
) {
this.user = {
email: '',
password: ''
};
this.updateResult = function (type, result) {
$log.log(type, result);
this.user.resultType = type;
this.user.result = result;
};
var responseCB = function (response) {
this.updateResult('Response', response);
}.bind(this);
var rejectionCB = function (rejection) {
this.updateResult('Rejection', rejection);
}.bind(this);
// tries to sign the user up and displays the result in the UI
this.signup = function () {
$ionicAuth.signup(this.user)
.then(responseCB)
.catch(rejectionCB);
};
// tries to sign in the user and displays the result in the UI
this.signin = function () {
$ionicAuth.login('basic', this.user)
.then(responseCB)
.catch(rejectionCB);
};
});
|
var Phaser = Phaser || {};
var GameTank = GameTank || {};
GameTank.GameState = function () {
"use strict";
GameTank.BaseState.call(this);
};
GameTank.GameState.prototype = Object.create(GameTank.BaseState.prototype);
GameTank.GameState.prototype.constructor = GameTank.GameState;
GameTank.GameState.prototype.create = function () {
"use strict";
// 分数管理
this.scoreManager = new GameTank.ScoreManager(this);
this.scoreManager.setLevel(game.level);
this.groups = {};
// 坦克
this.groups["enemy"] = game.add.group();
this.groups["player"] = game.add.group();
// 地图相关组
this.groups.map = [];
["brick", "iron", "grass", "waterv", "waterh"].forEach(function(key) {
this.groups.map[key] = game.add.group();
this.groups.map[key].enableBody = true;
this.groups.map[key].createMultiple(676, key);
}.bind(this));
// 子弹,奖品
this.groups["playerBullet"] = game.add.group();
this.groups["enemyBullet"] = game.add.group();
this.groups["enemyBorn"] = game.add.group();
this.groups["nest"] = game.add.group();
this.groups["bouns"] = game.add.group();
// 坦克的出生地
this.enemyBores = [];
this.enemyBores[0] = {x: TILE_WIDTH, y: TILE_HEIGHT};
this.enemyBores[1] = {x: 13 * TILE_WIDTH, y: TILE_HEIGHT};
this.enemyBores[2] = {x: 25 * TILE_WIDTH, y: TILE_HEIGHT};
// 玩家的出生地
this.playerBores = [];
this.playerBores[0] = {x: 9 * TILE_WIDTH, y: game.height - TILE_HEIGHT};
this.playerBores[1] = {x: 17 * TILE_WIDTH, y: game.height - TILE_HEIGHT};
// 老巢
var nestPosition = {x: 13 * TILE_WIDTH, y: game.height - TILE_HEIGHT};
this.nest = new GameTank.Nest(this, nestPosition, 'nest', 'nest');
// 产生敌人
this.enemyCount = 0;
this.enemyTimer = game.time.events.loop(Phaser.Timer.SECOND * 2, this.generateOneEnemy, this);
// 产生玩家
this.player1 = this.groups["player"].getFirstExists(false);
if(!this.player1) {
this.player1 = new GameTank.Player1(this, this.playerBores[0], 'player1', 'player', {
speed: 100
});
}
this.player1.life = this.player1Life || 1;
this.player1.changeAnim();
if(game.playerNum == 2) {
this.player2 = this.groups["player"].getFirstExists(false);
if(!this.player2) {
this.player2 = new GameTank.Player2(this, this.playerBores[1], 'player2', 'player', {
speed: 100
});
}
this.player2.life = this.player2Life || 1;
this.player2.changeAnim();
}
// 加载关卡
this.levelManager = new GameTank.LevelManager(this);
this.levelManager.load('level' + game.level);
// 奖品管理
this.bounsManager = new GameTank.BounsManager(this);
// 声音管理
this.soundManager = new GameTank.SoundManager(this);
this.soundManager.gameStart();
// 敌人坦克复位
game.player1NormalTank = 0;
game.player1FastTank = 0;
game.player1StrongTank = 0;
game.player2NormalTank = 0;
game.player2FastTank = 0;
game.player2StrongTank = 0;
};
// 产生敌人的位置
GameTank.GameState.prototype.generateEnemyPosition = function() {
var res = null;
while(res == null) {
var randomIndex = Math.floor(Math.random() * this.enemyBores.length);
var position = {
x: this.enemyBores[randomIndex].x,
y: this.enemyBores[randomIndex].y
};
var find = false;
this.groups["enemy"].forEachAlive(function(a) {
if(a.x > position.x - TILE_WIDTH && a.x < position.x + TILE_WIDTH &&
a.y > position.y - TILE_HEIGHT && a.y < position.y + TILE_HEIGHT) {
find = true;
}
}, this);
if(!find) {
res = position;
}
}
return res;
};
// 产生敌人逻辑
GameTank.GameState.prototype.generateOneEnemy = function() {
// 是否有奖品
var award = (Math.random() > (1 - BOUNS_PERCENT)) ? 1 : 0;
// 敌人坦克种类
var tankType = 0;
var probability = Math.random();
if(probability < 0.5) {
tankType = 0;
} else if(probability < 0.8) {
tankType = 1;
} else {
tankType = 2;
}
if(this.groups["enemy"].countLiving() < 3) {
this.enemyCount++;
if(this.enemyCount >= ENEMY_NUMBER) {
game.time.events.remove(this.enemyTimer);
}
var position = this.generateEnemyPosition();
var enemy = this.groups["enemy"].getFirstExists(false);
if(!enemy) {
enemy = new GameTank.Enemy(this, position, 'enemy', 'enemy', {
speed: (tankType == 1) ? 200 : 100,
award: award,
type: tankType
});
} else {
enemy.rebirth(position, {
speed: (tankType == 1) ? 200 : 100,
award: award,
type: tankType
});
}
}
};
// 游戏结束
GameTank.GameState.prototype.gameOver = function() {
if(game.gameover) {
return;
}
game.gameover = true;
var gameOverSprite = game.add.sprite((game.width - 96 - 235) / 2, game.height);
// 绿色背景
var greenBack = game.add.graphics(0, 0);
greenBack.beginFill(0x00FF01);
greenBack.drawRoundedRect(0, 0, 235, 125, 10);
greenBack.endFill();
gameOverSprite.addChild(greenBack);
// 蓝色文字
var style = { font: "bold 32px Arial", fill: "#090892", boundsAlignH: "center", boundsAlignV: "middle" };
var gameText = game.add.text(0, 0, "G A M E", style);
gameText.setTextBounds(0, -20, greenBack.width, 125);
gameOverSprite.addChild(gameText);
var overText = game.add.text(0, 0, "O V E R", style);
overText.setTextBounds(0, 20, greenBack.width, 125);
gameOverSprite.addChild(overText);
game.add.tween(gameOverSprite).to({y:(game.height - 125) / 2}, 1000, "Linear", true);
// 游戏结束声音
this.soundManager.gameOver();
}
|
//Controle das abas de Cadastro
$('#inserir_cliente').click(function () {
$("#tabs_cliente").tabs();
});
//Controle dos Botões de Finalização
$('.mostrar_botoes_finais').click(function () {
$("#bt_fiscal").show();
$("#bt_fiscal").removeAttr("class", "ignore");
});
$('.esconder_botoes_finais').click(function () {
$("#bt_fiscal").hide();
$("#bt_fiscal").attr("class", "ignore");
});
//Controle do Tipo de Cliente - Mostra formulário correto
//Tipo Cliente: 1 - Pessoa Jurídica; 2 - Pessoa Física
$(".cod_tipo_cliente").click(function () {
var pessoa = $(this).val();
if (pessoa == '2') {
$("#dados_pf").show();
$("#dados_pf").removeAttr("class", "ignore");
$("#check_pf").show();
$("#check_pf").removeAttr("class", "ignore");
$("#dados_pj").attr("class", "ignore");
$("#dados_pj").hide();
} else {
$("#dados_pj").show();
$("#dados_pj").removeAttr("class", "ignore");
$("#dados_pf").attr("class", "ignore");
$("#dados_pf").hide();
$("#check_pf").attr("class", "ignore");
$("#check_pf").hide();
}
});
//Seleção automática do Endereço Principal
$("#cli_cep").on("blur", function () {
var cep = $('#cli_cep').val();
cep = cep.replace('-', '');
cep = cep.replace('.', '');
action = actionCorreta(window.location.href.toString(), 'default/index/buscar-cep');
$.ajax({
type: 'POST',
dataType: 'json',
url: action,
data: 'cep=' + cep,
success: function (data) {
$('#lcli_logradouro').attr('class', 'active');
$('#cli_logradouro').val(data.data[1]);
$('#lcli_bairro').attr('class', 'active');
$('#cli_bairro').val(data.data[5]);
$('#lcli_cidade').attr('class', 'active');
$('#cli_cidade').val(data.data[2]);
$('#lcli_uf').attr('class', 'active');
$('#cli_uf').val(data.data[4]);
$('#lcli_ibge').attr('class', 'active');
$('#cli_ibge').val(data.data[3]);
},
error: function (data) {
limparEnderecoPrincipal();
}
});
});
//Seleção automática do Endereço Cobrança
$("#cli_cep_cob").on("blur", function () {
var cep = $('#cli_cep_cob').val();
cep = cep.replace('-', '');
cep = cep.replace('.', '');
action = actionCorreta(window.location.href.toString(), 'default/index/buscar-cep');
$.ajax({
type: 'POST',
dataType: 'json',
url: action,
data: 'cep=' + cep,
success: function (data) {
$('#lcli_logradouro_cob').attr('class', 'active');
$('#cli_logradouro_cob').val(data.data[1]);
$('#lcli_bairro_cob').attr('class', 'active');
$('#cli_bairro_cob').val(data.data[5]);
$('#lcli_cidade_cob').attr('class', 'active');
$('#cli_cidade_cob').val(data.data[2]);
$('#lcli_uf_cob').attr('class', 'active');
$('#cli_uf_cob').val(data.data[4]);
$('#lcli_ibge_cob').attr('class', 'active');
$('#cli_ibge_cob').val(data.data[3]);
},
error: function (data) {
limparEnderecoCob();
}
});
});
//Controle dos Campos do Endereço de Cobrança
$("#check08").click(function () {
var check08 = $("#check08").is(":checked");
if (check08 === true) {
$("#end_cob").show();
$("#end_cob").removeAttr("class", "ignore");
} else {
$("#end_cob").attr("class", "ignore");
$("#end_cob").hide();
}
});
//Controle dos Campos do Endereço de Cobrança
$("#check09").click(function () {
var check09 = $("#check09").is(":checked");
if (check09 === true) {
$("#dados_comprador").attr("class", "ignore");
$("#dados_comprador").hide();
} else {
$("#dados_comprador").show();
$("#dados_comprador").removeAttr("class", "ignore");
}
});
//Carregando a Forma de Cobrança disponível para o Cliente
$(".carergar_select_credito").click(function () {
action_cobranca = actionCorreta(window.location.href.toString(), 'cadastros/cliente/fcobranca');
$.ajax({
type: 'POST',
dataType: 'json',
url: action_cobranca,
beforeSend: function () {
},
complete: function () {
},
error: function () {
},
success: function (data) {
//Select Forma Cobrança
resetarSelectFCob();
$("#forma_cob").append("<option value='0'>Forma de Cobrança</option>");
$.each(data.f_cobranca, function (key, value) {
$("#forma_cob").append("<option value='" + value.id_forma_cobranca + "'>" + value.ds_forma_cobranca + "</option>");
});
}
});
});
//Carregando a Forma de Pagamento disponível para o Cliente, de acordo com a Forma de Cobrança
$('#forma_cob').change(function () {
var id_fcobranca = $('#forma_cob').val();
action = actionCorreta(window.location.href.toString(), 'cadastros/cliente/fpagamento/id');
$.ajax({
type: 'POST',
dataType: 'json',
url: action + "/" + id_fcobranca,
beforeSend: function () {
},
complete: function () {
},
error: function () {
},
success: function (data) {
//Select Forma Pagamento
$("#forma_pag").removeAttr('disabled');
resetarSelectFPag();
$("#forma_pag").append("<option value='0'>Forma de Pagamento</option>");
$.each(data.f_pagamento, function (key, value) {
$("#forma_pag").append("<option value='" + value.id_forma_pgto + "'>" + value.ds_forma_pgto + "</option>");
});
}
});
});
//Carregando a Condição de Pagamentop disponível para o Cliente, de acordo com a Forma de Pagamento
$('#forma_pag').change(function () {
var id_fpagamento = $('#forma_pag').val();
action = actionCorreta(window.location.href.toString(), 'cadastros/cliente/cpagamento/id');
$.ajax({
type: 'POST',
dataType: 'json',
url: action + "/" + id_fpagamento,
beforeSend: function () {
},
complete: function () {
},
error: function () {
},
success: function (data) {
//Select Condição Pagamento
$("#condicao_pag").removeAttr('disabled');
resetarSelectCPag();
$("#condicao_pag").append("<option value='0'>Condição de Pagamento</option>");
$.each(data.c_pagamento, function (key, value) {
$("#condicao_pag").append("<option value='" + value.id_cond_pgto + "'>" + value.ds_cond_pgto + "</option>");
});
}
});
});
//Funções que limpam as opções do Select
function resetarSelectFCob() {
$('#forma_cob > option').remove();
}
function resetarSelectFPag() {
$('#forma_pag > option').remove();
}
function resetarSelectCPag() {
$('#condicao_pag > option').remove();
}
//Resetar Formulário Cliente
function resetarFormCliente() {
$('#formCliente').each(function () {
this.reset();
});
$("#tb_add_cond_pag").remove();
$("#end_cob").hide();
$("#dados_comprador").show();
resetarSelectFCob();
resetarSelectFPag();
resetarSelectCPag();
$('#forma_pag').attr('disabled', 'disabled');
$("#forma_pag").append("<option value='0'>Aguardando...</option>");
$('#condicao_pag').attr('disabled', 'disabled');
$("#condicao_pag").append("<option value='0'>Aguardando...</option>");
}
//Limpar Linhas da Tabela
(function ($) {
RemoveTableRow = function (handler) {
var tr = $(handler).closest('tr');
tr.fadeOut(400, function () {
tr.remove();
});
return false;
};
})(jQuery);
//Formulário de Inclusão das Condições
$('#add_cod_pag').on('click', function () {
//Coletando dados do Formulário
var id_forma = $('#forma_cob').val();
var id_pagamento = $('#forma_pag').val();
var id_condicao = $('#condicao_pag').val();
var des_forma = document.getElementById("forma_cob").options[document.getElementById("forma_cob").selectedIndex].text;
var des_pagamento = document.getElementById("forma_pag").options[document.getElementById("forma_pag").selectedIndex].text;
var des_condicao = document.getElementById("condicao_pag").options[document.getElementById("condicao_pag").selectedIndex].text;
//Criando a lista de itens
if (id_forma != 0 && id_pagamento != 0 && id_condicao != 0) {
$("#tb_add_cond_pag").append(
"<tr class='remove'>" +
"<td class='remove' style='text-align: left;'>" + des_forma + "<input id='" + id_forma + "' name='forma_cob[]' class='valida_prod' type='hidden' value='" + id_forma + "' /></td>" +
"<td class='remove' style='text-align: center;'>" + des_pagamento + "<input name='forma_pag[]' type='hidden' value='" + id_pagamento + "' /></td>" +
"<td class='remove' style='text-align: center;'>" + des_condicao + "<input name='condicao_pag[]' type='hidden' class='multiplicador' value='" + id_condicao + "' /></td>" +
"<td class='remove' style='text-align: center;'><button id='bt_remover_produto' class='btn-floating waves-effect waves-light red' onclick='RemoveTableRow(this)' type='button'> <i class='mdi-content-clear'></i> </button></td>" +
"</tr class='remove'>");
} else {
Materialize.toast("<span>Você deve preencher todos os campos!</span>", 5000, 'rounded');
}
//Voltando o foco para o cmapo produto
$('#forma_cob').focus();
resetarSelectFPag();
resetarSelectCPag();
$('#forma_cob').val(0).selected = "true";
$('#forma_pag').attr('disabled', 'disabled');
$("#forma_pag").append("<option value='0'>Aguardando...</option>");
$('#condicao_pag').attr('disabled', 'disabled');
$("#condicao_pag").append("<option value='0'>Aguardando...</option>");
});
//Formulário de Cadastro do Cliente
$('#formCliente').validate({ignore: ".ignore > div > input",
rules: {
cli_cep: {
required: true
},
cli_endnum: {
required: true
}
},
messages: {
cli_cep: {
required: "O campo CEP é obrigatório! "
},
cli_endnum: {
required: "O campo Número é obrigatório! "
}
},
errorLabelContainer: $('#mensagens'),
submitHandler: function (form) {
var dados = $(form).serializeArray();
action = actionCorreta(window.location.href.toString(), 'cadastros/cliente/adicionar-ou-atualizar-cliente');
$.ajax({
type: 'POST',
dataType: 'json',
url: action,
async: true,
data: dados,
beforeSend: function (data) {
Materialize.toast("<span>Aguarde, processando requisição...</span>", 5000, 'rounded');
},
complete: function () {
},
error: function () {
Materialize.toast("<span>Houve um erro no cadastro!</span>", 5000, 'rounded');
},
success: function (data) {
Materialize.toast("<span>Dados cadastrados com sucesso!</span>", 5000, 'rounded');
resetarFormCliente();
}
});
return false;
}
});
//Editando dados do Cliente
$('.editar_cliente').click(function () {
var id = $(this).attr('id');
action = actionCorreta(window.location.href.toString(), 'cadastros/cliente/formulario/id_cliente');
$.ajax({
type: 'POST',
dataType: 'json',
url: action + "/" + id,
async: true,
beforeSend: function (data) {
Materialize.toast("<span>Aguarde, processando requisição...</span>", 5000, 'rounded');
},
complete: function () {
},
error: function () {
Materialize.toast("<span>Houve um erro no cadastro!</span>", 5000, 'rounded');
},
success: function (data) {
console.log(data);
//Ativando a label
$("label").attr('class', 'active');
//Preenchendo os campos que possuem valores
//Dados do Cliente
$("#id_cliente").val(data.cliente.id_cliente);
$("#tp_cliente").val(data.cliente.id_tipo_cliente);
$("#cli_nome").val(data.cliente.nm_razao_social);
$("#cli_cpf").val(data.cliente.cpf_cnpj);
$("#cli_rg").val(data.cliente.n_rg);
$("#cli_razao").val(data.cliente.nm_razao_social);
$("#cli_nomfant").val(data.cliente.nm_fantasia);
$("#cli_cnpj").val(data.cliente.cpf_cnpj);
$("#cli_insest").val(data.cliente.n_inscricao_estadual);
$("#cli_insmun").val(data.cliente.n_inscricao_municipal);
$("#cli_inssuf").val(data.cliente.nro_suframa);
$("#cli_email").val(data.cliente.desc_email);
//Dados dos Endereços
//Endereço Principal
$("#cli_cep").val(data.endereco[0].nm_cep);
$("#cli_logradouro").val(data.endereco[0].nm_endereco);
$("#cli_endnum").val(data.endereco[0].n_numero);
$("#cli_endcom").val(data.endereco[0].nm_complemento);
$("#cli_bairro").val(data.endereco[0].nm_bairro);
$("#cli_cidade").val(data.endereco[0].nm_cidade);
$("#cli_uf").val(data.endereco[0].uf);
$("#cli_ibge").val(data.endereco[0].cod_ibge);
//Endereço Cobrança
$("#cli_cep_cob").val(data.endereco[1].nm_cep);
$("#cli_logradouro_cob").val(data.endereco[1].nm_endereco);
$("#cli_endnum_cob").val(data.endereco[1].n_numero);
$("#cli_endcom_cob").val(data.endereco[1].nm_complemento);
$("#cli_bairro_cob").val(data.endereco[1].nm_bairro);
$("#cli_cidade_cob").val(data.endereco[1].nm_cidade);
$("#cli_uf_cob").val(data.endereco[1].uf);
$("#cli_ibge_cob").val(data.endereco[1].cod_ibge);
//Dados dos Telefones
$("#cli_tel").val(data.telefone[0].n_ddd + data.telefone[0].n_numero_telefone);
$("#cli_celular").val(data.telefone[1].n_ddd + data.telefone[1].n_numero_telefone);
//Dados do Comprador
$("#comp_nome").val(data.cliente.nm_comprador);
$("#comp_cpf").val(data.cliente.cpf);
$("#comp_funcao").val(data.cliente.funcao);
$("#comp_email").val(data.cliente.email);
$("#comp_tel").val(data.cliente.telefone);
$("#comp_celular").val(data.cliente.celular);
//Dados de Parâmetros Fiscais
$("#check01").val(data.cliente.id_tipo_cliente).checked = "true";
$("#check02").val(data.cliente.id_tipo_cliente).selected = "true";
$("#check03").val(data.cliente.id_tipo_cliente).selected = "true";
$("#check04").val(data.cliente.id_tipo_cliente).selected = "true";
$("#check05").val(data.cliente.id_tipo_cliente).selected = "true";
$("#check06").val(data.cliente.id_tipo_cliente).selected = "true";
$("#check07").val(data.cliente.id_tipo_cliente).selected = "true";
//Ativando as Abas e Abrindo o Modal
$("#tabs_cliente").tabs();
$('#modal_novo_cliente').openModal();
}
});
return false;
});
|
export default class BottomStack{
constructor()
{
this.stack=[];
}
AddTostack(tetromino)
{
for(var i=0;i<tetromino.blocks.length;i++)
{
this.stack.push(tetromino.blocks[i]);
}
}
CheckCollisionToStack(tetromino)
{
for(let i=0;i < tetromino.blocks.length;i++) {
for(let j=0;j < this.stack.length;j++) {
if (tetromino.blocks[i].position.x === this.stack[j].position.x && tetromino.blocks[i].position.y === this.stack[j].position.y) {
return true;
}
}
}
return false;
}
Draw(ctx)
{
for(var i=0;i<this.stack.length;i++)
{
this.stack[i].Draw(ctx);
}
}
CheckStackOverflow()
{
for(var i=0;i<this.stack.length;i++)
{
if(this.stack[i].position.y<0)
{
return true;
}
}
return false;
}
CheckRowFullnessAndDestroy(game)
{
this.stack.sort(function(a, b){return a.position.y - b.position.y });
for(let i=0;i<this.stack.length;)
{
let currenty=this.stack[i].position.y;
let rowstart=i;
let rowsum=0;
while(i<this.stack.length && this.stack[i].position.y===currenty)
{
++rowsum;
++i;
if(rowsum>=10)
{
this.stack.splice(rowstart,10);
i-=10;
for(let t=0;t<i;t++)
{
this.stack[t].position.y+=1;
}
game.score+=100;
}
}
}
}
}
|
import React from 'react';
import './exercise.css';
import useEventListener from '@use-it/event-listener'
const OP_PLUS = '+';
const OP_MINUS = '-';
const OP_MULTI = '×';
const OP_DIV = '÷';
const OPERATORS = [ OP_PLUS, OP_MINUS, OP_MULTI, OP_DIV];
const RANGES = [ 25, 15, 10, 8];
let num1;
let num2;
let op;
let resultStr;
let answer = "";
let isWrong = false;
const rand = (range) => {
return Math.floor(Math.random() * range);
}
function calc(num1, num2, op) {
switch(op) {
case OP_PLUS:
return num1 + num2;
case OP_MINUS:
return num1 - num2;
case OP_MULTI:
return num1 * num2;
case OP_DIV:
return num1 / num2;
default:
return num1 + num2;
}
}
function initExercise() {
const opi = rand(4);
op = OPERATORS[opi];
const range = RANGES[opi];
num1 = rand(range);
num2 = rand(range);
if (op === OP_MINUS && num2 > num1) {
const temp = num1;
num1 = num2;
num2 = temp;
}
if (op === OP_DIV) {
while (num2 === 0) {
num2 = rand(range);
}
num1 = num1 * num2;
}
resultStr = calc(num1, num2, op) + "";
answer = "";
console.log('init: ' + num1 + ' ' + op + ' ' + num2);
}
initExercise();
function Exercise(props) {
const [, updateState] = React.useState();
const forceUpdate = React.useCallback(() => updateState({}), []);
useEventListener('keydown', ({key}) => {
if (key >=0 && key <=9) {
answer += key
if (answer === resultStr) {
setTimeout(() => {
props.oncorrect();
initExercise();
forceUpdate();
}, 1000);
} else if (!resultStr.startsWith(answer)) {
isWrong = true;
setTimeout(() => {
answer = "";
isWrong = false;
forceUpdate();
}, 1000);
}
forceUpdate();
}
});
return (
<div className="exercise">
<h1>{num1} {op} {num2} =
<span className={isWrong ? "wrong" : ""}> {answer}</span>
</h1>
</div>
);
}
export default Exercise;
|
var passport = require('passport'),
GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
/**
* Configuration for the Authentication Logic.
* @param {!express} app The express application instance.
* @constructor
*/
function Authentication(app) {
/**
* Reference to the "publish" app settings.
* @private {!Object.<string>}
*/
this.settings_ = app.get('publish');
/**
* Base/Root URL for the application.
* @private {string}
*/
this.callbackURL_ = this.settings_['ROOT URL'];
/**
* Google callback URL.
* @private {string}
*/
this.googleCallbackURL_ = this.callbackURL_ + 'auth/google/callback';
/**
* Google Client ID for this application.
* @private {string}
*/
this.googleClientId_ = this.settings_['GOOGLE CLIENT ID'];
/**
* Google Client Secret for this application.
* @private {string}
*/
this.googleClientSecret_ = this.settings_['GOOGLE CLIENT SECRET'];
// Initialize the Authentication module.
this.init_();
}
/**
* Initializes the Authentication middleware.
* @private
*/
Authentication.prototype.init_ = function() {
//Register Serialization and Deserialization logic for all passport providers.
passport.serializeUser(this.serializeUser_);
passport.deserializeUser(this.deserializeUser_);
passport.use(new GoogleStrategy({
clientID: this.googleClientId_,
clientSecret: this.googleClientSecret_,
callbackURL: this.googleCallbackURL_
},
function(accessToken, refreshToken, profile, done) {
// TODO: Handle errors here.
// TODO: Handle Tokens, and refreshed / timeout.
return done(null, profile);
}
));
};
/**
* Serializes the user into the session.
* TODO: It might not be necessary to prvide the whole User object, just parts.
* @param {!Object} user The user object. This comes from the provider's
* (Google, Facebook, etc) response.
* @param {!Function} done Callback to fire when done.
* @private
*/
Authentication.prototype.serializeUser_ = function(user, done) {
done(null, user);
};
/**
* Deserializes the user out of the session.
* @param {!Object} user The serialized User object.
* @param {!Function} done Callback to fire when done.
* @private
*/
Authentication.prototype.deserializeUser_ = function(user, done) {
done(null, user);
};
/**
* Expose the Router Module.
*/
module.exports = Authentication;
|
import {set} from 'lodash'
// local libs
import {PropTypes, assertPropTypes, plainProvedGet as g} from 'src/App/helpers'
import {i18nModel} from 'src/App/models'
// only particular helper, because some of all helpers depends on this module
import deepFreeze from 'ssr/lib/helpers/deepFreeze'
const
mapping = deepFreeze({
eng: {
htmlLangAttribute: 'en',
labels: {
providedBy: 'provided by',
showing: 'Showing',
},
headers: {
allNiches: 'All Niches',
niches: 'Top Rated %ORIENTATION% Niches',
listNiches: 'All %ORIENTATION% Films',
listArchive: 'Archives',
pornstars: 'Top Rated %ORIENTATION% Pornstars',
relatedVideo: 'Click On Each Of These Related Films',
},
search: {
inputPlaceholder: 'Search box',
buttonTitle: 'Run search',
orientationSuggestion: 'The keyword \"%SEARCH_QUERY%\" you were searching for \
sounds pretty %ORIENTATION%',
},
navigation: {
home: {title: 'Home'},
allNiches: {title: 'All Niches'},
allMovies: {title: 'All Movies'},
pornstars: {title: 'Pornstars'},
favorite: {title: 'Favorite'},
},
ordering: {
label: 'Sort',
byDate: 'Recent',
byDuration: 'Duration',
byPopularity: 'Popularity',
byRelevant: 'Relevant',
},
buttons: {
report: 'Report',
favoriteMovies: 'Films',
favoritePornstars: 'Pornstars',
archive: 'Archive films',
prev: 'Prev',
next: 'Next',
previousMonth: 'Previous month',
nextMonth: 'Next month',
topFilms: 'Top films',
backToMainPage: 'Back to main page',
addToFavorite: 'Add to favorite',
removeFromFavorite: 'Remove from favorite',
agree: 'Yes',
cancel: 'Cancel',
showInfo: 'Show info',
hideInfo: 'Hide info',
},
footer: {
forParents: 'Parents — Protect your children from adult content \
with these services:',
disclaimer: 'Disclaimer: All models on this website are 18 years or older. \
videosection.com has a zero-tolerance policy against illegal pornography. \
We have no control over the content of these pages. All films and links \
are provided by 3rd parties. We take no responsibility for the content on any \
website which we link to, please use your own discretion.',
},
report: {
title: 'Have you found a problem on the site? Please use this form to help us \
to fix it, or contact us directly',
duration: 'Duration',
added: 'Added',
hosted: 'Hosted by',
found: 'Found on page',
on: 'on',
radioLabel: 'Report reason',
radioButtons: {
other: 'Other',
deleted: 'Movie has been deleted',
doesntPlay: 'Movie doesn\'t play',
badThumb: 'Low quality of the thumbnail',
young: 'Person on the thumbnail looks too young',
incest: 'Incest',
animals: 'Beastiality (sex with animals)',
otherScat: 'Other inappropriate content (rape, blood, scat, etc...)',
copyright: 'Copyright violation',
},
text: 'Take Note of: Our website is a completely automatic adult search engine \
focused on videos clips. We do not possess, produce, distribute or host \
any movies. All linked clips are automatically gathered and added into our \
system by our spider script. Thumbnails are auto-generated from the outside \
video contributors. All of the video content performed on our site \
are hosted and created by other websites that are not under our control. \
By your request we can remove thumbnail and link to the video, \
but not the original video file.',
succesText: 'Thank you for your report. We will review it soon',
failureText: 'Something went wrong. Try again later',
commentLabel: 'Comment',
commentPlaceholder: 'Describe the problem',
userUrlPlaceholder: 'Insert a link to the page you want to report',
},
pornstarInfoParameters: {
alias: 'Aliases',
astrologicalSign: 'Astrological Sign',
bodyHair: 'Body Hair',
boobsFake: 'Natural or Fake Tits',
breast: 'Breast',
breastSizeType: 'Tits Size',
city: 'City',
colorEye: 'Eye Color',
colorHair: 'Hair Color',
country: 'Country of Origin',
cupSize: 'Cup Size',
ethnicity: 'Ethnicity',
extra: 'Extra',
height: 'Height',
hip: 'Hip',
name: 'Artist Name',
physiqueCustom: 'Physique',
piercings: 'Piercings',
profession: 'Profession',
sexualRole: 'Sexual Role',
shoeSize: 'Shoe Size',
tatoos: 'Tatoos',
waist: 'Waist',
weight: 'Weight',
birthday: 'Birthday',
lifetime: 'Life Time',
careerTime: 'Career Start and End',
penis: 'Penis',
},
notFound: {
title: 'File not found - Free Porn Tubes : %SITE%',
description: '404 page : %SITE%',
headerTitle: 'Oops... Maybe explore the other porn categories on our video site',
headerDescription: 'Try to return to the home page and find best free porn \
collection : %SITE%',
listHeader: '404 Not found. Sorry, partner. The page you requested is not in our \
database. Explore our fresh porn films',
},
orientation: {
straight: 'Straight',
gay: 'Gays',
tranny: 'Shemales',
},
},
deu: {
htmlLangAttribute: 'de',
labels: {
providedBy: 'zur Verfügung gestellt von',
showing: 'Anzeigen',
},
headers: {
allNiches: 'Alle Gruppen',
niches: 'Die Besten %ORIENTATION% Gruppen',
listNiches: 'Alle Verfügbaren %ORIENTATION% Video Clips',
listArchive: 'Archiv',
pornstars: 'Die Besten %ORIENTATION% Models',
relatedVideo: 'Schau sie Dir an, diese ähnlichen Video Clips',
},
search: {
inputPlaceholder: 'Stichworte hinzufügen',
buttonTitle: 'Suche starten',
orientationSuggestion: 'Das Stichwort \"%SEARCH_QUERY%\" nach dem Du gesucht \
hast hört sich ziemlich %ORIENTATION% an',
},
navigation: {
home: {title: 'Hauptseite'},
allNiches: {title: 'Alle Gruppen'},
allMovies: {title: 'Alle Vids'},
pornstars: {title: 'Models'},
favorite: {title: 'Favorisierten'},
},
ordering: {
label: 'Sortiert',
byDate: 'Das Neueste',
byDuration: 'Dauer',
byPopularity: 'Popularität',
byRelevant: 'Ähnlich',
},
buttons: {
report: 'Bericht',
favoriteMovies: 'Filme',
favoritePornstars: 'Pornostars',
archive: 'Archivfilme',
prev: 'Vorh',
next: 'Näch',
previousMonth: 'Vorheriger Monat',
nextMonth: 'Nächsten Monat',
topFilms: 'Top-Filme',
backToMainPage: 'Zurück zur Hauptseite',
addToFavorite: 'Zu den Favoriten hinzufügen',
removeFromFavorite: 'Aus Favoriten entfernen',
agree: 'Ja',
cancel: 'Stornieren',
showInfo: 'Zeige',
hideInfo: 'Ausblenden',
},
footer: {
forParents: 'Eltern - Schützen sie Ihre Kinder vor Pornografie mit der Hilfe \
folgender Service Anbieter:',
disclaimer: 'Hinweis: Alle Models auf dieser Sex Seite sind 18 Jahre alt oder \
älter. de.videosection.com pflegt eine Null-Toleranz Einstellung gegenüber \
Pornografie die illegal ist. Wenn Du etwas entdecken solltest das illegal ist, \
schicke uns bitte den Link und wir werden diesen umgehend löschen. Alle \
Galerien, Links und Videos auf dieser Tube Seite unterliegen der Verantwortung \
Dritter, sichte diese bitten in eigener Verantwortung.',
},
report: {
title: 'Bitte schicke uns eine Mitteilung mit dem Betreff "Missbrauch" \
mit dem direkten Link zu dem illegalen Material mit Hilfe \
dieses Eingabeformulars',
duration: 'Dauer',
added: 'Hinzugefügt',
hosted: 'Veranstaltet von',
found: 'Gefunden auf der Seite',
on: 'auf',
radioLabel: 'Grund melden',
radioButtons: {
other: 'Andere',
deleted: 'Film wurde gelöscht',
doesntPlay: 'Film wird nicht abgespielt',
badThumb: 'Niedrige Qualität der Miniaturansicht',
young: 'Die Person auf der Miniaturansicht sieht zu jung aus',
incest: 'Inzest',
animals: 'Bestie (Sex mit Tieren)',
otherScat: 'Andere unangemessene Inhalte (Vergewaltigung, Blut, Scat usw.)',
copyright: 'Urheberrechtsverletzung',
},
text: 'Beachten Sie: Unsere Website ist eine vollautomatische Suchmaschine \
für Erwachsene, die sich auf Videoclips konzentriert. Wir besitzen, \
produzieren, vertreiben oder hosten keine Filme. Alle verknüpften Clips werden \
automatisch von unserem Spider-Skript erfasst und in unser System aufgenommen. \
Miniaturansichten werden automatisch von den externen Video-Mitwirkenden \
generiert. Alle auf unserer Website bereitgestellten Videoinhalte werden von \
anderen Websites gehostet und erstellt, die nicht unserer Kontrolle \
unterliegen. Auf Ihren Wunsch können wir Miniaturbilder und Links zum \
Video entfernen, nicht jedoch die Originalvideodatei.',
succesText: 'Vielen Dank für Ihren Bericht. Wir werden es bald überprüfen',
failureText: 'Etwas ist schief gelaufen. Versuchen Sie es später noch einmal',
commentLabel: 'Kommentar',
commentPlaceholder: 'Beschreibe das Problem',
userUrlPlaceholder: 'Fügen Sie einen Link zu der Seite ein, die Sie melden möchten',
},
pornstarInfoParameters: { // TODO
alias: 'Aliases',
astrologicalSign: 'Astrological Sign',
bodyHair: 'Body Hair',
boobsFake: 'Natural or Fake Tits',
breast: 'Breast',
breastSizeType: 'Tits Size',
city: 'City',
colorEye: 'Eye Color',
colorHair: 'Hair Color',
country: 'Country of Origin',
cupSize: 'Cup Size',
ethnicity: 'Ethnicity',
extra: 'Extra',
height: 'Height',
hip: 'Hip',
name: 'Artist Name',
physiqueCustom: 'Physique',
piercings: 'Piercings',
profession: 'Profession',
sexualRole: 'Sexual Role',
shoeSize: 'Shoe Size',
tatoos: 'Tatoos',
waist: 'Waist',
weight: 'Weight',
birthday: 'Birthday',
lifetime: 'Life Time',
careerTime: 'Career Start and End',
penis: 'Penis',
},
notFound: {
title: 'Datei nicht gefunden - Free Porn Tubes : %SITE%',
description: '404 Seite : %SITE%',
headerTitle: "Hoppla... erkunden Sie vielleicht die anderen Pornokategorien \
auf unserer Videoseite",
headerDescription: 'Versuchen Sie, zur Startseite zurückzukehren und die beste \
kostenlose Pornosammlung zu finden : %SITE%',
listHeader: '404 nicht gefunden. Entschuldigung, mein Partner. Die von Ihnen \
aufgerufene Seite befindet sich nicht in unserer Datenbank. Entdecken \
Sie unsere frischen Pornofilme ',
},
orientation: {
straight: 'Hetero',
gay: 'Gay',
tranny: 'Transe',
},
},
ita: {
htmlLangAttribute: 'it',
labels: {
providedBy: 'fornito da',
showing: 'Mostrando',
},
headers: {
allNiches: 'Tutte le Categorie',
niches: 'Le %ORIENTATION% Categorie Più Votate',
listNiches: 'Totale %ORIENTATION% Filmati',
listArchive: 'Archivio',
pornstars: 'Le %ORIENTATION% Pornostar Più Votate',
relatedVideo: 'Sfoglia Questi Filmati Correlati',
},
search: {
inputPlaceholder: 'Inserisci parole chiave...',
buttonTitle: 'Esegui la ricerca',
orientationSuggestion: 'Stai cercando un termine \"%SEARCH_QUERY%\", per i \
migliori risultati mirati ti consigliamo di passare alla sezione %ORIENTATION% \
di questo sito',
},
navigation: {
home: {title: 'Principale'},
allNiches: {title: 'Tutte le Categorie'},
allMovies: {title: 'Tutti I Film'},
pornstars: {title: 'Pornostar '},
favorite: {title: 'Preferiti'},
},
ordering: {
label: 'Ordina',
byDate: 'Più Recenti',
byDuration: 'I più lunghi',
byPopularity: 'Popolari',
byRelevant: 'Correlati',
},
buttons: {
report: 'Rapporto',
favoriteMovies: 'Cinema',
favoritePornstars: 'Pornstar',
archive: 'Film d\'archivio',
prev: 'Scor',
next: 'Pros',
previousMonth: 'Il mese scorso',
nextMonth: 'Il prossimo mese',
topFilms: 'Top film',
backToMainPage: 'Torna alla pagina principale',
addToFavorite: 'Aggiungi ai favoriti',
removeFromFavorite: 'Rimuovi dai preferiti',
agree: 'Sì',
cancel: 'Annulla',
showInfo: 'Mostra',
hideInfo: 'Nascondi',
},
footer: {
forParents: 'Genitori – Proteggete i vostri bambini dai contenuti per adulti \
con questi servizi:',
disclaimer: 'Disclaimer: it.videosection.com usa la politica di zero-tolleranza \
contro la pornografia illegale. Ogni materiale, incluse le gallerie e i link, \
sono forniti da terze parti e non sono controllati da noi. Non accettiamo \
nessuna responsabilità per il materiale dei siti ai quali colleghiamo. \
Vi preghiamo di usare la propria discrezione mentre guardate i link.',
},
report: {
title: 'Hai trovato un problema sul sito? Utilizza questo modulo per aiutarci \
a risolverlo o contattaci direttamente',
duration: 'Durata',
added: 'Aggiunto',
hosted: 'Ospitato da',
found: 'Trovato a pagina',
on: 'sopra',
radioLabel: 'Segnala un motivo',
radioButtons: {
other: 'Altro',
deleted: 'Il film è stato cancellato',
doesntPlay: 'Il film non suona',
badThumb: 'Bassa qualità della miniatura',
young: 'La persona sull\'anteprima sembra troppo giovane',
incest: 'Incesto',
animals: 'Beastiality (sesso con animali)',
otherScat: 'Altri contenuti inappropriati (stupro, sangue, scat, ecc ...)',
copyright: 'violazione di copyright',
},
text: `Prendi nota di: Il nostro sito Web è un motore di ricerca per adulti \
completamente automatico, incentrato su clip video. Non possediamo, \
produciamo, distribuiamo o ospitiamo alcun film. Tutti i clip collegati \
vengono automaticamente raccolti e aggiunti nel nostro sistema dal nostro \
script spider. Le miniature sono generate automaticamente dai contributori \
video esterni. Tutti i contenuti video eseguiti sul nostro sito sono \
ospitati e creati da altri siti web che non sono sotto il nostro controllo. \
Tramite la tua richiesta, possiamo rimuovere la miniatura e il link al video, \
ma non il file video originale.`,
succesText: 'Grazie per la segnalazione. Lo rivedremo presto',
failureText: 'Qualcosa è andato storto. Riprovare più tardi',
commentLabel: 'Commento',
commentPlaceholder: 'Descrivi il problema',
userUrlPlaceholder: 'Inserisci un link alla pagina che vuoi segnalare',
},
pornstarInfoParameters: { // TODO
alias: 'Aliases',
astrologicalSign: 'Astrological Sign',
bodyHair: 'Body Hair',
boobsFake: 'Natural or Fake Tits',
breast: 'Breast',
breastSizeType: 'Tits Size',
city: 'City',
colorEye: 'Eye Color',
colorHair: 'Hair Color',
country: 'Country of Origin',
cupSize: 'Cup Size',
ethnicity: 'Ethnicity',
extra: 'Extra',
height: 'Height',
hip: 'Hip',
name: 'Artist Name',
physiqueCustom: 'Physique',
piercings: 'Piercings',
profession: 'Profession',
sexualRole: 'Sexual Role',
shoeSize: 'Shoe Size',
tatoos: 'Tatoos',
waist: 'Waist',
weight: 'Weight',
birthday: 'Birthday',
lifetime: 'Life Time',
careerTime: 'Career Start and End',
penis: 'Penis',
},
notFound: {
title: 'File non trovato - Provini gratuiti : %SITE%',
description: '404 pagina : %SITE%',
headerTitle: "Oops... Forse esplorare le altre categorie pornografiche sul \
nostro sito di video",
headerDescription: 'Prova a tornare alla home page e trova la migliore \
collezione porno gratuita : %SITE%',
listHeader: '404 Non trovato. Ci dispiace, partner. La pagina richiesta \
non è nel nostro database. Esplora i nostri film porno freschi',
},
orientation: {
straight: 'Etero',
gay: 'Gay',
tranny: 'Transessuale',
},
},
fra: {
htmlLangAttribute: 'fr',
labels: {
providedBy: 'fourni par',
showing: 'Montrant',
},
headers: {
allNiches: 'Toutes les Niches',
niches: 'Les Niches %ORIENTATION% les Mieux Notée',
listNiches: 'Tout %ORIENTATION% Scènes',
listArchive: 'Les archives',
pornstars: 'Les Pornstars %ORIENTATION% les Mieux Notée',
relatedVideo: 'Regardez ces scènes au contenu lié',
},
search: {
inputPlaceholder: 'Chercher sur Video Section',
buttonTitle: 'Lancer une recherche',
orientationSuggestion: '\"%SEARCH_QUERY%\", pour des résultats plus appropriés \
nous vous recommandons de vous diriger vers la section %ORIENTATION% de ce site',
},
navigation: {
home: {title: 'Principale'},
allNiches: {title: 'Toutes les Niches'},
allMovies: {title: 'Tout les Tubes'},
pornstars: {title: 'Pornstars'},
favorite: {title: 'Favoris'},
},
ordering: {
label: 'Genre',
byDate: 'Date',
byDuration: 'Longueur',
byPopularity: 'Popularité',
byRelevant: 'Pertinence',
},
buttons: {
report: 'Signaler',
favoriteMovies: 'Scènes',
favoritePornstars: 'Pornstars',
archive: 'Archive Scènes',
prev: 'Préc',
next: 'Proc',
previousMonth: 'Le mois précédent',
nextMonth: 'Le mois prochain',
topFilms: 'Top Scènes',
backToMainPage: 'Retour au menu',
addToFavorite: 'À Favoris',
removeFromFavorite: 'De Favoris',
agree: 'Oui',
cancel: 'Annuler',
showInfo: 'Afficher',
hideInfo: 'Masquer',
},
footer: {
forParents: 'Protégez votre enfant et votre famille de la pornographie avec \
ces services:',
disclaimer: 'Disclaimer: Tous les individus participant à ces vidéos sont \
majeures. fr.videosection.com a une politique de tolérance zéro \
contre la pornographie ILLEGALE. Si quoi que ce soit vous semble \
illégal, merci de nous en avertir par email au plus vite et nous \
retirerons la vidéo. Toutes les galeries et les liens sont pourvus \
par de tierces parties et non par nos soins.',
},
report: {
title: `S'il vous plaît envoyez-nous une demande avec le sujet "Abuse" avec \
le lien direct vers le contenu illégal via ce formulaire`,
duration: 'Durée',
added: 'Ajoutée',
hosted: 'Hébergé par',
found: 'Trouvé sur la page',
on: 'sur',
radioLabel: 'Signaler la raison',
radioButtons: {
other: 'Autre',
deleted: 'Le film a été supprimé',
doesntPlay: 'Le film ne joue pas',
badThumb: 'Basse qualité de la vignette',
young: 'La personne sur la vignette a l\'air trop jeune',
incest: 'Inceste',
animals: 'Bestialité (sexe avec des animaux)',
otherScat: 'Autres contenus inappropriés (viol, sang, sésame, etc ...)',
copyright: 'Violation de copyright',
},
text: `Prenez note de: Notre site Web est un moteur de recherche pour adultes \
entièrement automatique, centré sur les clips vidéo. Nous ne possédons, \
ne produisons, ne distribuons et n'hébergeons aucun film. Tous les clips \
liés sont automatiquement rassemblés et ajoutés à notre système par notre \
script spider. Les miniatures sont générées automatiquement à partir des \
contributeurs vidéo externes. Tout le contenu vidéo diffusé sur notre site \
est hébergé et créé par d'autres sites Web qui ne sont pas sous notre \
contrôle. À votre demande, nous pouvons supprimer les vignettes et les \
liens vers la vidéo, mais pas le fichier vidéo d'origine.`,
succesText: 'Je vous remercie pour votre rapport. Nous allons le revoir bientôt',
failureText: 'Quelque chose s\'est mal passé. Réessayez plus tard',
commentLabel: 'Commentaire',
commentPlaceholder: 'Décris le problème',
userUrlPlaceholder: 'Insérer un lien vers la page que vous souhaitez signaler',
},
pornstarInfoParameters: { // TODO
alias: 'Aliases',
astrologicalSign: 'Astrological Sign',
bodyHair: 'Body Hair',
boobsFake: 'Natural or Fake Tits',
breast: 'Breast',
breastSizeType: 'Tits Size',
city: 'City',
colorEye: 'Eye Color',
colorHair: 'Hair Color',
country: 'Country of Origin',
cupSize: 'Cup Size',
ethnicity: 'Ethnicity',
extra: 'Extra',
height: 'Height',
hip: 'Hip',
name: 'Artist Name',
physiqueCustom: 'Physique',
piercings: 'Piercings',
profession: 'Profession',
sexualRole: 'Sexual Role',
shoeSize: 'Shoe Size',
tatoos: 'Tatoos',
waist: 'Waist',
weight: 'Weight',
birthday: 'Birthday',
lifetime: 'Life Time',
careerTime: 'Career Start and End',
penis: 'Penis',
},
notFound: {
title: 'Fichier non trouvé - Free Porn Tubes : %SITE%',
description: '404 page : %SITE%',
headerTitle: 'Oups ... Explorez peut-être les autres catégories pornos sur notre site vidéo',
headerDescription: 'Essayez de revenir à la page d\'accueil et trouvez la \
meilleure collection de porno gratuite : %SITE%',
listHeader: '404 Introuvable. Désolé, partenaire. La page que vous avez demandée \
ne figure pas dans notre base de données. Explorez nos nouveaux films porno',
},
orientation: {
straight: 'Hétéro',
gay: 'Homo',
tranny: 'Transexuel',
},
},
spa: {
htmlLangAttribute: 'es',
labels: {
providedBy: 'proporcionado por',
showing: 'Demostración',
},
headers: {
allNiches: 'Todas las Nichos',
niches: 'Las Más Buscadas %ORIENTATION% Nichos',
listNiches: '%ORIENTATION% Escenas Totales',
listArchive: 'Archivo',
pornstars: 'Las Más Buscadas %ORIENTATION% Pornstars',
relatedVideo: 'Revisar los Escenas Relacionados',
},
search: {
inputPlaceholder: 'Palabra va aquí ...',
buttonTitle: 'Ejecutar búsqueda',
orientationSuggestion: 'Si estabas buscando videos de sexo \"%SEARCH_QUERY%\", \
visita nuestra sección de %ORIENTATION% para obtener mejores resultados',
},
navigation: {
home: {title: 'Principal'},
allNiches: {title: 'Todas las Nichos'},
allMovies: {title: 'Todas Películas'},
pornstars: {title: 'Pornstars'},
favorite: {title: 'Favoritos'},
},
ordering: {
label: 'Ordenar',
byDate: 'Cita',
byDuration: 'Plazo',
byPopularity: 'Distinguido',
byRelevant: 'Principal',
},
buttons: {
report: 'Informe',
favoriteMovies: 'Escenas',
favoritePornstars: 'Pornstars',
archive: 'Archivo escenas',
prev: 'Ante',
next: 'Próx',
previousMonth: 'Mes anterior',
nextMonth: 'Próximo mes',
topFilms: 'Mejores peliculas',
backToMainPage: 'Volver a la Página Principal',
addToFavorite: 'Agregar a "Favoritos',
removeFromFavorite: 'Eliminar de favorito',
agree: 'Sí',
cancel: 'Cancelar',
showInfo: 'Mostrar',
hideInfo: 'Ocultar',
},
footer: {
forParents: 'Los padres - Proteja a sus hijos del contenido para adultos con \
estos servicios:',
disclaimer: 'Descargo de responsabilidad: Todo el contenido enviado por terceros \
en es.videosection.com es responsabilidad exclusiva de dichos terceros. \
Tenemos una política de tolerancia cero contra la pornografía ilegal. \
No nos hacemos responsables por el contenido de cualquier sitio web que este \
vinculado, por favor, utilice su propio criterio mientras navega por los enlaces.',
},
report: {
title: `¿Has encontrado algún problema en el sitio? Utilice este formulario para \
ayudarnos a solucionarlo o contáctenos directamente`,
duration: 'Duración',
added: 'Adicional',
hosted: 'Alojado por',
found: 'Encontrado en la página',
on: 'en',
radioLabel: 'Motivo del informe',
radioButtons: {
other: 'Otro',
deleted: 'La pelicula ha sido borrada',
doesntPlay: 'La pelicula no se reproduce',
badThumb: 'Baja calidad de la miniatura.',
young: 'La persona en la miniatura se ve muy joven',
incest: 'Incesto',
animals: 'Beastialidad (sexo con animales)',
otherScat: 'Otro contenido inapropiado (violación, sangre, excremento, \
etc ...)',
copyright: 'Violación de derechos de autor',
},
text: `Tome nota de: Nuestro sitio web es un motor de búsqueda para adultos \
completamente automático centrado en clips de videos. No poseemos, \
producimos, distribuimos ni alojamos películas. Todos los clips vinculados se \
recopilan automáticamente y se agregan a nuestro sistema mediante nuestro \
script Spider. Las miniaturas se generan automáticamente a partir de los \
colaboradores externos del video. Todo el contenido de video realizado en \
nuestro sitio está alojado y creado por otros sitios web que no están bajo \
nuestro control. Si lo solicita, podemos eliminar la miniatura y el enlace \
al video, pero no el archivo de video original.`,
succesText: 'Gracias por tu informe. Lo revisaremos pronto',
failureText: 'Algo salió mal. Inténtalo más tarde',
commentLabel: 'Comentario',
commentPlaceholder: 'Describe el problema',
userUrlPlaceholder: 'Inserta un enlace a la página que quieres reportar',
},
pornstarInfoParameters: { // TODO
alias: 'Aliases',
astrologicalSign: 'Astrological Sign',
bodyHair: 'Body Hair',
boobsFake: 'Natural or Fake Tits',
breast: 'Breast',
breastSizeType: 'Tits Size',
city: 'City',
colorEye: 'Eye Color',
colorHair: 'Hair Color',
country: 'Country of Origin',
cupSize: 'Cup Size',
ethnicity: 'Ethnicity',
extra: 'Extra',
height: 'Height',
hip: 'Hip',
name: 'Artist Name',
physiqueCustom: 'Physique',
piercings: 'Piercings',
profession: 'Profession',
sexualRole: 'Sexual Role',
shoeSize: 'Shoe Size',
tatoos: 'Tatoos',
waist: 'Waist',
weight: 'Weight',
birthday: 'Birthday',
lifetime: 'Life Time',
careerTime: 'Career Start and End',
penis: 'Penis',
},
notFound: {
title: 'Archivo no encontrado - Tubos porno gratis : %SITE%',
description: '404 página : %SITE%',
headerTitle: 'Oops... Tal vez explore las otras categorías de pornografía en \
nuestro sitio de videos',
headerDescription: 'Intenta volver a la página de inicio y encuentra la mejor \
colección de pornografía gratuita : %SITE%',
listHeader: '404 No encontrado. Lo siento compañero La página que solicitó \
no está en nuestra base de datos. Explora nuestras nuevas películas porno',
},
orientation: {
straight: 'Derecho',
gay: 'Homosexual',
tranny: 'Transexual',
},
},
por: {
htmlLangAttribute: 'pt',
labels: {
providedBy: 'fornecido por',
showing: 'Mostrando',
},
headers: {
allNiches: 'Todas as Niches',
niches: 'As Melhores Niches %ORIENTATION%',
listNiches: 'Todos %ORIENTATION% Videos Tube',
listArchive: 'Arquivos',
pornstars: 'As Melhores Pornstars %ORIENTATION%',
relatedVideo: 'Aprecia Estes Videos tube Relacionados',
},
search: {
inputPlaceholder: 'Palavra chave ou pornstar nome',
buttonTitle: 'Executar pesquisa',
orientationSuggestion: 'Se procuras \"%SEARCH_QUERY%\" porno por favor verifica \
a secção %ORIENTATION% do site para melhores resultados',
},
navigation: {
home: {title: 'Inicial'},
allNiches: {title: 'Todas as Niches'},
allMovies: {title: 'Todos os Vids tube'},
pornstars: {title: 'Pornstars'},
favorite: {title: 'Favoritos'},
},
ordering: {
label: 'Tipo',
byDate: 'Data',
byDuration: 'Duração',
byPopularity: 'Popular',
byRelevant: 'Relacionado',
},
buttons: {
report: 'Reportar',
favoriteMovies: 'Videos Tube',
favoritePornstars: 'Pornstars',
archive: 'Arquivo videos tube',
prev: 'Ante',
next: 'Próx',
previousMonth: 'Mês anterior',
nextMonth: 'Próximo mês',
topFilms: 'Top videos tube',
backToMainPage: 'Voltar à Página Principal',
addToFavorite: 'para Favoritos',
removeFromFavorite: 'dos Favoritos',
agree: 'Sim',
cancel: 'Cancelar',
showInfo: 'Mostrar',
hideInfo: 'Ocultar',
},
footer: {
forParents: 'Mantem as tuas crianças protegidas online, utiliza estes serviços \
para protejer a tua família:',
disclaimer: 'Isenção de responsabilidade: Todo o conteúdo submetido por \
terceiros em pt.videosection.com é da exclusiva responsabilidade desses \
terceiros. Nós temos uma política de tolerância zero contra a pornografia \
ilegal. Não nos responsabilizamos pelo conteúdo de qualquer site ao qual nos \
vinculemos. Por favor, use seu próprio critério enquanto navega pelos links.',
},
report: {
title: 'Você encontrou algum problema no site? Por favor, use este formulário \
para nos ajudar a corrigi-lo, ou entre em contato conosco diretamente',
duration: 'Duração',
added: 'Adicionado',
hosted: 'Hospedado por',
found: 'Encontrado na página',
on: 'em',
radioLabel: 'Comunicar razão',
radioButtons: {
other: 'De outros',
deleted: 'Filme foi deletado',
doesntPlay: 'O filme não toca',
badThumb: 'Baixa qualidade da miniatura',
young: 'Pessoa na miniatura parece muito jovem',
incest: 'Incesto',
animals: 'Bialialidade (sexo com animais)',
otherScat: 'Outro conteúdo inadequado (estupro, sangue, sangue, etc ...)',
copyright: 'Violação de direitos autorais',
},
text: `Tome nota: O nosso site é um motor de busca para adultos totalmente \
automático, focado em vídeos. Nós não possuímos, produzimos, distribuímos \
nem hospedamos nenhum filme. Todos os clipes vinculados são automaticamente \
reunidos e adicionados ao nosso sistema pelo nosso script de aranha. As \
miniaturas são geradas automaticamente pelos colaboradores de vídeo externos. \
Todo o conteúdo de vídeo realizado em nosso site é hospedado e criado por \
outros sites que não estão sob nosso controle. A seu pedido, podemos \
remover a miniatura e o link para o vídeo, mas não o arquivo de vídeo \
original.`,
succesText: 'Obrigado pelo seu relatório. Vamos revisá-lo em breve',
failureText: 'Algo deu errado. Tente mais tarde',
commentLabel: 'Comente',
commentPlaceholder: 'Descreva o problema',
userUrlPlaceholder: 'Insira um link para a página que você deseja denunciar',
},
pornstarInfoParameters: { // TODO
alias: 'Aliases',
astrologicalSign: 'Astrological Sign',
bodyHair: 'Body Hair',
boobsFake: 'Natural or Fake Tits',
breast: 'Breast',
breastSizeType: 'Tits Size',
city: 'City',
colorEye: 'Eye Color',
colorHair: 'Hair Color',
country: 'Country of Origin',
cupSize: 'Cup Size',
ethnicity: 'Ethnicity',
extra: 'Extra',
height: 'Height',
hip: 'Hip',
name: 'Artist Name',
physiqueCustom: 'Physique',
piercings: 'Piercings',
profession: 'Profession',
sexualRole: 'Sexual Role',
shoeSize: 'Shoe Size',
tatoos: 'Tatoos',
waist: 'Waist',
weight: 'Weight',
birthday: 'Birthday',
lifetime: 'Life Time',
careerTime: 'Career Start and End',
penis: 'Penis',
},
notFound: {
title: 'Arquivo não encontrado - Free Porn Tubes : %SITE%',
description: 'página 404 : %SITE%',
headerTitle: 'Opa... Talvez explore as outras categorias de pornografia no nosso \
site de vídeos',
headerDescription: 'Tente voltar para a página inicial e encontre a melhor \
coleção de pornografia gratuita : %SITE%',
listHeader: '404 não encontrado. Desculpe, parceiro. A página que você solicitou \
não está em nosso banco de dados. Explore nossos filmes pornôs frescos ',
},
orientation: {
straight: 'Heterossexual',
gay: 'Gays',
tranny: 'Travesti',
},
},
swe: {
htmlLangAttribute: 'sv',
labels: {
providedBy: 'tillhandahålls av',
showing: 'Som visar',
},
headers: {
allNiches: 'Alla Kategorier',
niches: 'Bästa %ORIENTATION% Kategorier',
listNiches: 'Alla %ORIENTATION% Klipp',
listArchive: 'Arkiv',
pornstars: 'Bästa %ORIENTATION% Porrstjärnor',
relatedVideo: 'Utforska Dessa Relaterade Klipp',
},
search: {
inputPlaceholder: 'Skriv nyckelordet här...',
buttonTitle: 'Kör sök',
orientationSuggestion: 'Om du sökte efter \"%SEARCH_QUERY%\"-sexvideor vänligen \
byt till vår %ORIENTATION%-sektion för bättre resultat',
},
navigation: {
home: {title: 'Hemsida'},
allNiches: {title: 'Alla Kategorier'},
allMovies: {title: 'Alla Scener'},
pornstars: {title: 'Porrstjärnor'},
favorite: {title: 'Favoriter'},
},
ordering: {
label: 'Sortera',
byDate: 'Datum',
byDuration: 'Varaktighet',
byPopularity: 'Rankning',
byRelevant: 'Instämmande',
},
buttons: {
report: 'Rapportera',
favoriteMovies: 'Klipp',
favoritePornstars: 'Porrstjärnor',
archive: 'Arkiv klipp',
prev: 'Förr',
next: 'Näst',
previousMonth: 'Förra månaden',
nextMonth: 'Nästa månad',
topFilms: 'Top klipp',
backToMainPage: 'Tillbaka till Huvudsidan',
addToFavorite: 'från Favoriter',
removeFromFavorite: 'till Favoriter',
agree: 'Ja',
cancel: 'Annullera',
showInfo: 'Visa info',
hideInfo: 'Dölja info',
},
footer: {
forParents: 'Barnsäkert och föräldrakontroll från vuxeninnehåll \
med dessa tjänster.:',
disclaimer: 'Ansvarsfriskrivning: Allt innehåll som lämnats av tredje part \
på sv.videosection.com är ensam ansvar för dessa tredje parter. Vi har \
en nolltoleranspolitik mot olaglig pornografi. Vi ansvarar inte för \
innehållet på någon webbplats som vi länkar till, använd din egen \
diskretion när du surfar på länkarna.',
},
report: {
title: 'Har du hittat ett problem på webbplatsen? Använd det här formuläret \
för att hjälpa oss att fixa det, eller kontakta oss direkt',
duration: 'Varaktighet',
added: 'Lagt till',
hosted: 'Tillhandahålls av',
found: 'Hittade på sidan',
on: 'på',
radioLabel: 'Anmäl rapport',
radioButtons: {
other: 'Andra',
deleted: 'Filmen har raderats',
doesntPlay: 'Film spelas inte',
badThumb: 'Liten kvalitet på miniatyrbilden',
young: 'Personen på miniatyrbilden ser för ung ut',
incest: 'Incest',
animals: 'Beastiality (sex med djur)',
otherScat: 'Annat olämpligt innehåll (våldtäkt, blod, scat etc ...)',
copyright: 'Upphovsrättsintrång',
},
text: `Observera: Vår webbplats är en helt automatisk vuxen sökmotor med \
inriktning på videoklipp. Vi äger inte, producerar, distribuerar eller värd \
några filmer. Alla länkade klipp samlas automatiskt in och läggs till i vårt \
system av vårt spindelskript. Miniatyrbilder genereras automatiskt från de \
yttre videoprediterarna. Allt videoinnehåll som utförs på vår webbplats är \
värd och skapat av andra webbplatser som inte är under vår kontroll. På din \
begäran kan vi ta bort miniatyrbilden och länka till videon, men inte den \
ursprungliga videofilen.`,
succesText: 'Tack för din rapport. Vi kommer att granska det snart',
failureText: 'Något gick fel. Försök igen senare',
commentLabel: 'Kommentar',
commentPlaceholder: 'Beskriv problemet',
userUrlPlaceholder: 'Infoga en länk till den sida du vill rapportera',
},
pornstarInfoParameters: { // TODO
alias: 'Aliases',
astrologicalSign: 'Astrological Sign',
bodyHair: 'Body Hair',
boobsFake: 'Natural or Fake Tits',
breast: 'Breast',
breastSizeType: 'Tits Size',
city: 'City',
colorEye: 'Eye Color',
colorHair: 'Hair Color',
country: 'Country of Origin',
cupSize: 'Cup Size',
ethnicity: 'Ethnicity',
extra: 'Extra',
height: 'Height',
hip: 'Hip',
name: 'Artist Name',
physiqueCustom: 'Physique',
piercings: 'Piercings',
profession: 'Profession',
sexualRole: 'Sexual Role',
shoeSize: 'Shoe Size',
tatoos: 'Tatoos',
waist: 'Waist',
weight: 'Weight',
birthday: 'Birthday',
lifetime: 'Life Time',
careerTime: 'Career Start and End',
penis: 'Penis',
},
notFound: {
title: 'Filen hittades inte - Gratis pornorör : %SITE%',
description: '404 sida : %SITE%',
headerTitle: 'Oops... Kanske utforska de andra porrkategorierna på vår videosida',
headerDescription: 'Försök att återvända till hemsidan och hitta bästa gratis \
porrsamling : %SITE%',
listHeader: '404 Not Found. Tyvärr, partner. Sidan du begärde finns inte i vår \
databas. Utforska våra fräscha porrfilmer',
},
orientation: {
straight: 'Straighta',
gay: 'Bögiga',
tranny: 'Shemale',
},
},
nld: {
htmlLangAttribute: 'nl',
labels: {
providedBy: 'geleverd door',
showing: 'Tonen',
},
headers: {
allNiches: 'Alle Groepen',
niches: 'Hoog Gewaardeerde %ORIENTATION% Groepen',
listNiches: '%ORIENTATION% Vids - Samenvatting',
listArchive: 'Archief',
pornstars: 'Hoog Gewaardeerde %ORIENTATION% Modellen',
relatedVideo: 'Bekijk Deze Gerelateerde Vids',
},
search: {
inputPlaceholder: 'Zoekveld',
buttonTitle: 'Voer een zoekopdracht uit',
orientationSuggestion: 'Als je op zoek bent naar \"%SEARCH_QUERY%\" sex video\'s \
bezoek dan onze %ORIENTATION% sectie voor betere resultaten',
},
navigation: {
home: {title: 'Hoofd'},
allNiches: {title: 'Alle Groepen'},
allMovies: {title: 'Alle Video\'s'},
pornstars: {title: 'Modellen'},
favorite: {title: 'Favorieten'},
},
ordering: {
label: 'Sorteer',
byDate: 'Tijdsduur',
byDuration: 'Lengte',
byPopularity: 'Populariteit',
byRelevant: 'Relevantie',
},
buttons: {
report: 'Meld',
favoriteMovies: 'Vids',
favoritePornstars: 'Modellen',
archive: 'Archief vids',
prev: 'Vori',
next: 'Volg',
previousMonth: 'Vorige maand',
nextMonth: 'Volgende maand',
topFilms: 'Top Vids',
backToMainPage: 'Terug naar de Hoofdpagina',
addToFavorite: 'naar Favorieten',
removeFromFavorite: 'uit Favorieten',
agree: 'Ja',
cancel: 'Annuleren',
showInfo: 'Toon info',
hideInfo: 'Verbergen',
},
footer: {
forParents: 'Kindveiligheid en ouderlijk toezicht op inhoud voor \
volwassenen met deze diensten:',
disclaimer: 'Disclaimer: nl.videosection.com voert een zerotolerancebeleid \
tegen illegale pornografie. Alle modellen op deze website waren ouder dan \
18 toen de foto\'s gemaakt werden. De inhoud van deze website is niet \
geschikt voor minderjarigen. Probeer te voorkomen dat deze website \
bekeken wordt door mensen onder de 18 jaar. Alle galerieën en links \
worden door derde partijen ter beschikking gesteld en automatisch \
aan onze site toegevoegd.',
},
report: {
title: 'Heb je een probleem gevonden op de site? Gebruik dit formulier om ons \
te helpen het probleem op te lossen, of neem direct contact met ons op',
duration: 'Looptijd',
added: 'Toegevoegd',
hosted: 'Gepresenteerd door',
found: 'Gevonden op pagina',
on: 'op',
radioLabel: 'Rapporteer reden',
radioButtons: {
other: 'Anders',
deleted: 'Film is verwijderd',
doesntPlay: 'Film speelt niet',
badThumb: 'Lage kwaliteit van de miniatuur',
young: 'Persoon op de miniatuur ziet er te jong uit',
incest: 'Incest',
animals: 'Beastialiteit (seks met dieren)',
otherScat: 'Andere ongepaste inhoud (verkrachting, bloed, scat, enz ...)',
copyright: 'Schending van auteursrechten',
},
text: `Let op: onze website is een volledig automatische volwassen zoekmachine \
gericht op videoclips. We bezitten, produceren, distribueren of hosten geen \
films. Alle gekoppelde clips worden automatisch verzameld en toegevoegd aan \
ons systeem door ons spiderscript. Thumbnails worden automatisch gegenereerd \
door externe bijdragers. Alle video-inhoud die op onze site wordt uitgevoerd, \
wordt gehost en gemaakt door andere websites die niet onder onze controle \
vallen. Op uw verzoek kunnen we de miniatuur verwijderen en naar de video \
linken, maar niet het originele videobestand.`,
succesText: 'Bedankt voor je verslag. We zullen het binnenkort beoordelen',
failureText: 'Er is iets fout gegaan. Probeer het later opnieuw',
commentLabel: 'Commentaar',
commentPlaceholder: 'Beschrijf het probleem',
userUrlPlaceholder: 'Voeg een link in naar de pagina die u wilt rapporteren',
},
pornstarInfoParameters: { // TODO
alias: 'Aliases',
astrologicalSign: 'Astrological Sign',
bodyHair: 'Body Hair',
boobsFake: 'Natural or Fake Tits',
breast: 'Breast',
breastSizeType: 'Tits Size',
city: 'City',
colorEye: 'Eye Color',
colorHair: 'Hair Color',
country: 'Country of Origin',
cupSize: 'Cup Size',
ethnicity: 'Ethnicity',
extra: 'Extra',
height: 'Height',
hip: 'Hip',
name: 'Artist Name',
physiqueCustom: 'Physique',
piercings: 'Piercings',
profession: 'Profession',
sexualRole: 'Sexual Role',
shoeSize: 'Shoe Size',
tatoos: 'Tatoos',
waist: 'Waist',
weight: 'Weight',
birthday: 'Birthday',
lifetime: 'Life Time',
careerTime: 'Career Start and End',
penis: 'Penis',
},
notFound: {
title: 'Bestand niet gevonden - Gratis Porno Tubes : %SITE%',
description: '404 pagina : %SITE%',
headerTitle: 'Oeps... Misschien verken je de andere porno-categorieën op \
onze videosite',
headerDescription: 'Probeer terug te gaan naar de startpagina en vind de \
beste gratis pornocollectie : %SITE%',
listHeader: '404 Niet gevonden. Sorry partner. De door u opgevraagde pagina \
staat niet in onze database. Ontdek onze verse pornofilms',
},
orientation: {
straight: 'Hetero',
gay: 'Gay',
tranny: 'Shemale',
},
},
fin: {
htmlLangAttribute: 'fi',
labels: {
providedBy: 'toimittamat',
showing: 'Näytetään',
},
headers: {
allNiches: 'Kaikki Nichet',
niches: 'Suositut %ORIENTATION% Nichet',
listNiches: 'Kaikki %ORIENTATION% Videoita',
listArchive: 'Arkisto',
pornstars: 'Suositut %ORIENTATION% Pornotähtiä',
relatedVideo: 'Tsekkaa Nämä Vastaavat Videoita',
},
search: {
inputPlaceholder: 'Hakulaatikko',
buttonTitle: 'Suorita haku',
orientationSuggestion: 'Jos etsit \"%SEARCH_QUERY%\" pornoa, ole hyvä ja siirry \
sivustomme %ORIENTATION%–osioon saadaksesi parempia tuloksia',
},
navigation: {
home: {title: 'Etusivu'},
allNiches: {title: 'Kaikki Nichet'},
allMovies: {title: 'Leffat'},
pornstars: {title: 'Pornotähtiä'},
favorite: {title: 'Suosikki'},
},
ordering: {
label: 'Lajittele',
byDate: 'Päiväys',
byDuration: 'Kesto',
byPopularity: 'Suositut',
byRelevant: 'Tärkeimmät',
},
buttons: {
report: 'Ilmianna',
favoriteMovies: 'Pornotähtiä',
favoritePornstars: 'Videoita',
archive: 'Arkisto videoita',
prev: 'Viim',
next: 'Ensi',
previousMonth: 'Viime kuukausi',
nextMonth: 'Ensikuussa',
topFilms: 'Parhaat videoita',
backToMainPage: 'Takaisin Etusivulle',
addToFavorite: 'Suosikkeihin',
removeFromFavorite: 'Suosikeista',
agree: 'Joo',
cancel: 'Peruuttaa',
showInfo: 'Näytä',
hideInfo: 'Piilota',
},
footer: {
forParents: 'Vanhemmat - Suojelkaa lapsianne aikuissisällöltä näillä palveluilla:',
disclaimer: 'Vastuuvapauslauseke: Kaikki tämän sivuston mallit ovat \
18-vuotiaita tai vanhempia. fi.videosection.com noudattaa nollatoleranssia \
LAITONTA pornografiaa vastaan. Jos löydät sivustolta jotain laitonta, ole \
hyvä ja ilmoita siitä meille sähköpostilla, ja poistamme sen niin nopeasti kuin \
mahdollista. Kaikki sivuston kuvagalleriat ja linkit tulevat meille kolmansien \
osapuolien kautta. Me emme voi valvoa näiden sivujen sisältöä, sillä kaikki \
aineisto lisätään automaattisesti.',
},
report: {
title: 'Oletko löytänyt ongelman sivustolla? Käytä tätä lomaketta, jotta \
voimme korjata sen tai ottaa meihin yhteyttä suoraan',
duration: 'Kesto',
added: 'lisätty',
hosted: 'Isännöi',
found: 'Löydetty sivulla',
on: 'päällä',
radioLabel: 'Ilmoita syystä',
radioButtons: {
other: 'Muut',
deleted: 'Elokuva on poistettu',
doesntPlay: 'Elokuva ei toista',
badThumb: 'Pienoiskuvan alhainen laatu',
young: 'Pikkukuvassa oleva henkilö näyttää liian nuorelta',
incest: 'insesti',
animals: 'Beastiality (sukupuoli eläinten kanssa)',
otherScat: 'Muu epäasianmukainen sisältö (raiskaus, veri, huijaus jne.)',
copyright: 'Tekijänoikeusrikkomus',
},
text: `Huomaa: Sivustomme on täysin automaattinen aikuisten hakukone, joka \
keskittyy videoleikkeisiin. Emme hallitse, tuota, levitä tai isännöi \
elokuvia. Kaikki linkitetyt leikkeet kerätään automaattisesti ja lisätään \
järjestelmään hämähäkkikirjoituksemme. Pikkukuvat luodaan automaattisesti \
ulkopuolisilta videokuvaajilta. Kaikki sivustossamme suoritetut videosisältöjä \
ylläpitävät ja luovat muut sivustot, jotka eivät ole meidän hallinnassamme. \
Pyydämme voimme poistaa pikkukuvan ja linkin videoon, \
mutta ei alkuperäistä videotiedostoa.`,
succesText: 'Kiitos mietinnöstäsi. Tarkistamme sen pian',
failureText: 'Jotain meni pieleen. Yritä myöhemmin uudelleen',
commentLabel: 'Kommentti',
commentPlaceholder: 'Kuvaile ongelmaa',
userUrlPlaceholder: 'Lisää linkki sivulle, josta haluat raportoida',
},
pornstarInfoParameters: { // TODO
alias: 'Aliases',
astrologicalSign: 'Astrological Sign',
bodyHair: 'Body Hair',
boobsFake: 'Natural or Fake Tits',
breast: 'Breast',
breastSizeType: 'Tits Size',
city: 'City',
colorEye: 'Eye Color',
colorHair: 'Hair Color',
country: 'Country of Origin',
cupSize: 'Cup Size',
ethnicity: 'Ethnicity',
extra: 'Extra',
height: 'Height',
hip: 'Hip',
name: 'Artist Name',
physiqueCustom: 'Physique',
piercings: 'Piercings',
profession: 'Profession',
sexualRole: 'Sexual Role',
shoeSize: 'Shoe Size',
tatoos: 'Tatoos',
waist: 'Waist',
weight: 'Weight',
birthday: 'Birthday',
lifetime: 'Life Time',
careerTime: 'Career Start and End',
penis: 'Penis',
},
notFound: {
title: 'Tiedostoa ei löydy - Free Porn Tubes : %SITE%',
description: '404 sivu : %SITE%',
headerTitle: 'Hups... Ehkä tutustu videopalvelumme muihin pornoluokkiin',
headerDescription: "Yritä palata kotisivulle ja löytää paras ilmainen \
pornokokoelma : %SITE%",
listHeader: '404 Ei löydy. Anteeksi, kumppani. Pyytämäsi sivu ei ole \
tietokannassamme. Tutustu tuoreisiin pornoelokuviin',
},
orientation: {
straight: 'Hetero',
gay: 'Homo',
tranny: 'Shemale',
},
},
rus: {
htmlLangAttribute: 'ru',
labels: {
providedBy: 'предоставлено',
showing: 'Показано',
},
headers: {
allNiches: 'Все Группы',
niches: 'Лучшие %ORIENTATION% Группы',
listNiches: 'Все %ORIENTATION% видео',
listArchive: 'Архивы',
pornstars: 'Модели',
relatedVideo: 'Лучшие похожие ролики',
},
search: {
inputPlaceholder: 'Искать на сайте',
buttonTitle: 'Начать поиск',
orientationSuggestion: 'Если вы ищете \"%SEARCH_QUERY%\" секс видео, пожалуйста, \
посетите наш %ORIENTATION% раздел для лучших результатов поиска',
},
navigation: {
home: {title: 'Главная'},
allNiches: {title: 'Все Группы'},
allMovies: {title: 'Все Видео'},
pornstars: {title: 'Модели'},
favorite: {title: 'Избранное'},
},
ordering: {
label: 'Сортировка',
byDate: 'Новые',
byDuration: 'Длительность',
byPopularity: 'Рейтинг',
byRelevant: 'Тематика',
},
buttons: {
report: 'Жалоба',
favoriteMovies: 'Видео',
favoritePornstars: 'Модели',
archive: 'Архив видео',
prev: 'Пред',
next: 'След',
previousMonth: 'Предыдущий месяц',
nextMonth: 'Следующий месяц',
topFilms: 'Топ видео',
backToMainPage: 'Вернуться на главную',
addToFavorite: 'В избранное',
removeFromFavorite: 'Из избранного',
agree: 'Да',
cancel: 'Отменить',
showInfo: 'Развернуть',
hideInfo: 'Скрыть',
},
footer: {
forParents: 'Родители - Защитите детей от посещения сайтов для взрослых с \
помощью этих сервисов:',
disclaimer: 'Отказ от ответственности: ru.videosection.com имеет политику \
нетерпимости в отношении незаконной порнографии. На момент фотосъемки все \
модели, представленные на этом сайте, были старше 18 лет. Содержание этого \
сайта не подходит для несовершеннолетних. Все галереи и ссылки предоставлены \
третьими лицами и добавлены на наш сайт автоматически.',
},
report: {
title: 'Вы нашли проблему на сайте? Пожалуйста, используйте эту форму, \
чтобы помочь нам исправить это, или свяжитесь с нами напрямую',
duration: 'Продолжительность',
added: 'Добавлено',
hosted: 'Предоставлено',
found: 'Найдено на странице',
on: 'на',
radioLabel: 'Причина жалобы',
radioButtons: {
other: 'Другая',
deleted: 'Фильм был удален',
doesntPlay: 'Фильм не воспроизводится',
badThumb: 'Низкое качество миниатюры',
young: 'Человек на миниатюре выглядит слишком молодым',
incest: 'Инцест',
animals: 'Зоофилия (секс с животными)',
otherScat: 'Другое неприемлемое содержание (изнасилование, кровь и т. д.)',
copyright: 'Нарушение авторских прав',
},
text: `Обратите внимание: наш сайт представляет собой полностью автоматический \
поисковый движок для взрослых, ориентированный на видеоролики. Мы не владеем, \
не производим, не распространяем и не размещаем фильмы. Все связанные клипы \
автоматически собираются и добавляются в нашу систему с помощью нашего \
скрипта-паука. Миниатюры создаются автоматически из сторонних авторов видео. \
Весь видеоконтент, размещенный на нашем сайте, размещен и создан другими \
сайтами, которые не находятся под нашим контролем. По вашему запросу мы можем \
удалить миниатюру и ссылку на видео, но не оригинальный видеофайл.`,
succesText: 'Спасибо за вашу жалобу. Мы скоро рассмотрим её',
failureText: 'Что-то пошло не так. Попробуйте позже',
commentLabel: 'Комментарий',
commentPlaceholder: 'Опишите проблему',
userUrlPlaceholder: 'Вставте ссылку на страницу на которую вы хотите пожаловаться',
},
pornstarInfoParameters: {
alias: 'Псевдонимы',
astrologicalSign: 'Астрологический знак',
bodyHair: 'Волосы на теле',
boobsFake: 'Натуральные или искуственные сиськи',
breast: 'Размер сисек',
breastSizeType: 'Размер груди',
city: 'Город',
colorEye: 'Цвет глаз',
colorHair: 'Цвет волос',
country: 'Страна рождения',
cupSize: 'Размер бюзгалтера',
ethnicity: 'Этническая принадлежность',
extra: 'Дополнительная информация',
height: 'Рост',
hip: 'Бедра',
name: 'Имя',
physiqueCustom: 'Телосложение',
piercings: 'Пирсинг',
profession: 'Профессия',
sexualRole: 'Сексуальная роль',
shoeSize: 'Размер обуви',
tatoos: 'Татуировки',
waist: 'Талия',
weight: 'Вес',
birthday: 'Дата рождения',
lifetime: 'Время жизни',
careerTime: 'Начало и конец карьеры',
penis: 'Пенис',
},
notFound: {
title: 'Файл не найден : %SITE%',
description: '404 страница : %SITE%',
headerTitle: 'Ой... Может быть, исследуете другие категории порно на нашем \
видео сайте',
headerDescription: 'Попробуйте вернуться на главную страницу и найти лучшие \
бесплатные порно коллекции : %SITE%',
listHeader: '404 Не найдено. Извините, партнер. Запрошенная вами страница \
отсутствует в нашей базе данных. Изучите наши свежие порно фильмы',
},
orientation: {
straight: 'Гетеро',
gay: 'Геи',
tranny: 'Транссексуал',
},
},
tur: {
htmlLangAttribute: 'tr',
labels: {
providedBy: 'tarafından sunulan',
showing: 'Gösterme',
},
headers: {
allNiches: 'Tüm Gruplar',
niches: 'En Popüler %ORIENTATION% Gruplar',
listNiches: '%ORIENTATION% Videolar Toplam',
listArchive: 'Arşiv',
pornstars: 'En Popüler %ORIENTATION% Modeller',
relatedVideo: 'Alakalı Olarak Şunlara Bir Bakın',
},
search: {
inputPlaceholder: 'Video Section\'de Ara',
buttonTitle: 'Arama çalıştır',
orientationSuggestion: 'Eğer \"%SEARCH_QUERY%\" seks videoları arıyorsanız, \
lütfen sayfamızın %ORIENTATION% bölümüne tıklayın',
},
navigation: {
home: {title: 'Anasayfa'},
allNiches: {title: 'Tüm Gruplar'},
allMovies: {title: 'Tüm Sahneler'},
pornstars: {title: 'Modeller'},
favorite: {title: 'Favoriler'},
},
ordering: {
label: 'Sırala',
byDate: 'Tarihe',
byDuration: 'Süresine',
byPopularity: 'Popüler',
byRelevant: 'Alakalı',
},
buttons: {
report: 'Rapor Et',
favoriteMovies: 'Videolar',
favoritePornstars: 'Modeller',
archive: 'Arşiv videolar',
prev: 'Geçt',
next: 'Gele',
previousMonth: 'Geçtiğimiz ay',
nextMonth: 'Gelecek ay',
topFilms: 'Top videolar',
backToMainPage: 'Ana Sayfaya geri dön',
addToFavorite: 'Favorilere git',
removeFromFavorite: 'Favoriler den',
agree: 'Evet',
cancel: 'Iptal etmek',
showInfo: 'Göster',
hideInfo: 'Gizle',
},
footer: {
forParents: 'Çocuklarınızı internette güvende tutun. Aşağıdaki hizmetleri \
kullanarak ailenizi pornografiden koruyabilirsiniz:',
disclaimer: 'Yasal Uyarı: Bu sitedeki tüm modeller 18 yaşının üstündedir. \
tr.videosection.com yasal olmayan pornografiye karşı sıfır tolerans \
politikası uygulamaktadır. Bu sayfaların içeriği üzerinde bir kontrolümüz \
bulunmamaktadır. Sitemizdeki tüm linkler ve galeriler üçüncü şahıslar \
tarafından sunulmakta olup, sitemize otomatik olarak yüklenmektedir. \
Link verilen hiçbir sitenin içeriğinden sorumlu olmadığımızdan, kendi \
tercihinizle bu siteleri ziyaret edeceğinizi hatırlatmak isteriz.',
},
report: {
title: 'Sitede bir sorun mu buldunuz? Lütfen bu formu düzeltmemize yardımcı \
olmak için kullanın veya doğrudan bizimle iletişime geçin.',
duration: 'Süre',
added: 'Katma',
hosted: 'Tarafından barındırılan',
found: 'Sayfada bulundu',
on: 'üzerinde',
radioLabel: 'Sebep bildir',
radioButtons: {
other: 'Diğer',
deleted: 'Film silindi',
doesntPlay: 'Film oynamıyor',
badThumb: 'Küçük resmin kalitesi',
young: 'Küçük resimdeki kişi çok genç görünüyor',
incest: 'Ensest',
animals: 'Hayvancılık (hayvanlarla seks)',
otherScat: 'Diğer uygunsuz içerik (tecavüz, kan, scat vb.)',
copyright: 'Telif hakkı ihlali',
},
text: `Dikkat: Web sitemiz video kliplere odaklanan tamamen otomatik bir yetişkin \
arama motorudur. Herhangi bir filme sahip değiliz, üretmiyoruz, dağıtmıyoruz \
veya barındırmıyoruz. Bağlantılı tüm klipler otomatik olarak toplanır ve \
örümcek senaryomuzla sistemimize eklenir. Küçük resimler, dış video \
katılımcılarından otomatik olarak oluşturulur. Sitemizde yapılan tüm video \
içerikleri, kontrolümüz altında olmayan diğer web siteleri tarafından \
barındırılmaktadır. İsteğinize göre, küçük videoyu kaldırabilir ve videonun \
bağlantısını ancak orijinal video dosyasını kaldırabiliriz.`,
succesText: 'Raporun için teşekkür ederim. Yakında gözden geçireceğiz',
failureText: 'Bir şeyler yanlış gitti. Daha sonra tekrar deneyin',
commentLabel: 'Yorum Yap',
commentPlaceholder: 'Sorunu tarif et',
userUrlPlaceholder: 'Bildirmek istediğiniz sayfaya bir link ekleyin',
},
pornstarInfoParameters: { // TODO
alias: 'Aliases',
astrologicalSign: 'Astrological Sign',
bodyHair: 'Body Hair',
boobsFake: 'Natural or Fake Tits',
breast: 'Breast',
breastSizeType: 'Tits Size',
city: 'City',
colorEye: 'Eye Color',
colorHair: 'Hair Color',
country: 'Country of Origin',
cupSize: 'Cup Size',
ethnicity: 'Ethnicity',
extra: 'Extra',
height: 'Height',
hip: 'Hip',
name: 'Artist Name',
physiqueCustom: 'Physique',
piercings: 'Piercings',
profession: 'Profession',
sexualRole: 'Sexual Role',
shoeSize: 'Shoe Size',
tatoos: 'Tatoos',
waist: 'Waist',
weight: 'Weight',
birthday: 'Birthday',
lifetime: 'Life Time',
careerTime: 'Career Start and End',
penis: 'Penis',
},
notFound: {
title: 'Dosya bulunamadı - Bedava Porno Tüpler : %SITE%',
description: '404 Sayfa : %SITE%',
headerTitle: 'Hata! Belki de video sitemizdeki diğer porno kategorilerini inceleyin',
headerDescription: 'Ana sayfaya dönmeye ve en iyi bedava porno \
koleksiyonunu bulmaya çalış : %SITE%',
listHeader: '404 Bulunamadı. Üzgünüm ortak. İstediğiniz sayfa \
veritabanımızda yok. Yeni porno filmlerimizi keşfedin',
},
orientation: {
straight: 'Hetero',
gay: 'Gayler',
tranny: 'Travestiler',
},
},
})
/*
A helper which could be used during application initialization to validate locales from server
with own data structure.
*/
export const validate = siteLocales => {
// generating model of every language code received from backend
const mappingModel = PropTypes.exact(
siteLocales.reduce((obj, x) => set(obj, g(x, 'code'), i18nModel), {})
)
assertPropTypes(mappingModel, mapping, 'api-locale-mapping', 'validate')
}
export default mapping
|
function showModal() {
$('#up-load-img-win').fadeIn();
}
function hideModal() {
$('#up-load-img-win').fadeOut();
}
function controlModal () {
$('.up-load-unit-img').on('click', function () {
var clickState = $(this).attr('status');
var idx = $(this).index();
if (clickState !== '0') {
$('#look-big-img-win').fadeIn();
goToSlide(idx);
return;
}
showModal();
})
var errTimer;
$('#start-uploading-btn').on('click', function () {
if (autofiles.length > 4) {
clearTimeout(errTimer);
$('.up-load-img-err-txt').fadeIn();
errTimer = setTimeout(function () {
$('.up-load-img-err-txt').fadeOut();
}, 1000)
return;
}
showModal();
})
$('#close-up-load-img-btn').on('click', function () {
var afLen = autofiles.length - gloLen;
autofiles.splice(afLen, gloLen);
hideModal();
clearAll();
})
$('.up-load-img-btn').on('click', function () {
if (!$(this).hasClass('global-btn-styl')) {
return;
}
uploadFc();
})
}
var upLoadWin = document.getElementById('up-load-img-win');
var upLoadArea = document.getElementById('up-load-area');
upLoadWin.ondragover = function (e) {
e.preventDefault();
}
upLoadWin.ondragleave = function (e) {
e.preventDefault();
}
upLoadWin.ondrop = function (e) {
e.preventDefault();
$('.cr-step-win-err').html('请把文件拖到上传区域!').fadeIn();
}
upLoadArea.ondragover = function (e) {
e.preventDefault();
}
upLoadArea.ondragleave = function (e) {
e.preventDefault();
}
var uploadImg = [];
var autofiles = [];
var gloLen = 0;
upLoadArea.ondrop = function (e) {
e.preventDefault();
e.stopPropagation();
$('.cr-step-win-err').html(' ').hide();
var files = e.dataTransfer.files;
if (!files) {
$('.cr-step-win-err').html('您使用的浏览器不支持拖拽上传图片, 请更换浏览器再来使用!').fadeIn();
return;
}
gloLen = files.length;
var len = files.length - 0;
var xlen = $('.has-img-wrapper').find('p').length - 0;
var zLen = len + xlen;
var xxLen = len + autofiles.length;
var overNum = 5 - autofiles.length;
if (zLen > 5) {
$('.cr-step-win-err').html('最多只能上传5张图片!').fadeIn();
return;
}
if (xxLen > 5) {
$('.cr-step-win-err').html('最多只能上传5张图片, 您已上传' + autofiles.length + '张图片,还可上传' + overNum + '张图片!').fadeIn();
return;
}
var i = 0;
var frag = document.createDocumentFragment();
var fileBox, time, size;
while (i < len) {
size = Math.round(files[i].size * 100 / 1024) / 100 + 'KB';
if (files[i].type.indexOf("image") == -1 || size > 1024) {
$('.cr-step-win-err').html('仅支持1M以内jpg、jpeg、gif、png格式图片上传!').fadeIn();
return;
}
fileBox = document.createElement('p');
time = files[i].lastModifiedDate.toLocaleDateString() + ' ' + files[i].lastModifiedDate.toTimeString().split(' ')[0];
fileBox.innerHTML = '<span class="upload-files-name in-block">' + files[i].name + '</span><span class="upload-files-time in-block">' + time + '</span><span class="upload-files-size in-block">' + size + '</span><span class="upload-files-del-btn in-block">删除</span>';
frag.appendChild(fileBox);
autofiles.push(files[i]);
i++;
}
$('.not-img-wrapper').hide();
$('.has-img-wrapper').fadeIn().append(frag);
$('.up-load-img-btn').addClass('global-btn-styl');
delOne();
var plen = $('.has-img-wrapper').find('p');
if (plen.length > 5) {
$('.cr-step-win-err').html('最多只能上传5张图片,请删除超出的图片!').fadeIn();
$('.up-load-img-btn').removeClass('global-btn-styl');
return;
}
var fnameArr = [];
plen.each(function () {
var fname = $(this).find('.upload-files-name').html();
fnameArr.push(fname);
})
var iqueArr = unique(fnameArr);
if (iqueArr.length !== fnameArr.length) {
$('.cr-step-win-err').html('请删除重复的图片!').fadeIn();
$('.up-load-img-btn').removeClass('global-btn-styl');
return;
}
}
function clickDrop () {
$('#up-load-area').on('click', function () {
return $('#chooseImg').click();
})
}
function selectImg(file) {
var files = file.files;
if (!files) {
$('.cr-step-win-err').html('您使用的浏览器不支持上传图片, 请更换浏览器再来使用!').fadeIn();
return;
}
gloLen = files.length;
var len = files.length - 0;
var xlen = $('.has-img-wrapper').find('p').length - 0;
var zLen = len + xlen;
var xxLen = len + autofiles.length;
var overNum = 5 - autofiles.length;
if (zLen > 5) {
$('.cr-step-win-err').html('最多只能上传5张图片!').fadeIn();
return;
}
if (xxLen > 5) {
$('.cr-step-win-err').html('最多只能上传5张图片, 您已上传' + autofiles.length + '张图片,还可上传' + overNum + '张图片!').fadeIn();
return;
}
var i = 0;
var frag = document.createDocumentFragment();
var fileBox, time, size;
while (i < len) {
size = Math.round(files[i].size * 100 / 1024) / 100 + 'KB';
if (files[i].type.indexOf("image") == -1 || size > 1024) {
$('.cr-step-win-err').html('仅支持1M以内jpg、jpeg、gif、png格式图片上传!').fadeIn();
return;
}
fileBox = document.createElement('p');
time = files[i].lastModifiedDate.toLocaleDateString() + ' ' + files[i].lastModifiedDate.toTimeString().split(' ')[0];
fileBox.innerHTML = '<span class="upload-files-name in-block">' + files[i].name + '</span><span class="upload-files-time in-block">' + time + '</span><span class="upload-files-size in-block">' + size + '</span><span class="upload-files-del-btn in-block">删除</span>';
frag.appendChild(fileBox);
autofiles.push(files[i]);
i++;
}
$('.not-img-wrapper').hide();
$('.has-img-wrapper').fadeIn().append(frag);
$('.up-load-img-btn').addClass('global-btn-styl');
delOne();
var plen = $('.has-img-wrapper').find('p');
if (plen.length > 5) {
$('.cr-step-win-err').html('最多只能上传5张图片,请删除超出的图片!').fadeIn();
$('.up-load-img-btn').removeClass('global-btn-styl');
return;
}
var fnameArr = [];
plen.each(function () {
var fname = $(this).find('.upload-files-name').html();
fnameArr.push(fname);
})
var iqueArr = unique(fnameArr);
if (iqueArr.length !== fnameArr.length) {
$('.cr-step-win-err').html('请删除重复的图片!').fadeIn();
$('.up-load-img-btn').removeClass('global-btn-styl');
return;
}
}
function uploadFc () {
uploadImg = [];
for (var i = 0; i < autofiles.length; i++) {
(function (i) {
var fr = new FileReader();
fr.readAsDataURL(autofiles[i]);
fr.onload = function (ev){
var Url = ev.target.result;
uploadImg.push(Url);
if (uploadImg.length === autofiles.length) {
var iqueArr = unique(uploadImg);
if (iqueArr.length !== uploadImg.length) {
$('.cr-step-win-err').html('请删除重复的图片!').fadeIn();
$('.up-load-img-btn').removeClass('global-btn-styl');
return;
}
var xhtml = '';
for (var j = 0; j < uploadImg.length; j++) {
$('.up-load-unit-img').eq(j).attr('status', 1).find('img').attr('src', uploadImg[j]);
xhtml += '<li class="big-img-item"><img src="' + uploadImg[j] + '" height="100%"></li>';
}
$('.big-img-list').html(xhtml);
$('.cr-step-le-desc').hide();
$('.look-big-img-btn').fadeIn();
hideModal();
clearAll();
}
}
})(i)
}
}
function unique (arr) {
var hash=[];
for (var i = 0; i < arr.length; i++) {
if (hash.indexOf(arr[i]) == -1) {
hash.push(arr[i]);
}
}
return hash;
}
function clearAll () {
if($('.has-img-wrapper').find('p').length < 1){
return;
}
$('.has-img-wrapper').hide().empty();
$('.not-img-wrapper').fadeIn();
$('.cr-step-win-err').html(' ').hide();
$('.up-load-img-btn').removeClass('global-btn-styl');
}
function delOne () {
$(".upload-files-del-btn").on('click', function (e) {
e.stopPropagation();
var _idx = $(this).siblings('.upload-files-name').html();
for (var i = 0; i < autofiles.length; i++) {
var forstate = (function (i) {
if (autofiles[i].name === _idx) {
autofiles.splice(i, 1);
return false;
}
return true;
})(i);
if (!forstate) {
break;
}
}
var key = $(this).siblings('.upload-files-name').html();
$(this).parent().remove();
var plen = $('.has-img-wrapper').find('p');
if (plen.length > 5) {
$('.cr-step-win-err').html('最多只能上传5张图片,请删除超出的图片!').fadeIn();
$('.up-load-img-btn').removeClass('global-btn-styl');
return;
}
if (plen.length < 1) {
$('.has-img-wrapper').hide();
$('.not-img-wrapper').fadeIn();
$('.cr-step-win-err').html(' ').hide();
$('.up-load-img-btn').removeClass('global-btn-styl');
return;
}
var fnameArr = [];
plen.each(function () {
var fname = $(this).find('.upload-files-name').html();
fnameArr.push(fname);
})
var iqueArr = unique(fnameArr);
if (iqueArr.length !== fnameArr.length) {
$('.cr-step-win-err').html('请删除重复的图片!').fadeIn();
$('.up-load-img-btn').removeClass('global-btn-styl');
return;
}
$('.cr-step-win-err').html(' ').hide();
$('.up-load-img-btn').addClass('global-btn-styl');
});
}
$(function () {
controlModal();
clickDrop();
})
|
var NAVTREEINDEX6 =
{
"navtree_8js.html#a6522b3f540ead0febf12ccf5fc1f04c4":[2,0,0,372,22],
"navtree_8js.html#a70bc36adda6141a703fc7ee2b772ec63":[2,0,0,372,26],
"navtree_8js.html#a819e84218d50e54d98161b272d1d5b01":[2,0,0,372,4],
"navtree_8js.html#a84095390aca39b6cb693d3fb22d32dd0":[2,0,0,372,23],
"navtree_8js.html#a9336c21407bb7ced644331eb7a2a6e35":[2,0,0,372,25],
"navtree_8js.html#aa2418b16159e9502e990f97ea6ec26c8":[2,0,0,372,16],
"navtree_8js.html#aa78016020f40c28356aefd325cd4df74":[2,0,0,372,18],
"navtree_8js.html#aa7b3067e7ef0044572ba86240b1e58ce":[2,0,0,372,13],
"navtree_8js.html#aaa2d293f55e5fe3620af4f9a2836e428":[2,0,0,372,0],
"navtree_8js.html#aaeb20639619e1371c030d36a7109b27b":[2,0,0,372,11],
"navtree_8js.html#abdf8e0e69c89803c1b84784a13b7fd2e":[2,0,0,372,2],
"navtree_8js.html#ac49af616f532f2364be9f58280469d33":[2,0,0,372,14],
"navtree_8js.html#ade730323aadb971c053136b7758c9dce":[2,0,0,372,24],
"navtree_8js.html#aee1fc3771eeb15da54962a03da1f3c11":[2,0,0,372,8],
"navtree_8js.html#aee39e0d4ab2646ada03125bd7e750cf7":[2,0,0,372,29],
"navtree_8js.html#af98a8e3534da945399ea20870c0f3e92":[2,0,0,372,21],
"navtree__8js_8js.html":[2,0,0,373],
"navtree__8js_8js.html#aeb786105859338816e72a84f15aee5a7":[2,0,0,373,0],
"navtree____8js__8js_8js.html":[2,0,0,374],
"navtree____8js__8js_8js.html#afec65629753f1f411f088c737f583e73":[2,0,0,374,0],
"navtree________8js____8js__8js_8js.html":[2,0,0,375],
"navtree________8js____8js__8js_8js.html#ad31cf56977c98a9780c55530f5074a25":[2,0,0,375,0],
"navtree________________8js________8js____8js__8js_8js.html":[2,0,0,376],
"navtree________________8js________8js____8js__8js_8js.html#a75a50f9bb042737b0800274cbb702a74":[2,0,0,376,0],
"navtreedata_8js.html":[2,0,0,377],
"navtreedata_8js.html#a51b2088f00a4f2f20d495e65be359cd8":[2,0,0,377,1],
"navtreedata_8js.html#a8b93d8f469f8aeb3a0c17b922a2d32ed":[2,0,0,377,2],
"navtreedata_8js.html#ab31fdb4752a1ada1b708d49d7482f948":[2,0,0,377,3],
"navtreedata_8js.html#afc3e53a71ba26a8215797019b9b1451b":[2,0,0,377,0],
"navtreedata__8js_8js.html":[2,0,0,378],
"navtreedata__8js_8js.html#a7c4917d3cc1dd3578a8cc3760c7bfc68":[2,0,0,378,0],
"navtreedata____8js__8js_8js.html":[2,0,0,379],
"navtreedata____8js__8js_8js.html#a998d76341d7a2659e58b018ab17ed228":[2,0,0,379,0],
"navtreedata________8js____8js__8js_8js.html":[2,0,0,380],
"navtreedata________8js____8js__8js_8js.html#af615fb54db3f1593eb5fa32ce1fa90ee":[2,0,0,380,0],
"navtreedata________________8js________8js____8js__8js_8js.html":[2,0,0,381],
"navtreedata________________8js________8js____8js__8js_8js.html#ab5910ce39022e4795f964d586e3ed716":[2,0,0,381,0],
"navtreeindex0_8js.html":[2,0,0,382],
"navtreeindex0_8js.html#a27601402e464d8aaacc40c422ad0426a":[2,0,0,382,0],
"navtreeindex0__8js_8js.html":[2,0,0,383],
"navtreeindex0__8js_8js.html#a98335bb5419c36b2757c391bf71cffc7":[2,0,0,383,0],
"navtreeindex0____8js__8js_8js.html":[2,0,0,384],
"navtreeindex0____8js__8js_8js.html#ab4072ce464bd421564fe69f0e62030ea":[2,0,0,384,0],
"navtreeindex0________8js____8js__8js_8js.html":[2,0,0,385],
"navtreeindex0________8js____8js__8js_8js.html#a0d807bcd012c9301c38aa542f4bac95f":[2,0,0,385,0],
"navtreeindex0________________8js________8js____8js__8js_8js.html":[2,0,0,386],
"navtreeindex0________________8js________8js____8js__8js_8js.html#a711c09fe373d4cad75a9b1191a6608d1":[2,0,0,386,0],
"navtreeindex1_8js.html":[2,0,0,387],
"navtreeindex1_8js.html#aff3c690646dcaf60c47d51c9ad397846":[2,0,0,387,0],
"navtreeindex1__8js_8js.html":[2,0,0,388],
"navtreeindex1__8js_8js.html#a2b964e0be4e3b38198402f1372045abf":[2,0,0,388,0],
"navtreeindex1____8js__8js_8js.html":[2,0,0,389],
"navtreeindex1____8js__8js_8js.html#a6a9f57ec15d1050c84612043d03ed26f":[2,0,0,389,0],
"navtreeindex1________8js____8js__8js_8js.html":[2,0,0,390],
"navtreeindex1________8js____8js__8js_8js.html#a5030da69ff01e042897b0f11be629f43":[2,0,0,390,0],
"navtreeindex1________________8js________8js____8js__8js_8js.html":[2,0,0,391],
"navtreeindex1________________8js________8js____8js__8js_8js.html#a06397db09addcaa2ccd716497b85a848":[2,0,0,391,0],
"navtreeindex2_8js.html":[2,0,0,392],
"navtreeindex2_8js.html#aff8214ff5891284107ca54c0c8ab06a6":[2,0,0,392,0],
"navtreeindex2__8js_8js.html":[2,0,0,393],
"navtreeindex2__8js_8js.html#ad48c658a6b879ad1fce8580d2e4c47a3":[2,0,0,393,0],
"navtreeindex2____8js__8js_8js.html":[2,0,0,394],
"navtreeindex2____8js__8js_8js.html#a8faf7fdd50ae861ef7ae26079bdc0972":[2,0,0,394,0],
"navtreeindex2________8js____8js__8js_8js.html":[2,0,0,395],
"navtreeindex2________8js____8js__8js_8js.html#a00e182a1e2b9b4ef0786f40ec0b583d2":[2,0,0,395,0],
"navtreeindex3_8js.html":[2,0,0,396],
"navtreeindex3_8js.html#acdf17f23db3eb8cfb7282f879323d642":[2,0,0,396,0],
"navtreeindex3__8js_8js.html":[2,0,0,397],
"navtreeindex3__8js_8js.html#a5d5292cbd271b02e752993b267c6e1be":[2,0,0,397,0],
"navtreeindex3____8js__8js_8js.html":[2,0,0,398],
"navtreeindex3____8js__8js_8js.html#a5efe11aa4694798cbf0398391b865fee":[2,0,0,398,0],
"navtreeindex3________8js____8js__8js_8js.html":[2,0,0,399],
"navtreeindex3________8js____8js__8js_8js.html#a6a11762a6dbdfa92a58fc2197e061502":[2,0,0,399,0],
"navtreeindex4_8js.html":[2,0,0,400],
"navtreeindex4_8js.html#ad98c462c0596ed546c33643759a8f4d8":[2,0,0,400,0],
"navtreeindex4__8js_8js.html":[2,0,0,401],
"navtreeindex4__8js_8js.html#adbd140d07d57dcb2100e3d56009baf47":[2,0,0,401,0],
"navtreeindex4____8js__8js_8js.html":[2,0,0,402],
"navtreeindex4____8js__8js_8js.html#a1dc6cf88499fbf30496d14f4d8189244":[2,0,0,402,0],
"navtreeindex5_8js.html":[2,0,0,403],
"navtreeindex5_8js.html#a4482743dfcf06a95779fe96e36b1314e":[2,0,0,403,0],
"navtreeindex5__8js_8js.html":[2,0,0,404],
"navtreeindex5__8js_8js.html#a120e57101f84a3667680af5d83710abc":[2,0,0,404,0],
"navtreeindex5____8js__8js_8js.html":[2,0,0,405],
"navtreeindex5____8js__8js_8js.html#aae7f3ee82836b3209fb059842fc35c6a":[2,0,0,405,0],
"navtreeindex6_8js.html":[2,0,0,406],
"navtreeindex6_8js.html#a0c94560d638463491092c7f3a268005f":[2,0,0,406,0],
"navtreeindex6__8js_8js.html":[2,0,0,407],
"navtreeindex6__8js_8js.html#a0ee6c9637f8108e82b8a35c0cf9fc101":[2,0,0,407,0],
"navtreeindex7_8js.html":[2,0,0,408],
"navtreeindex7_8js.html#a5996dda4d5e3731c35ff6a8911c92905":[2,0,0,408,0],
"navtreeindex8_8js.html":[2,0,0,409],
"navtreeindex8_8js.html#a4ca56488c8a4edae37ae89f489d8107e":[2,0,0,409,0],
"pages.html":[],
"resize_8js.html":[2,0,0,410],
"resize_8js.html#a4bd3414bc1780222b192bcf33b645804":[2,0,0,410,2],
"resize_8js.html#a4d56aa7aa73d0ddf385565075fdfe271":[2,0,0,410,0],
"resize_8js.html#a517273f9259c941fd618dda7a901e6c2":[2,0,0,410,4],
"resize_8js.html#a578d54a5ebd9224fad0213048e7a49a7":[2,0,0,410,1],
"resize_8js.html#a711d37a3374012d4f6060fffe0abea55":[2,0,0,410,9],
"resize_8js.html#a99942f5b5c75445364f2437051090367":[2,0,0,410,3],
"resize_8js.html#a9a7b07fe0df5af5957564912e842c0a4":[2,0,0,410,10],
"resize_8js.html#ab3321080c64c8797ebbcd6e30982c62c":[2,0,0,410,7],
"resize_8js.html#abaa405b2de1fea05ef421122098b4750":[2,0,0,410,6],
"resize_8js.html#ad0822459a7d442b8c5e4db795d0aabb4":[2,0,0,410,5],
"resize_8js.html#af920c2a7d4f4b5a962fe8e11257f871d":[2,0,0,410,8],
"resize__8js_8js.html":[2,0,0,411],
"resize__8js_8js.html#ab664457d17168c147bb6f85621114bd0":[2,0,0,411,0],
"resize____8js__8js_8js.html":[2,0,0,412],
"resize____8js__8js_8js.html#ad1d2b37c5182495d6001516785baebbd":[2,0,0,412,0],
"resize________8js____8js__8js_8js.html":[2,0,0,413],
"resize________8js____8js__8js_8js.html#a29cc1a896cf5d950b9df33499307955b":[2,0,0,413,0],
"resize________________8js________8js____8js__8js_8js.html":[2,0,0,414],
"resize________________8js________8js____8js__8js_8js.html#ac1dc9ad426416305a4d520de207e5d2b":[2,0,0,414,0],
"search_8js.html":[2,0,0,0,74],
"search_8js.html#a196a29bd5a5ee7cd5b485e0753a49e57":[2,0,0,0,74,0],
"search_8js.html#a499422fc054a5278ae32801ec0082c56":[2,0,0,0,74,7],
"search_8js.html#a52066106482f8136aa9e0ec859e8188f":[2,0,0,0,74,5],
"search_8js.html#a6b2c651120de3ed1dcf0d85341d51895":[2,0,0,0,74,1],
"search_8js.html#a76d24aea0009f892f8ccc31d941c0a2b":[2,0,0,0,74,2],
"search_8js.html#a8d7b405228661d7b6216b6925d2b8a69":[2,0,0,0,74,3],
"search_8js.html#a9189b9f7a32b6bc78240f40348f7fe03":[2,0,0,0,74,6],
"search_8js.html#a98192fa2929bb8e4b0a890a4909ab9b2":[2,0,0,0,74,8],
"search_8js.html#ae95ec7d5d450d0a8d6928a594798aaf4":[2,0,0,0,74,4],
"search__8js_8js.html":[2,0,0,415],
"search__8js_8js.html#a768d43704726645088adec5847ceee70":[2,0,0,415,0],
"search____8js__8js_8js.html":[2,0,0,416],
"search____8js__8js_8js.html#a3d5651f56ae791047732aa8590c1f12f":[2,0,0,416,0],
"search________8js____8js__8js_8js.html":[2,0,0,417],
"search________8js____8js__8js_8js.html#a57f0b36eeb900da02499c9079268936c":[2,0,0,417,0],
"search________________8js________8js____8js__8js_8js.html":[2,0,0,418],
"search________________8js________8js____8js__8js_8js.html#a101f93be2429053c7cdabbd811f31a81":[2,0,0,418,0],
"searchdata_8js.html":[2,0,0,0,75],
"searchdata_8js.html#a529972e449c82dc118cbbd3bcf50c44d":[2,0,0,0,75,0],
"searchdata_8js.html#a6250af3c9b54dee6efc5f55f40c78126":[2,0,0,0,75,2],
"searchdata_8js.html#a77149ceed055c6c6ce40973b5bdc19ad":[2,0,0,0,75,1],
"searchdata__8js_8js.html":[2,0,0,419],
"searchdata__8js_8js.html#a005e6796b7034e7cee7b668a83561477":[2,0,0,419,0],
"searchdata____8js__8js_8js.html":[2,0,0,420],
"searchdata____8js__8js_8js.html#a7f6e9d8a102e00f735e2769863380b6a":[2,0,0,420,0],
"searchdata________8js____8js__8js_8js.html":[2,0,0,421],
"searchdata________8js____8js__8js_8js.html#a0d21aaa45326060433a2490f98d76c16":[2,0,0,421,0],
"searchdata________________8js________8js____8js__8js_8js.html":[2,0,0,422],
"searchdata________________8js________8js____8js__8js_8js.html#a89024f7782a507e2cdca62a3e262c996":[2,0,0,422,0],
"struct________________________________class________________________________file________________8js________8js____8js__8js_8js.html":[2,0,0,423],
"struct________________________________class________________________________file________________8js________8js____8js__8js_8js.html#a02cb7aebb4cfcb68e8a2737806d26710":[2,0,0,423,0],
"struct________________________________classes________________8js________8js____8js__8js_8js.html":[2,0,0,424],
"struct________________________________classes________________8js________8js____8js__8js_8js.html#a48d793dc82b6dc7f5b3fa99636d4e87a":[2,0,0,424,0],
"struct________________________________exception________________________________table____________e99532420be1c777822d1d4e41c0d327.html":[2,0,0,425],
"struct________________________________exception________________________________table____________e99532420be1c777822d1d4e41c0d327.html#ab8864374b6264749102ad1d34420be1f":[2,0,0,425,0],
"struct________________________________line______________________________________________________4353789a3fa954f4677376a6057b79dc.html":[2,0,0,426],
"struct________________________________line______________________________________________________4353789a3fa954f4677376a6057b79dc.html#a7a4191a123a52e5c49a69fc75da2ed13":[2,0,0,426,0],
"struct________________________________local_____________________________________________________295d1ae252c0aee41850495ca9bb8101.html":[2,0,0,427],
"struct________________________________local_____________________________________________________295d1ae252c0aee41850495ca9bb8101.html#a73c95fd009caded304f3bf586b69edc6":[2,0,0,427,0],
"struct________________class________________file________8js____8js__8js_8js.html":[2,0,0,428],
"struct________________class________________file________8js____8js__8js_8js.html#af739cad83d11e9be13d18580b07d5290":[2,0,0,428,0],
"struct________________classes________8js____8js__8js_8js.html":[2,0,0,429],
"struct________________classes________8js____8js__8js_8js.html#a0dae13d8ff68ea12ea746cc038acfe76":[2,0,0,429,0],
"struct________________exception________________table________8js____8js__8js_8js.html":[2,0,0,430],
"struct________________exception________________table________8js____8js__8js_8js.html#a36f4f23742119a606317bf55ff7686e9":[2,0,0,430,0],
"struct________________line________________________________number________________________________e03013ad84030bbcd337812cb8789d38.html":[2,0,0,431],
"struct________________line________________________________number________________________________e03013ad84030bbcd337812cb8789d38.html#ac3052b8841d7c6685f7ddb9c478696f1":[2,0,0,431,0],
"struct________________local________________________________variable_____________________________7445e5fb55ab655c544fb32f1a90e256.html":[2,0,0,432],
"struct________________local________________________________variable_____________________________7445e5fb55ab655c544fb32f1a90e256.html#a1324910b698df5e69918acfd7d79f279":[2,0,0,432,0],
"struct________class________file____8js__8js_8js.html":[2,0,0,433],
"struct________class________file____8js__8js_8js.html#ae62b91f9745689d51e2a61d6bba7f9fc":[2,0,0,433,0],
"struct________classes____8js__8js_8js.html":[2,0,0,434],
"struct________classes____8js__8js_8js.html#a92679d798dfbd03e0cc04cec7b7f8e33":[2,0,0,434,0],
"struct________exception________table____8js__8js_8js.html":[2,0,0,435],
"struct________exception________table____8js__8js_8js.html#a5c36d024de2a01148aee8626adb40ddb":[2,0,0,435,0],
"struct________line________________number________________table____8js__8js_8js.html":[2,0,0,436],
"struct________line________________number________________table____8js__8js_8js.html#a0972131f05347ca1c549bc4337c3dc3d":[2,0,0,436,0],
"struct________local________________variable________________table____8js__8js_8js.html":[2,0,0,437],
"struct________local________________variable________________table____8js__8js_8js.html#aedee4d6a01d432628817df0f1b0670ab":[2,0,0,437,0],
"struct____class____file__8js_8js.html":[2,0,0,438],
"struct____class____file__8js_8js.html#a2a03cb8b7535d4b2b0107df18bd84fd6":[2,0,0,438,0],
"struct____classes__8js_8js.html":[2,0,0,439],
"struct____classes__8js_8js.html#a7b5ccbac02b7815358309494168bb27a":[2,0,0,439,0],
"struct____exception____table__8js_8js.html":[2,0,0,440],
"struct____exception____table__8js_8js.html#ab75f35dd62eb2a807308e180b74d13cc":[2,0,0,440,0],
"struct____line________number________table__8js_8js.html":[2,0,0,441],
"struct____line________number________table__8js_8js.html#a6c819cdf265d9861307f3ef398525bef":[2,0,0,441,0],
"struct____local________variable________table__8js_8js.html":[2,0,0,442],
"struct____local________variable________table__8js_8js.html#ae40dd95489193856a66d6a3fb5305973":[2,0,0,442,0],
"struct__class__file_8js.html":[2,0,0,443],
"struct__class__file_8js.html#a7d617024002471a355be3931f079b054":[2,0,0,443,0],
"struct__classes_8js.html":[2,0,0,444],
"struct__classes_8js.html#a08a14919eb2ef7815683711c988cf227":[2,0,0,444,0],
"struct__exception__table_8js.html":[2,0,0,445],
"struct__exception__table_8js.html#a0b0220bb88157c88a7136cd5e5bc2a77":[2,0,0,445,0],
"struct__line____number____table_8js.html":[2,0,0,446],
"struct__line____number____table_8js.html#a797f311a791b8df9974a888d177f3c84":[2,0,0,446,0],
"struct__local____variable____table_8js.html":[2,0,0,447],
"struct__local____variable____table_8js.html#a6e4922319287f9509d9d7c5570a2550b":[2,0,0,447,0],
"struct_class_file.html":[1,0,3],
"struct_class_file.html#a0d64ff67928a39e52a75c972b5f5697a":[1,0,3,6],
"struct_class_file.html#a31608612612ea019eef47ae5d656dc23":[1,0,3,10],
"struct_class_file.html#a4cc32d48303aeaaaaea05bf77abdec59":[1,0,3,0],
"struct_class_file.html#a5a3ef20c14bd517fca3fa5841846ab4b":[1,0,3,13],
"struct_class_file.html#a5d766202b705d1bdb025a0e7fff8953c":[1,0,3,11],
"struct_class_file.html#a85a7fa4c7fd5d455b77e525d952f440f":[1,0,3,17],
"struct_class_file.html#a8858a4e08f7cc000e0f62459722ecce8":[1,0,3,15],
"struct_class_file.html#a8bebe0bfa4e37dde1e67c6a72af398c0":[1,0,3,9],
"struct_class_file.html#a9c187266c328a40ddc2dde8c8a230a65":[1,0,3,12],
"struct_class_file.html#aa53122439ee827a418258d52c51368c6":[1,0,3,2],
"struct_class_file.html#aae221e548ab4ef529cd1a0f2fcdabb9b":[1,0,3,1],
"struct_class_file.html#abc71e19d88c36d73f0489da678932851":[1,0,3,7],
"struct_class_file.html#abd75da409fbff6e8722403140f557caf":[1,0,3,3],
"struct_class_file.html#ace3229f6e4d460d20e72e493d180ecc5":[1,0,3,5],
"struct_class_file.html#ad0028839ce12090266cbdc5df1046062":[1,0,3,16],
"struct_class_file.html#ae01d16d1ab715a4f5dd1fe8254322594":[1,0,3,8],
"struct_class_file.html#aefa16c15d157d952aa4970c26ea5bfb6":[1,0,3,4],
"struct_class_file.html#af0fc99630af87d96f99637f77f6bb565":[1,0,3,14],
"struct_class_file.html#afd1a9f5d893befc9ea66f915fd6fa039":[1,0,3,18],
"struct_class_handler.html":[1,0,4],
"struct_class_handler.html#a2b2f7cc877adf1320a6bfa83a3c7696b":[1,0,4,1],
"struct_class_handler.html#a6ba5accea187064cb2c3d6bc80531112":[1,0,4,0],
"struct_class_handler.html#ae01d16d1ab715a4f5dd1fe8254322594":[1,0,4,2],
"struct_classes.html":[1,0,2],
"struct_classes.html#a3b7a87f79f7ea8908d258f19b237bec2":[1,0,2,3],
"struct_classes.html#a84a9a6c8c14f8900137a8f51b446d6c2":[1,0,2,1],
"struct_classes.html#ac48b6a5142c6e2ddcd51d41ab733eb15":[1,0,2,0],
"struct_classes.html#ac792b66aa74db5d300bf22502fb49ef1":[1,0,2,2],
"struct_exception_table.html":[1,0,7],
"struct_exception_table.html#a0f7b3379ca0a3516e71359436ae5abf1":[1,0,7,0],
"struct_exception_table.html#a3ded0b47a89e0816c20dc577a82a1cd5":[1,0,7,3],
"struct_exception_table.html#a69a19b4db26dd1a8341f02051cb221a7":[1,0,7,2],
"struct_exception_table.html#a9c136439106544c4d1c986316d6d5fa2":[1,0,7,1],
"struct_field___value.html":[1,0,11],
"struct_field___value.html#a2f14c1ab2c4449bdb44c2a134ad70787":[1,0,11,5],
"struct_field___value.html#a6c508ada2246906af8ee350cd735cfbc":[1,0,11,4],
"struct_field___value.html#a8f41bf429ff91607c22ff70c83f1976b":[1,0,11,1],
"struct_field___value.html#aceb641bac42a71fef1aea1b4b9762aee":[1,0,11,2],
"struct_field___value.html#ae045a274d63e2f187a334180c6e48c88":[1,0,11,0],
"struct_field___value.html#ae5bd243be07f3ea9c9b2f368800af53f":[1,0,11,3],
"struct_frame.html":[1,0,12],
"struct_frame.html#a0a41925d52be49e4a6a5d3c391f2dacb":[1,0,12,1],
"struct_frame.html#a2dbf3b2ea9d00291bf57cf7715dcd3ad":[1,0,12,5],
"struct_frame.html#a4bb6495de860db94dcc3cd017a60b249":[1,0,12,4],
"struct_frame.html#a5c3e4a8764166d9b3c090f2af9f0a05a":[1,0,12,2],
"struct_frame.html#ace3229f6e4d460d20e72e493d180ecc5":[1,0,12,0],
"struct_frame.html#af0fc99630af87d96f99637f77f6bb565":[1,0,12,3],
"struct_line__number__table.html":[1,0,15],
"struct_line__number__table.html#a04c031f26dbcf868c823d68ad0771dbc":[1,0,15,0],
"struct_line__number__table.html#a3ded0b47a89e0816c20dc577a82a1cd5":[1,0,15,1],
"struct_local__variable__table.html":[1,0,16],
"struct_local__variable__table.html#a125cab34bc0dc872fa4a0aedbe688365":[1,0,16,1],
"struct_local__variable__table.html#a3ded0b47a89e0816c20dc577a82a1cd5":[1,0,16,4],
"struct_local__variable__table.html#a3f13794b6c8b4ffc87b87a7c01a69060":[1,0,16,0],
"struct_local__variable__table.html#ad01efb9db3818b64eae5965bf341710f":[1,0,16,2]
};
|
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
exports.__esModule = true;
// import User from './models/user';
var tungus = require('tungus');
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
function setTingo() {
return __awaiter(this, void 0, void 0, function () {
var mongodbURI;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
console.log('Running mongoose version %s', mongoose.version);
if (process.env.NODE_ENV === 'test') {
mongodbURI = 'tingodb://' + __dirname + '/dev';
}
else {
mongodbURI = 'tingodb://' + __dirname + '/prod';
}
console.log(mongodbURI);
mongoose.Promise = global.Promise;
mongoose.set('useCreateIndex', true);
mongoose.set('useNewUrlParser', true);
mongoose.set('useFindAndModify', false);
mongoose.set('useUnifiedTopology', true);
console.log('MondoDBPath %s', mongodbURI);
// Connect to TingoDB using Mongoose
return [4 /*yield*/, mongoose.connect(mongodbURI, function (err) {
// if we failed to connect, abort
if (err) {
throw err;
}
// SeedUser();
})];
case 1:
// Connect to TingoDB using Mongoose
_a.sent();
console.log('Connected to Tingo DB');
return [2 /*return*/];
}
});
});
}
//////////////////////////////////////////////////////////////////////////////
/* Data generation
*/
/*
function SeedUser()
{
User.create({
firstname: 'GTAF',
lastname: 'GTAF',
email: 'riteshbawaskar@gmail.com',
password: 'password',
userid: 'admin'
});
}*/
/* var Schema = mongoose.Schema;
console.log('Running mongoose version %s', mongoose.version);
/**
* Console schema
*/
/*
var consoleSchema = Schema({
name: String
, manufacturer: String
, released: Date
})
var Console = mongoose.model('Console', consoleSchema);
/**
* Game schema
*/
/*
var gameSchema = Schema({
name: String
, developer: String
, released: Date
, consoles: [{ type: Schema.Types.ObjectId, ref: 'Console' }]
})
var Game = mongoose.model('Game', gameSchema);
function createData () {
Console.create({
name: 'Nintendo 64'
, manufacturer: 'Nintendo'
, released: 'September 29, 1996'
}, function (err, nintendo64) {
if (err) { return done(err); }
Game.create({
name: 'Legend of Zelda: Ocarina of Time'
, developer: 'Nintendo'
, released: new Date('November 21, 1998')
, consoles: [nintendo64]
}, function (err) {
if (err) { return done(err); }
example();
});
});
}
/**
* Population
*/
/*
function example () {
Game
.findOne({ name: /^Legend of Zelda/ })
.populate('consoles')
.exec(function (err, ocinara) {
if (err) { return done(err); }
console.log(ocinara);
console.log(
'"%s" was released for the %s on %s'
, ocinara.name
, ocinara.consoles[0].name
, ocinara.released.toLocaleDateString());
});
}
function done (err) {
if (err) { console.error(err); }
Console.remove(function() {
Game.remove(function() {
mongoose.disconnect();
});
});
}
*/
////////////////////////////////////////////////////////////////////////////////
exports["default"] = setTingo;
|
import React from "react";
export const ThumbnailLabelContainer = ({ showButton, labelName, setOpenModal }) => {
return (
<div className="label-button-container computer-label-button-container">
{
!showButton ?
<div className='thumbnail-label circle-when-mobile'>
<p>{labelName}</p>
</div>
:
<button
className="learn-more-button pillbox-button"
onClick={() => setOpenModal(true)}>
Learn more
</button>
}
</div>
)
}
|
// import graphQL to write our typeDefs
const { gql } = require('apollo-server-express');
const typeDefs = gql `
type User {
_id: ID
username: String
email: String
post: [Post]
}
type Post {
_id: ID
postTitle: String
postText: String
createdAt: String
username: String
reactionCount: Int
reactions: [Reaction]
}
type Reaction {
_id: ID
reactionBody: String
createdAt: String
username: String
}
type AeroPress {
id: ID
name: String
cupSize: Int
grindSize: String
coffeeAmount: Int
water: Int
instructions: String
}
type BeeHouse {
_id: ID
name: String
cupSize: Int
grindSize: String
coffeeAmount: Int
water: Int
instructions: String
}
type Chemex {
_id: ID
name: String
cupSize: Int
grindSize: String
coffeeAmount: Int
water: Int
instructions: String
}
type FrenchPress {
_id: ID
name: String
cupSize: Int
grindSize: String
coffeeAmount: Int
water: Int
instructions: String
}
type MokaPot {
_id: ID
name: String
cupSize: Int
grindSize: String
coffeeAmount: Int
water: Int
instructions: String
}
type Siphon {
_id: ID
name: String
cupSize: Int
grindSize: String
coffeeAmount: Int
water: Int
instructions: String
}
type V60 {
_id: ID
name: String
cupSize: Int
grindSize: String
coffeeAmount: Int
water: Int
instructions: String
}
type Wave {
_id: ID
name: String
cupSize: Int
grindSize: String
coffeeAmount: Int
water: Int
instructions: String
}
type Query {
aeropress(id: Int): [AeroPress]
beehouse(id: Int): [BeeHouse]
chemex(id: Int): [Chemex]
frenchpress(id: Int): [FrenchPress]
mokapot(id: Int): [MokaPot]
siphon(id: Int): [Siphon]
v60(id: Int): [V60]
wave(id: Int): [Wave]
me: User
users: [User]
user(username: String!): User
posts(username: String): [Post]
post(_id: ID!): Post
allposts: [Post]
}
type Mutation {
login(email: String!, password: String!) : Auth
addUser(username: String!, email: String!, password: String!) : Auth
addPost(postText: String!, postTitle: String!, username: String!): Post
addReaction(postId: ID!, reactionBody: String!): Post
}
type Auth {
token: ID!
user: User
}
`;
module.exports = typeDefs;
|
const inputs = {
email : document.querySelector('input[name=email]'),
password : document.querySelector('input[name=password]'),
};
const erase = element => {
element.parentNode.children[0].value = "";
element.parentNode.children[1].style.display = "none";
element.parentNode.children[0].focus();
element.parentNode.children[2].innerHTML = "";
};
const showErase = element => {
element.parentNode.children[2].innerHTML = "";
if(element.value.length > 0)
return element.parentNode.children[1].style.display = "block";
return element.parentNode.children[1].style.display = "none";
};
const focus = element => {
element.parentNode.style.border = "1px solid #74C69D";
};
const inputCheck = element => {
const $err = element.parentNode.children[2];
$err.innerHTML = '';
if(element == inputs.email){
const reg = /^[-A-Za-z0-9_]+[-A-Za-z0-9_.]*[@]{1}[-A-Za-z0-9_]+[-A-Za-z0-9_.]*[.]{1}[A-Za-z]{1,5}$/;
if(!reg.test(element.value)) return $err.innerHTML = '이메일을 잘못 입력했습니다.'
};
if(element == inputs.password){
const reg = /(?=.*[a-zA-Z]+)(?=.*[0-9]+)(?=.*[`~!@@#$%^&*|₩₩₩'₩";:₩/?]+).{8,20}/;
if(!reg.test(element.value))
return $err.innerHTML = "비밀번호는 대문자, 특수문자를 포함하여 8자 이상 입력해야 합니다."
};
element.parentNode.style.border = "1px solid #ddd";
return $err.innerHTML = "";
};
window.onload = () => {
inputs.email.addEventListener('input', () => showErase(inputs.email))
inputs.password.addEventListener('input', () => showErase(inputs.password))
inputs.email.addEventListener('focusout', () => inputCheck(inputs.email))
inputs.password.addEventListener('focusout', () => inputCheck(inputs.password))
inputs.email.addEventListener('focus', () => focus(inputs.email))
inputs.password.addEventListener('focus', () => focus(inputs.password))
};
|
/*
* @lc app=leetcode.cn id=290 lang=javascript
*
* [290] 单词规律
*
* https://leetcode-cn.com/problems/word-pattern/description/
*
* algorithms
* Easy (43.76%)
* Likes: 284
* Dislikes: 0
* Total Accepted: 62.4K
* Total Submissions: 136.3K
* Testcase Example: '"abba"\n"dog cat cat dog"'
*
* 给定一种规律 pattern 和一个字符串 str ,判断 str 是否遵循相同的规律。
*
* 这里的 遵循 指完全匹配,例如, pattern 里的每个字母和字符串 str 中的每个非空单词之间存在着双向连接的对应规律。
*
* 示例1:
*
* 输入: pattern = "abba", str = "dog cat cat dog"
* 输出: true
*
* 示例 2:
*
* 输入:pattern = "abba", str = "dog cat cat fish"
* 输出: false
*
* 示例 3:
*
* 输入: pattern = "aaaa", str = "dog cat cat dog"
* 输出: false
*
* 示例 4:
*
* 输入: pattern = "abba", str = "dog dog dog dog"
* 输出: false
*
* 说明:
* 你可以假设 pattern 只包含小写字母, str 包含了由单个空格分隔的小写字母。
*
*/
// @lc code=start
/**
* @param {string} pattern
* @param {string} s
* @return {boolean}
*/
var wordPattern = function(pattern, s) {
s = s.split(" ");
if (s.length !== pattern.length) return false
let storeStr = [];
let patternMap = new Map();
let i = 0;
while (i < pattern.length) {
let strItem = s[i];
const patternItem = pattern[i];
// 如果map中存在这个值
if (patternMap.has(patternItem)) {
const temp = patternMap.get(patternItem);
if (temp !== strItem) {
return false
}
} else {
if (storeStr.indexOf(strItem) >= 0) {
return false;
}
patternMap.set(patternItem, strItem);
storeStr.push(strItem);
}
i++;
}
return true;
};
// @lc code=end
|
import { RedButton } from './Button.style';
const Button = ({ text, ...props }) => {
return <RedButton {...props}>{text}</RedButton>;
};
export default Button;
|
const editorBtns = document.getElementsByClassName('editor-btn');
const editorContent = document.getElementById('content');
const setAttribute = (element) => {
document.execCommand(element.dataset.attribute, false);
}
for(let i = 0; i < editorBtns.length; i++) {
editorBtns[i].addEventListener('click', function() {
setAttribute(this);
});
}
|
import Parameter from "../parameter";
import * as NumberUtils from "../../utils/numberUtils";
let typeString = "Integer";
let description = "FloatValue must be an integer >= 0.";
function isValid(value) {
if (typeof value === "number" && NumberUtils.isInteger(value) && value >= 0) return true;
else return false;
}
Parameter.registerParamType(typeString, isValid, description);
|
//Assuntos abordados na aula passada
console.log('JSON'); // parse, stringify
console.log('Métodos de String'); //Slice, Trim, Replace, Split
console.log('Condicionais') //If e else, Switch
|
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const googleUserSchema = new Schema({
username: String,
googleID: String,
subs: [{ type: mongoose.Schema.Types.ObjectId, ref: "Subs" }]
});
const GoogleUser = mongoose.model("GoogleUser", googleUserSchema);
module.exports = GoogleUser;
|
// responsible of calling prettier-eslint , prettier or eslint.
// this files contains 2 different implementations of prettier - eslint . the default one using prettier-eslint and a home-made one - because of https://github.com/prettier/prettier-eslint/issues/149
const shell = require('shelljs');
function customRequire(required) {
if (shell.test('-e', `${__dirname}/../../node_modules/${required}`)) {
return require(`${__dirname}/../../node_modules/${required}`);
} else if (shell.test('-e', `${__dirname}/../../../../node_modules/${required}`)) {
return require(`${__dirname}/../../../../node_modules/${required}`);
}
return require(`${__dirname}/../../node_modules/${required}`); // will fail but we want to to debug
}
const prettier = customRequire('prettier');
const { CLIEngine } = customRequire('eslint');
function getEslintE5Rules() {
return {
'arrow-body-style': 'off',
'arrow-parens': 'off',
'arrow-spacing': 'off',
'constructor-super': 'off',
'generator-star-spacing': 'off',
'no-class-assign': 'off',
'no-confusing-arrow': 'off',
'no-const-assign': 'off',
'no-dupe-class-members': 'off',
'no-duplicate-imports': 'off',
'no-new-symbol': 'off',
'no-restricted-imports': 'off',
'no-this-before-super': 'off',
'no-useless-computed-key': 'off',
'no-useless-constructor': 'off',
'no-useless-rename': 'off',
'no-var': 'off',
'object-shorthand': 'off',
'prefer-arrow-callback': 'off',
'prefer-const': 'off',
'prefer-destructuring': 'off',
'prefer-numeric-literals': 'off',
'prefer-rest-params': 'off',
'prefer-spread': 'off',
'prefer-template': 'off',
'require-yield': 'off',
'rest-spread-spacing': 'off',
'sort-imports': 'off',
'symbol-description': 'off',
'template-curly-spacing': 'off',
'yield-star-spacing': 'off',
};
}
// home made implementation:
function getEslintConfigFromPath(eslintConfigPath, eslintOptions = {}) {
const eslintCli = new CLIEngine(eslintOptions);
const config = eslintCli.getConfigForFile(eslintConfigPath);
return config;
}
function getPrettierConfigFromEslint(eslintConfigPath) {
const config = getEslintConfigFromPath(eslintConfigPath);
const { getOptionsForFormatting } = customRequire('prettier-eslint/dist/utils.js');
const prettierConfig = getOptionsForFormatting(config, undefined, undefined, 'eslint');
return prettierConfig.prettier;
}
/**
* format given options.text using give eslint config in options.filePath
* @param {filePath: string, logLevel: boolean, es5: boolean, text: string} options
* @returns {string|{error:{}} the output string or throw an exception like SyntaxError in case a fatal error occurs
*/
function homeMadePrettierEslint(options) {
// prettier first
const prettierConfig = getPrettierConfigFromEslint(options.filePath);
if (options.logLevel) {
console.log('Prettier options: ', JSON.stringify(prettierConfig));
}
const code = prettier.format(options.text, prettierConfig);
// eslint last (using CLIEngine API executeOnText() and passing the config as object
const eslintConfig = getEslintConfigFromPath(options.filePath);
if (options.es5) {
eslintConfig.rules = eslintConfig.rules || {};
Object.assign(eslintConfig.rules, getEslintE5Rules());
}
const cli = new CLIEngine({
baseConfig: eslintConfig,
fix: true,
useEslintrc: false,
});
const report = cli.executeOnText(code);
const result = report.results[0];
if (options.logLevel) {
console.log('\n\nEslint config: \n', JSON.stringify(eslintConfig));
console.log('\n\n\nEslint verifyAndFix() final report; \n', JSON.stringify(report, 0, 2));
}
return result.output || options.text;
}
module.exports.prettierEslint = options => homeMadePrettierEslint(options);
module.exports.prettierEslint = options => homeMadePrettierEslint(options);
|
/**
* Created by Osvaldo on 20/10/15.
*/
var Manager = require('./manager.js');
var utility = require('util');
var Model = require('../model/situacao.js');
var hub = require('../../hub/hub.js');
var Mensagem = require('../../util/mensagem.js');
utility.inherits(SituacaoManager, Manager);
/**
* @constructor
*/
function SituacaoManager(){
var me = this;
Manager.call(me);
me.model = Model;
me.listeners = {};
me.wiring();
}
/**
* Inicia o tratamento dos namespace dos eventos, method recebe o nome da função
* que vai ser executada por meio da herança.
*/
SituacaoManager.prototype.executaCrud = function(msg){
var me = this;
var method = msg.getEvento().substr(msg.getEvento().lastIndexOf('.')+1);
console.log(method);
try {
me[method](msg);
}catch (e){
hub.emit('error.manager.situacao', e);
}
};
SituacaoManager.prototype.setdispsguardado = function (msg) {
var me = this;
var mapa = msg.getRes();
this.model.findOne({nome: 'Guardado'}, function (err, res) {
if(res){
var maparet = mapa;
for(var disp in maparet.disps){
maparet.disps[disp].situacao = res;
}
msg.setRes(maparet);
hub.emit('retguardado', msg);
} else {
console.log('algo errado não está certo', err, res);
}
})
};
/**
* Faz a ligacao dos evendos que essa classe vai escutar, e liga as funcoes que serao executadas
*/
SituacaoManager.prototype.wiring = function(){
var me = this;
me.listeners['banco.situacao.*'] = me.executaCrud.bind(me);
me.listeners['getsituacaogaurdado'] = me.setdispsguardado.bind(me);
for(var name in me.listeners){
hub.on(name, me.listeners[name]);
}
};
module.exports = new SituacaoManager();
|
const PINYINS = [
'ā',
'á',
'ǎ',
'à',
'ō',
'ó',
'ǒ',
'ò',
'ē',
'é',
'ě',
'è',
'ī',
'í',
'ǐ',
'ì',
'ū',
'ú',
'ǔ',
'ù',
'ǖ',
'ǘ',
'ǚ',
'ǜ',
'ü',
];
export default function buildPinyin(quill) {
const select = document.createElement('div');
select.setAttribute('title', '插入拼音');
select.classList.add('pinyin-select');
select.innerHTML = `<div class="pinyin-select">
<div class="pinyin-label">
<span class="pinyin-placeholder">插入拼音</span>
<span class="pinyin-arrow"></span>
</div>
<div class="pinyin-options options-hide"></div>
</div>`;
const optionsDiv = select.querySelector('.pinyin-options');
const label = select.querySelector('.pinyin-label');
const placeholder = select.querySelector('.pinyin-placeholder');
// eslint-disable-next-line no-restricted-syntax
for (const option of PINYINS) {
const span = document.createElement('span');
span.classList.add('pinyin-item');
span.innerText = option;
optionsDiv.appendChild(span);
}
select.appendChild(optionsDiv);
label.addEventListener('click', () => {
optionsDiv.classList.toggle('options-hide');
});
optionsDiv.addEventListener('click', ({ target }) => {
if (target.classList.contains('pinyin-item')) {
quill.focus();
const { index } = quill.selection.savedRange;
quill.insertText(index, target.innerText);
quill.update();
optionsDiv.classList.add('options-hide');
placeholder.innerText = target.innerText;
}
});
document.addEventListener('click', ({ target }) => {
if (!select.contains(target)) {
optionsDiv.classList.add('options-hide');
}
});
return select;
}
|
import React, { useState, useCallback } from 'react';
import { makeStyles } from '@material-ui/core';
import { useSelector } from 'react-redux';
import { selectCards } from '../../reducers/cardSlice';
import { ActiveBtn } from '../../ui';
import PageWrapper from '../../components/wrappers/PageWrapper';
import PageTitle from '../../components/PageTitle';
import CardModal from '../../components/modals/CardModal';
import Card from '../../components/Card';
const useStyles = makeStyles(() => ({
content: {
},
cardsContainer: {
padding: '2em 0'
},
buttonContainer: {
display: 'flex',
justifyContent: 'center'
}
}));
const Cards = () => {
const classes = useStyles();
const cards = useSelector(selectCards);
const [isModalOpen, setIsModalOpen] = useState(false);
const [isEdit, setIsEdit] = useState(false);
const [activeCard, setActiveCard] = useState(null);
const handleClose = useCallback(() => {
setIsModalOpen(false);
setIsEdit(false);
setActiveCard(null);
}, []);
const handleOpen = useCallback((edit, card) => {
if (edit) {
setActiveCard(card)
setIsEdit(true)
}
setIsModalOpen(true)
}, [])
return (
<PageWrapper>
<CardModal isEdit={isEdit} isOpen={isModalOpen} onModalClose={handleClose} card={activeCard} />
<div className={classes.content}>
<PageTitle title='Your cards' subTitle='Add, edit or delete your cards any time' />
<div className={classes.cardsContainer}>
{cards?.map(card => (
<Card card={card} key={card.cardNumber} onEdit={(card) => handleOpen(true, card)} />
))}
</div>
</div>
<div className={classes.buttonContainer}>
<ActiveBtn className={classes.button} onClick={() => handleOpen(false)}>
Add new card
</ActiveBtn>
</div>
</PageWrapper>
);
};
export default Cards;
|
$(function() {
var googleAnimation = lottie.loadAnimation({
container: document.getElementById('google-lottie'),
renderer: 'svg',
loop: true,
autoplay: true,
path: '/js/JSON/google.json'
})
var instagramAnimation = lottie.loadAnimation({
container: document.getElementById('instagram-lottie'),
renderer: 'svg',
loop: true,
autoplay: true,
path: '/js/JSON/instagram.json'
})
var snapchatAnimation = lottie.loadAnimation({
container: document.getElementById('snapchat-lottie'),
renderer: 'svg',
loop: true,
autoplay: true,
path: '/js/JSON/snapchat.json'
})
var shoppingAnimation = lottie.loadAnimation({
container: document.getElementById('shopping-lottie'),
renderer: 'svg',
loop: true,
autoplay: true,
path: '/js/JSON/shopping.json'
})
var facebookAnimation = lottie.loadAnimation({
container: document.getElementById('facebook-lottie'),
renderer: 'svg',
loop: true,
autoplay: true,
path: '/js/JSON/facebook.json'
})
var youtubeAnimation = lottie.loadAnimation({
container: document.getElementById('youtube-lottie'),
renderer: 'svg',
loop: true,
autoplay: true,
path: '/js/JSON/youtube.json'
})
var emailAnimation = lottie.loadAnimation({
container: document.getElementById('email-lottie'),
renderer: 'svg',
loop: true,
autoplay: true,
path: '/js/JSON/email.json'
})
var textAnimation = lottie.loadAnimation({
container: document.getElementById('text-lottie'),
renderer: 'svg',
loop: true,
autoplay: true,
path: '/js/JSON/text.json'
})
});
|
import React, { Component } from 'react';
import TopBar from './TopBar/TopBar';
import Challenges from './Challenges/Challenges';
import ChallengeContent from './Challenges/ChallengeContent';
import axios from 'axios';
import {connect} from 'react-redux';
import {updateData} from './Actions'
import {actionShowChallengeContent} from './Actions/actionShowChallengeContent';
import {GetContents} from './Actions/GetContents';
import {SetViewIndex} from './Actions/SetViewIndex'
import { bindActionCreators } from 'redux';
class App extends Component {
componentDidMount() {
axios.get(`https://api.myjson.com/bins/jkcfq`)
.then(res => {
this.props.updateData(res.data[0].hour);
})
}
render() {
return (
<div className="container-fluid">
<div className = 'row'>
<div className = 'col s12 m4 nuhel'>
<TopBar />
<Challenges
hour={this.props.state.hour}
getContents ={this.props.getContents}
/>
<ChallengeContent
showChallengeContent={this.props.state.showChallengeContent }
actionShowChallengeContent ={this.props.actionShowChallengeContent}
contents = {this.props.state.contents}
SetViewIndex = {this.props.SetViewIndex}
showIndex ={this.props.state.showIndex}
SetViewIndex={this.props.SetViewIndex}
/>
</div>
</div>
</div>
);
}
}
function mapStoreToProps(state){
return{
state: state.state
}
}
function matchDispatchToProps(dispatch){
return bindActionCreators(
{updateData:updateData,
actionShowChallengeContent:actionShowChallengeContent,
getContents:GetContents,
SetViewIndex:SetViewIndex},
dispatch
)
}
export default connect(mapStoreToProps,matchDispatchToProps)(App);
|
function ObjAjax() {
var xmlhttp = false;
try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {
try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; }
}
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { xmlhttp = new XMLHttpRequest(); }
return xmlhttp;
}
function BorrarProgramaFormacion(id) {
$.confirm({
title: 'Confirmación!',
content: '¿Esta seguro que desea eliminar este Programa de formación?',
buttons: {
confirm: function() {
$.alert('Se ha eliminado correctamente');
var result = document.getElementById('tview');
const ajax = new XMLHttpRequest();
ajax.open("POST", "main.php", true);
ajax.onreadystatechange = function() {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
result.innerHTML = ajax.responseText;
$(document).ready(function() {
$('#tablaprogramaformacion').DataTable({
dom: 'Bfrtip',
buttons: ['copy', 'excel', 'pdf', 'csv'],
"language": {
"url": "../assets/datatables/Spanish.json"
}
});
});
} else {
console.log("Ups, Me equivoque;");
}
}
};
ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
ajax.send("ctrl=programaformacion&acti=eliminar&id=" + id);
},
cancel: function() {
$.alert('Has cancelado la eliminación');
}
}
});
}
function InsertProgramaFormacion() {
var result = document.getElementById('tview');
var version = document.formulario.version.value;
var duracion = document.formulario.duracion.value;
var abreviacion = document.formulario.abreviacion.value;
var nombre = document.formulario.nombre.value;
var estado = document.getElementById('estado').value;
var tipPrograma = document.getElementById('tipPrograma').value;
const ajax = new XMLHttpRequest();
ajax.open("POST", "main.php", true);
ajax.onreadystatechange = function() {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
result.innerHTML = ajax.responseText;
$(document).ready(function() {
$('#tablaprogramaformacion').DataTable({
dom: 'Bfrtip',
buttons: ['copy', 'excel', 'pdf', 'csv'],
"language": {
"url": "../assets/datatables/Spanish.json"
}
});
});
} else {
console.log("Ups, Me equivoque;");
}
}
};
ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
ajax.send("ctrl=programaformacion&acti=insertar&version=" + version + "&duracion=" + duracion + "&abreviacion=" + abreviacion + "&nombre=" + nombre + "&estado=" + estado + "&tipoprograma=" + tipPrograma);
}
function EditarProgramaFormacion(id, version, duracion, abreviacion, nombre, estado, tipPrograma) {
document.formulario.id.value = id;
document.formulario.version.value = version;
document.formulario.duracion.value = duracion;
document.formulario.abreviacion.value = abreviacion;
document.formulario.nombre.value = nombre;
document.getElementById('estado').value = estado;
document.getElementById('tipPrograma').value = tipPrograma;
$("#tipPrograma").val(tipPrograma);
document.getElementById("btnguardar").innerHTML = "Actualizar";
document.getElementById("titleproforma").innerHTML = "Actualizar Programa de formación";
}
function UpdateProgramaFormacion() {
var result = document.getElementById('tview');
var id = document.formulario.id.value;
var version = document.formulario.version.value;
var duracion = document.formulario.duracion.value;
var abreviacion = document.formulario.abreviacion.value;
var nombre = document.formulario.nombre.value;
var estado = document.getElementById('estado').value;
var tipPrograma = document.getElementById('tipPrograma').value;
const ajax = new XMLHttpRequest();
ajax.open("POST", "main.php", true);
ajax.onreadystatechange = function() {
if (ajax.readyState == 4) {
if (ajax.status == 200) {
result.innerHTML = ajax.responseText;
$(document).ready(function() {
$('#tablaprogramaformacion').DataTable({
dom: 'Bfrtip',
buttons: ['copy', 'excel', 'pdf', 'csv'],
"language": {
"url": "../assets/datatables/Spanish.json"
}
});
});
} else { console.log("Ups, Me equivoque;"); }
}
};
ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
ajax.send("ctrl=programaformacion&acti=actualizar&version=" + version + "&duracion=" + duracion + "&abreviacion=" + abreviacion + "&nombre=" + nombre + "&estado=" + estado + "&tipoprograma=" + tipPrograma + "&id=" + id);
document.getElementById("btnguardar").innerHTML = "Crear";
document.getElementById("titleproforma").innerHTML = "Crear Programa de formación";
}
function CancelarProgramaFormacion() {
document.getElementById("btnguardar").innerHTML = "Crear";
document.getElementById("titleproforma").innerHTML = "Crear Programa de formación";
}
|
/*global JSAV, document */
// Written by Sushma Mandava
//variable xPosition controls the horizonatl position of the visualization
$(document).ready(function() {
"use strict";
var av = new JSAV("empRefsecondCON", {animationMode: "none"});
var xPosition = 200;
var yPositionR1 = 5;
var yPositionR2 = 75;
var yPositionR3 = 125;
var length1 = 100;
var width = 35;
av.g.rect(xPosition, yPositionR1, length1, width + 20);
av.g.rect(xPosition, yPositionR2, length1, width);
av.g.rect(xPosition, yPositionR3, length1, width);
//pointer lines
av.g.line(xPosition + 130, yPositionR3 + 10, xPosition + 185, yPositionR2 + 40,
{"stroke-width": 3, stroke: "gray"});
//text
av.label("A second pointer is initialized with the assignment <tt>second = empRef</tt>. This causes <tt>second</tt> to refer to the same pointee as <tt>empRef</tt>.",
{top: yPositionR3 - 60, left: xPosition + 195});
av.label("John", {top: yPositionR1 - (width / 2) + 8, left: xPosition + 25});
av.label("1000", {top: yPositionR1 - (width / 2) + 25, left: xPosition + 25});
av.label("<tt>empRef</tt>",
{top: yPositionR2 - (width / 2) + 10, left: xPosition - 48});
av.label("<tt>second</tt>",
{top: yPositionR3 - (width / 2) + 10, left: xPosition - 48});
//first arrow
av.g.path(["M", xPosition + length1 - 10, yPositionR2 + (width / 2),
"C", xPosition + length1 + 40, yPositionR2 + (width / 2) + 5,
xPosition + length1 + 35, yPositionR2 - 10,
xPosition + length1 + 2, yPositionR1 + width - 15].join(","),
{"arrow-end": "classic-wide-long", opacity: 100, "stroke-width": 2});
//second arrow
av.g.path(["M", xPosition + length1 - 10, yPositionR3 + (width / 2),
"C", xPosition + length1 + 40, yPositionR3 + (width / 2) + 5,
xPosition + length1 + 35, yPositionR3 - 10,
xPosition + length1 + 2, yPositionR1 + width].join(","),
{"arrow-end": "classic-wide-long", opacity: 100, "stroke-width": 2});
av.displayInit();
av.recorded();
});
|
import ErrorMesage from './errorMesage';
export default ErrorMesage;
|
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsHotel = {
name: 'hotel',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 13c1.66 0 3-1.34 3-3S8.66 7 7 7s-3 1.34-3 3 1.34 3 3 3zm12-6h-8v7H3V5H1v15h2v-3h18v3h2v-9c0-2.21-1.79-4-4-4z"/></svg>`
};
|
var name = "Neal";
console.log(name);
|
var $ = require('gulp-load-plugins')();
module.exports = function () {
var setup = this.opts.setup;
var version = setup.getVersion();
$.git.tag(version, '[Online] Tag: ' + version);
};
|
sap.ui.controller("application.user", {
onInit : function () {
userController = this;
},
onBackPress : function () {
ssApp.getNavigation().backPage();
},
onUpdateUser : function () {
var userDetails = sap.ui.getCore().getModel("userCopy").getData();
if (userDetails !== undefined) {
AjaxModel.post("backend/services/user/updateUser.php", userDetails, userController.onUpdateUserCallback);
}
},
onUpdateUserCallback : function (oResponse) {
if (oResponse !== undefined && oResponse !== null) {
if (oResponse.result) {
ssApp.getNavigation().backPage();
sap.m.MessageToast.show(oResponse.message);
var user = sap.ui.getCore().getModel("userCopy").getData();
var jModel = new sap.ui.model.json.JSONModel(user);
sap.ui.getCore().setModel(jModel, "user");
} else {
sap.m.MessageToast.show(oResponse.message);
}
} else {
sap.m.MessageToast.show("Sorry, we couldn't update your details.");
}
}
});
|
"use strict";
const express = require("express");
const router = express.Router();
const checkAccountSession = require("../controllers/account/check-account-session");
const checkRolePermission = require("../controllers/account/check-role-permission");
const deleteUser = require("../controllers/user/delete-user-controller");
const updateUser = require("../controllers/user/update-user-controller");
const getUser = require("../controllers/user/get-user-controller");
router.delete(
"/v1/users",
checkAccountSession,
checkRolePermission("1", "2"),
deleteUser
);
router.patch("/v1/users", checkAccountSession, updateUser);
router.get("/v1/users", checkAccountSession, getUser);
module.exports = router;
|
/*
* `transduce` gets the current value in the process and applies a
* transformation to it.
*
* In practice it will differ from Act's map in a number of ways.
*
* First, is that it puts the current value into a list and then "unboxes" it in
* the end of the process, therefore allowing the use of regular list operation
* functions (by that I mean Ramda's functions, instead os Act's basic
* processes).
*
* [In the following examples I'll treat any function prefixed with `R.` as a
* Ramda function and the others Act's.]
*
* ```
* // this will not work since the value is not a list (returns a list with undefined)
* map(R.map(R.add(1)))
* // this will work, but the result will be a list
* map(R.pipe(R.of, R.map(R.add(1))))
* // this will work
* map(R.pipe(R.of, R.map(R.add(1)), R.head))
*
* // same as above, but no need of boxing/unboxing
* transduce(R.map(R.add(1)))
* ```
*
* The second is that it it will not emit any value if the result of the
* transducer is `undefined` or doesn't have a result, which will be the case
* if you apply any filter (again, a regular filter) that rejects the value,
* while using `map` will still emit `undefined`.
*
* ```
* // will emit `undefined` if value is <= 60
* map(R.pipe(R.of, R.filter(R.gt(R.__, 60)), R.head))
*
* // doesn't emit anything if value =< 60
* transduce(R.filter(R.gt(R.__, 60)))
* ```
*
* One important consideration is that if you have any function in the
* transducer process after the filter this function _will_ receive the
* `undefined`. Only the next Act process will not be called if the final
* result is undefined. This may be useful to "recover" from `undefineds`. A
* final suggestion is that if this is your scenario it may be more interesting
* to take a look at some `Maybe` implementation that conforms to Fantasy Land,
* and use this data type in yout transformation.
*
* map (+1) [6] -> filter (>4) []
* / \
* signal 5 -> transduce * (doesn't continue)
*
* Finally transduce runs processes "inside out" so compose will run from left
* to right.
*
* ```
* transduce(R.compose(R.map(R.add(1), R.filter(R.gt(4))))
* ```
* changes 12345678
* emits ---56789
*/
import transduce from 'ramda/src/transduce'
import flip from 'ramda/src/flip'
import append from 'ramda/src/append'
import head from 'ramda/src/head'
import of from 'ramda/src/of'
import build from './build'
export default build((xform, next, value) => {
const transducer = transduce(xform, flip(append), [])
const result = head(transducer(of(value)))
typeof result !== 'undefined' && next(result)
})
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$(document).ready(function() {
$("#downloadSurvey").click(function(event ){
event.preventDefault();
//taoj form
var form = document.createElement("form");
form.setAttribute("method", "post");
form.setAttribute("action", $("#urlDownloadSurvey").val());
form.setAttribute("style", "display: none;");
//tạo hidden
var hiddenField = document.createElement("input");
hiddenField.setAttribute("name", "surveyPath");
hiddenField.setAttribute("value", $(this).attr("href"));
form.appendChild(hiddenField);
document.body.appendChild(form);
form.submit();
form.remove();
})
// Upload file GEARS HR Data Table Template.xlsx
$("#uploadFileGearsInput").click(function(event ){
event.preventDefault();
$("#uploadFileGearsInput").prop("disabled", true);
var filesInput = document.getElementById("inputGroupFile01").files;
// Check đã chọn file chưa ?
if (filesInput.length <= 0) {
$("#uploadFileGearsInput").prop("disabled", false);
return false;
}
// kiểm tra đuôi mở rộng của file
var lstExtension = ".xls,.xlsx";
var extension = filesInput[0].name.split('.').pop();
if (lstExtension.indexOf(extension) == -1) {
alert(messageError.notAcceptFile);
$("#uploadFileGearsInput").prop("disabled", false);
return false;
}
$('.loader').show("slow",function() {
// Tạo form
var form = new FormData();
form.append('file', filesInput[0]);
$.ajax({
url: "uploadFileData",
type: "POST",
contentType: false,
processData: false,
dataType: "json",
data: form,
success: function(result) {
// nếu có lỗi validate
if (result.status == "-1") {
alert(result.message);
}
// nếu thành công
else {
alert("upload file thành công");
location.reload();
}
$("#uploadFileGearsInput").prop("disabled", false);
$('.loader').hide();
}
});
$("#uploadFileGearsInput").prop("disabled", false);
});
})
});
|
let products = [];
let cart = [];
// fetching the data from local storage and if not storing it and fetching it
if(localStorage.getItem('products')===null){
localStorage.setItem('products', JSON.stringify(products));
}
else{
products = JSON.parse(localStorage.getItem('products'));
};
if(localStorage.getItem('cart')===null){
localStorage.setItem('cart', JSON.stringify(cart));
}
else {
cart=JSON.parse(localStorage.getItem('cart'));
}
let allFilteredProducts = products;
let productRatingId;
function viewProduct(id) {
productRatingId = id;
document.getElementById('modal').style.display="flex";
let product = products.find((product)=> {
return product.id===id;
});
document.getElementById('singlepro-img').src=product.imageurl;
document.getElementById('singlepro-name').innerText=product.name;
document.getElementById('singlepro-price').innerText="$" + product.price;
document.getElementById('singlepro-category').innerText=product.category;
document.getElementById('noof-rating').innerText=`( ${product.noofrating} ) Ratings`;
document.getElementById('gold-star-rate').style.width="0px";
if(product.noofrating>0) {
let rating = product.rating/product.noofrating;
document.getElementById('gold-star-rate').style.width = (rating*20) + "%";
}
let side_images=product.side_images.split(",");
let imageString="";
side_images.forEach((image,index)=> {
imageString+=`<img class="side_image" onclick="changeImage('${image}')" src='${image}'/>`
})
document.getElementById('side_images').innerHTML=imageString;
}
function changeImage(url) {
document.getElementById('singlepro-img').src=url;
}
function closeProduct(event) {
if(event.target.className==="modal"){
document.getElementById('modal').style.display="none";
}
}
function clearStar() {
let stars = document.getElementsByClassName('user-rate');
for(i=0;i<5;i++){
stars[i].style.color="gray";
}
}
function selectRating(rating) {
clearStar();
let stars = document.getElementsByClassName('user-rate');
for(i=0;i<rating;i++){
stars[i].style.color="gold";
}
}
function rateProduct(rating) {
let product = products.find((product)=>product.id===productRatingId);
product.rating+= rating;
product.noofrating+=1;
localStorage.setItem('products',JSON.stringify(products));
displayProduct(allFilteredProducts);
if(product.noofrating>0) {
let rating = product.rating/product.noofrating;
document.getElementById('gold-star-rate').style.width = (rating*20) + "%";
}
document.getElementById('noof-rating').innerText=`( ${product.noofrating} ) Ratings`;
clearStar();
}
function openFilterPanel(status) {
let panel = document.getElementById('filterpanel');
status===true?panel.style.marginLeft=0 : panel.style.marginLeft=-20+'%';
}
let filters= {
nameFilter:{
status:false,
value:""
},
minRatingFilter:{
status:false,
value: ""
},
maxRatingFilter:{
status:false,
value: ""
},
minPriceFilter:{
status:false,
value: ""
},
maxPriceFilter:{
status:false,
value: ""
},
}
function search(data,property,value){
let filteredProducts=data.filter(function(product,index){
return product[property].toUpperCase().includes(value.toUpperCase());
})
return filteredProducts;
}
function searchMinMax(data,property,minValue,maxValue) {
let filteredProducts=data.filter(function(product,index){
if(product[property]==='rating') {
let rating=product[property]/product.noofrating;
return Number(rating>=Number(minValue)&& Number(rating))<=Number(maxValue);
}
return Number(product[property])>=Number(minValue) && Number(product[property])<=Number(maxValue);
})
return filteredProducts;
}
function clearFilters() {
let filters= {
nameFilter:{
status:false,
value:""
},
minRatingFilter:{
status:false,
value: ""
},
maxRatingFilter:{
status:false,
value: ""
},
minPriceFilter:{
status:false,
value: ""
},
maxPriceFilter:{
status:false,
value: ""
},
}
displayProduct(products);
document.getElementById('filterform').reset();
}
function filter(filterProperty,value) {
allFilteredProducts = products;
if(value!=="") {
filters[filterProperty].status=true;
filters[filterProperty].value=value;
}
else{
filters[filterProperty].status=false;
filters[filterProperty].value="";
}
if(filters.nameFilter.status===true) {
allFilteredProducts=search(allFilteredProducts,'name' ,filters.nameFilter.value);
}
if(filters.minRatingFilter.status===true) {
allFilteredProducts = searchMinMax(allFilteredProducts,'rating',filters.minRatingFilter.value,5);
}
if(filters.maxRatingFilter.status===true) {
allFilteredProducts = searchMinMax(allFilteredProducts,'rating',0,filters.maxRatingFilter.value);
}
if(filters.minPriceFilter.status===true) {
let prices = products.map((product)=> {
return product.price;
})
allFilteredProducts = searchMinMax(allFilteredProducts,'price',filters.minPriceFilter.value,Math.max(...prices));
}
if(filters.maxPriceFilter.status===true) {
allFilteredProducts = searchMinMax(allFilteredProducts,'price',1,filters.maxPriceFilter.value);
}
displayProduct(allFilteredProducts);
}
function addToCart(id) {
let checkForProduct=cart.find((product)=>product.id===id);
if(checkForProduct===undefined) {
let productToAdd = allFilteredProducts.find((product)=> {
return product.id===id;
});
productToAdd.quantity=1;
cart.push(productToAdd);
showToast("Added to cart","success");
localStorage.setItem('cart',JSON.stringify(cart));
}else{
showToast("Already in the cart","error");
}
}
function showToast(msg,type) {
let toast = document.getElementById('toast');
document.getElementById('toast').innerHTML = `<p style='padding:10px'>${msg}</p>`;
document.getElementById('toast').style.display= "flex";
if(type=="success"){
toast.style.backgroundColor = "#7bce95";
toast.style.color = "#097129";
}
else if(type=="error"){
toast.style.backgroundColor = "#ea797e";
toast.style.color = "#bb070f";
}
setTimeout(function(){
toast.style.display="none";
},10000)
}
function hideToast() {
document.getElementById('toast').style.display = "none";
}
function displayProduct(productArray) {
let productString = "";
productArray.forEach(function(product,index) {
const {id,name,price,category,color,rating,imageurl,noofrating} = product;
productString += `
<div class="product">
<div class="pro-img">
<img src="${imageurl}">
</div>
<div class="pro-details">
<div class="rate-title">
<h2>${name}</h2>
<div class="rating">
<div class="gray-star">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
</div>
<div class="golden-star" style="width:${noofrating>0?(rating/noofrating)*20:0*20}%">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
</div>
</div>
</div>
<h2>$ ${price}</h2>
<p class="category">${category}</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ipsam laboriosam facilis veniam fugiat vero neque ad ullam beatae adipisci dolores similique.</p>
<p>
<button id="addcart" onclick="addToCart('${id}')">
Add to cart
</button>
<button onclick="viewProduct('${id}')">
View Product
</button>
</p>
</div>
</div>`
})
document.getElementById('product_container').innerHTML = productString;
}
displayProduct(allFilteredProducts);
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import styled from "styled-components";
import { getSize } from "../../utils/theme";
const ButtonIcon = styled(FontAwesomeIcon)`
margin-right: ${getSize(2)};
`;
export default ButtonIcon;
|
function change1 () {
document.getElementById("pictures").src = "img1.jpg";
}
function change2 () {
document.getElementById("pictures").src = "img2.jpg";
}
function change3 () {
document.getElementById("pictures").src = "img3.jpg";
}
function change4 () {
document.getElementById("pictures").src = "img4.jpg";
}
function change5 () {
document.getElementById("pictures").src = "img5.jpg";
}
function Setup() {
document.getElementById("1").addEventListener("click", change1);
document.getElementById("2").addEventListener("click", change2);
document.getElementById("3").addEventListener("click", change3);
document.getElementById("4").addEventListener("click", change4);
document.getElementById("5").addEventListener("click", change5);
}
addEventListener('load', Setup);
|
let cb;
function setup() {
// put setup code here
let c = createCanvas(800,600);
c.parent(select('#canvas-container'));
createNavBtns();
cb = new CodeBlock();
windowResized();
}
function draw() {
// put drawing code here
background("#0A0");
}
|
toDoApp.factory('LoginService', ['$q', 'BaseService',
function ($q, BaseService) {
var extended = Object.create(BaseService);
return {
//Create request for login user
login: function (email, password) {
let deferred = $q.defer();
let headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
extended.post('api/user/login', null, 'email=' + email + '&password=' + password, headers)
.then(data => {
deferred.resolve(data);
})
.catch(error => {
throw new Error(JSON.stringify(error));
});
return deferred.promise;
},
//Create request for signin/validate user
signIn: function (token) {
let deferred = $q.defer();
let headers = {
'Registration-Token': token
}
return extended.get('api/user/signin', null, headers)
.then(data => {
deferred.resolve(data);
})
.catch(error => {
throw new Error(JSON.stringify(error));
});
return deferred.promise;
}
}
},
]);
|
import React from "react";
import NeoBox from "./NeoBox";
export default {
title: "form/Input/Neomorphic Checkbox",
component: NeoBox,
};
export const Default = () => <NeoBox variant="default"></NeoBox>;
export const Selected = () => <NeoBox variant="selected"></NeoBox>;
|
import React, { Component } from 'react';
import { Map, InfoWindow, GoogleApiWrapper } from 'google-maps-react';
import NoMap from './NoMap';
// API keys
const MAP_KEY = "AIzaSyDooJxFSbNJe1lpgeube4K4PkIXeWe8ssM";
const FS_CLIENT = "I1DEPPPUXR4APAUHVOWBISJRFRMERQLQ5W2JSSAYNWBBYIWF";
const FS_SECRET = "PEDUHODOHQPUC3NSOM3P3JCRXCH5DNZLMZDEJPHZI44OOOGM";
const FS_VERSION = "20180323";
class MapDisplay extends Component {
state = {
map: null,
markers: [],
markerProps: [],
activeMarker: null,
activeMarkerProps: null,
isInfoWindowShowing: false
};
componentDidMount() {
}
componentWillReceiveProps = (props) => {
console.log("Selected index is " + props.selectedIndex);
// Only drop the markers the first time
this.setState({firstDrop: false});
// Change in the number of locations --> update markers
if (this.state.markers.length !== props.locations.length) {
console.log("Number of markers has changed");
this.closeInfoWindow();
this.updateMarkers(props.locations);
this.setState({activeMarker: null});
return;
}
// Selected item is not the same as the active marker, so close infowindow
if (!props.selectedIndex || (this.state.activeMarker &&
(this.state.markers[props.selectedIndex] !== this.state.activeMarker))) {
console.log("Selected item differs from active marker");
this.closeInfoWindow();
}
// Make sure there's a selected index
if (props.selectedIndex === null || typeof(props.selectedIndex) === "undefined") {
console.log("There's no selected index");
return;
}
// Treat the marker as clicked
console.log("Treating the marker as clicked");
this.onMarkerClick(this.state.markerProps[props.selectedIndex], this.state.markers[props.selectedIndex]);
}
closeInfoWindow = () => {
// Disable any active marker animation
this.state.activeMarker && (this.state.activeMarker.setAnimation(null));
this.setState({isInfoWindowShowing: false, activeMarker: null, activeMarkerProps: null});
}
getBusinessInfo = (props, data) => {
// Look for matching restaurant data in FourSquare
return data.response.venues.filter(item => item.name.includes(props.name) || props.name.includes(item.name));
}
onMarkerClick = (props, marker, event) => {
// Close any infowindow that's open
this.closeInfoWindow();
// Fetch the FourSquare data for the selected restaurant
let url = `https://api.foursquare.com/v2/venues/search?client_id=${FS_CLIENT}&client_secret=${FS_SECRET}&v=${FS_VERSION}&radius=100&ll=${props.position.lat},${props.position.lng}&llAcc=100`;
let headers = new Headers();
let request = new Request(url, {
method: 'GET',
headers
});
// Create props for the active marker
let activeMarkerProps;
fetch(request)
.then(response => response.json())
.then(result => {
// Get just the business reference for the restaurant we want
let restaurant = this.getBusinessInfo(props, result);
activeMarkerProps = {
...props,
foursquare: restaurant[0]
};
if (activeMarkerProps.foursquare) {
// If there is FourSquare data, get the list of images for this restaurant
let url=`https://api.foursquare.com/v2/venues/${restaurant[0].id}/photos?client_id=${FS_CLIENT}&client_secret=${FS_SECRET}&v=${FS_VERSION}`;
fetch(url)
.then(response => response.json())
.then(result => {
activeMarkerProps = {
...activeMarkerProps,
images: result.response.photos
};
if (this.state.activeMarker)
this.state.activeMarker.setAnimation(null);
marker.setAnimation(this.props.google.maps.Animation.BOUNCE);
this.setState({isInfoWindowShowing: true, activeMarker: marker, activeMarkerProps});
})
} else {
// Finish setting state with the data we have
marker.setAnimation(this.props.google.maps.Animation.BOUNCE);
this.setState({isInfoWindowShowing: true, activeMarker: marker, activeMarkerProps});
}
})
}
updateMarkers = (locations) => {
// If all the locations have been filtered, then don't do anything
if (!locations) {
return;
}
// For any existing markers, remove them from the map
this.state.markers.forEach(marker => marker.setMap(null));
// Iterate over the locations and add the markers to the map
let markerProps = [];
let markers = locations.map((location, index) => {
let mProps = {
key: index,
index,
name: location.name,
position: location.pos,
url: location.url
};
markerProps.push(mProps);
let icon = {
url: "https://3.bp.blogspot.com/-DBL-fLwVTOA/Wy3epOhWnnI/AAAAAAAANNw/5n14fDWU8EQc9iobtaesks-chn0wXC9sgCLcBGAs/s1600/Map-Marker-Smiley-Heart_Eyes.png",
scaledSize: new this.props.google.maps.Size(42, 42)
};
// TO DO: Pull data from the Yelp API and change the marker icon depending on
// the restaurant's ratings
let animation = this.state.firstDrop ? this.props.google.maps.Animation.DROP : null;
let marker = new this.props.google.maps.Marker({
position: location.pos,
map: this.state.map,
icon,
animation
});
marker.addListener('click', () => {
this.onMarkerClick(mProps, marker, null);
});
return marker;
})
this.setState({markers, markerProps});
}
mapReady = (props, map) => {
this.setState({map});
this.updateMarkers(this.props.locations);
}
render() {
const mapCenter = {
lat: this.props.lat,
lng: this.props.lng
};
const mapStyle = {
width: '100%',
height: '100%'
};
let amProps = this.state.activeMarkerProps;
return (
<Map
role="application"
aria-label="map"
onReady={this.mapReady}
style={mapStyle}
google={this.props.google}
zoom={this.props.zoom}
initialCenter={mapCenter}
onClick={this.closeInfoWindow}
>
<InfoWindow
marker={this.state.activeMarker}
visible={this.state.isInfoWindowShowing}
onClose={this.closeInfoWindow}
>
<div>
<h3>{amProps && amProps.name}</h3>
{amProps && amProps.url
? (
<a href={amProps.url}>Website</a>
)
: ""}
{amProps && amProps.images
? (
<div> <img
alt={amProps.name + " photo"}
src={amProps.images.items[0].prefix + "100x100" + amProps.images.items[0].suffix}/>
<p>Image from Foursqure</p>
</div>
)
: ""
}
</div>
</InfoWindow>
</Map>
)
}
}
export default GoogleApiWrapper({apiKey: MAP_KEY, LoadingContainer:NoMap})(MapDisplay);
|
let emptyRow = 2;
let emptyCol = 2;
let makeMoveHandler = function (tile, i, j) {
let row = i;
let col = j;
return function () {
let rowOffset = Math.abs(emptyRow - row);
let colOffset = Math.abs(emptyCol - col);
if (rowOffset == 1 && colOffset == 0 || rowOffset == 0 && colOffset == 1) {
tile.style.marginLeft = emptyCol * 200 + 'px';
tile.style.marginTop = emptyRow * 200 + 'px';
[row, emptyRow] = [emptyRow, row];
[col, emptyCol] = [emptyCol, col];
}
}
};
let shuffle = function () {
let rows = document.querySelectorAll('.row');
for (let i = 0; i < 85; ++i) {
let row = ~~(Math.random() * rows.length);
let tiles = rows.item(row).querySelectorAll('.tile');
let tile = ~~(Math.random() * tiles.length);
tiles.item(tile).click();
}
};
let initTiles = function () {
let rows = document.querySelectorAll('.row');
for (let i = 0; i < rows.length; ++i) {
let row = rows.item(i);
let tiles = row.querySelectorAll('.tile');
for (let j = 0; j < tiles.length; ++j) {
let tile = tiles.item(j);
tile.addEventListener('click', makeMoveHandler(tile, i, j));
tile.style.marginLeft = j * 200 + 'px';
tile.style.marginTop = i * 200 + 'px';
tile.style.backgroundPosition = `${600 - j * 200}px ${600 - i * 200}px`;
}
}
};
initTiles();
shuffle();
|
import React, { Component } from 'react';
import '../css/Contenedor.css';
class Contenedor extends Component {
render() {
return (
<div className="Contenedor">
<h1>Contenedor</h1>
<div className="Contenedor__img">
<figure>
<img
src="https://www.lavanguardia.com/files/content_image_mobile_filter/uploads/2021/03/15/604ebe271e101.jpeg"
alt="Imagen de un perrito"
/>
<figcaption>Es una imagen de un perrito 🐶 d</figcaption>
</figure>
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Fugiat,
laboriosam!
</p>
</div>
);
}
}
export default Contenedor;
|
var searchData=
[
['firstboneisroot',['firstBoneIsRoot',['../class_bone_manager.html#af2e926ad873f1c61b51fda9b219c78eb',1,'BoneManager']]],
['followbehind',['followBehind',['../class_planetary_camera_smooth_follow.html#a2ada69b1be10fe9a1db36920c43c23bd',1,'PlanetaryCameraSmoothFollow.followBehind()'],['../class_smooth_follow2.html#aa0d65efb0007a376b6b970c7da511a40',1,'SmoothFollow2.followBehind()']]]
];
|
export const calculateArray = (expressionArr) => {
let currentExpressionArr = [...expressionArr]
let serviceExpressionArr = [...expressionArr]
let result = 0
//console.log(serviceExpressionArr);
serviceExpressionArr.pop()
//console.log(serviceExpressionArr);
for (let i=0; i <= serviceExpressionArr.length-3; i=i+2) {
const var1 = serviceExpressionArr[i]
const oper = serviceExpressionArr[i+1]
const var2 = serviceExpressionArr[i+2]
try {
switch(oper) {
case "+":
serviceExpressionArr[i+2] = var1 + var2
break;
case "-":
serviceExpressionArr[i+2] = var1 - var2
break;
case "*":
serviceExpressionArr[i+2] = var1 * var2
break;
case "/":
serviceExpressionArr[i+2] = var1 / var2
break;
default:
throw new Error(`Wrong math operator ${oper}`)
}
} catch (err) {
throw new Error(`Math error ${err}`)
}
}
result = serviceExpressionArr[serviceExpressionArr.length-1]
currentExpressionArr.push(result)
return currentExpressionArr
}
export const calculateTimeDiff = (date) => {
const today = new Date()
const recordDate = new Date(date)
console.log(recordDate);
console.log(today);
let d = Math.abs(today - recordDate) / 1000; // delta
let r = {}; // result
let s = { // structure
year: 31536000,
month: 2592000,
week: 604800, // uncomment row to ignore
day: 86400, // feel free to add your own row
hour: 3600,
minute: 60,
second: 1
};
Object.keys(s).forEach(function(key){
r[key] = Math.floor(d / s[key]);
d -= r[key] * s[key];
});
// for example: {year:0,month:0,week:1,day:2,hour:34,minute:56,second:7}
console.log(r);
if (r.year > 0) {
if (r.year === 1) {
return `a year ago`
} else {
return `${r.year} years ago`
}
}
if (r.month > 0) {
if (r.month === 1) {
return `a month ago`
} else {
return `${r.month} months ago`
}
}
if (r.week > 0) {
if (r.week === 1) {
return `a week ago`
} else {
return `${r.week} weeks ago`
}
}
if (r.day > 0) {
if (r.day === 1) {
return `a day ago`
} else {
return `${r.day} days ago`
}
}
if (r.hour > 0) {
if (r.hour === 1) {
return `an hour ago`
} else {
return `${r.hour} hours ago`
}
}
if (r.minute > 0) {
if (r.minute === 1) {
return `a minute ago`
} else {
return `${r.minute} minutes ago`
}
}
if (r.second > 0) {
return `${r.second} seconds ago`
}
return "seconds ago"
}
|
const genomicRangeQuery = require('./index');
test('finds minimum of AGCT in range', () => {
const s = 'CAGCCTA';
const p = [2,5,0];
const q = [4,5,6];
expect(genomicRangeQuery(s, p, q)).toEqual([2,4,1]);
})
|
// @flow
export const ICON_HOME = 'home';
export const ICON_PRESENTER = 'people';
export const ICON_SCHEDULE = 'today';
export const ICON_MAP = 'map';
export const ICON_BOOKMARK = 'bookmark';
|
/**
* Applies a specified policy to an object.
**/
exports.applyPolicy = function (repositoryId, policyId, objectId) {
//todo
};
/**
* Removes a specified policy from an object.
**/
exports.removePolicy = function (repositoryId, policyId, objectId) {
//todo
};
/**
* Gets the list of policies currently applied to the specified object.
**/
exports.getAppliedPolicies = function (repositoryId, objectId, filter) {
//todo
};
|
export * from "./SignUpContainer";
|
import shared from "../shared-with-style.native";
describe("ios", () => {
shared();
});
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.