text
stringlengths
7
3.69M
function currencyFormat(num){ var price = Number(num).toFixed(2); return '$' + price; } function _cfr(num){ var ns = String(num); var d = arrayIndexOf.call(ns, '.'); return num; if(d === -1){ return num; }else{ var offset = ns.length - (3 +(d!== -1 ? ns.length-d : 0)); return _cfr(Number(ns.substr(0,offset))) + ',' + ns.substr( offset); } }
import React from 'react'; import withStore from '~/hocs/withStore'; function completed(props) { let {disabled, callback} = props; let ICONS = props.stores.icons; let TEXT = props.stores.textsStore; return ( <button className="btn btn-success" onClick={() => callback()} disabled={disabled} title={TEXT.btn_comp} > {ICONS.iconCompleted} </button> ); } export default withStore(completed);
const purchasing002 = () =>{ return ( <div> purchasing002 </div> ) } export default purchasing002;
var m = require('mithril'); module.exports = { view: ({ attrs: { left, title, right } }) => { return m( '.title-bar', {}, m( '.title-bar__left', left ), m( '.title-bar__center', title ), m( '.title-bar__right', right ) ); } }
// WEEK 5/ DAY 23 / SLIDE 15 var express=require('express'); // BUT A MORE DETAILED SLIDE IS ON WEEK 6/ DAY 25/ SLIDE 14 var postCtrl = require("./controllers/posts.ctrl"); var usersCtrl = require("./controllers/users.ctrl"); var catCtrl =require('./controllers/categories.ctrl'); var router = express.Router(); router.use('/posts', postCtrl); router.use('/users', usersCtrl); router.use('/categories', catCtrl); module.exports = router;
const iconsUndoCopy = { "en": { "UNDO": {} }, "kr": { "UNDO": {} }, "ch": { "UNDO": {} }, "jp": { "UNDO": {} } } export default iconsUndoCopy;
import React from 'react'; import '../Signup/style.css'; function Signup(props) { return( <div id="signup-wrapper"> <div id="header-signup"> <h2>Sign Up</h2> </div> <form id="signup-form"> <div> <label htmlFor="firstname-input-signup">First Name</label> <input type="text" id="firstname-input-signup" className="firstname-input-signup"> </input> </div> <div> <label hmlFor="lastname-input-signup">Last Name</label> <input type="text" id="lastname-input-signup" className="lastname-input-signup"> </input> </div> <div> <label htmlFor="password-input-signup">Password</label> <input type="text" id="password-input-signup" className="password-input-signup"></input> </div> <button type="submit" className="signup-btn btn"> Sign Up </button> <button type="submit" className="Login-btn btn"> Log In </button> </form> </div> ); } export default Signup;
//This is also Wonderful Exercise solved by Shahmeer var fun = (Str,ee)=>{ nn = Str.length; ne = ""; for(i = 0 ; i<nn ; i++){ var ne = ne.concat(ee); } return ne; } var ttt = fun("Shahmeer","s"); var ht = document.getElementById("test"); console.log(fun("Shah","s")); console.log(nn);
require("@nomiclabs/hardhat-waffle"); require('dotenv').config(); module.exports = { solidity: { compilers: [ { version: "0.8.0" } ] }, networks: { hardhat: { forking: { url: process.env.ALCHEMY_URL, blockNumber: 12431519 } } } };
import moment from 'moment'; import sleep from 'sleep-promise'; import Db from '../../src/lib/Db'; import DynamoHelper from '../DynamoHelper'; const _ = require('lodash'); const expect = require('unexpected'); const Promise = require('bluebird'); const randomstring = require('randomstring'); const dynamoHelper = new DynamoHelper(); const dynamo = dynamoHelper.getDynamo(); const db = new Db({ REGION: process.env.REGION, DYNAMO_TABLE_PROJECTS: process.env.DYNAMO_TABLE_PROJECTS, DYNAMO_TABLE_USERS: process.env.DYNAMO_TABLE_USERS, }); db.setClient(dynamo); describe('Db Projects', () => { const projectId = _.random(1, 1000); const pid = `pid${_.random(1, 1000)}`; const token = `token${_.random(1, 1000)}`; beforeEach(() => dynamoHelper.createTableProjects() .then(() => dynamoHelper.putProject(projectId, pid, token)) .then(() => dynamoHelper.putProject(`${projectId}2`, `${pid}2`, `${token}2`)) .then(() => dynamoHelper.putProject(projectId, `${pid}3`, `${token}3`))); it('listProjects', () => db.listProjects(projectId) .then((res) => { expect(res.data, 'to have length', 2); expect(res.data[0], 'to have key', 'pid'); expect(res.data[0], 'to have key', 'createdOn'); expect(res.data[0], 'to have key', 'createdBy'); }) .then(() => db.listProjects(`${projectId}2`)) .then(res => expect(res.data, 'to have length', 1))); async function fillTableForPagination() { for (let i = 0; i < 500; i += 1) { /* eslint no-await-in-loop:0 */ await dynamoHelper.putProject( projectId, `pidX${_.random(100000, 900000)}`, randomstring.generate(2048) ); // Wait a little not to flood the Dynamo await sleep(_.random(1, 500)); } return Promise.resolve(); } let itemsCount = 0; it('listProjects with pagination', () => dynamoHelper.createTableProjects() .then(() => fillTableForPagination()) .then(() => db.listProjects(projectId)) .then((res) => { expect(res.nextPageToken, 'not to be null'); expect(_.size(res.data), 'not to be', 0); itemsCount += _.size(res.data); return db.listProjects(projectId, res.nextPageToken); }) .then((res) => { expect(_.size(res.data), 'not to be', 0); itemsCount += _.size(res.data); expect(itemsCount, 'to be', 500); })); it('listAllDistinctProjectIds', () => dynamoHelper.createTableProjects() .then(() => dynamoHelper.putProject(projectId, 'pid', token)) .then(() => dynamoHelper.putProject(projectId, 'pid-1d', token, moment().subtract(1, 'd').toJSON())) .then(() => dynamoHelper.putProject(projectId * 2, 'pid-1h', token, moment().subtract(1, 'h').toJSON())) .then(() => db.listAllDistinctProjectIds()) .then(res => expect(res, 'to have length', 2))); it('listExpiredProjects', () => dynamoHelper.createTableProjects() .then(() => dynamoHelper.putProject(projectId, 'pid', token)) .then(() => dynamoHelper.putProject(projectId, 'pid-1d', token, moment().subtract(1, 'd').toJSON())) .then(() => dynamoHelper.putProject(projectId, 'pid-1h', token, moment().subtract(1, 'h').toJSON())) .then(() => dynamoHelper.putProject(projectId, 'pid-1m', token, moment().subtract(1, 'm').toJSON())) .then(() => dynamoHelper.putProject(projectId, 'pid+1d', token, moment().add(1, 'd').toJSON())) .then(() => dynamoHelper.putProject(projectId, 'pid+1h', token, moment().add(1, 'h').toJSON())) .then(() => dynamoHelper.putProject(projectId, 'pid+1m', token, moment().add(1, 'm').toJSON())) .then(() => db.listExpiredProjects()) .then(res => expect(res.data, 'to have length', 3))); it('getProjectsCount', () => db.getProjectsCount(projectId, token) .then(res => expect(res, 'to be', 1)) .then(() => db.getProjectsCount(`${projectId}2`, token)) .then(res => expect(res, 'to be', 0)) .then(() => db.getProjectsCount(`${projectId}2`, `${token}2`)) .then(res => expect(res, 'to be', 1))); const pid2 = `pid2-${_.random(1, 1000)}`; const pid3 = `pid3-${_.random(1, 1000)}`; it('addProject', () => dynamo.scan({ TableName: process.env.DYNAMO_TABLE_PROJECTS, FilterExpression: '#ProjectId = :projectId AND #Token = :token', ExpressionAttributeNames: { '#ProjectId': 'Project', '#Token': 'Token', }, ExpressionAttributeValues: { ':projectId': { N: _.toString(projectId) }, ':token': { S: token }, }, Select: 'COUNT', }).promise() .then(res => expect(res.Count, 'to be', 1)) .then(() => expect(() => db.addProject(pid2, token, { owner: { id: projectId }, admin: { id: 1, name: 'me' } }), 'to be fulfilled')) .then(() => dynamo.scan({ TableName: process.env.DYNAMO_TABLE_PROJECTS, FilterExpression: '#ProjectId = :projectId AND #Token = :token', ExpressionAttributeNames: { '#ProjectId': 'Project', '#Token': 'Token', }, ExpressionAttributeValues: { ':projectId': { N: _.toString(projectId) }, ':token': { S: token }, }, Select: 'COUNT', }).promise()) .then(res => expect(res.Count, 'to be', 2)) .then(() => expect(() => db.addProject(pid3, token, { owner: { id: projectId }, admin: { id: 1, name: 'me' } }, 1), 'to be fulfilled')) .then(() => dynamo.scan({ TableName: process.env.DYNAMO_TABLE_PROJECTS, FilterExpression: '#Pid = :pid', ExpressionAttributeNames: { '#Pid': 'Pid', }, ExpressionAttributeValues: { ':pid': { S: pid3 }, }, }).promise()) .then((res) => { expect(res, 'to have key', 'Items'); expect(res.Items, 'to have length', 1); expect(res.Items[0], 'to have key', 'ExpiresOn'); expect(moment(res.Items[0].ExpiresOn.S).format('YYYY-MM-DD'), 'to be', moment().add(1, 'day').format('YYYY-MM-DD')); })); it('getProject', () => db.getProject(pid, projectId) .then(res => expect(res, 'to have key', 'pid')) .then(() => expect(() => db.getProject('xx', projectId), 'to be rejected'))); it('deleteProject', () => dynamo.scan({ TableName: process.env.DYNAMO_TABLE_PROJECTS, FilterExpression: '#ProjectId = :projectId AND #Pid = :pid', ExpressionAttributeNames: { '#ProjectId': 'Project', '#Pid': 'Pid', }, ExpressionAttributeValues: { ':projectId': { N: _.toString(projectId) }, ':pid': { S: pid }, }, Select: 'COUNT', }).promise() .then(res => expect(res.Count, 'to be', 1)) .then(() => expect(() => db.deleteProject(pid, projectId), 'to be fulfilled')) .then(() => dynamo.scan({ TableName: process.env.DYNAMO_TABLE_PROJECTS, FilterExpression: '#ProjectId = :projectId AND #Pid = :pid', ExpressionAttributeNames: { '#ProjectId': 'Project', '#Pid': 'Pid', }, ExpressionAttributeValues: { ':projectId': { N: _.toString(projectId) }, ':pid': { S: pid }, }, Select: 'COUNT', }).promise()) .then(res => expect(res.Count, 'to be', 0))); });
//Get Budget Data let budgetId = document.getElementById('budgetId').value; axios.get(`/budget/${budgetId}/api`).then((response) => { // Data var data = [ response.data.foodAmount, response.data.transportationAmount, response.data.insuranceAmount, response.data.clothingAmount, response.data.entertainmentAmount,response.data.housingAmount, response.data.savingAmount]; var chart_width = 600; var chart_height = 600; var color = d3.scaleOrdinal( d3.schemeCategory10 ); // Pie Layout var pie = d3.pie(); // Arc var outer_radius = chart_width / 2; var inner_radius = 200; var arc = d3.arc() .innerRadius( inner_radius ) .outerRadius( outer_radius ); //Create SVG Element var svg = d3.select("#chart") .append("svg") .attr("width", chart_width) .attr("height", chart_height); // Groups var arcs = svg.selectAll( 'g.arc' ) .data( pie(data) ) .enter() .append( 'g' ) .attr( 'class', 'arc' ) .attr( 'transform', "translate(" + outer_radius + "," + chart_height / 2 + ")" ); // Arcs arcs.append( 'path' ) .attr( 'fill', function(d, i){ return color( i ); }) .attr( 'd', arc ); // Labels arcs.append( 'text' ) .attr( 'transform', function(d, i){ return "translate(" + arc.centroid(d) + ")"; }) .attr( 'text-anchor', 'text-middle' ) .text(function(d){ return d.value; }); console.log(response.data); }).catch((err) => { console.log(err); }) // // Data // var data = [ 35, 6, 20, 47, 19 ]; // var chart_width = 600; // var chart_height = 600; // var color = d3.scaleOrdinal( d3.schemeCategory10 ); // // // Pie Layout // var pie = d3.pie(); // // // Arc // var outer_radius = chart_width / 2; // var inner_radius = 200; // var arc = d3.arc() // .innerRadius( inner_radius ) // .outerRadius( outer_radius ); // // //Create SVG Element // var svg = d3.select("#chart") // .append("svg") // .attr("width", chart_width) // .attr("height", chart_height); // // // Groups // var arcs = svg.selectAll( 'g.arc' ) // .data( pie(data) ) // .enter() // .append( 'g' ) // .attr( 'class', 'arc' ) // .attr( // 'transform', // "translate(" + outer_radius + "," + chart_height / 2 + ")" // ); // // // Arcs // arcs.append( 'path' ) // .attr( 'fill', function(d, i){ // return color( i ); // }) // .attr( 'd', arc ); // // // Labels // arcs.append( 'text' ) // .attr( 'transform', function(d, i){ // return "translate(" + arc.centroid(d) + ")"; // }) // .attr( 'text-anchor', 'text-middle' ) // .text(function(d){ // return d.value; // });
(function () { 'use strict'; angular.module('AdBase').controller('userWorkspaceController',userWorkspaceController); userWorkspaceController.$inject = ['$scope', 'userWorkspaceService','$location','$routeParams']; function userWorkspaceController($scope,userWorkspaceService, $location, $routeParams){ var self = this ; self.workspacesDto = []; self.selectedWorkspace = {}; self.saveWorkspace = saveWorkspace; self.error = ""; self.loginName; init(); function init(){ var loginName = $routeParams.loginName; var ouIdentif = $routeParams.ouIdentif; self.loginName = loginName; loadWorkspace(ouIdentif,loginName); } function saveWorkspace(){ userWorkspaceService.saveUserWorkspace( self.workspacesDto).then(function (data) { self.workspacesDto = data; }); }; function loadWorkspace(ouIdentif,loginName){ userWorkspaceService.loadUserWorkspaces(ouIdentif,loginName).then(function(data){ self.workspacesDto = data; }) }; }; })();
const TaskType = { BUILD: "BUILD", // 构建 BUILDAndDEPLOY: "BUILDAndDEPLOY", // 构建及部署 DEV: "DEV", PUSH: "PUSH", // 发布已打包的目录到SVN INSTALL: "INSTALL" // 安装依赖 } const TERMINAL_MAPS = {}; /* * @params {String} key 项目ID * */ export const getTerminalRefIns = (taskType, key) => { if (!key || !taskType) { return null; } if (TERMINAL_MAPS[key]) { return TERMINAL_MAPS[key][taskType]; } }; export const setTerminalRefIns = (taskType, key, ins) => { TERMINAL_MAPS[key] = { [taskType]: ins }; };
'use strict'; require = require("@std/esm")(module,{"esm":"js"}); const assert = require('chai').assert; const model = require('../models/notes'); describe("Model Test", function() { beforeEach(async function() { try { // console.log('beforeEach'); const keyz = await model.keylist(); // console.log(`beforeEach keylist ${keyz}`); for (let key of keyz) { await model.destroy(key); } // console.log('beforeEach destroy'); await model.create("n1", "Note 1", "Note 1"); await model.create("n2", "Note 2", "Note 2"); await model.create("n3", "Note 3", "Note 3"); // console.log('beforeEach all'); } catch (e) { console.error(e); throw e; } }); describe("check keylist", function() { it("should have three entries", async function() { const keyz = await model.keylist(); assert.exists(keyz); assert.isArray(keyz); assert.lengthOf(keyz, 3); }); it("should have keys n1 n2 n3", async function() { const keyz = await model.keylist(); assert.exists(keyz); assert.isArray(keyz); assert.lengthOf(keyz, 3); for (let key of keyz) { assert.match(key, /n[123]/, "correct key"); } }); it("should have titles Node #", async function() { const keyz = await model.keylist(); assert.exists(keyz); assert.isArray(keyz); assert.lengthOf(keyz, 3); var keyPromises = keyz.map(key => model.read(key)); const notez = await Promise.all(keyPromises); for (let note of notez) { assert.match(note.title, /Note [123]/, "correct title"); } }); }); describe("read note", function() { it("should have proper note", async function() { const note = await model.read("n1"); assert.exists(note); assert.deepEqual({ key: note.key, title: note.title, body: note.body }, { key: "n1", title: "Note 1", body: "Note 1" }); }); it("Unknown note should fail", async function() { try { const note = await model.read("badkey12"); assert.notExists(note); throw new Error("should not get here"); } catch(err) { // this is expected, so do not indicate error assert.notEqual(err.message, "should not get here"); } }); }); describe("change note", function() { it("after a successful model.update", async function() { const newnote = await model.update("n1", "Note 1 title changed", "Note 1 body changed"); const note = await model.read("n1"); assert.exists(note); assert.deepEqual({ key: note.key, title: note.title, body: note.body }, { key: "n1", title: "Note 1 title changed", body: "Note 1 body changed" }); }); }); describe("destroy note", function() { it("should remove note", async function() { await model.destroy("n1"); const keyz = await model.keylist(); assert.exists(keyz); assert.isArray(keyz); assert.lengthOf(keyz, 2); for (let key of keyz) { assert.match(key, /n[23]/, "correct key"); } }); it("should fail to remove unknown note", async function() { try { await model.destroy("badkey12"); throw new Error("should not get here"); } catch(err) { // this is expected, so do not indicate error assert.notEqual(err.message, "should not get here"); } }); }); afterEach(function() { // console.log('afterEach'); }); after(function() { // console.log('after -- closing'); model.close(); }); });
document.querySelector('.page-loaded') .innerText = new Date().toLocaleTimeString(); document.querySelector('.get-html-ajax') .addEventListener('click', getHtmlAjax); const READY_STATE_FINISHED = 4; const HTTP_STATUS_CODE_OK = 200; function getHtmlAjax() { const xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === READY_STATE_FINISHED && xhr.status == HTTP_STATUS_CODE_OK) { document.querySelector('.html-placeholder') .innerHTML = xhr.responseText; } } xhr.open('GET', 'client-data.html', true); xhr.send(); } document.querySelector('.fetch-html') .addEventListener('click', fetchHtml); function fetchHtml() { fetch('client-data.html') .then(response => response.text()) .then(html => document.querySelector('.html-placeholder').innerHTML = html) .catch(error => document.querySelector('.html-placeholder').innerHTML = error.message); } document.querySelector('.get-json-ajax') .addEventListener('click', getJsonAjax); function getJsonAjax() { const xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState === READY_STATE_FINISHED && xhr.status == HTTP_STATUS_CODE_OK) { const clientData = JSON.parse(xhr.responseText); document.querySelector('.client-name') .innerText = clientData.name; document.querySelector('.account-balance') .innerText = clientData.balance; } } xhr.open('GET', 'client-data.json', true); xhr.send(); } document.querySelector('.fetch-json') .addEventListener('click', fetchJSON); function fetchJSON() { fetch('client-data.json') .then(response => response.json()) .then(clientData => { document.querySelector('.client-name') .innerText = clientData.name; document.querySelector('.account-balance') .innerText = clientData.balance; }); } document.querySelector('.curr-convert') .addEventListener('click', currConvert); function currConvert(e) { e.preventDefault(); const currFrom = document.querySelector('.converter input[name=curr-from]').value; const currTo = document.querySelector('.converter input[name=curr-to]').value; const currKey = currFrom + '_' + currTo; fetch(`https://free.currencyconverterapi.com/api/v6/convert?q=${currKey}&compact=ultra&apiKey=d1b5218e0be93e157106`) .then(response => response.json()) .then(currency => { const rate = currency[currKey]; const sourceAmount = document.querySelector('.converter input[name=curr-amount]').value; const convertedAmount = rate * sourceAmount; document.querySelector('.converter output[name=curr-converted]') .innerText = convertedAmount.toFixed(2); }); } document.querySelector('.login-form').addEventListener('submit', submitForm); function submitForm(e) { e.preventDefault(); fetch('form.php', { method: 'POST', body: new FormData(document.querySelector('.login-form')) }) .then(response => response.text()) .then(html => document.querySelector('.server-response') .innerHTML = html); }
import React from 'react'; import vars from '../../../vars'; import BaseLayout from '../../../components/layout/Base'; import Head from '../../../components/common/Head'; import PostLayout from '../PostLayout'; import PostHero from '../PostHero'; import PostCover from '../PostCover'; import PostSections from '../PostSections'; export default function PostPage({ post, route, prev, next }) { const ogImage = `https:${post.cover.src}?fit=thumb&w=400&h=400&f=center`; const url = `${vars.websiteUrl}/${post.slug}`; return ( <BaseLayout route={route} head={ <Head title={post.title} slogan={vars.siteName} description={post.description} ogImage={ogImage} twitterCardImage={ogImage} ogType="article" url={url} extraLinks={ <> <link rel="preconnect" href="https://assets.ctfassets.net" crossOrigin="anonymous" /> <link rel="preconnect" href="https://tile.thunderforest.com" crossOrigin="anonymous" /> </> } /> } > <PostLayout hero={<PostHero post={post} />} content={ <> <PostCover cover={post.cover} /> <PostSections post={post} prev={prev} next={next} /> </> } /> </BaseLayout> ); }
const winston = require('winston') const moment = require('moment') const { config } = winston const messageTemplate = options => { const d = moment().format('DD/MM/YYYY h:mm') const level = config.addColors(options.level) const { message = '' } = options return `${d} - ${level}: ${message}` } const logger = winston.createLogger({ format: winston.format.combine( winston.format.colorize(), winston.format.printf(options => { return messageTemplate(options) }) ), transports: [new winston.transports.Console()], }) module.exports = logger
module.exports = { defaultTitle: 'Pedro Morais', logo: '', author: 'Pedro Morais', url: 'https://pedro-morais.pt', legalName: 'Pedro Morais', defaultDescription: 'I’m Pedro Morais and I’m a FullStack Developer!', socialLinks: { twitter: 'http://www.twitter.com/o_pedromorais', github: 'https://github.com/pedronline', linkedin: 'https://www.linkedin.com/in/pedronline/', // instagram: '', // youtube: '', // google: '', // telegram: '', // stackOverflow: '', }, googleAnalyticsID: '', themeColor: '#6b63ff', backgroundColor: '#6b63ff', social: { facebook: 'appId', twitter: '@o_pedromorais', }, address: { city: 'City', region: 'Region', country: 'Country', zipCode: 'ZipCode', }, contact: { email: 'dev.pedrom@gmail.com', phone: 'phone number', }, foundingDate: '2020', };
const childProcess = require('child_process'); const Stream = require('stream').Stream; const util = require('util'); const which = require('which'); const memoizeAsync = require('memoizeasync'); function JpegTran(jpegTranArgs) { Stream.call(this); this.jpegTranArgs = jpegTranArgs; this.writable = this.readable = true; this.hasEnded = false; } util.inherits(JpegTran, Stream); JpegTran.getBinaryPath = memoizeAsync((cb) => { which('jpegtran', (err, jpegTranBinaryPath) => { if (err) { jpegTranBinaryPath = require('jpegtran-bin'); } if (jpegTranBinaryPath) { cb(null, jpegTranBinaryPath); } else { cb( new Error( 'No jpegtran binary in PATH and jpegtran-bin does not provide a pre-built binary for your architecture' ) ); } }); }); JpegTran.prototype._error = function (err) { if (!this.hasEnded) { this.hasEnded = true; this.cleanUp(); this.emit('error', err); } }; JpegTran.prototype.write = function (chunk) { if (this.hasEnded) { return; } if (this.jpegTranProcess) { this.jpegTranProcess.stdin.write(chunk); } else { if (!this.bufferedChunks) { this.bufferedChunks = []; JpegTran.getBinaryPath((err, jpegTranBinaryPath) => { if (this.hasEnded) { return; } if (err) { return this._error(err); } this.commandLine = jpegTranBinaryPath + (this.jpegTranArgs ? ` ${this.jpegTranArgs.join(' ')}` : ''); // For debugging this.jpegTranProcess = childProcess.spawn( jpegTranBinaryPath, this.jpegTranArgs, { windowsHide: true } ); this.seenDataOnStdout = false; this.jpegTranProcess.on('error', this._error.bind(this)); // The child process might close its STDIN prematurely and emit EPIPE when the next chunk is written. // That's not necessarily an error, so prevent it from causing an exception: this.jpegTranProcess.stdin.on('error', () => {}); this.jpegTranProcess.on('exit', (exitCode) => { if (exitCode > 0 && !this.hasEnded) { this._error( new Error( `The jpegtran process exited with a non-zero exit code: ${exitCode}` ) ); this.hasEnded = true; } }); this.jpegTranProcess.stdout .on('data', (chunk) => { this.seenDataOnStdout = true; this.emit('data', chunk); }) .on('end', () => { this.jpegTranProcess = null; if (!this.hasEnded) { if (this.seenDataOnStdout) { this.emit('end'); } else { this._error( new Error( 'JpegTran: The stdout stream ended without emitting any data' ) ); } this.hasEnded = true; } }); if (this.isPaused) { this.jpegTranProcess.stdout.pause(); } this.bufferedChunks.forEach(function (chunk) { if (chunk === null) { this.jpegTranProcess.stdin.end(); } else { this.jpegTranProcess.stdin.write(chunk); } }, this); this.bufferedChunks = null; }); } this.bufferedChunks.push(chunk); } }; JpegTran.prototype.cleanUp = function () { if (this.jpegTranProcess) { this.jpegTranProcess.kill(); this.jpegTranProcess = null; } this.bufferedChunks = null; }; JpegTran.prototype.destroy = function () { if (!this.hasEnded) { this.hasEnded = true; this.cleanUp(); this.bufferedChunks = null; } }; JpegTran.prototype.end = function (chunk) { if (chunk) { this.write(chunk); } if (this.jpegTranProcess) { this.jpegTranProcess.stdin.end(); } else { if (this.bufferedChunks) { this.bufferedChunks.push(null); } else { // .end called without an argument and with no preceeding .write calls. Make sure that we do create a process in that case: this.write(Buffer.alloc(0)); } } }; JpegTran.prototype.pause = function () { if (this.jpegTranProcess) { this.jpegTranProcess.stdout.pause(); } this.isPaused = true; }; JpegTran.prototype.resume = function () { if (this.jpegTranProcess) { this.jpegTranProcess.stdout.resume(); } this.isPaused = false; }; module.exports = JpegTran;
import { black, white, blue, grey } from './colors'; import { primaryFont } from './typography'; export const theme = { primaryColor: white[100], secondaryColor: blue[200], textColor: black[100], white: white[100], black: black[100], headingColor: blue[300], buttonColor: blue[100], cardHeadingBackground: grey[100], cardBorder: grey[200], linkColor: grey[300], primaryFont, };
/** * @author dooseong, eom */ /** @class editor.html Page의 Controller * @auther EnterKey * @version 1 * @constructor 뷰 import후 생성 * @description View를 import하고 init 하기 위한 클래스 */ var EditorAppController = Class.extend({ editorAppMainContentView: null, editorAppSideContentView : null, init: function() { this.editorAppMainContentView = new EditorAppMainContentView(); this.editorAppSideContentView = new EditorAppSideContentView(); } }); /** @class editor.html Page의 Editor와 Preview 관련 뷰 클래스 * @auther EnterKey * @version 1 * @description Page의 Editor와 Preview Division을 제어하기 위한 클래스 */ var EditorAppMainContentView = Class.extend({ _cacheElement : { writingDocumentTitle : $('#writing_title'), writingDocumentCategory : $('#writing_category'), titleOfToggleModal : $('#modal-title'), categoryOfToggleModal : $('#modal-category'), editorDiv : $('#editor'), prevviewDiv : $('#preview'), modalForChangeDocumentTitle : $('#modal-edit-writing'), previewNewTab : 'div.previewTabs ul li', addPreviewBtn : $('button#add-preview-btn'), previewTabHeight : '550px' }, init : function() { this.setEventListener(); this.setEditor(); this.initReviewTab(); this.loadDocument(); }, setEditor : function() { var editor = new Editor(); }, setEventListener : function() { this.toggleModalForChangeDocumentTitle(); this.changeDocumentTitle(); this.saveDocumentContent(); this.toggleReviewDivision(); this.addNewPreviewTab(); }, toggleModalForChangeDocumentTitle : function() { var self = this; $(this._cacheElement.writingDocumentTitle).on('click', function() { var documentTitle = self._cacheElement.writingDocumentTitle.text(); self._cacheElement.titleOfToggleModal.val(documentTitle); self._cacheElement.modalForChangeDocumentTitle.modal('toggle'); }); }, changeDocumentTitle : function() { var self = this; $('#btn-done').on('click', function() { var title = self._cacheElement.titleOfToggleModal.val(); var category = self._cacheElement.categoryOfToggleModal.val(); self._cacheElement.writingDocumentTitle.html(title); self._cacheElement.writingDocumentCategory.html(category); }); }, saveDocumentContent : function() { var self = this; var postData = { docsInfo: { filename: null, category: null, bookmarks: [], content : null } }; $('#save_writing_button').on('click', function(){ var editorIframe = $('#cke_1_contents iframe')[0]; if(editorIframe){ var editorContent = editorIframe.contentWindow.document.body.innerHTML; postData.docsInfo.filename = self._cacheElement.writingDocumentTitle.html(); postData.docsInfo.category = self._cacheElement.writingDocumentCategory.html(); postData.docsInfo.content = editorContent; if(self._cacheElement.editorDiv.data('state')=='edit'){ $.post("/ajax/document/update", postData, self.ajaxSaveHandler); }else{ $.post("/ajax/document/insert", postData, self.ajaxSaveHandler); } } }); }, ajaxSaveHandler : function(result) { console.log(result); if(result.status){ alert("Success"); }else{ alert(result.errorMsg); } }, setLoadData : function(data){ var self = this; self._cacheElement.writingDocumentTitle.html(data.filename); self._cacheElement.writingDocumentCategory.html(data.category); CKEDITOR.instances.editor1.setData(data.content); }, loadDocument : function(){ var self = this; if(self._cacheElement.editorDiv.data('state') == 'edit'){ var postData = { docsInfo: { filename: self._cacheElement.editorDiv.data('filename') } }; $.post("/ajax/document/get_content", postData, function(result){ if(result.status){ self.setLoadData(result.data); }else{ alert(result.errorMsg); } }); } }, toggleReviewDivision : function() { var self = this; $('#toggle_preview_btn').on('click', function() { var isReviewActive = $("input:checkbox[id='toggle_preview']").is(":checked"); if(isReviewActive) { self._cacheElement.editorDiv.removeClass('col-sm-6').addClass('col-sm-12'); self._cacheElement.prevviewDiv.removeClass('col-sm-6').addClass('col-sm-12'); self._cacheElement.prevviewDiv.hide(); } else { self._cacheElement.editorDiv.removeClass('col-sm-12').addClass('col-sm-6'); self._cacheElement.prevviewDiv.removeClass('col-sm-12').addClass('col-sm-6'); self._cacheElement.prevviewDiv.show(); } }); }, initReviewTab : function() { $("#tabs").tabs(); $('#tabs').height(this._cacheElement.previewTabHeight); }, addNewPreviewTab : function() { var self = this; self._cacheElement.addPreviewBtn.click(function() { var tabsCnt = $(self._cacheElement.previewNewTab).length + 1; $("div.previewTabs ul").append( "<li><a href='#tab" + tabsCnt + "'>#" + tabsCnt + "</a></li>" ); $("div.previewTabs").append( "<div id='tab" + tabsCnt + "'>#" + tabsCnt + "</div>" ); $("div.previewTabs").tabs("refresh"); }); } }); /** @class editor.html Page의 좌측 side menu 관련 뷰 클래스 * @auther EnterKey * @version 1 * @description Page의 side menu를 제어하기 위한 클래스 */ var EditorAppSideContentView = Class.extend({ init : function() { this.setEventListener(); }, setEventListener : function() { this.toggleSideMenu(); }, toggleSideMenu : function() { var $body = $('body')[0], $menu_trigger = $('.menu-trigger'), common = new Common(); if (common.isUsableElement($menu_trigger)) { $menu_trigger.on('click', function() { $body.className = ( $body.className == 'menu-active' )? '' : 'menu-active'; }); } } }); /** @class editor.html editor 클래스 * @auther EnterKey * @version 1 * @description 글 쓰기 Editor 클래스 */ var Editor = Class.extend({ init : function() { CKEDITOR.replace('editor1', { height : '500px' }); } }); /** @class editor.html Preview Division에 보여지는 Bookmark의 info 클래스 * @auther EnterKey * @version 1 * @description Preview Division에 보여지는 Bookmark의 info 클래스 */ var BookmarkInfo = Class.extend({ init : function() { } }); var editorAppController = new EditorAppController();
import React, { Component } from 'react'; import { Text, View, Image, StyleSheet, Button } from 'react-native'; import { TouchableHighlight } from 'react-native-gesture-handler'; export default class AboutScreen extends Component { render(){ return ( <View style={styles.postContainer}> <Text style={styles.bigTitle}> LINGUEETUP </Text> <Image style={{ width: 300, height: 300, borderRadius: 25 }} source={require('../assets/images/Family.png')} /> <Text style={styles.titleAbout}>Our Mission</Text> <Text> We help parents connect with bilingual families in the area to create an language immersive experience for kids.</Text> <Text style={styles.titleAbout}>Our Inspiration</Text> <Text>As a bilingual family, committed to teaching spanish to our 1.5 year old daughter, Sydney, we find that playing is the most effective learning method at this young age. We are looking to connect with other families that share the same goal of creating a fun playdate environment where only a second language is spoken. </Text> </View> ); } } const styles = StyleSheet.create({ bigTitle: { fontSize: 30 }, picscontainer: { width: 100, height: 100 }, titleAbout: { fontSize: 20 }, postContainer: { flex: 1, padding: 10, borderBottomColor: '#dadada', borderBottomWidth: 1, alignItems: 'center' }, container: { flex: 1, flexDirection: 'row', alignItems: 'center' }, username: { fontSize: 18, fontWeight: 'bold', }, dateUserContainer: { marginLeft: 3 }, eventTitle: { fontSize: 20 }, eventDetails: { padding: 5, fontSize: 10 } })
import { GET_POSTS, GET_POST, POST_ERROR, UPDATE_LIKES, DELETE_POST, ADD_POST, ADD_COMMENT, REMOVE_COMMENT } from "./types"; import axios from 'axios' import { setAlert } from './alert' //get posts export const getPosts = () => async dispatch =>{ try { const res = await axios.get('/api/posts') dispatch({ type: GET_POSTS, payload: res.data }) } catch (err) { if (err.response) { dispatch({ type: POST_ERROR, payload:{msg:err.response.statusText, status: err.response.status} }) } else { dispatch({ type: POST_ERROR, payload:{msg: err.message, status:'check the action code'} }) } } } //ADD Like export const addLike = (id) => async dispatch => { try { const res = await axios.put(`/api/posts/like/${id}`); dispatch({ type: UPDATE_LIKES, payload:{ id, likes:res.data} }) } catch (err) { if (err.response) { dispatch({ type: POST_ERROR, payload:{msg:err.response.statusText, status: err.response.status} }) } else { dispatch({ type: POST_ERROR, payload:{msg:err.message, status:'Just Check the action code for error'} }) } } } //unlike post export const removeLike = (id) => async dispatch => { try { const res = await axios.put(`/api/posts/unlike/${id}`) dispatch({ type: UPDATE_LIKES, payload:{ id, likes:res.data} }) } catch (err) { if (err.response) { dispatch({ type: POST_ERROR, payload:{msg:err.response.statusText, status: err.response.status} }) } else { dispatch({ type: POST_ERROR, payload:{msg:err.message, status:'Just Check the action code for error'} }) } } } //DELETE POST export const deletePost = id => async dispatch => { try { await axios.delete(`/api/posts/${id}`) dispatch({ type: DELETE_POST, payload:id }) dispatch(setAlert('post removed', 'success')) } catch (err) { if (err.response) { dispatch({ type: POST_ERROR, payload:{msg:err.response.statusText, status: err.response.status} }) } else { dispatch({ type: POST_ERROR, payload:{msg:err.message, status:'Just Check the action code for error'} }) } } } // ADD Post export const addPost = (text) => async dispatch => { try { const config = { headers: { 'content-type':'application/json' } } const res=await axios.post('/api/posts', text, config) dispatch({ type: ADD_POST, payload: res.data }) dispatch(setAlert("Post is Created", 'success')) } catch (err) { if (err.response) { dispatch({ type: POST_ERROR, payload:{msg:err.response.statusText, status: err.response.status} }) } else { dispatch({ type: POST_ERROR, payload:{msg:err.message, status:'Just Check the action code for error'} }) } } } export const getPost = id => async dispatch => { try { const res = await axios.get(`/api/posts/${id}`); dispatch({ type: GET_POST, payload: res.data }) } catch (err) { if (err.response) { dispatch({ type: POST_ERROR, payload:{msg:err.response.statusText, status: err.response.status} }) } else { dispatch({ type: POST_ERROR, payload:{msg:err.message, status:'Just Check the action code for error'} }) } } } //ADD COMMENT export const addComment = (formData, postId) => async dispatch => { try { const config = { header: { 'content-type': 'application/json' } } const res = await axios.put(`/api/posts/comment/${postId}`,formData, config) dispatch({ type: ADD_COMMENT, payload: res.data }) } catch (err){ if (err.response) { dispatch({ type: POST_ERROR, payload:{msg:err.response.statusText, status: err.response.status} }) } else { dispatch({ type: POST_ERROR, payload:{msg:err.message, status:'Just Check the action code for error'} }) } } } //DELETE COMMENT export const deleteComment = ( postId, commentId ) => async dispatch => { try { const res = await axios.delete(`/api/posts/comment/${postId}/${commentId}`) dispatch({ type: REMOVE_COMMENT, payload: res.data }) } catch(err) { if (err.response) { dispatch({ type: POST_ERROR, payload:{msg:err.response.statusText, status: err.response.status} }) } else { dispatch({ type: POST_ERROR, payload:{msg:err.message, status:'Just Check the action code for error'} }) } } }
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Oauth = void 0; class Oauth { constructor(ioauth) { this.oauth = ioauth; } signup(data) { return this.oauth.signup(data); } checkifexist(id) { return this.oauth.checkifexist(id); } } exports.Oauth = Oauth;
const path = require(`path`) const queryAll = require(`./gatsby/queryAll.js`) const { makeArtistPath, makeRecordPath, makeReviewPath, } = require(`./src/utils`) exports.createPages = async ({ actions, graphql }) => { const { data } = await graphql(queryAll) data.vb.allArtists.forEach(artist => { actions.createPage({ path: makeArtistPath(artist), component: path.resolve(`./src/templates/artist-detail.js`), context: { artistID: artist.id, }, }) }) data.vb.allRecords.forEach(record => { actions.createPage({ path: makeRecordPath(record), component: path.resolve(`./src/templates/record-detail.js`), context: { recordID: record.id, }, }) }) data.vb.allReviews.forEach(review => { actions.createPage({ path: makeReviewPath(review), component: path.resolve(`./src/templates/review-detail.js`), context: { reviewID: review.id, }, }) }) }
import Phaser from 'phaser'; export default class Dialogue extends Phaser.Scene { constructor(selfScene, title, content, nextScene) { super(selfScene); this.selfScene = selfScene; this.title = title; this.content = content; this.nextScene = nextScene; this.AlertDialog = null; } preload() { this.load.scenePlugin({ key: 'rexuiplugin', url: 'https://raw.githubusercontent.com/rexrainbow/phaser3-rex-notes/master/dist/rexuiplugin.min.js', sceneKey: 'rexUI', }); } create() { const selfScene = this; this.Alert(selfScene, this.title, this.content) .then(() => this.scene.start(this.nextScene)); } CreateAlertDialog(scene) { this.dialog = scene.rexUI.add.dialog({ width: 300, background: scene.rexUI.add.roundRectangle(50, 50, 100, 100, 20, 0x264653), title: scene.rexUI.add.label({ background: scene.rexUI.add.roundRectangle(0, 0, 0, 0, 20, 0x2a9d8f), text: scene.add.text(200, 200, '', { fontSize: '22px', }), align: 'center', }), content: scene.add.text(0, 0, '', { fontSize: '20px', align: 'center', }), actions: [ scene.rexUI.add.label({ background: scene.rexUI.add.roundRectangle(0, 0, 0, 0, 20, 0xf4a261), text: scene.add.text(0, 0, 'OK', { fontSize: '24px', }), space: { left: 10, right: 10, top: 10, bottom: 10, }, align: { actions: 'center', }, }), ], space: { title: 25, content: 25, action: 15, left: 20, right: 20, top: 20, bottom: 20, }, align: { actions: 'center', }, expand: { content: false, }, }) .on('button.over', (button) => { button.getElement('background').setStrokeStyle(1, 0xffffff); }) .on('button.out', (button) => { button.getElement('background').setStrokeStyle(); }); return this.dialog; } SetAlertDialog(dialog, title, content) { if (title === undefined) { title = ''; } if (content === undefined) { content = ''; } this.dialog.getElement('title').text = title; this.dialog.getElement('content').text = content; return this.dialog; } Alert(scene, title, content, x, y) { if (x === undefined) { x = 400; } if (y === undefined) { y = 300; } if (!this.Alert.dialog) { this.AlertDialog = this.CreateAlertDialog(scene); } this.SetAlertDialog(this.AlertDialog, title, content); this.AlertDialog .setPosition(x, y) .setVisible(true) .layout(); return this.AlertDialog .moveFromPromise(1000, undefined, '-=400', 'Bounce') .then(() => scene.rexUI.waitEvent(this.AlertDialog, 'button.click')) .then(() => this.AlertDialog.moveToPromise(1000, undefined, '-=400', 'Back')) .then(() => { this.AlertDialog.setVisible(false); return Promise.resolve(); }); } }
import axios from 'axios' import { CREATE_PRODUCT_FAIL, CREATE_PRODUCT_REQUEST, CREATE_PRODUCT_SUCCESS, CREATE_REVIEW_FAIL, CREATE_REVIEW_REQUEST, CREATE_REVIEW_SUCCESS, DELETE_REVIEW_FAIL, DELETE_REVIEW_REQUEST, DELETE_REVIEW_SUCCESS, GET_PRODUCTS_FAIL, GET_PRODUCTS_REQUEST, GET_PRODUCTS_SUCCESS, SINGLE_PRODUCT_FAIL, SINGLE_PRODUCT_REQUEST, SINGLE_PRODUCT_SUCCESS } from './constants' export const allProducts = (keyword = '', pageNumber = '') => async (dispatch) => { try { dispatch({ type: GET_PRODUCTS_REQUEST }) const { data } = await axios.get(`/api/products?keyword=${keyword}&pageNumber=${pageNumber}`) dispatch({ type: GET_PRODUCTS_SUCCESS, payload: data }) } catch (error) { dispatch({ type: GET_PRODUCTS_FAIL, payload: error.response && error.response.data.msg ? error.response.data.msg : error.msg, }) } } export const singleProduct = (id) => async (dispatch) => { try { dispatch({ type: SINGLE_PRODUCT_REQUEST }) const { data } = await axios.get(`/api/products/${id}`) dispatch({ type: SINGLE_PRODUCT_SUCCESS, payload: data }) } catch (error) { dispatch({ type: SINGLE_PRODUCT_FAIL, payload: error.response && error.response.data.msg ? error.response.data.msg : error.msg, }) } } export const addProduct = (datas) => async (dispatch, getState) => { try { dispatch({ type: CREATE_PRODUCT_REQUEST }) const { userLogin: { userInfo } } = getState() const config = { headers: { 'Content-Type': 'application/json', jwtToken: userInfo.token } } await axios.post('/api/products', datas, config) dispatch({ type: CREATE_PRODUCT_SUCCESS }) } catch (error) { dispatch({ type: CREATE_PRODUCT_FAIL, payload: error.response && error.response.data.msg ? error.response.data.msg : error.msg, }) } } export const addReview = (id, datas) => async (dispatch, getState) => { try { dispatch({ type: CREATE_REVIEW_REQUEST }) const { userLogin: { userInfo } } = getState() const config = { headers: { 'Content-Type': 'application/json', jwtToken: userInfo.token } } await axios.post(`/api/products/${id}/reviews`, datas, config) dispatch({ type: CREATE_REVIEW_SUCCESS }) } catch (error) { dispatch({ type: CREATE_REVIEW_FAIL, payload: error.response && error.response.data.msg ? error.response.data.msg : error.msg, }) } } export const removeReview = (productId, reviewId) => async (dispatch, getState) => { try { dispatch({ type: DELETE_REVIEW_REQUEST }) const { userLogin: { userInfo } } = getState() const config = { headers: { jwtToken: userInfo.token } } await axios.delete(`/api/products/${productId}/${reviewId}/reviews`, config) dispatch({ type: DELETE_REVIEW_SUCCESS }) } catch (error) { dispatch({ type: DELETE_REVIEW_FAIL, payload: error.response && error.response.data.msg ? error.response.data.msg : error.msg, }) } }
var assert = require('chai').assert; var rules = require('../src/rules_functions.js'); describe('isDateTime rule on a number', () => { it('should return false for 0 with a rule of yyyy-mm-dd hh:mm:ss', () => { var result = rules.isDateTime(0, {datetime: 'yyyy-mm-dd hh:mm:ss'}); assert.equal(result, false); }); it('should return true for 0 and datetime:false', () => { var result = rules.isDateTime(0, {datetime: false}); assert.equal(result, true); }); }); describe('Should pass isDateTime rule', () => { it('is 2010-10-01 03:11:02 with a rule of true', () => { var result = rules.isDateTime('2010-10-01 03:11:02', {datetime: true}); assert.equal(result, true); }); it('is 2010-10-01 03:11:02 with a rule of yyyy-mm-dd hh:mm:ss', () => { var result = rules.isDateTime('2010-10-01 03:11:02', {datetime: 'yyyy-mm-dd hh:mm:ss'}); assert.equal(result, true); }); it('is 10/01/1987 02:10:00 with a rule of mm/dd/yyyy hh:mm:ss', () => { var result = rules.isDateTime('10/01/1987 02:10:00', {datetime: 'mm/dd/yyyy hh:mm:ss'}); assert.equal(result, true); }); it('is 10/01/87 02:10:00 with a rule of mm/dd/yy hh:mm:ss', () => { var result = rules.isDateTime('10/01/87 02:10:00', {datetime: 'mm/dd/yy hh:mm:ss'}); assert.equal(result, true); }); it('is 2010-10-01 03:11:02 with a rule of yyyy-mm-dd hh:mm:ss', () => { var result = rules.isDateTime('2010-10-01 03:11:02', {datetime: 'yyyy-mm-dd hh:mm:ss'}); assert.equal(result, true); }); }); describe('Should fail isDateTime rule', () => { it('is 2010-10-01 with a rule of yyyy-mm-dd hh:mm:ss', () => { var result = rules.isDateTime('2010-10-01', {datetime: 'yyyy-mm-dd hh:mm:ss'}); assert.equal(result, false); }); it('is 10/01/1987 with a rule of mm/dd/yyyy', () => { var result = rules.isDateTime('10/01/1987', {datetime: 'mm/dd/yyyy'}); assert.equal(result, false); }); it('is 10/01/87 with a rule of mm/dd/yy', () => { var result = rules.isDateTime('10/01/87', {datetime: 'mm/dd/yy'}); assert.equal(result, false); }); it('is a date object with a rule of yyyy-mm-dd hh:mm:ss', () => { var result = rules.isDateTime(new Date(), {datetime: 'yyyy-mm-dd hh:mm:ss'}); assert.equal(result, false); }); it('is 2010-10-01 with a rule of mm/dd/yyyy', () => { var result = rules.isDateTime('2010-10-01', {datetime: 'mm/dd/yyyy'}); assert.equal(result, false); }); });
import React from 'react'; import { gql } from 'apollo-boost'; import { useQuery } from '@apollo/react-hooks'; const New = () => { const {data, loading, error } = useQuery(gql` { books{ name, id }, authors{ name, id } } `); console.log(data); // debugger; if(loading) return (<p>Loading...</p>); if (error) return (<p>An error occurred</p>); // const merge = [...data.books, ...data.authors]; return data.authors.map(elem => ( <li key={elem.id}>{elem.name}</li> )); }; export default New;
import { useState } from "react" import { TextField, Typography } from "@material-ui/core" import { useDispatch } from "react-redux" import ImageUploader from '../../ImageComponents/ImageUploader' import { Button } from '@material-ui/core' function MissionHistoryMultiRow(props) { const dispatch = useDispatch(); const [organization, setOrganization] = useState('') const [location, setLocation] = useState('') const [referenceName, setReferenceName] = useState('') const [referencePhone, setReferencePhone] = useState('') const [referenceEmail, setReferenceEmail] = useState('') const [startDate, setStartDate] = useState('') const [endDate, setEndDate] = useState('') const [hasBeenSubmitted, setHasBeenSubmitted] = useState(false) const [missionImageKey, setMissionImageKey] = useState('') // submit function for a mission history item, validates forms, sends dispatch function submitMissionHistoryItem(event) { event.preventDefault(); if (organization === '' || location === '' || referenceName === '' || referencePhone === '' || referenceEmail === '' || startDate === '' || endDate === '') { return alert('Please complete all required fields') } setHasBeenSubmitted(true) dispatch({ type: 'ADD_MISSION_HISTORY_ITEM', payload: { organization: organization, location: location, referenceName: referenceName, referencePhone: referencePhone, startDate: startDate, endDate: endDate, missionExperienceImageKey: missionImageKey } }) // adds a mission history item to the array in parent component, rendering a new copy of this component props.addMissionHistoryItem() } // attaches aws image key to form row function handleImageAttach(awsKey) { setMissionImageKey(awsKey) } function handleChange(e) { switch (e.target.id) { case 'organizationInput': setOrganization(e.target.value) break case 'locationInput': setLocation(e.target.value) break case 'referenceNameInput': setReferenceName(e.target.value) break case 'referencePhoneInput': setReferencePhone(e.target.value) break case 'referenceEmailInput': setReferenceEmail(e.target.value) break case 'startDateInput': setStartDate(e.target.value) break case 'endDateInput': setEndDate(e.target.value) break } } // passed to image uploader, not used at this time const imageType = 'mission' return ( <div className="general-form-display"> {hasBeenSubmitted ? ( <Typography variant="body1">Submitted!</Typography> ) : ( <form onSubmit={submitMissionHistoryItem}> <div className="text-field-wrapper"> {/* <label htmlFor="organtizationInput">Organization</label> */} <TextField required label="Organization" variant="outlined" id="organizationInput" value={organization} onChange={handleChange} /> </div> <div className="text-field-wrapper"> {/* <label htmlFor="locationInput">Location</label> */} <TextField required label="Location" variant="outlined" id="locationInput" value={location} onChange={handleChange} /> </div> <div className="text-field-wrapper"> {/* <label htmlFor="referenceNameInput">Reference Name</label> */} <TextField required label="Reference Name" variant="outlined" id="referenceNameInput" value={referenceName} onChange={handleChange} /> </div> <div className="text-field-wrapper"> {/* <label htmlFor="referencePhoneInput">Reference Phone #</label> */} <TextField required label="Reference's Phone #" variant="outlined" id="referencePhoneInput" value={referencePhone} onChange={handleChange} /> </div> <div className="text-field-wrapper"> {/* <label htmlFor="referenceEmailInput">Reference Email Address</label> */} <TextField required label="Reference's Email" variant="outlined" id="referenceEmailInput" value={referenceEmail} onChange={handleChange} /> </div> <div className="text-field-wrapper"> {/* <label htmlFor="startDateInput">Start Date</label> */} <TextField required variant="outlined" type="date" label="Start Date" InputLabelProps={{ shrink: true }} id="startDateInput" value={startDate} onChange={handleChange} /> </div> <div className="text-field-wrapper"> {/* <label htmlFor="endDateInput">End Date</label> */} <TextField required variant="outlined" type="date" label="End Date" InputLabelProps={{ shrink: true }} id="endDateInput" value={endDate} onChange={handleChange} /> </div> <br></br> <br></br> <Typography className="registration-title" variant="body1">Mission Completion Certificate</Typography> <br></br> <ImageUploader imageType={imageType} attachImageFunction={handleImageAttach} /> <div className="text-field-wrapper"> <Button variant="contained" color="secondary" type="submit">Add Mission History Entry+</Button> </div> </form> )} </div> ) } export default MissionHistoryMultiRow
// return the nested property value if it exists, // otherwise return undefined Object.prototype.hash = function(string) { var components = string.split('.'); if (components.length == 0) return null; var currentObj = this[components[0]]; for (var i = 1; i < components.length; i++) { if (currentObj == undefined) return null; currentObj = currentObj[components[i]]; } return currentObj; }
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ angular.module('appAnalist').controller('anaListFinController',function($scope,$http,NgTableParams,$modal){ function getData(){ $http({ url:"php/analista/getFinanciados.php", method:"POST", data:JSON.stringify({'user':sessionStorage.userId}) }).then(function(answer){ var data = answer.data; $scope.paramsTable = new NgTableParams({ },{ dataset:data }); }); } //Inicializa getData(); //Botão para descarregar todos os documentos para o ambiente de trabalho $scope.descarregarContrato = function(lead){ $http({ url:'php/analista/getContratos.php', method:'POST', data:lead }).then(function(answer){ if(answer.data==''){ alert("Este processo não tem contratos!"); } else { answer.data.forEach(function(ln){ if(ln.tipo=='pdf'){ download("data:application/pdf;base64,"+ln.fx64,ln.nomefx); } else { alert("Este ficheiro não está no formato correto. Entre em contacto com o suporte!"); } }); } }); }; //Botão para alterar para Aprovado e depois alterar para ACP $scope.undoFinanciado = function(lead){ if(confirm("Vai alterar o status para Aprovado. Isto só deverá ser usado para depois alterar para ACP!")){ $http({ url:'php/analista/updateStatusAnalista.php', method:'POST', data:JSON.stringify({'lead':lead, 'status':16, 'financiamento':'ACP'}) }).then(function(answer){ console.log(answer.data); window.location.replace("#!/dashboard"); }) } } //Botão para Anexar Contrato $scope.upContrato = function(lead){ //open modal to attach documentation var modalInstance = $modal.open({ templateUrl: 'modalAnexarContrato.html', controller: 'modalInstanceAnexarContrato', size: 'lg', resolve: {items: function () { return lead; } } }); modalInstance.result.then(function(){ getData(); }); }; }); /** * Modal instance to attach Contrato */ angular.module('appAnalist').controller('modalInstanceAnexarContrato', function($scope,$http,$modalInstance,items){ $scope.lead = items; $scope.novonome =""; $scope.saveAttachedDoc = function(){ if($scope.file){ //se for contrato var parm = {}; parm.lead = $scope.lead; parm.file = $scope.file; parm.novonome = $scope.novonome; $http({ url:'php/analista/attachContrato.php', method:'POST', data:JSON.stringify(parm) }).then(function(answer){ $modalInstance.close(); }); } }; $scope.closeModal = function(){ $modalInstance.dismiss('Cancel'); }; });
import React, { Component } from 'react' import "./App.css" export class Task extends Component { constructor(props) { super(props); this.state = { done: false, }; } checkoff = () => { this.setState({done: true}) } render() { return ( <div className="Task"> {!this.state.done && <h2 className="TaskText">{this.props.taskName}</h2>} {!this.state.done && <button className="TaskButton" onClick={this.checkoff}>Check!</button>} </div> ) } } export default Task
module.exports = { moduleNameMapper: { '^.+\\.(css)$': '<rootDir>/config/CSSStub.js', }, setupTestFrameworkScriptFile: './src/tests/jestSetup.js', snapshotSerializers: ['enzyme-to-json/serializer'], };
import styles from '../styles/Home.module.css' import 'bootstrap/dist/css/bootstrap.min.css'; export function TituloBlog() { return ( <div className={styles['titulo-blog']}> <div className={styles["titulo-blog--nome"]}> Seu nome </div> <div className={styles["titulo_blog--descricao"]}> Coloque aqui sua biografia de forma resumida.Coloque aqui sua biografia de forma resumida. Coloque aqui sua biografia de forma resumida.Coloque aqui sua biografia de forma resumida. Coloque aqui sua biografia de forma resumida.Coloque aqui sua biografia de forma resumida. </div> </div> ) }
class addCountries { static addContries(data,svg,projection){ let path = d3.geoPath().projection(projection); svg.selectAll("path") .data(data) .enter().append("path") .attr("d", path) // .on("mouseover",function(d) { // //console.log("just had a mouseover", d3.select(d)); // d3.select(this) // .classed("active",true) // }) // .on("mouseout",function(d){ // d3.select(this) // .classed("active",false) // }) ; } }
// 1 function openbox() { let display = document.getElementById("block_text").style.display; let btn = document.getElementById("btn").innerHTML; if (display == "none") { document.getElementById("block_text").style.display = "block"; document.getElementById("btn").innerHTML = "Закрыть"; } else { document.getElementById("block_text").style.display = "none"; document.getElementById("btn").innerHTML = "Больше"; } }; // 2 let car = { "mark": "BMW", "year": 2015, "color": "red" } car.country = "German"; car.price = 22000; delete car.year; delete car.price; console.log(car); // 3 function maxNumb() { let result = Math.max(5, 80, -44, 120, 60, -5, 206); alert(result); }
/* globals define */ 'use strict'; define([ 'lodash', '-/logger/index.js', '-/ext/graphql/lib/properties.js' ], ( _, logger, { REPOSITORY } ) => function getRepository(config, aggregate) { const repositoryName = _.get(aggregate, REPOSITORY); const repositoryPath = `repositories['${repositoryName}']`; const repository = _.get(config, repositoryPath); logger.debug('repositoryPath', { repositoryPath }); logger.debug('repository', { repository }); return repository; });
import {useState, useEffect} from 'react'; import {imageArray1, imageArray2} from "./imageArray.js" import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faFistRaised, faCaretSquareLeft, faCaretSquareRight } from '@fortawesome/free-solid-svg-icons'; import {faSpotify, faGithubSquare} from '@fortawesome/free-brands-svg-icons'; import './Carousel.css' function Carousel() { const [currentAudifyPic, setCurrentAudifyPic] = useState(0); const [currentKumitePic, setCurrentKumitePic] = useState(0); console.log(imageArray1); return ( <div className="carousel" > <div className="carousel-inner" style={{marginRight:"32vw"}} > <div className="carousel-inner-left"> <div className="carouselInfo">{imageArray1[currentAudifyPic].description}</div> </div> <div className="carousel-inner-right"> <div className="carouselPics" style={{backgroundImage:`url(${imageArray1[currentAudifyPic].image})`}}> <div className="left" ><FontAwesomeIcon className="arrow" icon={faCaretSquareLeft} onClick={(e)=>{ if(currentAudifyPic > 0){setCurrentAudifyPic(currentAudifyPic-1)} if(currentAudifyPic == 0){setCurrentAudifyPic(imageArray1.length-1)} // currentAudifyPic > 0 && setCurrentAudifyPic(currentAudifyPic-1) }}/> </div> <div className="center"> <h1 style={{position:"relative", top:"195px", right:"-150px", fontSize:"1.5em", width:"fit-content",color:"white", backgroundColor:"rgba(0,0,0,0.5)"}}>{imageArray1[currentAudifyPic].title}</h1> <p>{currentAudifyPic.description}</p> </div> <div className="right" ><FontAwesomeIcon className="arrow" icon={faCaretSquareRight} onClick={(e)=>{ if(currentAudifyPic < imageArray1.length-1){ setCurrentAudifyPic(currentAudifyPic+1)} if(currentAudifyPic === imageArray1.length-1){setCurrentAudifyPic(0)} // currentAudifyPic < imageArray1.length-1 && setCurrentAudifyPic(currentAudifyPic+1) }}/> </div> </div> </div> <div style={{display:"flex", flexFlow:"column", marginLeft:"10px" }}> <a href="https://github.com/dmontoya1600/spotify-clone" role="button" ><FontAwesomeIcon className="githubBtn" icon={faGithubSquare} /></a> <a href="https://audify-app.herokuapp.com/" role="button" ><FontAwesomeIcon className="liveBtn" icon={faSpotify}/></a> </div> </div> <div className="carousel-inner" style={{marginLeft:"32vw"}} > <div style={{display:"flex", flexFlow:"column", marginRight:"10px" }}> <a href="https://github.com/Arthgallow/kumite" role="button" ><FontAwesomeIcon className="githubBtn" icon={faGithubSquare} /></a> <a href="https://the-kumite.herokuapp.com/" role="button" ><FontAwesomeIcon className="liveBtn" style={{fontSize:"1.8em"}} icon={faFistRaised}/></a> </div> <div className="carousel-inner-right" > <div className="carouselPics" style={{backgroundImage:`url(${imageArray2[currentKumitePic].image})`}}> <div className="left" ><FontAwesomeIcon className="arrow" icon={faCaretSquareLeft} onClick={(e)=>{ if(currentKumitePic > 0){setCurrentKumitePic(currentKumitePic-1)} if(currentKumitePic == 0){setCurrentKumitePic(imageArray2.length-1)} }}/> </div> <div className="center"> <h1 style={{position:"relative", top:"195px", right:"-150px", fontSize:"1.5em", width:"fit-content"}}>{imageArray2[currentKumitePic].title}</h1> <p>{currentKumitePic.description}</p> </div> <div className="right" ><FontAwesomeIcon className="arrow" icon={faCaretSquareRight} onClick={(e)=>{ if(currentKumitePic < imageArray2.length-1){setCurrentKumitePic(currentKumitePic+1)} if(currentKumitePic == imageArray2.length-1){setCurrentKumitePic(0)} // currentKumitePic < imageArray2.length-1 && setCurrentKumitePic(currentKumitePic+1) }}/> </div> </div> </div> <div className="carousel-inner-left"> <div className="carouselInfo">{imageArray2[currentKumitePic].description}</div> </div> </div> </div> ) } export default Carousel
/** * * Анализ состава тела * */ import PropTypes from 'prop-types'; import React from 'react'; import BarChart from '@/components/BarChart'; import Header from './elements/Header'; import Label from './elements/Label'; import Row from './elements/Row'; const BodyCompositionAnalysis = ({ data }) => ( <div> <Header /> {data.map(({ label, values }) => ( <Row key={label}> <Label>{label}</Label> <BarChart values={values} /> </Row> ))} </div> ); BodyCompositionAnalysis.propTypes = { data: PropTypes.arrayOf( PropTypes.shape({ label: PropTypes.string.isRequired, values: PropTypes.shape({ max: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), min: PropTypes.oneOfType([PropTypes.number, PropTypes.string]), value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]) }).isRequired }) ).isRequired }; export default BodyCompositionAnalysis;
'use strict'; import React, {Component} from 'react'; import { View, FlatList, SafeAreaView, StatusBar, Image, Text,TouchableOpacity, StyleSheet,} from 'react-native'; import {DisplayText, SubmitButton} from '../../components'; import styles from './styles'; import colors from '../../assets/colors'; import { ProgressDialog } from 'react-native-simple-dialogs'; import { getRouteToken, getUserDetails, AllListofSupport } from '../Utils/Utils'; import moment from 'moment'; import DropdownAlert from 'react-native-dropdownalert'; import theme from '../../assets/theme'; export default class SurpportDesk extends Component { constructor(props) { super(props); this.state ={ token : '', showAlert : false, message : '', title : '', showAlert : false, showLoading : false, messageIssue : '', isValidIssue : false, userId : '', data : [], } } async componentDidMount(){ let userDetails = await getUserDetails(); const token = userDetails.token, userId = userDetails.data.id; this.setState({ token , userId, }); this.handleGetAllTicket() this.focusListener = await this.props.navigation.addListener('didFocus', () => { this.handleGetAllTicket(); }); } componentWillUnmount(){ this.focusListener.remove(); } // Show Loading Spinner showLoadingDialogue =()=> { this.setState({ showLoading: true, }); } // Hide Loading Spinner hideLoadingDialogue =()=> { this.setState({ showLoading: false, }); } showNotification = (type, title, message,) => { this.hideLoadingDialogue(); return this.dropDownAlertRef.alertWithType(type, title, message); } toggleDrawer = () => { //Props to open/close the drawer this.props.navigation.toggleDrawer(); }; handleCreateTicket = () => { return this.props.navigation.navigate('CreateIssue'); } handleGetAllTicket = async() => { this.showLoadingDialogue(); const{token, userId} = this.state; let endPoint = `${AllListofSupport}/${userId}/${"support"}`; await getRouteToken(endPoint, token) .then((res) => { if(typeof res.message !== 'undefined') { return this.showNotification('error', 'Message', res.message); } else { return this.setState({ showLoading : false, data : res.data, }); } }) .catch((error) => { return this.showNotification('error', 'Message', error.toString()); }); }; handleFlatlist = (item) => { return this.props.navigation.navigate('Message', { "id" : item.id, "status" : item.status, }); } renderFooter = () => { return <View style = {styles.FlatListFooter}> </View> } renderRow = ({item}) => { let { updated_at, status, subject } = item; let dates = moment(updated_at).format("MMMM Do YYYY h:mm:ss ") let id = item.id.toString() return ( <View style = {styles.profileDetails}> <TouchableOpacity onPress = {() => this.handleFlatlist(item)} style = {styles.cardView}> <Text onPress = {() => this.handleFlatlist(item)} style = {styles.textStyle}> {`#TICKETS: ${id}`} </Text> <DisplayText text= {`${subject.toString()}`} onPress = {() => this.handleFlatlist(item)} styles = {[styles.textStyleHeader, {fontStyle:'normal', color:theme.primaryColor}]} /> <View style = {{flexDirection: 'row', justifyContent : 'space-between'}}> <DisplayText text={dates.toString()} onPress = {() => this.handleFlatlist(item)} styles = {styles.dateStyle} /> <DisplayText text = {`${status.toString()}`} onPress = {() => this.handleFlatlist(item)} styles = {styles.textStatus} /> </View> </TouchableOpacity> </View> ); } render () { const { data, showLoading} = this.state; return( <SafeAreaView style={styles.container}> <StatusBar barStyle="default" /> <DropdownAlert ref={ref => this.dropDownAlertRef = ref} /> <View style = {styles.navBar}> <TouchableOpacity onPress={this.toggleDrawer} style = {styles.headerImage}> <Image onPress={this.toggleDrawer} source = {require('../../assets/images/menu.png')} style = {StyleSheet.flatten(styles.headerIcon)} /> </TouchableOpacity> <View style = {styles.nameView}> <DisplayText text={'Support Desk'} styles = {StyleSheet.flatten(styles.txtHeader)} /> </View> </View> <View style ={styles.supportViewBody}> <View style = {styles.inputView}> <DisplayText styles={StyleSheet.flatten(styles.textIssues)} text = {'Have an issue,'}/> <DisplayText styles={StyleSheet.flatten(styles.textIssues)} text = {'Create a ticket to talk to support'}/> </View> <View style = {styles.btnView}> <SubmitButton title={'Create Ticket'} onPress={this.handleCreateTicket} titleStyle={styles.btnText} btnStyle = {styles.btnStyle} /> <ProgressDialog visible={showLoading} title="Processing" message="Please wait..."/> </View> <View style = {{paddingTop : 16, paddingBottom : 80}} > <FlatList data={data} renderItem={this.renderRow} keyExtractor={ data=> data.id.toString()} ItemSeparatorComponent={this.renderSeparator} extraData={this.state} ListFooterComponent={this.renderFooter} showsVerticalScrollIndicator={false} /> </View> </View> </SafeAreaView> ) } }
var bcrypt = require('bcrypt-nodejs'); var bodyParser = require('body-parser'); var cookieSession = require('cookie-session'); var express = require('express'); var fs = require('fs'); var https = require('https'); var path = require('path'); var session = require('express-session'); var hashed_pass = '$2a$10$FgThzscoKU/coIZ/JYzHr.YgIdBImjmdopSChZ2u1xuZzoWlVuG4S'; var app = express(); var debug = true; function authenticate (req, res, next) { if (debug) console.log('Authentication check: '+req.session.auth); if (req.session.auth) { next(); } else { res.sendFile(path.resolve(__dirname+'/../html/auth.html')); } } app.use(bodyParser.urlencoded( {extended: false} )); app.use(session({ name: 'session', /* secret: require('crypto').randomBytes(64, function (ex, buf) { if (ex) throw ex; return buf }),*/ secret: 'asdweivxzdiq39wdkmfghjklkjgoiwjfawweriweiq', resave: false, saveUninitialized: true, cookie: { maxAge: 600000 } })); // Serve the robots app.get('/robots.txt', function (req, res) { res.sendFile(path.resolve(__dirname+'/../robots.txt')); }); if (debug) { app.use(function (req, res, next) { console.log('---'+req.originalUrl+'---'); //console.log(req.session); next(); }); } // Static routes for resources app.use('/expts', authenticate, express.static(path.join(__dirname, '/../expts'))); app.use('/js', authenticate, express.static(path.join(__dirname, '/../js'))); app.use('/css', authenticate, express.static(path.join(__dirname, '/../css'))); // Index page, check for authentication app.get('/', authenticate, function (req, res) { res.redirect('/experiment_viewer') }); app.post('*', function (req, res) { if (debug) console.log('post'); bcrypt.compare(req.body.password, hashed_pass, function (err, result) { if (result) { req.session.auth = true; if (debug) console.log('correct password!'); console.log(req.originalUrl); res.redirect(req.originalUrl); //res.redirect('/experiment_viewer'); } else { req.session.auth = false; if (debug) console.log('incorrect password!'); } } ); }); app.get('/experiment_viewer', authenticate, function (req, res) { res.sendFile(path.resolve(__dirname+'/../html/experiments.html')); }); app.get('/roi_viewer.html', authenticate, function (req, res) { res.sendFile(path.resolve(__dirname+'/../html/roi_viewer.html')); }); https.createServer({ key: fs.readFileSync(path.join(__dirname, 'key.pem')), cert: fs.readFileSync(path.join(__dirname, 'cert.pem')) }, app).listen(8081);
import isNumeric from '../src/is-numeric' isNumeric(3) //=> true isNumeric(Number(3)) //=> true isNumeric(new Number(3)) //=> true isNumeric('3') //=> true isNumeric('.6') //=> true isNumeric(NaN) //=> false isNumeric(Infinity) //=> false isNumeric(Number.POSITIVE_INFINITY) //=> false isNumeric(Number.NEGATIVE_INFINITY) //=> false isNumeric(Number.NaN) //=> false isNumeric(Number.EPSILON) //=> true isNumeric(Number.MAX_SAFE_INTEGER) //=> true isNumeric(Number.MIN_SAFE_INTEGER) //=> true isNumeric(Number.MIN_VALUE) //=> true isNumeric(Number.MAX_VALUE) //=> true
import Todo from './Todo.js'; import React , { useState } from 'react'; export default function TodoList({inputTodos}) { const[todos, setTodos] = useState(inputTodos); function getRandomTodo() { let randomIndex = Math.floor(Math.random() * todos.length); return todos[randomIndex]; } function addTodo() { setTodos(prev => [...prev,{ id : prev.length > 0 ? prev[prev.length - 1].id + 1 : 1, description : getRandomTodo().description, isDone: false }]); }; const removeTodo = todoId => { const updatedTodos = todos.filter(todo => todo.id !== todoId); setTodos(updatedTodos); } return ( <div> <button onClick={addTodo}>Add a todo</button> <ul>{todos.length !== 0 ? todos.map(todoItem => <Todo key={todoItem.id} id={todoItem.id} todo={todoItem} removeTodo={removeTodo} ></Todo> ) : "NO Items!"} </ul> </div> ) }
import { doGetRequest } from './requests'; import SERVICE_HTTP from '../../constants/serviceHttpAddress'; const GET_URL = `${SERVICE_HTTP}/mytaxi/vehicles`; const MyTaxiSource = { fetchTaxies: () => doGetRequest(GET_URL), }; export default MyTaxiSource;
import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import styles from './Confirm.less'; import { signUpConfirm } from '../redux/actions'; class Confirm extends Component { constructor(props) { super(props); this.state = { email: props.email, code: '', }; this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); } componentDidUpdate(prevProps) { if(prevProps.email !== this.props.email) { this.setState({ email: this.props.email }); } if(this.props.signUpConfirmed) { this.props.history.push('/'); } } handleChange(e) { this.setState({ [e.target.id]: e.target.value, }); } handleSubmit(e) { e.preventDefault(); const { signUpConfirm, password } = this.props; const { email, code } = this.state; signUpConfirm(email, code, password); } render() { return ( <div className={styles.confirm}> <h2>Please check your inbox and enter your confirmation code</h2> <form onSubmit={this.handleSubmit}> <div> <label> E-mail: </label> <input onChange={this.handleChange} type="text" id="email" value={this.state.email} /> </div> <div> <label> Code: </label> <input onChange={this.handleChange} type="text" id="code" value={this.state.code} /> </div> <button>Confirm</button> </form> </div> ); } } Confirm.propTypes = { signUpConfirm: PropTypes.func.isRequired, email: PropTypes.string, password: PropTypes.string, signUpConfirmed: PropTypes.bool, }; Confirm.defaultProps = { email: '', password: '', signUpConfirmed: false, } const mapStateToProps = state => ({ email: state.runtime.getIn(['currentUser', 'email']), password: state.runtime.getIn(['currentUser', 'password']), signUpConfirmed: state.runtime.getIn(['currentUser', 'signUpConfirmed']), }); export default connect(mapStateToProps, { signUpConfirm })(Confirm);
import { Roles } from 'meteor/alanning:roles'; import UserSettings from './UserSettings'; export default { userSettings: (parent, args, { user }) => { if (!user || !Roles.userIsInRole(user._id, 'admin')) { throw new Error('Sorry, you need to be an administrator to do this.'); } return UserSettings.find({}, { sort: { key: 1 } }).fetch(); }, };
var empresaModel = require('../models/empresaModel.js'); /** * empresaController.js * * @description :: Server-side logic for managing empresas. */ module.exports = { show: function (req, res) { var id = req.params.id; empresaModel.find({empresa: { $regex: id, $options: 'i' }}, function (err, empresa) { if (err) { return res.status(500).json({ message: 'Error when getting empresa.', error: err }); } if (!empresa) { return res.status(404).json({ message: 'No such empresa' }); } return res.json(empresa); }).limit(20); } };
module.exports = { name: 'prune', description: 'delete messages', execute(message, args) { const amount = parseInt(args[0]) + 1; if(isNaN(amount)) return message.channel.send('Provide a number'); if(amount<=1 || amount>100) return message.channel.send('provide a number between 1 and 99'); message.channel.bulkDelete(amount,true).catch(err => { console.error(err); message.channel.send('there was an error trying to prune messages in this channel.'); }); }, };
/* * productUpdatesTaskController.js * * Copyright (c) 2017 HEB * All rights reserved. * * This software is the confidential and proprietary information * of HEB. */ 'use strict'; /** * Component of eCommerce task summary. Used to fetch and display list of eCommerce task only. This component does not * show details of any particular task. * * @author vn40486 * @since 2.16.0 */ (function () { angular.module('productMaintenanceUiApp').controller('ProductUpdatesController',productUpdatesController); productUpdatesController.$inject = ['$rootScope', '$scope','ProductUpdatesTaskApi', 'ngTableParams', '$stateParams', 'ImageApi', 'DownloadService', 'urlBase', 'ProductSearchService', '$state', 'appConstants','productGroupApi', 'ECommerceViewApi', 'ProductSearchApi', '$filter', '$timeout', 'DownloadImageService']; function productUpdatesController($rootScope, $scope, productUpdatesTaskApi, ngTableParams, $stateParams, imageApi, downloadService, urlBase, productSearchService, $state, appConstants,productGroupApi, eCommerceViewApi, productSearchApi, $filter, $timeout, downloadImageService) { var self = this; /** * Denotes whether back end should fetch total counts or not. Accordingly server side will decide on executing * additional logic to fetch count information. * * @type {boolean} */ self.includeCounts = false; /** * The number of rows per page constant. * @type {int} */ self.DEFAULT_PAGE_SIZE = 25; /** * The number of rows per page constant when navigate to Home page. * @type {int} */ self.NAVIGATE_PAGE_SIZE = 100; /** * Tracks whether or not the user is waiting for a download. * * @type {boolean} */ self.downloading = false; /** * Max time to wait for excel download. * * @type {number} */ self.WAIT_TIME = 1200; /** * The total number of records in the report. * @type {int} */ self.totalRecordCount = null; /** * The parameters passed to the application from ng-tables getData method. These need to be stored * until all the data are fetched from the backend. * * @type {null} */ self.dataResolvingParams = null; /** * The promise given to the ng-tables getData method. It should be called after data is fetched. * * @type {null} */ self.defer = null; /** * The data being shown in the report. * @type {Array} */ $scope.data = null; /** * The message to display about the number of records viewing and total (eg. Result 1-100 of 130). * @type {String} */ self.resultMessage = null; /** * maintains state of data call. * @type {boolean} */ self.firstFetch = true; /** * Represents the currently selected work request referenced task. * @type {null} */ self.selectedWorkRequest = null; /** * Map of task type and description. * @type {{MYTSK: string}} */ self.alertTypes = [ {code:'PRUPD', desc:'Product Updates'}, {code:'PRRVW', desc:'Product Review'}, {code:'NWPRD', desc:'New Products'} ]; /** * default alert type to be used on initial page loading. * @type {{code: string, desc: string}} */ const DEFAULT_ALERT_TYPE = {code:'PRUPD', desc:'Product Updates'}; /** * This message will show when there is no any Update Reason options are select. * @type {string} */ const EMPTY_UPDATE_REASON = "Please select at least one Update Reason."; /** * This message will show when there is no any Show On Site options are select. * @type {string} */ const EMPTY_SHOW_ON_SITE = "Please select at least one Show On Site."; /** * This message will show when there is no any Sales Channel options are select. * @type {string} */ const EMPTY_SALES_CHANNEL_FILTER_MESSAGE = "Please select at least one Sales Channel."; /** * Presently selected alert type. * @type {{code: string, desc: string}} */ self.alertType = DEFAULT_ALERT_TYPE; /** * Code table of update reasons filter option. * @type {[*]} */ self.updateReasons = [ {code:'1664', desc:'Display name', checked: true}, {code:'1666', desc:'Romance copy', checked: true}, {code:'1667', desc:'Size', checked: true}, {code:'1784', desc:'Dimensions', checked: true}, {code:'1672', desc:'Brand', checked: true}, {code:'1674', desc:'Ingredients', checked: true}, {code:'1676', desc:'Directions', checked: true}, {code:'1677', desc:'Warnings', checked: true}, {code:'1679', desc:'Nutrition', checked: true}, {code:'1678', desc:'Image Update', checked: true}, {code:'1727', desc:'Primary UPC Update', checked: true} ]; /** * Currently displayed update reasons. * @type {*} */ self.displayUpdateReasons = angular.copy(self.updateReasons); /** * Keeps track of user selected update reason. * @type {*} */ self.selectedUpdateReasons = angular.copy(self.updateReasons); /** * Code table of show on site filter option. * @type {[*]} */ self.showOnSiteOptions = [ {code:'Y', desc:'Yes', checked: true}, {code:'N', desc:'No', checked: true} ]; /** * Currently displayed show on site user selection. * @type {*} */ self.displayShowOnSiteOptions = angular.copy(self.showOnSiteOptions); /** * Keeps track of user's show on site selection. * @type {*} */ self.selectedShowOnSiteOptions = angular.copy(self.showOnSiteOptions); /** * Hierarchy context code for eCommerce * @type {string} */ self.hierarchyContextCode = 'CUST'; /** * Logical attribute id of PDP template. * @type {number} */ const LOGICAL_ATTR_PDP_TEMPLATE = 515; /** * Sales channel of HEB.Com * @type {string} */ const SALES_CHANNEL_HEB_COM = '01'; /** * Action to process on batch * 1: save data after mass fill * 2: assign product to BDM * 3: assign product to eBM * 4: publish product * 5: delete alerts * @type {number} */ const ACTION_TYPE_SAVE = 1; const ACTION_TYPE_ASSIGN_BDM = 2; const ACTION_TYPE_ASSIGN_eBM = 3; const ACTION_TYPE_PUBLISH = 4; const ACTION_TYPE_DELETE_ALERT = 5; /** * No image url constant. * @type {string} */ self.NO_IMAGE_URL = 'images/no_image.png'; /** * Represents the supported imaged response data uri's mime and charset part. The <img> tags data uri * representation generally looks like "data:[<mime type>][;charset=<charset>][;base64],<encoded data>". The * "<ecoded data>" part represents the binary data expected from the server. * @type {string} */ const RESP_IMAGE_DATA_TYPE = 'data:image/png;base64,'; /** * Thumbnail Image height constant. * @type {number} */ const IMAGE_THUMBNAIL_HEIGHT = 40; /** * Thumbnail Image width constant. * @type {number} */ const IMAGE_THUMBNAIL_WIDTH = 40; /** * alert id field * @type {string} */ const ALERT_ID='alertID'; self.CONFIRM_SELECTED_PRODUCT_TITLE = 'Task Message'; self.CONFIRM_SELECTED_PRODUCT_MESSAGE = 'Please select at least one Product to Mass Fill'; self.CONFIRM_CHECK_STATUS_TITLE = 'Mass Update Message'; /** * Search criteria used during Add Products to Task. */ self.searchCriteria; /** * Keeps track of selected selected products/Rows. * @type {Array} */ self.selectedAlerts = []; /** * Keeps track of excluded products/Rows when "Select All" is checked. * @type {Array} */ self.excludedAlerts = []; /** * Represents state of Select-All check box. */ self.allAlerts = false; /** * Defaul user. Load all user's data. * @type {{uid: string, fullName: string}} */ self.defaultUser = {uid:'',fullName:'All'}; /** * Currently logged in user. * @type {{uid, fullName}} */ self.currentUser = {uid:$rootScope.currentUser.id, fullName: $rootScope.currentUser.name}; /** * Currently selected user/assignee initialized with the logged in user name. * @type {{uid, fullName}} */ self.assignedTo = self.defaultUser; /** * List of assignee of products in the displayed task. * @type {Array} */ self.assignedToUsers = []; /** * Represents the task edit status. * @type {boolean} */ self.isEditingTask =false; /** * Search type product for ecommerce view * @type {String} */ const SEARCH_TYPE = "basicSearch"; /** * Selection type product for ecommerce view * @type {String} */ const SELECTION_TYPE = "Product ID"; /** * Ecommerce view tab * @type {String} */ const ECOMMERCE_VIEW_TAB = 'ecommerceViewTab'; /** * Currently selected image. * @type {ProductScanImageURI} */ self.selectedImage = ''; /** * image downloading status. * @type {boolean} */ self.isImageDownloading = false; /** * The saleschannel. * @type {Object} */ self.salesChannel; /** * The list of channels. * @type {Array} */ self.salesChannels=[]; /** * The pdf templates. * @type {Object} */ self.pdpTemplate; /** * The list of pdf templates. * @type {Array} */ self.pdpTemplates = []; /** * The list of fulfillmentProgram selected. * @type {Array} */ self.fulfillmentProgramsSelected = []; /** * List of FulfillmentPrograms of one channel. * @type {Array} */ self.fulfillmentPrograms=[]; /** * Holds the list of FulfillmentPrograms of all channels. * @type {Array} */ self.allFulfillmentPrograms=[]; /** * The showOnsite. * @type {Object} */ self.showOnSite; /** * The showOnsite select. * @type {Array} */ self.showOnSiteSelect; /** * The tomorrow date. * @type {Object} */ self.tomorrow; /** * Options for datepicker */ self.options = { minDate: new Date(), maxDate: new Date("12/31/9999") }; /** * The effectiveDate. * @type {Object} */ self.effectiveDate; /** * The expirationDate. * @type {Object} */ self.expirationDate; /** * Flag for show on site start date open date picker * @type {boolean} */ self.showOnSiteStartDateOpen = false; /** * Flag for show on site end date open date picker * @type {boolean} */ self.showOnSiteEndDateOpen = false; /** * The object default select. */ self.objectSelectTemp = { id : null, description : "--Select--" }; /** * Setting for dropdown multiple select */ $scope.dropdownMultiselectSettings = { showCheckAll: false, showUncheckAll: false, smartButtonMaxItems: 1, scrollableHeight: '250px', scrollable: true, checkBoxes: true }; self.dataChanged = []; /** * Constant. */ const SPACE_STRING = ' '; /** * Mass fill data default cached on javascript. * @type {{isSelectAll: boolean, alertType: string, effectiveDate: string, expirationDate: string, assigneeId: string, attributes: Array, showOnSiteFilter: string, lstFulfillmentChannel: Array}} */ self.massFillInfoCachedDefault = { isSelectAll:false, alertType: '', effectiveDate:'', expirationDate:'', assigneeId: '', attributes: [], showOnSiteFilter: '', salesChannelsFilter: '', lstFulfillmentChannel:[] }; /** * Mass fill data cached to save * @type {{isSelectAll: boolean, alertType: string, effectiveDate: string, expirationDate: string, assigneeId: string, attributes: Array, showOnSiteFilter: string, lstFulfillmentChannel: Array, excludedAlerts: Array}} */ self.massFillInfoCached = { isSelectAll:false, alertType: '', effectiveDate:'', expirationDate:'', assigneeId: '', attributes: [], showOnSiteFilter: '', salesChannelsFilter: '', lstFulfillmentChannel:[], excludedAlerts:[] }; /** * Mass fill data cached when select all * @type {{isSelectAll: boolean, alertType: string, effectiveDate: string, expirationDate: string, assigneeId: string, attributes: Array, showOnSiteFilter: string, lstFulfillmentChannel: Array, excludedAlerts: Array}} */ self.massFillInfoCachedSelectAll = { isSelectAll:false, alertType: '', effectiveDate:'', expirationDate:'', assigneeId: '', attributes: [], showOnSiteFilter: '', salesChannelsFilter: '', lstFulfillmentChannel:[], excludedAlerts:[] }; /** * Constant for sales channels. */ const STORE_CODE = '02'; const DINNER_TONIGHT_CODE = '07'; const CENTRAL_MARKET_CODE = '06'; const CENTRAL_MARKET_PREFIX = 'CM-'; const HEB_TO_YOU_CODE = '03'; const HEB_TO_YOU_PREFIX = '2U-'; const EMPTY_STRING = ""; /** * The list sales channels filter. * @type {Array} */ self.salesChannelsFilter =[]; /** * The list sales channels filter org. * @type {Array} */ self.salesChannelsFilterOrg =[]; /** * Reset data */ self.resetData = function(){ self.massFillInfoCachedSelectAll = angular.copy(self.massFillInfoCachedDefault); self.massFillInfoCached = angular.copy(self.massFillInfoCachedDefault); self.selectedAlerts = []; self.fulfillmentProgramsSelected=[]; self.dataChanged=[]; self.allAlerts = false; self.salesChannel=null; self.pdpTemplate=null; self.excludedAlerts=[]; }; /** * Flag for check all Sales Channels. * @type {boolean} */ self.allSalesChannels = true; /** * Flag for check all Update Reasons. * @type {boolean} */ self.allUpdateReasons = true; /** * Init function called during loading of this controller. */ self.init = function () { self.getDataForMassFill(); self.tableParams = self.buildTable(); self.fetchProductsAssignee(self.alertType.code); self.tomorrow = new Date(); self.tomorrow.setDate(new Date().getDate() + 1); }; /** * Constructs the ng-table based data table. */ self.buildTable = function () { return new ngTableParams( { page: 1, count: self.DEFAULT_PAGE_SIZE }, { counts: [25,50,100], getData: function ($defer, params) { self.isWaiting = true; self.isNoRecordsFound = false; self.defer = $defer; self.dataResolvingParams = params; self.includeCounts = false; if (self.firstFetch) { self.includeCounts = true; } self.getTaskDetail(params.page() - 1); } } ) }; /** * Fetches details of the task displayed on screen from database with pagination. * @param page selected page number. */ self.getTaskDetail = function(page) { self.massFillInfoCachedSelectAll.alertType = self.alertType.code; self.massFillInfoCachedSelectAll.assigneeId = self.assignedTo.uid; self.massFillInfoCachedSelectAll.attributes = self.getSelectedUpdateReasonsAttrs(); self.massFillInfoCachedSelectAll.showOnSiteFilter = self.getSelectedShowOnSite(); self.massFillInfoCachedSelectAll.salesChannelsFilter = self.getSelectedSalesChannelsFilter(); self.massFillInfoCached.alertType = self.alertType.code; self.massFillInfoCached.assigneeId = self.assignedTo.uid; self.massFillInfoCached.attributes = self.getSelectedUpdateReasonsAttrs(); self.massFillInfoCached.showOnSiteFilter = self.getSelectedShowOnSite(); self.massFillInfoCached.salesChannelsFilter = self.getSelectedSalesChannelsFilter(); productUpdatesTaskApi.getProducts( { alertType: self.alertType.code, assignee: self.assignedTo.uid, includeCounts: self.includeCounts, attributes: self.getSelectedUpdateReasonsAttrs(), showOnSite: self.getSelectedShowOnSite(), salesChannelsFilter : self.getSelectedSalesChannelsFilter(), page : page, pageSize : self.tableParams.count() }, self.loadData,self.handleError); }; /** * Callback for a successful call to get data from the backend. * * @param results The data returned by the backend. */ self.loadData = function (results) { // If this was the fist page, it includes record count and total pages. if (results.complete) { self.totalRecordCount = results.recordCount; self.dataResolvingParams.total(self.totalRecordCount); self.firstFetch = false; } self.resultMessage = self.getResultMessage(results.data.length, self.tableParams.page() -1); self.renderUserSelection(results.data, self.allAlerts, self.selectedAlerts, self.excludedAlerts); $scope.data = results.data; self.bindingDataCached(); self.defer.resolve(results.data); if (results.data && results.data.length === 0) { self.isNoRecordsFound = true; } self.isWaiting = false; self.fetchProductImages(results.data); }; /** * Binding data on cached when change page */ self.bindingDataCached = function(){ _.forEach(self.dataChanged, function(itemCached){ var indexAlert=_.findIndex($scope.data, function(item){ return itemCached.alertID==item.alertID;}); $scope.data[indexAlert]=itemCached; }); if(self.massFillInfoCached.isSelectAll){ self.doMassFill(); } }; /** * Check change data * @returns {boolean} */ self.checkChangeData = function(){ var isChange=false; $scope.data.forEach(function(item){ if(item.isChange){ isChange=true; return; } }); if(!isChange && self.dataChanged.length>0){ isChange=true; } return isChange; }; /** * Used to reload table data. */ self.refreshTable = function (page, clearMsg) { if(self.checkChangeData()){ $('#confirmLossChangeModal').modal("show"); }else{ self.forceReloadData(page, clearMsg); } }; /** * Force reload data * @param page * @param clearMsg */ self.forceReloadData = function(page, clearMsg){ self.resetData(); if(clearMsg) {self.clearMessage();} self.firstFetch = true; self.resetWorkRequestsSelection(true); self.tableParams.page(page); self.tableParams.reload(); self.salesChannel = angular.copy(self.objectSelectTemp); self.pdpTemplate = angular.copy(self.objectSelectTemp); self.showOnSite = angular.copy(self.objectSelectTemp); self.fulfillmentProgramsSelected = []; self.effectiveDate = null; self.expirationDate = null; self.isErrorMassFillData = false; self.isErrorRequireMess = null; self.errorMassFillDataLst = []; }; /** * When click open date picker for anther attribute, store current status for date picker. */ self.openDatePicker = function (fieldName) { switch (fieldName) { case "showOnSiteStartDate": self.showOnSiteStartDateOpen = true; break; case "showOnSiteEndDate": self.showOnSiteEndDateOpen = true; break; default: break; } self.options = { minDate: new Date(), maxDate: new Date("12/31/9999") }; }; /** * Return of back end after a user removes an alert. Based on the size of totalRecordCount, * this method will either: * --reset view to initial state * --re-issue call to back end to update information displayed * * @param results Results from back end. */ self.handleSuccess = function(resp){ self.refreshTable(1, false); self.displayMessage(resp.data.message, false); }; /** * Callback that will respond to errors sent from the backend. * * @param error The object with error information. */ self.handleError = function(error){ if (error && error.data && error.data.message) { self.displayMessage(error.data.message, true); } else if(error) { self.displayMessage(error.data, true); } else { self.displayMessage("An unknown error occurred.", true); } self.isWaiting = false; }; /** * Generates the message that shows how many records and pages there are and what page the user is currently * on. * * @param dataLength The number of records there are. * @param currentPage The current page showing. * @returns {string} The message. */ self.getResultMessage = function(dataLength, currentPage){ return "" + (self.tableParams.count() * currentPage + 1) + " - " + (self.tableParams.count() * currentPage + dataLength) + " of " + self.totalRecordCount.toLocaleString(); }; /** * Used to reload table data. */ self.reloadTable = function (page, clearMsg) { if(clearMsg) {self.clearMessage();} self.firstFetch = true; self.tableParams.page(page); self.tableParams.reload(); }; /** * Used to display any success of failure messages above the data table. * @param message message to be displayed. * @param isError is error or not; True - message displayed in red. False- message get displayed in blue. */ self.displayMessage = function(message, isError) { self.isError = isError; self.message = message; }; /** * Used to clear any success/failure message displayed as result of last action by the user. */ self.clearMessage = function() { self.isError = false; self.message = ''; }; /** * Used to display fulfillment Channel description as a comma separated values. * @param productFullfilmentChanels * @returns {string} */ self.displayFulfilmentChannels = function(productFullfilmentChanels) { var fulfillmentChannelNames = []; _.forEach(productFullfilmentChanels, function (o) { var saleChannelPrefix = EMPTY_STRING; switch (o.key.salesChanelCode.trim()) { case CENTRAL_MARKET_CODE: saleChannelPrefix = CENTRAL_MARKET_PREFIX; break; case HEB_TO_YOU_CODE: saleChannelPrefix = HEB_TO_YOU_PREFIX; } fulfillmentChannelNames.push(SPACE_STRING + saleChannelPrefix + o.fulfillmentChannel.description.trim()); }); if(fulfillmentChannelNames.length >0){ if(productFullfilmentChanels[0].hasMassFill){ return productFullfilmentChanels[0].fulfillmentChannel.salesChannel.description.trim() + " - " + fulfillmentChannelNames.join(); } } return fulfillmentChannelNames.join(); }; /** * Used to pull out PDP attribute info out of all the attribute information of a particular product. * @param masterDataExtensionAttributes * @returns {string} */ self.displayPDPTemplate = function (masterDataExtensionAttributes) { return _.pluck(_.filter(masterDataExtensionAttributes, {key :{'attributeId': LOGICAL_ATTR_PDP_TEMPLATE}}), 'attributeValueText').join(); }; /** * Used to pull out PDP attribute info out of all the attribute information of a particular product. * @param masterDataExtensionAttributes * @returns {string} */ self.displayUpdateReasonAttributes = function (attributesCSV) { var name = []; if(attributesCSV) { var attributesArray = attributesCSV.split(','); _.forEach(attributesArray, function (attr) { var reason = _.find(self.updateReasons, function(o) { return o.code == parseInt(attr, 10);}); if(reason) { var index = _.findIndex(name, function(o) { return o == reason.desc;}); if (!(index >= 0)) {name.push(reason.desc);} } }); } return name.join(); }; /** * Used to show the status of show on site based on the show on site data for HEB.Com. It is assumed the default * sales channel for Ecommerce Task screen is HEB.com * @param productOnlines * @returns {*} */ self.displayShowOnSite = function (productOnlines) { return _.pluck(_.filter(productOnlines, {key :{'saleChannelCode': SALES_CHANNEL_HEB_COM}}), 'showOnSiteByExpirationDate')[0]; }; /** * Used to fetch primary image of product referenced by the work request. * @param workRequests */ self.fetchProductImages = function (workRequests) { if (workRequests) { _.forEach(workRequests, function (wrkRqst) { if(wrkRqst.productMaster){ self.fetchProductImage(wrkRqst.productMaster); } }); } }; /** * Used to fetch primary image of product referenced by the Product Master. * @param productMaster */ self.fetchProductImage = function (productMaster) { if(productMaster) { imageApi.getPrimaryImageByProductId( { productId : productMaster.prodId, salesChannelCode : SALES_CHANNEL_HEB_COM, width: IMAGE_THUMBNAIL_WIDTH, height: IMAGE_THUMBNAIL_HEIGHT }, function(result) { if(result.data && result.data.image && result.data.image.length>0) { productMaster.image = RESP_IMAGE_DATA_TYPE+result.data.image; } else { productMaster.image = self.NO_IMAGE_URL; } }, function(error) { productMaster.image = self.NO_IMAGE_URL; } ); } }; /** * called by product-search-criteria when search button pressed * @param searchCriteria */ self.updateSearchCriteria = function(searchCriteria) { self.searchCriteria = searchCriteria; }; /** * Resets all previous row selections when "Select All" is checked/unchecked. */ self.resetWorkRequestsSelection = function(includeSelectAll) { if (includeSelectAll) { self.allAlerts = false; } if(self.allAlerts){ _.forEach( $scope.data, function(item){ item.checked = true; }) self.selectedAlerts = $scope.data; }else{ _.forEach( $scope.data, function(item){ item.checked = false; }) self.selectedAlerts = []; } self.excludedAlerts = []; }; /** * Keeps track of row selection and exclusions in consideration to the state of "Select All" option. * * @param alertChecked selected row state. True/False. * @param alert data (Alert) object of the row that was modified. */ self.toggleProductSelection = function(alert) { if (self.allAlerts) {//checking if "Select All" is checked? !alert.checked ? self.excludedAlerts.push(alert) : _.remove(self.excludedAlerts, function(o) { return o.alertID == alert.alertID; }); } else { alert.checked ? self.selectedAlerts.push(alert) : _.remove(self.selectedAlerts, function(o) { return o.alertID == alert.alertID; }); } }; /** * Used to send selected products to back end to be deleted. If select-all is chosen, then it displays the * remove-all confirmation modal for user to confirm his action, otherwise it just proceeds with sending the * selected products and tracking id (task id) to the backend service for removal from the task. */ self.removeProducts = function(){ self.clearMessage(); if (self.allAlerts) { $('#removeAllProductsModal').modal("show"); } else { var data = {trackingId: self.task.alertKey.trim(), productIds: self.getProducts(self.selectedAlerts)}; productUpdatesTaskApi.removeProducts(data,self.handleSuccess,self.handleError); } }; /** * Handles removing all the products from the task. The backend service implementaion for this is a Batch handling, * hence this method's service callback does not wait for all products to be removed and so simply confirms on * successful submit of the batch. */ self.removeAllProducts = function() { var data = {trackingId : self.task.alertKey.trim(), productIds : self.getProducts(self.excludedAlerts)}; productUpdatesTaskApi.removeAllProducts(data,self.handleSuccess,self.handleError); }; /** * Utility function - used to collect product-ids from the given work requests. * @param workRqstArr array of work requests. * @returns {Array} array of product Ids. */ self.getProducts = function(workRqstArr) { var productIds = []; _.forEach(workRqstArr, function (o) { productIds.push(o.productId); }); return productIds; }; /** * Used to maintain the state of previous row selections by the user. Checks/Unchecks rows during data-loading (as * result of refresh or pagination). * * @param workRqstDataArr new list of data fetched from backend. * @param allWorkRqstChecked is select all checked; true/false. * @param selectedAlerts list of selected work requests/products. * @param excludedWorkRqst list of excluded work requests/products. */ self.renderUserSelection = function(alertsDataArr, allAlertsChecked, selectedAlerts, excludedAlerts) { if (allAlertsChecked) { _.forEach(alertsDataArr, function (alert) { var index = _.findIndex(excludedAlerts, function(o) { return o.alertID == alert.alertID;}); alert.checked = !(index > -1); }); } else { _.forEach(alertsDataArr, function (alert) { var index = _.findIndex(selectedAlerts, function(o) { return o.alertID == alert.alertID;}); alert.checked = index > -1; }); } }; /** * Fetch list of users to whom the products in the task has been assgined to. * @param task */ self.fetchProductsAssignee = function(alertType) { productUpdatesTaskApi.getProductsAssignee( {alertType : alertType}, function(result) { self.assignedToUsers = result; }, self.handleError ); }; /** * Handle change to assignee from the drop down. On change of user, this function sets the selected assignee * and kick starts refresh of the table with newly changed assingee name. * @param user selected user/assignee. */ self.toggleAssignee = function(user) { self.assignedTo = user; self.refreshTable(1, true); }; /** * Handle change to alert type from the drop down. On change of type, this function sets the selected alert type * and kick starts refresh of the table with newly changed alert type. * @param user selected alert type. */ self.toggleAlertType = function(alertType) { self.alertType = alertType; self.presetTaskSearchCondition(); self.fetchProductsAssignee(alertType.code); self.refreshTable(1, true); }; /** * Preset task search condition */ self.presetTaskSearchCondition = function () { self.assignedTo = self.defaultUser; self.resetFilterUpdateReason(true); self.resetFilterShowOnSite(); self.resetFilterFulfillmentChannel(true); }; /** * Handles loading the currently logged in user's task information(products). */ self.loadMyTask = function () { self.toggleAssignee(self.currentUser); }; /** * Handles applying filter change for update reason. Eventually tiggeres reloading of data table based on user selection. */ self.applyFilterUpdateReason = function() { self.selectedUpdateReasons = angular.copy(self.displayUpdateReasons); var selectedAttrs = _.pluck(_.filter(self.selectedUpdateReasons, function(o){ return o.checked == true;}),'code'); if(selectedAttrs.length > 0){ self.refreshTable(1, true); $('#updateReasonFilter').removeClass("open"); }else { self.isError = true; self.message = EMPTY_UPDATE_REASON ; } }; /** * Resets update reason selections to initial state. */ self.resetFilterUpdateReason = function(resetAllData) { self.displayUpdateReasons = angular.copy(self.updateReasons); self.allUpdateReasons = true; if(resetAllData) self.selectedUpdateReasons = angular.copy(self.updateReasons); }; /** * Cancels users selection. Changes displayed options state to previously saved state. */ self.cancelFilterUpdateReason = function() { self.displayUpdateReasons = angular.copy(self.selectedUpdateReasons); self.setSelectAllUpdateReasons(); $('#updateReasonFilter').removeClass("open"); }; /** * Set flag select all Sales Channel or not when user selected Sales Channel */ self.setSelectAllUpdateReasons = function () { var selectedUpdateReasons = _.filter(self.displayUpdateReasons, function (o) { return o.checked == true; }); self.allUpdateReasons = selectedUpdateReasons.length == self.updateReasons.length ? true : false; } /** * Set check/uncheck Sales Channel when user select all/unselect all Sales Channel */ self.setSelectedForUpdateReasons = function () { _.map(self.displayUpdateReasons, function (o) { return o.checked = self.allUpdateReasons; }); } /** * Used to build list of attributes code/numbers based on the user selection. If user havent made any selection, * it returns null instead of sending all the default-selected attributes code. This is done to save query fetch performance. */ self.getSelectedUpdateReasonsAttrs = function() { if(self.alertType.code == 'PRUPD'){//Update reason applies only to the PRUPD alert type. var selectedAttrs = _.pluck(_.filter(self.selectedUpdateReasons, function(o){ return o.checked == true;}),'code'); return (selectedAttrs.length != self.updateReasons.length) ? selectedAttrs.join() : null; } return null; }; /** * Handles applying filter change for update reason. Eventually tiggeres reloading of data table based on user selection. */ self.applyFilterShowOnSite = function() { self.selectedShowOnSiteOptions = angular.copy(self.displayShowOnSiteOptions); var optionsSelected = _.pluck(_.filter(self.selectedShowOnSiteOptions, function(o){ return o.checked == true;}),'code'); if(optionsSelected.length > 0){ self.refreshTable(1, true); $('#showOnSiteFilter').removeClass("open"); } else { self.isError = true; self.message = EMPTY_SHOW_ON_SITE; } }; /** * Resets show on site selections to initial state. */ self.resetFilterShowOnSite = function() { self.displayShowOnSiteOptions = angular.copy(self.showOnSiteOptions); self.selectedShowOnSiteOptions = angular.copy(self.showOnSiteOptions); }; /** * Cancels users selection. Changes displayed options state to previously saved state. */ self.cancelFilterShowOnSite = function() { self.displayShowOnSiteOptions = angular.copy(self.selectedShowOnSiteOptions); $('#showOnSiteFilter').removeClass("open"); }; /** * Used to show on site status of Y/N based on user selection. Returns null if both options are selected or * unselected, meaning to fetch all records. * @returns {null} */ self.getSelectedShowOnSite = function() { var optionsSelected = _.pluck(_.filter(self.selectedShowOnSiteOptions, function(o){ return o.checked == true;}),'code'); return (optionsSelected.length == 1) ? optionsSelected[0] : null; }; /** * Called from child component productCustomHierarchyAssignment when the assignment changes are saved */ self.updateAssignment = function() { self.refreshTable(); }; /** * Initiates a download of all the records. */ self.export = function() { var encodedUri = self.generateExportUrl(); if(encodedUri !== self.EMPTY_STRING) { self.downloading = true; downloadService.export(encodedUri, 'productUpdates.csv', self.WAIT_TIME, function () { self.downloading = false; }); } }; /** * Generates the URL to ask for the export. * * @returns {string} The URL to ask for the export. */ self.generateExportUrl = function() { var attributes = self.getSelectedUpdateReasonsAttrs(); if (attributes === null) { attributes = ''; } var showOnSite = self.getSelectedShowOnSite(); if (showOnSite === null) { showOnSite = ''; } var salesChannelsFilter = self.getSelectedSalesChannelsFilter() if (salesChannelsFilter === null) { salesChannelsFilter = ''; } return urlBase + '/pm/task/productUpdates/exportProductUpdatesToCsv?' + 'alertType=' + self.alertType.code + '&assignee=' + self.assignedTo.uid + '&attributes=' + attributes + '&showOnSite=' + showOnSite + '&salesChannelsFilter=' + salesChannelsFilter; }; /** * Backup search condition product for ecommerce View * @param productId the product id. * @param alertId the alert id. * @param productPosition the current position of product on grid. */ self.navigateToEcommerView = function(productId, alertId, productPosition) { //Set search condition productSearchService.setSearchType(SEARCH_TYPE); productSearchService.setSelectionType(SELECTION_TYPE); productSearchService.setSearchSelection(productId); productSearchService.setListOfProducts($scope.data); //Backup alert id productSearchService.setAlertId(alertId); //Set selected tab is ecommerceViewTab tab to navigate ecommerce view page productSearchService.setSelectedTab(ECOMMERCE_VIEW_TAB); //productGroupService.setProductGroupId(self.cusProductGroup.customerProductGroup.custProductGroupId); //Set from page navigated to productSearchService.setFromPage(appConstants.PRODUCT_UPDATES_TASK); productSearchService.setDisableReturnToList(false); productSearchService.productUpdatesTaskCriteria = {}; productSearchService.productUpdatesTaskCriteria.alertType = self.alertType.code; productSearchService.productUpdatesTaskCriteria.assignee = self.assignedTo.uid; productSearchService.productUpdatesTaskCriteria.attributes = self.getSelectedUpdateReasonsAttrs(); productSearchService.productUpdatesTaskCriteria.showOnSite = self.getSelectedShowOnSite(); productSearchService.productUpdatesTaskCriteria.salesChannelsFilter = self.getSelectedSalesChannelsFilter(); productSearchService.productUpdatesTaskCriteria.pageIndex = self.convertPagePerCurrentPageSizeToPagePerOneHundred(productPosition); productSearchService.productUpdatesTaskCriteria.pageSize = self.NAVIGATE_PAGE_SIZE; $state.go(appConstants.HOME_STATE); }; /** * Convert page per current page size to page per one hundred. * @param productPosition the position of product on grid table. * @returns {number} the position of product per one hundred. */ self.convertPagePerCurrentPageSizeToPagePerOneHundred = function(productPosition){ var productPositionInDataBase = (self.tableParams.page()-1) * self.tableParams.count() + productPosition; return Math.floor(productPositionInDataBase/self.NAVIGATE_PAGE_SIZE) + 1; } /** * Show full primary image, and allow user download */ self.showFullImage = function (prodId) { $('#imageModal').modal({backdrop: 'static', keyboard: true}); self.fetchProductFullImage(prodId); }; /** * Used to fetch primary image of product referenced by the product id. * @param productMaster */ self.fetchProductFullImage = function (prodId) { self.selectedImage = null; self.isImageDownloading = true; imageApi.getPrimaryImageByProductId( { productId : prodId, salesChannelCode : SALES_CHANNEL_HEB_COM }, function(result) { self.isImageDownloading = false; if(result.data) { self.selectedImage = result.data; } }, function(error) { self.isImageDownloading = false; } ); }; /** * Download current image. */ self.downloadImage = function () { if(self.selectedImage != null){ var imageFormat = (self.selectedImage.imageFormat=='' ? 'png' : self.selectedImage.imageFormat).trim(); var imageBytes = self.selectedImage.image; downloadImageService.download(imageBytes, imageFormat); } }; /** * Get data for mass fill. */ self.getDataForMassFill = function(){ self.salesChannel = angular.copy(self.objectSelectTemp); self.pdpTemplate = angular.copy(self.objectSelectTemp); self.showOnSite = angular.copy(self.objectSelectTemp); self.fulfillmentProgramsSelected = []; self.effectiveDate = null; self.expirationDate = null; self.showOnSiteSelects = [ { id : null, description : "--Select--" }, { id : 1, description : "Yes" }, { id : 0, description : "No" } ]; self.loadSalesChannels(); self.loadPDPTemplates(); self.loadFulfillmentPrograms(); $scope.handleEventSelectDropdown = { onSelectionChanged: function() { if(self.fulfillmentProgramsSelected == null || self.fulfillmentProgramsSelected.length ==0){ self.showOnSite = angular.copy(self.objectSelectTemp); self.effectiveDate = null; self.expirationDate = null; } }, onItemSelect: function(item){ if(_.trim(item.key.fulfillmentChannelCode)==='03'){ _.forEach(self.fulfillmentPrograms,function(option){ option.disabled = true; }); item.disabled = false; self.fulfillmentProgramsSelected = []; self.fulfillmentProgramsSelected.push(item); }else{ _.forEach(self.fulfillmentPrograms,function(option){ option.disabled = false; }); } }, onItemDeselect: function(item){ if(_.trim(item.key.fulfillmentChannelCode)==='03'){ _.forEach(self.fulfillmentPrograms,function(option){ option.disabled = false; }); } } }; }; /** * Load the list of channels from api. */ self.loadSalesChannels = function(){ productGroupApi.findAllSaleChanel( //success function (results) { self.salesChannels = []; self.salesChannels.push(self.salesChannel); self.salesChannelsFilter = []; _.forEach(results, function (salesChannel) { if (salesChannel.id !== STORE_CODE && salesChannel.id !== DINNER_TONIGHT_CODE) { self.salesChannels.push(angular.copy(salesChannel)); salesChannel.checked = true; self.salesChannelsFilter.push(salesChannel); } }); self.salesChannelsFilterOrg = angular.copy(self.salesChannelsFilter); self.selectedSalesChannelsFilter = angular.copy(self.salesChannelsFilter); } , self.handleError ); }; /** * Load the list of pdf templates from api. */ self.loadPDPTemplates = function () { eCommerceViewApi.findAllPDPTemplate( //success function (results) { self.pdpTemplates.push(self.pdpTemplate); self.pdpTemplates = self.pdpTemplates.concat(results); } ,self.handleError ); }; /** * Load the list of fulfillments for all sales channels from api. */ self.loadFulfillmentPrograms = function(){ productSearchApi.queryFulfilmentChannels(function(results){ self.allFulfillmentPrograms = results; var salesChannelsTemp = []; self.salesChannels.forEach(function(salesChannel, index){ var hasExist = false; self.allFulfillmentPrograms.forEach(function(fulfillmentProgram){ if(salesChannel.id == null || fulfillmentProgram.salesChannel.id == salesChannel.id){ hasExist = true; } }); if(hasExist){ salesChannelsTemp.push(salesChannel); } }); self.salesChannels = salesChannelsTemp; }, self.handleError); }; /** * Get the list of FulfillmentPrograms by sales channel id. * * @return the list of FulfillmentPrograms. */ self.getFulfillmentPrograms = function(channelId){ var results = []; self.allFulfillmentPrograms.forEach(function(item, index){ if(item.salesChannel.id == channelId){ item.id = index; item.label = item.description.trim(); results.push(item); } } ); results.sort(); results.reverse(); return results; }; /** * Handle data when change sale channel. */ self.handleChangeSalesChannel = function(){ self.fulfillmentProgramsSelected = []; self.showOnSite = angular.copy(self.objectSelectTemp); self.effectiveDate = null; self.expirationDate = null; self.fulfillmentPrograms = self.getFulfillmentPrograms(self.salesChannel.id); _.forEach(self.fulfillmentPrograms,function(option){ option.disabled = false; }); }; /** * Handle data show on site date. */ self.handleShowOnSiteDate = function() { if(self.showOnSite == null || self.showOnSite.id == null || self.showOnSite.id == 0){ self.effectiveDate = null; self.expirationDate = null; }else{ self.effectiveDate = self.tomorrow; self.expirationDate = new Date("12/31/9999"); } }; /** * Mass fill data with product. */ self.massFillDataWithProduct = function(){ if(!self.validateMassFillData()){ if(!self.allAlerts && self.selectedAlerts.length == 0){ $('#confirmSelectProductsModal').modal("show"); }else { if(self.allAlerts){ self.massFillInfoCachedSelectAll.isSelectAll = true; self.massFillInfoCachedSelectAll = { isSelectAll: self.massFillInfoCachedSelectAll.isSelectAll, alertType: self.massFillInfoCached.alertType , effectiveDate: self.massFillInfoCached.effectiveDate, expirationDate: self.massFillInfoCached.expirationDate, assigneeId: self.massFillInfoCached.assigneeId, attributes: self.massFillInfoCached.attributes, showOnSiteFilter: self.massFillInfoCached.showOnSiteFilter, salesChannelsFilter: self.massFillInfoCached.salesChannelsFilter, lstFulfillmentChannel: self.fulfillmentProgramsSelected, pdpTemplate:self.pdpTemplate, excludedAlerts:self.excludedAlerts }; } self.massFillInfoCached = { isSelectAll: self.massFillInfoCachedSelectAll.isSelectAll, alertType: self.massFillInfoCached.alertType , effectiveDate: self.massFillInfoCached.effectiveDate, expirationDate: self.massFillInfoCached.expirationDate, assigneeId: self.massFillInfoCached.assigneeId, attributes: self.massFillInfoCached.attributes, showOnSiteFilter: self.massFillInfoCached.showOnSiteFilter, salesChannelsFilter: self.massFillInfoCached.salesChannelsFilter, lstFulfillmentChannel: self.fulfillmentProgramsSelected, pdpTemplate:self.pdpTemplate, excludedAlerts:self.excludedAlerts }; self.doMassFill(); } } }; /** * Mass fill data */ self.doMassFill = function(){ self.isWaiting = true; if(self.massFillInfoCached.isSelectAll){ self.doMassFillSelectAll(); } if(!self.allAlerts){ self.doMassFillNotSelectAll(); } $timeout(function() { self.isWaiting = false; }, 1500); }; /** * Mass fill data with select all */ self.doMassFillSelectAll = function(){ $scope.data.forEach(function(item, index){ var itemExcluded=_.find(self.massFillInfoCachedSelectAll.excludedAlerts,function (itemEx) { return item.alertID===itemEx.alertID; }) if(itemExcluded==null && item.productMaster){ item.isChange = true; if(self.massFillInfoCachedSelectAll.pdpTemplate != null && (item.productMaster.masterDataExtensionAttributes==null || item.productMaster.masterDataExtensionAttributes.length==0)){ var masterDataExtensionAttribute = { key : {attributeId : LOGICAL_ATTR_PDP_TEMPLATE}, attributeValueText : self.massFillInfoCachedSelectAll.pdpTemplate.description, } item.productMaster.masterDataExtensionAttributes=[]; item.productMaster.masterDataExtensionAttributes.push(masterDataExtensionAttribute); } else if(self.massFillInfoCachedSelectAll.pdpTemplate != null && self.massFillInfoCachedSelectAll.pdpTemplate.id != null && self.isChangeMassFillPdpTemplate(item.productMaster,self.massFillInfoCachedSelectAll.pdpTemplate)){ item.productMaster.masterDataExtensionAttributes.forEach(function(masterDataExtensionAttribute, index){ if(masterDataExtensionAttribute.key.attributeId == LOGICAL_ATTR_PDP_TEMPLATE){ masterDataExtensionAttribute.attributeValueText = self.massFillInfoCachedSelectAll.pdpTemplate.description; item.productMaster.pdpTemplate = masterDataExtensionAttribute; } }); } self.massFillFullfilment(item.productMaster,self.massFillInfoCachedSelectAll.lstFulfillmentChannel); self.dataChanged.push(item); } }); }; /** * Mass fill data with not select all */ self.doMassFillNotSelectAll = function(){ $scope.data.forEach(function(item, index){ self.selectedAlerts.forEach(function(itemSelected, index){ if(item.alertID == itemSelected.alertID && item.productMaster){ item.isChange = true; if(self.massFillInfoCached.pdpTemplate != null && (item.productMaster.masterDataExtensionAttributes==null || item.productMaster.masterDataExtensionAttributes.length==0)){ var masterDataExtensionAttribute = { key : {attributeId : LOGICAL_ATTR_PDP_TEMPLATE}, attributeValueText : self.massFillInfoCached.pdpTemplate.description, } item.productMaster.masterDataExtensionAttributes=[]; item.productMaster.masterDataExtensionAttributes.push(masterDataExtensionAttribute); } else if(self.massFillInfoCached.pdpTemplate != null && self.massFillInfoCached.pdpTemplate.id != null && self.isChangeMassFillPdpTemplate(item.productMaster,self.massFillInfoCached.pdpTemplate)){ item.productMaster.masterDataExtensionAttributes.forEach(function(masterDataExtensionAttribute, index){ if(masterDataExtensionAttribute.key.attributeId == LOGICAL_ATTR_PDP_TEMPLATE){ masterDataExtensionAttribute.attributeValueText = self.massFillInfoCached.pdpTemplate.description; item.productMaster.pdpTemplate = masterDataExtensionAttribute; itemSelected.productMaster.pdpTemplate = masterDataExtensionAttribute; } }); } self.massFillFullfilment(item.productMaster,self.massFillInfoCached.lstFulfillmentChannel); self.dataChanged.push(item); } }); }); }; /** * Mass fill pdp template * @param productMaster * @returns {boolean} */ self.isChangeMassFillPdpTemplate = function(productMaster,pdpTemplate){ var isChangePdp = false; var pdpOrigin = _.find(productMaster.masterDataExtensionAttributes, function(attr){ return attr.key.attributeId == LOGICAL_ATTR_PDP_TEMPLATE; }); if(pdpOrigin==null || _.trim(pdpOrigin.attributeValueText)!==_.trim(pdpTemplate.description)){ isChangePdp = true; } return isChangePdp; }; /** * Mass fill fullfilmentChanels */ self.massFillFullfilment =function(productMaster,lstFulfillmentChannel){ var productFullfilmentChanels=[]; if(lstFulfillmentChannel==null || lstFulfillmentChannel.length==0) return; _.forEach(lstFulfillmentChannel, function (fullfilment) { var productFullfilmentChanel = { expirationDate: self.convertDateToStringWithYYYYMMDD(self.expirationDate), fulfillmentChannel: angular.copy(fullfilment), effectDate: self.convertDateToStringWithYYYYMMDD(self.effectiveDate), key: { productId: productMaster.prodId, salesChanelCode: fullfilment.key.salesChannelCode, fullfillmentChanelCode: fullfilment.key.fulfillmentChannelCode } }; productFullfilmentChanel.hasMassFill = true; productFullfilmentChanels.push(productFullfilmentChanel); }); productMaster.productFullfilmentChanels=productFullfilmentChanels; }; /** * Validate data mass fill. */ self.validateMassFillData = function(){ self.isErrorMassFillData = false; self.isErrorRequireMess = null; self.errorMassFillDataLst = []; if((self.pdpTemplate == null || self.pdpTemplate.id == null) && (self.salesChannel == null || self.salesChannel.id == null || self.fulfillmentProgramsSelected == null || self.fulfillmentProgramsSelected.length == 0)){ self.isErrorMassFillData = true; self.isErrorRequireMess = "Please select value for Mass Fill." }else if(self.salesChannel != null && self.salesChannel.id != null && self.fulfillmentProgramsSelected != null && self.fulfillmentProgramsSelected.length > 0){ if(self.showOnSite == null || self.showOnSite.id == null){ self.isErrorMassFillData = true; self.errorMassFillDataLst.push("Fulfillment Program Value is a mandatory field."); }else if(self.showOnSite.id == 1){ if (self.isDate1GreaterThanDate2(self.tomorrow, self.effectiveDate)) { self.errorMassFillDataLst.push("Start Date must be greater than Current Date."); self.isErrorMassFillData = true; } if(!self.isDate1GreaterThanDate2(self.expirationDate, self.effectiveDate)) { self.isErrorMassFillData = true; if (!self.isDate1GreaterThanDate2(self.tomorrow, self.effectiveDate)) { self.errorMassFillDataLst.push("Effective Date must be less than End Date."); } self.errorMassFillDataLst.push("End Date must be greater than Effective Date and less than 12/31/9999."); } } } return self.isErrorMassFillData; }; /** * Save data mass fill. Call api to create tracking id then send to batch process asyn * and create candidate work request */ self.saveData = function(){ var massFillData = { isSelectAll:self.massFillInfoCached.isSelectAll, selectedAlertStaging:self.dataChanged, excludedAlerts:_.pluck(self.massFillInfoCached.excludedAlerts, ALERT_ID), description:self.descriptionRequest, alertType: self.massFillInfoCached.alertType, effectiveDate:self.convertDateToStringWithYYYYMMDD(self.massFillInfoCached.effectiveDate), expirationDate:self.convertDateToStringWithYYYYMMDD(self.massFillInfoCached.expirationDate), assigneeId: self.massFillInfoCached.assigneeId, attributes: _.trim(self.massFillInfoCached.attributes)===''?null:_.trim(self.massFillInfoCached.attributes).split(","), showOnSiteFilter: self.massFillInfoCached.showOnSiteFilter, salesChannelsFilter: self.massFillInfoCached.salesChannelsFilter, lstFulfillmentChannel:self.massFillInfoCached.lstFulfillmentChannel, pdpTemplate:self.massFillInfoCached.pdpTemplate, actionType:ACTION_TYPE_SAVE }; self.isWaiting = true; productUpdatesTaskApi.saveData(massFillData,function (response) { self.isWaiting = false; self.trackingId=response.data; $('#confirmCheckStatusModal').modal("show"); },self.handleError) }; /** * Check status screen. */ self.checkStatus= function(){ $('#confirmCheckStatusModal').modal("hide"); $('#confirmCheckStatusModal').on('hidden.bs.modal', function () { $state.go(appConstants.CHECK_STATUS,{trackingId:self.trackingId}); }); }; /** * Fetch data change to save */ self.fetchDataChanged = function(){ //remove the duplicate item on selected alert data self.dataChanged = _.filter(self.dataChanged, function(itemChanged){ return _.find($scope.data, function(item){ return itemChanged.alertID==item.alertID; })==null; }); if($scope.data && $scope.data!=null && $scope.data.length>0){ $scope.data.forEach(function(item){ if(item.isChange){ item.alertStagingsFromDB = false; self.dataChanged.push(item); } }); } }; /** * Compare the date is greater than date 2 or not. * * @param date1 the date. * @param date2 the date. * @returns {boolean} true if the date1 is greater than date 2 or false. */ self.isDate1GreaterThanDate2 = function (date1, date2) { if ((new Date(self.convertDateToStringWithYYYYMMDD(date1)).getTime() > new Date(self.convertDateToStringWithYYYYMMDD(date2)).getTime())) { return true; } return false; }; /** * Convert the date to string with format: YYYY-MM-dd. * @param date the date object. * @returns {*} string */ self.convertDateToStringWithYYYYMMDD = function (date) { return $filter('date')(date, 'yyyy-MM-dd'); }; /** * Get total record mass fill. */ self.getTotalRecordMassFill = function() { if(self.massFillInfoCached.isSelectAll){ if(self.massFillInfoCachedSelectAll.excludedAlerts && self.massFillInfoCachedSelectAll.excludedAlerts.length>0){ var finalExclude = _.filter(self.massFillInfoCachedSelectAll.excludedAlerts, function(itemChanged){ return _.find(self.dataChanged, function(item){ return itemChanged.alertID==item.alertID; })==null; }); return self.totalRecordCount-finalExclude.length; } return self.totalRecordCount; }else{ return self.dataChanged.length; } }; /** * Get title for FufillmentProgram select dropdown. */ self.getTitleForFulfillmentProgram = function() { var fulfillmentChannelNames = []; _.forEach(self.fulfillmentProgramsSelected, function (o) { fulfillmentChannelNames.push(SPACE_STRING + o.description.trim()); }); return fulfillmentChannelNames.join(); }; /** * Call api to assign product to BDM */ self.assignToBDM = function(){ var massFillData = { isSelectAll: self.allAlerts, selectedAlertStaging:self.selectedAlerts, alertType: self.massFillInfoCached.alertType, effectiveDate:self.convertDateToStringWithYYYYMMDD(self.massFillInfoCached.effectiveDate), expirationDate:self.convertDateToStringWithYYYYMMDD(self.massFillInfoCached.expirationDate), assigneeId: self.massFillInfoCached.assigneeId, attributes: _.trim(self.massFillInfoCached.attributes)===''?null:_.trim(self.massFillInfoCached.attributes).split(","), showOnSiteFilter: self.massFillInfoCached.showOnSiteFilter, salesChannelsFilter: self.massFillInfoCached.salesChannelsFilter, excludedAlerts:_.pluck(self.excludedAlerts, ALERT_ID), actionType:ACTION_TYPE_ASSIGN_BDM }; self.isWaiting = true; productUpdatesTaskApi.assignToBDM(massFillData,function (response) { self.isWaiting = false; $('#successAssignToBDMModal').modal("show"); },self.handleError) }; /** * Call api to assign product to eBM */ self.assignToEBM = function(){ var massFillData = { isSelectAll: self.allAlerts, selectedAlertStaging:self.selectedAlerts, alertType: self.massFillInfoCached.alertType, effectiveDate:self.convertDateToStringWithYYYYMMDD(self.massFillInfoCached.effectiveDate), expirationDate:self.convertDateToStringWithYYYYMMDD(self.massFillInfoCached.expirationDate), assigneeId: self.massFillInfoCached.assigneeId, attributes: _.trim(self.massFillInfoCached.attributes)===''?null:_.trim(self.massFillInfoCached.attributes).split(","), showOnSiteFilter: self.massFillInfoCached.showOnSiteFilter, salesChannelsFilter: self.massFillInfoCached.salesChannelsFilter, excludedAlerts:_.pluck(self.excludedAlerts, ALERT_ID), actionType:ACTION_TYPE_ASSIGN_eBM }; self.isWaiting = true; productUpdatesTaskApi.assignToEBM(massFillData,function (response) { self.isWaiting = false; $('#successAssignToeBMModal').modal("show"); },self.handleError) }; /** * Call api to publish product */ self.publishProduct = function(){ var massFillData = { isSelectAll: self.allAlerts, selectedAlertStaging:self.selectedAlerts, alertType: self.massFillInfoCached.alertType, effectiveDate:self.convertDateToStringWithYYYYMMDD(self.massFillInfoCached.effectiveDate), expirationDate:self.convertDateToStringWithYYYYMMDD(self.massFillInfoCached.expirationDate), assigneeId: self.massFillInfoCached.assigneeId, attributes: _.trim(self.massFillInfoCached.attributes)===''?null:_.trim(self.massFillInfoCached.attributes).split(","), showOnSiteFilter: self.massFillInfoCached.showOnSiteFilter, salesChannelsFilter: self.massFillInfoCached.salesChannelsFilter, excludedAlerts:_.pluck(self.excludedAlerts, ALERT_ID), actionType:ACTION_TYPE_PUBLISH }; self.isWaiting = true; productUpdatesTaskApi.publishProduct(massFillData,function (response) { self.isWaiting = false; self.trackingId=response.data; $('#confirmCheckStatusModal').modal("show"); },self.handleError) }; /** * Call api to delete alerts */ self.deleteAlerts = function(){ var massFillData = { isSelectAll: self.allAlerts, selectedAlertStaging:self.selectedAlerts, alertType: self.massFillInfoCached.alertType, effectiveDate:self.convertDateToStringWithYYYYMMDD(self.massFillInfoCached.effectiveDate), expirationDate:self.convertDateToStringWithYYYYMMDD(self.massFillInfoCached.expirationDate), assigneeId: self.massFillInfoCached.assigneeId, attributes: _.trim(self.massFillInfoCached.attributes)===''?null:_.trim(self.massFillInfoCached.attributes).split(","), showOnSiteFilter: self.massFillInfoCached.showOnSiteFilter, salesChannelsFilter: self.massFillInfoCached.salesChannelsFilter, excludedAlerts:_.pluck(self.excludedAlerts, ALERT_ID), actionType:ACTION_TYPE_DELETE_ALERT }; self.isWaiting = true; productUpdatesTaskApi.deleteAlerts(massFillData,function (response) { self.isWaiting = false; self.message=response.message; self.forceReloadData(1,false); },self.handleError) }; /** * Check data before save by functionality * @param id */ self.checkDataBeforeSave = function(){ self.clearMessage(); self.fetchDataChanged(); if((self.massFillInfoCached.lstFulfillmentChannel && self.massFillInfoCached.lstFulfillmentChannel.length>0) || self.massFillInfoCached.pdpTemplate){ $('#confirmSubmitModal').modal("show"); }else{ self.CONFIRM_SELECTED_PRODUCT_MESSAGE = 'There are no changes on this page to be saved. Please make any changes to update'; $('#confirmSelectProductsModal').modal("show"); } }; /** * Check data before assgin to BDM by functionality * @param id */ self.checkDataBeforeAssignToBDM = function(){ self.clearMessage(); if((self.selectedAlerts && self.selectedAlerts.length>0) || self.allAlerts ){ $('#confirmationBDMAssignModal').modal("show"); }else{ self.CONFIRM_SELECTED_PRODUCT_MESSAGE = 'Please select at least one Product to assign to BDM'; $('#confirmSelectProductsModal').modal("show"); } }; /** * Check data before assign to eBM by functionality * @param id */ self.checkDataBeforeeBM = function(){ self.clearMessage(); if((self.selectedAlerts && self.selectedAlerts.length>0) || self.allAlerts ){ $('#confirmationeBMAssignModal').modal("show"); }else{ self.CONFIRM_SELECTED_PRODUCT_MESSAGE = 'Please select at least one Product to assign to eBM'; $('#confirmSelectProductsModal').modal("show"); } }; /** * Check data before publish by functionality * @param id */ self.checkDataBeforePublish = function(){ self.clearMessage(); if((self.selectedAlerts && self.selectedAlerts.length>0) || self.allAlerts ){ $('#confirmatioPublishProductModal').modal("show"); }else{ self.CONFIRM_SELECTED_PRODUCT_MESSAGE = 'Please select at least one Product to Publish'; $('#confirmSelectProductsModal').modal("show"); } }; /** * Check data before publish by functionality * @param id */ self.checkDataBeforeDelete = function(){ self.clearMessage(); if((self.selectedAlerts && self.selectedAlerts.length>0) || self.allAlerts ){ $('#confirmationDeleteAlertModal').modal("show"); }else{ self.CONFIRM_SELECTED_PRODUCT_MESSAGE = 'Please select at least one Alert to Delete'; $('#confirmSelectProductsModal').modal("show"); } }; /** * Handle reset button. */ self.onReset = function(){ self.alertType = self.alertTypes[0]; self.fetchProductsAssignee(self.alertType.code); self.assignedTo = self.defaultUser; self.resetFilterUpdateReason(true); self.resetFilterShowOnSite(); self.resetFilterFulfillmentChannel(true); self.forceReloadData(1,true); }; /** * Handles applying filter change for Fulfillment Channel. Eventually tiggeres reloading of data table based on user selection. */ self.applyFilteFulfillmentChannel = function() { self.selectedSalesChannelsFilter = angular.copy(self.salesChannelsFilter); var selectedSalesChannels = _.pluck(_.filter(self.selectedSalesChannelsFilter, function(o){ return o.checked == true;}),'id'); if(selectedSalesChannels.length > 0){ self.refreshTable(1, true); $('#fulfillmentChannelFilter').removeClass("open"); }else { self.isError = true; self.message = EMPTY_SALES_CHANNEL_FILTER_MESSAGE ; } }; /** * Resets Fulfillment Channel selections to initial state. */ self.resetFilterFulfillmentChannel = function(resetAllData) { self.salesChannelsFilter = angular.copy(self.salesChannelsFilterOrg); self.allSalesChannels = true; if(resetAllData) self.selectedSalesChannelsFilter = angular.copy(self.salesChannelsFilterOrg); }; /** * Cancels users selection. Changes displayed options state to previously saved state. */ self.cancelFilterFulfillmentChannel = function() { self.salesChannelsFilter = angular.copy(self.selectedSalesChannelsFilter); self.resetSelectAllSalesChannels(); $('#fulfillmentChannelFilter').removeClass("open"); }; /** * Used to build list Sales Channel code/numbers based on the user selection. If user havent made any selection, * it returns null instead of sending all the default-selected attributes code. This is done to save query fetch performance. */ self.getSelectedSalesChannelsFilter = function() { var selectedSalesChannels = _.pluck(_.filter(self.selectedSalesChannelsFilter, function(o){ return o.checked == true;}),'id'); return (selectedSalesChannels.length != self.salesChannelsFilterOrg.length) ? selectedSalesChannels.join(): null; }; /** * Set flag select all Sales Channel or not when user selected Sales Channel */ self.setSelectAllSalesChannels = function () { var selectedSalesChannels = _.filter(self.salesChannelsFilter, function (o) { return o.checked == true; }); self.allSalesChannels = selectedSalesChannels.length == self.salesChannelsFilterOrg.length ? true : false; } /** * Set check/uncheck Sales Channel when user select all/unselect all Sales Channel */ self.setSelectedForAllSalesChannels = function () { _.map(self.salesChannelsFilter, function (o) { return o.checked = self.allSalesChannels; }); } } })();
angular.module('app.routes', []) .config(function($stateProvider, $urlRouterProvider) { // Ionic uses AngularUI Router which uses the concept of states // Learn more here: https://github.com/angular-ui/ui-router // Set up the various states which the app can be in. // Each state's controller can be found in controllers.js $stateProvider .state('medicinaUNLaR.inicio', { url: '/page1', views: { 'side-menu21': { templateUrl: 'templates/inicio.html', controller: 'inicioCtrl' } } }) .state('medicinaUNLaR.planDeEstudios', { url: '/page2', views: { 'side-menu21': { templateUrl: 'templates/planDeEstudios.html', controller: 'planDeEstudiosCtrl' } } }) .state('medicinaUNLaR.perfilDelGraduado', { url: '/page6', views: { 'side-menu21': { templateUrl: 'templates/perfilDelGraduado.html', controller: 'perfilDelGraduadoCtrl' } } }) .state('medicinaUNLaR.alcanceDelTTulo', { url: '/page7', views: { 'side-menu21': { templateUrl: 'templates/alcanceDelTTulo.html', controller: 'alcanceDelTTuloCtrl' } } }) .state('medicinaUNLaR.horarios', { url: '/page3', views: { 'side-menu21': { templateUrl: 'templates/horarios.html', controller: 'horariosCtrl' } } }) .state('medicinaUNLaR', { url: '/side-menu21', templateUrl: 'templates/medicinaUNLaR.html', controller: 'medicinaUNLaRCtrl' }) .state('medicinaUNLaR.bibliotecaDigital', { url: '/page4', views: { 'side-menu21': { templateUrl: 'templates/bibliotecaDigital.html', controller: 'bibliotecaDigitalCtrl' } } }) .state('medicinaUNLaR.1AO', { url: '/page8', views: { 'side-menu21': { templateUrl: 'templates/1AO.html', controller: '1AOCtrl' } } }) .state('medicinaUNLaR.programasDeCTedra', { url: '/page12', views: { 'side-menu21': { templateUrl: 'templates/programasDeCTedra.html', controller: 'programasDeCTedraCtrl' } } }) .state('medicinaUNLaR.2AO', { url: '/page9', views: { 'side-menu21': { templateUrl: 'templates/2AO.html', controller: '2AOCtrl' } } }) .state('medicinaUNLaR.3AO', { url: '/page10', views: { 'side-menu21': { templateUrl: 'templates/3AO.html', controller: '3AOCtrl' } } }) .state('medicinaUNLaR.4AO', { url: '/page40', views: { 'side-menu21': { templateUrl: 'templates/4AO.html', controller: '4AOCtrl' } } }) .state('medicinaUNLaR.5AO', { url: '/page41', views: { 'side-menu21': { templateUrl: 'templates/5AO.html', controller: '5AOCtrl' } } }) .state('medicinaUNLaR.6AO', { url: '/page63', views: { 'side-menu21': { templateUrl: 'templates/6AO.html', controller: '6AOCtrl' } } }) .state('medicinaUNLaR.acercaDeLaApp', { url: '/page5', views: { 'side-menu21': { templateUrl: 'templates/acercaDeLaApp.html', controller: 'acercaDeLaAppCtrl' } } }) .state('medicinaUNLaR.calendarioAcadMico', { url: '/page11', views: { 'side-menu21': { templateUrl: 'templates/calendarioAcadMico.html', controller: 'calendarioAcadMicoCtrl' } } }) .state('medicinaUNLaR.examenDeIngreso', { url: '/page13', views: { 'side-menu21': { templateUrl: 'templates/examenDeIngreso.html', controller: 'examenDeIngresoCtrl' } } }) .state('medicinaUNLaR.anatomANormal', { url: '/page14', views: { 'side-menu21': { templateUrl: 'templates/anatomANormal.html', controller: 'anatomANormalCtrl' } } }) .state('medicinaUNLaR.quMicaBiolGica', { url: '/page42', views: { 'side-menu21': { templateUrl: 'templates/quMicaBiolGica.html', controller: 'quMicaBiolGicaCtrl' } } }) .state('medicinaUNLaR.saludPBlicaI', { url: '/page15', views: { 'side-menu21': { templateUrl: 'templates/saludPBlicaI.html', controller: 'saludPBlicaICtrl' } } }) .state('medicinaUNLaR.expresiNOralYEscrita', { url: '/page16', views: { 'side-menu21': { templateUrl: 'templates/expresiNOralYEscrita.html', controller: 'expresiNOralYEscritaCtrl' } } }) .state('medicinaUNLaR.fisiologAHumana', { url: '/page17', views: { 'side-menu21': { templateUrl: 'templates/fisiologAHumana.html', controller: 'fisiologAHumanaCtrl' } } }) .state('medicinaUNLaR.histologAEmbriologAYGenTica', { url: '/page18', views: { 'side-menu21': { templateUrl: 'templates/histologAEmbriologAYGenTica.html', controller: 'histologAEmbriologAYGenTicaCtrl' } } }) .state('medicinaUNLaR.fSicaBiomDica', { url: '/page19', views: { 'side-menu21': { templateUrl: 'templates/fSicaBiomDica.html', controller: 'fSicaBiomDicaCtrl' } } }) .state('medicinaUNLaR.saludPBlicaII', { url: '/page20', views: { 'side-menu21': { templateUrl: 'templates/saludPBlicaII.html', controller: 'saludPBlicaIICtrl' } } }) .state('medicinaUNLaR.humanismoMDico', { url: '/page21', views: { 'side-menu21': { templateUrl: 'templates/humanismoMDico.html', controller: 'humanismoMDicoCtrl' } } }) .state('medicinaUNLaR.inglS', { url: '/page22', views: { 'side-menu21': { templateUrl: 'templates/inglS.html', controller: 'inglSCtrl' } } }) .state('medicinaUNLaR.electivaIaPsicologASocial', { url: '/page23', views: { 'side-menu21': { templateUrl: 'templates/electivaIaPsicologASocial.html', controller: 'electivaIaPsicologASocialCtrl' } } }) .state('medicinaUNLaR.electivaIbNutriciNBSica', { url: '/page24', views: { 'side-menu21': { templateUrl: 'templates/electivaIbNutriciNBSica.html', controller: 'electivaIbNutriciNBSicaCtrl' } } }) .state('medicinaUNLaR.electivaIcFundamentosDeInstrumentaciNQuirRgica', { url: '/page25', views: { 'side-menu21': { templateUrl: 'templates/electivaIcFundamentosDeInstrumentaciNQuirRgica.html', controller: 'electivaIcFundamentosDeInstrumentaciNQuirRgicaCtrl' } } }) .state('medicinaUNLaR.patologA', { url: '/page26', views: { 'side-menu21': { templateUrl: 'templates/patologA.html', controller: 'patologACtrl' } } }) .state('medicinaUNLaR.parasitologAYMicologAMDica', { url: '/page27', views: { 'side-menu21': { templateUrl: 'templates/parasitologAYMicologAMDica.html', controller: 'parasitologAYMicologAMDicaCtrl' } } }) .state('medicinaUNLaR.medicinaPsicosocial', { url: '/page28', views: { 'side-menu21': { templateUrl: 'templates/medicinaPsicosocial.html', controller: 'medicinaPsicosocialCtrl' } } }) .state('medicinaUNLaR.epistemologAEIntroducciNALaInvestigaciNCientFica', { url: '/page29', views: { 'side-menu21': { templateUrl: 'templates/epistemologAEIntroducciNALaInvestigaciNCientFica.html', controller: 'epistemologAEIntroducciNALaInvestigaciNCientFicaCtrl' } } }) .state('medicinaUNLaR.medicinaAntropolGica', { url: '/page30', views: { 'side-menu21': { templateUrl: 'templates/medicinaAntropolGica.html', controller: 'medicinaAntropolGicaCtrl' } } }) .state('medicinaUNLaR.bacteriologAYVirologAMDica', { url: '/page31', views: { 'side-menu21': { templateUrl: 'templates/bacteriologAYVirologAMDica.html', controller: 'bacteriologAYVirologAMDicaCtrl' } } }) .state('medicinaUNLaR.saludPBlicaIII', { url: '/page32', views: { 'side-menu21': { templateUrl: 'templates/saludPBlicaIII.html', controller: 'saludPBlicaIIICtrl' } } }) .state('medicinaUNLaR.bioinformTica', { url: '/page33', views: { 'side-menu21': { templateUrl: 'templates/bioinformTica.html', controller: 'bioinformTicaCtrl' } } }) .state('medicinaUNLaR.electivaIIAMedicinaFamiliar', { url: '/page34', views: { 'side-menu21': { templateUrl: 'templates/electivaIIAMedicinaFamiliar.html', controller: 'electivaIIAMedicinaFamiliarCtrl' } } }) .state('medicinaUNLaR.electivaIIBAdministraciNGestiNDeLaSaludYAuditorAMDica', { url: '/page35', views: { 'side-menu21': { templateUrl: 'templates/electivaIIBAdministraciNGestiNDeLaSaludYAuditorAMDica.html', controller: 'electivaIIBAdministraciNGestiNDeLaSaludYAuditorAMDicaCtrl' } } }) .state('medicinaUNLaR.ElectivaIICPatologARegional', { url: '/page36', views: { 'side-menu21': { templateUrl: 'templates/ElectivaIICPatologARegional.html', controller: 'ElectivaIICPatologARegionalCtrl' } } }) .state('medicinaUNLaR.electivaIIDProcedimientosYTCnicasQuirRgicasDeEmergencia', { url: '/page43', views: { 'side-menu21': { templateUrl: 'templates/electivaIIDProcedimientosYTCnicasQuirRgicasDeEmergencia.html', controller: 'electivaIIDProcedimientosYTCnicasQuirRgicasDeEmergenciaCtrl' } } }) .state('medicinaUNLaR.clNicaMDicaI', { url: '/page44', views: { 'side-menu21': { templateUrl: 'templates/clNicaMDicaI.html', controller: 'clNicaMDicaICtrl' } } }) .state('medicinaUNLaR.clNicaGinecolGica', { url: '/page45', views: { 'side-menu21': { templateUrl: 'templates/clNicaGinecolGica.html', controller: 'clNicaGinecolGicaCtrl' } } }) .state('medicinaUNLaR.farmacologABSica', { url: '/page46', views: { 'side-menu21': { templateUrl: 'templates/farmacologABSica.html', controller: 'farmacologABSicaCtrl' } } }) .state('medicinaUNLaR.clNicaOftalmolGica', { url: '/page47', views: { 'side-menu21': { templateUrl: 'templates/clNicaOftalmolGica.html', controller: 'clNicaOftalmolGicaCtrl' } } }) .state('medicinaUNLaR.clNicaInfectolGica', { url: '/page48', views: { 'side-menu21': { templateUrl: 'templates/clNicaInfectolGica.html', controller: 'clNicaInfectolGicaCtrl' } } }) .state('medicinaUNLaR.saludMental', { url: '/page49', views: { 'side-menu21': { templateUrl: 'templates/saludMental.html', controller: 'saludMentalCtrl' } } }) .state('medicinaUNLaR.radiologAYDiagnSticoPorImGenes', { url: '/page50', views: { 'side-menu21': { templateUrl: 'templates/radiologAYDiagnSticoPorImGenes.html', controller: 'radiologAYDiagnSticoPorImGenesCtrl' } } }) .state('medicinaUNLaR.bioTica', { url: '/page51', views: { 'side-menu21': { templateUrl: 'templates/bioTica.html', controller: 'bioTicaCtrl' } } }) .state('medicinaUNLaR.clNicaDermatolGica', { url: '/page52', views: { 'side-menu21': { templateUrl: 'templates/clNicaDermatolGica.html', controller: 'clNicaDermatolGicaCtrl' } } }) .state('medicinaUNLaR.clNicaNeurolGica', { url: '/page53', views: { 'side-menu21': { templateUrl: 'templates/clNicaNeurolGica.html', controller: 'clNicaNeurolGicaCtrl' } } }) .state('medicinaUNLaR.saludPBlicaIV', { url: '/page54', views: { 'side-menu21': { templateUrl: 'templates/saludPBlicaIV.html', controller: 'saludPBlicaIVCtrl' } } }) .state('medicinaUNLaR.clNicaMDicaII', { url: '/page55', views: { 'side-menu21': { templateUrl: 'templates/clNicaMDicaII.html', controller: 'clNicaMDicaIICtrl' } } }) .state('medicinaUNLaR.clNicaQuirRgicaI', { url: '/page56', views: { 'side-menu21': { templateUrl: 'templates/clNicaQuirRgicaI.html', controller: 'clNicaQuirRgicaICtrl' } } }) .state('medicinaUNLaR.clNicaObstTricaYPerinatolGica', { url: '/page57', views: { 'side-menu21': { templateUrl: 'templates/clNicaObstTricaYPerinatolGica.html', controller: 'clNicaObstTricaYPerinatolGicaCtrl' } } }) .state('medicinaUNLaR.clNicaPediTrica', { url: '/page58', views: { 'side-menu21': { templateUrl: 'templates/clNicaPediTrica.html', controller: 'clNicaPediTricaCtrl' } } }) .state('medicinaUNLaR.clNicaTraumatolGica', { url: '/page59', views: { 'side-menu21': { templateUrl: 'templates/clNicaTraumatolGica.html', controller: 'clNicaTraumatolGicaCtrl' } } }) .state('medicinaUNLaR.saludPBlicaV', { url: '/page60', views: { 'side-menu21': { templateUrl: 'templates/saludPBlicaV.html', controller: 'saludPBlicaVCtrl' } } }) .state('prCticaProfSupervisada', { url: '/page61', templateUrl: 'templates/prCticaProfSupervisada.html', controller: 'prCticaProfSupervisadaCtrl' }) .state('medicinaUNLaR.electivaIIIAMedicinaAlternativa', { url: '/page62', views: { 'side-menu21': { templateUrl: 'templates/electivaIIIAMedicinaAlternativa.html', controller: 'electivaIIIAMedicinaAlternativaCtrl' } } }) .state('medicinaUNLaR.electivaIIIBGerontologA', { url: '/page64', views: { 'side-menu21': { templateUrl: 'templates/electivaIIIBGerontologA.html', controller: 'electivaIIIBGerontologACtrl' } } }) .state('medicinaUNLaR.electivaIIICGenTica', { url: '/page65', views: { 'side-menu21': { templateUrl: 'templates/electivaIIICGenTica.html', controller: 'electivaIIICGenTicaCtrl' } } }) .state('medicinaUNLaR.electivaIIIDMedicinaDelDolor', { url: '/page66', views: { 'side-menu21': { templateUrl: 'templates/electivaIIIDMedicinaDelDolor.html', controller: 'electivaIIIDMedicinaDelDolorCtrl' } } }) .state('medicinaUNLaR.electivaIIIENuevasTecnologAsAplicadasALaMedicina', { url: '/page67', views: { 'side-menu21': { templateUrl: 'templates/electivaIIIENuevasTecnologAsAplicadasALaMedicina.html', controller: 'electivaIIIENuevasTecnologAsAplicadasALaMedicinaCtrl' } } }) .state('medicinaUNLaR.clNicaUrolGica', { url: '/page68', views: { 'side-menu21': { templateUrl: 'templates/clNicaUrolGica.html', controller: 'clNicaUrolGicaCtrl' } } }) .state('medicinaUNLaR.farmacologAClNica', { url: '/page69', views: { 'side-menu21': { templateUrl: 'templates/farmacologAClNica.html', controller: 'farmacologAClNicaCtrl' } } }) .state('medicinaUNLaR.medicinaLegalYToxicolGica', { url: '/page70', views: { 'side-menu21': { templateUrl: 'templates/medicinaLegalYToxicolGica.html', controller: 'medicinaLegalYToxicolGicaCtrl' } } }) .state('medicinaUNLaR.clNicaOtorrinolaringolGica', { url: '/page71', views: { 'side-menu21': { templateUrl: 'templates/clNicaOtorrinolaringolGica.html', controller: 'clNicaOtorrinolaringolGicaCtrl' } } }) .state('medicinaUNLaR.electivaIVAReumatologA', { url: '/page72', views: { 'side-menu21': { templateUrl: 'templates/electivaIVAReumatologA.html', controller: 'electivaIVAReumatologACtrl' } } }) .state('medicinaUNLaR.electivaIVBMedicinaAmbulatoria', { url: '/page73', views: { 'side-menu21': { templateUrl: 'templates/electivaIVBMedicinaAmbulatoria.html', controller: 'electivaIVBMedicinaAmbulatoriaCtrl' } } }) .state('medicinaUNLaR.electivaIVCToxicologAIntoxicaciones', { url: '/page74', views: { 'side-menu21': { templateUrl: 'templates/electivaIVCToxicologAIntoxicaciones.html', controller: 'electivaIVCToxicologAIntoxicacionesCtrl' } } }) .state('medicinaUNLaR.electivaIVDEducaciNMDica', { url: '/page75', views: { 'side-menu21': { templateUrl: 'templates/electivaIVDEducaciNMDica.html', controller: 'electivaIVDEducaciNMDicaCtrl' } } }) .state('medicinaUNLaR.electivaIVEMedicinaPreventivaEnLaMujerYOncologAMDica', { url: '/page76', views: { 'side-menu21': { templateUrl: 'templates/electivaIVEMedicinaPreventivaEnLaMujerYOncologAMDica.html', controller: 'electivaIVEMedicinaPreventivaEnLaMujerYOncologAMDicaCtrl' } } }) .state('medicinaUNLaR.clNicaQuirRgicaII', { url: '/page77', views: { 'side-menu21': { templateUrl: 'templates/clNicaQuirRgicaII.html', controller: 'clNicaQuirRgicaIICtrl' } } }) .state('medicinaUNLaR.clNicaMDicaIII', { url: '/page78', views: { 'side-menu21': { templateUrl: 'templates/clNicaMDicaIII.html', controller: 'clNicaMDicaIIICtrl' } } }) .state('medicinaUNLaR.tocoginecologA', { url: '/page79', views: { 'side-menu21': { templateUrl: 'templates/tocoginecologA.html', controller: 'tocoginecologACtrl' } } }) .state('medicinaUNLaR.pediatrA', { url: '/page80', views: { 'side-menu21': { templateUrl: 'templates/pediatrA.html', controller: 'pediatrACtrl' } } }) .state('medicinaUNLaR.examenFinalIntegrador', { url: '/page81', views: { 'side-menu21': { templateUrl: 'templates/examenFinalIntegrador.html', controller: 'examenFinalIntegradorCtrl' } } }) .state('medicinaUNLaR.horarioIngreso', { url: '/page37', views: { 'side-menu21': { templateUrl: 'templates/horarioIngreso.html', controller: 'horarioIngresoCtrl' } } }) .state('medicinaUNLaR.horario1Cuatrimestre', { url: '/page38', views: { 'side-menu21': { templateUrl: 'templates/horario1Cuatrimestre.html', controller: 'horario1CuatrimestreCtrl' } } }) .state('medicinaUNLaR.horario2Cuatrimestre', { url: '/page39', views: { 'side-menu21': { templateUrl: 'templates/horario2Cuatrimestre.html', controller: 'horario2CuatrimestreCtrl' } } }) .state('medicinaUNLaR.gUAUNLaR', { url: '/page82', views: { 'side-menu21': { templateUrl: 'templates/gUAUNLaR.html', controller: 'gUAUNLaRCtrl' } } }) .state('medicinaUNLaR.exMenesFinales', { url: '/page83', views: { 'side-menu21': { templateUrl: 'templates/exMenesFinales.html', controller: 'exMenesFinalesCtrl' } } }) $urlRouterProvider.otherwise('/side-menu21/page1') });
import '../imports/startup/client/index.js' import '../imports/ui/pages/banana/banana.js';
const { Pool } = require('pg'); const { SourceMapDevToolPlugin } = require('webpack'); const PG_URI = 'postgres://yvngawyd:fPr458tFi73SmbCE3R3rgxxIKveVumGl@chunee.db.elephantsql.com/yvngawyd'; // create a new pool here using the connection string above const pool = new Pool({ connectionString: PG_URI }); module.exports = { query: async (text, params, callback) => { console.log('executed query', text); return await pool.query(text, params, callback); } };
let ans = 8 let guess = prompt("Think of a number 1-10, inclusively. Submit your guess."); if (Number(guess) === ans) { alert("Great job! You guessed correctly!"); } else if (Number(guess) > ans) { alert("You are too high, refresh again and guess lower."); } else if (Number(guess) < ans) { alert("You are too low, refresh again and guess higher."); }
import axios from 'axios'; import logger from '../logger'; import constants from '../constants'; const BASE_URL = process.env.BASE_URL; const url = `${BASE_URL}${constants.url.PO}`; const parsePo = po => { return { poFromLabel: po.poFromLabel, workflowName: po.workflowName, supplierName: po.supplierName, currencyCode: po.currencyCode, addressInput: po.addressInput, billingAddress: po.billingAddress ? [{ value: po.billingAddress.addressId, label: po.billingAddress.name }] : [], shippingAddress: po.shippingAddress ? [{ value: po.shippingAddress.addressId, label: po.shippingAddress.name }] : [], header: [], poLineItems: po.poLineItems.map(x => { return { itemDescription: x.itemDescription, comments: x.comments, lineItemId: x.poLineItemId, categoryDesc: x.categoryDesc, subCategoryDesc: x.subCategoryDesc, receivedQty: x.receivedQty.toString(), uom: x.uom, netPrice: x.netPrice, sgst: x.sgst, cgst: x.cgst, igst: x.igst, tax: x.tax, totalAmount: x.totalAmount, price: x.price, quantity: x.quantity, itemId: x.items.itemId, qty: x.quantity, currency: x.items.currency, desc: x.items.description1, otherTax: x.otherTax, taxName: x.taxName, hsnCode: x.items.hsnORsacCode, categoryId: x.items.categoryId, subCategoryId: x.items.subCategoryId, }; }), comments: po.comments, requisitionNo: po.requisitionNo, workflowId: po.workflowId, supplierId: po.supplierId, currency: po.currency, shippingAddressId: po.shippingAddressId, billingAddressId: po.billingAddressId, purchaseOrder: po.purchaseOrder, requisitionId: po.requisitionId, workflowAuditId: po.workflowAuditId, taskId: po.taskId, seqFlow: po.seqFlow, auditTrackId: po.auditTrackId, processInstanceId: po.processInstanceId, poFrom: po.poFrom, companyId: po.companyId, dynamicColumns: po.dynamicColumns || '', terms: po.terms, paymentTerms: po.paymentTerms, entityId: po.entityId, entityName: po.entityName, viewId: po.viewId, viewName: po.viewName, requesterId: po.requesterId, parentId: po.parentId, poAmendment: po.poAmendment, discount: po.discount, amendmentEdit: po.amendmentEdit, startDate: po.startDate, endDate: po.endDate, email: po.email, isAddressInput: po.isAddressInput, isAdvance: po.isAdvance, isAdvancePaid: po.isAdvancePaid, advancePayment: po.advancePayment, deliveryAddress: po.deliveryAddress, contactNo: po.contactNo, tinNo: po.tinNo, vatNo: po.vatNo, } ; }; const getPO = async (req, res, next) => { logger.info(`${req.originalUrl} - ${req.method} - ${req.ip}`); try { const {cookie, loadBalancer, payload} = req.body; const config = { headers: { name: 'content-type', value: 'application/x-www-form-urlencoded', Cookie: cookie } }; const response = await axios.post(url, payload, config); if (!response.data) { let err = new Error(constants.INVALID_USER); err.status = 401; next(err); } else { const po = await parsePo(response.data); res.status(200).json(po); } } catch (err) { if (err.toString() === constants.STATUS_401) { err.status = 401; } next(err); } }; const updatePO = async (req, res, next) => { logger.info(`${req.originalUrl} - ${req.method} - ${req.ip}`); try { const {cookie, loadBalancer, payload} = req.body; const config = { headers: { name: 'content-type', value: 'application/x-www-form-urlencoded', Cookie: cookie, } }; const response = await axios.post(url, payload, config); if (!response.data) { let err = new Error(constants.INVALID_USER); err.status = 401; next(err); } else { res.status(200).json(response.data); } } catch (err) { if (err.toString() === constants.STATUS_401) { err.status = 401; } next(err); } }; export {getPO, updatePO};
const database = require("../controllers/database-controller"); const SESSIONS = "Sessions", SIGNED_IN = "signed_in", TIMED_OUT = "timed-out", CREATED = "created"; const createTransaction = rawTx => ( new Promise(resolve => { rawTx.status = CREATED; rawTx.accounts = []; database.collection(SESSIONS).add(rawTx) .then(({ id }) => { resolve(id); }) }) ) const checkForStatusChange = (docId, cb) => { const unsubscribe = database.collection(SESSIONS).doc(docId).onSnapshot(session => { const sessionData = session.data(); if (sessionData.status === SIGNED_IN) { timeout && clearTimeout(timeout); unsubscribe && unsubscribe(); cb(null, true); } }, console.log); const timeout = setTimeout(() => { console.log("User did not log in after 2 minutes. Exiting listener..."); markTransactionFailed(docId); unsubscribe && unsubscribe(); cb(new Error("Transaction not accepted by user"), false); }, 120000); } const markTransactionFailed = id => { database.collection(SESSIONS).doc(id).set({ status: TIMED_OUT }, { merge: true }); } module.exports = { createTransaction, checkForStatusChange, markTransactionFailed }
class Person{ constructor(name,age){ this.name=name; this.age=age; } } class student extends Person{ constructor(name,age,school){ super(name,age) //super calls constructor of parent class this.school=school;//this commands can't be used before super () } } let p=new Person("harry potter",20); let s=new student("ron",17,"harry"); console.log(p); console.log(s); //new is to be used to create objects to classes
const { Schema, model } = require("mongoose"); const crypto = require("crypto-extra"); /** * @description user schema */ const userSchema = new Schema( { role: { type: String, default: "user", }, username: { type: String, unique: true, required: true, }, first_name: { type: String, }, last_name: { type: String, }, email: { type: String, }, phone_number: { type: String, }, DOB: { type: String, }, package: { type: String, }, profilePic: { type: String, }, gender: { type: String, }, position: { type: String, }, securedanswer: { type: String, }, securedquestion: { type: String, }, sponsors_fullname: { type: String, }, sponsors_username: { type: String, }, password: { type: String, required: true, }, secured_question: { type: String, }, secured_answer: { type: String, }, paymentProof: { type: Object, }, bankdets: { type: Object, }, city: { type: String, }, address: { type: String, }, country: { type: String, }, downlines: [ { type: Object, }, ], payouts: [ { type: Object, }, ], fooditems: [ { type: Object, }, ], approved: { type: Boolean, default: false, }, approvedState: { type: String, default: "pending", }, pv: { type: Number, default: 0, }, level: { type: Number, default: 0, }, resetPasswordToken: { type: String, required: false, }, resetPasswordExpires: { type: Date, required: false, }, requestWithdrawal:{ type:Boolean, default:false }, userPaidHistory:[ { type:Object } ], userPaidHistoryFood:[ { type:Object } ], userPaid:{ type:Boolean, default:false }, withdrawals:[ { type:Object } ], requestWithdrawalFood:{ type:Boolean, default:false }, userGivenFood:{ type:Boolean, default:false } }, { timestamps: true } ); userSchema.methods.generatePasswordReset = function () { this.resetPasswordToken = crypto.randomString().toString("hex"); this.resetPasswordExpires = Date.now() + 3600000; //expires in an hour }; module.exports = model("user", userSchema);
const express = require('express'); const path = require('path'); const morgan = require('morgan'); const bodyParser = require('body-parser'); const db = require('../database/seed.js'); const app = express(); const port = 3002; app.use(morgan('dev')); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true, })); app.use('/popular/:restaurantId', express.static(path.resolve(__dirname, '..', 'client', 'dist'))); //get the set of popular dishes app.get('/:restaurantId/popularDish', (req, res) => { db.Dish.find({ restuarantID: req.params.restaurantId }).limit(10).exec((err, Dish) => { if (err) { console.log(err); res.sendStatus(500); } else { res.send(Dish); } }); }); //get single popular dish // app.get('/:restaurantId/popularDish/:dishId') //create one popular dish record to the database // app.post('/:restaurantId/popularDish/:dishId', (req, res) => { // }); //Update one review record in the database. // app.put('/:restaurantId/popular/:dishId') //Delete one review record from the database. // app.delete('/:restaurantId/popular/:dishId') app.listen(port, () => console.log(`Example app listening on port ${port}!`));
import React, { Component } from "react"; import { StyleSheet, Text, View, Button, KeyboardAvoidingView, ScrollView } from "react-native"; import FontAwesomeIcon from "react-native-vector-icons/Entypo"; import { Fumi } from "react-native-textinput-effects"; import window from "../../constants/Layout"; import DatePicker from "react-native-datepicker"; import { changeUserName } from "../../actions/userDataAction"; import { bindActionCreators } from "redux"; import { connect } from "react-redux"; class SignupNameScreen extends Component { static navigationOptions = { headerStyle: { backgroundColor: "#none" } }; state = { firstName: "", secondName: "" }; render() { return ( <KeyboardAvoidingView style={styles.container} behavior="padding" enabled> <Fumi label={"First name"} iconClass={FontAwesomeIcon} iconName={"pencil"} iconColor={"#8F52AD"} iconSize={20} iconWidth={40} inputPadding={16} onChangeText={text => this.setState({ firstName: text })} /> <Fumi style={styles.textFields} label={"Second name"} iconClass={FontAwesomeIcon} iconName={"pencil"} iconColor={"#8F52AD"} iconSize={20} iconWidth={40} inputPadding={window.window.height / 40} onChangeText={text => this.setState({ secondName: text })} /> <Button title="Next" color="#8F52AD" onPress={() => { this.props.changeUserName(this.state); this.props.navigation.navigate("SignupEmailAndPassword"); }} /> <View style={{ height: 60 }} /> </KeyboardAvoidingView> ); } } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: "#f9f9f9", justifyContent: "center" }, error: { color: "red" }, textFields: { marginTop: 30, marginBottom: 20 }, datepicker: { marginTop: 30, marginBottom: 20, backgroundColor: "#fff", padding: window.window.height / 60, width: window.window.width } }); function mapStateToProps(state) { return { userData: state.userData }; } function mapDispatchToProps(dispatch) { return bindActionCreators( { changeUserName }, dispatch ); } export default connect( mapStateToProps, mapDispatchToProps )(SignupNameScreen);
import api from './index'; import axios from '../http'; const headers = { 'Content-Type': 'application/json', // 这里有一个很玄学的问题 token: localStorage.getItem('token'), }; export default { getPerson(num) { return axios.get(api.getPerson(), { params: { page: num, size: 9 } }, { headers }); }, getMovie() { return axios.get(api.getMovie(), { params: { size: 12 } }, { headers }); }, getRecommend() { const info = localStorage.getItem('user'); return axios.post(api.getRecommend(), info, { headers }); }, getMovieHigh() { return axios.get(api.getMovieHigh(), { headers }); }, getMovieList(info) { return axios.post(api.getMovieByTag(), JSON.stringify(info), { headers }); }, getMovieInfo(id) { return axios.get(api.getMovieInfo(), { params: { movieId: id } }, { headers }); }, getCommentList(info) { headers.token = localStorage.getItem('token'); return axios.post(api.getCommentInfo(), JSON.stringify(info), { headers }); }, submitComment(info) { headers.token = localStorage.getItem('token'); return axios.post(api.submitComment(), JSON.stringify(info), { headers }); }, putMovie(info) { headers.token = localStorage.getItem('token'); return axios.post(api.putMovie(), JSON.stringify(info), { headers }); }, getPersonInfo(id) { return axios.get(api.getPersonInfo(), { params: { personId: id } }, { headers }); }, getPersonMovie(name) { return axios.get(api.getPersonMovie(), { params: { personName: name } }, { headers }); }, userRegister(info) { return axios.post(api.userRegister(), JSON.stringify(info), { headers }); }, movieTags() { return axios.get(api.getMovieTag(), { headers }); }, userLogin(info) { return axios.post(api.userLogin(), JSON.stringify(info), { headers }); }, getUserInfo(info) { return axios.get(api.getUserInfo(), { params: { token: info } }, { headers }); }, sendCode(phone) { return axios.get(api.sendCode(), { params: { phone } }, { headers }); }, logout() { headers.token = localStorage.getItem('token'); return axios.post(api.logout(), null, { headers }); }, putUserInfo(userInfo) { headers.token = localStorage.getItem('token'); return axios.post(api.putUserInfo(), JSON.stringify(userInfo), { headers }); }, changePhone(phone) { return axios.put(api.changePhone(), JSON.stringify(phone), { headers }); }, changePass(password) { return axios.put(api.changePass(), JSON.stringify(password), { headers }); }, getMessage() { return axios.get(api.getMessage(), { headers }); }, };
var Webmail = require('../index') var user = { username: '', // with @iitg.ernet.in password: '', mailServer: '', // Among 'disang', 'teesta', 'naambor', 'tambdil', path: '', // specify relative folder where to save attachments debug: true // for extra output, defaults to false }; webmail = new Webmail(user); webmail.on('mail', function(mail) { console.log(mail) // Can socket emitter event here // For example: // socket.emit('webmail', mail); }) webmail.on('error', function(error) { console.log(error) })
import '../styles/dashboard.css'; import React, { Component } from 'react'; import FutsalsComponent from './user/futsals'; import BookingsComponent from './user/bookings'; import { Route, Link, Redirect } from 'react-router-dom'; class DashboardComponent extends Component { constructor(props) { super(props); this.state = { currentView: 'futsals' }; } checkCurrentView(view) { console.log(view); return this.state.currentView === view; } componentDidMount() { console.log(this.props.location.pathname.split('/').pop()) this.setState({ currentView: this.props.location.pathname.split('/').pop() }) } render() { return ( <div className="container-fluid dashboard-wrapper"> <div className="row dashboard"> <div className="sidebar"> <div className="top-menu"> <img className="app-logo" src={'/images/ball.png'} alt="Futsal Logo" /> <span>Futsal</span> </div> <div> <div className={`menu-item${this.checkCurrentView('futsals') ? ' current-view' : ''}`}> <span className="futsals"><Link onClick={() => this.setState({currentView: 'futsals'})} to={`${this.props.match.path}/futsals`}>Futsals</Link></span> </div> <div className={`menu-item bottom-item${this.checkCurrentView('bookings') ? ' current-view' : ''}`}> <span className="bookings"><Link onClick={() => this.setState({currentView: 'bookings'})} to={`${this.props.match.path}/bookings`}>Bookings</Link></span> </div> </div> </div> <div className="content container-fluid"> {/* <div className="row"> */} <Route exact path={this.props.match.path} render={()=> <Redirect to={`${this.props.match.path}/futsals`} />} /> <Route path={`${this.props.match.path}/futsals`} component={FutsalsComponent} /> <Route path={`${this.props.match.path}/bookings`} component={BookingsComponent} /> {/* </div> */} </div> </div> </div> ); } } export default DashboardComponent;
import React from "react"; import Login from "@components/login"; import { mount } from "enzyme"; import renderer from "react-test-renderer"; import { initializeStore } from "@store"; import { Provider } from "react-redux"; Object.defineProperty(window, "matchMedia", { writable: true, value: jest.fn().mockImplementation((query) => ({ matches: false, media: query, onchange: null, addListener: jest.fn(), // deprecated removeListener: jest.fn(), // deprecated addEventListener: jest.fn(), removeEventListener: jest.fn(), dispatchEvent: jest.fn(), })), }); const initialState = {}; const store = initializeStore(initialState); const wrapper = mount( <Provider store={store}> <Login /> </Provider> ); it("matches snapshot", () => { const tree = renderer.create(wrapper).toJSON(); expect(tree).toMatchSnapshot(); });
'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var STATE = {}; var SCREEN = []; var topWindow = void 0; var navigationProps = { navigation: { navigate: function navigate(name) { return openWindow(name); }, goBack: function goBack() { return closeWindow(); } } }; function init(_ref) { var routes = _ref.routes, config = _ref.config; STATE.routes = routes || {}; STATE.config = config || {}; console.log('StackNavigator init', STATE); } function addNavbar(screen, route) { var _screen$navigationOpt = screen.navigationOptions, _screen$navigationOpt2 = _screen$navigationOpt.window, window = _screen$navigationOpt2 === undefined ? {} : _screen$navigationOpt2, _screen$navigationOpt3 = _screen$navigationOpt.navBar, navBar = _screen$navigationOpt3 === undefined ? {} : _screen$navigationOpt3, isCloseable = _screen$navigationOpt.isCloseable, onClickBack = _screen$navigationOpt.onClickBack; var _navBar = void 0; if (OS_IOS) { if (isCloseable) { var leftNavButton = $.UI.create('Button', { title: 'Back' }); leftNavButton.addEventListener('click', onClickBack || closeWindow); screen.window.setLeftNavButton(leftNavButton); } } if (OS_ANDROID) { var displayHomeAsUp = SCREEN.length > 1 || isCloseable ? true : false; _navBar = $.UI.create('ActionBar', _.extend(navBar, { title: navBar.title || window.title || '', onHomeIconItemSelected: onClickBack || closeWindow, displayHomeAsUp: displayHomeAsUp, homeButtonEnabled: onClickBack || displayHomeAsUp ? true : false })); screen.window.add(navBar); } return _navBar; } function createWindow(name) { var route = STATE.routes[name]; SCREEN.push({}); var idx = SCREEN.length - 1; var screen = SCREEN[idx]; var controllerOptions = {}; _.extend(controllerOptions, route.options, navigationProps); screen.controller = Alloy.createController(route.controller, controllerOptions); screen.navigationOptions = {}; _.extend(screen.navigationOptions, route.navigationOptions, screen.controller.navigationOptions); var _screen$navigationOpt4 = screen.navigationOptions, _screen$navigationOpt5 = _screen$navigationOpt4.window, window = _screen$navigationOpt5 === undefined ? {} : _screen$navigationOpt5, _screen$navigationOpt6 = _screen$navigationOpt4.navBar, navBar = _screen$navigationOpt6 === undefined ? {} : _screen$navigationOpt6; var firstView = screen.controller.getView(); if (typeof firstView.open === 'function') { // window screen.window = firstView; } else { // view screen.window = $.UI.create('Window', window); screen.window.add(firstView); screen.view = firstView; } // set window properties screen.window.setTitle(window.title || navBar.title || ''); // navBar var _screen$navigationOpt7 = screen.navigationOptions.navBarHidden, navBarHidden = _screen$navigationOpt7 === undefined ? false : _screen$navigationOpt7; screen.window.setNavBarHidden(navBarHidden); if (!navBarHidden) screen.navbar = addNavbar(screen, route); // closed event screen.window.addEventListener('close', function closeFn() { screen.window.removeEventListener('close', closeFn); console.log('window closed :', screen.window.title); if (screen.view) screen.view.fireEvent('close'); // close event for $.getView.addEventListener(...); SCREEN.pop(); screen.controller.destroy(); }); return screen; } function closeWindow() { var idx = SCREEN.length - 1; var screen = SCREEN[idx]; if ((typeof screen === 'undefined' ? 'undefined' : _typeof(screen)) !== 'object') return; if (OS_IOS && idx === 0 && topWindow) { topWindow.close(); topWindow = null; return; } if (screen.window) screen.window.close(); } function openWindow(name) { // open var screen = createWindow(name); console.log('window open :', screen.window.title); if (OS_IOS) { if (!topWindow) topWindow = $.UI.create('NavigationWindow', {}); if (SCREEN.length === 1) { topWindow.window = screen.window; topWindow.open(); } else { topWindow.openWindow(screen.window); } } if (OS_ANDROID) { screen.window.open(); } if (screen.view) screen.view.fireEvent('open'); // open event for $.getView.addEventListener(...); } // exports exports.open = function () { console.log('StackNavigator open'); var _STATE$config = STATE.config, _STATE$config$initial = _STATE$config.initialRouteName, initialRouteName = _STATE$config$initial === undefined ? Object.keys(STATE.routes)[0] : _STATE$config$initial, initialRouteParams = _STATE$config.initialRouteParams; var route = STATE.routes[initialRouteName]; var navigationOptions = {}; _.extend(navigationOptions, route.navigationOptions, initialRouteParams); route.navigationOptions = navigationOptions; openWindow(initialRouteName || Object.keys(STATE.routes)[0]); }; exports.navigate = function (name) { console.log('navigate :', name); if (!name) return; openWindow(name); }; init(arguments[0]);
function setFieldStatus(P_CurrentStep, P_Status) { var rows = $('#box-area-1').next().find('.row'); ctrlBoxArea1_Row1(P_CurrentStep, P_Status, $(rows).eq(0).children()); ctrlBoxArea1_Row2(P_CurrentStep, P_Status, $(rows).eq(1).children()); rows = $('#box-area-2').next().find('.row'); ctrlBoxArea2_Row1(P_CurrentStep, P_Status, $(rows).eq(0).children()); ctrlBoxArea2_Row2(P_CurrentStep, P_Status, $(rows).eq(1).children()); ctrlBoxArea2_Row3(P_CurrentStep, P_Status, $(rows).eq(2).children()); } function ctrlBoxArea1_Row1(P_CurrentStep, P_Status, divs) { if (P_CurrentStep != '1' || P_Status == '4') { //供應商 $(divs).eq(0).addClass('col-sm-4').removeClass('col-sm-3'); $(divs).eq(0).find('div').eq(1).empty(); //選擇按鈕 $(divs).eq(1).remove(); //地址下拉選單 $(divs).eq(2).find('select').prop('disabled', true).addClass('input-disable'); } } function ctrlBoxArea1_Row2(P_CurrentStep, P_Status, divs) { if (P_CurrentStep != '1' || P_Status == '4') { //聯絡人 var value = $(divs).eq(0).children().eq(1).val(); $(divs).eq(0).children().eq(1).replaceWith('<div class="disable-text" id="ContactPerson">' + value + '</div>'); //聯絡人郵件地址 value = $(divs).eq(1).children().eq(1).val(); $(divs).eq(1).children().eq(1).replaceWith('<div class="disable-text" id="ContactEmail">' + value + '</div>'); } } function ctrlBoxArea2_Row1(P_CurrentStep, P_Status, divs) { if (P_CurrentStep != '1' || P_Status == '4') { //特殊合約單號 $(divs).eq(0).addClass('col-sm-4').removeClass('col-sm-3'); $(divs).eq(0).find('div').eq(1).empty(); //選擇按鈕 $(divs).eq(1).remove(); //發票管理人 $(divs).eq(3).children().eq(1).replaceWith('<div class="disable-text" id="invoiceLinks"></div>'); } } function ctrlBoxArea2_Row2(P_CurrentStep, P_Status, divs) { if (P_CurrentStep != '1' || P_Status == '4') { //合約起始時間 $(divs).eq(2).children().eq(1).removeClass('datetimepicker1').children().addClass('input-disable').prop('readonly', true); //合約結束時間 $(divs).eq(3).children().eq(1).removeClass('datetimepicker1').children().addClass('input-disable').prop('readonly', true); } } function ctrlBoxArea2_Row3(P_CurrentStep, P_Status, divs) { if (P_CurrentStep != '1' || P_Status == '4') { //採購備註 $(divs).eq(0).children().eq(1).replaceWith('<div class="disable-text" style="white-space:pre-line" id="PurchaseRemark"></div>'); } }
var canvasParams = { x: 1000, y: 550 } let boids = []; var numOfBoids = 20; let foods = []; var numOfFood = 2;
/** @jsx jsx */ import React from 'react'; import styled from '@emotion/styled'; import { jsx } from '@emotion/core'; import { colors } from '../../theme'; const EducationWrapper = styled('div')` background-color: ${colors.gray}; color: ${colors.white}; width: 90%; margin: auto; display: flex; flex-direction: column; padding: 0 1rem; flex-wrap: wrap; margin: 0.5rem; `; const H2 = styled('h2')` text-align: center; background-color: ${colors.black}; color: ${colors.white}; padding-bottom: 0; margin-bottom: 0; `; export const Education = () => ( <EducationWrapper> <div> <H2>Education</H2> <h3>Nackademin </h3> <p>Front-End Developer 2017-2019</p> </div> <div> <h3>Örebro University</h3> <p>Bachelor Social Science 2007-2011</p> </div> </EducationWrapper> );
const { withFilter } = require('graphql-subscriptions') const pubsub = require('../../libaries/pubsub') module.exports = { Subscription: { storeDetected: { subscribe: withFilter( () => pubsub.asyncIterator('storeDetected'), (payload, args) => { return payload.storeBranchId === args.storeBranchId } ), }, }, }
// const MongoClient = require('mongodb').MongoClient; // can call connect on MongoClient to conenct to db const { MongoClient, ObjectID } = require('mongodb'); // CONECT + INSERT // 1st arg - string - url where db lives (w/ prod it would be a heroku url, in dev - it's local port - 27017) [port + / + db we want to connect to (don't use default test one, but create a new one)] // 2nd arg - callback func fires after connection succeeds/fails (2nd arg is db obj which can use to make db commands) MongoClient.connect('mongodb://localhost:27017/TodoApp', (err, db) => { if (err) { return console.log('Unable to connect to MongoDB server'); } console.log('Connected to MongoDB server'); // 2 collections in this app - users collection and todos collection // don't need to explicitly create the collection 1st // .collection -> takes string name of collection u want to insert into // insertOne - lets u insert a new document into your collection (obj w/ key-value pairs + callback func are the arguments) /* db.collection('Todos').insertOne({ text: 'Something to do', completed: false }, (err, result) => { if (err) { return console.log('unable to insert todo - ', err); } // RESULT.OPS == all documents inserted into collection (in this case just 1, since it's insertOne) console.log(JSON.stringify(result.ops, undefined, 2)); }); */ // insert document into Users collection db.collection('Users').insertOne({ name: 'Sean', age: 25, location: 'LA' }, (err, result) => { if (err) { return console.log('unable to inser user into collection')} console.log(result.ops[0]._id.getTimestamp()); }); // closes connection db.close() })
import IssueItem from '../../components/issueItem/IssueItem' import './IssuesGroupList.css' const IssuesGropList = (props) => { const gropDateTranslation = (type) => { if (props.type === 'by_date') { return { today: 'Сегодня', week: 'Эта неделя', more_than_week: 'Больше недели' }[type] } return type } const createIssues = (items) => { if(!items) return null return props.items.map((item, i) => { if (!item.children) return ( <IssueItem key={`issue_${item.id}`} issue={item} onClick={() => props.onClick(item)} /> ) return ( <div className="issues-grop-list" key={`${item}_${i}`}> {item.groupTitle && <h3>{gropDateTranslation(item.groupTitle)}</h3>} <IssuesGropList items={item.children} onClick={props.onClick} /> </div> ) }) } return <>{createIssues(props.items)}</> } export default IssuesGropList
import React, { Component } from "react"; import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; import ListProject from "./ListProject"; import AddProject from "./AddProject"; import EditProject from "./EditProject"; class ProjectIndex extends Component { render() { return ( <Router> <Switch> <Route path="/" exact component={ListProject} /> <Route path="/AddProject" exact component={AddProject} /> <Route path="/EditProject/:id" exact component={EditProject} /> <Route path="/BackProjectList" exact component={ListProject} /> </Switch> </Router> ); } } export default ProjectIndex;
import { useContext, useState } from 'react'; import { gql, useQuery } from '@apollo/client'; import TextField from '@material-ui/core/TextField'; import { CircularProgress, List, ListItem, ListItemSecondaryAction, ListItemText, } from '@material-ui/core'; import Button from '@material-ui/core/Button'; import { Create, MailOutline } from '@material-ui/icons'; import UserContext from './auth/UserContext'; import Link from 'next/link'; const SEARCH_QUERY = gql` query($keyword: String!) { searchUsers(keyword: $keyword) { id name email grade } } `; const UserFilter = () => { const [keyword, setKeyword] = useState(''); const { data, loading } = useQuery(SEARCH_QUERY, { variables: { keyword }, }); const authUser = useContext(UserContext); return ( <div style={{ width: '90%' }}> <TextField value={keyword} onChange={ev => setKeyword(ev.target.value)} label={'Find Person'} variant={'outlined'} color={'primary'} fullWidth /> <div style={{ height: 400, borderRadius: 10, background: 'rgba(0, 0, 0, 0.05)', overflow: 'auto', }} > {!keyword && ( <p style={{ textAlign: 'center', color: 'grey', padding: '3rem' }}> Start typing to find your friends </p> )} {keyword && loading && ( <div style={{ width: '100%', textAlign: 'center', padding: '3rem' }}> <CircularProgress /> </div> )} {keyword && data && ( <List> {data.searchUsers.map(user => ( <ListItem> <ListItemText primary={user.name} secondary={ <> {user.email} <br />{user.grade}th grade </> } /> <ListItemSecondaryAction> <Link href={'/write-to/' + user.id}> {authUser.lettersSent.some( letter => letter.to.id === user.id ) ? ( <Button startIcon={<Create />} color={'primary'} variant={'outlined'} > Edit{' '} </Button> ) : ( <Button startIcon={<MailOutline />} color={'secondary'} variant={'outlined'} > Write </Button> )} </Link> </ListItemSecondaryAction> </ListItem> ))} </List> )} </div> </div> ); }; export default UserFilter;
import React from "react"; import { Route } from "react-router-dom"; class CreateUser extends React.Component { state = { name: "" }; render() { return ( <div className="create-user"> <div className="pure-g"> <div className="pure-u-1"> <h2>Welcome!</h2> <form className="pure-form pure-form-stacked" onSubmit={() => { this.props.createUser(this.state.name); this.props.history.push("/new-post"); this.setState({ name: "" }); }} > <label htmlFor="name"> Please tell us your name to get started </label> <input className="pure-input-1" id="name" type="text" required onChange={event => this.setState({ name: event.target.value })} value={this.state.name} /> <button type="submit" className="pure-button pure-button-primary"> Continue </button> </form> </div> </div> </div> ); } } const CreateUserPage = ({ createUser }) => ( <Route exact path="/" component={props => <CreateUser createUser={createUser} {...props} />} /> ); export default CreateUserPage;
import { SET_TODOS, ADD_TODO, UPDATE_TODO, REMOVE_TODO, ROLLBACK, REQ_POST_TODO, REQ_GET_TODOS, REQ_DELETE_TODO, REQ_PUT_TODO } from "../actions/types"; const defaultState = []; function alertAndLogError(error) { console.error(error); error.alertMessage && alert(error.alertMessage); } export default function(todos = defaultState, action) { switch (action.type) { case REQ_GET_TODOS: case REQ_POST_TODO: case REQ_DELETE_TODO: case REQ_PUT_TODO: return todos; case SET_TODOS: return action.todos; case ADD_TODO: return [...todos, action.todo]; case UPDATE_TODO: return todos.map(todo => todo._id === action.todo._id ? action.todo : todo ); case REMOVE_TODO: return todos.filter(todo => todo._id !== action.id); case ROLLBACK: return action.originalTodos; default: return todos; } }
import React from 'react'; import Table from '../../Table/Table'; import { formatDate } from '../../../utils'; function AddressesTable({ addresses, onDelete }) { const columns = [ { title: 'Адрес', styles: { style: { color: 'rgba(0, 0, 0, 0.4)' }, itemCondition: item => item.addedAt === null } }, { title: 'Дата добавления', format: date => date ? formatDate(date) : 'Добавляется...', styles: { style: { color: 'rgba(0, 0, 0, 0.4)' }, condition: value => value === null } }, { title: 'Привязанный пользователь', subColumns: [ { title:'Имя', accessor: value => value.name , format: value => value ? value : '—', styles: { style: { color: 'rgba(0, 0, 0, 0.4)' }, condition: value => value === null } }, { title:'Почта', accessor: value => value.mail, format: value => value ? value : '—', styles: { style: { color: 'rgba(0, 0, 0, 0.4)' }, condition: value => value === null } }, { title:'Роль', accessor: value => value.role, format: value => value ? value : '—', styles: { style: { color: 'rgba(0, 0, 0, 0.4)' }, condition: value => value === null } } ] }, ]; const actions = [ <button className={ 'secondary-button hidden' } onClick={ onDelete }>Удалить</button> ]; return ( <Table columns={ columns } data={ addresses } actions={ actions } /> ); } export default AddressesTable;
exports.actors = [ { actor: { identity: { low: 15766, high: 0 }, labels: ['Actor', 'Person'], properties: { tmdbId: '12899', imdbId: '0001815', born: { year: { low: 1949, high: 0 }, month: { low: 6, high: 0 }, day: { low: 15, high: 0 } }, name: 'Jim Varney', bio: 'James Albert "Jim" Varney, Jr.  (June 15, 1949 – February 10, 2000) was ' + 'an American actor, voice artist, and comedian, best known for his role ' + 'as Ernest P. Worrell, who was used in numerous television ' + 'commercial campaigns and movies in the following years, giving Varney fame ' + 'nationally in the United States...', died: { year: { low: 2000, high: 0 }, month: { low: 2, high: 0 }, day: { low: 10, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/j2De8KaACIbi4IX8WfUZGmCW1k2.jpg', url: 'https://themoviedb.org/person/12899' } }, movieTitle: 'Toy Story', role: 'Slinky Dog (voice)' }, { actor: { identity: { low: 18107, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Denver, Colorado, USA', tmdbId: '12898', imdbId: '0000741', born: { year: { low: 1953, high: 0 }, month: { low: 6, high: 0 }, day: { low: 13, high: 0 } }, name: 'Tim Allen', bio: 'Tim Allen (born Timothy Allen Dick; June 13, 1953) is an American comedian, actor, voice-over artist, and entertainer, known for his role in the sitcom Home Improvement. He is also known for his film roles in several popular movies, including the Toy Story series, The Santa Clause series, and Galaxy Quest...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/6qlDjidQSKNcJFHzTXh0gQS83ub.jpg', url: 'https://themoviedb.org/person/12898' } }, movieTitle: 'Toy Story', role: 'Buzz Lightyear (voice)' }, { actor: { identity: { low: 14838, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Concord, California, USA', tmdbId: '31', imdbId: '0000158', born: { year: { low: 1956, high: 0 }, month: { low: 7, high: 0 }, day: { low: 9, high: 0 } }, name: 'Tom Hanks', bio: 'Thomas Jeffrey Hanks (born July 9, 1956) is an American actor and filmmaker. Known for both his comedic and dramatic roles, Hanks is one of the most popular and recognizable film stars worldwide, and is widely regarded as an American cultural icon. \n\nHanks made his breakthrough with leading roles in the comedies Splash (1984) and Big (1988)...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/mKr8PN8sn80LzVaZMg8L52kmakm.jpg', url: 'https://themoviedb.org/person/31' } }, movieTitle: 'Toy Story', role: 'Woody (voice)' }, { actor: { identity: { low: 12086, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Queens, New York, U.S.', tmdbId: '7167', imdbId: '0725543', born: { year: { low: 1926, high: 0 }, month: { low: 5, high: 0 }, day: { low: 8, high: 0 } }, name: 'Don Rickles', bio: 'Don Rickles, nicknamed "Mr. Warmth", was an American stand-up comedian and actor. He acted in comedic and dramatic roles, but is best known as an insult comic. He enjoyed a sustained career as such, thanks to his distinctive humor, wit, and impeccable timing. Rickles frequently appeared as a guest on The Tonight Show Starring Johnny Carson...', died: { year: { low: 2017, high: 0 }, month: { low: 4, high: 0 }, day: { low: 6, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/iJLQV4dcbTUgxlWJakjDldzlMXS.jpg', url: 'https://themoviedb.org/person/7167' } }, movieTitle: 'Toy Story', role: 'Mr. Potato Head (voice)' }, { actor: { identity: { low: 14163, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Chicago - Illinois - USA', tmdbId: '2157', imdbId: '0000245', born: { year: { low: 1951, high: 0 }, month: { low: 7, high: 0 }, day: { low: 21, high: 0 } }, name: 'Robin Williams', bio: 'Robin McLaurin Williams (July 21, 1951 – August 11, 2014) was an American actor and stand-up comedian. Rising to fame with his role as the alien Mork in the TV series Mork & Mindy (1978–1982), Williams went on to establish a successful career in both stand-up comedy and feature film acting...', died: { year: { low: 2014, high: 0 }, month: { low: 8, high: 0 }, day: { low: 11, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/iYdeP6K0qz44Wg2Nw9LPJGMBkQ5.jpg', url: 'https://themoviedb.org/person/2157' } }, movieTitle: 'Jumanji', role: 'Alan Parrish' }, { actor: { identity: { low: 18474, high: 0 }, labels: ['Actor', 'Person'], properties: { tmdbId: '145151', imdbId: '0682300', born: { year: { low: 1982, high: 0 }, month: { low: 10, high: 0 }, day: { low: 23, high: 0 } }, name: 'Bradley Pierce', bio: 'Bradley Pierce began acting at age 6 and has since appeared in various projects ranging from commercial and voiceover to television and film. He is best known for his role as Peter in the 1995 film, Jumanji, as well as voicing Chip in Disney’s original Beauty and the Beast. Other notable roles include voicing Tails in the Saturday morning cartoon series, Sonic the Hedgehog, and a starring role in The Borrowers with John Goodman...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/j6iW0vVA23GQniAPSYI6mi4hiEW.jpg', url: 'https://themoviedb.org/person/145151' } }, movieTitle: 'Jumanji', role: 'Peter Shepherd' }, { actor: { identity: { low: 18473, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Point Pleasant, New Jersey, USA', tmdbId: '205', imdbId: '0000379', born: { year: { low: 1982, high: 0 }, month: { low: 4, high: 0 }, day: { low: 30, high: 0 } }, name: 'Kirsten Dunst', bio: 'Kirsten Caroline Dunst (born April 30, 1982) is an American actress, singer and model. She made her film debut in Oedipus Wrecks, a short film directed by Woody Allen for the anthology New York Stories (1989). At the age of 12, Dunst gained widespread recognition playing the role of vampire Claudia in Interview with the Vampire (1994), a performance for which she was nominated for a Golden Globe Award for Best Supporting Actress. The same year she appeared in Little Women, to further acclaim...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/5dI5s8Oq2Ook5PFzTWMW6DCXVjm.jpg', url: 'https://themoviedb.org/person/205' } }, movieTitle: 'Jumanji', role: 'Judy Shepherd' }, { actor: { identity: { low: 18472, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Brisbane, Australia', tmdbId: '8537', imdbId: '0404993', born: { year: { low: 1948, high: 0 }, month: { low: 5, high: 0 }, day: { low: 21, high: 0 } }, name: 'Jonathan Hyde', bio: 'Jonathan Hyde (born 21 May 1948) is an Australian-born English actor, well known for his roles as J. Bruce Ismay, the managing director of the White Star Line in Titanic, Egyptologist Allen Chamberlain in The Mummy and Sam Parrish/Van Pelt, the hunter in Jumanji. He is married to the Scottish soprano Isobel Buchanan. They have two daughters, one of which is the actress Georgia King. \n\nHyde was born in Brisbane, Queensland. He is a member of the Royal Shakespeare Company...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/1jYyW3B5omvMTVfEswqQQBrHN2.jpg', url: 'https://themoviedb.org/person/8537' } }, movieTitle: 'Jumanji', role: 'Samuel Alan Parrish / Van Pelt' }, { actor: { identity: { low: 11479, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'New York City, New York, USA', tmdbId: '6837', imdbId: '0000527', born: { year: { low: 1920, high: 0 }, month: { low: 10, high: 0 }, day: { low: 1, high: 0 } }, name: 'Walter Matthau', bio: 'Walter Matthau (October 1, 1920 – July 1, 2000) was an American actor and comedian. He has won an Academy Award, a Golden Globe Award, a BAFTA, and two Tony Awards, and has been nominated for a Primetime Emmy Award...', died: { year: { low: 2000, high: 0 }, month: { low: 7, high: 0 }, day: { low: 1, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/c3dCBlyf12yTNhS2sdSXRFaBatj.jpg', url: 'https://themoviedb.org/person/6837' } }, movieTitle: 'Grumpier Old Men', role: 'Max Goldman' }, { actor: { identity: { low: 11989, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Valsjöbyn, Jämtlands län, Sweden', tmdbId: '13567', imdbId: '0000268', born: { year: { low: 1941, high: 0 }, month: { low: 4, high: 0 }, day: { low: 28, high: 0 } }, name: 'Ann-Margret', bio: 'Ann-Margret Olsson (born April 28, 1941) is a Swedish-American actress, singer and dancer whose professional name is Ann-Margret. She is best known for her roles in Bye Bye Birdie (1963), Viva Las Vegas (1964), The Cincinnati Kid (1965), Carnal Knowledge (1971), and Tommy (1975). She has won five Golden Globe Awards and been nominated for two Academy Awards, two Grammy Awards, a Screen Actors Guild Award, and six Emmy Awards...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/7cq76gMW4Mal5cctMLCK8wilJ6.jpg', url: 'https://themoviedb.org/person/13567' } }, movieTitle: 'Grumpier Old Men', role: 'Ariel Gustafson' }, { actor: { identity: { low: 11332, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Newton, Massachusetts, USA', tmdbId: '3151', imdbId: '0000493', born: { year: { low: 1925, high: 0 }, month: { low: 2, high: 0 }, day: { low: 8, high: 0 } }, name: 'Jack Lemmon', bio: 'John Uhler "Jack" Lemmon III (February 8, 1925 – June 27, 2001) was an American actor and musician...', died: { year: { low: 2001, high: 0 }, month: { low: 6, high: 0 }, day: { low: 27, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/4yowflZgO62PGTPADoFzkYSrZv.jpg', url: 'https://themoviedb.org/person/3151' } }, movieTitle: 'Grumpier Old Men', role: 'John Gustafson' }, { actor: { identity: { low: 11568, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: ' Rome, Italy', tmdbId: '16757', imdbId: '0000047', born: { year: { low: 1934, high: 0 }, month: { low: 9, high: 0 }, day: { low: 20, high: 0 } }, name: 'Sophia Loren', bio: 'Sophia Loren, OMRI (born Sofia Villani Scicolone; 20 September 1934) is an Italian actress. \n\nIn 1962, Loren won the Academy Award for Best Actress for her role in Two Women, along with 21 awards, becoming the first actress to win an Academy Award for a non-English-speaking performance. Loren has won 50 international awards, including an Oscar, seven Golden Globe Awards, a Grammy Award, a BAFTA Award and a Laurel Award...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/94Kglg5dsAgOKG76230FFN7m6W3.jpg', url: 'https://themoviedb.org/person/16757' } }, movieTitle: 'Grumpier Old Men', role: 'Maria Sophia Coletta Ragetti' }, { actor: { identity: { low: 17108, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Newark, New Jersey, USA ', tmdbId: '8851', imdbId: '0001365', born: { year: { low: 1963, high: 0 }, month: { low: 8, high: 0 }, day: { low: 9, high: 0 } }, name: 'Whitney Houston', bio: 'From Wikipedia, the free encyclopedia\n\nWhitney Elizabeth Houston (born August 9, 1963 - February 11, 2012) was an American R&B/pop singer, actress, and former fashion model. Houston is the most awarded female artist of all time, according to Guinness World Records, and her list of awards include 2 Emmy Awards, 6 Grammy Awards, 16 Billboard Music Awards, 22 American Music Awards, among a total of 415 career awards as of 2010...', died: { year: { low: 2012, high: 0 }, month: { low: 2, high: 0 }, day: { low: 11, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/5su69sRCQReFTS94j2OtcgIQLne.jpg', url: 'https://themoviedb.org/person/8851' } }, movieTitle: 'Waiting to Exhale', role: 'Savannah Jackson' }, { actor: { identity: { low: 18693, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Los Angeles, California, USA', tmdbId: '51359', imdbId: '0005375', born: { year: { low: 1964, high: 0 }, month: { low: 4, high: 0 }, day: { low: 17, high: 0 } }, name: 'Lela Rochon', bio: 'Lela Rochon (born Lela Rochon Staples; April 17, 1964) is an American actress who is best known for her role as Robin Stokes in the movie Waiting to Exhale. \n\nIn 1996, Lela was chosen by People (USA) magazine as one of the "50 most beautiful people in the world". \n\nDescription above from the Wikipedia article Lela Rochon, licensed under CC-BY-SA, full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/9DBu3r5O4fBosSS4FnSzFCVpm0O.jpg', url: 'https://themoviedb.org/person/51359' } }, movieTitle: 'Waiting to Exhale', role: 'Robin Stokes' }, { actor: { identity: { low: 16863, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'New York City, New York, USA', tmdbId: '9780', imdbId: '0000291', born: { year: { low: 1958, high: 0 }, month: { low: 8, high: 0 }, day: { low: 16, high: 0 } }, name: 'Angela Bassett', bio: "Angela Evelyn Bassett (born August 16, 1958) is an American actress and activist. She is best known for her biographical film roles, most notably her performance as Tina Turner in the biopic What's Love Got to Do with It (1993), for which she was nominated for the Academy Award for Best Actress and won a corresponding Golden Globe Award...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/7Oz53NKdglRzAzI2MKjM3eQXwn.jpg', url: 'https://themoviedb.org/person/9780' } }, movieTitle: 'Waiting to Exhale', role: 'Bernie Harris' }, { actor: { identity: { low: 18692, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Houston, Texas, USA', tmdbId: '18284', imdbId: '0222643', born: { year: { low: 1949, high: 0 }, month: { low: 8, high: 0 }, day: { low: 21, high: 0 } }, name: 'Loretta Devine', bio: 'Loretta Devine was born on August 21, 1949 in Houston, Texas. She graduated from the University of Houston in 1971 with a Bachelor of Arts in Speech and Drama and BrandeisUniversity in 1976 with a MFA in Theater. Devine is a member of The Epsilon Lambda Chapter of the Alpha Kappa Alpha Sorority. She began her career on Broadway starring in Dreamgirls. Minor roles for Devine followed in films such as Little Nikita (1988) and Stanley &amp; Iris (1990)...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/29h4c21HpwHJk4q0kj7ymSflDnB.jpg', url: 'https://themoviedb.org/person/18284' } }, movieTitle: 'Waiting to Exhale', role: 'Gloria Matthews' }, { actor: { identity: { low: 13908, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Waco, Texas, USA', tmdbId: '67773', imdbId: '0000188', born: { year: { low: 1945, high: 0 }, month: { low: 8, high: 0 }, day: { low: 14, high: 0 } }, name: 'Steve Martin', bio: "Stephen Glenn \"Steve\" Martin (born August 14, 1945) is an American actor, comedian, writer, playwright, producer, musician and composer. \n\nMartin was born in Waco, Texas, and raised in Southern California, where his early influences were working at Disneyland and Knott's Berry Farm and working magic and comedy acts at these and other smaller venues in the area...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/d0KthX8hVWU9BxTCG1QUO8FURRm.jpg', url: 'https://themoviedb.org/person/67773' } }, movieTitle: 'Father of the Bride Part II', role: 'George Banks' }, { actor: { identity: { low: 16921, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Rye - New York - USA', tmdbId: '70696', imdbId: '0931090', born: { year: { low: 1971, high: 0 }, month: { low: 9, high: 0 }, day: { low: 14, high: 0 } }, name: 'Kimberly Williams-Paisley', bio: "From Wikipedia, the free encyclopedia. \n\nKimberly Williams-Paisley (born September 14, 1971, height 5' 5\" (1,65 m)) is an American actress and director, who is perhaps best known for her co-starring role on the ABC sitcom, According to Jim, as well as her breakthrough performance in the popular comedy film, Father of the Bride, for which she was nominated for several awards (along with its sequel, Father of the Bride Part II)...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/qJ4kWr4mDeKWenPeMOff8VtuAIq.jpg', url: 'https://themoviedb.org/person/70696' } }, movieTitle: 'Father of the Bride Part II', role: 'Annie Banks-MacKenzie' }, { actor: { identity: { low: 13054, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Los Angeles, California, USA', tmdbId: '3092', imdbId: '0000473', born: { year: { low: 1946, high: 0 }, month: { low: 1, high: 0 }, day: { low: 5, high: 0 } }, name: 'Diane Keaton', bio: 'American film actress Diane Keaton (Born Diane Hall), began her career on stage and got her first major role in the Broadway rock musical "Hair" as understudy to the lead. Keaton made her film debut in the 1972 screen adaptation of Woody Allen’s Broadway play "Play It Again, Sam". That same year Keaton was cast in her first major film role as Kay Adams-Corleone in the Oscar-winning movie “The Godfather”...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/7gEdH5vGwpUpogscTb2JivnoRBb.jpg', url: 'https://themoviedb.org/person/3092' } }, movieTitle: 'Father of the Bride Part II', role: 'Nina Banks' }, { actor: { identity: { low: 15627, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Hamilton, Ontario, Canada', tmdbId: '519', imdbId: '0001737', born: { year: { low: 1950, high: 0 }, month: { low: 3, high: 0 }, day: { low: 26, high: 0 } }, name: 'Martin Short', bio: 'From Wikipedia, the free encyclopedia. \n\nMartin Hayter Short, CM (born March 26, 1950) is a Canadian comedian, actor, writer, singer and producer. He is best known for his comedy work, particularly on the TV programs SCTV and Saturday Night Live. He has also starred in many popular comedic films such as Three Amigos, Innerspace, Pure Luck, Jungle 2 Jungle, Mars Attacks!, Father of the Bride, and Father of the Bride Part 2...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/3bNEYDwMWrJeOpX1huLlKK48QnO.jpg', url: 'https://themoviedb.org/person/519' } }, movieTitle: 'Father of the Bride Part II', role: 'Franck Eggelhoffer' }, { actor: { identity: { low: 13024, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'New York City, New York, USA', tmdbId: '1158', imdbId: '0000199', born: { year: { low: 1940, high: 0 }, month: { low: 4, high: 0 }, day: { low: 25, high: 0 } }, name: 'Al Pacino', bio: "Alfredo James \"Al\" Pacino (born April 25, 1940) is an American film and stage actor and director. He is famous for playing mobsters, including Michael Corleone in The Godfather trilogy, Tony Montana in Scarface, Alphonse \"Big Boy\" Caprice in Dick Tracy and Carlito Brigante in Carlito's Way, though he has also appeared several times on the other side of the law — as a police officer, detective and a lawyer...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/sLsw9Dtj4mkL8aPmCrh38Ap9Xhq.jpg', url: 'https://themoviedb.org/person/1158' } }, movieTitle: 'Heat', role: 'Lt. Vincent Hanna' }, { actor: { identity: { low: 13100, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Greenwich Village, New York City, New York, USA', tmdbId: '380', imdbId: '0000134', born: { year: { low: 1943, high: 0 }, month: { low: 8, high: 0 }, day: { low: 17, high: 0 } }, name: 'Robert De Niro', bio: "Robert De Niro, Jr. (born August 17, 1943) is an American actor, director, and producer. \n\nHis first major film role was in 1973's Bang the Drum Slowly. In 1974, he played the young Vito Corleone in The Godfather Part II, a role that won him the Academy Award for Best Supporting Actor. His longtime collaboration with Martin Scorsese began with 1973's Mean Streets, and earned De Niro an Academy Award for Best Actor for his portrayal of Jake LaMotta in the 1980 film, Raging Bull...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/cT8htcckIuyI1Lqwt1CvD02ynTh.jpg', url: 'https://themoviedb.org/person/380' } }, movieTitle: 'Heat', role: 'Neil McCauley' }, { actor: { identity: { low: 15062, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Los Angeles, California, USA', tmdbId: '5576', imdbId: '0000174', born: { year: { low: 1959, high: 0 }, month: { low: 12, high: 0 }, day: { low: 31, high: 0 } }, name: 'Val Kilmer', bio: 'Val Edward Kilmer (born December 31, 1959) is an American actor. Originally a stage actor, Kilmer became popular in the mid-1980s after a string of appearances in comedy films, starting with Top Secret! (1984), then the cult classic Real Genius (1985), as well as blockbuster action films, including a role in Top Gun and a lead role in Willow...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/asscfTVTglxMBEeJiDYxUXM4bm9.jpg', url: 'https://themoviedb.org/person/5576' } }, movieTitle: 'Heat', role: 'Chris Shiherlis' }, { actor: { identity: { low: 12672, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Yonkers, New York, USA', tmdbId: '10127', imdbId: '0000685', born: { year: { low: 1938, high: 0 }, month: { low: 12, high: 0 }, day: { low: 29, high: 0 } }, name: 'Jon Voight', bio: 'Jonathan Vincent "Jon" Voight is an American actor. He has received an Academy Award, out of four nominations, and three Golden Globe Awards, out of nine nominations. \n\nVoight came to prominence in the late 1960s with his performance as a would-be gigolo in Midnight Cowboy (1969)...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/h5jKQHLRQqqgvsfCXgxxtywx7UQ.jpg', url: 'https://themoviedb.org/person/10127' } }, movieTitle: 'Heat', role: 'Nate' }, { actor: { identity: { low: 17362, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Epsom - Surrey - England - UK', tmdbId: '15887', imdbId: '0000566', born: { year: { low: 1965, high: 0 }, month: { low: 1, high: 0 }, day: { low: 4, high: 0 } }, name: 'Julia Ormond', bio: "​From Wikipedia, the free encyclopedia. \n\nJulia Karin Ormond  (born 4 January 1965 height 5' 7½\" (1,71 m)) is an English actress who has appeared in film and television and on stage...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/u7Oz6nHfMSlXuT34K7Ffp4f2qgP.jpg', url: 'https://themoviedb.org/person/15887' } }, movieTitle: 'Sabrina', role: 'Sabrina Fairchild' }, { actor: { identity: { low: 13694, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Chicago, Illinois, USA', tmdbId: '3', imdbId: '0000148', born: { year: { low: 1942, high: 0 }, month: { low: 7, high: 0 }, day: { low: 13, high: 0 } }, name: 'Harrison Ford', bio: 'Legendary Hollywood Icon Harrison Ford was born on July 13, 1942 in Chicago, Illinois.   His family history includes a strong lineage of actors, radio personalities, and models.   Harrison attended public high school in Park Ridge, Illinois where he was a member of the school Radio Station WMTH.  Harrison worked as the lead voice for sports reporting at WMTH for several years.   Acting wasn’t a major interest to Ford until his junior year at Ripon College when he first took an acting class...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/5M7oN3sznp99hWYQ9sX0xheswWX.jpg', url: 'https://themoviedb.org/person/3' } }, movieTitle: 'Sabrina', role: 'Linus Larrabee' }, { actor: { identity: { low: 18615, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Buffalo, New York, USA', tmdbId: '12957', imdbId: '0545408', born: { year: { low: 1928, high: 0 }, month: { low: 6, high: 0 }, day: { low: 19, high: 0 } }, name: 'Nancy Marchand', died: { year: { low: 2000, high: 0 }, month: { low: 6, high: 0 }, day: { low: 18, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/pIpv6wtSo5gP3cM90ivq0vqlJsi.jpg', url: 'https://themoviedb.org/person/12957' } }, movieTitle: 'Sabrina', role: 'Maude Larrabee' }, { actor: { identity: { low: 18614, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Logansport - Indiana - USA', tmdbId: '17141', imdbId: '0001427', born: { year: { low: 1963, high: 0 }, month: { low: 6, high: 0 }, day: { low: 17, high: 0 } }, name: 'Greg Kinnear', bio: "Gregory \"Greg\" Kinnear (born June 17, 1963) is an American actor and television personality, who first rose to stardom as the first host of E!'s Talk Soup. He has appeared in more than 20 motion pictures. Kinnear was nominated for an Academy Award for his role in As Good as It Gets. \n\nDescription above from the Wikipedia article Greg Kinnear, licensed under CC-BY-SA, full list of contributors on Wikipedia...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/iJezGc9XjY0DFPs00SypkuKImFK.jpg', url: 'https://themoviedb.org/person/17141' } }, movieTitle: 'Sabrina', role: 'David Larrabee' }, { actor: { identity: { low: 17994, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Bethlehem, Pennsylvania, USA', tmdbId: '53283', imdbId: '0001795', born: { year: { low: 1981, high: 0 }, month: { low: 9, high: 0 }, day: { low: 8, high: 0 } }, name: 'Jonathan Taylor Thomas', bio: "Jonathan Taylor Thomas is an American actor, voice actor, former child star, and teen idol. \n\nHe is well known for his role of middle child Randy Taylor on the sitcom Home Improvement, as Tom Sawyer in the Disney film Tom and Huck, and as the voice of the young Simba in Disney's The Lion King...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/E4cAiS5ge08euPEXrGLKhQX7cj.jpg', url: 'https://themoviedb.org/person/53283' } }, movieTitle: 'Tom and Huck', role: 'Tom Sawyer' }, { actor: { identity: { low: 18221, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Knoxville, Tennessee, U.S.', tmdbId: '51214', imdbId: '0000605', born: { year: { low: 1982, high: 0 }, month: { low: 7, high: 0 }, day: { low: 25, high: 0 } }, name: 'Brad Renfro', bio: 'Brad Barron Renfro was an American actor born on July 25, 1982 in Knoxville, Tennessee, to Angela Denise McCrory and Mark Renfro, a factory worker. He was discovered at age 10 by director Joel Schumacher and made his film debut cast in the lead role of the motion picture The Client (1994), which starred Susan Sarandon and Tommy Lee Jones. Although this would be his zenith, he went on to appear in other films, including The Cure (1995), Tom and Huck (1995), Sleepers (1996), and Apt Pupil (1998)...', died: { year: { low: 2008, high: 0 }, month: { low: 1, high: 0 }, day: { low: 15, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/sboIOdBAvNZj894aP5XCqxF9zHG.jpg', url: 'https://themoviedb.org/person/51214' } }, movieTitle: 'Tom and Huck', role: 'Huck Finn' }, { actor: { identity: { low: 17210, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Inuvik, Northwest Territories, Canada', tmdbId: '57448', imdbId: '0777760', born: { year: { low: 1967, high: 0 }, month: { low: 6, high: 0 }, day: { low: 19, high: 0 } }, name: 'Eric Schweig', bio: "​From Wikipedia, the free encyclopedia\n\nEric Schweig (born Ray Dean Thrasher on 19 June 1967  ) is a Canadian actor best known for his role as Chingachgook's son Uncas in The Last of the Mohicans (1992). \n\nDescription the Wikipedia article Eric Schweig, licensed under CC-BY-SA, full list of contributors on Wikipedia...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/u2J5KUwenwVxRqMTLRvAYqZqwmf.jpg', url: 'https://themoviedb.org/person/57448' } }, movieTitle: 'Tom and Huck', role: 'Injun Joe' }, { actor: { identity: { low: 17960, high: 0 }, labels: ['Actor', 'Person'], properties: { tmdbId: '7867', imdbId: '0734236', born: { year: { low: 1949, high: 0 }, month: { low: 8, high: 0 }, day: { low: 24, high: 0 } }, name: 'Charles Rocket', died: { year: { low: 2005, high: 0 }, month: { low: 10, high: 0 }, day: { low: 7, high: 0 } }, url: 'https://themoviedb.org/person/7867' } }, movieTitle: 'Tom and Huck', role: 'Judge Thatcher' }, { actor: { identity: { low: 15708, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Sint-Agatha Berchem, Belgium', tmdbId: '15111', imdbId: '0000241', born: { year: { low: 1960, high: 0 }, month: { low: 10, high: 0 }, day: { low: 18, high: 0 } }, name: 'Jean-Claude Van Damme', bio: 'Van Damme was born Jean-Claude Camille François van Varenberg in Berchem-Sainte-Agathe, Brussels, Belgium, to Eliana and Eugène van Varenberg, an accountant. “The Muscles from Brussels” started martial arts at the age of eleven. His father introduced him to martial arts when he saw his son was physically weak. At the age of 12, van Damme began his martial arts training at Centre National De Karate (National Center of Karate) under the guidance of Master Claude Goetz in Ixelles, Belgium...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/vugNQUOjsNGRO4nDAi3oHCDucI7.jpg', url: 'https://themoviedb.org/person/15111' } }, movieTitle: 'Sudden Death', role: 'Darren Francis Thomas McCord' }, { actor: { identity: { low: 14418, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Snyder, Texas, U.S.', tmdbId: '6280', imdbId: '0000959', born: { year: { low: 1948, high: 0 }, month: { low: 6, high: 0 }, day: { low: 1, high: 0 } }, name: 'Powers Boothe', bio: 'From Wikipedia, the free encyclopedia. \n\nPowers Allen Boothe (born June 1, 1948) is an American television and film actor. Some of his most notable roles include his Emmy-winning 1980 portrayal of Jim Jones and his turn as Cy Tolliver on Deadwood, as well as Vice-President Noah Daniels on 24. \n\nDescription above from the Wikipedia article Powers Boothe, licensed under CC-BY-SA, full list of contributors on Wikipedia...', died: { year: { low: 2017, high: 0 }, month: { low: 5, high: 0 }, day: { low: 14, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/qk1KVY5N83MsO4Qvg4W1JA8SNFH.jpg', url: 'https://themoviedb.org/person/6280' } }, movieTitle: 'Sudden Death', role: 'Joshua Foss' }, { actor: { identity: { low: 16323, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Hempstead, Long Island, New York, USA', tmdbId: '10361', imdbId: '0000855', born: { year: { low: 1939, high: 0 }, month: { low: 3, high: 0 }, day: { low: 14, high: 0 } }, name: 'Raymond J. Barry', bio: 'Raymond J. Barry (born March 14, 1939) is an American film, television and stage actor...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/gDAchPBmFMKtUsqgHfzn3mX6SEM.jpg', url: 'https://themoviedb.org/person/10361' } }, movieTitle: 'Sudden Death', role: 'Vice President Daniel Bender' }, { actor: { identity: { low: 17949, high: 0 }, labels: ['Actor', 'Person'], properties: { name: 'Whittni Wright', tmdbId: '79088', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/8BN51oulcgW79gK5U80FKaIXzRf.jpg', imdbId: '0942925', url: 'https://themoviedb.org/person/79088' } }, movieTitle: 'Sudden Death', role: 'Emily McCord' }, { actor: { identity: { low: 15546, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Navan, County Meath, Ireland', tmdbId: '517', imdbId: '0000112', born: { year: { low: 1953, high: 0 }, month: { low: 5, high: 0 }, day: { low: 16, high: 0 } }, name: 'Pierce Brosnan', bio: "Pierce Brendan Brosnan, OBE (16 May 1953) is an Irish actor, film producer and environmentalist who holds Irish and American citizenship. \n\nAfter leaving school at 16, Brosnan began training in commercial illustration, but trained at the Drama Centre in London for three years. Following a stage acting career he rose to popularity in the television series Remington Steele (1982–87). After Remington Steele, Brosnan took the lead in many films such as Dante's Peak and The Thomas Crown Affair...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/dzXVwwJLPwiZeXOnf7YxorqVEEM.jpg', url: 'https://themoviedb.org/person/517' } }, movieTitle: 'GoldenEye', role: 'James Bond' }, { actor: { identity: { low: 18409, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Amstelveen, Noord-Holland, Netherlands', tmdbId: '10696', imdbId: '0000463', born: { year: { low: 1964, high: 0 }, month: { low: 11, high: 0 }, day: { low: 5, high: 0 } }, name: 'Famke Janssen', bio: 'A Dutch actress, director, screenwriter, and former fashion model. She is known for playing the villainous Bond girl Xenia Onatopp in GoldenEye (1995), Jean Grey/Phoenix in the X-Men film series (2000–2013), and Lenore Mills in Taken (2008), and its sequel, Taken 2 (2012). In 2008, she was appointed a Goodwill Ambassador for Integrity by United Nations. She made her directorial debut with Bringing Up Bobby in 2011...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/bdbGX6ac0FHuboQKpV1xdwkqOpB.jpg', url: 'https://themoviedb.org/person/10696' } }, movieTitle: 'GoldenEye', role: 'Xenia Onatopp' }, { actor: { identity: { low: 17262, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Sheffield, South Yorkshire, England, UK', tmdbId: '48', imdbId: '0000293', born: { year: { low: 1959, high: 0 }, month: { low: 4, high: 0 }, day: { low: 17, high: 0 } }, name: 'Sean Bean', bio: "Shaun Mark \"Sean\" Bean (born 17 April 1959) is an English film and stage actor. Bean is best known for starring roles in the films Lord of the Rings: The Fellowship of the Ring, GoldenEye, Patriot Games, Troy, National Treasure and Silent Hill, as well as the television series Sharpe. Bean has also acted in a number of television productions, most recent being HBO's Game of Thrones, as well as performing voice work for computer games and television adverts...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/kTjiABk3TJ3yI0Cto5RsvyT6V3o.jpg', url: 'https://themoviedb.org/person/48' } }, movieTitle: 'GoldenEye', role: 'Alec Trevelyan' }, { actor: { identity: { low: 18408, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Białystok, Poland', tmdbId: '10695', imdbId: '0001713', born: { year: { low: 1970, high: 0 }, month: { low: 6, high: 0 }, day: { low: 4, high: 0 } }, name: 'Izabella Scorupco', bio: 'Izabella Scorupco was born to Lech and Magdalena Skorupko in Białystok, Poland, in 1970. When she was one year old, her parents separated, and she remained with her mother. In 1978, they moved to Bredäng in Stockholm, Sweden, where Scorupco learned to speak Swedish, English and French. \n\nIn the late 1980s, Scorupco travelled throughout Europe working as a model, and appeared on the cover of Vogue...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/Av7fykzXL701au42sTbhufHpwwv.jpg', url: 'https://themoviedb.org/person/10695' } }, movieTitle: 'GoldenEye', role: 'Natalya Fyodorovna Simonova' }, { actor: { identity: { low: 13097, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Dayton, Ohio, USA', tmdbId: '8349', imdbId: '0000640', born: { year: { low: 1940, high: 0 }, month: { low: 8, high: 0 }, day: { low: 3, high: 0 } }, name: 'Martin Sheen', bio: 'Ramón Gerardo Antonio Estévez  (born August 3, 1940), better known by his stage name Martin Sheen, is a film actor best known for his performances in the films Badlands (1973) and Apocalypse Now (1979), and in the television series The West Wing from 1999 to 2006. In film he has won the Best Actor award at the San Sebastián International Film Festival for his performance as Kit Carruthers in Badlands. His portrayal of Capt...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/m2Y3Q0uyuW6htrn2W9UWCWMkpZu.jpg', url: 'https://themoviedb.org/person/8349' } }, movieTitle: 'American President, The', role: 'A.J. MacInerney' }, { actor: { identity: { low: 15084, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Edmonton, Alberta, Canada', tmdbId: '521', imdbId: '0000150', born: { year: { low: 1961, high: 0 }, month: { low: 6, high: 0 }, day: { low: 9, high: 0 } }, name: 'Michael J. Fox', bio: 'Born Michael Andrew Fox in Edmonton, Alberta, Canada, he adopted the "J" as an homage to character actor Michael J. Pollard. Moving several times during the course of his childhood, Michael and his family settled in Burnaby, a suburb of Vancouver. At the age of 15 he made his professional acting debut in the situation comedy "Leo and Me" (1981). \n\nMoving to Los Angeles at the age of 18, Fox appeared in several small parts and a television series, "Palmerstown, U. S. A...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/2JB4FMgQmnhbBlQ4SxWFN9EIVDi.jpg', url: 'https://themoviedb.org/person/521' } }, movieTitle: 'American President, The', role: 'Lewis Rothschild' }, { actor: { identity: { low: 13723, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'New Brunswick, New Jersey, USA', tmdbId: '3392', imdbId: '0000140', born: { year: { low: 1944, high: 0 }, month: { low: 9, high: 0 }, day: { low: 25, high: 0 } }, name: 'Michael Douglas', bio: "Michael Kirk Douglas (born September 25, 1944) is an American actor and producer, primarily in movies and television. He has won three Golden Globes and two Academy Awards; first as producer of 1975's Best Picture, One Flew Over the Cuckoo's Nest, and as Best Actor in 1987 for his role in Wall Street. Douglas received the AFI Life Achievement Award in 2009. He is the eldest of actor Kirk Douglas's four sons. Douglas has been the announcer for NBC Nightly News since 2007...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/4iA9QztvUnhf3YS2U0Z3lieTknc.jpg', url: 'https://themoviedb.org/person/3392' } }, movieTitle: 'American President, The', role: 'Andrew Shepherd' }, { actor: { identity: { low: 16107, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Topeka, Kansas, USA', tmdbId: '516', imdbId: '0000906', born: { year: { low: 1958, high: 0 }, month: { low: 5, high: 0 }, day: { low: 29, high: 0 } }, name: 'Annette Bening', bio: "An American film and television actress. She's a four-time Academy Awards nominee for her roles in the feature films The Grifters, American Beauty, Being Julia and The Kids Are All Right, winning Golden Globe Awards for the latter two films...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/vVAvoiE6FQ4couqaB0ogaHR6Ef7.jpg', url: 'https://themoviedb.org/person/516' } }, movieTitle: 'American President, The', role: 'Sydney Ellen Wade' }, { actor: { identity: { low: 14291, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Dallas, Texas, USA', tmdbId: '12688', imdbId: '0001493', born: { year: { low: 1954, high: 0 }, month: { low: 4, high: 0 }, day: { low: 10, high: 0 } }, name: 'Peter MacNicol', bio: "Peter MacNicol (born April 10, 1954) is an American actor. \n\nIn film he is best known for Ghostbusters II and Sophie's Choice. For television he is best known for Ally McBeal, 24, Chicago Hope, and Numbers...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/xo09hN0cqYh1V7z986yFOTdaKhU.jpg', url: 'https://themoviedb.org/person/12688' } }, movieTitle: 'Dracula: Dead and Loving It', role: 'Thomas Renfield' }, { actor: { identity: { low: 11413, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Regina, Saskatchewan, Canada', tmdbId: '7633', imdbId: '0000558', born: { year: { low: 1926, high: 0 }, month: { low: 2, high: 0 }, day: { low: 11, high: 0 } }, name: 'Leslie Nielsen', bio: 'From Wikipedia, the free encyclopedia. \n\nLeslie William Nielsen, OC (11 February 1926 – 28 November 2010) was a Canadian and naturalized American actor and comedian. Nielsen appeared in over one hundred films and 1,500 television programs over the span of his career, portraying over 220 characters. Born in Regina, Saskatchewan, Nielsen enlisted in the Royal Canadian Air Force and worked as a disc jockey before receiving a scholarship to Neighborhood Playhouse...', died: { year: { low: 2010, high: 0 }, month: { low: 11, high: 0 }, day: { low: 28, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/u5vWl5dw69Nf89f905Qb5JqEVL3.jpg', url: 'https://themoviedb.org/person/7633' } }, movieTitle: 'Dracula: Dead and Loving It', role: 'Count Dracula' }, { actor: { identity: { low: 17296, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Briarwood, Queens, New York, USA', tmdbId: '6106', imdbId: '0001836', born: { year: { low: 1961, high: 0 }, month: { low: 3, high: 0 }, day: { low: 4, high: 0 } }, name: 'Steven Weber', bio: 'From Wikipedia, the free encyclopedia. Steven Robert Weber (born March 4, 1961) is an American actor. He is best known for his role in the television show Wings which aired throughout the 1990s on NBC. \n\nDescription above from the Wikipedia article Steven Weber, licensed under CC-BY-SA,full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/8FtkapenCOpe39eE1sQus5WLWAq.jpg', url: 'https://themoviedb.org/person/6106' } }, movieTitle: 'Dracula: Dead and Loving It', role: 'Jonathan Harker' }, { actor: { identity: { low: 17640, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Cincinnati, Ohio, USA', tmdbId: '1219', imdbId: '0001865', born: { year: { low: 1962, high: 0 }, month: { low: 9, high: 0 }, day: { low: 12, high: 0 } }, name: 'Amy Yasbeck', bio: 'Amy Marie Yasbeck (born September 12, 1962) is an American film and television actress. She is best known for her role as Casey Chapel Davenport on Wings...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/wDd71vFKUMJutO3fZjY2Pw0HWb.jpg', url: 'https://themoviedb.org/person/1219' } }, movieTitle: 'Dracula: Dead and Loving It', role: 'Mina Seward' }, { actor: { identity: { low: 14487, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Philadelphia, Pennsylvania, USA', tmdbId: '4724', imdbId: '0000102', born: { year: { low: 1958, high: 0 }, month: { low: 7, high: 0 }, day: { low: 8, high: 0 } }, name: 'Kevin Bacon', bio: 'Kevin Norwood Bacon (born July 8, 1958) is an American film and theater actor whose notable roles include Animal House, Diner, Footloose, Flatliners, A Few Good Men, Apollo 13, Mystic River, The Woodsman, Friday the 13th, Hollow Man, Tremors and Frost/Nixon. \n\nBacon has won Golden Globe and Screen Actors Guild Awards, was nominated for an Emmy Award, and was named by The Guardian as one of the best actors never to have received an Academy Award nomination...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/rjX2Oz3tCZMfSwOoIAyEhdtXnTE.jpg', url: 'https://themoviedb.org/person/4724' } }, movieTitle: 'Balto', role: 'Balto (voice)' }, { actor: { identity: { low: 14132, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Bury St. Edmunds, Suffolk, England, UK', tmdbId: '382', imdbId: '0001364', born: { year: { low: 1942, high: 0 }, month: { low: 10, high: 0 }, day: { low: 26, high: 0 } }, name: 'Bob Hoskins', bio: 'From Wikipedia, the free encyclopedia\n\nRobert William "Bob" Hoskins, Jr. (born 26 October 1942 – 29 April 2014) is an English actor, known for playing Cockney rough diamonds, psychopaths and gangsters, in films such as The Long Good Friday (1980), and Mona Lisa (1986), and lighter roles in Who Framed Roger Rabbit (1988) and Hook (1991)...', died: { year: { low: 2014, high: 0 }, month: { low: 4, high: 0 }, day: { low: 29, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/i6urQzI3HG4WpGJLnDNbWbn13Mb.jpg', url: 'https://themoviedb.org/person/382' } }, movieTitle: 'Balto', role: 'Boris the Goose (voice)' }, { actor: { identity: { low: 17995, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Youngstown, Ohio, USA', tmdbId: '12077', imdbId: '0191906', born: { year: { low: 1952, high: 0 }, month: { low: 11, high: 0 }, day: { low: 3, high: 0 } }, name: 'Jim Cummings', bio: 'Jim Cummings (born November 3, 1952) is an American voice actor who has appeared in almost 100 roles...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/c0sQPRCM5Ri3F4gVyxPr4AcPmIq.jpg', url: 'https://themoviedb.org/person/12077' } }, movieTitle: 'Balto', role: 'Steele the Sled Dog (voice)' }, { actor: { identity: { low: 16524, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Los Angeles, California, USA', tmdbId: '2233', imdbId: '0000403', born: { year: { low: 1964, high: 0 }, month: { low: 1, high: 0 }, day: { low: 27, high: 0 } }, name: 'Bridget Fonda', bio: 'Bridget Jane Fonda (born 27 January 1964) is an American actress. She is best known for her roles in films such as The Godfather Part III, Single White Female, Point of No Return, It Could Happen to You, and Jackie Brown. She is the daughter of Peter Fonda. \n\nDescription above from the Wikipedia article Bridget Fonda, licensed under CC-BY-SA, full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/6XSABYzJ0mQWgBP4NJweqXdsdZy.jpg', url: 'https://themoviedb.org/person/2233' } }, movieTitle: 'Balto', role: 'Jenna (voice)' }, { actor: { identity: { low: 14351, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Englewood, New Jersey, USA', tmdbId: '228', imdbId: '0000438', born: { year: { low: 1950, high: 0 }, month: { low: 11, high: 0 }, day: { low: 28, high: 0 } }, name: 'Ed Harris', bio: "Ed Harris is an American stage, film and television actor, writer, producer and director, best known for playing supporting characters in feature films such as \"Apollo 13\", \"A Beautiful Mind\", and \"The Truman Show\", as well as many recurring and starring roles in television shows, among them the portrayal of The Man in Black in HBO's \"Westworld\". He holds a BFA in Drama from the California Institute of the Arts, Valencia, USA...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/kUbUA70WPiosPT4kBJMWtGk0ASd.jpg', url: 'https://themoviedb.org/person/228' } }, movieTitle: 'Nixon', role: 'E. Howard Hunt' }, { actor: { identity: { low: 12572, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Margam, Port Talbot, Glamorgan, Wales, UK', tmdbId: '4173', imdbId: '0000164', born: { year: { low: 1937, high: 0 }, month: { low: 12, high: 0 }, day: { low: 31, high: 0 } }, name: 'Anthony Hopkins', bio: 'Anthony Hopkins was born on 31 December 1937, in Margam, Glamorgan, Wales. Influenced by Richard Burton, he decided to study at College of Music and Drama in Cardiff and graduated in 1957. In 1965, he moved to London and joined the National Theatre, invited by Laurence Olivier, who could see the talent in Hopkins. In 1967, he made his first film for television, A Flea in Her Ear (1967) (TV). \n\nFrom this moment on, he enjoyed a successful career in cinema and television...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/9ukJS2QWTJ22HcwR1ktMmoJ6RSL.jpg', url: 'https://themoviedb.org/person/4173' } }, movieTitle: 'Nixon', role: 'Richard Nixon' }, { actor: { identity: { low: 14418, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Snyder, Texas, U.S.', tmdbId: '6280', imdbId: '0000959', born: { year: { low: 1948, high: 0 }, month: { low: 6, high: 0 }, day: { low: 1, high: 0 } }, name: 'Powers Boothe', bio: 'From Wikipedia, the free encyclopedia. \n\nPowers Allen Boothe (born June 1, 1948) is an American television and film actor. Some of his most notable roles include his Emmy-winning 1980 portrayal of Jim Jones and his turn as Cy Tolliver on Deadwood, as well as Vice-President Noah Daniels on 24. \n\nDescription above from the Wikipedia article Powers Boothe, licensed under CC-BY-SA, full list of contributors on Wikipedia...', died: { year: { low: 2017, high: 0 }, month: { low: 5, high: 0 }, day: { low: 14, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/qk1KVY5N83MsO4Qvg4W1JA8SNFH.jpg', url: 'https://themoviedb.org/person/6280' } }, movieTitle: 'Nixon', role: 'Alexander Haig' }, { actor: { identity: { low: 15511, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Rochelle, Illinois, USA', tmdbId: '11148', imdbId: '0000260', born: { year: { low: 1956, high: 0 }, month: { low: 8, high: 0 }, day: { low: 20, high: 0 } }, name: 'Joan Allen', bio: 'Joan Allen (born August 20, 1956) is an American actress. She worked in theatre, television and film during her early career, and achieved recognition for her Broadway debut in Burn This, winning a Tony Award for Best Performance by a Leading Actress in a Play in 1989. \n\nShe has received three Academy Award nominations; she was nominated for Best Supporting Actress for Nixon (1995) and The Crucible (1996), and for Best Actress for The Contender (2000)...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/4VGlW2lHwTfmV7PX01gGPK5XaSz.jpg', url: 'https://themoviedb.org/person/11148' } }, movieTitle: 'Nixon', role: 'Pat Nixon' }, { actor: { identity: { low: 15449, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Wareham, Massachusetts, USA', tmdbId: '16935', imdbId: '0000133', born: { year: { low: 1956, high: 0 }, month: { low: 1, high: 0 }, day: { low: 21, high: 0 } }, name: 'Geena Davis', bio: "Virginia Elizabeth \"Geena\" Davis (born January 21, 1956)  is an American actress, film producer, writer, former fashion model, and a women's Olympics archery team semi-finalist. She is known for her roles in The Fly, Beetlejuice, Thelma &amp; Louise, A League of Their Own, and The Accidental Tourist, for which she won the 1988 Academy Award for Best Supporting Actress. In 2005, she won the Golden Globe Award for Best Actress – Television Series Drama for her role in Commander in Chief...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/bx9ufx5cS7FfHDFFeT71syBh428.jpg', url: 'https://themoviedb.org/person/16935' } }, movieTitle: 'Cutthroat Island', role: 'Morgan Adams' }, { actor: { identity: { low: 12812, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Bayonne, New Jersey, USA', tmdbId: '8924', imdbId: '0001449', born: { year: { low: 1938, high: 0 }, month: { low: 1, high: 0 }, day: { low: 1, high: 0 } }, name: 'Frank Langella', bio: 'Frank A. Langella, Jr. (born January 1, 1938) is an American stage and film actor. \n\nDescription above from the Wikipedia article Frank Langella, licensed under CC-BY-SA, full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/SZkKwqadQi7lCGNwscuLM1N9cw.jpg', url: 'https://themoviedb.org/person/8924' } }, movieTitle: 'Cutthroat Island', role: 'Dawg' }, { actor: { identity: { low: 14769, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Loma Linda, California, USA', tmdbId: '8654', imdbId: '0000546', born: { year: { low: 1959, high: 0 }, month: { low: 3, high: 0 }, day: { low: 22, high: 0 } }, name: 'Matthew Modine', bio: "Matthew Avery Modine (born March 22, 1959) is an award-winning American actor. His film roles include Private Joker in Stanley Kubrick's Full Metal Jacket, the title character in Alan Parker's Birdy, high school wrestler Louden Swain in Vision Quest, and the oversexed Sullivan Groff in Weeds...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/2nmw8YkQq4cZT0GtmUfaAw1I8nT.jpg', url: 'https://themoviedb.org/person/8654' } }, movieTitle: 'Cutthroat Island', role: 'William Shaw' }, { actor: { identity: { low: 14886, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Brooklyn, New York, USA', tmdbId: '7868', imdbId: '0001999', born: { year: { low: 1949, high: 0 }, month: { low: 7, high: 0 }, day: { low: 27, high: 0 } }, name: 'Maury Chaykin', bio: 'Was an American-born Canadian actor. Best known for his portrayal of detective Nero Wolfe, he was also known for his work as a character actor in many films and on television programs. \n\nDescription above from the Wikipedia article Maury Chaykin, licensed under CC-BY-SA, full list of contributors on Wikipedia...', died: { year: { low: 2010, high: 0 }, month: { low: 7, high: 0 }, day: { low: 27, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/izV5zv2jTRBfGjvDWTniWPrma1t.jpg', url: 'https://themoviedb.org/person/7868' } }, movieTitle: 'Cutthroat Island', role: 'John Reed' }, { actor: { identity: { low: 13100, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Greenwich Village, New York City, New York, USA', tmdbId: '380', imdbId: '0000134', born: { year: { low: 1943, high: 0 }, month: { low: 8, high: 0 }, day: { low: 17, high: 0 } }, name: 'Robert De Niro', bio: "Robert De Niro, Jr. (born August 17, 1943) is an American actor, director, and producer. \n\nHis first major film role was in 1973's Bang the Drum Slowly. In 1974, he played the young Vito Corleone in The Godfather Part II, a role that won him the Academy Award for Best Supporting Actor. His longtime collaboration with Martin Scorsese began with 1973's Mean Streets, and earned De Niro an Academy Award for Best Actor for his portrayal of Jake LaMotta in the 1980 film, Raging Bull...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/cT8htcckIuyI1Lqwt1CvD02ynTh.jpg', url: 'https://themoviedb.org/person/380' } }, movieTitle: 'Casino', role: "Sam 'Ace' Rothstein" }, { actor: { identity: { low: 14172, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Newark, New Jersey, USA ', tmdbId: '4517', imdbId: '0000582', born: { year: { low: 1943, high: 0 }, month: { low: 2, high: 0 }, day: { low: 9, high: 0 } }, name: 'Joe Pesci', bio: 'Joseph Frank “Joe” Pesci (born February 9, 1943) is an American actor, comedian, singer and musician. He is known for his roles as violent mobsters, funnymen, comic foils and quirky sidekicks. Pesci has starred in a number of high profile films such as Goodfellas, Casino, Raging Bull, Once Upon a Time in America, My Cousin Vinny, Easy Money, JFK, Moonwalker, Home Alone, Home Alone 2: Lost in New York, and the 2nd, 3rd, and 4th Lethal Weapon films...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/7ecSqd7GXYbK3sJw1lvLWLiJ6fh.jpg', url: 'https://themoviedb.org/person/4517' } }, movieTitle: 'Casino', role: 'Nicky Santoro' }, { actor: { identity: { low: 15202, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Meadville, Pennsylvania, USA', tmdbId: '4430', imdbId: '0000232', born: { year: { low: 1958, high: 0 }, month: { low: 3, high: 0 }, day: { low: 10, high: 0 } }, name: 'Sharon Stone', bio: "Sharon Vonne Stone (born March 10, 1958) is an American actress, producer, and former fashion model. She is the recipient of a Primetime Emmy Award and a Golden Globe Award, as well as having received nominations for an Academy Award and two Screen Actors Guild Awards. \n\nAfter modelling in television commercials and print advertisements, she made her film debut as an extra in Woody Allen's comedy-drama Stardust Memories (1980)...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/iR0lIYGTFFLzViK7s0xIzUfo8FI.jpg', url: 'https://themoviedb.org/person/4430' } }, movieTitle: 'Casino', role: 'Ginger McKenna' }, { actor: { identity: { low: 13940, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Vernal, Utah, USA', tmdbId: '4512', imdbId: '0000249', born: { year: { low: 1947, high: 0 }, month: { low: 4, high: 0 }, day: { low: 18, high: 0 } }, name: 'James Woods', bio: 'James Howard Woods (born April 18, 1947) is an American film, stage and television actor. Woods is known for starring in critically acclaimed films such as Once Upon a Time in America, Salvador, Nixon, Ghosts of Mississippi, Casino, Hercules, and in the television legal drama Shark. He has won two Emmy Awards, and has gained two Academy Award nominations...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/tLH7mpH4KqkWL5VgjueTbewGsfK.jpg', url: 'https://themoviedb.org/person/4512' } }, movieTitle: 'Casino', role: 'Lester Diamond' }, { actor: { identity: { low: 17905, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Bilston, Staffordshire, England, UK', tmdbId: '10726', imdbId: '0281424', born: { year: { low: 1952, high: 0 }, month: { low: 3, high: 0 }, day: { low: 11, high: 0 } }, name: 'James Fleet', bio: '​James Edward Fleet (born 11 March 1952) is an English actor. He is most famous for his roles as the bumbling and well-meaning Tom in the 1994 British romantic comedy film Four Weddings and a Funeral, and the dim-witted Hugo Horton in the BBC situation comedy television series The Vicar of Dibley...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/4aG8nTReLO0GhDCSoV4CtXejeYD.jpg', url: 'https://themoviedb.org/person/10726' } }, movieTitle: 'Sense and Sensibility', role: 'John Dashwood' }, { actor: { identity: { low: 17923, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Reading, Berkshire, England, UK', tmdbId: '204', imdbId: '0000701', born: { year: { low: 1975, high: 0 }, month: { low: 10, high: 0 }, day: { low: 5, high: 0 } }, name: 'Kate Winslet', bio: 'Kate Elizabeth Winslet (born 5 October 1975) is an English actress and occasional singer. She has received multiple awards and nominations. She is the youngest person to accrue six Academy Award nominations, and won the Academy Award for Best Actress for The Reader (2008). \n\nWinslet has been acclaimed for both dramatic and comedic work in projects ranging from period to contemporary films, and from major Hollywood productions to less publicised indie films...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/e3tdop3WhseRnn8KwMVLAV25Ybv.jpg', url: 'https://themoviedb.org/person/204' } }, movieTitle: 'Sense and Sensibility', role: 'Marianne Dashwood' }, { actor: { identity: { low: 18083, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Leeds, West Yorkshire, England, UK', tmdbId: '207', imdbId: '0929489', born: { year: { low: 1948, high: 0 }, month: { low: 2, high: 0 }, day: { low: 5, high: 0 } }, name: 'Tom Wilkinson', bio: 'Thomas Geoffrey "Tom" Wilkinson, OBE is an English actor. He has twice been nominated for an Academy Award for his roles in In The Bedroom and Michael Clayton. In 2009, he won The Golden Globe and Primetime Emmy Award for best Supporting Actor in a Miniseries or Movie for John Adams...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/d5yLk0PK8q7EKR3E3G2txO758IW.jpg', url: 'https://themoviedb.org/person/207' } }, movieTitle: 'Sense and Sensibility', role: 'Mr. Dashwood' }, { actor: { identity: { low: 18625, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'London, England, UK', tmdbId: '17477', imdbId: '0910040', born: { year: { low: 1950, high: 0 }, month: { low: 9, high: 0 }, day: { low: 24, high: 0 } }, name: 'Harriet Walter', bio: 'Harriet Walter is a British film and television actress...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/pMBIjsM2U5xPMJ09k5X7XQZspwn.jpg', url: 'https://themoviedb.org/person/17477' } }, movieTitle: 'Sense and Sensibility', role: 'Fanny Ferrars Dashwood' }, { actor: { identity: { low: 18394, high: 0 }, labels: ['Actor', 'Person'], properties: { tmdbId: '3123', imdbId: '0004866', born: { year: { low: 1972, high: 0 }, month: { low: 5, high: 0 }, day: { low: 19, high: 0 } }, name: 'Amanda De Cadenet', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/pLlI568voL7dkFbUDIq4hFI0o0v.jpg', url: 'https://themoviedb.org/person/3123' } }, movieTitle: 'Four Rooms', role: null }, { actor: { identity: { low: 16035, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Naples, Campania, Italy', tmdbId: '3124', imdbId: '0000420', born: { year: { low: 1965, high: 0 }, month: { low: 10, high: 0 }, day: { low: 22, high: 0 } }, name: 'Valeria Golino', bio: 'Valeria Golino is an Italian actress and director. She is best known to English-language audiences for her roles in Rain Man, Big Top Pee-wee, and the two Hot Shots! movies. In addition to the awards David di Donatello, Silver Ribbon, Golden Ciak, and Italian Golden Globe, she is also one of the three actresses who has won the Best Actress award at the Venice Film Festival twice...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/q8YUigxxcdcoc9uOvb70rNF19sE.jpg', url: 'https://themoviedb.org/person/3124' } }, movieTitle: 'Four Rooms', role: 'Athena' }, { actor: { identity: { low: 15130, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Bay City, Michigan, USA', tmdbId: '3125', imdbId: '0000187', born: { year: { low: 1958, high: 0 }, month: { low: 8, high: 0 }, day: { low: 16, high: 0 } }, name: 'Madonna', bio: 'Madonna (born Madonna Louise Ciccone) is a recording artist, actress and entrepreneur. Born in Bay City, Michigan, she moved to New York City in 1977 to pursue a career in modern dance. After performing in the music groups Breakfast Club and Emmy, she released her debut album in 1983. She followed it with a series of albums in which she found immense popularity by pushing the boundaries of lyrical content in mainstream popular music and imagery in her music videos, which became a fixture on MTV...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/pI6g1iVlUy7cUAZ6AspVXWq4kli.jpg', url: 'https://themoviedb.org/person/3125' } }, movieTitle: 'Four Rooms', role: 'Elspeth' }, { actor: { identity: { low: 18393, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Kidderminster, Worcestershire, England, UK', tmdbId: '3122', imdbId: '0205423', born: { year: { low: 1964, high: 0 }, month: { low: 6, high: 0 }, day: { low: 21, high: 0 } }, name: 'Sammi Davis', bio: "From Wikipedia, the free encyclopedia. \n\nSammi Davis (born Samantha Davis; 21 June 1964) is a British actress. \n\nShe gained considerable praise for her performance in Ken Russell's The Rainbow (1989). She also had significant roles in Mike Hodges' A Prayer For The Dying and John Boorman's Hope and Glory (both 1987) as well as a leading role in the Emmy Award-winning American television series, Homefront (1991–1993). \n\nDavis was married to the director Kurt Voss, whom she later divorced...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/6A6nYjHzjNkcsXskdxzHw2P7ROf.jpg', url: 'https://themoviedb.org/person/3122' } }, movieTitle: 'Four Rooms', role: 'Jezebel' }, { actor: { identity: { low: 15244, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Newmarket, Ontario, Canada', tmdbId: '206', imdbId: '0000120', born: { year: { low: 1962, high: 0 }, month: { low: 1, high: 0 }, day: { low: 17, high: 0 } }, name: 'Jim Carrey', bio: "James Eugene \"Jim\" Carrey is a Canadian-American actor, comedian, singer and writer. He has received two Golden Globe Awards and has also been nominated on four occasions. \n\nCarrey began stand-up comedy in 1979, performing at Yuk Yuk's in Toronto, Ontario. After gaining prominence in 1981, he began working at The Comedy Store in Los Angeles where he was soon noticed by comedian Rodney Dangerfield, who immediately signed him to open his tour performances...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/ienbErTKd9RHCV1j7FJLNEWUAzn.jpg', url: 'https://themoviedb.org/person/206' } }, movieTitle: 'Ace Ventura: When Nature Calls', role: 'Ace Ventura' }, { actor: { identity: { low: 18212, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Basingstoke, Hampshire, England, UK', tmdbId: '3547', imdbId: '0573862', born: { year: { low: 1950, high: 0 }, month: { low: 10, high: 0 }, day: { low: 2, high: 0 } }, name: 'Ian McNeice', bio: 'Ian McNeice (born 2 October 1950) is a prolific English screen, stage, and television character actor...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/mJ1AwYRoWycLvCs5VRGyeM7KxrG.jpg', url: 'https://themoviedb.org/person/3547' } }, movieTitle: 'Ace Ventura: When Nature Calls', role: 'Fulton Greenwall' }, { actor: { identity: { low: 17906, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Streatham, London, England, UK', tmdbId: '4001', imdbId: '0001003', born: { year: { low: 1949, high: 0 }, month: { low: 6, high: 0 }, day: { low: 13, high: 0 } }, name: 'Simon Callow', bio: 'An English actor, writer and theatre director...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/arDoYD78OjhczHy07KIOJynwATU.jpg', url: 'https://themoviedb.org/person/4001' } }, movieTitle: 'Ace Ventura: When Nature Calls', role: 'Vincent Cadby' }, { actor: { identity: { low: 18213, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'London, England, UK', tmdbId: '57096', imdbId: '0264330', name: 'Maynard Eziashi', bio: 'From Wikipedia, the free encyclopedia. \n\nMaynard Eziashi (born 1965 in London, England) is a British/Nigerian actor. In 1991, he won the Silver Bear for Best Actor at the 41st Berlin International Film Festival for his starring role in Mister Johnson (1990) alongside Pierce Brosnan. \n\nOther films, where Eziashi has played a part, include Twenty-One (1991), Bopha! (1993) and Ace Ventura: When Nature Calls (1995)...', url: 'https://themoviedb.org/person/57096' } }, movieTitle: 'Ace Ventura: When Nature Calls', role: 'Ouda' }, { actor: { identity: { low: 16725, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Orlando, Florida, USA', tmdbId: '10814', imdbId: '0000648', born: { year: { low: 1962, high: 0 }, month: { low: 7, high: 0 }, day: { low: 31, high: 0 } }, name: 'Wesley Snipes', bio: 'Wesley Trent Snipes (born July 31, 1962) is an American actor, film producer, and martial artist. He has starred in numerous action-adventures, thrillers, and dramatic feature films and is well-known for his role as Blade in the Blade trilogy. Snipes formed a production company titled Amen-Ra Films in 1991 and a subsidiary, Black Dot Media, to develop projects for film and television...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/uBhM3TshYvRhOewXAimtxci9bQo.jpg', url: 'https://themoviedb.org/person/10814' } }, movieTitle: 'Money Train', role: 'John' }, { actor: { identity: { low: 12481, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Nutley, New Jersey, USA', tmdbId: '9287', imdbId: '0086706', born: { year: { low: 1933, high: 0 }, month: { low: 9, high: 0 }, day: { low: 18, high: 0 } }, name: 'Robert Blake', bio: 'From Wikipedia, the free encyclopedia\n\nRobert Blake (born September 18, 1933) is an American actor who starred in the film In Cold Blood and the U. S. television series Baretta. \n\nIn 2005 he was tried and acquitted for the 2001 murder of his wife, but on November 18, 2005 he was found liable in a California civil court for her wrongful death...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/6QhnUZroJWSlCUAPs6neI5lE2vb.jpg', url: 'https://themoviedb.org/person/9287' } }, movieTitle: 'Money Train', role: 'Donald Patterson' }, { actor: { identity: { low: 16894, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Midland, Texas, USA', tmdbId: '57755', imdbId: '0000437', born: { year: { low: 1961, high: 0 }, month: { low: 7, high: 0 }, day: { low: 23, high: 0 } }, name: 'Woody Harrelson', bio: 'Academy Award-nominated and Emmy Award-winning actor Woodrow Tracy Harrelson was born on July 23, 1961 in Midland, Texas, to Diane Lou (Oswald) and Charles Harrelson. He grew up in Lebanon, Ohio, where his mother was from. After receiving degrees in theater arts and English from Hanover College, he had a brief stint in New York theater...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/gaibtvUFIlwHzRvNKV5UfrR4GCM.jpg', url: 'https://themoviedb.org/person/57755' } }, movieTitle: 'Money Train', role: 'Charlie' }, { actor: { identity: { low: 18554, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'The Bronx, New York City, New York, USA', tmdbId: '16866', imdbId: '0000182', born: { year: { low: 1969, high: 0 }, month: { low: 7, high: 0 }, day: { low: 24, high: 0 } }, name: 'Jennifer Lopez', bio: 'Jennifer Lopez (born July 24, 1969), also known by her nickname J. Lo, is an American actress, singer, record producer, dancer, television personality, fashion designer and television producer. Lopez began her career as a dancer on the television comedy program In Living Color. Subsequently venturing into acting, she gained recognition in the 1995 action-thriller Money Train...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/vNs45IZmVpBQF8uBdovQcwBHqWV.jpg', url: 'https://themoviedb.org/person/16866' } }, movieTitle: 'Money Train', role: 'Grace Santiago' }, { actor: { identity: { low: 14801, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Asbury Park, New Jersey, USA', tmdbId: '518', imdbId: '0000362', born: { year: { low: 1944, high: 0 }, month: { low: 11, high: 0 }, day: { low: 17, high: 0 } }, name: 'Danny DeVito', bio: 'Danny DeVito (born November 17, 1944) is an American actor, comedian, director, and producer. He first gained prominence for his portrayal of Louie De Palma on Taxi, for which he won a Golden Globe and an Emmy. \n\nDeVito founded the production company Jersey Films with his wife Rhea Perlman...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/gNHF2SNXFFCRqwIQ2Xv6r6aV6UD.jpg', url: 'https://themoviedb.org/person/518' } }, movieTitle: 'Get Shorty', role: 'Martin Weir' }, { actor: { identity: { low: 12428, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'San Bernardino, California, USA', tmdbId: '193', imdbId: '0000432', born: { year: { low: 1930, high: 0 }, month: { low: 1, high: 0 }, day: { low: 30, high: 0 } }, name: 'Gene Hackman', bio: 'Eugene Allen "Gene" Hackman (born January 30, 1930) is a retired American actor and novelist. \n\nNominated for five Academy Awards, winning two, Hackman has also won three Golden Globes and two BAFTAs in a career that spanned four decades. He first came to fame in 1967 with his performance as Buck Barrow in Bonnie and Clyde...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/xPmETCv0APDoIK5CvIIJwbTcjPA.jpg', url: 'https://themoviedb.org/person/193' } }, movieTitle: 'Get Shorty', role: 'Harry Zimm' }, { actor: { identity: { low: 16996, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Burbank, California, USA', tmdbId: '14343', imdbId: '0000623', born: { year: { low: 1954, high: 0 }, month: { low: 2, high: 0 }, day: { low: 17, high: 0 } }, name: 'Rene Russo', bio: 'Rene Marie Russo (born February 17, 1954) is an American film actress and former model...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/bA6GrFuTk9xWYxGOJCLjjdmdAeW.jpg', url: 'https://themoviedb.org/person/14343' } }, movieTitle: 'Get Shorty', role: 'Karen Flores' }, { actor: { identity: { low: 13675, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Englewood, New Jersey, USA', tmdbId: '8891', imdbId: '0000237', born: { year: { low: 1954, high: 0 }, month: { low: 2, high: 0 }, day: { low: 18, high: 0 } }, name: 'John Travolta', bio: "An American actor, film producer, dancer, and singer. He first became known in the 1970s, after appearing on the television series Welcome Back, Kotter and starring in the box office successes Saturday Night Fever and Grease. Travolta's career re-surged in the 1990s, with his role in Pulp Fiction, and he has since continued starring in Hollywood films, including Face/Off, Ladder 49 and Wild Hogs. Travolta has twice been nominated for the Academy Award for Best Actor...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/JSt3skdZpGPJYJixCZqH599WdI.jpg', url: 'https://themoviedb.org/person/8891' } }, movieTitle: 'Get Shorty', role: 'Chili Palmer' }, { actor: { identity: { low: 13856, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Manhattan, New York City, New York, USA', tmdbId: '10205', imdbId: '0000244', born: { year: { low: 1949, high: 0 }, month: { low: 10, high: 0 }, day: { low: 8, high: 0 } }, name: 'Sigourney Weaver', bio: 'Sigourney Weaver (born October 8, 1949) is an American actress best known for her role as Ellen Ripley in the Alien film series, a role for which she has received worldwide recognition. Other notable roles include the Ghostbusters films, Gorillas in the Mist, The Ice Storm, Working Girl, Death and the Maiden, Prayers for Bobby and Avatar...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/flfhep27iBxseZIlxOMHt6zJFX1.jpg', url: 'https://themoviedb.org/person/10205' } }, movieTitle: 'Copycat', role: 'Helen Hudson' }, { actor: { identity: { low: 15717, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Conyers, Georgia, USA', tmdbId: '18686', imdbId: '0000456', born: { year: { low: 1958, high: 0 }, month: { low: 3, high: 0 }, day: { low: 20, high: 0 } }, name: 'Holly Hunter', bio: 'Holly Hunter (born March 20, 1958) is an American actress. For her performance as Ada McGrath in the 1993 drama film The Piano, she won the Academy Award, BAFTA Award, Golden Globe Award, and Cannes Film Festival Award for Best Actress. She was also nominated for the Academy Award for Best Actress for Broadcast News (1987), and the Academy Award for Best Supporting Actress for The Firm (1993) and again for Thirteen (2003)...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/oNoFAi0AQXDP68tv7c7t5WjYioy.jpg', url: 'https://themoviedb.org/person/18686' } }, movieTitle: 'Copycat', role: 'M.J. Monahan' }, { actor: { identity: { low: 16866, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Alexandria, Virginia, USA', tmdbId: '20212', imdbId: '0000551', born: { year: { low: 1963, high: 0 }, month: { low: 10, high: 0 }, day: { low: 31, high: 0 } }, name: 'Dermot Mulroney', bio: 'Dermot Mulroney (born October 31, 1963) is an American actor, musician, and voice actor. He is best known for his roles in romantic comedy, western, and drama films...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/5gJszOF45KMPB5tmAbKdK0qgQBx.jpg', url: 'https://themoviedb.org/person/20212' } }, movieTitle: 'Copycat', role: 'Ruben Goetz' }, { actor: { identity: { low: 17827, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Dallas, Texas, USA', tmdbId: '18687', imdbId: '0001530', born: { year: { low: 1965, high: 0 }, month: { low: 3, high: 0 }, day: { low: 31, high: 0 } }, name: 'William McNamara', bio: 'From Wikipedia, the free encyclopedia. \n\nWilliam West McNamara (born March 31, 1965) is an American actor. \n\nDescription above from the Wikipedia article William McNamara, licensed under CC-BY-SA, full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/yhDt7oJLDBXZQk7zL7munAyC8Xb.jpg', url: 'https://themoviedb.org/person/18687' } }, movieTitle: 'Copycat', role: 'Peter Foley' }, { actor: { identity: { low: 13300, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'New York City, New York, USA', tmdbId: '16483', imdbId: '0000230', born: { year: { low: 1946, high: 0 }, month: { low: 7, high: 0 }, day: { low: 6, high: 0 } }, name: 'Sylvester Stallone', bio: "An American actor and filmmaker. He is well known for his Hollywood action roles, including boxer Rocky Balboa in the Rocky series' eight films from 1976 to 2018; soldier John Rambo from the five Rambo films, released between 1982 and 2019; and Barney Ross in the three The Expendables films from 2010 to 2014. He wrote or co-wrote most of the 16 films in all three franchises, and directed many of the films...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/qDRGPAcQoW8Wuig9bvoLpHwf1gU.jpg', url: 'https://themoviedb.org/person/16483' } }, movieTitle: 'Assassins', role: 'Robert Rath' }, { actor: { identity: { low: 18249, high: 0 }, labels: ['Actor', 'Person'], properties: { name: 'Anatoli Davydov', tmdbId: '58556', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/h612YfWBEymtZw13UQ6JVe0rXEs.jpg', imdbId: '0205863', url: 'https://themoviedb.org/person/58556' } }, movieTitle: 'Assassins', role: 'Nicolai Tashlinkov' }, { actor: { identity: { low: 15516, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Málaga, Andalucía, Spain', tmdbId: '3131', imdbId: '0000104', born: { year: { low: 1960, high: 0 }, month: { low: 8, high: 0 }, day: { low: 10, high: 0 } }, name: 'Antonio Banderas', bio: 'José Antonio Domínguez Bandera (born August 10, 1960), known professionally as Antonio Banderas, is a Spanish actor, producer, director, and singer. He began his acting career at age 19 with a series of films by director Pedro Almodóvar and then appeared in high-profile Hollywood films, especially in the 1990s, including Assassins, Evita, Interview with the Vampire, Philadelphia, Desperado, The Mask of Zorro, Spy Kids, the Shrek sequels and Puss in Boots...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/50GhCzQuaI5Ul01NEyJZloeVP7g.jpg', url: 'https://themoviedb.org/person/3131' } }, movieTitle: 'Assassins', role: 'Miguel Bain' }, { actor: { identity: { low: 17170, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Fayetteville, North Carolina, USA', tmdbId: '1231', imdbId: '0000194', born: { year: { low: 1960, high: 0 }, month: { low: 12, high: 0 }, day: { low: 3, high: 0 } }, name: 'Julianne Moore', bio: 'Julianne Moore (born Julie Anne Smith; December 3, 1960) is an American actress and author. Prolific in film since the early 1990s, she is particularly known for her portrayals of emotionally troubled women in both independent and blockbuster films, and has received many accolades, including an Academy Award, a British Academy Film Award and two Golden Globes. Time magazine named Moore one of the 100 most influential people in the world in 2015...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/7G0Y2igys4ZIqz0WeR6wvAneKtn.jpg', url: 'https://themoviedb.org/person/1231' } }, movieTitle: 'Assassins', role: 'Electra' }, { actor: { identity: { low: 13992, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Newport, Arkansas, USA', tmdbId: '2453', imdbId: '0005460', born: { year: { low: 1953, high: 0 }, month: { low: 2, high: 0 }, day: { low: 8, high: 0 } }, name: 'Mary Steenburgen', bio: "Mary Nell Steenburgen (born February 8, 1953) is an American actress. She was most successful for playing the role of Lynda Dummar in Jonathan Demme's Melvin and Howard, which earned her an Academy Award and a Golden Globe...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/yJhfuqS3yXW7kLSyvRU6n3b35mq.jpg', url: 'https://themoviedb.org/person/2453' } }, movieTitle: 'Powder', role: 'Jessie Caldwell' }, { actor: { identity: { low: 13786, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Pittsburgh, Pennsylvania, USA', tmdbId: '4785', imdbId: '0000156', born: { year: { low: 1952, high: 0 }, month: { low: 10, high: 0 }, day: { low: 22, high: 0 } }, name: 'Jeff Goldblum', bio: "Jeffrey Lynn \"Jeff\" Goldblum (born October 22, 1952) is an American actor. His career began in the mid-1970s and he has appeared in major box-office successes including The Fly, Jurassic Park and its sequel Jurassic Park: The Lost World, and Independence Day. He starred as Detective Zach Nichols for the eighth and ninth seasons of the USA Network's crime drama series Law & Order: Criminal Intent...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/m8p62pvkVtPxkfAIJhb5AgGw8kA.jpg', url: 'https://themoviedb.org/person/4785' } }, movieTitle: 'Powder', role: 'Donald Ripley' }, { actor: { identity: { low: 14385, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'New York City, New York, USA', tmdbId: '2714', imdbId: '0000448', born: { year: { low: 1940, high: 0 }, month: { low: 5, high: 0 }, day: { low: 5, high: 0 } }, name: 'Lance Henriksen', bio: 'An American actor and artist best known to film and television audiences for his roles in science fiction, action, and horror films such as The Terminator, the Alien film franchise, and on television shows such as Millennium. Henriksen is also a voice actor; he is noted for his deep, commanding voice...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/1PkFmD5HdjmRa2DumtwINnnAjTH.jpg', url: 'https://themoviedb.org/person/2714' } }, movieTitle: 'Powder', role: 'Sheriff Doug Barnum' }, { actor: { identity: { low: 18605, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Lake Charles, Louisiana, USA', tmdbId: '54789', imdbId: '0001218', born: { year: { low: 1965, high: 0 }, month: { low: 10, high: 0 }, day: { low: 11, high: 0 } }, name: 'Sean Patrick Flanery', bio: 'Sean Patrick Flanery (born October 11, 1965) is an American actor known for such roles as Connor MacManus in The Boondock Saints, Greg Stillson in The Dead Zone and for portraying Indiana Jones in The Young Indiana Jones Chronicles, as well as Bobby Dagen in Saw 3D. \n\nDescription above from the Wikipedia article Sean Patrick Flanery , licensed under CC-BY-SA, full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/aHQtxIjMEDWdXqvFJplx0Kcwdn6.jpg', url: 'https://themoviedb.org/person/54789' } }, movieTitle: 'Powder', role: "Jeremy 'Powder' Reed" }, { actor: { identity: { low: 14810, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Long Beach, California, USA', tmdbId: '2963', imdbId: '0000115', born: { year: { low: 1964, high: 0 }, month: { low: 1, high: 0 }, day: { low: 7, high: 0 } }, name: 'Nicolas Cage', bio: 'An American actor, producer and director. He has performed in leading roles in a variety of films, ranging from romantic comedies and dramas to science fiction and action movies. Cage is known for his prolificacy, appearing in at least one film per year, nearly every year since 1980 (with the exception of 1985 and 1991)...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/ar33qcWbEgREn07ZpXv5Pbj8hbM.jpg', url: 'https://themoviedb.org/person/2963' } }, movieTitle: 'Leaving Las Vegas', role: 'Ben Sanderson' }, { actor: { identity: { low: 14942, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Wilmington, Delaware, USA', tmdbId: '1951', imdbId: '0000223', born: { year: { low: 1963, high: 0 }, month: { low: 10, high: 0 }, day: { low: 6, high: 0 } }, name: 'Elisabeth Shue', bio: 'Elisabeth Judson Shue (born October 6, 1963) is an American actress, best known for her starring roles in the films The Karate Kid (1984), Adventures in Babysitting (1987), Cocktail (1988), Back to the Future Part II (1989), Back to the Future Part III (1990), Soapdish (1991), Leaving Las Vegas (1995), The Saint (1997), Hollow Man (2000), and Piranha 3D (2010). She has won several acting awards and has been nominated for an Academy Award, a Golden Globe and a BAFTA...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/wofhdwRvSLE07tcHPRyNApVzIl9.jpg', url: 'https://themoviedb.org/person/1951' } }, movieTitle: 'Leaving Las Vegas', role: 'Sera' }, { actor: { identity: { low: 14951, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Otley, Yorkshire, England, UK', tmdbId: '6104', imdbId: '0001696', born: { year: { low: 1958, high: 0 }, month: { low: 1, high: 0 }, day: { low: 4, high: 0 } }, name: 'Julian Sands', bio: '​From Wikipedia, the free encyclopedia.  \n\nJulian R. Sands (born 4 January 1958) is an English actor, known for his roles in the Best Picture nominee The Killing Fields, the cult film Warlock, A Room with a View, Arachnophobia, Vatel and the television series 24...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/8TYtEyKZle2B3cUYT7FBM9HJRtZ.jpg', url: 'https://themoviedb.org/person/6104' } }, movieTitle: 'Leaving Las Vegas', role: 'Yuri' }, { actor: { identity: { low: 17639, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Brooklyn - New York - USA', tmdbId: '6105', imdbId: '0507659', born: { year: { low: 1947, high: 0 }, month: { low: 6, high: 0 }, day: { low: 29, high: 0 } }, name: 'Richard Lewis', bio: 'From Wikipedia, the free encyclopedia. \n\nRichard Philip Lewis (born June 29, 1947) is an American comedian and actor...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/4ICUjOwcaRPbUud8uHFgWkNODvc.jpg', url: 'https://themoviedb.org/person/6105' } }, movieTitle: 'Leaving Las Vegas', role: 'Peter' }, { actor: { identity: { low: 16901, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Suresnes, France', tmdbId: '1350', imdbId: '0001393', born: { year: { low: 1966, high: 0 }, month: { low: 7, high: 0 }, day: { low: 15, high: 0 } }, name: 'Irène Jacob', bio: 'Irène Marie Jacob (born 15 July 1966) is a French-born Swiss actress considered one of the preeminent French actresses of her generation. Jacob gained international recognition and acclaim through her work with Polish film director Krzysztof Kieslowski, who cast her in the lead role of The Double Life of Véronique and Three Colors: Red. She came to represent an image of European sophistication, through her "classic beauty and thoughtful, almost melancholic style of acting...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/mYHyYOGBrGLDae1RX9Nkxo6RzwD.jpg', url: 'https://themoviedb.org/person/1350' } }, movieTitle: 'Othello', role: 'Desdemona' }, { actor: { identity: { low: 16239, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Augusta, Georgia, USA', tmdbId: '2975', imdbId: '0000401', born: { year: { low: 1961, high: 0 }, month: { low: 7, high: 0 }, day: { low: 30, high: 0 } }, name: 'Laurence Fishburne', bio: "An American actor of screen and stage, as well as a playwright, director, and producer. He is perhaps best known for his roles as Morpheus in the Matrix science fiction film trilogy and as singer-musician Ike Turner in the Tina Turner biopic What's Love Got to Do With It. He became the first African-American to portray Othello in a motion picture by a major studio when he appeared in Oliver Parker's 1995 film adaption of the Shakespeare play...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/8suOhUmPbfKqDQ17jQ1Gy0mI3P4.jpg', url: 'https://themoviedb.org/person/2975' } }, movieTitle: 'Othello', role: 'Othello' }, { actor: { identity: { low: 16406, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Belfast, Northern Ireland, UK', tmdbId: '11181', imdbId: '0000110', born: { year: { low: 1960, high: 0 }, month: { low: 12, high: 0 }, day: { low: 10, high: 0 } }, name: 'Kenneth Branagh', bio: "Kenneth Charles Branagh (born December 10, 1960) is a Northern Irish-born English actor and film director. He is best known for directing and starring in several film adaptations of William Shakespeare's plays, but has also appeared in a number of films and television series...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/3BJ5izFVhPioT8BtYmAhugQThCS.jpg', url: 'https://themoviedb.org/person/11181' } }, movieTitle: 'Othello', role: 'Iago' }, { actor: { identity: { low: 18581, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'London, England, UK', tmdbId: '27631', imdbId: '0662511', born: { year: { low: 1962, high: 0 }, month: { low: 5, high: 0 }, day: { low: 18, high: 0 } }, name: 'Nathaniel Parker', bio: 'From Wikipedia, the free encyclopedia\n\nNathaniel Parker (born 18 May 1962) is an English stage and screen actor best known for playing the lead in the BBC crime drama series The Inspector Lynley Mysteries, and Agravaine de Bois in the fourth series of Merlin...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/gnAqDpkOHT0mqoBmyiKptnSM3wL.jpg', url: 'https://themoviedb.org/person/27631' } }, movieTitle: 'Othello', role: 'Cassio' }, { actor: { identity: { low: 14853, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Manhattan, New York City, New York, USA', tmdbId: '29369', imdbId: '0000429', born: { year: { low: 1957, high: 0 }, month: { low: 8, high: 0 }, day: { low: 9, high: 0 } }, name: 'Melanie Griffith', bio: 'Melanie Richards Griffith (born August 9, 1957) is an American actress. She began her career in the 1970s, appearing in several independent thriller films before achieving mainstream success in the mid-1980s. \n\nBorn in New York City to actress Tippi Hedren and advertising executive Peter Griffith, she was raised mainly in Los Angeles, where she graduated from the Hollywood Professional School at age 16...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/yffPcqlZMsXTCAZ84a1tLmdcIS6.jpg', url: 'https://themoviedb.org/person/29369' } }, movieTitle: 'Now and Then', role: "Tina 'Teeny' Tercell" }, { actor: { identity: { low: 18576, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Los Angeles, California, USA', tmdbId: '2155', imdbId: '0000301', born: { year: { low: 1982, high: 0 }, month: { low: 3, high: 0 }, day: { low: 11, high: 0 } }, name: 'Thora Birch', bio: 'Thora Birch (born March 11, 1982) is an American actress. She was a child actor in the 1990s, starring in movies such as All I Want for Christmas (1991), Patriot Games (1992), Hocus Pocus (1993), Now and Then (1995), and Alaska (1996). She came to prominence in 1999 after earning worldwide attention and praise for her performance in American Beauty. She then starred in the well received film Ghost World (2001), which earned her a Golden Globe nomination...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/m5jrrJEPkVAiZFijCpZ6nh2VBOo.jpg', url: 'https://themoviedb.org/person/2155' } }, movieTitle: 'Now and Then', role: 'Teeny' }, { actor: { identity: { low: 17356, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Commack, Long Island, New York, USA', tmdbId: '12929', imdbId: '0005280', born: { year: { low: 1962, high: 0 }, month: { low: 3, high: 0 }, day: { low: 21, high: 0 } }, name: "Rosie O'Donnell", bio: "​From Wikipedia, the free encyclopedia.  \n\nRoseann \"Rosie\" O'Donnell (born March 21, 1962) is an American stand-up comedienne, actress, singer, lesbian, author and media personality. She has also been a magazine editor and continues to be a celebrity blogger, LGBT rights activist, television producer and collaborative partner in the LGBT family vacation company R Family Vacations...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/bfeIiPngsbLU7zK8sS18l3Pz3KR.jpg', url: 'https://themoviedb.org/person/12929' } }, movieTitle: 'Now and Then', role: 'Dr. Roberta Martin' }, { actor: { identity: { low: 18405, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Santa Monica, California, USA', tmdbId: '6886', imdbId: '0000207', born: { year: { low: 1980, high: 0 }, month: { low: 2, high: 0 }, day: { low: 12, high: 0 } }, name: 'Christina Ricci', bio: 'Precocious, outspoken child-teen starlet of the 1990s, Christina Ricci is an American actress and producer. She is known for playing unconventional characters with a dark edge. Ricci is the recipient of several accolades, including a National Board of Review Award for Best Supporting Actress and a Satellite Award for Best Actress, as well as Golden Globe, Primetime Emmy, Screen Actors Guild, and Independent Spirit Award nominations...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/dzB58d6fNrTEi7nBAU1tySJc2at.jpg', url: 'https://themoviedb.org/person/6886' } }, movieTitle: 'Now and Then', role: 'Young Roberta Martin' }, { actor: { identity: { low: 18590, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Chelmsford, Essex, England', tmdbId: '30318', imdbId: '0740500', born: { year: { low: 1963, high: 0 }, month: { low: 1, high: 0 }, day: { low: 1, high: 0 } }, name: 'Amanda Root', bio: "Amanda Root (born 1963 in Chelmsford, Essex) is an English stage and screen actor and a former voice actor for children's programmes. \n\nMs Root is possibly best known for her starring role in the 1995 BBC film adaptation of Jane Austen's Persuasion and the British TV comedy All About Me, as Miranda, alongside Richard Lumsden in 2004 and when she was a voice actor, best known for voicing Sophie in BFG. \n\nShe trained for the stage at Webber Douglas Academy of Dramatic Art...", url: 'https://themoviedb.org/person/30318' } }, movieTitle: 'Persuasion', role: 'Anne Elliott' }, { actor: { identity: { low: 15551, high: 0 }, labels: ['Actor', 'Person'], properties: { tmdbId: '87415', imdbId: '0281453', born: { year: { low: 1944, high: 0 }, month: { low: 9, high: 0 }, day: { low: 21, high: 0 } }, name: 'Susan Fleetwood', bio: 'From Wikipedia, the free encyclopedia\n\nSusan Maureen Fleetwood (21 September 1944 — 29 September 1995) was a British stage, film and television actress, best-known as a star of the classical theatre companies of England. She received popular acclaim in the television series Chandler &amp; Co and The Buddha of Suburbia. \n\nDescription above from the Wikipedia article Susan Fleetwood, licensed under CC-BY-SA, full list of contributors on Wikipedia...', died: { year: { low: 1995, high: 0 }, month: { low: 9, high: 0 }, day: { low: 29, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/ww9Xo8KoZUKYiLeniSmC7lvPeUO.jpg', url: 'https://themoviedb.org/person/87415' } }, movieTitle: 'Persuasion', role: 'Lady Russell' }, { actor: { identity: { low: 18591, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Belfast, Northern Ireland, UK', tmdbId: '8785', imdbId: '0001354', born: { year: { low: 1953, high: 0 }, month: { low: 2, high: 0 }, day: { low: 9, high: 0 } }, name: 'Ciarán Hinds', bio: 'From Wikipedia, the free encyclopedia\n\nCiarán Hinds (born 9 February 1953) is an Irish actor. A versatile character actor, he has appeared in feature films such as The Sum of All Fears, Road to Perdition, Munich, There Will Be Blood, Harry Potter and the Deathly Hallows – Part 2, Tinker Tailor Soldier Spy, Frozen, Silence, Red Sparrow, Justice League, First Man, and Frozen II...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/udj9q0p3NSxolvaIcu32O25sRjH.jpg', url: 'https://themoviedb.org/person/8785' } }, movieTitle: 'Persuasion', role: 'Captain Frederick Wentworth' }, { actor: { identity: { low: 18592, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Marylebone, London, England', tmdbId: '13328', imdbId: '0714874', born: { year: { low: 1939, high: 0 }, month: { low: 7, high: 0 }, day: { low: 16, high: 0 } }, name: 'Corin Redgrave', bio: "English actor, far left activist and a prominent member of the Workers' Revolutionary Party, Corin Redgrave was part of the third generation of a theatrical dynasty spanning four generations, the only son and middle child of Michael Redgrave and Rachel Kempson, and brother of Vanessa and Lynn Redgrave. He was the father of Jemma Redgrave and was married to Kika Markham from 1985 until his death in 2010...", died: { year: { low: 2010, high: 0 }, month: { low: 4, high: 0 }, day: { low: 6, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/moHo95qvkgkXLnWNO93Qxdnnt2U.jpg', url: 'https://themoviedb.org/person/13328' } }, movieTitle: 'Persuasion', role: 'Sir Walter Eliot' }, { actor: { identity: { low: 14334, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'New York City, New York, USA', tmdbId: '2372', imdbId: '0000579', born: { year: { low: 1950, high: 0 }, month: { low: 4, high: 0 }, day: { low: 13, high: 0 } }, name: 'Ron Perlman', bio: 'Ron Perlman is an American film and television actor, best known for his titular role in the "Hellboy" movies and his long run as Clay Morrow on the television series "Sons of Anarchy", as well as scores of other iconic performances, including "The Name of the Rose", "City of Lost Children", and "Pacific Rim". He won a Golden Globe for his role as Vincent in the television series "Beauty and the Beast" and is a star and executive producer of the Amazon series "Hand of God"...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/nfky6J9ueey1gMdWMNU9k9YdfGP.jpg', url: 'https://themoviedb.org/person/2372' } }, movieTitle: 'City of Lost Children, The (Cité des enfants perdus, La)', role: 'One' }, { actor: { identity: { low: 18332, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Paris, France', tmdbId: '13842', imdbId: '0900136', born: { year: { low: 1984, high: 0 }, month: { low: 12, high: 0 }, day: { low: 1, high: 0 } }, name: 'Judith Vittet', bio: '​From Wikipedia, the free encyclopedia.  \n\nJudith Vittet (born December 1984) is a French actress best known for her role as the streetwise orphan "Miette" in La Cité des enfants perdus (English: The City of Lost Children) (1995). She was nominated for a 1996 Saturn Award in the category of Best Performance By a Younger Actor. \n\nJudith Vittet was picked out of hundreds of young actresses auditioning for the part of Miette ("Crumb")...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/eFCIj6Kb3Tcf5JQwD2ExSxTtWK6.jpg', url: 'https://themoviedb.org/person/13842' } }, movieTitle: 'City of Lost Children, The (Cité des enfants perdus, La)', role: 'Miette' }, { actor: { identity: { low: 18331, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Providencia, Chile', tmdbId: '13843', imdbId: '0256399', born: { year: { low: 1924, high: 0 }, month: { low: 4, high: 0 }, day: { low: 7, high: 0 } }, name: 'Daniel Emilfork', bio: "​From Wikipedia, the free encyclopedia.  \n\nDaniel Emilfork Berenstein (April 7, 1924 – October 17, 2006) was a Chilean stage and film actor. \n\nEmilfork was born in Providencia, Chile after his Jewish socialist parents from Kiev fled a pogrom in Odessa. At age 25, he left Chile and settled in France, because, according to his friend Alejandro Jodorowsky, he didn't feel comfortable being a homosexual man in Chile...", died: { year: { low: 2006, high: 0 }, month: { low: 10, high: 0 }, day: { low: 17, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/1EDUHOHQfDUlRwYDsIjyIPQOimx.jpg', url: 'https://themoviedb.org/person/13843' } }, movieTitle: 'City of Lost Children, The (Cité des enfants perdus, La)', role: 'Krank' }, { actor: { identity: { low: 16889, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Saumur, Maine-et-Loire, France', tmdbId: '2413', imdbId: '0684500', born: { year: { low: 1955, high: 0 }, month: { low: 3, high: 0 }, day: { low: 4, high: 0 } }, name: 'Dominique Pinon', bio: 'After studying at the Faculty of Arts of Poitiers, Dominique Pinon moved to Paris where he enrolled at the Cours Simon acting school. His introducing appearance in cinema took place in 1981 in the movie Diva by Jean-Jacques Beineix. \n\nPinon is considered to be a theatre actor in first place, with constant on-stage acting since 1985. Until today, he has appeared in the plays of Gildas Bourdet, Jorge Lavelli, Valère Novarina and numerous others...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/rIPUhNwGSglgKLgMQWz0JNCqIzf.jpg', url: 'https://themoviedb.org/person/2413' } }, movieTitle: 'City of Lost Children, The (Cité des enfants perdus, La)', role: 'Le Scaphandrier / Les Clones' }, { actor: { identity: { low: 28248, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Shenyang, Liaoning Province, China', tmdbId: '643', imdbId: '0000084', born: { year: { low: 1965, high: 0 }, month: { low: 12, high: 0 }, day: { low: 31, high: 0 } }, name: 'Gong Li', bio: 'From Wikipedia, the free encyclopedia\n\nGong Li (born 31 December 1965) is a Chinese-born Singaporean film actress. Gong first came into international prominence through close collaboration with Chinese director Zhang Yimou and is credited with helping bring Chinese cinema to Europe and the United States...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/uP3Fs3QUsGBxhNqGFWMnN1Z2l8z.jpg', url: 'https://themoviedb.org/person/643' } }, movieTitle: 'Shanghai Triad (Yao a yao yao dao waipo qiao)', role: 'Bijou (Xiao Jinbao)' }, { actor: { identity: { low: 32552, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Wendeng, Shandong, China', tmdbId: '146097', imdbId: '0508349', born: { year: { low: 1946, high: 0 }, month: { low: 11, high: 0 }, day: { low: 28, high: 0 } }, name: 'Li Baotian', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/nKIGAk9nQkhWCN2cI2U0Kl26bw0.jpg', url: 'https://themoviedb.org/person/146097' } }, movieTitle: 'Shanghai Triad (Yao a yao yao dao waipo qiao)', role: 'Boss Tang Laoda' }, { actor: { identity: { low: 18714, high: 0 }, labels: ['Actor', 'Person'], properties: { name: 'Wang Xiaoxiao', tmdbId: '150151', imdbId: '0944507', url: 'https://themoviedb.org/person/150151' } }, movieTitle: 'Shanghai Triad (Yao a yao yao dao waipo qiao)', role: 'Shuisheng' }, { actor: { identity: { low: 18715, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Heze, Shandong, China', tmdbId: '143358', imdbId: '0508554', born: { year: { low: 1954, high: 0 }, month: { low: 7, high: 0 }, day: { low: 7, high: 0 } }, name: 'Xuejian Li', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/p756d1m8Dcek4OA83RVqiJOosTF.jpg', url: 'https://themoviedb.org/person/143358' } }, movieTitle: 'Shanghai Triad (Yao a yao yao dao waipo qiao)', role: null }, { actor: { identity: { low: 14526, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Santa Ana, California, USA', tmdbId: '1160', imdbId: '0000201', born: { year: { low: 1958, high: 0 }, month: { low: 4, high: 0 }, day: { low: 29, high: 0 } }, name: 'Michelle Pfeiffer', bio: 'Michelle Marie Pfeiffer (born April 29, 1958) is an American actress and producer. She has received many accolades, including a Golden Globe Award, and three nominations for Academy Award. \n\nPfeiffer began to pursue an acting career in 1978 and had her first leading role in the musical film Grease 2 (1982)...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/oGUmQBU87QXAsnaGleYaAjAXSlj.jpg', url: 'https://themoviedb.org/person/1160' } }, movieTitle: 'Dangerous Minds', role: 'Louanne Johnson' }, { actor: { identity: { low: 18352, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'New York City, New York, U.S.', tmdbId: '11902', imdbId: '0000862', born: { year: { low: 1951, high: 0 }, month: { low: 4, high: 0 }, day: { low: 22, high: 0 } }, name: 'Robin Bartlett', bio: "From Wikipedia, the free encyclopedia. Robin Bartlett (born April 22, 1951) is an American actress. She was born in England, but was raised in Switzerland. \n\nShe was formerly married to the actor Alan Rosenberg. \n\nShe appeared in the short-lived series The Powers That Be and had a recurring role as Debbie Buchman (the sister of Paul Reiser's character) in the series Mad About You. \n\nShe has played a teacher at least twice – as Mrs. Elliott in 1989's Lean on Me, then again as French teacher Mrs...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/FUF2kg7Rn2C34TMo3YQjgGqhFo.jpg', url: 'https://themoviedb.org/person/11902' } }, movieTitle: 'Dangerous Minds', role: 'Carla Nichols' }, { actor: { identity: { low: 15544, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Rosenheim, Germany', tmdbId: '10477', imdbId: '0001169', born: { year: { low: 1945, high: 0 }, month: { low: 7, high: 0 }, day: { low: 19, high: 0 } }, name: 'George Dzundza', bio: 'George Dzundza (born July 19, 1945) is an American television and film actor...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/z0BI9G0Q617p02dV7q027uuWPD3.jpg', url: 'https://themoviedb.org/person/10477' } }, movieTitle: 'Dangerous Minds', role: 'Hal Griffith' }, { actor: { identity: { low: 17348, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Detroit, Michigan, USA', tmdbId: '24047', imdbId: '0005524', born: { year: { low: 1960, high: 0 }, month: { low: 3, high: 0 }, day: { low: 12, high: 0 } }, name: 'Courtney B. Vance', bio: 'Courtney B. Vance (born March 12, 1960) is an American actor. He was formerly a regular on Law & Order: Criminal Intent, FlashForward, and The Closer...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/q4oCmhqEPXKSRK2hTZzTz2Zt4Ba.jpg', url: 'https://themoviedb.org/person/24047' } }, movieTitle: 'Dangerous Minds', role: 'George Grandey' }, { actor: { identity: { low: 15706, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Idar-Oberstein, Germany', tmdbId: '62', imdbId: '0000246', born: { year: { low: 1955, high: 0 }, month: { low: 3, high: 0 }, day: { low: 19, high: 0 } }, name: 'Bruce Willis', bio: 'An American actor and producer. His career began in television in the 1980s and has continued both in television and film since, including comedic, dramatic, and action roles. He is well known for the role of John McClane in the Die Hard series. Willis was born in Idar-Oberstein, West Germany, the son of a Kassel-born German, Marlene, who worked in a bank, and David Willis, an American soldier. Willis is the eldest of four children...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/A1XBu3CffBpSK8HEIJM8q7Mn4lz.jpg', url: 'https://themoviedb.org/person/62' } }, movieTitle: 'Twelve Monkeys (a.k.a. 12 Monkeys)', role: 'James Cole' }, { actor: { identity: { low: 18671, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Manhattan - New York City - New York - USA', tmdbId: '288', imdbId: '0781218', born: { year: { low: 1970, high: 0 }, month: { low: 10, high: 0 }, day: { low: 14, high: 0 } }, name: 'Jon Seda', bio: "Jonathan Seda (born October 14, 1970) is an American actor of Puerto Rican descent, possibly best known for his role as Detective Paul Falsone on NBC's: Homicide: Life on the Street. Seda was an amateur boxer who in 1992, auditioned for and was given a role in the film Gladiator. He became interested in acting and appeared in various films. He portrayed Chris Pérez alongside Jennifer Lopez in Selena and became widely known to both the Hispanic and non-Hispanic communities...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/hGDXJKzXGPulVmxWBxyzrTY4RT4.jpg', url: 'https://themoviedb.org/person/288' } }, movieTitle: 'Twelve Monkeys (a.k.a. 12 Monkeys)', role: 'Jose' }, { actor: { identity: { low: 18672, high: 0 }, labels: ['Actor', 'Person'], properties: { name: 'Michael Chance', tmdbId: '1077231', imdbId: '0151232', url: 'https://themoviedb.org/person/1077231' } }, movieTitle: 'Twelve Monkeys (a.k.a. 12 Monkeys)', role: 'Scarface' }, { actor: { identity: { low: 18670, high: 0 }, labels: ['Actor', 'Person'], properties: { name: 'Joseph Melito', tmdbId: '975569', imdbId: '0577828', url: 'https://themoviedb.org/person/975569' } }, movieTitle: 'Twelve Monkeys (a.k.a. 12 Monkeys)', role: 'Young Cole' }, { actor: { identity: { low: 17007, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Uch Ibadan organogram, Ibadan, Nigeria', tmdbId: '1331', imdbId: '0915989', born: { year: { low: 1960, high: 0 }, month: { low: 4, high: 0 }, day: { low: 4, high: 0 } }, name: 'Hugo Weaving', bio: 'Hugo Wallace Weaving (born 4 April 1960) is a British-Australian film and stage actor. He is best known for his roles as Agent Smith in the Matrix trilogy, Elrond in the Lord of the Rings trilogy, "V" in V for Vendetta, and performances in numerous Australian character dramas. \n\nDescription above from the Wikipedia article Hugo Weaving, licensed under CC-BY-SA, full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/7eDl1FXoHUlic95WHf96RICtL9N.jpg', url: 'https://themoviedb.org/person/1331' } }, movieTitle: 'Babe', role: 'Rex the Male Sheepdog (voice)' }, { actor: { identity: { low: 18253, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Utah, United States', tmdbId: '58136', imdbId: '0004815', born: { year: { low: 1963, high: 0 }, month: { low: 8, high: 0 }, day: { low: 16, high: 0 } }, name: 'Christine Cavanaugh', bio: "From Wikipedia, the free encyclopedia. Christine Cavanaugh (born August 16, 1963) is an American former voice actress who had a distinctive speaking style and had provided the voice for a large range of cartoon characters. She is best known as the voice of Babe in the hit film, Babe, Chuckie Finster on Rugrats and for being the original voice of Dexter on Dexter's Laboratory. In 2001, she retired from voice acting for personal reasons...", died: { year: { low: 2014, high: 0 }, month: { low: 12, high: 0 }, day: { low: 22, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/qOUpGURljNhgFzZ5SmV5miAmT9x.jpg', url: 'https://themoviedb.org/person/58136' } }, movieTitle: 'Babe', role: 'Babe the Gallant Pig (voice)' }, { actor: { identity: { low: 17213, high: 0 }, labels: ['Actor', 'Person'], properties: { tmdbId: '52699', imdbId: '0542706', born: { year: { low: 1951, high: 0 }, month: { low: 7, high: 0 }, day: { low: 28, high: 0 } }, name: 'Danny Mann', bio: 'From Wikipedia, the free encyclopedia. Daniel "Danny" Mann is an American voice actor, writer, singer, musician, and production manager. He is best known for his voice of Hector from Heathcliff and the Catillac Cats, Freeway, Cloudraker and Lightspeed in Transformers, Backwoods Beagle in DuckTales, Kaltag in Balto, Ferdinand from Babe, and Serge in Open Season, Open Season 2, and as Serge and Kevin the porcupine Open Season 3...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/980QYqXIZCMn5Knx0vjROkw9vKo.jpg', url: 'https://themoviedb.org/person/52699' } }, movieTitle: 'Babe', role: 'Ferdinand the Duck (voice)' }, { actor: { identity: { low: 18254, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Oxford, England, UK', tmdbId: '6199', imdbId: '0546816', born: { year: { low: 1941, high: 0 }, month: { low: 5, high: 0 }, day: { low: 18, high: 0 } }, name: 'Miriam Margolyes', bio: 'An English actress and voice artist. Her earliest roles were in theatre and after several supporting roles in film and television she won a BAFTA Award for her role in The Age of Innocence (1993). \n\nDescription above from the Wikipedia article Miriam Margolyes, licensed under CC-BY-SA,full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/93k0aFwiuDT5sIS3oTX1jKgUYXE.jpg', url: 'https://themoviedb.org/person/6199' } }, movieTitle: 'Babe', role: 'Fly the Female Sheepdog (voice)' }, { actor: { identity: { low: 16909, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Leeds, West Yorkshire, England, UK ', tmdbId: '27764', imdbId: '0905357', born: { year: { low: 1967, high: 0 }, month: { low: 12, high: 0 }, day: { low: 30, high: 0 } }, name: 'Steven Waddington', bio: 'Steven Waddington is an English film and television actor. He studied at the East 15 Acting School in Loughton, Essex and subsequently joined the Royal Shakespeare Company, first at Stratford and then at the Barbican, London...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/qyoYwUI220KtUSMEwNGCTokWDsO.jpg', url: 'https://themoviedb.org/person/27764' } }, movieTitle: 'Carrington', role: 'Ralph Partridge' }, { actor: { identity: { low: 17182, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Paddington, London, England', tmdbId: '7056', imdbId: '0000668', born: { year: { low: 1959, high: 0 }, month: { low: 4, high: 0 }, day: { low: 15, high: 0 } }, name: 'Emma Thompson', bio: 'Emma Thompson (born 15 April 1959) is a British actress, comedian and screenwriter. Her first major film role was in the 1989 romantic comedy The Tall Guy. In 1992, Thompson won multiple acting awards, including an Academy Award and a BAFTA Award for Best Actress, for her performance in the British drama Howards End. The following year Thompson garnered dual Academy Award nominations, as Best Actress for The Remains of the Day and as Best Supporting Actress for In the Name of the Father...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/odPswHsSsed56uHeVWmABKKlXlX.jpg', url: 'https://themoviedb.org/person/7056' } }, movieTitle: 'Carrington', role: 'Dora Carrington' }, { actor: { identity: { low: 18312, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Hammersmith, London, England, UK', tmdbId: '54447', imdbId: '0922335', born: { year: { low: 1966, high: 0 }, month: { low: 6, high: 0 }, day: { low: 19, high: 0 } }, name: 'Samuel West', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/yIDXDpgXxPbl5qWu8KHV7fGzVNr.jpg', url: 'https://themoviedb.org/person/54447' } }, movieTitle: 'Carrington', role: 'Gerald Brenan' }, { actor: { identity: { low: 14783, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Carmel, Flintshire, Reino Unido', tmdbId: '378', imdbId: '0000596', born: { year: { low: 1947, high: 0 }, month: { low: 6, high: 0 }, day: { low: 1, high: 0 } }, name: 'Jonathan Pryce', bio: "Jonathan Pryce, CBE (born 1 June 1947) is a Welsh stage and film actor and singer. \n\nAfter studying at the Royal Academy of Dramatic Art and meeting his long time partner, English actress Kate Fahy, in 1974, he began his career as a stage actor in the 1970s. His work in theatre, including an award-winning performance in the title role of the Royal Court Theatre's \"Hamlet\", led to several supporting roles in film and television...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/zwSv5uXzPTtmitFe39UdqnVwmdL.jpg', url: 'https://themoviedb.org/person/378' } }, movieTitle: 'Carrington', role: 'Lytton Strachey' }, { actor: { identity: { low: 13258, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'New York City, New York, USA', tmdbId: '4038', imdbId: '0000215', born: { year: { low: 1946, high: 0 }, month: { low: 10, high: 0 }, day: { low: 4, high: 0 } }, name: 'Susan Sarandon', bio: 'An American actress. She has worked in films and television since 1969, and won an Academy Award for Best Actress for her performance in the 1995 film Dead Man Walking. She had also been nominated for the award for four films before that and has received other recognition for her work. She is also noted for her social and political activism for a variety of liberal causes...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/oHYYL8bNakAREaLUBtMul5uMG0A.jpg', url: 'https://themoviedb.org/person/4038' } }, movieTitle: 'Dead Man Walking', role: 'Sister Helen Prejean' }, { actor: { identity: { low: 16323, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Hempstead, Long Island, New York, USA', tmdbId: '10361', imdbId: '0000855', born: { year: { low: 1939, high: 0 }, month: { low: 3, high: 0 }, day: { low: 14, high: 0 } }, name: 'Raymond J. Barry', bio: 'Raymond J. Barry (born March 14, 1939) is an American film, television and stage actor...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/gDAchPBmFMKtUsqgHfzn3mX6SEM.jpg', url: 'https://themoviedb.org/person/10361' } }, movieTitle: 'Dead Man Walking', role: 'Earl Delacroix' }, { actor: { identity: { low: 14689, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Philadelphia, Pennsylvania, USA', tmdbId: '10360', imdbId: '0698764', born: { year: { low: 1930, high: 0 }, month: { low: 12, high: 0 }, day: { low: 13, high: 0 } }, name: 'Robert Prosky', bio: 'From Wikipedia, the free encyclopedia. Robert Prosky (December 13, 1930 — December 8, 2008) was an American stage, film, and television actor. \n\nDescription above from the Wikipedia article Robert Prosky, licensed under CC-BY-SA, full list of contributors on Wikipedia...', died: { year: { low: 2008, high: 0 }, month: { low: 12, high: 0 }, day: { low: 8, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/yV95RE8UGyN8rZYF9W4fOGaAV6U.jpg', url: 'https://themoviedb.org/person/10360' } }, movieTitle: 'Dead Man Walking', role: 'Hilton Barber' }, { actor: { identity: { low: 14421, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Santa Monica, California, USA', tmdbId: '2228', imdbId: '0000576', born: { year: { low: 1960, high: 0 }, month: { low: 8, high: 0 }, day: { low: 17, high: 0 } }, name: 'Sean Penn', bio: 'An American actor, screenwriter and film director, also known for his political and social activism. He is a two-time Academy Award winner for his roles in Mystic River (2003) and Milk (2008), as well as the recipient of a Golden Globe Award for the former and a Screen Actors Guild Award for the latter. Penn began his acting career in television with a brief appearance in a 1974 episode of Little House on the Prairie, directed by his father Leo Penn...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/lpZRNf56TmPsNNWZ7lhcgFM6rBc.jpg', url: 'https://themoviedb.org/person/2228' } }, movieTitle: 'Dead Man Walking', role: 'Matthew Poncelet' }, { actor: { identity: { low: 18217, high: 0 }, labels: ['Actor', 'Person'], properties: { name: 'Victor Steinbach', tmdbId: '6171', imdbId: '0825692', url: 'https://themoviedb.org/person/6171' } }, movieTitle: 'Across the Sea of Time', role: 'Seaman--Pilot' }, { actor: { identity: { low: 18214, high: 0 }, labels: ['Actor', 'Person'], properties: { name: 'Peter Reznick', tmdbId: '1467084', imdbId: '0722135', url: 'https://themoviedb.org/person/1467084' } }, movieTitle: 'Across the Sea of Time', role: 'Tomas Minton' }, { actor: { identity: { low: 18215, high: 0 }, labels: ['Actor', 'Person'], properties: { name: 'John McDonough', tmdbId: '1467085', imdbId: '0568159', url: 'https://themoviedb.org/person/1467085' } }, movieTitle: 'Across the Sea of Time', role: 'Freighter Chief' }, { actor: { identity: { low: 18216, high: 0 }, labels: ['Actor', 'Person'], properties: { name: 'Avi Hoffman', tmdbId: '1467086', imdbId: '0388818', url: 'https://themoviedb.org/person/1467086' } }, movieTitle: 'Across the Sea of Time', role: 'Seaman' }, { actor: { identity: { low: 15022, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Wichita, Kansas, USA', tmdbId: '1796', imdbId: '0000263', born: { year: { low: 1951, high: 0 }, month: { low: 1, high: 0 }, day: { low: 12, high: 0 } }, name: 'Kirstie Alley', bio: "From Wikipedia, the free encyclopedia. Kirstie Louise Alley (born January 12, 1951) is an American actress known for her role in the TV show Cheers, in which she played Rebecca Howe from 1987–1993, winning an Emmy Award and a Golden Globe Award as the Outstanding Lead Actress in a Comedy Series in 1991. She is also known for her role in the Look Who's Talking film series as Mollie Ubriacco...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/9XZOeQtmvHdBkuMrlxO5PHPZwJo.jpg', url: 'https://themoviedb.org/person/1796' } }, movieTitle: 'It Takes Two', role: 'Diane Barrows' }, { actor: { identity: { low: 14485, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Brooklyn, New York City, New York, USA', tmdbId: '26472', imdbId: '0000430', born: { year: { low: 1958, high: 0 }, month: { low: 8, high: 0 }, day: { low: 24, high: 0 } }, name: 'Steve Guttenberg', bio: 'Steve Guttenberg is an American film and television writer, director, producer, actor and comedian, best known for many starring roles in Hollywood feature films during the 1980s, such as Cocoon, Three Men and a Baby, Police Academy, and Short Circuit...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/ghTMepliFNcRQHNELs8pgNDsZyW.jpg', url: 'https://themoviedb.org/person/26472' } }, movieTitle: 'It Takes Two', role: 'Roger Callaway' }, { actor: { identity: { low: 18457, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Sherman Oaks, California, USA', tmdbId: '67849', imdbId: '0001581', born: { year: { low: 1986, high: 0 }, month: { low: 6, high: 0 }, day: { low: 13, high: 0 } }, name: 'Mary-Kate Olsen', bio: 'Mary-Kate Olsen is an American actress, producer, author and fashion designer. She made her career debut in 1987 alongside her twin sister Ashley Olsen in the television series Full House. Following the huge success of Full House in America, Mary-Kate and Ashley established a successful career starring in television and film roles...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/ohsjU66AUS5qkymN9E5VDLlBQ0W.jpg', url: 'https://themoviedb.org/person/67849' } }, movieTitle: 'It Takes Two', role: 'Amanda Lemmon / Alyssa Callaway' }, { actor: { identity: { low: 18458, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Sherman Oaks, California, USA', tmdbId: '67848', imdbId: '0001580', born: { year: { low: 1986, high: 0 }, month: { low: 6, high: 0 }, day: { low: 13, high: 0 } }, name: 'Ashley Olsen', bio: 'Ashley Olsen is an American actress, producer, author and fashion designer. She made her career debut in 1987 alongside her twin sister Mary-Kate Olsen in the television series Full House. Following the huge success of Full House in America, they both established a successful career starring in television and film roles...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/suf5kWfRYErCp6D5YnOZlpGA8dH.jpg', url: 'https://themoviedb.org/person/67848' } }, movieTitle: 'It Takes Two', role: 'Alyssa Callaway / Amanda Lemmon' }, { actor: { identity: { low: 17432, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'San Francisco, California, USA', tmdbId: '5588', imdbId: '0000224', born: { year: { low: 1976, high: 0 }, month: { low: 10, high: 0 }, day: { low: 4, high: 0 } }, name: 'Alicia Silverstone', bio: 'Alicia Silverstone ( born October 4, 1976) is an American actress, author, and former fashion model. She first came to widespread attention in music videos for Aerosmith, and is perhaps best known for her roles in Hollywood films such as Clueless (1995) and her portrayal of Batgirl in Batman & Robin (1997)...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/pyxqkP4i0ubVdoRe5hoiiiwkHkb.jpg', url: 'https://themoviedb.org/person/5588' } }, movieTitle: 'Clueless', role: 'Cher Horowitz' }, { actor: { identity: { low: 18337, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Passaic, New Jersey, USA', tmdbId: '22226', imdbId: '0748620', born: { year: { low: 1969, high: 0 }, month: { low: 4, high: 0 }, day: { low: 6, high: 0 } }, name: 'Paul Rudd', bio: "Paul Stephen Rudd (born April 6, 1969) is an American actor, comedian, writer, and producer. He studied theatre at the University of Kansas and the British American Drama Academy, before making his acting debut in 1992 with NBC's drama series Sisters...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/8eTtJ7XVXY0BnEeUaSiTAraTIXd.jpg', url: 'https://themoviedb.org/person/22226' } }, movieTitle: 'Clueless', role: 'Josh Lucas' }, { actor: { identity: { low: 18336, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Atlanta, Georgia, USA', tmdbId: '328', imdbId: '0005261', born: { year: { low: 1977, high: 0 }, month: { low: 11, high: 0 }, day: { low: 10, high: 0 } }, name: 'Brittany Murphy', bio: "Was an American actress and singer. Born in New Jersey, Murphy moved to Los Angeles at the age of 14 with her mother Sharon, in the hopes of landing acting roles. She quickly landed spots in commercials and guest starring roles on television, and appeared as a series regular on two short-lived family sitcoms, Drexell's Class and Almost Home...", died: { year: { low: 2009, high: 0 }, month: { low: 12, high: 0 }, day: { low: 20, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/9vjgU9EcHXYyh6Vc4nmpoPVNqsQ.jpg', url: 'https://themoviedb.org/person/328' } }, movieTitle: 'Clueless', role: 'Tai Frasier' }, { actor: { identity: { low: 18335, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Bronx, New York, USA', tmdbId: '58150', imdbId: '0001107', born: { year: { low: 1966, high: 0 }, month: { low: 1, high: 0 }, day: { low: 20, high: 0 } }, name: 'Stacey Dash', bio: 'Stacey Lauretta Dash (born January 20, 1966) is an American film and television actress...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/cSzVCx2LJkXZoUGA4z4i8cm9wMD.jpg', url: 'https://themoviedb.org/person/58150' } }, movieTitle: 'Clueless', role: 'Dionne Davenport' }, { actor: { identity: { low: 14268, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Arkabutla, Mississippi, USA', tmdbId: '15152', imdbId: '0000469', born: { year: { low: 1931, high: 0 }, month: { low: 1, high: 0 }, day: { low: 17, high: 0 } }, name: 'James Earl Jones', bio: 'James Earl Jones (born January 17, 1931) is a multi-award-winning American actor of theater and film, well known for his distinctive bass voice and for his portrayal of characters of substance, gravitas and leadership. He is known for providing the voice of Darth Vader in the Star Wars franchise and the tagline for CNN. James Earl Jones was born in Arkabutla, Mississippi, the son of Ruth (née Connolly) and Robert Earl Jones...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/oqMPIsXrl9SZkRfIKN08eFROmH6.jpg', url: 'https://themoviedb.org/person/15152' } }, movieTitle: 'Cry, the Beloved Country', role: 'Rev. Stephen Kumalo' }, { actor: { identity: { low: 18344, high: 0 }, labels: ['Actor', 'Person'], properties: { name: 'Vusi Kunene', tmdbId: '65887', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/xPJME6yJwkKL1fL9lKEXmyzvwr8.jpg', imdbId: '0475100', url: 'https://themoviedb.org/person/65887' } }, movieTitle: 'Cry, the Beloved Country', role: null }, { actor: { identity: { low: 11930, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Limerick City, Munster, Ireland', tmdbId: '194', imdbId: '0001321', born: { year: { low: 1930, high: 0 }, month: { low: 10, high: 0 }, day: { low: 1, high: 0 } }, name: 'Richard Harris', bio: "Richard St. John Harris was an Irish actor, singer-songwriter, theatrical producer, film director and writer. He appeared on stage and in many films, and is perhaps best known for his roles as King Arthur in Camelot (1967), as Oliver Cromwell in Cromwell (1970) and as Albus Dumbledore in Harry Potter and the Philosopher's Stone (2001) and Harry Potter and the Chamber of Secrets (2002), his last film...", died: { year: { low: 2002, high: 0 }, month: { low: 10, high: 0 }, day: { low: 25, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/51wDHVFNqrYgvUBMOcACAt4sJU9.jpg', url: 'https://themoviedb.org/person/194' } }, movieTitle: 'Cry, the Beloved Country', role: 'James Jarvis' }, { actor: { identity: { low: 17082, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Baltimore, Maryland, USA', tmdbId: '17764', imdbId: '0001165', born: { year: { low: 1951, high: 0 }, month: { low: 1, high: 0 }, day: { low: 30, high: 0 } }, name: 'Charles S. Dutton', bio: 'Charles Stanley Dutton (born January 30, 1951) is an American stage, film, and television actor and director. He is perhaps best known for starring in the television series Roc (1991–1994) and House MD (as the father of Eric Foreman). Description above from the Wikipedia article Charles S. Dutton, licensed under CC-BY-SA, full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/zX8lrPMMC6Uh1ZrNkcrvempl02X.jpg', url: 'https://themoviedb.org/person/17764' } }, movieTitle: 'Cry, the Beloved Country', role: 'John Kumalo' }, { actor: { identity: { low: 16525, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Burnley, Lancashire, England, UK', tmdbId: '1327', imdbId: '0005212', born: { year: { low: 1939, high: 0 }, month: { low: 5, high: 0 }, day: { low: 25, high: 0 } }, name: 'Ian McKellen', bio: "Sir Ian Murray McKellen, CH, CBE (born 25 May 1939) is an English actor. He is the recipient of six Laurence Olivier Awards, a Tony Award, a Golden Globe Award, a Screen Actors Guild Award, a BIF Award, two Saturn Awards, four Drama Desk Awards and two Critics' Choice Awards. He has also received two Academy Award nominations, eight BAFTA film and TV nominations and five Emmy Award nominations...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/5cnnnpnJG6TiYUSS7qgJheUZgnv.jpg', url: 'https://themoviedb.org/person/1327' } }, movieTitle: 'Richard III', role: 'Richard III' }, { actor: { identity: { low: 16698, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Lincoln, Lincolnshire, England, UK', tmdbId: '388', imdbId: '0000980', born: { year: { low: 1949, high: 0 }, month: { low: 5, high: 0 }, day: { low: 24, high: 0 } }, name: 'Jim Broadbent', bio: "One of England's most versatile character actors, Jim Broadbent was born on May 24, 1949, in Lincolnshire, the youngest son of furniture maker Roy Broadbent and sculptress Dee Broadbent. Jim attended a Quaker boarding school in Reading before successfully applying for a place at an art school. His heart was in acting, though, and he would later transfer to the London Academy of Music and Dramatic Art (LAMDA)...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/2aiaMmDXEbzSkevEI3iVKLuWeCt.jpg', url: 'https://themoviedb.org/person/388' } }, movieTitle: 'Richard III', role: 'The Duke of Buckingham' }, { actor: { identity: { low: 16107, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Topeka, Kansas, USA', tmdbId: '516', imdbId: '0000906', born: { year: { low: 1958, high: 0 }, month: { low: 5, high: 0 }, day: { low: 29, high: 0 } }, name: 'Annette Bening', bio: "An American film and television actress. She's a four-time Academy Awards nominee for her roles in the feature films The Grifters, American Beauty, Being Julia and The Kids Are All Right, winning Golden Globe Awards for the latter two films...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/vVAvoiE6FQ4couqaB0ogaHR6Ef7.jpg', url: 'https://themoviedb.org/person/516' } }, movieTitle: 'Richard III', role: 'Queen Elizabeth' }, { actor: { identity: { low: 15859, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Manhattan, New York City, New York, USA', tmdbId: '3223', imdbId: '0000375', born: { year: { low: 1965, high: 0 }, month: { low: 4, high: 0 }, day: { low: 4, high: 0 } }, name: 'Robert Downey Jr.', bio: "Robert John Downey Jr. (born April 4, 1965) is an American actor and producer. Downey made his screen debut in 1970, at the age of five, when he appeared in his father's film Pound, and has worked consistently in film and television ever since. He received two Academy Award nominations for his roles in films Chaplin (1992) and Tropic Thunder (2008). \n\nDowney Jr. is most known for his role in the Marvel Cinematic Universe as Tony Stark/Iron Man...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/5qHNjhtjMD4YWH3UP0rm4tKwxCL.jpg', url: 'https://themoviedb.org/person/3223' } }, movieTitle: 'Richard III', role: 'Earl Rivers' }, { actor: { identity: { low: 17573, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Chicago, Illinois, USA', tmdbId: '18291', imdbId: '0005478', born: { year: { low: 1975, high: 0 }, month: { low: 9, high: 0 }, day: { low: 8, high: 0 } }, name: 'Larenz Tate', bio: "Larenz Tate (born September 8, 1975) is an American film and television actor. Tate was born on the west side of Chicago, Illinois. He is the youngest of three siblings whose family moved to California when he was nine years old. Convinced by their parents to enter a drama program at the Inner City Cultural Center, the trio did not take the lessons seriously until classmate Malcolm-Jamal Warner's ascent to fame after being cast on the sitcom The Cosby Show...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/gkmf4YRm6TI5Guu9LjQIOxIoQvC.jpg', url: 'https://themoviedb.org/person/18291' } }, movieTitle: 'Dead Presidents', role: 'Anthony Curtis' }, { actor: { identity: { low: 18355, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Chicago - Illinois - USA', tmdbId: '6862', imdbId: '0135585', born: { year: { low: 1975, high: 0 }, month: { low: 1, high: 0 }, day: { low: 17, high: 0 } }, name: 'Freddy Rodríguez', bio: "Freddy Rodriguez (born January 17, 1975 from two Puerto Rican parents) is an American actor known for playing the characters Hector Federico \"Rico\" Diaz on HBO's Six Feet Under and El Wray in Robert Rodriguez's Planet Terror. Recently, he was a recurring cast member on the series Ugly Betty as Giovanni \"Gio\" Rossi...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/lxBSNLtNmIuRAMhmLF2TBYEgLl9.jpg', url: 'https://themoviedb.org/person/6862' } }, movieTitle: 'Dead Presidents', role: 'Jose' }, { actor: { identity: { low: 18354, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Atlanta, Georgia, USA', tmdbId: '66', imdbId: '0000676', born: { year: { low: 1971, high: 0 }, month: { low: 8, high: 0 }, day: { low: 31, high: 0 } }, name: 'Chris Tucker', bio: 'Christopher "Chris" Tucker (born August 31, 1971) is an American actor and comedian, best known for his roles as Detective James Carter in the Rush Hour trilogy and Smokey in the 1995 film Friday. Tucker was born in Atlanta, Georgia, the youngest son of Mary Louise and Norris Tucker. Tucker was raised in Decatur, Georgia. After graduating from Columbia High School, he moved to Los Angeles to pursue a career in comedy and movies. In 1992, Tucker was a frequent performer on Def Comedy Jam...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/xtAK4hFyDjSYhZ9oRhppuVcLi80.jpg', url: 'https://themoviedb.org/person/66' } }, movieTitle: 'Dead Presidents', role: 'Skip' }, { actor: { identity: { low: 15557, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Harlem, New York City, New York, USA', tmdbId: '65827', imdbId: '0202966', born: { year: { low: 1956, high: 0 }, month: { low: 6, high: 0 }, day: { low: 4, high: 0 } }, name: 'Keith David', bio: "An American film, television, and voice actor, and singer. He is perhaps most known for his live-action roles in such films as Crash, There's Something About Mary, Barbershop and Men at Work...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/jJLJuR7FNHYL1fB5igjj7IXzOel.jpg', url: 'https://themoviedb.org/person/65827' } }, movieTitle: 'Dead Presidents', role: 'Kirby' }, { actor: { identity: { low: 14305, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Omagh, County Tyrone, Northern Ireland, UK', tmdbId: '4783', imdbId: '0000554', born: { year: { low: 1947, high: 0 }, month: { low: 9, high: 0 }, day: { low: 14, high: 0 } }, name: 'Sam Neill', bio: 'Nigel John Dermot "Sam" Neill (born 14 September 1947) is a New Zealand actor. He is perhaps best known for his starring role as paleontologist Dr Alan Grant in Jurassic Park and Jurassic Park III...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/bNZ03phkLewj8eUR6mGbKZ7jtmv.jpg', url: 'https://themoviedb.org/person/4783' } }, movieTitle: 'Restoration', role: 'King Charles II' }, { actor: { identity: { low: 17595, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Blackpool, Lancashire, England, UK', tmdbId: '11207', imdbId: '0000667', born: { year: { low: 1963, high: 0 }, month: { low: 3, high: 0 }, day: { low: 20, high: 0 } }, name: 'David Thewlis', bio: "Thewlis had a minor role in an episode of the 1980s sitcom Up the Elephant and Round the Castle. He also appeared in an episode of popular sitcom Only Fools and Horses (1985) as a friend of Rodney. His first professional role was in the play Buddy Holly at the Regal in Greenwich. \n\nThewlis's breakout role was Naked (1993; dir...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/sNuYyT8ocLlQr3TdAW9CoKVbCU8.jpg', url: 'https://themoviedb.org/person/11207' } }, movieTitle: 'Restoration', role: 'John Pearce' }, { actor: { identity: { low: 15859, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Manhattan, New York City, New York, USA', tmdbId: '3223', imdbId: '0000375', born: { year: { low: 1965, high: 0 }, month: { low: 4, high: 0 }, day: { low: 4, high: 0 } }, name: 'Robert Downey Jr.', bio: "Robert John Downey Jr. (born April 4, 1965) is an American actor and producer. Downey made his screen debut in 1970, at the age of five, when he appeared in his father's film Pound, and has worked consistently in film and television ever since. He received two Academy Award nominations for his roles in films Chaplin (1992) and Tropic Thunder (2008). \n\nDowney Jr. is most known for his role in the Marvel Cinematic Universe as Tony Stark/Iron Man...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/5qHNjhtjMD4YWH3UP0rm4tKwxCL.jpg', url: 'https://themoviedb.org/person/3223' } }, movieTitle: 'Restoration', role: 'Robert Merivel' }, { actor: { identity: { low: 17679, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Warrington, Cheshire, England, UK', tmdbId: '6416', imdbId: '0908116', born: { year: { low: 1966, high: 0 }, month: { low: 5, high: 0 }, day: { low: 19, high: 0 } }, name: 'Polly Walker', bio: 'Polly Walker (born 19 May 1966) is an English actress. \n\nDescription above from the Wikipedia article Polly Walker, licensed under CC-BY-SA, full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/lfXAWi15IUiRna1kMWWfShC3N6Z.jpg', url: 'https://themoviedb.org/person/6416' } }, movieTitle: 'Restoration', role: 'Celia Clemence' }, { actor: { identity: { low: 14924, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Great Neck, Long Island, New York, USA', tmdbId: '38559', imdbId: '0000483', born: { year: { low: 1957, high: 0 }, month: { low: 3, high: 0 }, day: { low: 29, high: 0 } }, name: 'Christopher Lambert', bio: 'Christophe Guy Denis "Christopher" Lambert (born 29 March 1957) is an American-born French actor who has appeared in American, as well as French and other European productions. He is best known for his role as Connor MacLeod, or simply "The Highlander", from the movie and subsequent movie franchise series of the same name...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/eKx856pdLyrh9sKgC8HuvuYZxlf.jpg', url: 'https://themoviedb.org/person/38559' } }, movieTitle: 'Mortal Kombat', role: 'Lord Rayden' }, { actor: { identity: { low: 18557, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: ' Atlantic Beach, Florida, USA', tmdbId: '57251', imdbId: '0000798', born: { year: { low: 1960, high: 0 }, month: { low: 5, high: 0 }, day: { low: 23, high: 0 } }, name: 'Linden Ashby', bio: 'Clarence Linden Garnett Ashby III  (born May 23, 1960) is an American film/television actor and martial artist...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/nflhvj2uJAr2S9aWvnbQWCUXC9a.jpg', url: 'https://themoviedb.org/person/57251' } }, movieTitle: 'Mortal Kombat', role: 'Johnny Cage' }, { actor: { identity: { low: 18556, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Hong Kong, British Crown Colony [now China]', tmdbId: '57250', imdbId: '0795225', born: { year: { low: 1960, high: 0 }, month: { low: 7, high: 0 }, day: { low: 17, high: 0 } }, name: 'Robin Shou', bio: 'Shou Wan Por  (born July 17, 1960), known professionally as Robin Shou, is a Hong Kong martial artist and actor. Frequently appearing in numerous martial arts films, Shou was most successful for playing the role of Liu Kang in Mortal Kombat & Gobei with the late Chris Farley in Beverly Hills Ninja...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/cnL8HqBowYu9ssTkShDfEmxTgdZ.jpg', url: 'https://themoviedb.org/person/57250' } }, movieTitle: 'Mortal Kombat', role: 'Liu Kang' }, { actor: { identity: { low: 17638, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Tokyo, Japan', tmdbId: '11398', imdbId: '0846480', born: { year: { low: 1950, high: 0 }, month: { low: 9, high: 0 }, day: { low: 27, high: 0 } }, name: 'Cary-Hiroyuki Tagawa', bio: 'Cary-Hiroyuki Tagawa (born September 27, 1950) is a Japanese American actor. \n\nIn addition to his extensive film work, he has appeared on television in Star Trek: The Next Generation - "Encounter at Farpoint" (1987), Thunder in Paradise (1995), Nash Bridges (1996), Baywatch: Hawaiian Wedding (2003), and Heroes (2007). He also provided the voice of Sin Tzu for the video game Batman: Rise of Sin Tzu. He played the part of Earth Alliance security officer Morishi in Babylon 5 - "Convictions"...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/zxKQN4pDpqgVyhJ0td6WqY4mGsv.jpg', url: 'https://themoviedb.org/person/11398' } }, movieTitle: 'Mortal Kombat', role: 'Shang Tsung' }, { actor: { identity: { low: 18658, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'San Juan, Puerto Rico', tmdbId: '73421', imdbId: '0001618', born: { year: { low: 1974, high: 0 }, month: { low: 10, high: 0 }, day: { low: 28, high: 0 } }, name: 'Joaquin Phoenix', bio: 'Joaquin Rafael Phoenix (born October 28, 1974) is an American actor and producer. He has received numerous awards and nominations, including an Academy Award, a Grammy Award, and two Golden Globe Awards. \n\nAs a child, Phoenix started acting in television with his brother River and sister Summer. His first major film role was in SpaceCamp (1986). During this period, he was credited as Leaf Phoenix, a name he gave himself...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/zixTWuMZ1D8EopgOhLVZ6Js2ux3.jpg', url: 'https://themoviedb.org/person/73421' } }, movieTitle: 'To Die For', role: 'Jimmy Emmett' }, { actor: { identity: { low: 13945, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'New Rochelle, New York, USA', tmdbId: '2876', imdbId: '0000369', born: { year: { low: 1964, high: 0 }, month: { low: 2, high: 0 }, day: { low: 18, high: 0 } }, name: 'Matt Dillon', bio: 'Matthew Raymond "Matt" Dillon (born February 18, 1964) is an American actor and film director. He began acting in the late 1970s, gaining fame as a teenage idol during the 1980s. \n\nDescription above from the Wikipedia article Matt Dillon, licensed under CC-BY-SA, full list of contributors on Wikipedia...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/wVoSUexYH79igPgxIXKWRlV2uBk.jpg', url: 'https://themoviedb.org/person/2876' } }, movieTitle: 'To Die For', role: 'Larry Maretto' }, { actor: { identity: { low: 18659, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Falmouth, Massachusetts, USA', tmdbId: '1893', imdbId: '0000729', born: { year: { low: 1975, high: 0 }, month: { low: 8, high: 0 }, day: { low: 12, high: 0 } }, name: 'Casey Affleck', bio: "Caleb Casey McGuire Affleck-Boldt (born August 12, 1975), best known as Casey Affleck is an American actor and film director. Throughout the 1990s and early 2000s, he played supporting roles in mainstream hits like Good Will Hunting (1997) and Ocean's Eleven (2001) as well as in critically acclaimed independent films such as Chasing Amy (1997). During this time, he became known as the younger brother of actor and director Ben Affleck, with whom he has frequently collaborated professionally...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/hcggAadv5SwdhoAb4yYMoAFYdWK.jpg', url: 'https://themoviedb.org/person/1893' } }, movieTitle: 'To Die For', role: 'Russel Hines' }, { actor: { identity: { low: 16350, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Honolulu, Hawaii, USA', tmdbId: '2227', imdbId: '0000173', born: { year: { low: 1967, high: 0 }, month: { low: 6, high: 0 }, day: { low: 20, high: 0 } }, name: 'Nicole Kidman', bio: "An American-born Australian actress, fashion model, singer and humanitarian. After starring in a number of small Australian films and TV shows, Kidman's breakthrough was in the 1989 thriller Dead Calm. Her performances in films such as To Die For (1995) and Moulin Rouge! (2001) received critical acclaim, and her performance in The Hours (2002) brought her the Academy Award for Best Actress, a BAFTA Award and a Golden Globe Award...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/qaO2MTBhIKcAJg2rjMmoKCIBcXF.jpg', url: 'https://themoviedb.org/person/2227' } }, movieTitle: 'To Die For', role: 'Suzanne Stone' }, { actor: { identity: { low: 11440, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Bronx, New York, USA', tmdbId: '10774', imdbId: '0000843', born: { year: { low: 1931, high: 0 }, month: { low: 9, high: 0 }, day: { low: 17, high: 0 } }, name: 'Anne Bancroft', bio: 'Anne Bancroft (born Anna Maria Louisa Italiano; September 17, 1931 – June 6, 2005) was an American actress, director, screenwriter, and singer associated with the method acting school, having studied under Lee Strasberg. Respected for her acting prowess and versatility, Bancroft was acknowledged for her work in film, theatre, and television. She won one Academy Award, three BAFTA Awards, two Golden Globes, two Tony Awards, and two Emmy Awards, and several other awards and nominations...', died: { year: { low: 2005, high: 0 }, month: { low: 6, high: 0 }, day: { low: 6, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/ydabiabIsMBe2HsNmx43gBpqzxx.jpg', url: 'https://themoviedb.org/person/10774' } }, movieTitle: 'How to Make an American Quilt', role: 'Glady Joe Cleary' }, { actor: { identity: { low: 16403, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Winona, Minnesota, USA', tmdbId: '1920', imdbId: '0000213', born: { year: { low: 1971, high: 0 }, month: { low: 10, high: 0 }, day: { low: 29, high: 0 } }, name: 'Winona Ryder', bio: "Winona Laura Horowitz (born October 29, 1971) better known under her professional name Winona Ryder, is an American actress. She made her film debut in the 1986 film Lucas. Ryder's first significant role came in Tim Burton's Beetlejuice (1988) as a goth teenager, which won her critical and commercial recognition...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/5yteOSY2lgGOgSWmRTlxqfY59MS.jpg', url: 'https://themoviedb.org/person/1920' } }, movieTitle: 'How to Make an American Quilt', role: 'Finn Dodd' }, { actor: { identity: { low: 14150, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Chicago, Illinois, USA', tmdbId: '2059', imdbId: '0000284', born: { year: { low: 1962, high: 0 }, month: { low: 2, high: 0 }, day: { low: 27, high: 0 } }, name: 'Adam Baldwin', bio: 'Appearing in dozens of films since 1980, Baldwin rose to prominence as the troubled outcast Ricky Linderman in My Bodyguard (1980) and moved on to bigger roles in D. C. Cab (1983), Full Metal Jacket (1987), Independence Day (1996), The Patriot (2000) and Serenity (2005)—in which he reprises his role as the mercenary Jayne Cobb from the television series Firefly...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/yHLEi9iWA1pWF794f3lkw7zqOJ8.jpg', url: 'https://themoviedb.org/person/2059' } }, movieTitle: 'How to Make an American Quilt', role: "Finn's Father" }, { actor: { identity: { low: 14935, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Fort Worth, Texas, USA', tmdbId: '689', imdbId: '0001009', born: { year: { low: 1953, high: 0 }, month: { low: 11, high: 0 }, day: { low: 3, high: 0 } }, name: 'Kate Capshaw', bio: 'Kate Capshaw  (born November 3, 1953) is an American actress. She is known for her role as Willie Scott in Indiana Jones and the Temple of Doom...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/379hIr71jb3pk9Zd1hEeVaeNdlM.jpg', url: 'https://themoviedb.org/person/689' } }, movieTitle: 'How to Make an American Quilt', role: 'Sally' }, { actor: { identity: { low: 16063, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Memphis, Tennessee, USA', tmdbId: '192', imdbId: '0000151', born: { year: { low: 1937, high: 0 }, month: { low: 6, high: 0 }, day: { low: 1, high: 0 } }, name: 'Morgan Freeman', bio: 'Morgan Porterfield Freeman, Jr. is an American actor, film director, and narrator. He is noted for his reserved demeanor and authoritative speaking voice. Freeman has received Academy Award nominations for his performances in Street Smart, Driving Miss Daisy, The Shawshank Redemption and Invictus and won in 2005 for Million Dollar Baby. He has also won a Golden Globe Award and a Screen Actors Guild Award...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/oIciQWr8VwKoR8TmAw1owaiZFyb.jpg', url: 'https://themoviedb.org/person/192' } }, movieTitle: 'Seven (a.k.a. Se7en)', role: 'Detective Lt. William Somerset' }, { actor: { identity: { low: 17142, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Shawnee, Oklahoma, USA', tmdbId: '287', imdbId: '0000093', born: { year: { low: 1963, high: 0 }, month: { low: 12, high: 0 }, day: { low: 18, high: 0 } }, name: 'Brad Pitt', bio: 'William Bradley Pitt (born December 18, 1963) is an American actor and film producer. He has received multiple awards, including two Golden Globe Awards and an Academy Award for his acting, in addition to another Academy Award and a Primetime Emmy Award as producer under his production company, Plan B Entertainment. \n\nPitt first gained recognition as a cowboy hitchhiker in the road movie Thelma & Louise (1991)...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/cckcYc2v0yh1tc9QjRelptcOBko.jpg', url: 'https://themoviedb.org/person/287' } }, movieTitle: 'Seven (a.k.a. Se7en)', role: 'Detective David Mills' }, { actor: { identity: { low: 18622, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Altoona, Pennsylvania, USA', tmdbId: '12047', imdbId: '0001825', born: { year: { low: 1964, high: 0 }, month: { low: 8, high: 0 }, day: { low: 14, high: 0 } }, name: 'Andrew Kevin Walker', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/kgMKoXmY8AiyHWpQInKoRInU10V.jpg', url: 'https://themoviedb.org/person/12047' } }, movieTitle: 'Seven (a.k.a. Se7en)', role: 'Dead Man' }, { actor: { identity: { low: 18623, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Tegucigalpa, Honduras', tmdbId: '12054', imdbId: '0669254', born: { year: { low: 1951, high: 0 }, month: { low: 7, high: 0 }, day: { low: 19, high: 0 } }, name: 'Daniel Zacapa', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/oiqkan5Gflsf8wKd6Zn9YHk2I0Y.jpg', url: 'https://themoviedb.org/person/12054' } }, movieTitle: 'Seven (a.k.a. Se7en)', role: 'Detective Taylor' }, { actor: { identity: { low: 13919, high: 0 }, labels: [ 'Actor', 'Director', 'Person' ], properties: { bornIn: 'Peekskill, New York, USA', tmdbId: '2461', imdbId: '0000154', born: { year: { low: 1956, high: 0 }, month: { low: 1, high: 0 }, day: { low: 3, high: 0 } }, name: 'Mel Gibson', bio: 'An actor, film director, producer and screenwriter. Born in Peekskill, New York, Gibson moved with his parents to Sydney, Australia when he was 12 years old and later studied acting at the Australian National Institute of Dramatic Art. After appearing in the Mad Max and Lethal Weapon series, Gibson went on to direct and star in the Academy Award-winning Braveheart...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/6l9aF05kmPBcdcFpLzYbPlmPtJv.jpg', url: 'https://themoviedb.org/person/2461' } }, movieTitle: 'Pocahontas', role: 'John Smith (voice)' }, { actor: { identity: { low: 18132, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Anchorage, Alaska, USA', tmdbId: '65529', imdbId: '0065942', born: { year: { low: 1967, high: 0 }, month: { low: 7, high: 0 }, day: { low: 22, high: 0 } }, name: 'Irene Bedard', bio: 'Irene Bedard is a Native American film and television actress, director and producer, best known for voicing the title character in the _Pocahontas_ animation feature film franchise...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/nCm5940cLixwcSoB5kIqLAKNmGL.jpg', url: 'https://themoviedb.org/person/65529' } }, movieTitle: 'Pocahontas', role: 'Pocahontas (voice)' }, { actor: { identity: { low: 15088, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Peoria, Illinois, USA', tmdbId: '28010', imdbId: '0001773', born: { year: { low: 1942, high: 0 }, month: { low: 10, high: 0 }, day: { low: 31, high: 0 } }, name: 'David Ogden Stiers', bio: 'From Wikipedia, the free encyclopedia\n\nDavid Ogden Stiers (October 31, 1942 – March 3, 2018) is an American actor, director, vocal actor, and musician, noted for his role in the television series MAS*H as Major Charles Emerson Winchester III and the science fiction drama The Dead Zone as Reverend Gene Purdy. He was also known for his character Attorney Michael Reston in the Perry Mason TV Movies...', died: { year: { low: 2018, high: 0 }, month: { low: 3, high: 0 }, day: { low: 3, high: 0 } }, poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/4pxfrWgLvoX2M1foU5MAC4jTdvK.jpg', url: 'https://themoviedb.org/person/28010' } }, movieTitle: 'Pocahontas', role: 'Governor Ratcliffe (voice)' }, { actor: { identity: { low: 18602, high: 0 }, labels: ['Actor', 'Person'], properties: { tmdbId: '110316', imdbId: '0474122', born: { year: { low: 1958, high: 0 }, month: { low: 5, high: 0 }, day: { low: 20, high: 0 } }, name: 'Judy Kuhn', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/ulEgSz7BTsCAYERFDdmPgJ0clqf.jpg', url: 'https://themoviedb.org/person/110316' } }, movieTitle: 'Pocahontas', role: 'Pocahontas (singing voice)' }, { actor: { identity: { low: 17401, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Toronto, Ontario, Canada', tmdbId: '15319', imdbId: '0001089', born: { year: { low: 1959, high: 0 }, month: { low: 2, high: 0 }, day: { low: 8, high: 0 } }, name: 'Henry Czerny', bio: "Henry Czerny is a Canadian stage, film and television actor, best known for playing regular character Conrad Grayson in the television series \"Revenge\". He's a graduate of the National Theatre School in Montreal, Quebec, Canada...", poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/zOWZzRmliKf9032IOOq0a3jXhVv.jpg', url: 'https://themoviedb.org/person/15319' } }, movieTitle: 'When Night Is Falling', role: 'Martin' }, { actor: { identity: { low: 18704, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: '\tToronto, Ontario, Canada', tmdbId: '54819', imdbId: '0006692', born: { year: { low: 1969, high: 0 }, month: { low: 1, high: 0 }, day: { low: 1, high: 0 } }, name: 'Rachael Crawford', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/vtZg6kT3EhbNH30dMcfedGaCn3I.jpg', url: 'https://themoviedb.org/person/54819' } }, movieTitle: 'When Night Is Falling', role: 'Petra' }, { actor: { identity: { low: 18706, high: 0 }, labels: ['Actor', 'Person'], properties: { bornIn: 'Swastika, Ontario, Canada', tmdbId: '4569', imdbId: '0288944', born: { year: { low: 1941, high: 0 }, month: { low: 1, high: 0 }, day: { low: 1, high: 0 } }, name: 'David Fox', bio: 'David Fox (born 1941 in Swastika, Ontario) is a Canadian actor. He is best known for his role as schoolteacher Clive Pettibone in Road to Avonlea, and for a variety of roles on television. He also was the voice of Captain Haddock in The Adventures of Tintin. \n\nIn 1996 he was nominated for a Genie Award for the film When Night is Falling, and in 2008 he was nominated for a Gemini Award for the television miniseries Across the River to Motor City...', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/kgdBv3Pk68oolH0DA39rpmUai47.jpg', url: 'https://themoviedb.org/person/4569' } }, movieTitle: 'When Night Is Falling', role: null }, { actor: { identity: { low: 18703, high: 0 }, labels: ['Actor', 'Person'], properties: { tmdbId: '54818', imdbId: '0124481', born: { year: { low: 1968, high: 0 }, month: { low: 6, high: 0 }, day: { low: 27, high: 0 } }, name: 'Pascale Bussières', poster: 'https://image.tmdb.org/t/p/w440_and_h660_face/vbfCShcj8n0eUOoKRCAGNh1auFY.jpg', url: 'https://themoviedb.org/person/54818' } }, movieTitle: 'When Night Is Falling', role: 'Camille Baker' } ];
$("input[type='radio'][name^='option']").click(function() { /*** Get the id in order to obtain the number associated with the select ***/ var id = $( this ).attr("id"); /*** Split to obtain just an array of parts ***/ var select = id.split("option"); /*** Concat to get the Select id name ***/ var list = "selectanswer"+select[1]; if( $( this ).val() == 0 ){ /*** Set display block on the item ***/ $('#'+list).css("display","block"); $('#'+list).prop('required',true); }else{ /*** Set display none on the item ***/ $('#'+list).css("display","none"); $('#'+list).prop('required',false); } }); /**** Process the form with jQuery Form Malsup Plugin *****/ $( '#button-reset-form' ).click(function(){ $("input[type='radio'][name^='option']").prop('checked', false); $('[id^="answer"]').html(''); $('#test-response').html(''); }); $('#testForm').ajaxForm(function() { $('html,body').animate({ scrollTop: $("#test-response").offset().top + 50}, 'slow'); $('#test-response').html('<b>Wait an instant while we validate the information. <i class="fa fa-spinner fa-spin fa-2x"></i></b>') validation(); }); function validation(){ var contador = 10; var message = ""; /*** 0 False 1 True - 1 assimilation, 2 coalescence, 3 elission ***/ /*** Option 1 => false (coalescence) ***/ if( $('input[name=option1]:checked', '#testForm').val() == 1){ contador = contador-1; $('#answer1').html("<i class='fa fa-close' style='color:red;'></i>"); }else{ if( $('#selectanswer1').val() == 2 ){ $('#answer1').html("<i class='fa fa-check' style='color:green;'></i>"); }else{ $('#answer1').html("<i class='fa fa-close' style='color:red;'></i>"); } } /** Option 2 => false (assimilation) **/ if( $('input[name=option2]:checked', '#testForm').val() == 1){ contador = contador-1; $('#answer2').html("<i class='fa fa-close' style='color:red;'></i>"); }else{ if( $('#selectanswer2').val() == 1 ){ $('#answer2').html("<i class='fa fa-check' style='color:green;'></i>"); }else{ $('#answer2').html("<i class='fa fa-close' style='color:red;'></i>"); } } /** Option 3 => true **/ if( $('input[name=option3]:checked', '#testForm').val() == 0){ contador = contador-1; $('#answer3').html("<i class='fa fa-close' style='color:red;'></i>"); }else{ $('#answer3').html("<i class='fa fa-check' style='color:green;'></i>"); } /** Option 4 => false (elission) **/ if( $('input[name=option4]:checked', '#testForm').val() == 1){ contador = contador-1; $('#answer4').html("<i class='fa fa-close' style='color:red;'></i>"); }else{ if( $('#selectanswer4').val() == 3 ){ $('#answer4').html("<i class='fa fa-check' style='color:green;'></i>"); }else{ $('#answer4').html("<i class='fa fa-close' style='color:red;'></i>"); } } /** Option 5 => false (coalescence) **/ if( $('input[name=option5]:checked', '#testForm').val() == 1){ contador = contador-1; $('#answer5').html("<i class='fa fa-close' style='color:red;'></i>"); }else{ if( $('#selectanswer5').val() == 2 ){ $('#answer5').html("<i class='fa fa-check' style='color:green;'></i>"); }else{ $('#answer5').html("<i class='fa fa-close' style='color:red;'></i>"); } } /** Option 6 => true **/ if( $('input[name=option6]:checked', '#testForm').val() == 0){ contador = contador-1; $('#answer6').html("<i class='fa fa-close' style='color:red;'></i>"); }else{ $('#answer6').html("<i class='fa fa-check' style='color:green;'></i>"); } /** Option 7 => true **/ if( $('input[name=option7]:checked', '#testForm').val() == 0){ contador = contador-1; $('#answer7').html("<i class='fa fa-close' style='color:red;'></i>"); }else{ $('#answer7').html("<i class='fa fa-check' style='color:green;'></i>"); } /** Option 8 => false (elission) **/ if( $('input[name=option8]:checked', '#testForm').val() == 1){ contador = contador-1; $('#answer8').html("<i class='fa fa-close' style='color:red;'></i>"); }else{ if( $('#selectanswer8').val() == 3 ){ $('#answer8').html("<i class='fa fa-check' style='color:green;'></i>"); }else{ $('#answer8').html("<i class='fa fa-close' style='color:red;'></i>"); } } /** Option 9 => true **/ if( $('input[name=option9]:checked', '#testForm').val() == 0){ contador = contador-1; $('#answer9').html("<i class='fa fa-close' style='color:red;'></i>"); }else{ $('#answer9').html("<i class='fa fa-check' style='color:green;'></i>"); } /** Option 10 => true **/ if( $('input[name=option10]:checked', '#testForm').val() == 0){ contador = contador-1; $('#answer10').html("<i class='fa fa-close' style='color:red;'></i>"); }else{ $('#answer10').html("<i class='fa fa-check' style='color:green;'></i>"); } /*** Switch for responses ***/ if(contador == 10){ message = '<b>Congratulations! <i class="fa fa-smile-o fa-2x"></i></b>'; } else if (contador >= 5 && contador < 10){ message = '<b>Well done! <i class="fa fa-thumbs-o-up fa-2x"></i></b>'; }else if(contador >= 1 && contador < 5){ message = '<b>You need more practice <i class="fa fa-frown-o fa-2x"></i></b>'; }else{ message = '<b>Keep trying <i class="fa fa-thumbs-o-down fa-2x"></i></b>'; } /*** Print response on well ***/ setTimeout(function(){ $('#test-response').html('<div class="alert alert-success" role="alert"><p>You have answered correctly '+contador+' out of 10 questions<br>'+message+'</div>'); }, 4000); }
import React from "react"; import { BrowserRouter as Router, Route } from "react-router-dom"; import About from "./pages/about"; import FAQ from "./pages/faq"; import Login from "./pages/login"; import Manager from "./pages/manager"; import User from "./pages/user"; import DisplaySurvey from "./pages/survey"; //added import "./App.css"; const App = () => { return ( <Router> <div> <Route exact path="/" component={About} /> <Route exact path="/about" component={About} /> <Route exact path="/faq" component={FAQ} /> <Route exact path="/login" component={Login} /> <Route exact path="/user/:id" component={User} /> <Route exact path="/manager" component={Manager} /> {/** Added */} <Route exact path="/survey/:id" component={DisplaySurvey} /> </div> </Router> ); } export default App;
//JS Basics //Run npm test in the command line to test your solutions module.exports = { reverseIt: // uncomment and finish the reverseIt function. It will take in one parameter which is a String and // reverse it function reverseIt(string){ var str = string.split("").reverse().join(""); return str; } removeDups: function removeDups(array){ var newArr = array.filter(function(elem, idx) { return array.indexOf(elem) === idx; }) return newArr; } // uncomment and finish the removeDups function. It will take in one parameter which is an Array // remove all duplicates // titleIt: function titleIt(string){ return string.toLowerCase().split(' ').map(function(word) { return (word.charAt(0).toUpperCase() + word.slice(1)); }).join(' '); } // uncomment and finish the titleIt function. It will take in one parameter which is a String and // capitalize the first letter of each word vowelCounter: function vowelCounter(string){ var count = 0; var string = string.toLowerCase() for(var i = 0; i < string.length; i++){ if(string[i] == 'a' || string[i] == 'i' || string[i] == 'o' ||string[i] == 'e' ||string[i] == 'u'){ count+=1; } } return count; } // uncomment and finish the vowelCounter function. It will take in one parameter which is a String and // return the number of vowels in the string isPrime: function isPrime(num) { for (var i = 2; i < num; i++) { if(num % i === 0) { return false;} } return num > 1; } //uncomment and finish the isPrime function. It will take in one parameter which is a Number and //return true if it is prime and false if it is not //what is the value of foo? //var foo = 10 + '20'; //uncomment the foo property and give your answer as its value foo: undefined; // what is the outcome of the two console.logs below? // var foo = "Hello"; // (function() { // var bar = " World"; // console.log(foo + bar); // })(); // console.log(foo + bar); // uncomment the log1 and log2 properties and give your answers as their values log1: "Hello World"; log2: null; }
Ext.define('Assessmentapp.assessmentapp.web.com.controller.assessmentcontext.survey.AssessmentInferenceSheetLoaderUIController', { extend: 'Assessmentapp.view.fw.frameworkController.FrameworkViewController', alias: 'controller.AssessmentInferenceSheetLoaderUIController', onbuttonclick: function(me, e, eOpts) { var jsonData = {}; var scope = this.getView(); Ext.Ajax.request({ url: 'secure/AssessmentInferenceSheetLoaderWS/loadAssessmentInferenceFromSheet', method: 'POST', sender: scope, jsonData: jsonData, me: me, success: function(response, scope) { var responseText = Ext.JSON.decode(response.responseText); if (responseText.response.success) { Ext.Msg.alert('Server Response', responseText.response.message); } else { Ext.Msg.alert('Server Response', responseText.response.message); } }, failure: function(response, scope) { var responseText = Ext.JSON.decode(response.responseText); Ext.Msg.alert('Server Response', responseText.response.message); } }, scope); } });
'use strict'; const { Router } = require('express'); function unmatchedRouteHandler(request, response, next) { const err = new Error('Not Found'); err.status = 404; next(err); } module.exports = function unmatchedRouteHandlerFactory() { return Router() .use(unmatchedRouteHandler); };
import React from 'react'; import { Link } from "react-router-dom"; // Style import './css/redirect.css'; class Redirect extends React.Component { render() { return( <div className="redirect-box"> <Link to="/backbook"> <button>Open app</button> </Link> </div> ) } } export default Redirect;
/** * Created by Alvys on 2015-05-27. */ module.exports = { 'servers' : { /* Gateway server */ 'gatewayServers' : [{ 'port' : 2999, 'connectorPort' : 3000, 'databaseAddress' : 'mongodb://localhost/dagger' }], /* Game server */ 'gameServers' : [ { 'name' : 'Europe', 'port' : 3001, 'databaseAddress' : 'mongodb://localhost/dagger' } ], /* Connector servers */ 'connectors' : [ { 'name' : 'con1', 'port' : 3002, 'maxConnections' : 1000, 'publicAddress' : 'ws://127.0.0.1:3002', 'gatewayAddress' : 'http://127.0.0.1:3000', 'gameServerAddress' : 'http://127.0.0.1:3001' }, { 'name' : 'con2', 'port' : 3003, 'maxConnections' : 1000, 'publicAddress' : 'ws://127.0.0.1:3003', 'gatewayAddress' : 'http://127.0.0.1:3000', 'gameServerAddress' : 'http://127.0.0.1:3001' } ] } }
import Vue from 'vue' import App from './App.vue' import router from './router' import store from './store' // 引入图标库 import './assets/font/iconfont.css' // 引入cookie import vueCookie from 'vue-cookie' // 图片懒加载 import lazyLoad from 'vue-lazyload' // 引入axios发送ajax import axios from 'axios' // 配置axios Vue.prototype.axios = axios axios.defaults.baseURL = '/api' axios.defaults.timeout = 6000 // 发送axios后,响应拦截 axios.interceptors.response.use((response) => { const res = response.data if (res.status === 0) { return res.data } else if (res.status === 1) { alert('用户/密码错误') return Promise.reject(res) } else if (res.status === 10) { alert('登录信息过期,请重新登录') return Promise.reject(res) } else { console.log(res) alert('用户不存在') return Promise.reject(res) } }) // 图片懒加载配置 Vue.use(lazyLoad, { loading: './../loading-svg/loading-spinning-bubbles.svg' }) // 安装cookie插件 Vue.use(vueCookie) Vue.config.productionTip = false new Vue({ router, store, render: h => h(App), beforeCreate () { Vue.prototype.bus = this } }).$mount('#app')
const SlashCommands = require('../lib/slack/slashCommands'); const Conversation = require('../lib/slack/conversation'); module.exports = function (controller) { // handler for conversation controller.on('direct_message,direct_mention', function(bot, message) { // console.log("-------------------message command---------------"); console.log(message); return Conversation.converse(controller.storage, bot, message); }); // handler for slash command controller.on('slash_command', function(bot, message) { // console.log("-------------------slash command----------------"); console.log(message); // bot.replyPrivate(message, "You just typed '" + message.text + "'."); switch(message.command) { case '/lookup': // change this to your command if(message.text === '') return bot.replyPublic(message, 'Please enter a domain'); return SlashCommands.lookup(controller.storage, bot, message); case '/chat': // change this to your command if(message.text === '') return bot.replyPublic(message, 'Please enter a message'); return SlashCommands.chat(controller.storage, bot, message); default: bot.replyPublic(message, `You just typed "${message.text}" using command "${message.command}"`); } }); }
//৮. একটা array এর মধ্যে অনেকগুলা ইংরেজি জাভাস্ক্রিপ্ট রিলেটেড বইয়ের নাম (স্ট্রিং) আছে। জাভাস্ক্রিপ্ট রিলেটেড বইয়ের নাম না জানলে, গুগলে সার্চ দিয়ে বের করো। তারপর একটা লুপ চালিয়ে দেখো কোন কোন বইয়ের নামের মধ্যে "javascript" আছে। তাহলে সেই বইগুলার নাম আরেকটা array এর মধ্যে রাখবে। আর হ্যাঁ, যখন javascript আছে কিনা চেক করবে তখন খেয়াল করবে বড়হাতের নাকি ছোট হাতের অক্ষর সেটা বাদ দিয়ে চেক করতে। অর্থাৎ কেইস ইনসেন্সিটিভ হবে। const javascriptBooks = ["Eloquent JavaScript: A Modern Introduction to Programming", "JavaScript: The Good Parts", "Learn JavaScript VISUALLY", "High-Performance Browser Networking", "JavaScript: The Definitive Guide", "Composing Software"]; const booksWithJavascriptName = []; const search = "javascript"; for (const book of javascriptBooks) { if (book.toLowerCase().includes(search.toLowerCase())) { booksWithJavascriptName.push(book); } } console.log(booksWithJavascriptName);
import {LOAD_LOCATION, LOAD_LOCATIONS, SAVE_LOCATION, CREATE_LOCATION, ADD_LOCATION, CHANGE_LOCATION, FIND_LOCATIONS } from '../actions/location.action' import { handle } from 'redux-pack'; const initialState = { locations: [], location: null, tab: 'info', error: null, findLocations: [] } function locationReducer(state = initialState, action) { switch (action.type) { case LOAD_LOCATIONS: return handle(state, action, { failure: prevState => ({ ...prevState, error: action.payload }), success: prevState => ({ ...prevState, locations: action.payload }), }); case LOAD_LOCATION: if (action.payload && !action.payload.birthDate) action.payload.birthDate = "" return handle(state, action, { failure: prevState => ({ ...prevState, error: action.payload }), success: prevState => ({ ...prevState, location: action.payload }), }); case SAVE_LOCATION: return handle(state, action, { failure: prevState => ({ ...prevState, error: action.payload }), success: prevState => { return { ...prevState, location: null } }, }); case CREATE_LOCATION: return handle(state, action, { failure: prevState => ({ ...prevState, error: action.payload }), success: prevState => { return { ...prevState, location: null } }, }); case CHANGE_LOCATION: state.location[action.key] = action.value return {...state, location: {...state.location} }; case ADD_LOCATION: let newLocation={}; return {...state, location: newLocation }; case FIND_LOCATIONS: return handle(state, action, { failure: prevState => ({ ...prevState, error: action.payload }), success: prevState => ({ ...prevState, findContacts: action.payload }), }); default: break; } return state; } export default locationReducer;
/* * Copyright (C) 2021 Radix IoT LLC. All rights reserved. */ /** * Old temporary resource service, use maTemporaryRestResource instead. * This service is used for Haystack history import and SNMP walk. */ temporaryResourceFactory.$inject = ['$q', '$http', '$timeout']; function temporaryResourceFactory($q, $http, $timeout) { function TemporaryResource(response, readTimeout) { this.url = response.headers('Location'); this.data = response.data; this.defered = $q.defer(); this.errorCount = 0; this.readTimeout = readTimeout; } TemporaryResource.prototype.refresh = function() { return $http({ method: 'GET', url: this.url, timeout: this.readTimeout }).then(function(response) { this.data = response.data; if (this.data.finished) { this.defered.resolve(this.data); } else { this.defered.notify(this.data); } return this.data; }.bind(this), function(error) { //this.defered.reject(error); this.errorCount++; return $q.reject(error); }.bind(this)); }; TemporaryResource.prototype.cancel = function() { if (this.timeoutPromise) { $timeout.cancel(this.timeoutPromise); } return $http({ method: 'DELETE', url: this.url }).then(function(response) { this.data = response.data; this.defered.resolve(this.data); return this.data; }.bind(this), function(error) { this.defered.reject(error); return $q.reject(error); }.bind(this)); }; TemporaryResource.prototype.refreshUntilFinished = function(timeout) { if (!isFinite(timeout) || timeout < 0) timeout = 1000; if (this.data.finished) { this.defered.resolve(this.data); return this.defered.promise; } refreshTimeout.call(this, timeout); // schedule a notify of the initial data to happen after we return the promise // if we trigger a notify before the promise has a progressCallback attached // if will never be notified $timeout(function() { this.defered.notify(this.data); }.bind(this)); return this.defered.promise; }; function refreshTimeout(timeout) { // jshint validthis:true this.timeoutPromise = $timeout(function() { this.refresh().then(function(data) { if (!data.finished) { refreshTimeout.call(this, timeout); } }.bind(this), function(error) { if (this.errorCount >= 3) { console.log(error); this.defered.reject(error); } else { refreshTimeout.call(this, timeout); } }.bind(this)); }.bind(this), timeout); } return TemporaryResource; } export default temporaryResourceFactory;
var Optimist = require('optimist') , L = require('./logger') , C = require('./config') ; var commands ; commands = { 'help' : 'help' , 'setup' : 'setup' , 'upgrade' : 'upgrade' }; exports.run = function(){ var context , command , arguments , index ; context = commands; for (index = 0; index < Optimist.argv._.length; index++) { command = context[Optimist.argv._[index]]; if (typeof command == 'string') { arguments = Optimist.argv._.slice(index + 1); break; } else if (typeof command == 'object') { context = command; } else { L.error('Unknown command: ' + Optimist.argv._.slice(0, index + 1).join(' ')); Optimist.argv._ = ['help']; index = 0; context = commands; } } command = command || 'help'; require('./cli/'+command).run.apply(this, arguments); };
$(document).ready(function() { //animation stopping error //zaboronutu scroll when cinema mode //code on w3 var time_speed = 1; var time_interval = 60000; var animate_time_interval = 60; // '/ 1000' var time_now = 2018; var f_inc; var s_inc; var circle_close_active = false; var cinema_view_active = false; f_inc = setInterval(function() { time_now = time_now + 1; $('#year_nu').html(time_now); }, time_interval); function active_rows() { time_speed = $('#time_speed').val(); clearInterval(f_inc); time_interval = 60000 / time_speed; if($('#smooth_checkbox').is(':checked', true) && $('#time_speed').val() != 1) { animate_time_interval = time_interval / 10; } else { animate_time_interval = time_interval / 1000; } // +year f_inc = setInterval(function() { time_now = time_now + 1; $('#year_nu').html(time_now); }, time_interval); // planet laps $('#sun').css('animation-duration', animate_time_interval + 's'); $('#meteori').css('animation-duration', animate_time_interval + 's'); $('#merkuriy_path').css('animation-duration', animate_time_interval + 's'); $('#venera_path').css('animation-duration', animate_time_interval + 's'); $('#earth_path').css('animation-duration', animate_time_interval + 's'); $('#mars_path').css('animation-duration', animate_time_interval + 's'); $('#yupiter_path').css('animation-duration', animate_time_interval + 's'); $('#saturn_path').css('animation-duration', animate_time_interval + 's'); $('#uran_path').css('animation-duration', animate_time_interval + 's'); $('#neptun_path').css('animation-duration', animate_time_interval + 's'); // +if boom setInterval(function() { if(time_now >= 3000) { $('#merkuriy').css('opacity', '0.001'); } if(time_now >= 5500) { } if(time_now >= 11000) { $('#meteori').css({"display" : "none"}); $('#smooth_checkbox').prop('disabled', true); $('#time_speed').prop('disabled', true); $('#circle_close').prop('disabled', true); $('#close').prop('disabled', true); $('.obj').css({"transition" : "8s", "transform" : "scale(25)"}); $('.planet').css({'opacity' : '0.0', "transition" : ".00001s"}); setInterval(function() { $('#year_nu').html("WORLD DEAD").css({'font-size' : '15px', "color" : "red"}) },1); setTimeout(function() { $('#sun').css({"transition" : "5s", "background-color" : "#002F55"}) },7000); setTimeout(function() {$('#byoles').css({"z-index" : "999999999"});}, 7050); setTimeout(function() { $('#byoles').addClass("animated fadeInUp"); },7100); } },1); } $('#time_speed').on('input', function() { active_rows(); }); $('#smooth_checkbox').on('change', function() { active_rows(); }); $('#space_title').on('click', function() { alert("By Oles Odynets. @2018 :: ALL CODES CLOSED"); }); $('#close').on('click', function() { time_now = 11000; active_rows(); }); $('#circle_close').on('click', function() { if(circle_close_active == false) { $('.circle').css({'opacity' : '0.0', 'transition' : '2.5s'}); circle_close_active = true; } else if (circle_close_active == true) { $('.circle').css({'opacity' : '0.5', 'transition' : '1.5s'}); circle_close_active = false; } }); $('#cinema_view').on('click', function() { if(cinema_view_active == false) { cinema_view_active = true; $('body').css({'transition' : '4.2s', 'background' : '#05061A'}); // background $('#space_title').css({"transition" : "2s", "opacity" : "0.0"}); $('.inf_tx').css({"transition" : "4.5s", "color" : "#FFF8E7"}); $('.start_input_gogogo').removeClass("animated fadeInUp"); $('.control_fx').addClass("animated fadeOutDown"); $('#year_nu').css('color', '#05061A'); $('#cinema_view').html("⌫"); $('#space_background').css({'transition' : '5.1s', 'overflow' : 'visible'}); // kosmos //setTimeout(function() {$('#space_background').css({'transition' : '2s', 'overflow' : 'visible'});},3100); } else if(cinema_view_active == true) { cinema_view_active = false; $('body').css({'transition' : '4.2s', 'background' : 'white'}); // $('#space_title').css({"transition" : "2s", "opacity" : "1.0"}); // $('.inf_tx').css({"transition" : "4.5s", "color" : "black"}); // $('#year_nu').css('color', 'black'); $('.control_fx').removeClass("fadeOutDown"); // $('.control_fx').addClass("animated fadeInUp"); // $('#cinema_view').html("🎬"); // $('#space_background').css({'transition' : '5.1s', 'overflow' : 'hidden'}); // -_- //setTimeout(function() {$('#space_background').css({'transition' : '5s', 'overflow' : 'hidden'});},3100); // ? } }); });
/* Calculate the nth Fibonacci number, given: Fib(n) = Fib(n-1) + Fib(n-2) Fib(2) = 1 Fib(1) = 1 */ // using RECURSION // function fib(n) { // O(2^n) // // base case // if (n <= 2) return 1; // // recursion // return fib(n-1) + fib(n-2); // } // using DYNAMIC PROGRAMMING with memoization // MY APPROACH - slow for large n // function fib(n) { // O(n) // let memo = []; // function dp(n) { // if (n <= 2) return 1; // if (memo[n] !== undefined) return memo[n]; // const result = fib(n-1) + fib(n-2); // memo[n] = result; // return result; // } // return dp(n); // } // FROM INSTRUCTOR // /* function fibMemo(n, memo = []) { // O(n) if (memo[n] !== undefined) return memo[n]; if (n <= 2) return 1; const result = fib(n-1, memo) + fib(n-2, memo); memo[n] = result; return result; } // */ // using DYNAMIC PROGRAMMING with tabulation // bottom up approach function fibTab(n) { // O(n) and has better space complexity than fibMemo if (n <= 2) return 1; let fibNums = [0, 1, 1]; for (let i = 3; i <= n; i++) { fibNums[i] = fibNums[i-1] + fibNums[i-2]; } return fibNums[n]; } console.log(fibMemo(5)); //5 console.log(fibMemo(4)); //3 console.log(fibMemo(45));
const test = require('tape'); const bindAll = require('./bindAll.js'); test('Testing bindAll', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof bindAll === 'function', 'bindAll is a Function'); var view = { label: 'docs', 'click': function() { return 'clicked ' + this.label; } }; bindAll(view, 'click'); t.equal(view.click(), 'clicked docs', 'Binds to an object context'); //t.deepEqual(bindAll(args..), 'Expected'); //t.equal(bindAll(args..), 'Expected'); //t.false(bindAll(args..), 'Expected'); //t.throws(bindAll(args..), 'Expected'); t.end(); });
$(function(){ //查询事件 $("#select").linkbutton({ onClick: function(){ //获取所有被选中的标签/ var label = ''; $("[name='label']:checked").each(function(){ label = label + $(this).val() + ','; }); label = label.substring(0,label.length - 1); var group = ''; //获取所有被选中的分组 $("[name='group']:checked").each(function(){ group = $(this).val(); }); var tabId = "L" + label.replace(new RegExp(/(,)/g),'') + "G" + group; addTab('tabId_' + tabId,tabId,webRoot + 'common/index?url=common/queryPageByAll?label=' + label + '-group=' + group); } }); });
import treeListCore from './ui.tree_list.core'; import { columnChooserModule } from '../grid_core/ui.grid_core.column_chooser'; treeListCore.registerModule('columnChooser', columnChooserModule);
/** * Created by smile on 17/06/16. */ /** * RawData Formular - Application Field Initialization Function * Call Ajax to retrieve known applications list * Triggers Applications Setting Function "setApplicationsId" */ function initializeApplicationsId(){ callAJAX("getAppList.json", '', "json", setApplicationsId, null); } /** * Applications Setting Function * Initialize RawData Formular - Applications ComboBox (special select field) * @param jsonResponse */ function setApplicationsId(jsonResponse) { var appIdIndex = jsonResponse.content.indexOf("id"); var appNameIndex = jsonResponse.content.indexOf("n"); var data = jsonResponse.data.sort(function(a, b){ if(a[appNameIndex] < b[appNameIndex]) return -1; if(a[appNameIndex] > b[appNameIndex]) return 1; return 0; }); for (var i = 0; i < data.length; i++) { $("#appId").append('<option value="' + data[i][appIdIndex] + '">' + ( (data[i][appNameIndex].indexOf('z') == 0) ? data[i][appNameIndex].substr(1) : data[i][appNameIndex] ) + '</option>') } // Process JQuery-UI combobox drawing $( "#appId" ).combobox(); }
/** * Created by HX-MG01 on 2017/1/6. */ import Hello from './components/Hello' import Index from './components/Index' // 编写路由集合 const routes = [ { name: 'Hello', // 路由名,这个字段是可选的 path: '/', // 路由路径,这里是根路径所以是'/' component: Hello // 模板 }, // 这些是常用的 { name: 'Index', path: '/index', component: Index } ] // 导出路由集合 export default routes
import React, { useEffect, useState } from "react"; import UserMain from "./UserMain.js"; import { observer, inject } from "mobx-react"; import { makeStyles } from '@material-ui/core/styles'; import Snackbars from '../../components/Snackbars/Snackbars' import CreateReportDialog from '../Dialog/CreateReportDialog' import LogoutDialog from '../Dialog/LogoutDialog' import MyReportDialog from "../Dialog/MyReportDialog.js"; import DeleteReportDialog from "../Dialog/DeleteReportDialog"; import ReportDetailDialog from "../Dialog/ReportDetailDialog"; import { CircularProgress } from "@material-ui/core"; import {useHistory} from 'react-router-dom' const UserPage = inject("store")( observer((props) => { const classes = useStyles() const history = useHistory() useEffect(() => { document.body.classList.add("index-page"); document.body.classList.add("sidebar-collapse"); document.documentElement.classList.remove("nav-open"); return function cleanup() { document.body.classList.remove("index-page"); document.body.classList.remove("sidebar-collapse"); }; }); useEffect(() => { if (props.store.isAdmin){ history.push('/admin') return } else { props.store.getMyReports() } }, []) return ( <React.Fragment> <div className={classes.wrapper}> <UserMain /> {props.store.isReportDialogOpen && <CreateReportDialog />} {props.store.isCheckDialogOpen && <LogoutDialog />} {props.store.isMyReportOpen && (props.store.loadingMyReport ? <CircularProgress></CircularProgress> : <MyReportDialog reports={props.store.myReports} />) } {props.store.isDeleteReportOpen && <DeleteReportDialog />} {props.store.isReportDetailDialogOpen && <ReportDetailDialog />} </div> <Snackbars></Snackbars> </React.Fragment> ); })) export default UserPage; const useStyles = makeStyles(theme => ({ snackbarStyle: { position: "fixed", top: 12, zIndex: 2000, bottom: 'unset' }, pageHeader: { position: 'absolute', backgroundSize: 'cover', backgroundPosition: 'center center', width: '100%', height: '100%', zIndex: '-1' }, wrapper: { }, main: { position: 'relative', background: 'white' }, pagination: { paddingBottom: 0, padding: '70px 0', position: 'relative', background: 'white' }, container: { paddingBottom: '5%', maxWidth: '80%', width: '100%', paddingRight: 15, paddingLeft: 15, marginRight: 'auto', marginLeft: 'auto' } }));
class Generator{ constructor(){ this.coins = []; } generate(){ let value = Math.floor(Math.random() * 3 ) + 1; let coin = new Coin(value); this.coins.push(coin); let maxX = CANVAS_WIDTH - coin.size / 2; let min = coin.size / 2; let maxY = CANVAS_HEIGHT - coin.size / 2; coin.x = Math.floor( Math.random() * (1 + maxX - min) ) + min; coin.y = Math.floor( Math.random() * (1 + maxY - min) ) + min; const self = this; setTimeout(function () { self.expireCoin(coin); }, 2000); } drawCoins(context){ for(let i = 0; i < this.coins.length; i++){ this.coins[i].draw(context); } } expireCoin(coin){ const index = this.coins.indexOf(coin); if(index > -1){ this.coins.splice(index, 1); } } }
import React from "react"; import MenuList from "./menu"; import Logo from "./logo"; export default class Header extends React.Component { constructor(props) { super(props); this.state = { open: false }; this.OpenMenu = this.OpenMenu.bind(this); } OpenMenu(e) { this.setState(prevState => { return { open: !prevState.open }; }); } render() { let menuOpen = this.state.open ? " open" : ""; return ( <header className="nav"> <div className="nav__holder nav--sticky"> <nav className="navbar navbar-expand-lg" id="se-navbar"> <div className="container"> <Logo /> <button className="nav-icon-toggle navbar-toggler" data-toggle="collapse" data-target="#se-nav" aria-controls="se-nav" aria-expanded="true" aria-label="Toggle navigation" onClick={this.OpenMenu} > <span className="nav-icon-toggle__box"> <span className="nav-icon-toggle__inner"></span> </span> </button> <div className={`navbar-collapse collapse show ${menuOpen}`} id="se-nav" > <MenuList /> </div> </div> </nav> </div> </header> ); } }