text
stringlengths
7
3.69M
function initialize(){ ARSynth.init({ noteElm: $('#note')[0], frequencyElm: $('#frequency')[0] }); $('#color').bind('change', function(){ ARSynth.set('color', this.value); // hex color }); $('#color2').bind('change', function(){ ARSynth.set('color2', this.value); // hex color }); $('#color-offset').bind('change', function(){ ARSynth.set('cOffset', parseInt(this.value, 10)); }); $('#size-offset').bind('change', function(){ ARSynth.set('sizeOffset', parseInt(this.value, 10)); }); } // var synth = new Tone.Synth().toMaster(); /* Euer Code */ function checkIfColorVisible(){ // Hier wird der Text auf den Screen geschrieben, ob sichtbar oder nicht $("#debugger").text("farbe sichtbar: " + farbe1); $("#debugger2").text("farbe 2 sichtbar: " + farbe2); // Hier schauen wir if-else mäßig, ob Farbe1 sichtbar ist oder nicht if(farbe1 == true){ fadeInSound1(); // Ist sichtbar }else{ fadeOutSound1(); // Ist nicht sichtbar } // Hier schauen wir if-else mäßig, ob Farbe2 sichtbar ist oder nicht if(farbe1 == true){ fadeInSound2(); // Ist sichtbar }else{ fadeOutSound2(); // Ist nicht sichtbar } // Die Check Funktion ruft sich hier alle 100ms wieder selber auf setTimeout(function(){ checkIfColorVisible(); },1000) } checkIfColorVisible(); /* Hier passieren dann die Audio sachen */ function fadeInSound1(){ } function fadeOutSound1(){ } function fadeInSound2(){ } function fadeOutSound2(){ }
const express = require('express'); const mongoose = require('mongoose'); const bodyParser = require('body-parser'); const session = require('express-session'); const passport = require('passport'); LocalStrategy = require('passport-local').Strategy; const app = express(); app.use(bodyParser.json()); app.use(bodyParser.urlencoded({extended: true})); // CORS app.use((req, res, next) => { res.header('Access-Control-Allow-Origin', '*'); res.header( 'Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept' ); next(); app.options('*', (req, res) => { res.header( 'Access-Control-Allow-Methods', 'GET, PATCH, PUT, POST, DELETE, OPTIONS' ); res.send(); }); }); app.use(session({ secret: 'Secret_password', resave: false, saveUninitialized: false })); passport.use(new LocalStrategy( function(username, password, done) { User.findOne({ username: username }, function (err, user) { if (err) { return done(err); } if (!user) { return done(null, false, { message: 'Incorrect username.' }); } if (!user.validPassword(password)) { return done(null, false, { message: 'Incorrect password.' }); } return done(null, user); }); } )); // ROUTES app.use("/", require("./routes/index")); app.use("/users", require("./routes/users")); app.use("/toDo", require("./routes/toDo")); // CONNECTS const db = require("./config/keys"); mongoose.connect(db.MongoURI + db.DB,{ useUnifiedTopology: true, useNewUrlParser: true }) .then(() => console.log("MongoDB connected...")) .catch(err => console.log(err)); const PORT = process.env.PORT || 8080; app.listen(PORT, function () { console.log(`Сервер запущен на порту ${PORT}!`); });
import React from 'react'; import ReactTestUtils from 'react-dom/test-utils'; import { render } from '@testing-library/react'; import { getDOMNode, getInstance } from '@test/testUtils'; import { testStandardProps } from '@test/commonCases'; import Breadcrumb from '../Breadcrumb'; afterEach(() => { sinon.restore(); }); describe('Breadcrumb', () => { testStandardProps(<Breadcrumb />); it('Should apply id to the wrapper nav element', () => { const instance = getDOMNode(<Breadcrumb id="custom-id" />); assert.equal(instance.tagName, 'NAV'); assert.equal(instance.id, 'custom-id'); }); it('Should have breadcrumb class', () => { const instance = getInstance(<Breadcrumb />); assert.include(instance.className, 'breadcrumb'); }); it('Should automatically collapse if there are more than 5 items', () => { const instance = getDOMNode( <Breadcrumb> <Breadcrumb.Item>1</Breadcrumb.Item> <Breadcrumb.Item>2</Breadcrumb.Item> <Breadcrumb.Item>3</Breadcrumb.Item> <Breadcrumb.Item>4</Breadcrumb.Item> <Breadcrumb.Item>5</Breadcrumb.Item> <Breadcrumb.Item>6</Breadcrumb.Item> </Breadcrumb> ); assert.equal(instance.querySelectorAll('.rs-breadcrumb-item').length, 3); assert.equal(instance.querySelectorAll('.rs-breadcrumb-item')[1].textContent, '...'); }); it('Should call onExpand callback', done => { const instance = getDOMNode( <Breadcrumb onExpand={() => { done(); }} > <Breadcrumb.Item>1</Breadcrumb.Item> <Breadcrumb.Item>2</Breadcrumb.Item> <Breadcrumb.Item>3</Breadcrumb.Item> <Breadcrumb.Item>4</Breadcrumb.Item> <Breadcrumb.Item>5</Breadcrumb.Item> <Breadcrumb.Item>6</Breadcrumb.Item> </Breadcrumb> ); ReactTestUtils.Simulate.click(instance.querySelectorAll('.rs-breadcrumb-item')[1]); }); it('Should have a default separator', () => { const instance = getDOMNode( <Breadcrumb> <Breadcrumb.Item>1</Breadcrumb.Item> <Breadcrumb.Item>2</Breadcrumb.Item> </Breadcrumb> ); assert.equal(instance.childNodes[1].className, 'rs-breadcrumb-separator'); assert.equal(instance.childNodes[1].textContent, '/'); }); it('Should have a custom separator', () => { const instance = getDOMNode( <Breadcrumb separator={<span>-</span>}> <Breadcrumb.Item>1</Breadcrumb.Item> <Breadcrumb.Item>2</Breadcrumb.Item> </Breadcrumb> ); assert.equal(instance.childNodes[1].className, 'rs-breadcrumb-separator'); assert.equal(instance.childNodes[1].tagName, 'SPAN'); assert.equal(instance.childNodes[1].textContent, '-'); }); it('Should not get "children with the same key" warning when generating items with array.map', () => { sinon.spy(console, 'error'); const items = [{ text: 'Home', href: '/' }, { text: 'Current Page' }]; render( <Breadcrumb> {items.map((item, index) => ( <Breadcrumb.Item key={index} href={item.href} active={!item.href}> {item.text} </Breadcrumb.Item> ))} </Breadcrumb> ); expect(console.error).not.to.have.been.calledWith( sinon.match(/Warning: Encountered two children with the same key/) ); }); });
secretBox = document.getElementById("SecretBox"); maxLossStreak = document.getElementById("MaxLossStreak"); balanceForStop = document.getElementById("BalanceForStop"); betBox = document.getElementById("BetBox"); bankrollArea = document.getElementById("Bankroll"); earningsArea = document.getElementById("Earnings"); rollCountArea = document.getElementById("Rollcount"); maxLossStreakArea = document.getElementById("MaxLossStreakArea"); rollBelow = document.getElementById("RollBelow"); multiplier = document.getElementById("Multiplier"); probability = document.getElementById("Probability"); earningsArea.value = 0; rollCountArea.value = 0; maxLossStreakArea.value = 0; roundId = "empty"; roundHash = "empty"; lossStreak = 0; maxStreak = 0; userBalance = 1000000; forceStop = 0; rollCount = 0; totalWagered = 0; earnings = 0; function getBalance() { secretVal = secretBox.value; $.getJSON('https://session.satoshidice.com/userapi/userbalance/?secret='+secretVal+'&callback=?', function(data) { bankrollArea.value = data.balanceInSatoshis; }); //data is the JSON string } function placeBet() { roundId = "empty"; roundHash = "empty"; betAmount = Math.round(betBox.value); secretVal = secretBox.value; $.getJSON('https://session.satoshidice.com/userapi/startround.php?secret='+secretVal+'&callback=?', function(data) { roundId = data.id; roundHash = data.hash; $.getJSON('https://session.satoshidice.com/userapi/placebet.php?secret='+secretVal+'&betInSatoshis='+betAmount+'&id='+roundId+'&serverHash='+roundHash+'&clientRoll=3245&belowRollToWin='+rollBelow.value+'&callback=?', function(round) { if ( round.bet.result == "loss" ) { color = 'red'; } else { color = 'green'; } $("ul").prepend("<li id='" + roundId + "'> <font color="+ color +"> Single bet: " + round.bet.result + " , Payout: "+round.bet.payoutInSatoshis+" , Streak: "+round.bet.streak+" , Result: "+round.resultingRoll+"</li>"); bankrollArea.value = round.userBalanceInSatoshis; }); }); } function runBot() { betAmount = Math.round(betBox.value); secretVal = secretBox.value; roundId = "empty"; roundHash = "empty"; lossStreak = 0; userBalance = bankrollArea.value; forceStop = 0; rollCount = 0; $.getJSON('https://session.satoshidice.com/userapi/startround.php?secret='+secretVal+'&callback=?', function(data) { roundId = data.id; roundHash = data.hash; $.getJSON('https://session.satoshidice.com/userapi/placebet.php?secret='+secretVal+'&betInSatoshis='+betAmount+'&id='+roundId+'&serverHash='+roundHash+'&clientRoll=3245&belowRollToWin='+rollBelow.value+'&callback=?', function(round) { rollCount++; roundId = round.nextRound.id; roundHash = round.nextRound.hash; if ( round.bet.result == "loss" ) { lossStreak++; betAmount = Math.round(betAmount * multiplier.value); color = 'red'; } else { lossStreak = 0; betAmount = Math.round(betBox.value); color = 'green'; } $("ul").prepend("<li id='" + roundId + "'> <font color="+ color +">"+ rollCount + ":" + round.bet.result + " , Next bet: "+betAmount+" , Payout: "+round.bet.payoutInSatoshis+" , Streak: "+round.bet.streak+" , Result: "+round.resultingRoll+"</font></li>"); bankrollArea.value = round.userBalanceInSatoshis; userBalance = round.userBalanceInSatoshis; totalWagered = totalWagered + round.bet.betInSatoshis; earnings = earnings + round.bet.payoutInSatoshis; updateScore(); runBotInternal(); }); }); } function runBotInternal() { secretVal = secretBox.value; if ((forceStop != 1) && ( lossStreak < maxLossStreak.value ) && (userBalance < balanceForStop.value) && (userBalance > betAmount)) { $.getJSON('https://session.satoshidice.com/userapi/placebet.php?secret='+secretVal+'&betInSatoshis='+betAmount+'&id='+roundId+'&serverHash='+roundHash+'&clientRoll=3245&belowRollToWin='+rollBelow.value+'&callback=?', function(round) { rollCount++; roundId = round.nextRound.id; roundHash = round.nextRound.hash; if ( round.bet.result == "loss" ) { lossStreak++; if (lossStreak > maxStreak ) { maxStreak = lossStreak; } betAmount = Math.round(betAmount * multiplier.value); color = 'red'; } else { lossStreak = 0; betAmount = Math.round(betBox.value); color = 'green'; } $("ul").prepend("<li id='" + roundId + "'> <font color="+ color +">"+ rollCount + ":" + round.bet.result + " , Next bet: "+betAmount+" , Payout: "+round.bet.payoutInSatoshis+" , Streak: "+round.bet.streak+" , Result: "+round.resultingRoll+"</font></li>"); bankrollArea.value = round.userBalanceInSatoshis; userBalance = round.userBalanceInSatoshis; totalWagered = totalWagered + round.bet.betInSatoshis; earnings = earnings + round.bet.payoutInSatoshis; updateScore(); if ( lossStreak >= maxLossStreak.value ) { runBot(); } else { runBotInternal(); } }); } } function updateScore() { earningsArea.value = earnings - totalWagered; rollCountArea.value = rollCount; maxLossStreakArea.value = maxStreak; } function calculateMultiplier() { multiplier.value = 1/(1 - (rollBelow.value/64000)); probability.value = (rollBelow.value/65535)*100; } function calculateRollBelow() { rollBelow.value = (64000-64000*multiplier.value)/(-multiplier.value); probability.value = (rollBelow.value/65535)*100; } function calculateProbability() { probability.value = (rollBelow.value/65535)*100; } function stopBot() { forceStop = 1; } betAmount = betBox.value; secretVal = secretBox.value; getBalance();
/* * Alfred Lam * CMPS 161 * Prog 2 * map.js - reads in 5 csv files with data, merges them into 1 array, and displays the results in interactive * ways using D3 and SVG elements. */ //Width and height let w = 760; let h = 600; //Define map projection let projection = d3.geoMercator() .center([ -120, 37 ]) .translate([ w/2, h/2 ]) .scale([ w*3.3 ]); //Define path generator let path = d3.geoPath() .projection(projection); //Create SVG let svg = d3.select("#container") .append("svg") .attr("width", w * 2) .attr("height", h) let mainG = svg.append("g") let linkG = svg.append("g") .attr("transform", "translate(800 10)") .attr("class", "noPointerEvents") console.log(mainG) // Reference to our controls panel and legend svg in the HTML let controls = d3.select("#container").select("#controls") let legend = d3.select("#legend") // Create scales to be used to visualize data. We do not know the domain until we read in data. let gasConsumptionScale = d3.scaleSequential().interpolator(d3.interpolateOrRd) let populationScale = d3.scalePow().range([20, 300]); let partyScale = d3.scaleLinear().domain([50,100]).range([0.3,0.95]) // TODO // Abstract out functions: // ParseData() // SetControls() // Toggle Ballot Results - YES(green) or NO(red), size = population, transparency = percentage that voted and won // Set Political Affiliation - Red or blue, shade = percentage, based on governor elections // Set Gas Consumption - Yellow to red, shade = higher gas consumption, gray = no data // Set Public Transportation - // DrawMap() d3.csv("PopulationByCounty2017.csv").then(function(populationData) { d3.csv("GasByCounty2017Residential.csv").then(function(gasData) { d3.csv("BallotResults.csv").then(function(ballotData) { d3.csv("GovernorResults.csv").then(function(govData) { d3.json("cb_2017_us_county_5m.geojson").then(function(mapData) { //Merge the data and GeoJSON //Loop through once for each data value for (let i = 0; i < gasData.length; i++) { //Grab state name let dataState = gasData[i].County; //Grab data value, and convert from string to float let gasValue = Math.max(0, parseFloat(gasData[i]["Total Usage"])); for (let k = 0; k < populationData.length; k++) { if(populationData[k].COUNTY.toUpperCase() == dataState) { let popValue = parseInt(populationData[k].POP2018.replace(/\,/g,'')) for(let h = 0; h < ballotData.length; h++) { if(ballotData[h].COUNTY.toUpperCase() == dataState) { let yesValue = parseInt(ballotData[h].YES_COUNT.replace(/\,/g,'')) let noValue = parseInt(ballotData[h].NO_COUNT.replace(/\,/g,'')) for (let j = 0; j < mapData.features.length; j++) { let jsonState = mapData.features[j].properties.NAME; if (dataState == jsonState.toUpperCase()) { for(let g = 0; g < govData.length; g++) { if(govData[g].COUNTY_NAME.toUpperCase() == dataState) { let demValue, repValue; if(govData[g].PARTY_NAME == "Democratic") { demValue = parseFloat(govData[g].D_PERCENT.slice(0, -1)); repValue = 100-demValue; } else { repValue = parseFloat(govData[g].D_PERCENT.slice(0, -1)); demValue = 100-repValue; } mapData.features[j].properties.value = gasValue; // in millions of therms mapData.features[j].properties.population = popValue; // in people mapData.features[j].properties.gasPerPop = gasValue * 1000000/popValue; // in therms mapData.features[j].properties.yesCount = yesValue; // in votes mapData.features[j].properties.noCount = noValue; // in votes mapData.features[j].properties.dPercent = demValue; mapData.features[j].properties.rPercent = repValue; break; } } break; } } break; } } break; } } } // Shows us our merged data for debugging purposes. console.log(mapData); // Calculate the domains of our scales, now that we have the data. let gasMin = d3.min(mapData.features, function(d) { return d.properties.gasPerPop; }) let gasMax = d3.max(mapData.features, function(d) { return d.properties.gasPerPop; }) gasConsumptionScale.domain(d3.extent(mapData.features, function(d) { return d.properties.gasPerPop; })) populationScale.domain(d3.extent(mapData.features, function(d) { return d.properties.population })) // Calculate scales of the 2nd visualization (bar graph) let xScale = d3.scaleBand() .range([0, w-80]) .domain(mapData.features.map((s) => s.properties.NAME)) .padding(0.2) let yScale = d3.scaleLinear() .range([h-100, 10]) .domain(d3.extent(mapData.features, function(d) { return d.properties.gasPerPop; })); linkG.append('g') .attr('transform', `translate(0, ${h-100})`) .call(d3.axisBottom(xScale)) .selectAll("text") .attr("y", 0) .attr("x", 9) .attr("dy", ".35em") .attr("transform", "rotate(90)") .style("text-anchor", "start"); linkG.append('g') .call(d3.axisLeft(yScale)); linkG.append('g') .attr('class', 'grid') .call(d3.axisLeft() .scale(yScale) .tickSize(-w+80, 0, 0) .tickFormat('') ) linkG.append('text') .attr('class', 'label') .attr('x', -(h/ 2) + 20) .attr('y', -50) .attr('transform', 'rotate(-90)') .attr('text-anchor', 'middle') .text('Gas Consumption per Person (Therms)') let barGroups = linkG.selectAll() .data(mapData.features) .enter() .append('g') let clicked = [] barGroups .append('rect') .attr('class', 'bar') .attr('x', (g) => xScale(g.properties.NAME)) .attr('y', (g) => yScale(g.properties.gasPerPop)) .attr('height', (g) => h- yScale(g.properties.gasPerPop) - 100) .attr('width', xScale.bandwidth()) //.attr("fill", function(d) { return "rgba(0,100,255," + (d.properties.population/5000000 + 0.3) + ")" }) .attr("fill", function(d) { if(d.properties.yesCount > d.properties.noCount) { return ("rgba(0,100,0," + (1.0-d.properties.noCount/d.properties.yesCount + 0.4) + ")") } else { return ("rgba(238,238,0," + (1.0-d.properties.yesCount/d.properties.noCount + 0.4) + ")") } }) .on("click", function(d) { d3.select(this) .attr("stroke", "red") if(clicked.length == 0) { clicked.push(d.properties.NAME) } else if(clicked.includes(d.properties.NAME)) { clicked.splice(clicked.indexOf(d.properties.NAME), 1); d3.select(this).attr("stroke", "none"); } else { clicked.push(d.properties.NAME); } mainG.selectAll("path").transition().duration(500).style("fill", function(d2) { for(let i = 0; i < clicked.length; i++) { if(clicked[i] == d2.properties.NAME) { console.log(d2.properties.NAME) return gasConsumptionScale(d2.properties.gasPerPop); } } return '#ccc'; }) }) .on("mouseover", function() { d3.select(this) .attr("x", (g)=>xScale(g.properties.NAME)-1) .attr("width", xScale.bandwidth()+2) }) .on("mouseout", function() { d3.select(this).attr("width", xScale.bandwidth()) }) // Create the legend for the gas consumption scale. let gasLegendDomain = new Array() let increment = (gasMax - gasMin)/5; for(let i = 1; i <= 5; i++) { gasLegendDomain.push(i * increment); } legend = legend.selectAll("g") .data(gasLegendDomain) .enter() .append("g") .attr("transform", "translate(10 35)") legend.append("rect") .attr("x", 0) .attr("y", function(d, i) { return i * 22 }) .attr("width", 15) .attr("height", 15) .style("fill", function(d) { return gasConsumptionScale(d) }) legend.append("text") .attr("x", 25) .attr("y", function(d, i) { return i * 22 + 11}) .text(function(d, i) { return Math.round(gasLegendDomain[i]) }) .attr("font-size", 14) // Initialize the main map of California with tooltips giving detailed information per county. let mainMap = mainG.selectAll("path") .data(mapData.features) .enter() .append("path") .attr("d", path) .style("fill", "#CCC") .on("click", function(d) { if(clicked.length == 0) { clicked.push(d.properties.NAME) } else if(clicked.includes(d.properties.NAME)) { clicked.splice(clicked.indexOf(d.properties.NAME), 1); //d3.select(this).attr("stroke", "none"); } else { clicked.push(d.properties.NAME); } mainG.selectAll("path").transition().duration(500).style("fill", function(d2) { for(let i = 0; i < clicked.length; i++) { if(clicked[i] == d2.properties.NAME) { console.log(d2.properties.NAME) return gasConsumptionScale(d2.properties.gasPerPop); } } return '#ccc'; }) linkG.selectAll(".bar") .attr("stroke", function(d2) { for(let i = 0; i < clicked.length; i++) { if(clicked[i] == d2.properties.NAME) { return "red" } } return "none" }) }) .on("mouseover", function(d){ var xPosition = w/2 + 150; var yPosition = h/2; d3.select("#tooltip") .style("left", xPosition + "px") .style("top", yPosition + "px"); d3.select("#county") .text(d.properties.NAME) d3.select("#gasData") .text(Math.round(d.properties.value)) d3.select("#gasPerPop") .text(Math.round(d.properties.gasPerPop)) d3.select("#yesCount") .text(d.properties.yesCount) d3.select("#noCount") .text(d.properties.noCount) d3.select("#popData") .text(d.properties.population) d3.select("#political") .text(function() { if(d.properties.dPercent > d.properties.rPercent) { return "Democratic: " + d.properties.dPercent + "%" } else { return "Republican: " + d.properties.rPercent + "%" } }) d3.select("#tooltip") .classed("hidden", false) }) .on("mouseout", function(){ d3.select("#tooltip").classed("hidden", true); }) let circles = false; // Set controls to swap between different visualizations controls.select("#spawnCircles").on("click", function() { if(circles == true) { mainG.selectAll(".popCircles").transition().duration(1500).attr("r", 0) mainG.selectAll(".popCircles").transition().delay(1500).remove() circles = false; return; } circles = true mainG.selectAll("circle") .data(mapData.features) .enter() .append("circle") .attr("class", "popCircles noPointerEvents") .attr("cx", function(d) { return path.centroid(d)[0] }) .attr("cy", function(d) { return path.centroid(d)[1] }) .style("fill", "rgba(0,0,0,0)") .attr("r", 0) .transition() .duration(2000) .ease(d3.easeElasticOut) .style("fill", function(d) { if(d.properties.yesCount > d.properties.noCount) { return ("rgba(0,100,0," + (1.0-d.properties.noCount/d.properties.yesCount + 0.2) + ")") } else { return ("rgba(238,238,0," + (1.0-d.properties.yesCount/d.properties.noCount + 0.2) + ")") } }) .attr("r", function(d) { if(d.properties.population >= 0) return Math.sqrt(populationScale(d.properties.population)) }) .style("filter", "drop-shadow( 3px 3px 2px rgba(0, 0, 0, .7)") }) .on("mouseover", function() { d3.select(this).select("rect").style("fill", "#bcdae5") }) .on("mouseout", function() { d3.select(this).select("rect").style("fill", "#aec6cf") }) // Enables the Gas Consumption Visualization on map. controls.select("#setGasViz").on("click", function() { mainMap.transition().duration(1000) .style("fill", function(d) { //Get data value let value = d.properties.gasPerPop; if (value) { //If value exists… return gasConsumptionScale(value); } else { //If value is undefined… return "#CCC"; } }) clicked = []; linkG.selectAll("rect").attr("stroke", "none") }) .on("mouseover", function() { d3.select(this).select("rect").style("fill", "#bcdae5") }) .on("mouseout", function() { d3.select(this).select("rect").style("fill", "#aec6cf") }) // Fire the click event to initalize Gas Visualization eventFire(document.getElementById('setGasViz'), 'click'); // Enables the Political Party Visualization on map. controls.select("#setPartyViz").on("click", function() { mainMap.transition().duration(1000) .style("fill", function(d) { let demValue = d.properties.dPercent; let repValue = d.properties.rPercent; if(demValue && repValue) { if(demValue > repValue) { return "rgba(0,0,255," + partyScale(demValue) + ")"; } else { return "rgba(255,0,0," + partyScale(repValue) + ")"; } } else { return "#CCC" } }) clicked = []; linkG.selectAll("rect").attr("stroke", "none") }) .on("mouseover", function() { d3.select(this).select("rect").style("fill", "#bcdae5") }) .on("mouseout", function() { d3.select(this).select("rect").style("fill", "#aec6cf") }) // One pair of these for every data file we read. }) }) }) }) }) //---- End of data reading ----// // Fires a Javascript event, like click. // Code from: https://stackoverflow.com/questions/2705583/how-to-simulate-a-click-with-javascript function eventFire(el, etype){ if (el.fireEvent) { el.fireEvent('on' + etype); } else { var evObj = document.createEvent('Events'); evObj.initEvent(etype, true, false); el.dispatchEvent(evObj); } }
/* globals describe, it, expect */ import { Readable } from 'stream'; import { prepareParams } from '../../src/helpers/index.js'; import { body, cookies, headers, params, queries } from '../../src/request-proto/index.js'; describe('headers normalize', () => { it('header normalize non-empty', () => { const fakeReq = { forEach(fn) { for (let i = 1; i < 4; i += 1) { fn(`header_${i}`, `header_value${i}`); } } }; expect(headers(fakeReq)).toStrictEqual({ header_1: 'header_value1', header_2: 'header_value2', header_3: 'header_value3' }); }); it('header normalize empty', () => { const fakeReq = { forEach() {} }; expect(headers(fakeReq)).toStrictEqual(undefined); }); }); describe('params normalize', () => { it('params normalize non-empty', () => { const paramsValues = ['paramValue1', 'paramValue2']; const fakeReq = { rawPath: '/:p1/:p2', getParameter(index) { return paramsValues[index]; } }; const preparedParams = prepareParams(fakeReq.rawPath); expect(params(fakeReq, preparedParams)).toStrictEqual({ p1: 'paramValue1', p2: 'paramValue2' }); }); it('params normalize empty', () => { const fakeReq = { rawPath: '/', forEach() {}, getParameter() {} }; expect(params(fakeReq)).toBe(undefined); }); }); describe('queries normalize', () => { it('queries normalize non-empty', () => { const fakeReq = { getQuery() { return 'foo=bar&bar=baz'; } }; expect(queries(fakeReq)).toStrictEqual({ foo: 'bar', bar: 'baz' }); }); it('queries normalize empty', () => { const fakeReq = { getQuery() { return ''; } }; expect(queries(fakeReq)).toBe(undefined); }); }); describe('body normalize', () => { it('body normalize non-empty', async () => { const stream = new Readable({ read() {} }); const fakeReq = { stream }; const fakeRes = { onAborted() {} }; stream.push(Buffer.concat([Buffer.from('fake body')])); setTimeout(() => stream.push(null), 50); await body(fakeReq, fakeRes); expect(fakeReq.body).toStrictEqual('fake body'); }); it('body normalize empty', async () => { const fakeReq = {}; expect(await body(fakeReq)).toBe(undefined); }); }); describe('cookie normalize', () => { it('cookie normalize non-empty', async () => { const fakeReq = { headers: { cookie: 'foo=bar' } }; expect(cookies(fakeReq)).toStrictEqual({ foo: 'bar' }); }); it('cookie normalize empty', async () => { const fakeReq = {}; fakeReq.getHeader = () => ''; expect(cookies(fakeReq)).toBe(undefined); }); });
import React from 'react' import IssueList from './IssueList' import renderer from 'react-test-renderer' import { noErrorsAllowed } from '../common/test-utils' noErrorsAllowed() describe('IssueList component', () => { it('renders without crashing', () => { const issues = [] const rendered = renderer.create(<IssueList issues={issues} />).toJSON() expect(rendered).toBeTruthy() }) })
var React = require('react'); var TableInput = React.createClass({ render: function () { console.log('where is this?',this.props.state.string); //creating an array of where all the semicolons are var semicolons = []; for(var i = 0; i < this.props.state.string.length; i++){ if (this.props.state.string[i] === ';'){ semicolons.push(i+1) } } var requiringSequelize = this.props.state.string.substring(0,semicolons[0]) var newInstanceOfSequelize = this.props.state.string.substring(semicolons[0], semicolons[1]) var object = this.props.state.string.substring(semicolons[1], semicolons[2]) var objectHoldingFunc = this.props.state.string.substring(semicolons[2], semicolons[3]) var schema = this.props.state.string.substring(semicolons[3], semicolons[4]) console.log('the semicolons arr', semicolons) if(this.props.state.string!=='') return ( <div> {requiringSequelize} <br/> {newInstanceOfSequelize} <br/> {object} <br/> {objectHoldingFunc} <br/> {schema} </div> ) if(this.props.state.columns !== 0) { var newForm = []; for(var i = 0; i < this.props.state.columns; i++) { newForm.push( <div key={i} className='colnamesdiv'> <input id={'colnames'+i} placeholder='Column Name'></input> <select id={'coltype'+i}> <option>string</option> <option>number</option> </select> <br/> </div> ); } return ( <form id='createSchema' onSubmit={this.props.create}> {newForm} <button type='submit'>Create Table</button> </form> ) } else { return ( <form id='makeNewForm' onSubmit={this.props.makeForm}> <input id='TableInput' placeholder='Table Name'></input><br/> <input id='UsernameOfDatabase' placeholder='UsernameOfDatabase'></input><br/> <input id='PasswordOfDatabase' placeholder='PasswordOfDatabase'></input><br/> <select id='numberOfColumns'> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select><br/> <button type='submit'>Make columns</button> </form> ) } } }); module.exports = TableInput;
var Onlineuser = React.createClass({ render:function(){ return ( <div className="online-user-list"> <div className="online-users-number valign-wrapper"> <i className="material-icons">people</i><span className="valign">online </span> </div> <ul> <li> <user-avatar uuid=""></user-avatar> </li> </ul> </div> ); } });
var jsonpBtn=$('#jsonpBtn'); jsonpBtn.addEventListener('click',function(){ createScript(); }) var corsBtn=$('#corsBtn') function $(e){ return document.querySelector(e); } function jsonp(data){ var dailyWork=$('.dailyWork'); var html=''; for(var i=0;i<data.length;i++){ html+='<li>'+data[i]+'</li>'; } dailyWork.innerHTML=html; } function createScript(){ var script=document.createElement('script'); script.setAttribute('src','http://chen.com:8080/dailyWork?callback=jsonp'); script.setAttribute('type','text/javascript'); var body=$('body'); body.appendChild(script); body.removeChild(script); }
import React, {Component} from 'react'; import { View, Image, } from 'react-native'; import styles from './styles' import {compose} from "redux"; import {connect} from 'react-redux' import {Text, Button, Icon, Form, Item, Label, Input, Container,Content, Thumbnail} from "native-base"; import {SYSTEM_ROUTES} from "../../constants"; import { change, Field, reduxForm } from 'redux-form' import {TextField, PickerList} from '../../components' import {requiredValidation} from '../../helpers' class RegisterAccountScreen extends Component { _renderTextField(field) { const {meta: {touched, error}, input: {value, onChange}, ...custom} = field; const errorInput = touched && error ? error : null; return ( <TextField errorMessage={errorInput} value={value} onChangeText={onChange} {...custom} /> ) } _renderPickerList(field) { const {input: {value, onChange}} = field; const {meta: {touched, error}} = field; const errorInput = touched && error ? error : null; return ( <PickerList value={value} onChange={onChange} errorMessage={errorInput} {...field} /> ) } render() { const { navigation: {navigate}, pristine, submitting} = this.props; return ( <Container> <Content> <View style={styles.container}> <Form style={styles.form}> <View style={{marginTop: 20, display: 'flex', alignItems: 'center'}}> <Image resizeMode='contain' style={{width: 120, height: 120}} source={require('../../../public/images/profile.png')} /> </View> <Field label="Nome" name="name" textContentType="name" component={this._renderTextField} validate={requiredValidation} /> <Field label="E-mail" name="email" textContentType="name" component={this._renderTextField} validate={requiredValidation} /> <Field label="Senha" name="senha" secureTextEntry={true} component={this._renderTextField} validate={requiredValidation} /> <Field label="Confirmar senha" name="confirmSenha" secureTextEntry={true} component={this._renderTextField} validate={requiredValidation} /> <Field name="sexo" component={this._renderPickerList} label="Sexo" arrItens={[ {label: 'Selecione', value: null}, {label: 'Masculino', value: 1}, {label: 'Feminino', value: 2} ]} validate={requiredValidation} /> <Field name="pais" component={this._renderPickerList} label="País" arrItens={[ {label: 'Selecione', value: null}, {label: 'Brasil', value: 1}, {label: 'Argentina', value: 2}, ]} validate={requiredValidation} /> <Field name="estado" component={this._renderPickerList} label="Estado" arrItens={[ {label: 'Selecione', value: ''}, {label: 'São Paulo', value: 'M'}, {label: 'Rio de Janeiro', value: 'F'} ]} validate={requiredValidation} /> <Field name="cidade" component={this._renderPickerList} label="Cidade" arrItens={[ {label: 'Selecione', value: ''}, {label: 'Ribeirão Preto', value: 'M'}, {label: 'Cravinhos', value: 'F'} ]} validate={requiredValidation} /> <Button full style={styles.buttonSubmit} //disabled={pristine || submitting} onPress={() => navigate(SYSTEM_ROUTES.MORE_OPTIONS_SCREEN.ROUTE)} > <Text style={{color: '#ffffff'}}>Salvar</Text> </Button> </Form> </View> </Content> </Container> ); } } RegisterAccountScreen = compose( connect(null, {}), reduxForm({ form: 'LoginAuthScreen', enableReinitialize: true, }), )(RegisterAccountScreen); export {RegisterAccountScreen}
TOTAL = "共計"; NOW_DISPLAY_RECORD = "當前顯示記錄"; NOTHING_DISPLAY = "沒有記錄可以顯示"; //grid USERID = "會員編號"; USERNAME = "姓名"; USERGENDER = "性別"; MAN = "先生"; WOMAN = "小姐"; BIRTHDAY = "年齡"; REGDATE = "註冊時間"; CREATEDATE = "最近歸檔日"; SUMAMOUNT = "購買金額"; COU = "購買次數"; AVERAMOUNT = "客單價"; SUMBONUS = "購物金使用"; NORMALPROD = "常溫商品總額"; FREIGHTNORMAL = "常溫商品運費"; LOWPROD = "低溫商品總額"; FREIGTLOW = "低溫商品運費"; CT = "中信折抵金額"; HAPPYGO = "HG折抵"; HT = "台新折抵"; SELECTCONDI = "查詢條件";
// We import express, cors, and shortid at the top import express from "express" const app = express() import cors from "cors" app.use(cors()) app.use(express.json()) import shortid from 'shortid' // We manually input an array of preset notes in our database each with an id, title, color, and an array of issues app.locals.notes = [ { id: '1', title: "Trapper Keeper", color: 'purple', issues: [ { id: 21, body: "Finish project", completed: false }, { id: 22, body: "Start project", completed: false }, { id: 23, body: "Test project", completed: false }, { id: 24, body: "Deploy to Heroku", completed: false } ] }, { id: '2', title: "This is a great note", color: 'blue', issues: [{id: 25, body: "beep boop", completed: true}], } ] // For a GET request of all the notes, the endpoint is /api/v1/notes. // The response (res) status code will be 200 if everything is ok. // Finally, the server will convert the data to json for all of the notes. app.get('/api/v1/notes', (req, res) => { res.status(200).json(app.locals.notes) }) // For a POST request, the endpoint is /api/v1/notes. // A POST request must include the title, color, and issues a user wants to add in the body of the request. // If there is no title, color, or issues, then the server will return a status code of 422 and the message. // Next, on line 62, we make a newNote with a unique id and body info as input by the user. // We then push that newNote into the array of notes (app.locals.notes). // Finally, we return a status code of 201 that the note has been successfully created and json the newNote. app.post('/api/v1/notes', (req, res) => { const { title, color, issues } = req.body if (!title || !color || !issues) return res.status(422).json('Please provide a title and issues for your note') const newNote = { id: shortid.generate(), ...req.body } app.locals.notes.push(newNote) return res.status(201).json(newNote) }) // To make a GET request of a single note, we need the id of that note. // The endpoint will be /api/v1/notes/:id and :id will be the unique id of the note requested. // We look in our array of notes for the note that matches the id of the req.params.id. // If there's no note, we return a status code of 404 with the message. // If the note is found we return a status code of 200 and json the note. app.get('/api/v1/notes/:id', (req, res) => { const note = app.locals.notes.find(note => note.id == req.params.id) if (!note) return res.status(404).json('Note not found') return res.status(200).json(note) }) // To update a note with a PUT request, we need the id of that note. // The endpoint is /api/v1/notes/:id and :id is the unique id of that note. // We need title, color, and issues in the body of the request. // PUT will completely replace the note with the new data. // If there is no title, color, or issues, then we return a status code of 422 and the message. // Then we find the index of the note. // If there is no index, we return a status code of 404 and the message. // If there is a note, we replace the note with the new contents of the body as input by the user. // On line 102 we splice the notes to replace the new info with the old. // Finally, we return a status code of 204. app.put('/api/v1/notes/:id', (req, res) => { const { title, color, issues } = req.body const { notes } = app.locals if (!title || !color || !issues) return res.status(422).json('Please provide a title and issues for your note') const index = notes.findIndex(note => note.id == req.params.id) if (index === -1) return res.status(404).json('Note not found') const newNote = { id: notes[index].id, title, color, issues } notes.splice(index, 1, newNote) return res.sendStatus(204) }) // To delete a note with a DELETE request, we only need the id of that note. // The endpoint is /api/v1/notes/:id and :id is the unique id of that note. // First, we find the index of that note. // If there is no index found we return a 404 status code and the message. // If the note is found, we use splice to cut out that note from the array (app.locals.notes). // Finally, we return a response status code of 204 to indicate the note has been deleted successfully with the message. app.delete('/api/v1/notes/:id', (req, res) => { const { notes } = app.locals const index = notes.findIndex(note => note.id == req.params.id) if (index === -1) return res.status(404).json('Note not found') notes.splice(index, 1) return res.sendStatus(204) }) // We must export default app at the bottom export default app;
const parser = require('freestyle-parser'); const fileIO = require('bozoid-file-grabber'); exports.eventGroup = 'onMessage'; exports.command = 'stats'; exports.description = 'list database and usage stats'; exports.script = function(cmd, msg){ stat_blacklist = fileIO.read('blacklist.json').list.length stat_frickjar = fileIO.read('frickjar.json').list.length stat_fricks = fileIO.read('fricks.json').list.length stat_responder = fileIO.read('responder.json').list.length stat_voicemonitor = fileIO.read('voicemonitor.json').list.length stat_vocabulary = fileIO.read('vocabulary.json').list.length let numGuilds = 0 let numChannels = 0 let numUsers = 0 msg.client.guilds.cache.each(g => { numGuilds++ numChannels += g.channels.cache.size numUsers += g.memberCount }).tap(() => { bozAge = (new Date().getTime()) - (new Date('2018-01-25')).getTime() oStr = '' oStr += 'Age: ' + '`' + Math.floor(bozAge / (1000*60*60*24)) + '` days\n' oStr += 'Guilds: `' + numGuilds + '`\n' oStr += 'Channels: `' + numChannels + '`\n' oStr += 'Users: `' + numUsers + '`\n' oStr += 'Users blacklisted: `' + stat_blacklist + '`\n' oStr += 'Users who swore: `' + stat_frickjar + '`\n' oStr += 'Known swears: `' + stat_fricks + '`\n' oStr += 'Known vocabulary: `' + stat_vocabulary + '`\n' oStr += 'Snappy responses: `' + stat_responder + '`\n' oStr += 'Voice channel DM Subscribers: `' + stat_voicemonitor + '`\n' msg.channel.send(oStr) }) }
(function($) { Drupal.behaviors.ArchiveDigest = { attach:function (context, settings) { var timeStart = ''; var timeFinish = ''; var dates = []; $('.views-widget-filter-created').hide(); var DateStrReturn = function(dt) { d = (dt.getDate() < 10) ?'0'+dt.getDate() : dt.getDate(); m = dt.getMonth() + 1; m = (m < 10) ?'0'+ m : m; return dt.getFullYear() +'-'+ m +'-'+ d; } var news_time_full = $('.news_time_full').val().split(','); news_time_full.forEach(function(item) { timeStart = parseInt(item); if (timeStart > timeFinish) { timeFinish = timeStart + (10*60*60*24); var dF = new Date(timeStart*1000); var strOne = DateStrReturn(dF); var dS = new Date(timeFinish*1000); var strSec = DateStrReturn(dS); dates.unshift(strOne+'='+strSec); } }) var selectDate = '<div class="views-exposed-widget">' + '<label for="edit-created">Дата</label>' + '<select class="date_archive">'; var selectedOption =''; selectDate += '<option value="">Выберите</option>'; for(var i=0; i<dates.length; i++ ) { selectedOption =''; var dtValue = dates[i].replace(/(.*)-(.*)-(.*)=(.*)-(.*)-(.*)/,"$3.$2.$1-$6.$5.$4"); if (dates[i].indexOf($('#edit-created-min').val()) != -1 && $('#edit-created-min').val() != '') { selectedOption = 'selected="selected"'; } selectDate += '<option '+selectedOption+' value="'+dates[i]+'">' +dtValue+ '</option>'; } selectDate += '</select></div>'; $('.views-submit-button').before(selectDate); $('.date_archive').on('change', function() { if ($(this).find('option:selected').val() != '') { var dateFull = $(this).find('option:selected').val(); var dt = dateFull.match(/(.*)=(.*)/); $('#edit-created-min').val(dt[1]); $('#edit-created-max').val(dt[2]); } else { $('#edit-created-min').val(''); $('#edit-created-max').val(''); } }) } } })(jQuery);
const mongoose = require('mongoose'); const moment = require('moment'); const Task = require('../../models/Task'); var tasksController = {}; tasksController.index = function(req, res) { const { title, date, status } = req.query; let query = {}; if (date) { query.createdAt = { $gte: moment(date, "YYYY-MM-DD").toDate(), $lt: moment(date, "YYYY-MM-DD").endOf('day').toDate() } } if (title) { query.title = new RegExp(title, 'i'); } if (status) { query.status = status; } Task.find(query) .sort({'createdAt': 'descending'}) .then(tasks => { res.status(200).json({ tasks }); }) .catch(e => res.status(500).json({'error': e.message})); }; tasksController.create = function(req, res) { const userTask = req.body; new Task(userTask).save((err, task) => { if (err) { return res.status(400).json({ error: err.message }); } res.status(201).json({ success: true, task }); }); }; tasksController.show = function(req, res) { const _id = req.params.id; Task.findById(_id) .then(task => { if (task) { res.status(200).json({ task }); } else { res.status(404).json({ message: 'Task not found'}) } }) .catch(e => res.status(500).json({'error': e.message})); }; tasksController.update = function(req, res) { const _id = req.params.id; const updateObj = req.body; Task.findByIdAndUpdate(_id, updateObj, {new: true}) .then(task => { if (task) { res.status(200).json({ task }); } else { res.status(404).json({ message: 'Task not found'}) } }) .catch(e => res.status(500).json({'error': e.message})); }; tasksController.delete = function(req, res) { const _id = req.params.id; Task.findByIdAndRemove(_id) .then(task => { if (task) { res.status(202).json({ task }); } else { res.status(404).json({ message: 'Task not found'}) } }) .catch(e => res.status(500).json({'error': e.message})); }; module.exports = tasksController;
function alguma(id) { var apagar = confirm('Você deseja excluir este usuário'); if (apagar){ location.href = 'excluir/'+ id; }else{ alert('ufaaa, quase deletou o usuario errado.'); } }
'use strict'; class Node { constructor(value){ this.value = value; this.prev = null; this.next = null; } } class StackClass{ constructor (){ this.prevPush = null; this.nextInLine = null; this.length =0; } push(value){ //if top is null current node is top let node = new Node(value) if(!this.prevPush){ this.prevPush = node; this.length ++; return; } let current = node; //sets previous item pushed to current item current.prev = this.prevPush; this.prevPush = current; this.length ++; } pop(){ let off = this.prevPush; this.prevPush = this.prevPush.prev; this.length --; return off; } peek(){ this.prevPush; } } class QueueClass{ constructor(){ this.front = null; this.end = null; this.length = 0; } queue(value){ let node = new Node(value); //makes a new node and points next at front so that when I pop front I can reset it to next if(!this.front){ this.front = node; this.nextInLine = this.front; this.length ++; return; } //make a new node let current = node; this.nextInLine.prev = current; this.nextInLine = current; this.length ++; } dequeue(){ let off = this.front; this.front = this.front.prev; this.length ++; return off; } } module.exports ={StackClass,QueueClass}
/* * Route: /apps/:appId/sources/:appSourceId/webhooks */ const webhookAuthorize = rootRequire('/middlewares/webhooks/authorize'); const sources = rootRequire('/libs/app/sources'); const router = express.Router({ mergeParams: true, }); /* * GET */ router.get('/',webhookAuthorize); router.get('/', (request, response) => { const { type } = request.query; const mode = request.query['hub.mode']; const challenge = request.query['hub.challenge']; const verifyToken = request.query['hub.verify_token']; if (!type) { throw new Error('type must be provided.'); } if (!mode || !challenge || !verifyToken) { throw new Error('Missing verification arguments.'); } return response.respondRaw(200, challenge); }); /* * POST */ router.post('/', webhookAuthorize); router.post('/', (request, response) => { const { type } = request.query; const Source = sources.getSourceClass(type); if (!Source) { throw new Error('type is invalid.'); } Source.handleWebhookRequest(request); response.success(); }); /* * Export */ module.exports = router;
export const SET_USER_ID = 'SET_USER_ID'; export const ADD_USER_SUCCESS = 'ADD_USER_SUCCESS'; export const SET_TOKEN = 'SET_TOKEN'; export const SET_USER = 'SET_USER'; export const EDIT_USER = 'EDIT_USER'; export const SIGN_OUT = 'SIGN_OUT'; export const SET_REGION = 'SET_REGION'; export const SET_STAGE = 'SET_STAGE'; export const SET_DIR = 'SET_DIR'; export const SET_S_DATE = 'SET_S_DATE'; export const SET_E_DATE = 'SET_E_DATE'; export const SET_TRIP_DESC = 'SET_TRIP_DESC'; export const SET_TRIP_NAME = 'SET_TRIP_NAME';
const Discord = require("discord.js"); module.exports.run = async (bot, message, args) => { message.delete().catch(O_o=>{}); let bicon = bot.user.avatarURL; const embed = new Discord.RichEmbed() .setTitle("ИНФОРМАЦИЯ О БОТЕ") .setColor("#4C8BF5") .setThumbnail(bicon) .addField("Ник бота:", bot.user.username, true) .addField("Версия бота:", "1.0.5", true) .addField("Бот создан:", bot.user.createdAt, true) .addField("Bot developers:", "@Rick Sanchez#6666 и @Dalas#8328", true) message.channel.send({embed}); } module.exports.help = { name: "botinfo" }
import { useCallback, useEffect, useState } from 'react'; export const useTagHolder = (defaultTags) => { const [tags, setTags] = useState([]); const [unTags, setUnTags] = useState(defaultTags || []); const tagChange = useCallback( (tag) => { if (~tags.indexOf(tag)) { setTags((prev) => { return prev.filter((value) => { return value !== tag; }); }); } else { setTags((prev) => { return [...prev, tag]; }); } }, [unTags, defaultTags] ); useEffect(() => { setUnTags((prev) => { return defaultTags.filter((value) => { return !~tags.indexOf(value); }); }); }, [tags, defaultTags]); return { tags, unTags, tagChange, }; };
/* eslint-disable */ module.exports = [ { "id":0, "category":"phone", "name":"productnamMoto X (4th Generation) - with hands-free Amazon Alexa – 32 GB - Unlocked – Super Black - Prime Exclusive", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71qpbk55hmL._SX522_.jpg", "http://imgur.com/sesTnZr.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "descriptions":[ "Natural Fiber Blend Helps Control Hairballs", "Long 3.6-ft cord threads comfortably through clothing and bags", "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share" ], "price":5998.65, "shipping":48.81, "prime":true, "in_stock":19, "rating":4.5, "review":7566, "brand":"Patagonia" }, { "id":1, "category":"phone", "name":"Nokia 6 - 32 GB - Unlocked (AT&T/T-Mobile) - Black", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/51vc-PvR-xL._SX522_.jpg", "http://imgur.com/zPS7iWZ.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies" ], "descriptions":[ "256GB PCI-E based flash memory storage, 8GB of 1600MHz LPDDR3 onboard memory", "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "Connectivity technology is wired. Maximum input 200 milli watt", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"" ], "price":4152.66, "shipping":49.67, "prime":false, "in_stock":13, "rating":2, "review":5054, "brand":"Hisense" }, { "id":2, "category":"phone", "name":"LG Q6 - 32 GB - Unlocked (AT&T/T-Mobile) - Platinum - Prime Exclusive", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61tdL--e76L._SY679_.jpg", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "descriptions":[ "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next." ], "price":5967.12, "shipping":0, "prime":true, "in_stock":14, "rating":1, "review":7337, "brand":"Sony" }, { "id":3, "category":"phone", "name":"Nokia 2 - 8GB - Unlocked Phone (AT&T/T-Mobile) - 5\" Screen - Black (U.S. Warranty)", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/518zmuwdHzL._SX522_.jpg", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/9iJfCs2.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies" ], "descriptions":[ "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)", "Wider frequency response for fuller listening enjoyment", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more." ], "price":5987.61, "shipping":79.04, "prime":false, "in_stock":4, "rating":1, "review":2171, "brand":"Hisense" }, { "id":4, "category":"phone", "name":"Nokia 6 TA-1000 64GB Black, Dual Sim, 5.5\", GSM Unlocked International Model, No Warranty", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/512zZS7f4SL._SX522_.jpg", "http://imgur.com/9iJfCs2.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "descriptions":[ "Built-in stereo speakers along with omnidirectional microphone, headphone port", "256GB PCI-E based flash memory storage, 8GB of 1600MHz LPDDR3 onboard memory", "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV" ], "price":3773.84, "shipping":34.66, "prime":true, "in_stock":20, "rating":1.5, "review":3693, "brand":"Patagonia" }, { "id":5, "category":"phone", "name":"LG X charge - 16 GB – Unlocked (AT&T/Sprint/T-Mobile) - Titanium - Prime Exclusive", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61KvOuzd4gL._SX522_.jpg", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "descriptions":[ "Connectivity technology is wired. Maximum input 200 milli watt", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones." ], "price":1835.87, "shipping":83.78, "prime":false, "in_stock":5, "rating":2.5, "review":4394, "brand":"Samsung" }, { "id":6, "category":"phone", "name":"Moto G PLUS (5th Generation) - 32 GB - Unlocked - Lunar Gray - Prime Exclusive", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/715gpXz0dYL._SY679_.jpg", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/1eo74Yu.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies" ], "descriptions":[ "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones.", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur" ], "price":5400.24, "shipping":65.02, "prime":true, "in_stock":11, "rating":1.5, "review":3107, "brand":"Webpack" }, { "id":7, "category":"phone", "name":"Nokia 6 TA-1000 64GB Silver, Dual Sim, 5.5\", GSM Unlocked International Model, No Warranty ", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61XQc%2BFYeBL._SL1000_.jpg", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies" ], "descriptions":[ "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "256GB PCI-E based flash memory storage, 8GB of 1600MHz LPDDR3 onboard memory", "Connectivity technology is wired. Maximum input 200 milli watt" ], "price":5013.19, "shipping":67.87, "prime":false, "in_stock":10, "rating":1.5, "review":559, "brand":"Logitech" }, { "id":8, "category":"phone", "name":"Moto G PLUS (5th Generation) - 64 GB - Unlocked - Lunar Gray - Prime Exclusive", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/715gpXz0dYL._SY679_.jpg", "http://imgur.com/1eo74Yu.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/9iJfCs2.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies" ], "descriptions":[ "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV" ], "price":563.64, "shipping":0, "prime":false, "in_stock":18, "rating":2, "review":7708, "brand":"SuperDry" }, { "id":9, "category":"phone", "name":"LG G6 - 32 GB - Unlocked (AT&T/T-Mobile/Verizon) - Platinum - Prime Exclusive", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71eqmzFN7CL._SY679_.jpg", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/1eo74Yu.jpg#puppies", "http://imgur.com/9iJfCs2.jpg#puppies" ], "descriptions":[ "Direct-lit LED produces great picture quality", "Direct-lit LED produces great picture quality", "ONE KEY START/ LANDING: Allows players of any level (Beginners Intermediates Experts) to fly the drone easily with perfect control and wonderful performance. Offering Release Date: 2017/8/12", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"" ], "price":5043.53, "shipping":0, "prime":false, "in_stock":17, "rating":3, "review":6988, "brand":"Apache" }, { "id":10, "category":"phone", "name":"Nokia 8 TA-1052 64GB Polished Copper, Dual Sim, 5.4\", 4GB RAM, GSM Unlocked International Model, No Warranty", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/41xTHkyKgnL.jpg", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "descriptions":[ "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears", "Natural Fiber Blend Helps Control Hairballs" ], "price":3757.82, "shipping":78.2, "prime":true, "in_stock":8, "rating":1, "review":824, "brand":"Patagonia" }, { "id":11, "category":"phone", "name":"Moto E (4th Generation) - 16 GB - Unlocked (AT&T/Sprint/T-Mobile/Verizon) - Black - Prime Exclusive", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/616l8dGb3lL._SX522_.jpg", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies" ], "descriptions":[ "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "Long 3.6-ft cord threads comfortably through clothing and bags", "Made with Real Chicken and Turkey", "Wider frequency response for fuller listening enjoyment", "256GB PCI-E based flash memory storage, 8GB of 1600MHz LPDDR3 onboard memory" ], "price":5728.38, "shipping":11.95, "prime":true, "in_stock":5, "rating":1.5, "review":7566, "brand":"Supreme" }, { "id":12, "category":"phone", "name":"LG Electronics LGUS601.AUSASV X Charge Unlocked Phone - 16GB - 5.5\" - Silver (U.S. Warranty)", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/81KoFhuT%2BzL._SY679_.jpg", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/zPS7iWZ.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies" ], "descriptions":[ "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears", "Full-size keyboard with 78 (U.S.) individual LED backlit keys, including 12 function keys and 4 arrow keys with ambient light sensor, Force Touch trackpad for precise cursor control and pressure-sensing capabilities; enables Force clicks, accelerators, pressure-sensitive drawing, and Multi-Touch gestures", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "256GB PCI-E based flash memory storage, 8GB of 1600MHz LPDDR3 onboard memory" ], "price":1218.7, "shipping":0, "prime":true, "in_stock":6, "rating":2, "review":1247, "brand":"Webpack" }, { "id":13, "category":"phone", "name":"Nokia 6 Case, Yiakeng Nature TPU Soft Cover Crystal Case Clear Skin Soft Case Slim Case for Nokia6 5.5\" (Clear)", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61x54F0s4bL._SX522_.jpg", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies" ], "descriptions":[ "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)", "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "100% Complete & Balanced Formula for Adult Cats", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones." ], "price":533.42, "shipping":37.95, "prime":true, "in_stock":15, "rating":2, "review":8169, "brand":"Webpack" }, { "id":14, "category":"phone", "name":"Nokia 6 Case, Dretal [Shock Resistant] Flexible Soft TPU Brushed Anti-fingerprint Full-body Protective Case Cover For Nokia 6 (5.5\") (Red)", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61A5wrZcNgL._SX522_.jpg", "http://imgur.com/sUGkXs1.jpg#puppies", "http://imgur.com/TFF2dql.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies" ], "descriptions":[ "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "Wider frequency response for fuller listening enjoyment", "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache" ], "price":2978.65, "shipping":6.67, "prime":false, "in_stock":0, "rating":4.5, "review":3188, "brand":"SuperDry" }, { "id":15, "category":"phone", "name":"Nokia 5 TA-1053 16GB, Dual Sim, 5.2\", Factory Unlocked International Model, No Warranty - GSM ONLY, NO CDMA (Blue)", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61A0jmawunL._SX522_.jpg", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/sUGkXs1.jpg#puppies" ], "descriptions":[ "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV" ], "price":5207.33, "shipping":0, "prime":false, "in_stock":8, "rating":2.5, "review":1296, "brand":"Rolex" }, { "id":16, "category":"phone", "name":"Essential Phone 128 GB Unlocked with Full Display, Dual Camera – Black Moon", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/81OvOMun5zL._SX522_.jpg", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/CmiRlxL.jpg#puppies" ], "descriptions":[ "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "Connectivity technology is wired. Maximum input 200 milli watt", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "Built-in stereo speakers along with omnidirectional microphone, headphone port", "Long 3.6-ft cord threads comfortably through clothing and bags" ], "price":528.32, "shipping":0, "prime":false, "in_stock":6, "rating":5, "review":7637, "brand":"Huawei" }, { "id":17, "category":"phone", "name":"Xiaomi Redmi Note 4 32GB Black, 5.5\", Dual Sim, 13MP, GSM Unlocked Global Model, No Warranty", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71Fk5kYeoiL._SY679_.jpg", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies" ], "descriptions":[ "Made with Real Chicken and Turkey", "Built-in stereo speakers along with omnidirectional microphone, headphone port", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "Made with Real Chicken and Turkey", "Wider frequency response for fuller listening enjoyment" ], "price":1706.35, "shipping":31.46, "prime":false, "in_stock":8, "rating":4, "review":5104, "brand":"Rolex" }, { "id":18, "category":"phone", "name":"Sony Xperia L1 - Unlocked Smartphone - 16GB - Black (US Warranty)", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71%2B0yjSNyVL._SY679_.jpg", "http://imgur.com/1eo74Yu.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "descriptions":[ "Wider frequency response for fuller listening enjoyment", "Natural Fiber Blend Helps Control Hairballs", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience." ], "price":1595.6, "shipping":0, "prime":true, "in_stock":15, "rating":3, "review":597, "brand":"Logitech" }, { "id":19, "category":"phone", "name":"Unlocked Cell Phones, DOOGEE X20 Smartphone Unlocked Android 7.0 - 5.0\" HD IPS Display - 1GB RAM + 16GB ROM - 5MP Dual Cameras - 3G Unlocked Phones - Black", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71oS8Xo8jlL._SX522_.jpg", "http://imgur.com/sUGkXs1.jpg#puppies", "http://imgur.com/zPS7iWZ.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/1eo74Yu.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies" ], "descriptions":[ "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "100% Complete & Balanced Formula for Adult Cats", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears", "Built-in stereo speakers along with omnidirectional microphone, headphone port", "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals" ], "price":491.33, "shipping":46.31, "prime":false, "in_stock":12, "rating":0.5, "review":682, "brand":"Rolex" }, { "id":20, "category":"phone", "name":"Sony Xperia L1 16GB 5.5-inch Smartphone, Unlocked Pink (1308-0910) w/ VR Accessory Bundle Includes, Virtual Reality Cinema Viewer with Insulated Audio System & 32GB MicroSD High-Speed Memory Card", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61F8WTKx4jL._SL1000_.jpg", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies" ], "descriptions":[ "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)" ], "price":3911, "shipping":0, "prime":true, "in_stock":2, "rating":0.5, "review":3783, "brand":"Sony" }, { "id":21, "category":"phone", "name":"Sony Xperia XA1 - Unlocked Smartphone - 32GB - White (US Warranty)", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71oTbQBhpiL._SX522_.jpg", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies" ], "descriptions":[ "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "720p HD resolution for a crisp picture. 120V – 60Hz 50W" ], "price":278.32, "shipping":0, "prime":true, "in_stock":17, "rating":5, "review":5215, "brand":"Apple" }, { "id":22, "category":"phone", "name":"Sony Xperia XA unlocked smartphone,16GB Black (US Warranty)", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71iaaasXEgL._SY679_.jpg", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies" ], "descriptions":[ "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "Direct-lit LED produces great picture quality" ], "price":406.15, "shipping":0, "prime":true, "in_stock":6, "rating":4.5, "review":3248, "brand":"Hisense" }, { "id":23, "category":"phone", "name":"SONY XPERIA E5 Black (F3313) (UNLOCKED) LTE 5.0\" / 16GB-1.5GB RAM / 13MP SMARTPHONE - 1 year US WARRANTY!", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61TCI8BRZqL._SY679_.jpg", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/TFF2dql.jpg#puppies" ], "descriptions":[ "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out" ], "price":3616.74, "shipping":0, "prime":false, "in_stock":17, "rating":4.5, "review":5421, "brand":"Sony" }, { "id":24, "category":"phone", "name":"Nokia 3 TA-1032 4G LTE Dual sim 16GB Android 7.0 2GB Ram 8MP International Version No Warranty (Silver/White)", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61k%2BXS1GLHL._SX522_.jpg", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/sUGkXs1.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "descriptions":[ "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out", "Wider frequency response for fuller listening enjoyment" ], "price":1925.9, "shipping":0, "prime":true, "in_stock":9, "rating":5, "review":1845, "brand":"Logitech" }, { "id":25, "name":"Panasonic RP-HJE120-PPK In-Ear Stereo Earphones, Black", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/31T7cG1RxpL.jpg", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies" ], "descriptions":[ "Built-in stereo speakers along with omnidirectional microphone, headphone port", "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV", "100% Complete & Balanced Formula for Adult Cats" ], "price":459.87, "shipping":0, "prime":false, "in_stock":7, "rating":2, "review":7155, "brand":"Logitech" }, { "id":26, "name":"Mpow 059 Bluetooth Headphones Over Ear, Hi-Fi Stereo Wireless Headset, Foldable, Soft Memory-Protein Earmuffs, w/ Built-in Mic and Wired Mode for PC/ Cell Phones/ TV", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61y0yb%2B3pqL._SL1280_.jpg", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/sesTnZr.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies" ], "descriptions":[ "Wider frequency response for fuller listening enjoyment", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "100% Complete & Balanced Formula for Adult Cats", "ONE KEY START/ LANDING: Allows players of any level (Beginners Intermediates Experts) to fly the drone easily with perfect control and wonderful performance. Offering Release Date: 2017/8/12" ], "price":4331.22, "shipping":0, "prime":true, "in_stock":6, "rating":2.5, "review":5742, "brand":"Huawei" }, { "id":27, "name":"Halcent 2 Pack Premium Wired Earphones Noise Cancelling Earbuds Headphones with Remote & Mic In-Ear Headphones for iPhone, Samsung, iPad, iPod, Nokia, LG, HTC etc (White)", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61cFs0XjzFL._SL1500_.jpg", "http://imgur.com/sesTnZr.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/1eo74Yu.jpg#puppies", "http://imgur.com/1eo74Yu.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies" ], "descriptions":[ "Built-in stereo speakers along with omnidirectional microphone, headphone port", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones." ], "price":5996.79, "shipping":80.46, "prime":true, "in_stock":14, "rating":1, "review":3847, "brand":"Stussy" }, { "id":28, "name":"Halcent 2 Pack Stereo Sound Earphones,Noise Cancelling Headphones with Microphone,Stylish Dynamic Rope Wired Earbuds for iPhone, Samsung, iPad, iPod, Nokia, LG, HTC etc(Black & Red)", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71dCtpr8REL._SL1500_.jpg", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/XW7mWlP.jpg#puppies" ], "descriptions":[ "Built-in stereo speakers along with omnidirectional microphone, headphone port", "Connectivity technology is wired. Maximum input 200 milli watt", "Wider frequency response for fuller listening enjoyment", "Built-in stereo speakers along with omnidirectional microphone, headphone port", "Natural Fiber Blend Helps Control Hairballs" ], "price":3708.32, "shipping":84.89, "prime":true, "in_stock":8, "rating":3, "review":3114, "brand":"Apache" }, { "id":29, "name":"Earbuds, HokoAcc In-Ear Headphones Noise Isolation Headsets Heavy Bass Earphones with Microphone for iPhone Samsung iPad and Most Android Phones", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/51vWsEvnVJL._SL1050_.jpg", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies" ], "descriptions":[ "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur", "ONE KEY START/ LANDING: Allows players of any level (Beginners Intermediates Experts) to fly the drone easily with perfect control and wonderful performance. Offering Release Date: 2017/8/12", "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "Connectivity technology is wired. Maximum input 200 milli watt", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur" ], "price":426.69, "shipping":82.93, "prime":true, "in_stock":9, "rating":5, "review":3963, "brand":"Hisense" }, { "id":30, "name":"Mpow Flame Bluetooth Headphones Waterproof IPX7, Wireless Earbuds Sport, Richer Bass HiFi Stereo In-Ear Earphones w/ Mic, Case, 7-9 Hrs Playback Noise Cancelling Headsets (Comfy & Fast Pairing)", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61GIxxfDvKL._SL1280_.jpg", "http://imgur.com/TFF2dql.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/tOOCguv.jpg#puppies" ], "descriptions":[ "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears" ], "price":381.33, "shipping":94.35, "prime":true, "in_stock":19, "rating":0.5, "review":6829, "brand":"Huawei" }, { "id":31, "name":"Mpow Flame Bluetooth Headphones Waterproof IPX7, Wireless Earbuds Sport, Richer Bass HiFi Stereo In-Ear Earphones w/ Mic, Case, 7-9 Hrs Playback Noise Cancelling Headsets (Comfy & Fast Pairing)", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61VcjWqmBSL._SL1280_.jpg", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/sesTnZr.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies" ], "descriptions":[ "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur", "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "Direct-lit LED produces great picture quality" ], "price":2701.53, "shipping":79.25, "prime":true, "in_stock":9, "rating":0, "review":2952, "brand":"Apache" }, { "id":32, "name":"Mpow Flame Bluetooth Headphones Waterproof IPX7, Wireless Earbuds Sport, Richer Bass HiFi Stereo In-Ear Earphones w/ Mic, Case, 7-9 Hrs Playback Noise Cancelling Headsets (Comfy & Fast Pairing)", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61L2yUAOKeL._SL1280_.jpg", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/TFF2dql.jpg#puppies" ], "descriptions":[ "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "Natural Fiber Blend Helps Control Hairballs", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears", "Full-size keyboard with 78 (U.S.) individual LED backlit keys, including 12 function keys and 4 arrow keys with ambient light sensor, Force Touch trackpad for precise cursor control and pressure-sensing capabilities; enables Force clicks, accelerators, pressure-sensitive drawing, and Multi-Touch gestures", "Direct-lit LED produces great picture quality" ], "price":2084.41, "shipping":29.97, "prime":true, "in_stock":11, "rating":4.5, "review":1936, "brand":"Supreme" }, { "id":33, "name":"Mpow Flame Bluetooth Headphones Waterproof IPX7, Wireless Earbuds Sport, Richer Bass HiFi Stereo In-Ear Earphones w/ Mic, Case, 7-9 Hrs Playback Noise Cancelling Headsets (Comfy & Fast Pairing)", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61UtzTmRkmL._SL1280_.jpg", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/9iJfCs2.jpg#puppies", "http://imgur.com/TFF2dql.jpg#puppies" ], "descriptions":[ "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out", "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals" ], "price":5649.2, "shipping":33.12, "prime":true, "in_stock":9, "rating":4.5, "review":8344, "brand":"Logitech" }, { "id":34, "name":"On Ear Headphones, Vogek Lightweight and Foldable Bass Headphones with Volume Control and Microphone-Black", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71es1iBWE-L._SL1500_.jpg", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies", "http://imgur.com/1eo74Yu.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "descriptions":[ "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "Made with Real Chicken and Turkey" ], "price":925.45, "shipping":0, "prime":false, "in_stock":16, "rating":1.5, "review":2646, "brand":"Huawei" }, { "id":35, "name":"Vogek On Ear Headphones Lightweight and Foldable Bass Headphones with Volume Control and Microphone - Blue", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71HavkRJuOL._SL1500_.jpg", "http://imgur.com/xYM1WVJ.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/sUGkXs1.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "descriptions":[ "Built-in stereo speakers along with omnidirectional microphone, headphone port", "Long 3.6-ft cord threads comfortably through clothing and bags", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)" ], "price":1169.46, "shipping":0, "prime":true, "in_stock":13, "rating":3, "review":2868, "brand":"Hisense" }, { "id":36, "name":"On Ear Headphones, Vogek Lightweight and Foldable On Ear Headphones with 1.5M Tangle-Free Cord and Microphone - Cyan", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71WoLs1CO3L._SL1500_.jpg", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies" ], "descriptions":[ "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "Made with Real Chicken and Turkey", "Natural Fiber Blend Helps Control Hairballs", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur" ], "price":389.78, "shipping":63.09, "prime":false, "in_stock":6, "rating":5, "review":2150, "brand":"Samsung" }, { "id":37, "name":"Vogek On Ear Headphones Lightweight and Foldable Bass Headphones with Volume Control and Microphone (Gold-White)", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71R7jKxQxXL._SL1500_.jpg", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/sUGkXs1.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "descriptions":[ "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)", "Built-in stereo speakers along with omnidirectional microphone, headphone port", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions." ], "price":2166.42, "shipping":0, "prime":true, "in_stock":9, "rating":4.5, "review":1985, "brand":"Supreme" }, { "id":38, "name":"On Ear Headphones, Vogek Lightweight and Foldable On Ear Headphones with 1.5M Tangle-Free Cord and Microphone - Red", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71VJaOr3gnL._SL1500_.jpg", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies" ], "descriptions":[ "Wider frequency response for fuller listening enjoyment", "Direct-lit LED produces great picture quality", "Built-in stereo speakers along with omnidirectional microphone, headphone port" ], "price":3182.91, "shipping":0, "prime":true, "in_stock":14, "rating":1.5, "review":5392, "brand":"Dell" }, { "id":39, "name":"Bluetooth Headphones, Otium Best Wireless Sports Earphones w/ Mic IPX7 Waterproof HD Stereo Sweatproof In Ear Earbuds for Gym Running Workout 8 Hour Battery Noise Cancelling Headsets", "category":"headphones", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/61a9fpKy3qL._SL1500_.jpg", "http://imgur.com/sUGkXs1.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies" ], "descriptions":[ "Made with Real Chicken and Turkey", "Wider frequency response for fuller listening enjoyment", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones.", "720p HD resolution for a crisp picture. 120V – 60Hz 50W" ], "price":1756.47, "shipping":38.84, "prime":false, "in_stock":7, "rating":2.5, "review":2482, "brand":"Rolex" }, { "id":40, "name":"Purina Cat Chow Naturals Indoor Dry Cat Food", "category":"cat food", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/81XKRgX0CbL._SL1500_.jpg", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies" ], "descriptions":[ "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "12-inch (diagonal) LED-backlit display with IPS technology; 2304-by-1440 resolution at 226 pixels per inch with support for millions of colors", "100% Complete & Balanced Formula for Adult Cats", "Natural Fiber Blend Helps Control Hairballs", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "256GB PCI-E based flash memory storage, 8GB of 1600MHz LPDDR3 onboard memory" ], "price":4283.78, "shipping":19.72, "prime":true, "in_stock":5, "rating":3.5, "review":7830, "brand":"Intel" }, { "id":41, "name":"Meow Mix Tender Centers Dry Cat Food", "category":"cat food", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/71e%2BOBGQk5L._SL1300_.jpg", "http://imgur.com/TFF2dql.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies" ], "descriptions":[ "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "Made with Real Chicken and Turkey", "Wider frequency response for fuller listening enjoyment" ], "price":4811.14, "shipping":0, "prime":true, "in_stock":19, "rating":0.5, "review":7240, "brand":"RR" }, { "id":42, "name":"9Lives Dry Cat Food", "category":"cat food", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/81tMyZtpHRL._SL1300_.jpg", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "descriptions":[ "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next." ], "price":5405.71, "shipping":0, "prime":true, "in_stock":11, "rating":1.5, "review":1433, "brand":"SuperDry" }, { "id":43, "name":"Purina Friskies Surfin' & Turfin' Favorites Dry Cat Food", "category":"cat food", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/81iY6Jf-QHL._SL1500_.jpg", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "descriptions":[ "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears", "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears", "12-inch (diagonal) LED-backlit display with IPS technology; 2304-by-1440 resolution at 226 pixels per inch with support for millions of colors", "Long 3.6-ft cord threads comfortably through clothing and bags", "12-inch (diagonal) LED-backlit display with IPS technology; 2304-by-1440 resolution at 226 pixels per inch with support for millions of colors" ], "price":3854.43, "shipping":0, "prime":false, "in_stock":3, "rating":4, "review":7261, "brand":"Intel" }, { "id":44, "name":"Purina Friskies Savory Shreds Adult Wet Cat Food Variety Pack", "category":"cat food", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/81iY6Jf-QHL._SL1500_.jpg", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/sesTnZr.jpg#puppies" ], "descriptions":[ "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "256GB PCI-E based flash memory storage, 8GB of 1600MHz LPDDR3 onboard memory", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty" ], "price":4178.43, "shipping":0, "prime":true, "in_stock":17, "rating":0.5, "review":504, "brand":"RR" }, { "id":45, "name":"Purina ONE Tender Selects Blend With Real Chicken Dry Cat Food", "category":"cat food", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/81xfG2foxVL._SL1500_.jpg", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies" ], "descriptions":[ "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience" ], "price":3115.26, "shipping":96.57, "prime":true, "in_stock":11, "rating":5, "review":3979, "brand":"SuperDry" }, { "id":46, "name":"Purina Fancy Feast Medleys Tuscany Collection Gourmet Wet Cat Food Variety Pack- (24) 3 oz. Cans", "category":"cat food", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/81mbzXlXN8L._SL1500_.jpg", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/sesTnZr.jpg#puppies" ], "descriptions":[ "100% Complete & Balanced Formula for Adult Cats", "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next." ], "price":2658.89, "shipping":25.68, "prime":true, "in_stock":19, "rating":2.5, "review":328, "brand":"Sony" }, { "id":47, "name":"Purina Friskies Tasty Treasures Variety Pack Wet Cat Food", "category":"cat food", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/91i3WownEhL._SL1500_.jpg", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/9iJfCs2.jpg#puppies" ], "descriptions":[ "12-inch (diagonal) LED-backlit display with IPS technology; 2304-by-1440 resolution at 226 pixels per inch with support for millions of colors", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)" ], "price":3517.05, "shipping":0, "prime":false, "in_stock":16, "rating":4.5, "review":4511, "brand":"Rolex" }, { "id":48, "name":"IAMS Proactive Health Specialized Care Adult Dry Cat Food", "category":"cat food", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/818NOD6F1XL._SL1500_.jpg", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "descriptions":[ "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "100% Complete & Balanced Formula for Adult Cats", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience" ], "price":887.8, "shipping":76.66, "prime":true, "in_stock":7, "rating":1, "review":2362, "brand":"Rolex" }, { "id":49, "name":"BLUE Wilderness High Protein Grain Free Adult Dry Cat Food", "category":"cat food", "image_url":[ "https://images-na.ssl-images-amazon.com/images/I/91Ry9TwrYkL._SL1500_.jpg", "http://imgur.com/1eo74Yu.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "descriptions":[ "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears" ], "price":4585.09, "shipping":35.15, "prime":true, "in_stock":19, "rating":1, "review":5705, "brand":"Rolex" }, { "id":50, "name":"Lead Ballon", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-04.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "category":"drone", "descriptions":[ "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out" ], "price":4766.55, "shipping":18.38, "prime":false, "in_stock":4, "rating":3.5, "review":8497, "brand":"Stussy" }, { "id":51, "name":"Halo", "image_url":[ "https://cdn2.harveynorman.com.au/media/catalog/product/cache/21/image/992x558/9df78eab33525d08d6e5fb8d27136e95/3/4/3495037_1.jpg", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies" ], "category":"drone", "descriptions":[ "256GB PCI-E based flash memory storage, 8GB of 1600MHz LPDDR3 onboard memory", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out" ], "price":3815.37, "shipping":0, "prime":true, "in_stock":18, "rating":3, "review":342, "brand":"Intel" }, { "id":52, "name":"Typhoon", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-04.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/zPS7iWZ.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/zPS7iWZ.jpg#puppies" ], "category":"drone", "descriptions":[ "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones.", "ONE KEY START/ LANDING: Allows players of any level (Beginners Intermediates Experts) to fly the drone easily with perfect control and wonderful performance. Offering Release Date: 2017/8/12" ], "price":1310.07, "shipping":33.23, "prime":true, "in_stock":7, "rating":4, "review":5753, "brand":"Stussy" }, { "id":53, "name":"Constitution", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-00.jpg?itok=lfMW1KUQ&fc=50,50", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies" ], "category":"drone", "descriptions":[ "100% Complete & Balanced Formula for Adult Cats", "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones." ], "price":4458.71, "shipping":57.7, "prime":false, "in_stock":7, "rating":0, "review":6459, "brand":"SuperDry" }, { "id":54, "name":"Halo", "image_url":[ "https://i0.wp.com/thedronegirl.com/wp-content/uploads/2016/07/MG_1612.jpg?resize=1024%2C683", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies" ], "category":"drone", "descriptions":[ "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones." ], "price":4568.02, "shipping":0, "prime":false, "in_stock":15, "rating":2.5, "review":2017, "brand":"Patagonia" }, { "id":55, "name":"Aardvark", "image_url":[ "https://i0.wp.com/thedronegirl.com/wp-content/uploads/2016/07/MG_1612.jpg?resize=1024%2C683", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies" ], "category":"drone", "descriptions":[ "Long 3.6-ft cord threads comfortably through clothing and bags", "100% Complete & Balanced Formula for Adult Cats", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)" ], "price":4099.11, "shipping":93.85, "prime":false, "in_stock":8, "rating":3.5, "review":6828, "brand":"RR" }, { "id":56, "name":"Warthog", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-09.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies" ], "category":"drone", "descriptions":[ "Made with Real Chicken and Turkey", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)", "ONE KEY START/ LANDING: Allows players of any level (Beginners Intermediates Experts) to fly the drone easily with perfect control and wonderful performance. Offering Release Date: 2017/8/12", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones.", "720p HD resolution for a crisp picture. 120V – 60Hz 50W" ], "price":5880.73, "shipping":77.39, "prime":false, "in_stock":14, "rating":4.5, "review":6779, "brand":"Supreme" }, { "id":57, "name":"Tsunami", "image_url":[ "https://truimg.toysrus.com/product/images/sharper-image-rechargeable-dx-2-stunt-drone-2.4-ghz-black--54BCFCEC.zoom.jpg?fit=inside|485:485", "http://imgur.com/XW7mWlP.jpg#puppies", "http://imgur.com/sesTnZr.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies" ], "category":"drone", "descriptions":[ "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "100% Complete & Balanced Formula for Adult Cats" ], "price":4571.32, "shipping":0, "prime":true, "in_stock":4, "rating":5, "review":8142, "brand":"SuperDry" }, { "id":58, "name":"Weasel", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-07.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies" ], "category":"drone", "descriptions":[ "Built-in stereo speakers along with omnidirectional microphone, headphone port", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "Connectivity technology is wired. Maximum input 200 milli watt" ], "price":4711.44, "shipping":0, "prime":false, "in_stock":6, "rating":2.5, "review":4706, "brand":"Intel" }, { "id":59, "name":"Hummingbird", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-05.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies" ], "category":"drone", "descriptions":[ "Made with Real Chicken and Turkey", "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "Made with Real Chicken and Turkey", "Full-size keyboard with 78 (U.S.) individual LED backlit keys, including 12 function keys and 4 arrow keys with ambient light sensor, Force Touch trackpad for precise cursor control and pressure-sensing capabilities; enables Force clicks, accelerators, pressure-sensitive drawing, and Multi-Touch gestures", "ONE KEY START/ LANDING: Allows players of any level (Beginners Intermediates Experts) to fly the drone easily with perfect control and wonderful performance. Offering Release Date: 2017/8/12", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions." ], "price":3071.29, "shipping":0, "prime":true, "in_stock":14, "rating":1.5, "review":2201, "brand":"Sony" }, { "id":60, "name":"Bebop 2", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-08.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies" ], "category":"drone", "descriptions":[ "100% Complete & Balanced Formula for Adult Cats", "Full-size keyboard with 78 (U.S.) individual LED backlit keys, including 12 function keys and 4 arrow keys with ambient light sensor, Force Touch trackpad for precise cursor control and pressure-sensing capabilities; enables Force clicks, accelerators, pressure-sensitive drawing, and Multi-Touch gestures", "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears", "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "12-inch (diagonal) LED-backlit display with IPS technology; 2304-by-1440 resolution at 226 pixels per inch with support for millions of colors", "Natural Fiber Blend Helps Control Hairballs" ], "price":1361.6, "shipping":5.7, "prime":false, "in_stock":0, "rating":2.5, "review":2631, "brand":"Samsung" }, { "id":61, "name":"Lead Ballon", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-03.jpg?itok=ZDWebsXe&fc=50,50", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "category":"drone", "descriptions":[ "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "Natural Fiber Blend Helps Control Hairballs", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "Wider frequency response for fuller listening enjoyment", "100% Complete & Balanced Formula for Adult Cats", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)" ], "price":4343.76, "shipping":0, "prime":true, "in_stock":2, "rating":1.5, "review":3924, "brand":"Patagonia" }, { "id":62, "name":"Henry", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-08.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "category":"drone", "descriptions":[ "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "Built-in stereo speakers along with omnidirectional microphone, headphone port", "Made with Real Chicken and Turkey" ], "price":3728.97, "shipping":0, "prime":false, "in_stock":1, "rating":1.5, "review":5568, "brand":"Samsung" }, { "id":63, "name":"Galileo", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-09.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies" ], "category":"drone", "descriptions":[ "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)", "Wider frequency response for fuller listening enjoyment" ], "price":3768.66, "shipping":93.24, "prime":true, "in_stock":16, "rating":5, "review":1294, "brand":"Hisense" }, { "id":64, "name":"Phantom", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-07.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/TFF2dql.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "category":"drone", "descriptions":[ "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out", "100% Complete & Balanced Formula for Adult Cats", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur" ], "price":4423.87, "shipping":0, "prime":true, "in_stock":15, "rating":2.5, "review":1532, "brand":"Dell" }, { "id":65, "name":"Aardvark", "image_url":[ "https://cdn2.harveynorman.com.au/media/catalog/product/cache/21/image/992x558/9df78eab33525d08d6e5fb8d27136e95/3/4/3495037_1.jpg", "http://imgur.com/xYM1WVJ.jpg#puppies", "http://imgur.com/sUGkXs1.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies" ], "category":"drone", "descriptions":[ "Direct-lit LED produces great picture quality", "Wider frequency response for fuller listening enjoyment", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty" ], "price":3473.13, "shipping":14.1, "prime":false, "in_stock":6, "rating":2, "review":8006, "brand":"Stussy" }, { "id":66, "name":"Parrot", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-03.jpg?itok=ZDWebsXe&fc=50,50", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies" ], "category":"drone", "descriptions":[ "12-inch (diagonal) LED-backlit display with IPS technology; 2304-by-1440 resolution at 226 pixels per inch with support for millions of colors", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "Made with Real Chicken and Turkey" ], "price":2087.44, "shipping":0, "prime":false, "in_stock":8, "rating":2.5, "review":7341, "brand":"Logitech" }, { "id":67, "name":"Parrot", "image_url":[ "https://truimg.toysrus.com/product/images/sharper-image-rechargeable-dx-2-stunt-drone-2.4-ghz-black--54BCFCEC.zoom.jpg?fit=inside|485:485", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies" ], "category":"drone", "descriptions":[ "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "Wider frequency response for fuller listening enjoyment", "100% Complete & Balanced Formula for Adult Cats" ], "price":917.18, "shipping":61.23, "prime":false, "in_stock":8, "rating":1.5, "review":3872, "brand":"Intel" }, { "id":68, "name":"Titan", "image_url":[ "https://truimg.toysrus.com/product/images/sharper-image-rechargeable-dx-2-stunt-drone-2.4-ghz-black--54BCFCEC.zoom.jpg?fit=inside|485:485", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies" ], "category":"drone", "descriptions":[ "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "Natural Fiber Blend Helps Control Hairballs", "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "12-inch (diagonal) LED-backlit display with IPS technology; 2304-by-1440 resolution at 226 pixels per inch with support for millions of colors", "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share" ], "price":3239.19, "shipping":7.14, "prime":true, "in_stock":20, "rating":3, "review":6983, "brand":"Patagonia" }, { "id":69, "name":"Bebop 1", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-02.jpg?itok=ZcNajxlf&fc=50,50", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies" ], "category":"drone", "descriptions":[ "Natural Fiber Blend Helps Control Hairballs", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "Direct-lit LED produces great picture quality" ], "price":5086.1, "shipping":0, "prime":true, "in_stock":15, "rating":0, "review":3894, "brand":"Rolex" }, { "id":70, "name":"Henry", "image_url":[ "https://i0.wp.com/thedronegirl.com/wp-content/uploads/2016/07/MG_1612.jpg?resize=1024%2C683", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies" ], "category":"drone", "descriptions":[ "12-inch (diagonal) LED-backlit display with IPS technology; 2304-by-1440 resolution at 226 pixels per inch with support for millions of colors", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "Natural Fiber Blend Helps Control Hairballs" ], "price":605.87, "shipping":0, "prime":false, "in_stock":4, "rating":4.5, "review":247, "brand":"Patagonia" }, { "id":71, "name":"Parrot", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-07.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/9iJfCs2.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies" ], "category":"drone", "descriptions":[ "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "Long 3.6-ft cord threads comfortably through clothing and bags", "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "Wider frequency response for fuller listening enjoyment" ], "price":1092.1, "shipping":94.47, "prime":true, "in_stock":13, "rating":3.5, "review":3985, "brand":"Webpack" }, { "id":72, "name":"Steadfast", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-09.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/TFF2dql.jpg#puppies" ], "category":"drone", "descriptions":[ "Built-in stereo speakers along with omnidirectional microphone, headphone port", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV" ], "price":578.02, "shipping":72.37, "prime":true, "in_stock":12, "rating":3.5, "review":4290, "brand":"Sony" }, { "id":73, "name":"Phantom", "image_url":[ "https://cdn.vox-cdn.com/thumbor/vPg3038R00gWj4tzgYQS1lDb5Y8=/0x0:1024x576/920x613/filters:focal(431x207:593x369):format(webp)/cdn.vox-cdn.com/uploads/chorus_image/image/56508181/Drone_LIlY_00011_1024x576.0.png", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "category":"drone", "descriptions":[ "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out", "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next." ], "price":3949.81, "shipping":0, "prime":true, "in_stock":12, "rating":2, "review":7328, "brand":"Webpack" }, { "id":74, "name":"Lead Ballon", "image_url":[ "https://www.popsci.com/sites/popsci.com/files/styles/1000_1x_/public/images/2017/08/drone-09.jpg?itok=dEigMkKk&fc=50,50", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "category":"drone", "descriptions":[ "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones.", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "256GB PCI-E based flash memory storage, 8GB of 1600MHz LPDDR3 onboard memory", "Long 3.6-ft cord threads comfortably through clothing and bags", "Natural Fiber Blend Helps Control Hairballs" ], "price":4480.92, "shipping":47.83, "prime":true, "in_stock":20, "rating":4.5, "review":41, "brand":"Patagonia" }, { "id":75, "name":"Sony-X", "category":"TV", "image_url":[ "https://goo.gl/images/WnZqdY", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/sesTnZr.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies" ], "descriptions":[ "100% Complete & Balanced Formula for Adult Cats", "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "Made with Real Chicken and Turkey", "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience." ], "price":5159.17, "shipping":12.31, "prime":false, "in_stock":1, "rating":0.5, "review":1934, "brand":"Webpack" }, { "id":76, "name":"Vizio-B", "category":"TV", "image_url":[ "https://goo.gl/images/aw6khe", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/zPS7iWZ.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/sUGkXs1.jpg#puppies" ], "descriptions":[ "100% Complete & Balanced Formula for Adult Cats", "100% Complete & Balanced Formula for Adult Cats", "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "Wider frequency response for fuller listening enjoyment", "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience" ], "price":3231.33, "shipping":45.54, "prime":false, "in_stock":8, "rating":2.5, "review":7278, "brand":"Supreme" }, { "id":77, "name":"Philips-V", "category":"TV", "image_url":[ "https://goo.gl/images/BFRLPi", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies" ], "descriptions":[ "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "FOLDABLE STRUCTURE: Foldable & flexible blades make the drone small and portable. Also provides a better and safer flight experience", "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones.", "Wider frequency response for fuller listening enjoyment" ], "price":452.47, "shipping":0, "prime":true, "in_stock":8, "rating":0.5, "review":5242, "brand":"Sony" }, { "id":78, "name":"Samsung-M", "category":"TV", "image_url":[ "https://goo.gl/images/t4HW6Q", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies", "http://imgur.com/zPS7iWZ.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies" ], "descriptions":[ "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV", "Full-size keyboard with 78 (U.S.) individual LED backlit keys, including 12 function keys and 4 arrow keys with ambient light sensor, Force Touch trackpad for precise cursor control and pressure-sensing capabilities; enables Force clicks, accelerators, pressure-sensitive drawing, and Multi-Touch gestures", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next." ], "price":5343.47, "shipping":0, "prime":false, "in_stock":8, "rating":0, "review":5655, "brand":"Dell" }, { "id":79, "name":"TCL-X", "category":"TV", "image_url":[ "https://goo.gl/images/6wpBKq", "http://imgur.com/zPS7iWZ.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/zPS7iWZ.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies" ], "descriptions":[ "100% Complete & Balanced Formula for Adult Cats", "Long 3.6-ft cord threads comfortably through clothing and bags", "Wider frequency response for fuller listening enjoyment", "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "Wider frequency response for fuller listening enjoyment" ], "price":714.9, "shipping":22.44, "prime":true, "in_stock":17, "rating":0, "review":950, "brand":"Apache" }, { "id":80, "name":"LG-B", "category":"TV", "image_url":[ "https://goo.gl/images/myL1tv", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/CmiRlxL.jpg#puppies" ], "descriptions":[ "Natural Fiber Blend Helps Control Hairballs", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "Made with Real Chicken and Turkey", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur", "Long 3.6-ft cord threads comfortably through clothing and bags" ], "price":2895.08, "shipping":6.16, "prime":true, "in_stock":7, "rating":0.5, "review":7879, "brand":"Stussy" }, { "id":81, "name":"Sony-V", "category":"TV", "image_url":[ "https://goo.gl/images/7NmS2A", "http://imgur.com/zPS7iWZ.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "descriptions":[ "Made with Real Chicken and Turkey", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur", "Natural Fiber Blend Helps Control Hairballs", "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty" ], "price":2393.95, "shipping":61.37, "prime":true, "in_stock":8, "rating":5, "review":350, "brand":"Rolex" }, { "id":82, "name":"Vizio-M", "category":"TV", "image_url":[ "https://goo.gl/images/CNzaV1", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/TFF2dql.jpg#puppies" ], "descriptions":[ "ONE KEY START/ LANDING: Allows players of any level (Beginners Intermediates Experts) to fly the drone easily with perfect control and wonderful performance. Offering Release Date: 2017/8/12", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions." ], "price":1665.65, "shipping":14.01, "prime":true, "in_stock":16, "rating":2, "review":7217, "brand":"Intel" }, { "id":83, "name":"Philips-X", "category":"TV", "image_url":[ "https://goo.gl/images/ypwmt1", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/tOOCguv.jpg#puppies" ], "descriptions":[ "MODULAR and BONUS BATTERY: There are 2 powerful 3.7V 500mAh Modular batteries including 1 bonus, which can support longer flight time for you and your family, this modular design ensures the safety of charge and storage", "100% Complete & Balanced Formula for Adult Cats", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty" ], "price":565.67, "shipping":0, "prime":true, "in_stock":5, "rating":4, "review":1277, "brand":"Supreme" }, { "id":84, "name":"Samsung-B", "category":"TV", "image_url":[ "https://goo.gl/images/RoVfZb", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "descriptions":[ "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "Full-size keyboard with 78 (U.S.) individual LED backlit keys, including 12 function keys and 4 arrow keys with ambient light sensor, Force Touch trackpad for precise cursor control and pressure-sensing capabilities; enables Force clicks, accelerators, pressure-sensitive drawing, and Multi-Touch gestures", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "100% Complete & Balanced Formula for Adult Cats", "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share" ], "price":2217.33, "shipping":0, "prime":true, "in_stock":6, "rating":2, "review":6746, "brand":"Revlon" }, { "id":85, "name":"TCL-V", "category":"TV", "image_url":[ "https://goo.gl/images/qJgKz5", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies" ], "descriptions":[ "Connectivity technology is wired. Maximum input 200 milli watt", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions." ], "price":3489.54, "shipping":74.24, "prime":true, "in_stock":5, "rating":1.5, "review":5708, "brand":"Stussy" }, { "id":86, "name":"LG-M", "category":"TV", "image_url":[ "https://goo.gl/images/u68PL7", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies" ], "descriptions":[ "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones.", "Wider frequency response for fuller listening enjoyment", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "Built-in stereo speakers along with omnidirectional microphone, headphone port" ], "price":1293.65, "shipping":2.82, "prime":false, "in_stock":6, "rating":4, "review":1876, "brand":"Samsung" }, { "id":87, "name":"Sony-X", "category":"TV", "image_url":[ "https://goo.gl/images/er6emf", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies" ], "descriptions":[ "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones.", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "Wi-Fi FPV 720P HD CAMERA: Equipped with 720P HD camera to take aerial photos and videos. Images and videos will be stored in both the app and the mobile album system", "12-inch (diagonal) LED-backlit display with IPS technology; 2304-by-1440 resolution at 226 pixels per inch with support for millions of colors" ], "price":3194.56, "shipping":0, "prime":true, "in_stock":6, "rating":5, "review":1770, "brand":"RR" }, { "id":88, "name":"Vizio-B", "category":"TV", "image_url":[ "https://goo.gl/images/7Rq9BV", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/Ryl08TL.jpg#puppies" ], "descriptions":[ "Direct-lit LED produces great picture quality", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur" ], "price":1544.7, "shipping":82.33, "prime":true, "in_stock":20, "rating":0.5, "review":5890, "brand":"Webpack" }, { "id":89, "name":"Philips-V", "category":"TV", "image_url":[ "https://goo.gl/images/ZGqiKk", "http://imgur.com/sesTnZr.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies" ], "descriptions":[ "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "Inputs: 3 HDMI (1 w/ ARC), 1 USB, RF, Composite, Headphone Jack, Optical Audio Out", "Built-in stereo speakers along with omnidirectional microphone, headphone port" ], "price":897.51, "shipping":22.71, "prime":true, "in_stock":10, "rating":3.5, "review":6173, "brand":"Samsung" }, { "id":90, "name":"Samsung-M", "category":"TV", "image_url":[ "https://goo.gl/images/qHFMdA", "http://imgur.com/sUGkXs1.jpg#puppies", "http://imgur.com/TFF2dql.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/tOOCguv.jpg#puppies", "http://imgur.com/zPS7iWZ.jpg#puppies" ], "descriptions":[ "256GB PCI-E based flash memory storage, 8GB of 1600MHz LPDDR3 onboard memory", "Natural Fiber Blend Helps Control Hairballs", "Long 3.6-ft cord threads comfortably through clothing and bags", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "Connectivity technology is wired. Maximum input 200 milli watt" ], "price":2476.89, "shipping":0, "prime":false, "in_stock":0, "rating":3, "review":927, "brand":"Supreme" }, { "id":91, "name":"TCL-X", "category":"TV", "image_url":[ "https://goo.gl/images/u9Q8DR", "http://imgur.com/Ryl08TL.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies" ], "descriptions":[ "Built-in stereo speakers along with omnidirectional microphone, headphone port", "ONE KEY START/ LANDING: Allows players of any level (Beginners Intermediates Experts) to fly the drone easily with perfect control and wonderful performance. Offering Release Date: 2017/8/12", "Natural Fiber Blend Helps Control Hairballs", "60Hz refresh rate allows fast moving action scenes to be seen with minimal motion blur" ], "price":5784.51, "shipping":0, "prime":false, "in_stock":15, "rating":3, "review":3594, "brand":"Huawei" }, { "id":92, "name":"LG-B", "category":"TV", "image_url":[ "https://goo.gl/images/aVSsYn", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/ISCAhSo.jpg#puppies" ], "descriptions":[ "Black ultra-soft ErgoFit in-ear earbud headphones conform instantly to your ears", "Full-size keyboard with 78 (U.S.) individual LED backlit keys, including 12 function keys and 4 arrow keys with ambient light sensor, Force Touch trackpad for precise cursor control and pressure-sensing capabilities; enables Force clicks, accelerators, pressure-sensitive drawing, and Multi-Touch gestures", "Direct-lit LED produces great picture quality", "Natural Fiber Blend Helps Control Hairballs" ], "price":5894.05, "shipping":0, "prime":true, "in_stock":16, "rating":2, "review":4377, "brand":"Patagonia" }, { "id":93, "name":"Sony-V", "category":"TV", "image_url":[ "https://goo.gl/images/oj4pSr", "http://imgur.com/eWzBogn.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/eWzBogn.jpg#puppies" ], "descriptions":[ "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "Wider frequency response for fuller listening enjoyment", "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions." ], "price":3318.93, "shipping":46.74, "prime":false, "in_stock":3, "rating":3.5, "review":5430, "brand":"Logitech" }, { "id":94, "name":"Vizio-M", "category":"TV", "image_url":[ "https://goo.gl/images/SSJw9D", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies" ], "descriptions":[ "Long 3.6-ft cord threads comfortably through clothing and bags", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones." ], "price":2185.79, "shipping":16.36, "prime":true, "in_stock":13, "rating":4, "review":8829, "brand":"Hisense" }, { "id":95, "name":"Philips-X", "category":"TV", "image_url":[ "https://goo.gl/images/88vHa9", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/sesTnZr.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies" ], "descriptions":[ "Natural Fiber Blend Helps Control Hairballs", "✔ UNIVERSAL COMPATIBILITY: Equipped with 46\" tangle-free cable, compatible with almost all 3.5mm jack audio devices: iPhone, iPad, iPod, Samsung, Android cell phones, tablets, PC, laptops, Mac and more.", "Built-in stereo speakers along with omnidirectional microphone, headphone port" ], "price":3890.33, "shipping":36.45, "prime":true, "in_stock":2, "rating":4, "review":3445, "brand":"Hisense" }, { "id":96, "name":"Samsung-B", "category":"TV", "image_url":[ "https://goo.gl/images/JoWhVh", "http://imgur.com/yPbBB0i.jpg#puppies", "http://imgur.com/BuhZN1l.jpg#puppies", "http://imgur.com/GDx27HC.jpg#puppies", "http://imgur.com/zPS7iWZ.jpg#puppies", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/xYM1WVJ.jpg#puppies" ], "descriptions":[ "1.2GHz dual-core Intel Core M-5Y51 processor (Turbo Boost up to 2.6GHz) with 4MB shared L3 cache", "Connectivity technology is wired. Maximum input 200 milli watt", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "802.11ac Wi-Fi wireless networking; IEEE 802.11a/b/g/n compatible, Bluetooth 4.0 technology for connecting with peripherals such as keyboards, mice, and cell phones.", "Smart functionality offers access to over 4,000 streaming channels featuring more than 450,000 movies and TV episodes via Roku TV", "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals" ], "price":5386.64, "shipping":0, "prime":true, "in_stock":14, "rating":3, "review":6575, "brand":"Sony" }, { "id":97, "name":"TCL-V", "category":"TV", "image_url":[ "https://goo.gl/images/18VjJX", "http://imgur.com/lOF0a13.jpg#puppies", "http://imgur.com/iIlhBgo.jpg#puppies", "http://imgur.com/knw05XS.jpg#puppies", "http://imgur.com/CmiRlxL.jpg#puppies", "http://imgur.com/yPbBB0i.jpg#puppies" ], "descriptions":[ "✔ PREMIUM COMFORT ON-EAR HEADPHONES: Comfortable on-ear lightweight design along with soft ear cushions and adjustable padded headband provide premium comfort even during long listening sessions.", "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "Dimensions (W x H x D): TV without stand: 28.9\" x 17.1\" x 3.2\", TV with stand: 28.9\" x 19.2\" x 7.2\"", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "Full-size keyboard with 78 (U.S.) individual LED backlit keys, including 12 function keys and 4 arrow keys with ambient light sensor, Force Touch trackpad for precise cursor control and pressure-sensing capabilities; enables Force clicks, accelerators, pressure-sensitive drawing, and Multi-Touch gestures" ], "price":5484.81, "shipping":0, "prime":false, "in_stock":19, "rating":2, "review":868, "brand":"Logitech" }, { "id":98, "name":"LG-M", "category":"TV", "image_url":[ "https://goo.gl/images/fVmpkb", "http://imgur.com/9iJfCs2.jpg#puppies", "http://imgur.com/sesTnZr.jpg#puppies", "http://imgur.com/wMTyFXF.jpg#puppies", "http://imgur.com/P1GxMHI.jpg#puppies", "http://imgur.com/j4Hu90T.png#puppies", "http://imgur.com/TFF2dql.jpg#puppies" ], "descriptions":[ "This Certified Refurbished product is manufacturer refurbished, shows limited or no wear, and includes all original accessories plus a 90-day warranty", "12-inch (diagonal) LED-backlit display with IPS technology; 2304-by-1440 resolution at 226 pixels per inch with support for millions of colors", "720p HD resolution for a crisp picture. 120V – 60Hz 50W", "✔ MULTI-FUNCTION IN-LINE CONTROL: The corded headphones features an in-line microphone for hands-free phone calls with one button control and one volume control. Adjust the volume to a comfortable level, easily control your music: Play, Pause, Previous, Next.", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)", "Natural Fiber Blend Helps Control Hairballs" ], "price":4838.8, "shipping":0, "prime":false, "in_stock":13, "rating":2, "review":556, "brand":"Huawei" }, { "id":99, "name":"Sony-X", "category":"TV", "image_url":[ "https://goo.gl/images/RtURx5", "http://imgur.com/qg5mYlH.jpg#puppies", "http://imgur.com/ISCAhSo.jpg#puppies", "http://imgur.com/jSsFtWv.jpg#puppies", "http://imgur.com/kkb2FVM.jpg#puppies", "http://imgur.com/XW7mWlP.jpg#puppies", "http://imgur.com/1eo74Yu.jpg#puppies" ], "descriptions":[ "Built-in stereo speakers along with omnidirectional microphone, headphone port", "APP CONTROL SYSTEM: Operate your drone through an APP after connecting the Wi-Fi to your phone (iOS or Android), offering you real-time image transmission, easy to shoot and read, fun to share", "Intel HD Graphics 5300 processor for an outstanding everyday graphics experience.", "One (1) 13 Pound Bag of Purina Cat Chow Naturals Indoor Plus Vitamins and Minerals", "Natural Fiber Blend Helps Control Hairballs", "Eight vivid fashion color options with color-matching earbuds and cords (color-matching for iPod Nano 5th generation)" ], "price":5239.56, "shipping":0, "prime":true, "in_stock":8, "rating":1.5, "review":6283, "brand":"Patagonia" } ]
var tpl = require('./a.atpl'); console.log(tpl({ a: ['a', 'b', 'c'] }));
import test from 'blue-tape'; import MySQLSink from '../lib/MySQLWriteStream'; import config from './test.config'; import fs from 'fs'; import knex from 'knex'; import inferSchema from '../lib/util/inferSchema'; import _ from 'highland'; // test('proper configuration', t => { // t.equal(MySQLSource.props.name, require('../package.json').name); // t.equal(MySQLSource.props.version, require('../package.json').version); // t.end(); // }); test('test inserts data', async t => { return new Promise(async (resolve, reject) => { const readStream = fs.createReadStream('./test/fixtures/test-json-data.json'); const incomingSchema = await inferSchema(readStream, [], true); const anotherReadStream = fs.createReadStream('./test/fixtures/test-json-data.json', 'utf-8'); const highlandStream = _(anotherReadStream) .split() .errors(err => {}); const sink = new MySQLSink(incomingSchema, config); sink.on('finish', () => { t.comment('write stream finished'); resolve(); }); sink.on('error', error => { console.log(error); }); highlandStream.pipe(sink); }); });
import React, { useEffect, useState } from "react"; import { Redirect } from "react-router-dom"; import { token$, updateToken } from "../store/authToken"; import { parseQueryString } from "../utils"; const LoginDone = () => { let [token, update] = useState(token$.value); useEffect(() => { let subscription = token$.subscribe(token => { update(token); }); updateToken(parseQueryString(window.location.hash).access_token); return () => { subscription.unsubscribe(); }; }, []); if (token) { return <Redirect to={"/"} />; } return ( <> <img src="https://www.mktv.mx/wp-content/uploads/2017/07/letter_sending.gif" width={400} alt="Dropbox Logo" /> </> ); }; export default LoginDone;
/* If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Finish the solution so that it returns the sum of all the multiples of 3 or 5 below the number passed in. Note: If the number is a multiple of both 3 and 5, only count it once. Courtesy of ProjectEuler.net */ // I'm sure there's a long way and a short way to do this. I'd like to do it the short way. // Long way I see is to create an array of every number below number, get rid of any that aren't multiples of three or five using modulus, then reduce them all. // Gotta be a faster way than that. // Make sure not to include number itself in the array, since the instructions are asking for everything BELOW number. function solution(number){ var arr = []; for (var i = 3; i < number; i++) { if (i % 3 === 0 || i % 5 === 0) { arr.push(i); } } var final = 0; if (arr[0]) { final = arr.reduce((a, b) => a + b) } return final; }
import React from 'react'; import './SendMoneyToCardForm.css'; import { Form, Input, Button, Select } from 'antd'; import { currencyCode } from '../../utils/moneyUtils'; const Option = Select.Option; class SendMoneyToCardForm extends React.Component { onSubmit = e => { e.preventDefault(); this.props. form .validateFields() .then(f => this.props.onSendMoneySubmit(f)); } render() { const { getFieldDecorator } = this.props.form; return ( <Form className="send-money-form" onSubmit={this.onSubmit}> <Form.Item> { getFieldDecorator('toCardNumber', { rules: [{ required: true, message: 'Please input card valid destination number' }] })( <Input placeholder="Input destination card number" /> ) } </Form.Item> <Form.Item> {getFieldDecorator('currency', { rules: [{ required: true, message: 'Please input choose devilery type' }], })( <Select showSearch placeholder="Select currency" optionFilterProp="children" > <Option value={currencyCode.UAH}>{currencyCode.UAH}</Option> <Option value={currencyCode.USD}>{currencyCode.USD}</Option> </Select> )} </Form.Item> <Form.Item> { getFieldDecorator('amount', { rules: [{ required: true, message: 'Please input amount' }] })( <Input type="number" placeholder="Input amount" /> ) } </Form.Item> <Form.Item> <Button htmlType="submit" type="primary">Send</Button> </Form.Item> </Form> ); } } export default Form.create()(SendMoneyToCardForm);
const express = require('express'); const mongoose = require('mongoose'); const satAuth = require('./authentication').authLayer; const init = require('./initalize'); // Routers const userRoutes = require('./json/users'); const nomineeRoutes = require('./json/nominees'); const campRoutes = require('./json/camps'); const actionRoutes = require('./json/actions'); const loginRoute = require('./authentication').loginRoute; // Statics const jsonApiName = process.env.API_NAME ||'satsuma' ; const port = process.env.PORT || 3000; const mongoDBAdress = process.env.DB_ADRESS || 'mongodb://localhost/satsuma'; // Express const app = express(); // ----------- // Layers // ----------- // Static Layer app.use(express.static('static')); // Frontend check layer app.get('/', (req, res) => { res.send('index.html missing (upload satıh angular project).'); }); // Json Parse Layer app.use(`/${jsonApiName}`, express.json()); // Nomination Layer app.use(`/${jsonApiName}`, nomineeRoutes); // Auth layer app.use(`/${jsonApiName}`, loginRoute); app.use(satAuth); // Route Layer app.use(`/${jsonApiName}`, userRoutes); app.use(`/${jsonApiName}`, campRoutes); app.use(`/${jsonApiName}`, actionRoutes); // Error Layer app.use((err, req, res, next) => { console.log(err.message); if(!err.statusCode) err.statusCode = 500; return res.status(err.statusCode).json({statusCode: err.statusCode, error: err.message}); }); // MongoDB mongoose.connect(mongoDBAdress); // Init Code if(process.env.INIT) { console.log('Initializing satsuma backend...'); init(); } // Server Startup app.listen(port, () => { console.log(`Listenting on port ${port}`); })
// JavaScript Document <!--豪华游艇--> function setTabHAO(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i); var con = document.getElementById("con_" + name + "_" + i); menu.className = i == cursel ? "hover" : ""; con.style.display = i == cursel ? "block" : "none"; //$('#nei_box').equalHeights(); } P7_equalCols('nei_left', 'nei_right') lineheight(); } function setTabB(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i); var con = document.getElementById("con_" + name + "_" + i); menu.className = i == cursel ? "Linte" : ""; con.style.display = i == cursel ? "block" : "none"; //$('#nei_box').equalHeights(); } /*P7_equalCols('nei_left', 'nei_right') lineheight();*/ } <!--帆船--> function setTabFAN(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i); var con = document.getElementById("con_" + name + "_" + i); menu.className = i == cursel ? "hover" : ""; con.style.display = i == cursel ? "block" : "none"; //$('#nei_box').equalHeights(); } P7_equalCols('nei_left', 'nei_right') lineheight(); } function setTabB(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i); var con = document.getElementById("con_" + name + "_" + i); menu.className = i == cursel ? "Linte" : ""; con.style.display = i == cursel ? "block" : "none"; //$('#nei_box').equalHeights(); } /* P7_equalCols('nei_left', 'nei_right') lineheight();*/ } <!--拼船--> function setTabPIN(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i); var con = document.getElementById("con_" + name + "_" + i); menu.className = i == cursel ? "hover" : ""; con.style.display = i == cursel ? "block" : "none"; //$('#nei_box').equalHeights(); } P7_equalCols('nei_left', 'nei_right') lineheight(); } function setTabB(name, cursel, n) { for (i = 1; i <= n; i++) { var menu = document.getElementById(name + i); var con = document.getElementById("con_" + name + "_" + i); menu.className = i == cursel ? "Linte" : ""; con.style.display = i == cursel ? "block" : "none"; //$('#nei_box').equalHeights(); } P7_equalCols('nei_left', 'nei_right') lineheight(); }
var config = { apiKey: "AIzaSyBdfcvDs20C83am7k39wk6yK1VADvixnCc", authDomain: "brawl-live.firebaseapp.com", databaseURL: "https://brawl-live.firebaseio.com", projectId: "brawl-live", storageBucket: "brawl-live.appspot.com", messagingSenderId: "473229450954", appId: "1:473229450954:web:cfc6f24208493369" }; firebase.initializeApp(config); var server; function createServer(serverId, mapId) { firebase.database().ref('servers/' + serverId).set({ "map": { "mapId": mapId, "tiles" :MAPS[mapId].tiles, "mapAdds" :MAPS[mapId].adds, "mapCollision" :MAPS[mapId].collision, }, "serverId": serverId, "players": {}, "nextPlayerId":0, "attacks":{ "placeholder":"placeholder" }, }); joinServer(serverId); } function setServer(serverId){ //set the server variable server = new Server(serverId) //console.log(server, 'setServer() - 1') let serverRef = firebase.database().ref('servers/'+serverId); serverRef.once("value", function(snapshot){ //console.log(snapshot.val(), 2) server.setMap(snapshot.val()["map"]["mapId"]) //console.log(snapshot) /* if(typeof snapshot.val()["players"] !== 'undefined'){ console.log("initializing players list") for(let i in snapshot.val()["players"]){ let tempPlayer = new Player(1) server.players.push(tempPlayer) console.log("server.players") //snapshot.val()["players"][i] } }else{ console.log("players doesn't exist") }*/ }); let playerRef = firebase.database().ref('servers/' + serverId + "/players") playerRef.on('child_changed', function(data){ //console.log("changed", data.val()["playerName"]) //use forEach() for this! ---important--- let newPlayer = data.val()["playerName"]; let changedPlayer = server.players[data.val()["playerName"].id]; changedPlayer.x = newPlayer.x; changedPlayer.y = newPlayer.y; changedPlayer.image = newPlayer.image; changedPlayer.frameX = newPlayer.frameX; changedPlayer.cooldownEffects = newPlayer.cooldownEffects; changedPlayer.health = newPlayer.health; //console.log('CHANGED') }); playerRef.on('child_removed', function(data){ console.log('player removed') server.players.splice(data.val().id, 1) if(data.val().id < server.playerId){ server.playerId -= 1 } firebase.database().ref('servers/'+server.serverId).update({ nextPlayerId: server.players.length }) }); playerRef.on('child_added', function(data){ console.log(data.val()["playerName"]["num"]) console.log('player added') let tempPlayer = new Player(1); server.players.push(tempPlayer) firebase.database().ref('servers/'+server.serverId).update({ nextPlayerId: server.players.length }) }); let attackRef = firebase.database().ref('servers/'+serverId+"/attacks") attackRef.on('child_added', function(data){ if(data.val() !== "placeholder"){ d = data.val()["Attack"] game.attacks.push(playerAttacks[d.num][d.type](d.x, d.y, d.rotation, d.player,0, d.pKey)) console.log(d.pKey, game.attacks[game.attacks.length-1].pKey) } }); } function updatePlayer(){ firebase.database().ref('servers/'+server.serverId+'/players/'+server.playerKey+'/playerName').update({ x:server.players[server.playerId].x, y:server.players[server.playerId].y, image:server.players[server.playerId].image, frameX:server.players[server.playerId].frameX, cooldownEffects:server.players[server.playerId].cooldownEffects, health:server.players[server.playerId].health, id:server.playerId }) } function joinServer(serverId){ setServer(serverId); mid.innerHTML = "connected to: " + serverId //console.log(server, 'joinServer()') //let defName = "p"+server.players.length.toString() let tempPlayerID = -1 firebase.database().ref('servers/'+serverId).once("value", function(snapshot){ tempPlayerID = snapshot.val()["nextPlayerId"]; server.playerId = tempPlayerID }); server.playerKey = firebase.database().ref('servers/'+serverId+'/players').push({ "playerName":new Player(1, server.players.length) }).key server.playerId = server.players.length-1 firebase.database().ref('servers/'+serverId+'/players/'+server.playerKey+'/playerName').update({ id:server.playerId }) game.switchState(4) } function removeAttack(key){ firebase.database().ref('servers/'+server.serverId+'/attacks/'+key).remove() } function sendAttack(player, type, rotation){ let key1 = firebase.database().ref('servers/'+server.serverId+'/attacks').push({ "Attack":{ num:player.num, type:type, x:player.x+player.width/2, y:player.y+player.height/2, rotation:rotation, player:{ x:player.x, y:player.y, width:player.width, height:player.height, }, pKey:server.playerKey } }).key; return key1; }
/* eslint-disable max-len */ import UrlParser from '../../routes/url-parser'; import TheRestaurantDbSource from '../../data/therestaurantdb-source'; import { createRestaurantDetailTemplate, createRestaurantImageTemplate, createRestaurantCategoriesTemplate, createRestaurantReviewsTemplate, } from '../templates/template-creator'; // import LikeButtonInitiator from '../../utils/like-button-initiator'; import LikeButtonPresenter from '../../utils/like-button-presenter'; import FavoriteRestaurantIdb from '../../data/favoriterestaurant-idb'; const Detail = { async render() { return ` <div class="latest"> <h1 class="latest__label">Detail Restaurant</h1> </div> <div class="loader"></div> <div class="movie"> <div id="restaurantImage"></div> <div id="likeButtonContainer"></div> <h2 class="movie__title">Categories</h2> <div id="restaurantCategories"></div> <div id="restaurantDetail"></div> <h2>Reviews</h2> <div id="restaurantReviews"></div> </div> `; }, async afterRender() { const url = UrlParser.parseActiveUrlWithoutCombiner(); const restaurantDetail = await TheRestaurantDbSource.detailRestaurant(url.id); const restaurantContainer = document.querySelector('#restaurantDetail'); const restaurantImagesContainer = document.querySelector('#restaurantImage'); const restaurantCategoriesContainer = document.querySelector('#restaurantCategories'); const restaurantReviewsContainer = document.querySelector('#restaurantReviews'); const meals = Object.values(restaurantDetail.restaurant.menus.foods).map((food) => food.name); const drinks = Object.values(restaurantDetail.restaurant.menus.drinks).map((drink) => drink.name); restaurantImagesContainer.innerHTML = createRestaurantImageTemplate(restaurantDetail.restaurant); restaurantDetail.restaurant.categories.forEach((categories) => { restaurantCategoriesContainer.innerHTML += createRestaurantCategoriesTemplate(categories); }); restaurantContainer.innerHTML = createRestaurantDetailTemplate(restaurantDetail.restaurant, meals, drinks); restaurantDetail.restaurant.customerReviews.forEach((reviews) => { restaurantReviewsContainer.innerHTML += createRestaurantReviewsTemplate(reviews); }); LikeButtonPresenter.init({ likeButtonContainer: document.querySelector('#likeButtonContainer'), favoriteRestaurants: FavoriteRestaurantIdb, restaurant: { id: restaurantDetail.restaurant.id, name: restaurantDetail.restaurant.name, description: restaurantDetail.restaurant.description, pictureId: restaurantDetail.restaurant.pictureId, city: restaurantDetail.restaurant.city, rating: restaurantDetail.restaurant.rating, }, }); }, }; export default Detail;
import React, { Component, PureComponent } from 'react'; import logo from './logo.svg'; import './App.css'; class App extends Component { constructor(props) { super(props); this.veryNestedObject = { child: { } }; let ref = this.veryNestedObject.child; this.startTime = (new Date()).getTime(); console.log('started', this.startTime); for (var i = 0; i < 1500; i++) { ref["text1"] = '1fasd fasd f | '; ref["child"] = { }; ref = ref.child; } console.log('mapping end elapsed', (new Date()).getTime() - this.startTime); //console.log(this.veryNestedObject); this.state = { counter : 0 } } render() { console.log('render start elapsed', (new Date()).getTime() - this.startTime); return ( <div className="App"> <header className="App-header"> <img src={logo} className="App-logo" alt="logo" /> <h1 className="App-title">Welcome to React</h1> </header> <div style={{ display: 'flex' }} className="App-intro"> <div style={{ flexBasis: '50%' }}> {(this.state.counter % 2 == 1) && <ChildComponent data={this.veryNestedObject.child} />} </div> <div onClick={this.onClickHandler}> {this.state.counter} </div> </div> </div> ); } onClickHandler = () => { this.setState({ counter: this.state.counter + 1}); } } class ChildComponent extends Component { render() { return ( <span> <span> {this.props.data.text1} </span> { this.props.data.child.hasOwnProperty('child') && <ChildComponent data={this.props.data.child} /> } </span> ); } } const StatelessChild = ({ data }) => { return ( <span> <span> {data.text1} </span> { data.child.hasOwnProperty('child') && <StatelessChild data={data.child} /> } </span> ); } export default App;
import React, {Component} from 'react'; import {View, Text, Image, ImageBackground, Dimensions, ScrollView, Platform} from 'react-native'; import { Button, Badge, Avatar } from 'react-native-elements'; import ActivityTile from './common/ActivityTile'; import MessageComponent from './common/MessageComponent'; import EventTile from './common/EventTile'; import Footer from './common/Footer'; import Header from './common/Header'; let {width, height} = Dimensions.get('window'); class MainScreen extends Component { constructor(){ super() this.state={ showHeader: false, activities: [ { id: '0', title: 'Aljanadriyah Festival', subTitle: '3 Tickets Remaining', image: require('../src/images/festival.jpeg') }, { id: '1', title: 'Riyadh Party', subTitle: '3 Tickets Remaining', image: require('../src/images/party.jpeg') }, { id: '2', title: 'Aljanadriyah Festival', subTitle: '3 Tickets Remaining', image: require('../src/images/festival.jpeg') }, { id: '3', title: 'Riyadh Party', subTitle: '3 Tickets Remaining', image: require('../src/images/party.jpeg') }, ] } } renderActivities() { return this.state.activities.map( item => { console.log(item) return ( <ActivityTile key={item.id} title={item.title} subTitle={item.subTitle} imageSrc={item.image} /> ) }) } render() { let {sectionContainer, sectionTitleContainer, headerImage, contentContainer, headerBange, headerIconsContainer, headerIcon, headerTitle, sectionTitle, badgeContainer, eventsSectionContainer, eventsSectionRow, sliderContainer } = styles; return ( <View> <View style={contentContainer}> <ScrollView onScroll={(event) => { this.setState({ showHeader: event.nativeEvent.contentOffset.y >= height*0.25 }) }} > <View style={[ sectionContainer, { height: height*0.25, } ]}> <ImageBackground style={headerImage} resizeMode={'stretch'} source={require('./images/dubai_night.jpg')} > <View style={{ flexDirection: 'row', justifyContent: 'space-between', }}> <View style={{ flex: 1, alignItems: 'flex-start' }}> <View style={headerBange}> <Text style={{ color: '#fff', fontSize: 14, }}> Change City </Text> </View> </View> <View style={headerIconsContainer}> <Image style={headerIcon} source={require('../src/images/icons/mapIcnWhite.png')} /> <Image style={headerIcon} source={require('../src/images/icons/searchIcnWhite.png')} /> </View> </View> <View style={{ justifyContent: 'flex-start' }}> <Text style={headerTitle}> Dubai </Text> </View> </ImageBackground> </View> <View style={[ sectionContainer, { height: height*0.35, } ]}> <View style={sectionTitleContainer}> <View style={sectionTitle}> <Text style={{ color: '#888b90' }}> What is in Dubai </Text> </View> <View style={badgeContainer}> <Badge containerStyle={{ backgroundColor: '#22799e' }}> <Text style={{ color: '#fff', fontSize: 12, }}> Hotels </Text> </Badge> </View> </View> <View style={eventsSectionContainer}> <View style={eventsSectionRow}> <EventTile title={'Entertainment'} iconSrc={require('../src/images/icons/tourIcn.png')} imageSrc={require('../src/images/party.jpeg')} /> <EventTile title={'Events'} iconSrc={require('../src/images/icons/eventIcn.png')} imageSrc={require('../src/images/events.jpg')} /> <EventTile title={'Restaurants'} iconSrc={require('../src/images/icons/restIcn.png')} imageSrc={require('../src/images/restaurants.jpg')} /> </View> <View style={eventsSectionRow}> <EventTile title={'Breackfast'} iconSrc={require('../src/images/icons/burger-icon-white.png')} imageSrc={require('../src/images/breackfast.jpg')} /> <EventTile title={'masajid'} iconSrc={require('../src/images/icons/masjidIcn.png')} imageSrc={require('../src/images/masajid.jpg')} /> <EventTile title={'Coffe Cup'} iconSrc={require('../src/images/icons/coffeeIcn.png')} imageSrc={require('../src/images/coffe.jpg')} /> </View> </View> </View> <View style={[ sectionContainer, { backgroundColor: '#f6f6f6', height: height*0.35, } ]}> <View style={[ sectionTitleContainer, { height: 40 } ]}> <View style={sectionTitle}> <Text style={{ color: '#888b90' }}> Active now in your city </Text> </View> </View> <View style={sliderContainer}> <ScrollView horizontal={true} style={{flex:1}}> { this.renderActivities() } </ScrollView> </View> </View> <View style={{ backgroundColor: "#f6f6f6", flex: 1, width: width }}> <View style={sectionTitleContainer}> <View style={sectionTitle}> <Text style={{ color: '#888b90' }}> People in your city </Text> </View> </View> <MessageComponent /> <MessageComponent image={require('../src/images/party.jpeg')} /> <MessageComponent /> </View> </ScrollView> </View> <Header display={this.state.showHeader}/> <Footer /> </View> ) } } const styles = { sectionContainer: { width: width, height: height*0.3, justifyContent: 'center', alignItems: 'center' }, sectionTitleContainer: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-end', height: 50, paddingLeft: 30, paddingRight: 30, paddingBottom: 10, }, tileImageStyle: { margin: 4, width: width*0.28, height: width*0.18, borderRadius: 12 }, contentContainer: { height: height-100, width: width, margin: 0, padding: 0, justifyContent: 'flex-start', alignItems: 'center' }, headerImage: { width: width, height: height*0.25, padding: 20, justifyContent: 'space-between' }, headerBange: { borderRadius: 12, borderColor: '#fff', borderWidth: 1, padding: 2, paddingLeft: 10, paddingRight: 10, }, headerIconsContainer: { width: width*0.15, justifyContent: 'space-between', alignItems: 'center', flexDirection: 'row' }, headerIcon: { width: 20, height: 20, }, headerTitle: { color: '#fff', fontSize: 38, fontWeight: '500' }, sectionTitle: { flex: 1, justifyContent: 'flex-start', alignItems: 'flex-start' }, badgeContainer: { flex: 1, justifyContent: 'flex-start', alignItems: 'flex-end' }, eventsSectionContainer: { flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', flexWrap: 'wrap', width: width, paddingLeft: 20, paddingRight: 20, }, eventsSectionRow: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', }, sliderContainer: { flexDirection: 'row', flex: 1, paddingBottom: 5, paddingLeft: 15 } } export default MainScreen;
import React, { Component } from 'react'; import { AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip, } from 'recharts'; class gaschart extends Component { formatData() { var fromData = {} var valData = {}; var toData = {}; fromData['name'] = this.props.apiFuelData.data.from; valData['name'] = ''; toData['name'] = this.props.apiFuelData.data.to; console.log(this.props.apiFuelData); this.props.apiFuelData.data.generationmix.forEach(function (index) { if (index.fuel == 'gas') { valData[index.fuel] = index.perc; fromData[index.fuel] = ''; toData[index.fuel] = ''; } }); let frdata = [fromData, fromData, valData, toData]; return frdata; } render() { return ( <div> <AreaChart width={500} height={400} data={this.formatData()} margin={{ top: 10, right: 30, left: 0, bottom: 0, }} > <CartesianGrid strokeDasharray="3 3" /> <XAxis dataKey="name" /> <YAxis /> <Tooltip /> <Area type="monotone" dataKey="gas" stackId="1" stroke="#e29366" fill="#e29366" /> </AreaChart> </div> ); } } export default gaschart;
const db = require("../models") const Client = db.client exports.create = (req, res) => { if (!req.body.name) { res.status(400).send({ message: "name can not be empty!" }) return } const client = new Client({ name: req.body.name, birthDate: req.body.birthdate, lastName: req.body.lastName, nationalId: req.body.nationalId, email: req.body.email, type: req.body.birthDate || "lead" }) client .save(client) .then((data) => { res.send(data) }) .catch((err) => { res.status(500).send({ message: err.message || "Some error occurred while saving the user task.", }) }) } exports.findAll = (req, res) => { Client.find({}) .then((data) => { res.send(data) }) .catch((err) => { res.status(500).send({ message: err.message || "Some error occurred while retrieving Catalog.", }) }) } exports.findLead = (req, res) => { Client.find({type: "lead" }) .then((data) => { res.send(data) }) .catch((err) => { res.status(500).send({ message: err.message || "Some error occurred while retrieving Catalog.", }) }) } exports.findProspect = (req, res) => { Client.find({type: "prospect" }) .then((data) => { res.send(data) }) .catch((err) => { res.status(500).send({ message: err.message || "Some error occurred while retrieving Catalog.", }) }) } exports.findOne = (req, res) => { const id = req.params.id Client.findById(id) .then((data) => { if (!data) res.status(404).send({ message: "Not found Sale with id " + id }) else res.send(data) }) .catch((err) => { res.status(500).send({ message: "Error retrieving Sale with id=" + id }) }) } exports.update = (req, res) => { if (!req.body) { return res.status(400).send({ message: "Data to update can not be empty!", }) } const id = req.params.id Client.findByIdAndUpdate(id, req.body, { useFindAndModify: false }) .then((data) => { if (!data) { res.status(404).send({ message: `Cannot update client with id=${id}. Maybe client was not found!`, }) } else res.send({ message: "client was updated successfully." }) }) .catch((err) => { res.status(500).send({ message: "Error updating client with id=" + id, }) }) } exports.delete = (req, res) => { const id = req.params.id Client.findByIdAndRemove(id, { useFindAndModify: false }) .then((data) => { if (!data) { res.status(404).send({ message: `Cannot delete Client with id=${id}. Maybe Client was not found!`, }) } else { res.send({ message: "Client was deleted successfully!", }) } }) .catch((err) => { res.status(500).send({ message: "Could not delete Client with id=" + id, }) }) }
let playerList = []; axios({ method: "GET", url: "https://5e9829e75eabe7001681bbfb.mockapi.io/player", }) .then((res) => { playerList = res.data; renderLayout(playerList); console.log(playerList); }) .catch((err) => { console.log({ ...err }); }); const renderLayout = (list) => { var content = ""; for (let i = 0; i < list.length; i++) { let playerItems = list[i]; content += ` <div class="card-item"> <div class="item-img"> <img src="${playerItems.avatar}" alt=""> </div> <div class="item-text"> <h3 class="name">${playerItems.name}</h3> <p class="position">${playerItems.position}</p> <div class="nation"> <img src="${playerItems.nation}" alt=""> </div> <span class="title--ovr">OVR: <span class="ovr">${ playerItems.ovr }</span></span> <span class="title--sta">STA: <span class="sta">${ playerItems.sta }</span></span> <p class="stars">${createStar(playerItems.rating)}</p> </div> </div> `; } document.getElementById("listPlayerContent").innerHTML = content; }; const createStar = (rating) => { if (rating > 5) rating = 5; let content = ""; for (let i = 0; i < rating; i++) { content += `<i class="fa fa-star text-warning"></i>`; } for (let i = 0; i < 5 - rating; i++) { content += `<i class="far fa-star text-warning"></i>`; } return content; }; const addPlayer = () => { var id = parseInt(document.getElementById("txtID").value); var name = document.getElementById("txtName").value; var avatar = document.getElementById("txtAvatar").value; var ovr = parseInt(document.getElementById("txtOvr").value); var stamina = parseInt(document.getElementById("txtStamina").value); var nation = document.getElementById("txtNation").value; var position = document.getElementById("txtPosition").value; var rating = parseInt(document.getElementById("txtRating").value); const newPlayer = new Player( id, name, avatar, ovr, stamina, nation, position, rating ); axios({ method: "POST", url: "https://5e9829e75eabe7001681bbfb.mockapi.io/player", data: newPlayer, }) .then((res) => { console.log(res); resetField(); }) .catch((err) => { console.log({ ...err }); }); }; const resetField = () => { document.getElementById("txtID").value = ""; document.getElementById("txtName").value = ""; document.getElementById("txtAvatar").value = ""; document.getElementById("txtOvr").value = ""; document.getElementById("txtStamina").value = ""; document.getElementById("txtNation").value = ""; document.getElementById("txtPosition").value = ""; document.getElementById("txtRating").value = ""; document.getElementById("close").click(); renderLayout(playerList); };
const assertEqual = require('./assertEqual'); // const assertEqual = function(actual, expected) { // if (actual === expected) { // console.log(`These two arguemnts are the same: ${actual} vs ${expected}`); // } else { // console.log(`These two arguemnts are NOT the same: ${actual} vs ${expected}`); // } // }; const tail = function(array) { const newArray = array.slice(1); return newArray; }; module.exports = tail;
import React from 'react'; import Styled from 'styled-components/native'; import TodoListView from './TodoListView'; import AddTodo from './AddTodo'; const Container = Styled.View` flex: 1; `; const Todo = () => { return ( <Container> <TodoListView /> <AddTodo /> </Container> ); }; export default Todo;
import React from 'react'; import { ModalContext } from "../Context/ModalContext"; import './Photo.css'; function Photo(props) { let { handleModal } = React.useContext(ModalContext); return ( <div className="Photo"> <img src={props.url} alt={'image-' + props.id} onClick={() => handleModal(props.id)}/> </div> ); } export default Photo;
window.addEventListener('DOMContentLoaded', () => { let monthBlock = document.getElementById('month'), yearBlock = document.getElementById('yearBlock'), calendarBlock = document.getElementById('calendar'); /** * class Calendar */ class Celendar { /** * All name of month in rus lang * * @type {string[]} */ rusMonth = ['Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь']; /** * All name of month in eng lang * * @type {string[]} */ //engMonth = ["January","February","March","April","May","June","July", "August","September","October","November","December"]; daysBlock = document.getElementsByClassName('day'); forWeeks = []; constructor(date, month, year) { this.date = date; this.month = month; this.year = year; } nextMonth() { this.month++; if(this.month > 11){ this.year++; this.month = 0; } return this; } prevMonth () { this.month--; if(this.month < 0){ this.year--; this.month = 11; } return this; } getMonth() { return this.rusMonth[this.month]; } getYear() { return this.year; } prevMonthDays() { this.date.setFullYear(this.year, this.month, 1); let emptyDay = this.date.getDay()-1; if(emptyDay <= 0){ emptyDay = 6; } let daysInPrevMonth = new Date(this.year, this.month, 0).getDate(); for (let i = daysInPrevMonth - emptyDay+1; i <= daysInPrevMonth; i++) { this.forWeeks.push(i); } } daysCounter() { this.prevMonthDays(); let daysInMonth = new Date(this.year, this.month+1, 0).getDate(); for (let i = 1; i <= daysInMonth; i++) { this.forWeeks.push(i); } this.nextMonthDays(); } showDays() { this.daysCounter(); let i = 0; while (i < this.daysBlock.length) { this.daysBlock[i].innerText = this.forWeeks[i]; i++; } } nextMonthDays() { let length = this.daysBlock.length - this.forWeeks.length; let i = 1; let lastDay = this.forWeeks[this.forWeeks.length -1]; while (i <= length) { this.forWeeks.push(new Date(this.year, this.month, lastDay+i).getDate()); i++; } } } const date = new Date(); let celendar = new Celendar(date, date.getMonth(), date.getFullYear()); calendarBlock.addEventListener('click', (event) => { switch (event.target.id) { case 'nextMonth': celendar = new Celendar(date, date.getMonth(), date.getFullYear()); celendar.nextMonth().showDays(); yearBlock.innerText = celendar.getYear(); monthBlock.innerText = celendar.getMonth(); break; case 'prevMonth': celendar = new Celendar(date, date.getMonth(), date.getFullYear()); celendar.prevMonth().showDays(); yearBlock.innerText = celendar.getYear(); monthBlock.innerText = celendar.getMonth(); break; } //console.log(event.target.id); }); celendar.showDays(yearBlock); yearBlock.innerHTML = celendar.getYear(); monthBlock.innerHTML = celendar.getMonth(); //console.log(celendar.getYear()); });
/** * @fileoverview Application server for hosting static application files and * client to client mapping actions. */ var fs = require('fs'); var path = require('path'); var http = require('http'); var sio = require('socket.io'); var url = require('url'); var mapbox = require(path.join(__dirname, 'mapbox.js')); /** * Main content handler to serve up static files. * * @param {http.ClientRequest} request The HTTP request object. * @param {http.ServerRespone} response The HTTP response object. */ function handler(request, response) { var uri = url.parse(request.url).pathname; var filename = path.join(__dirname, uri); fs.exists(filename, function(exists) { // Send a simple 404 if the file does not exist. if(!exists) { response.writeHead(404, {'Content-Type': 'text/plain'}); response.write('404 Not Found\n'); response.end(); return; } // Look for an index file if the requested path is a directory. // TODO(jordoncm): This should recheck that an index file exists and error // properly if not. Currently if the folder exists and the index.html // does not it will 500 below. if(fs.statSync(filename).isDirectory()) { filename += '/index.html'; } // Read the file and write it to the response. fs.readFile(filename, 'binary', function(err, file) { if(err) { response.writeHead(500, {'Content-Type': 'text/plain'}); response.write(err + '\n'); response.end(); return; } // TODO(jordoncm): Add proper Content-Type headers for things like CSS // and Javascript. response.writeHead(200); response.write(file, 'binary'); response.end(); }); }); } /** * The main method to execute at runtime. * * Sets up the HTTP server and turns on socket listening. */ function main() { var app = http.createServer(handler); var io = sio.listen(app); app.listen(8000); // TODO(jordoncm): To ever do this on any kind of scale you will need a // better layer of persistence for features than a simple in memory map, // but this should work for prototype purposes. var features = {}; io.sockets.on('connection', function(socket) { // Loop through features registered with the server and sync it to the new // client. for(var i in features) { socket.emit(mapbox.Topics.FEATURE_CREATED, features[i]); } socket.on(mapbox.Topics.FEATURE_CREATED, function(data) { // Add the feature to the server side hash and notfiy all clients. features[data.id] = data; io.sockets.emit(mapbox.Topics.FEATURE_CREATED, data); }); socket.on(mapbox.Topics.FEATURE_DELETED, function(data) { // Delete the feature from the server and notify all clients. if(features[data]) { delete features[data]; io.sockets.emit(mapbox.Topics.FEATURE_DELETED, data); } }); socket.on(mapbox.Topics.FEATURE_EDITED, function(data) { // Update the feature with the server and notify all clients. if(features[data.id]) { features[data.id] = data; io.sockets.emit(mapbox.Topics.FEATURE_EDITED, data); } }); }); } main();
const Entry = require('../../models/entry'); const router = require('express').Router(); // need to make sure entries get added to users array var date = new Date(); router.post('/', (req, res, next) => { if (req.user) { var history = []; for (i = req.user.entries.length-1 ; i >= 0; --i) { if (req.user.entries[i].date.getTime() !== new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime()) { history.push(req.user.entries[i]); } } res.send({entries: history, reqs: req.user.requirements[0], name: req.user.firstname}); } else { res.send({}); } }); module.exports = router;
// Task 0.7 function toCelsius(temp) { const celsius = (temp - 32) * 5 / 9; return celsius; } console.log(toCelsius(32) + 'C'); function toFahrenheit(temp) { const fahrenheit = (temp * 9 / 5) + 32; return fahrenheit; } console.log(toFahrenheit(0) + 'F');
"use strict"; var tnt = {}; tnt.track = require('./track'); tnt.utils = {}; tnt.utils.api = require("../utils/api"); tnt.track.data = function() { var track_data = function () { }; // Getters / Setters tnt.utils.api (track_data) .getset ('label', "") .getset ('elements', []) .getset ('update', function () {}); // The retrievers. They need to access 'elements' tnt.track.retriever = {}; tnt.track.retriever.sync = function() { var update_track = function(obj) { // Object has a location and a plug-in defined callback track_data.elements(update_track.retriever()(obj.loc)); obj.on_success(); }; tnt.utils.api (update_track) .getset ('retriever', function () {}) return update_track; }; tnt.track.retriever.async = function () { var url = ''; var update_track = function (obj) { d3.json(url, function (err, resp) { track_data.elements(resp); obj.on_success(); }); }; tnt.utils.api (update_track) .getset ('url', ''); return update_track; }; tnt.track.retriever.ensembl = function() { var success = [function () {}]; var endpoint; var eRest = require('biojs-rest-ensembl'); //Check if it is really working that way! var update_track = function(obj) { // Object has loc and a plug-in defined callback var loc = obj.loc; var plugin_cbak = obj.on_success; eRest.call({url : eRest.url[update_track.endpoint()](loc), success : function (resp) { track_data.elements(resp); // User-defined for (var i=0; i<success.length; i++) { success[i](resp); }; // Plug-in defined plugin_cbak(); } }); }; tnt.utils.api(update_track) .getset('endpoint'); // TODO: We don't have a way of resetting the success array // TODO: Should this also be included in the sync retriever? // Still not sure this is the best option to support more than one callback update_track.success = function (callback) { if (!arguments.length) { return success; } success.push(callback); return update_track; }; return update_track; }; return track_data; }; // A predefined track for genes tnt.track.data.gene = function () { var track = tnt.track.data(); // .index("ID"); var updater = tnt.track.retriever.ensembl() .endpoint("region") // TODO: If success is defined here, means that it can't be user-defined // is that good? enough? API? // UPDATE: Now success is backed up by an array. Still don't know if this is the best option .success(function(genes) { for (var i = 0; i < genes.length; i++) { if (genes[i].strand === -1) { genes[i].display_label = "<" + genes[i].external_name; } else { genes[i].display_label = genes[i].external_name + ">"; } } }); return track.update(updater); } // A predefined track displaying no external data // it is used for location and axis tracks for example tnt.track.data.empty = function () { var track = tnt.track.data(); var updater = tnt.track.retriever.sync(); track.update(updater); return track; }; module.exports = exports = tnt.track.data;
var namespace_mikkeo_1_1_colour = [ [ "HSBColor", "struct_mikkeo_1_1_colour_1_1_h_s_b_color.html", "struct_mikkeo_1_1_colour_1_1_h_s_b_color" ] ];
const rateLimit = require('express-rate-limit'); const slowDown = require('express-slow-down'); // Limiters for api/users const userRateLimiter = rateLimit({ windowMs: 15 * 60 * 1000, max: 5, message: { msg: 'Too many requests, please try again later' } }); const userSlowDown = slowDown({ windowMs: 15 * 60 * 1000, delayAfter: 1, delayMs: 300 }); // Limiters for api/auth const loginRateLimiter = rateLimit({ windowMs: 15 * 60 * 1000, max: 5, message: { msg: 'Too many attempts, please try again later' } }); const loginSlowDown = slowDown({ windowMs: 15 * 60 * 1000, delayAfter: 1, delayMs: 300 }); const getUserSlowDown = slowDown({ windowMs: 5 * 60 * 1000, delayAfter: 10, delayMs: 100, maxDelayMs: 1000 }); module.exports = { userRateLimiter, userSlowDown, loginRateLimiter, loginSlowDown, getUserSlowDown };
const chatForm = document.getElementById('chat-form'); const roomName = document.getElementById('room-name'); const userList = document.getElementById('users'); // We use query selector to select the class from the dom. const chatMessages = document.querySelector('.chat-messages'); const socket = io(); // Using qs (query string) library to get username and room from URL. const {username, room} = Qs.parse(location.search, { ignoreQueryPrefix: true }); console.log(username, room); // When user joins chatroom socket.emit('joinRoom', {username, room}); // Get userlist and room name from server socket.on('roomUsers', ({room, users}) => { console.log(users, room); outputRoom(room); outputUserList(users); }); // message from server socket.on('message', message => { outputMessage(message); // Scroll down New message chatMessages.scrollTop = chatMessages.scrollHeight; }); // Message submit chatForm.addEventListener('submit', (e) => { e.preventDefault(); // get message text const msg = e.target.elements.msg.value; // Emit message to server socket.emit('chatMessage',msg); // After emiting chat message to the server, clear the input. e.target.elements.msg.value = ''; e.target.elements.msg.focus(); }); // To render messages in dom function outputMessage(message) { const div = document.createElement('div'); // classList give us the list of all the classes div.classList.add('message'); div.innerHTML = `<p class="meta">${message.username} <span>${message.time}</span></p> <p class="text"> ${message.text} </p>`; document.querySelector('.chat-messages').appendChild(div); } // To render room in dom function outputRoom(room) { roomName.innerHTML = room; } // To Display userList in dom function outputUserList(users) { userList.innerHTML = ` ${users.map(user => `<li>${user.username}</li>`).join('')} `; }
import { createStore } from 'redux'; // DOM cache const resultEl = document.getElementById('result__number'); const inputEl = document.getElementById('input'); const add = document.getElementById('add'); const substract = document.getElementById('substract'); const reset = document.getElementById('reset'); const initialState = 0; function counter(state = initialState, action) { switch (action.type) { case 'ADD': if (inputEl.value !== '' && !isNaN(inputEl.value)) { console.log('es numero'); console.log(inputEl.value); return state + parseInt(inputEl.value); } case 'SUBSTRACT': if (inputEl.value !== '' && !isNaN(inputEl.value)) { return state - parseInt(inputEl.value); } case 'RESET': return 0; default: return state; } } const store = createStore(counter); function render(state) { console.log('render'); console.log(state); resultEl.innerHTML = state; input.value = ''; } store.subscribe(() => { render(store.getState()); }); add.addEventListener('click', () => { store.dispatch({ type: 'ADD' }); }); substract.addEventListener('click', () => { store.dispatch({ type: 'SUBSTRACT' }); }); reset.addEventListener('click', () => { store.dispatch({ type: 'RESET' }); });
import React, {Component} from 'react' import {MDBBox, MDBBtn, MDBCard, MDBSelect,} from 'mdbreact' import {connect} from 'react-redux' import DocumentAPI from "../../../api/documentAPI"; import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"; import {faCircle as faCircleSolid, faFile,} from "@fortawesome/pro-solid-svg-icons"; import {faCircle} from "@fortawesome/pro-light-svg-icons"; import moment from "moment-timezone"; import {toast} from "react-toastify"; class LeadDocusign extends Component { constructor(props) { super(props); let sendOptions = [] if (this.props.shift.docusign_templates !== undefined) { this.props.shift.docusign_templates.filter(template => template.client_id === this.props.lead.client_id).forEach(template => { sendOptions.push({ text: template.name, value: "" + template.id }) }) } this.state = { sendDisabled: true, selectedTemplateID: undefined, sendOptions }; } handleTemplateSelect = (values) => { const templateID = parseInt(values[0]) this.setState({ selectedTemplateID: templateID, sendDisabled: false }) } sendDocusign = () => { this.setState({sendDisabled: true}) const templateID = this.state.selectedTemplateID const docusignParams = { templateID, leadID: this.props.lead.id } DocumentAPI.sendDocusign(docusignParams).then((response) => { if (response.success === "true") { // build new envelope to put into store const selectedTemplate = this.props.shift.docusign_templates.find( template => template.id === templateID) const newEnvelope = { id: 1, name: selectedTemplate.name, sent_at: moment.utc().format("YYYY-MM-DD HH:mm:ss"), opened_at: null, completed_at: null, declined_at: null, voided_at: null } // notify user toast.success(this.props.localization.toast.docusign.sendSuccess) // set new envelope into lead store data this.props.dispatch({ type: "LEAD.DOCUSIGN.SENT", data: newEnvelope }) // enable send button this.setState({selectedTemplateID: undefined, sendDisabled: false}) } else { toast.error(this.props.localization.toast.docusign.sendError) console.log("Send Template error: ", response) } }).catch(error => { toast.error(this.props.localization.toast.docusign.sendError) console.log("Could not send template: ", error) }) } renderDocusignList = () => { const timezone = this.props.lead.details.timezone const localization = this.props.localization.interaction.docusign const items = this.props.lead.docusign.map(envelope => { return ( <MDBCard key={envelope.id} className="d-flex w-100 shadow-sm border-0 mb-2"> <MDBBox className="d-flex backgroundColorInherit skin-border-primary f-m w-100"> <div className='d-flex p-1 px-3 w-100'> <span className="fa-layers fa-fw fa-3x mt-2"> <FontAwesomeIcon icon={faCircleSolid} className="text-white"/> <FontAwesomeIcon icon={faCircle} className={"skin-primary-color"}/> <FontAwesomeIcon icon={faFile} transform={"shrink-8"} className={"darkIcon"}/> </span> <div className="d-flex p-2 flex-column text-left w-75"> <span className="f-l">{envelope.name}</span> </div> <div className="d-flex flex-column f-s justify-content-start p-2 w-25 text-right"> <span> {localization.sentAtLabel} <span className="font-weight-bold"> {moment.utc(envelope.sent_at).tz(timezone).format("MMM D")} </span>, {moment.utc(envelope.sent_at).tz(timezone).format("h:mm a z")} </span> {envelope.opened_at !== null && <span> {localization.openedAtLabel} <span className="font-weight-bold"> {moment.utc(envelope.opened_at).tz(timezone).format("MMM D")} </span>, {moment.utc(envelope.opened_at).tz(timezone).format("h:mm a z")} </span>} {envelope.completed_at !== null && <span> {localization.completedAtLabel} <span className="font-weight-bold"> {moment.utc(envelope.completed_at).tz(timezone).format("MMM D")} </span>, {moment.utc(envelope.completed_at).tz(timezone).format("h:mm a z")} </span>} {envelope.declined_at !== null && <span> {localization.declinedAtLabel} <span className="font-weight-bold"> {moment.utc(envelope.declined_at).tz(timezone).format("MMM D")} </span>, {moment.utc(envelope.declined_at).tz(timezone).format("h:mm a z")} </span>} {envelope.voided_at !== null && <span> {localization.voidedAtLabel} <span className="font-weight-bold"> {moment.utc(envelope.voided_at).tz(timezone).format("MMM D")} </span>, {moment.utc(envelope.voided_at).tz(timezone).format("h:mm a z")} </span>} </div> </div> </MDBBox> </MDBCard> ) }) return ( <MDBBox className='d-flex flex-column w-100 mb-3'> {items} </MDBBox> ) } render() { return ( <MDBBox className={this.props.active ? "d-flex w-100 flex-column bg-white f-m" : "hidden"}> <div className="d-flex w-100 justify-content-end align-items-center gray-border rounded"> <MDBSelect options={this.state.sendOptions} getValue={this.handleTemplateSelect} label={this.props.localization.interaction.docusign.templateOptionsLabel} className="w-50 mr-2" /> <MDBBtn rounded onClick={this.sendDocusign} disabled={this.state.sendDisabled} style={{maxHeight: "50px"}} > {this.props.localization.interaction.docusign.sendButton} </MDBBtn> </div> <MDBBox className="d-flex w-100 flex-column bg-white f-m"> <div className='d-flex flex-column p-1 px-3 gray-background gray-border mt-2 rounded'> <span className="f-l font-weight-bold m-2">{this.props.localization.interaction.docusign.listTitle}</span> {this.props.lead.docusign && this.renderDocusignList()} </div> </MDBBox> </MDBBox> ) } } const mapStateToProps = state => { return { localization: state.localization, lead: state.lead, shift: state.shift, user: state.user } } export default connect(mapStateToProps)(LeadDocusign)
window.onload = function(event) { resizeAll(); // Hide loading page when windows is loaded document.getElementsByClassName("loading")[0].style.display = 'none'; } window.onresize = function(event) { resizeAll(); }; function resizeAll(){ var mainWidth = document.getElementsByClassName('main-div')[0].offsetWidth; // set good width to header and footer document.getElementsByTagName('header')[0].style.width = mainWidth + "px"; document.getElementsByTagName('footer')[0].style.width = mainWidth + "px"; // set 2/12 width to papy pic document.getElementById('papy').style.width = (mainWidth/6) + "px"; var papyHeight = document.getElementById('papy').height // set vertical position of virgule-bulle according to papy pic size document.getElementById('virgule-bulle').style.top = (papyHeight * 0.4) + "px"; // set height for papy pic div document.getElementById("papy-div").style.height = papyHeight + 30 + "px";; // set loading img in the center loadingHeight = document.querySelector(".loading img").height document.querySelector(".loading img").style.marginTop = (screen.height / 2 - loadingHeight) + "px"; }
import React from 'react'; import './BlogPage.css'; import PropTypes from 'prop-types'; import ReactMarkdown from 'react-markdown' export class BlogPage extends React.Component { constructor(props) { super(props); this.state = { blogPost: [], isLoading: true, error: null }; } componentDidMount() { const { match: { params: { fileNameURL } }} = this.props; fetch(`https://peaceful-albattani-780338.netlify.app/.netlify/functions/api/getPosts/${fileNameURL}`) .then(res => res.text()) .then( (result) => { this.setState({ blogPost: result, isLoading: false }); }, (error) => { this.setState({ error }); } ) } render() { const { blogPost, isLoading, error } = this.state; if (error) { return <p>{error}</p> } return ( <div className="blogPageWrapper"> <h1>Blog page</h1> {isLoading ? <p>Loading...</p> : <ReactMarkdown>{blogPost}</ReactMarkdown> } </div> ); } } BlogPage.propTypes = { match: PropTypes.object.isRequired }; export default BlogPage;
import React, {Component} from 'react'; import withStyles from "@material-ui/core/styles/withStyles"; import ExpansionPanel from '@material-ui/core/ExpansionPanel'; import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary'; import Typography from '@material-ui/core/Typography'; import Button from '@material-ui/core/Button'; import {connect} from 'react-redux'; import {deleteQuestion, editQuestion} from "../../../../store/actions/questionActions"; import MdDeleteForever from 'react-icons/lib/md/delete-forever'; import {styles} from './testStyles-material-ui'; class Test extends Component { deleteHandler = (event, id) => { event.preventDefault(); this.props.deleteQuestion(id) }; render() { const {classes} = this.props; return ( <div className={classes.root}> <ExpansionPanel> <ExpansionPanelSummary> <Typography style={{fontSize: '20px', margin: '15px 25px 0 0'}}> {this.props.title} </Typography> <div className="buttons" style={{display: 'flex', justifyContent: 'flex-end', width: '100%'}}> <Button onClick={(event) => this.deleteHandler(event, this.props.id)} variant="fab" id="delete" > <MdDeleteForever style={{fontSize: '25px', marginLeft: '1px', marginTop: '1px'}}/> </Button> </div> </ExpansionPanelSummary> </ExpansionPanel> </div> ) } } const mapDispatchToProps = dispatch => { return { deleteQuestion: (id) => dispatch(deleteQuestion(id)), editQuestion: (data) => dispatch(editQuestion(data)) } }; export default connect(null, mapDispatchToProps)(withStyles(styles)(Test));
///TODO: REVIEW /** * @param {string} s * @param {number} k * @return {number} */ var characterReplacement = function(s, k) { var res = 0, maxCount = 0, start = 0; var counts = []; for (var i = 0; i<26; i++) counts[i] = 0; for(var i = 0; i< s.length; i++) { var index = s[i].charCodeAt(0) -65; // 'A' counts[index]++; maxCount = Math.max(maxCount, counts[index]); while(i- start + 1 - maxCount >k) { var startIndex = s[start].charCodeAt(0) - 65; --counts[startIndex]; ++start; } res = Math.max(res, i-start+1); } return res; }; console.log(characterReplacement("AABABBA", 1));
let bannerButton = document.getElementById('banner'); let serch = document.getElementById('serch'); let iconClose = document.getElementById('iconClose'); let serchContainerItems = document.getElementById('serchContainerItems'); let serchContainer = document.getElementById('serchContainer'); let serchMessage = document.getElementById('serchMessage'); let work = document.getElementById('work'); let lerning = document.getElementById('lerning'); let leng = document.getElementById('leng'); let wraperContent = document.getElementById('wraperContent'); bannerButton.addEventListener('click', () => { serch.style.visibility = ('visible'); document.body.classList.add('overflow') }) iconClose.addEventListener('click', () => { serch.style.visibility = ('hidden'); document.body.classList.remove('overflow') }) serchContainerItems.addEventListener('click', () => { serchContainer.classList.add('opacity') serchMessage.style.visibility = ('visible'); setTimeout(() => { serchContainer.classList.remove('opacity') serchMessage.style.visibility = ('hidden'); }, 1000) }) work.addEventListener('click', () => { wraperContent.style.opacity = ('0.8'); serchMessage.style.visibility = ('visible'); setTimeout(() => { wraperContent.style.opacity = ('1'); serchMessage.style.visibility = ('hidden'); }, 1000) }); leng.addEventListener('click', () => { wraperContent.style.opacity = ('0.8'); serchMessage.style.visibility = ('visible'); setTimeout(() => { wraperContent.style.opacity = ('1'); serchMessage.style.visibility = ('hidden'); }, 1000) }); lerning.addEventListener('click', () => { wraperContent.style.opacity = ('0.8'); serchMessage.style.visibility = ('visible'); setTimeout(() => { wraperContent.style.opacity = ('1'); serchMessage.style.visibility = ('hidden'); }, 1000) });
/* * @Description: WebviewJavascriptBridge * @Author: sailei * @Date: 2018-12-15 14:16:12 */ function setupWebViewJavascriptBridge (callback) { if (window.WebViewJavascriptBridge) { return callback(window.WebViewJavascriptBridge) } if (window.WVJBCallbacks) { return window.WVJBCallbacks.push(callback) } window.WVJBCallbacks = [callback] let WVJBIframe = document.createElement('iframe') WVJBIframe.style.display = 'none' WVJBIframe.src = 'https://__bridge_loaded__' document.documentElement.appendChild(WVJBIframe) setTimeout(() => { document.documentElement.removeChild(WVJBIframe) }, 0) } export default { callhandler (name, data, callback) { setupWebViewJavascriptBridge(function (bridge) { try { bridge.init(function (message, responseCallback) { console.log('JS got a message', message) var data = { 'Javascript Responds': 'CMYH!' } console.log('JS responding with', data) if (data) { responseCallback(data) } else { responseCallback('') } }) } catch (e) { console.log(e) } bridge.callHandler(name, data, callback) }) }, registerhandler (name, callback) { setupWebViewJavascriptBridge(function (bridge) { bridge.registerHandler(name, function (data, responseCallback) { callback(data, responseCallback) }) }) } }
'use strict'; const path = require('path'); const fs = require('fs-extra'); const exec = require('child_process').exec; const expect = require('chai').expect; const FILE = path.join(__dirname, '../tests/dummy/app/some.md'); const TIMEOUT = 60000; describe('ember-cli-eslint', function () { this.timeout(TIMEOUT); afterEach(async () => { await fs.remove(FILE); }); it('passes if codefences tests does not exists', async () => { const result = await emberTest(); expect(result.error).to.not.exist; expect(result.stdout).to.not.match(/^not ok .* - Markdown Codefences/m); }); it('fails if a codefences tests fails', async () => { await fs.outputFile( FILE, ['```javascript', 'foo.bar = "wow";', '```'].join('\n') ); const result = await emberTest(); expect(result.error).to.exist; expect(result.stdout).to.match( /^not ok .* - Markdown Codefences \| dummy\/app\/some\.md: fenced code should work/m ); }); describe('ember-qunit', () => { it('fails if a handlebars codefence test fail', async () => { await fs.outputFile( FILE, ['```handlebars', "{{dummy foo=(action 'bar')}}", '```'].join('\n') ); const result = await emberTest(); expect(result.error).to.exist; expect(result.stdout).to.match( /^not ok .* - Markdown Codefences \| dummy\/app\/some\.md: fenced code should work/m ); }); }); }); function emberTest() { return new Promise((resolve) => { exec( 'node_modules/.bin/ember test', { cwd: path.join(__dirname, '..'), env: process.env }, (error, stdout, stderr) => { resolve({ error, stdout, stderr, }); } ); }); }
var Record = require('../record.js') var assert = require('assert') describe ('record store', function(){ var record beforeEach(function(){ record = new Record('Justin Bieber','Greatest Hits','pop', 999 ) }) it('can see properties of record', function(){ // record.inspectRecord(record) assert.strictEqual(' artist: Justin Bieber title: Greatest Hits genre: pop price: 999', record.inspectRecord()) } ) })
$(function() { let allId = ["cab1", "cab2", "fub1", "fub2", "crb1", "crb2", "ftb1", "ftb2", "ccb1", "ccb2", "cob1", "cob2", "pab1", "pab2", "dob1", "dob2", "cub1", "cub2", "wab1", "wab2", "bmb1", "bmb2", "apb1", "apb2"]; let allClass = [".cake", ".fudge", ".croll", ".ftoast", ".cheesecake", ".cookies", ".pancakes", ".donut", ".waffle", ".bbmuffin", ".cupcake", ".applepie"]; $("#cakeBtn").click(function(){ $(toggleMe(".cake", "cab1", "cab2")); }) $("#fudgeBtn").click(function(){ $(toggleMe(".fudge", "fub1", "fub2")); }) $("#crollBtn").click(function(){ $(toggleMe(".croll", "crb1", "crb2")); }) $("#ftoastBtn").click(function(){ $(toggleMe(".ftoast", "ftb1", "ftb2")); }) $("#cheesecakeBtn").click(function(){ $(toggleMe(".cheesecake", "ccb1", "ccb2")); }) $("#cookiesBtn").click(function(){ $(toggleMe(".cookies", "cob1", "cob2")); }) $("#pancakesBtn").click(function(){ $(toggleMe(".pancakes", "pab1", "pab2")); }) $("#donutBtn").click(function(){ $(toggleMe(".donut", "dob1", "dob2")); }) $("#cupcakeBtn").click(function(){ $(toggleMe(".cupcake", "cub1", "cub2")); }) $("#waffleBtn").click(function(){ $(toggleMe(".waffle", "wab1", "wab2")); }) $("#bbmuffinBtn").click(function(){ $(toggleMe(".bbmuffin", "bmb1", "bmb2")); }) $("#applepieBtn").click(function(){ $(toggleMe(".applepie", "apb1", "apb2")); }) function toggleMe(x, y, z) { if ($(x).is(".collapse:not(.show)")) { $(x).collapse("show"); $(hideAll(x)); $(showMe(y, z)); $(removeBorder(y, z)); } else { $(x).collapse("hide"); hideMe(y, z); } } function hideAll(x) { let cla1 = allClass.indexOf(x); let cla12 = cla1 + 1; let cla2 = allClass.length; let hide1 = allClass.slice(0, cla1); let hide2 = allClass.slice(cla12, cla2); let hideFin = hide1.concat(hide2); let hv = 0; while (hv < hideFin.length){ var h1 = hideFin[hv]; if (h1 == null) { continue; } $(h1).collapse("hide"); hv = ++hv; } } function showMe(x, y){ $(function(){ var v = document.getElementById(x); v.classList.add("border"); v.classList.add("border-dark"); v.classList.add("border-right-0"); }) $(function(){ var v = document.getElementById(y); v.classList.add("border"); v.classList.add("border-dark"); v.classList.add("border-left-0"); }) } function hideMe(x, y){ $(function(){ var v = document.getElementById(x); v.classList.remove("border"); v.classList.remove("border-dark"); v.classList.remove("border-right-0"); }) $(function(){ var v = document.getElementById(y); v.classList.remove("border"); v.classList.remove("border-dark"); v.classList.remove("border-left-0"); }) } function removeBorder(x,y) { let val1 = allId.indexOf(x); let val12 = val1 + 1; let val2 = allId.indexOf(y); let val22 = val2 + 1; let val3 = allId.length; let remBor1 = allId.slice(0, val1); let remBor2 = allId.slice(val12, val2); let remBor3 = allId.slice(val22, val3); let remFin = remBor1.concat(remBor2, remBor3); let bv = 0; while (bv < remFin.length){ var b1 = document.getElementById(remFin[bv]); if (b1 == null) { bv = ++bv; continue; } b1.classList.remove("border"); b1.classList.remove("border-dark"); b1.classList.remove("border-left-0"); bv = ++bv; } } });
import express from "express"; const router = express.Router(); import pool from "../db"; import { adminAuthenticationRequired } from "../AuthenticationMiddleware/AuthenticationMiddleware"; // @router GET "/api/products/o1/:name/:offset" // @desc Returns the object by similar name // @access public router.get("/o1/:name/:offset", (req, res) => { const { name, offset } = req.params; const count_sql = `SELECT COUNT(*) as total FROM product WHERE p_name LIKE '%${name}%'`; const select_sql = `SELECT * FROM product WHERE p_name LIKE '%${name}%' LIMIT 10 OFFSET ${offset}`; let json = {}; pool.getConnection((err, connection) => { if (err) res.send({ error: "Cannot fetch product data" }); connection.query(select_sql, (error, results) => { if (error) res.send(error); let arr = []; for (let i = 0; i < results.length; i++) { arr.push(results[i]); } json = { products: arr }; }); connection.query(count_sql, (error, results) => { json["total"] = results[0].total; connection.release(); if (error) return res.send({ error: "problem getting products" }); return res.json(json); }); }); }); router.get("/all/:offset", (req, res) => { const { offset } = req.params; const count_sql = `SELECT COUNT(*) as total FROM product`; const select_sql = `SELECT * FROM product LIMIT 10 OFFSET ${offset}`; let json = {}; pool.getConnection((err, connection) => { if (err) res.send({ error: "Cannot fetch product data" }); connection.query(select_sql, (error, results) => { if (error) res.send(error); let arr = []; for (let i = 0; i < results.length; i++) { arr.push(results[i]); } json = { products: arr }; }); connection.query(count_sql, (error, results) => { json["total"] = results[0].total; connection.release(); if (error) return res.send({ error: "problem getting products" }); return res.json(json); }); }); }); // @router GET "/api/products/all/type/:type" // @desc Return all items of the type specified // @ret {products: [{item1}, {item2}, ....{itemN}]} // @access public router.get("/all/type/:type", (req, res) => { const { type } = req.params; const sql = `SELECT * FROM product WHERE product.type = "${type}"`; pool.query(sql, (err, results) => { if (err) return res .status(404) .send({ error: "Could not fetch products with type" }); return res.send({ products: results }); }); }); // Returns all the objects of the type router.get("/all/type/:type/:offset", (req, res) => { const { type, offset } = req.params; const count_sql = `SELECT COUNT(*) as total FROM product WHERE product.type = "${type}"`; const select_sql = `SELECT * FROM product WHERE product.type = "${type}" LIMIT 10 OFFSET ${offset}`; let json = {}; pool.getConnection((err, connection) => { if (err) res.send({ error: "Cannot fetch product data" }); connection.query(select_sql, (error, results) => { if (error) res.send(error); let arr = []; for (let i = 0; i < results.length; i++) { arr.push(results[i]); } json = { products: arr }; }); connection.query(count_sql, (error, results) => { json["total"] = results[0].total; connection.release(); if (error) return res.send({ error: "problem getting products" }); return res.json(json); }); }); }); // @router PUT api/products/1/id/:id // @desc Retrieve the product based on id // @access Public router.get("/1/id/:id", (req, res) => { const { id } = req.params; const sql = `SELECT * FROM product WHERE product_id = ${id}`; pool.query(sql, (error, results) => { if (error || results.length === 0) return res.status(404).send({ error: "Could not fetch product" }); res.json({ product: results[0] }); }); }); // FOR ADMIN // @router POST api/products/add // @desc Add new item to products list // @access private router.post("/add", (req, res) => { const { p_name, weight, quantity, price, description, imgPath, type, warehouse } = req.body; if ( p_name == null || weight == null || quantity == null || price == null || description == null || imgPath == null || type == null || warehouse == null ) { return res.status(400).send({ error: "Bad Request" }); } const insert_sql = `INSERT INTO product (p_name, quantity, price, weight, description, imgPath, type, warehouse) values ('${p_name}', '${quantity}', '${price}', '${weight}', '${description}', '${imgPath}', '${type}', '${warehouse}')`; pool.query(insert_sql, (error, results) => { if (error) { return res.status(400).send({ message: "Error" }); } res.sendStatus(200); }); }); // @router POST api/products/update // @desc Update an item // @access private router.post("/update", (req, res) => { const { product_id, p_name, weight, quantity, price, description, imgPath, type } = req.body; if ( product_id == null || p_name == null || weight == null || quantity == null || price == null || description == null || imgPath == null || type == null ) { return res.status(400).send({ error: "Bad Request" }); } const sql = `UPDATE product SET p_name = '${p_name}', weight = '${weight}', quantity = '${quantity}', price = '${price}', description = '${description}', imgPath = '${imgPath}', type = '${type}' WHERE product_id = ${product_id}`; pool.query(sql, (error, results) => { if (error) return res.status(400).send({ error: "Bad Request" }); res.sendStatus(200); }); }); // @router DELETE "/delete/:product_id" // @desc Delete a product with the product_id // @access private router.post("/delete", (req, res) => { const { product_id } = req.body; if (product_id == null) { return res.status(400).send({ error: "Bad Request" }); } const sql = `DELETE FROM product WHERE product_id = ${product_id}`; pool.query(sql, (error, results) => { if (error) return res.status(400).send({ error: "Bad Request Cannot delete" }); res.sendStatus(200); }); }); export default router;
(function() { describe("Grocery List", function() { beforeAll(function() { return browser.get("http://localhost:8000/6/index.html"); }); it("says 'Grocery List' at the top", function() { expect($('h1')).isDisplayed(); return expect($('h1').getText()).toBe('Grocery List'); }); it("clicks 'Add Random'", function() { $('[ng-click="add_random()"]').click(); return expect($$('.grocery-item').count()).toBe(1); }); it("clicks 'Add Random' 4 more times", function() { $('[ng-click="add_random()"]').click(); $('[ng-click="add_random()"]').click(); $('[ng-click="add_random()"]').click(); $('[ng-click="add_random()"]').click(); return expect($$('.grocery-item').count()).toBe(5); }); it("removes item #2", function() { $$('.grocery-item').get(1).$('.remover').click(); return expect($$('.grocery-item').count()).toBe(4); }); it("removes item #3", function() { $$('.grocery-item').get(2).$('.remover').click(); return expect($$('.grocery-item').count()).toBe(3); }); return it("now has 3 items", function() { return expect($$('.grocery-item').count()).toBe(3); }); }); }).call(this);
const EMPTY_CELL = ""; $().ready(function() { var newGame = Object.create(GamePrototype); newGame.init(); newGame.playGame(); }); //Game object var GamePrototype = { init: function() { this.players = []; var player1 = Object.create(PlayerPrototype), player2 = Object.create(PlayerPrototype); player1.init("X"); player2.init("O"); this.players.push(player1,player2); this.board = Object.create(BoardPrototype); this.board.init(); this.assignPlayer(); }, //choose player randaonly assignPlayer: function() { this.turn = Math.round(Math.random())?"X":"O"; }, //main game playGame: function() { var row,col,symbol, msg; var that = this; $('.board').click(function(event){ if(this.board.setCell(row,col,symbol)){ msg = this.board.checkGameOver(); $('.row:nth-child('+(row+1)+') .col:nth-child('+(col+1)+')').addClass(symbol).html(symbol); if(msg){ if(msg === "winner") { console.log("Player '" + this.turn + "' is the winner!"); } else { console.log("Draw game!"); } this.restartGame(msg); } this.switchTurns(); } else { console.log("Cell Occupied"); } }.bind(this)); //hover effect and assigning symbol, col, row on hover $('.col').hover(function(event){ symbol = that.turn; row = $(event.target).closest('.row').index('.row'); col = $(event.target).closest('.col').index('.col')%3; if(that.board.getCell(row,col) === EMPTY_CELL){ $(this).html(symbol); } }, function(){ if(that.board.getCell(row,col) === EMPTY_CELL){ $(this).html(""); } }); }, //switch players after each turn switchTurns: function(){ this.turn = (this.turn === "X")?"O":"X"; }, //restart game restartGame: function(msg){ $('.board').unbind('click'); $('.col').unbind('mouseenter mouseleave'); $('.board').prepend('<div class="overlay"></div>'); if(msg === "winner") $('.overlay').append('<p>Player "'+ this.turn + '" Wins!</p>'); else $('.overlay').append('<p>Draw Game!</p>'); $('.overlay').append('<p><a href="">Play Again?</a></p>'); } }; //Board object var BoardPrototype = { init: function() { this.grid = []; for (var i = 0; i<3; i++ ) { var row = []; var int = i+1; for (var j = 0; j<3; j++) { var cell = Object.create(CellPrototype); cell.init(); row.push(cell); } this.grid.push(row); } }, //get cell symbol getCell: function(row,col){ return this.grid[row][col].getSymbol(); }, //set cell symbol setCell: function(row,col,symbol){ if(this.getCell(row,col) === EMPTY_CELL){ this.grid[row][col].setSymbol(symbol); return true; } return false; }, //check if game is over checkGameOver: function(){ if(this.win()) return "winner"; if(this.draw()) return "draw"; return false; }, //check if all cells in array have the same symbol allSame: function(arr){ for(var i of arr){ if(i.getSymbol() !== arr[0].getSymbol()) return false; } return true; }, //check if all cells in array are empty allEmpty: function(arr){ for(var i of arr){ if(i.getSymbol() !== EMPTY_CELL) return false; } return true; }, //check if none of cells in array are empty noneEmpty: function(arr){ for(var i of arr){ if(i.getSymbol() === EMPTY_CELL) return false; } return true; }, //transform grid elements vertically transposeGrid: function(){ var transposed_grid = this.grid[0].map(function(col, i){ return this.grid.map(function(row){ return row[i]; }); },this); return transposed_grid; }, //get all diagonal cells diagonalRows: function(){ return [ [this.grid[0][0], this.grid[1][1], this.grid[2][2]], [this.grid[0][2], this.grid[1][1], this.grid[2][0]] ]; }, //get all winnining positions winningPositions: function(){ return this.grid.concat(this.transposeGrid(), this.diagonalRows()); }, //check if win win: function(){ var positions = this.winningPositions(); for(var i = 0; i < positions.length; i++){ if(this.allEmpty(positions[i])) continue; if(this.allSame(positions[i])) return true; } return false; }, //check if draw draw: function(){ var flattened = this.winningPositions().reduce(function(a,b){ return a.concat(b); }); if(this.noneEmpty(flattened)) return true; return false; } }; //Cell Object var CellPrototype = { init: function() { this.symbol = EMPTY_CELL; }, setSymbol: function (symbol) { this.symbol = symbol; }, getSymbol: function() { return this.symbol; } }; //Player Object var PlayerPrototype = { init: function(mark) { this.symbol = mark; }, get: function() { return this.symbol; } };
import React from 'react'; import './Product..css'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faShoppingCart } from '@fortawesome/free-solid-svg-icons'; const Product = (props) => { const {img, name, seller, price, stock} = props.product; return ( <div className = 'product'> <div> <img src={img} alt="product" /> </div> <div className='product-info'> <h4 className='product-name'> {name} </h4> <p> <small> by: {seller} </small> </p> <p> Price: {price} </p> <p> {stock} items only left is stock </p> <button onClick= {() => props.handleClick(props.product)} className='add-cart-btn'> <FontAwesomeIcon icon={faShoppingCart} /> add to cart </button> </div> </div> ); }; export default Product;
export const SELECT_CHARACTER_ONE_STYLE = "selectCharacterOneStyle"; export default function selectCharacterOneStyle(styleIndex, character) { return { type: SELECT_CHARACTER_ONE_STYLE, styleIndex, character }; }
/* eslint-disable @next/next/no-img-element */ import axios from "axios"; import React, { use, useEffect, useState } from "react"; import styles from "../../styles/Admin.module.css"; import Modal from "../../components/common/CreatePizzaModal" import { API_BASE_URL } from "../../util/constant"; import Loader from "../../components/common/Loader"; function Admin({ orders, pizzas }) { const [pizzaList, setPizzaList] = useState(pizzas); const [orderList, setOrderList] = useState(orders); const [modal, setModal] = useState(false); const [showLoader, setShowLoader] = useState(true); const status = ["Preparing", "On the way", "Delivered"]; const deleteProduct = async (id) => { try { const res = await axios.delete(`${API_BASE_URL}/pizza/${id}`); if (res) { setPizzaList(pizzaList.filter((pizza) => pizza._id !== id)); } } catch (err) { console.error(err); } }; useEffect(() => { setShowLoader(false) }, [pizzaList, orderList]) const handleStatus = async (id) => { const item = orderList.filter((order) => order._id === id)[0]; const currentStatus = item.status; try { const res = await axios.put(`${API_BASE_URL}/orders/${id}`, { status: currentStatus + 1, }); if (res) { setOrderList([ res.data, ...orderList.filter((order) => order._id !== id), ]); } } catch (err) { console.error(err); } }; return ( <div> <div> <button onClick={() => setModal(true)} className={styles.addPizzaButton} > Add New Pizza </button> </div> <div className={styles.container}> <div className={styles.item}> <h1 className={styles.title}>Products</h1> <table className={styles.table}> <thead> <tr className={styles.trTitle}> <th>Image</th> <th>ID</th> <th>Title</th> <th>Price</th> <th>Action</th> </tr> </thead> <tbody> {pizzaList && pizzaList.map((item, index) => ( <tr className={styles.tr} key={index.toString()}> <td className={styles.td}> <img src={item.image} alt={item.title} style={{ width: "50px", height: "50px" }} loading="lazy" /> </td> <td className={styles.td}> <span className={styles.name}>{item._id}</span> </td> <td className={styles.td}> <span style={styles.address}>{item.title}</span> </td> <td className={styles.td}> <span style={styles.total}>${item.prices[0]}</span> </td> <td className={styles.td}> <button className={styles.button}>Edit</button> <button className={styles.button} onClick={() => deleteProduct(item._id)} > Delete </button> </td> </tr> ))} </tbody> </table> </div> <div className={styles.item}> <h1 className={styles.title}>Orders</h1> <table className={styles.table}> <thead> <tr className={styles.trTitle}> <th>Order ID</th> <th>Customer</th> <th>Total</th> <th>Payment</th> <th>Status</th> <th>Action</th> </tr> </thead> <tbody> {orderList && orderList.map((item, index) => ( <tr className={styles.tr} key={index.toString()}> <td className={styles.td}> <span className={styles.id}>{item._id}</span> </td> <td className={styles.td}> <span className={styles.name}>{item.customer}</span> </td> <td className={styles.td}> <span style={styles.address}>${item.total}</span> </td> <td className={styles.td}> {item.method === 0 && ( <span style={styles.total}>Cash</span> )} {item.method === 1 && ( <span style={styles.total}>Paid</span> )} </td> <td className={styles.td}> <span style={styles.total}>{status[item.status]}</span> </td> <td className={styles.td}> <button className={styles.button} onClick={() => handleStatus(item._id)} > Next Stage </button> </td> </tr> ))} </tbody> </table> </div> </div> {showLoader && <Loader />} {modal && <Modal setModal={setModal} />} </div> ); } export default Admin; export const getServerSideProps = async (ctx) => { const myCookie = ctx.req?.cookies || ""; console.log("myCookie", myCookie.token); if (!myCookie.token) { return { redirect: { destination: "/admin/login", permanent: false, }, }; } const products = await axios.get(`${API_BASE_URL}/pizza`); const orders = await axios.get(`${API_BASE_URL}/orders`); return { props: { orders: orders.data, pizzas: products.data.data, }, }; };
const {Department, Role, Employee} = require('../models'); const Table = require('cli-table'); const { nameCombine } = require('../config/helpers'); module.exports = { // The listAll func will retreive all data from the data base in a certain category and log it listAll: async (category) => { // Use a switch to determine the category switch (category) { case 'department': // Will display detailed department information try { // Find all data in a category const dptData = await Department.findAll(); // Remove extra fluff from the instances const departments = dptData.map(entry => entry.get({plain: true})); // Create a table class const table = new Table({ head: ['ID', 'Name'] }); // Insert data into the new table departments.forEach(dpt => table.push([dpt.id, dpt.name])); console.log(table.toString()); } catch (e) { console.log(e); } break; case 'role': // Will display detailed role informaiton try { const roleData = await Role.findAll({ include: [{model: Department}] }); const roles = roleData.map(entry => entry.get({plain: true})); const table = new Table({ head: ['ID', 'Title', 'Salary', 'Department'] }); roles.forEach(role => { let dpt; if(role.department) { dpt = role.department.name; } else { dpt = '*Unassigned*'; } table.push([ role.id, role.title, '$' + role.salary, dpt, ]); }); console.log(table.toString()); } catch (e) { console.log(e); } break; case 'employee': // Will display detailed employee information try { const empData = await Employee.findAll({ include: [{model: Role}] }); const employees = empData.map(entry => entry.get({plain: true})); const table = new Table({ head: ['ID', 'First Name', 'Last Name', 'Role', 'Manager'] }); employees.forEach(employee => { // Deleting a role will remove it from the employee's record // If statement determines if they have a role assigned before populating the table let title; if(employee.role) { title = employee.role.title; } else { title = '*Unassigned*'; } table.push([ employee.id, employee.first_name, employee.last_name, title, employee.manager || 'None' ]); }); console.log(table.toString()); } catch (e) { console.log(e); } break; default: // Default will display all information try { const roughData = await Employee.findAll( { include: [{model: Role, include: [{model: Department}]}] }); const ezData = roughData.map(entry => entry.get({plain: true})); const table = new Table({ head: ['Name', 'Role', 'Department', 'Salary', 'Manager'] }); ezData.forEach(entry => { let title; let dpt; let salary; if(entry.role) { title = entry.role.title; salary = '$' + entry.role.salary; if(entry.role.department) { dpt = entry.role.department.name; } else { dpt = '*Unassigned*'; } } else { title = '*Unassigned*'; dpt = '*Unassigned*'; salary = '*Unassigned*'; } table.push([ nameCombine(entry), title, dpt, salary, entry.manager || 'None', ]); }) console.log(table.toString()); } catch (e) { console.log(e); } break; } return; } }
require('../css/style.css'); import React from 'react'; import ReactDOM from 'react-dom'; import _ from 'lodash'; import Appts from './Appts'; import AddAppts from './AddAppts'; import SearchAppts from './SearchAppts'; var PetsAppts = React.createClass({ // getInitialState getInitialState() { return { allAppts: [], queryText: '', orderBy: 'id', orderDir: 'asc', item: '' }; // return }, // -getInitialState // used for making ajax request // that's used across the app // multiple times ajaxRequest() { var that = this; $.ajax({ type: "GET", url: "getAppts.php", success(data) { that.setState({ allAppts: data }); }, error(error) { console.log("Error"); } }); }, // componentDidMount // make ajaax calls here componentDidMount() { this.ajaxRequest(); }, // -componentDidMount // componentWillUnmount componentWillUnmount() { this.serverRequest.abort(); }, // -componentWillUnmount // on new appt added change the state to load // the new appt handleAdd(response) { if (response == 'added') { this.ajaxRequest(); } }, // -handleAdd // used to handle changing state without reload // appointment delete onDelete(response){ if ( response == 'deleted' ) { this.ajaxRequest(); } }, onSearch(query) { this.setState({ queryText: query }); //console.log(allAppts); }, handleOrderBy(orderBy, orderDir) { this.setState({ orderBy: orderBy, orderDir: orderDir }); }, //render render() { var filteredAppts = []; var allAppointments = this.state.allAppts; var queryText = this.state.queryText; // search text var orderBy = this.state.orderBy, orderDir = this.state.orderDir; // filter using forEach method for array allAppointments.forEach( (item)=> { if ( item.pet_name.toLowerCase().indexOf(queryText.toLowerCase()) != -1 || item.owner_name.toLowerCase().indexOf(queryText.toLowerCase()) != -1 || item.appt_des.toLowerCase().indexOf(queryText.toLowerCase()) != -1) { filteredAppts.push(item); } }); // filtered using lodash filteredAppts = _.orderBy(filteredAppts, [this.state.orderBy], [this.state.orderDir]); if (filteredAppts.length == 0) { filteredAppts = <h2 className="text-center">Sorry! No appointments found</h2>; } else { filteredAppts = filteredAppts.map((item, index) => { return ( <Appts item={item} key={index} handleDelete={this.onDelete}/> ); }); } return ( <div> <AddAppts addAppts={this.handleAdd}/> <SearchAppts searchHandler={this.onSearch} orderBy={this.state.orderBy} orderDir={this.state.orderDir} handleOrderBy={this.handleOrderBy}/> {filteredAppts} </div> ); } }); ReactDOM.render(<PetsAppts/>, document.getElementById('react'));
const Discord = require("discord.js"); const fs = require("fs"); const ms = require("ms"); var mongoose = require("mongoose"); mongoose.Promise = global.Promise;mongoose.connect(process.env.MONGO_URL); var User = require('./../schemas/user_model.js'); function isNumeric(value) { return /^\d+$/.test(value); } module.exports.run = async (bot, message, args) => { var retricIcon = bot.emojis.find("name", "retric"); var nopeIcon = bot.emojis.find("name", "nope"); if (isNumeric(args[0]) && isNumeric(args[1])){ var user_obj = User.findOne({ userID: message.member.id }, function (err, foundObj) { if (err) console.log("Error on database findOne: " + err); else { if (!foundObj) console.log("Something stange happend"); else { var dateTime = Date.now(); var timestamp = Math.floor(dateTime/1000); var timestampLimit = Math.floor(foundObj.lastDice/1000) + 3000; if (timestampLimit > timestamp) return message.reply("эээ, крути-верти, но не чаще, чем раз в пол минуты..."); if (Number(args[0]) >= 100 && Number(args[1]) >= 1 && Number(args[1]) <= 6){ var actCash = foundObj.retrocoinCash; var toPlay = Number(args[0]); var winner = false; if (actCash - toPlay >= 0){ var newCash = actCash - toPlay; var min = 1; var max = 6; var result = Math.floor(Math.random() * (max - min + 1)) + min; if (result == Number(args[1])){ newCash = toPlay * 6 + actCash; winner = true; var won = toPlay * 6; } foundObj.retrocoinCash = newCash; foundObj.retrocoinTotal = newCash + foundObj.retrocoinBank; foundObj.lastDice = Date.now(); foundObj.save(function(err, updatedObj){ if(err) console.log(err); }); message.channel.send("Закидываю 🎲 ..."); setTimeout(function(){ if (winner == true){ return message.channel.send(`...и вылетает ${result}! ${message.author}, ты только что выиграл ${won}${retricIcon}! Поздравляю :drum:`); } else return message.channel.send("...и вылетает " + result + "! Ну ничего, в другой раз повезет больше :stuck_out_tongue_winking_eye:"); }, 3000); } else return message.reply("видимо у тебя не достаточно ретриков на руках :dark_sunglasses:"); } else if (Number(args[0]) < 100) return message.reply("минимальная ставка - 100 ретриков!"); else if (Number(args[1]) < 1 || Number(args[1]) > 6) return message.reply(`у куба всего 6 сторон, дядя ${nopeIcon}`); } } }); } else if (!args[0]) return message.reply("укажи ставку и твой прогноз!"); else if (!args[1]) return message.reply("на что ставить будем? От 1 до 6..."); } module.exports.help = { name: "dice" }
class Paper extends dustbin{ constructor(x,y){ super(x,y) var options = { isStatic: false, restitution:0.3, friction:0, density:1.2 } this.image=loadImage("paper.png") } } function keyPressed(){ if (keyCode === UP_ARROW) { Matter.Body.applyForce(paperObject.body, paperObject.body.position,{x:130,y:-145}) } }
/** * Copyright (c) 2011-2015 Berkeley Model United Nations. All rights reserved. * Use of this source code is governed by a BSD License (see LICENSE). */ 'use strict'; var $ = require('jquery'); var Promise = require('es6-promise').Promise; var _countryPromise = null; var CountryStore = { getCountries: function(callback) { if (!_countryPromise) { _countryPromise = new Promise(function(resolve, reject) { $.ajax({ type: 'GET', url: '/api/countries', dataType: 'json', success: function(data, textStatus, jqXHR) { resolve(jqXHR.responseJSON); }, }); }); } _countryPromise.then(callback); }, }; module.exports = CountryStore;
import React from "react"; import styled from "styled-components"; import tick from "../../../../assets/images/tick.svg"; import moment from "moment"; import InfoStudent from "./InfoStudent"; const StyledStep3 = styled.section` margin-bottom: auto; .Step3__inner { max-width: 800px; margin: 0 auto 10%; background: #ffffff; padding: 40px 5%; box-shadow: 0px 5px 25px rgba(98, 84, 232, 0.2); border-radius: 4px; .react-single-select-container { width: 100%; > div { border-radius: 4px; } } .student-info { margin: 0% 0 4%; } } h5 { font-size: 14px; text-align: left; font-weight: 600; margin-bottom: 10px; } .date-and-time { background: #f2f4fd; text-align: left; padding: 30px 15px; .--item { display: flex; align-items: center; max-width: 500px; margin: 0 auto; width: calc(100% - 10px); } h3, p { font-size: 14px; color: #08135a; } h3 { width: 35%; text-align: left; margin-right: 10px; font-weight: 600; } p { width: 65%; margin-bottom: 10px; } } .confirm { border: none; border-radius: 25px; padding: 5px 8px 5px 25px; font-size: 12px; color: #ffffff; line-height: 30px; font-weight: 500; transition: 0.3s ease; background: #6254e8; border-radius: 30px; display: flex; justify-content: center; align-content: center; margin: 20px auto 0; &:hover { transform: translateY(-3px); box-shadow: 0 4px 8px 0 #6556f8; } &[disabled] { background: #ced7ff; pointer-events: none; span { background: #b4bff1; } } span { padding: 7px 7px; border-radius: 100%; display: inline-flex; width: 30px; height: 30px; justify-content: center; margin-left: 5px; background: #3e32b6; img { margin-bottom: 3px; width: 15px; height: 15px; } } } @media only screen and (max-width: 610px) { .date-and-time { p, h3 { font-size: 12px; } } } @media only screen and (max-width: 410px) { .date-and-time { p, h3 { font-size: 10px; } } } .edit { color: #08135a; border-bottom: 1px solid; max-width: 30px; margin: 0 0 0 calc(100% - 40px); cursor: pointer; transition: 0.3s ease; font-size: 14px; &:hover { color: #f6732f; } } @media only screen and (max-width: 450px) { .edit { font-size: 12px; } } `; function Step3({ storeBookLesson, storeBookLesson2, studentSelected, timeLesson, timeLesson2, handleClickEdit2, handleClickEdit1, handleConfirm, isOnetimeLesson, isTrialLesson, dataSetupBooking, isSubmitting, }) { return ( <StyledStep3> <div className="container"> <div className="Step3__inner"> <h5>Selected student</h5> <InfoStudent step={3} studentSelected={ dataSetupBooking && Object.keys(dataSetupBooking).length ? dataSetupBooking : studentSelected } handleClickEdit={handleClickEdit1} /> <h5>Selected date and time</h5> <div className="date-and-time"> <div className="--item"> <h3>Start date</h3> <p> {storeBookLesson.date && moment(storeBookLesson.date).format("MMM Do YYYY")} </p> </div> <div className="--item"> <h3>Day</h3> <p> {storeBookLesson.date && moment(storeBookLesson.date).format("dddd")} </p> </div> <div className="--item"> <h3>Time</h3> <p>{timeLesson}</p> </div> {timeLesson2 && storeBookLesson2.date && ( <> <div className="--item"> <h3>Day</h3> <p> {storeBookLesson2.date && moment(storeBookLesson2.date).format("dddd")} </p> </div> <div className="--item"> <h3>Time</h3> <p>{timeLesson2}</p> </div> </> )} <div className="--item"> <h3>Frequency</h3> <p> {isOnetimeLesson ? "One-time lesson" : "Repeat every week"} {isTrialLesson === "true" ? " (Applying 50% off)" : ""} </p> </div> <div className="edit" onClick={handleClickEdit2}> Edit </div> </div> <button className="confirm" onClick={handleConfirm} disabled={isSubmitting} > Confirm <span> <img src={tick} alt="tick" /> </span> </button> </div> </div> </StyledStep3> ); } export default Step3;
import { findAllByDisplayValue } from "@testing-library/react"; export const initialState = { user: null, playlists: [], spotify: null, discover_weekly: null, top_artists: null, playing: false, item: null, }; // State is how it currently looks like // Action is what i manipulate what the data layer looks like // For example: set the item that we are currently playing const reducer = (state, action) => { console.log(action); switch (action.type) { // When you receive this action, you basically want to return case "SET_USER": return { // Keep whatever it is in the current state // Need to have ...state otherwise it will overwrite the state ...state, // Update the user with whatever is inside the action user: action.user, }; case "SET_PLAYING": return { ...state, playing: action.playing, }; case "SET_ITEM": return { ...state, item: action.item, }; case "SET_DISCOVER_WEEKLY": return { ...state, discover_weekly: action.discover_weekly, }; case "SET_TOP_ARTISTS": return { ...state, top_artists: action.top_artists, }; case "SET_TOKEN": return { ...state, token: action.token, }; case "SET_SPOTIFY": return { ...state, spotify: action.spotify, }; case "SET_PLAYLISTS": return { ...state, playlists: action.playlists, }; default: // nothing changes so it does not break my app return state; } }; export default reducer;
const format = require('../../../format'); const template = require('./format.joi'); const payload = { title: Math.random().toString(36).substring(7), score: Math.random().toString(36).substring(7), linkThread: Math.random().toString(36).substring(7), linkComment: Math.random().toString(36).substring(7), }; describe('unit test', () => { describe('reddit', () => { describe('Success', () => { test('format', async () => { const checkPayload = format(payload.title, payload.score, payload.linkThread, payload.linkComment); const { error } = template.validate(checkPayload); expect(error).toBeUndefined(); }); }); describe('Error', () => { test('format', async () => { const checkPayload = format(); const { error } = template.validate(checkPayload); expect(error).not.toBeUndefined(); }); }); }); });
import React from 'react'; const Container = ({ children }) => ( <section> {children} <hr /> </section> ); export default Container;
/* Gruntfile for Real Housewives Memory Challenge HTML5 project production packging. * * Project Dependencies: npm install grunt --save-dev npm install grunt-contrib-clean --save-dev npm install grunt-contrib-watch --save-dev npm install grunt-contrib-imagemin --save-dev npm install grunt-contrib-htmlmin --save-dev npm install grunt-contrib-concat --save-dev npm install time-grunt --save-dev npm install grunt-exec --save-dev * Real Housewives Memory Challenge workflow: * (if release) clean the distrib folder * copyin from Enginesis game work area to source folder * (if release) copy the source folder to the distrib folder * concat + uglify the JS * (if release) imagemin the images into the distrib folder * copy the minified source files from distrib folder to game work area * (if release) build distribution package */ module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: { lib: { src: [ 'source/lib/enginesis.js', 'source/lib/ShareHelper.js' ], dest: 'source/lib/enginesis.min.js' }, dist: { src: [ 'source/js/AchievementItem.js', 'source/js/AnimationHandler.js', 'source/js/AwardsPopup.js', 'source/js/ChallengeIntroduction.js', 'source/js/CreditsPopup.js', 'source/js/GameComplete.js', 'source/js/GameGUI.js', 'source/js/GameOptions.js', 'source/js/GameResults.js', 'source/js/GUIButton.js', 'source/js/InfoPopup.js', 'source/js/LevelButton.js', 'source/js/LevelIntroduction.js', 'source/js/MainMenu.js', 'source/js/MessagePopup.js', 'source/js/Nemesis.js', 'source/js/SharePopup.js', 'source/js/AdPopup.js', 'source/js/UserData.js' ], dest: 'source/js/MemoryMatch.min.js' } }, uglify: { lib: { src: 'source/lib/enginesis.min.js', dest: 'distrib/lib/enginesis.min.js' }, build: { src: 'source/js/MemoryMatch.min.js', dest: 'distrib/js/MemoryMatch.min.js' } }, imagemin: { dynamic: { files: [{ expand: true, cwd: 'source/assets', src: ['**/*.{png,jpg}'], dest: 'distrib/assets' }] } }, watch: { files: ['source/js/*.js', 'source/assets/*.png', 'source/assets/*.jpg'], tasks: 'default' }, /* Clean out the distrib folder so we make sure we get a clean copy of everything */ clean: { release: ["distrib/js", "distrib/lib", "distrib/assets", "distrib/images", "distrib/*.html", "distrib/*.appcache"] }, exec: { /* Make a distribution package */ package: { command: 'sh ./package.sh', stdout: true, stderr: true }, /* Copy files from the development area into the build area */ copyin: { command: 'sh ./copyin.sh', stdout: true, stderr: true }, /* Copy the build files into the distribution holding area */ copydistrib: { command: 'rsync -av source/ distrib', stdout: true, stderr: true }, /* After minify, copy the minified game files to the destination folders so we stay in-sync */ copymin: { command: 'cp distrib/js/MemoryMatch.min.js source/js/MemoryMatch.min.js && cp distrib/js/MemoryMatch.min.js ../../websites/enginesis/public/games/RealHousewivesMemoryChallenge/js/MemoryMatch.min.js', stdout: true, stderr: true }, /* After minify, copy the minified library files to the destination folders so we stay in-sync */ copyenginesismin: { command: 'cp distrib/lib/enginesis.min.js source/lib/enginesis.min.js && cp distrib/lib/enginesis.min.js ../../websites/enginesis/public/games/RealHousewivesMemoryChallenge/lib/enginesis.min.js', stdout: true, stderr: true } } }); // Tell Grunt we plan to use these plug-ins: grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-imagemin'); grunt.loadNpmTasks('grunt-exec'); // Run grunt default (or just grunt) to update the build area and minify the code for release testing // Run grunt release to update the build area, minify, optimize images, and package a distribution grunt.registerTask('default', ['exec:copyin', 'concat', 'uglify', 'exec:copymin', 'exec:copyenginesismin']); grunt.registerTask('release', ['clean:release', 'exec:copyin', 'exec:copydistrib', 'concat', 'uglify', 'imagemin', 'exec:copymin', 'exec:copyenginesismin', 'exec:package']); };
const applicationsActionTypes = { ADD_APPLICATION: 'ADD_APPLICATION', GET_APPLICATION: 'GET_APPLICATION', UPDATE_APPLICATION: 'UPDATE_APPLICATION' } export default applicationsActionTypes;
import React, { Component } from 'react'; import { Link, withRouter } from "react-router-dom"; import { Nav, Navbar, NavItem } from "react-bootstrap"; import { LinkContainer } from "react-router-bootstrap"; import Routes from "./Routes"; import { userService } from './API' import {connect} from 'react-redux' import {login, logout} from './actions' class App extends Component { state={loading: true} componentDidMount() { let token = localStorage.getItem("token") let email = localStorage.getItem("email") if(token && email) { userService.checkToken(token) .then(response => { this.setState({loading: false}) if(!response.error) { this.props.login({token, email}) this.props.history.push("/users") } else { console.log(response.error) this.props.logout() localStorage.removeItem("token") localStorage.removeItem("email") } }) .catch(error => { this.setState({loading: false}) }) } } logout() { this.props.logout() localStorage.removeItem("token") localStorage.removeItem("email") this.props.history.push("/login") } render() { return <div className="App container"> <Navbar fluid collapseOnSelect> <Navbar.Header> <Navbar.Brand> <Link to="/">Home</Link> </Navbar.Brand> {this.props.authed && <Navbar.Brand> <Link to="/users">Users</Link> </Navbar.Brand>} <Navbar.Toggle /> </Navbar.Header> <Navbar.Collapse> <Nav pullRight> {this.props.authed ? <NavItem onClick={()=>this.logout()}>Logout</NavItem> : <> <LinkContainer to="/register"> <NavItem>Register</NavItem> </LinkContainer> <LinkContainer to="/login"> <NavItem>Login</NavItem> </LinkContainer> </> } </Nav> </Navbar.Collapse> </Navbar> {!this.state.loading && <Routes />} </div>; } } const mapStateToProps = (state) => { return {authed: state.authed, logout, login}; } export default withRouter(connect(mapStateToProps, {logout, login})(App));
"use strict"; $(document).ready(function () { var BLACK = "rgb(0, 0, 0)"; var RED = "rgb(255, 0, 0)"; function logic1(avi, a, row, column, n, color, h, k) { var j = 0; var msg = ""; for (j=0; j<n; j++) { a[row[j]].css([column[j]], {"color": color}); } a[h].highlight([k]); avi.clearumsg(); if (n > 0) msg = " and by the red cells"; avi.umsg("The value of the yellow cell is determined by the sub-square it belongs to" + msg); avi.step(); } function logic2(avi, a, row, column, n, color, h, k, v) { var j = 0; for (j=0; j<n; j++) { a[row[j]].css([column[j]], {"color": color}); } a[h].setvalue(k,v); avi.umsg("The value of the yellow cell has been set equal to " + v); avi.step(); a[h].unhighlight([k]); avi.clearumsg(); } var av_name = "Sudoku1CON"; var av = new JSAV(av_name); console.log("Hello, world"); var easyarray = []; easyarray[0] = av.ds.array([3, 9, , , , , , , 8]), easyarray[1] = av.ds.array([' ', 7, 1, , , 3, , ,' ']), easyarray[2] = av.ds.array([' ', , 8, , 4, 9, , 6, ' ']), easyarray[3] = av.ds.array([1, , , 2, 7, , , , 9]), easyarray[4] = av.ds.array([6, , , , , , , , 3]), easyarray[5] = av.ds.array([5, , , , 3, 6, , , 4]), easyarray[6] = av.ds.array([' ', 4, , 1, 5, , 9, , ' ']), easyarray[7] = av.ds.array([' ', , , 9, , , 8, 2, ' ']), easyarray[8] = av.ds.array([9, , , , , , , 4, 7]); av.displayInit(); logic1(av, easyarray, [0,2,3,6], [1,5,8,6], 4, RED, 1, 7); logic2(av, easyarray, [0,2,3,6], [1,5,8,6], 4, BLACK, 1, 7, 9); logic1(av, easyarray, [0,1,4], [0,5,8], 3, RED, 2, 6); logic2(av, easyarray, [0,1,4], [0,5,8], 3, BLACK, 2, 6, 3); logic1(av, easyarray, [2, 4], [7, 0], 2, RED, 0, 2); logic2(av, easyarray, [2, 4], [7, 0], 2, BLACK, 0, 2, 6); logic1(av, easyarray, [2], [4], 1, RED, 1, 0); logic2(av, easyarray, [2], [4], 1, BLACK, 1, 0, 4); logic1(av, easyarray, [5], [0], 1, RED, 2, 1); logic2(av, easyarray, [5], [0], 1, BLACK, 2, 1, 5); logic1(av, easyarray, [], [], 0, RED, 2, 0); logic2(av, easyarray, [], [], 0, BLACK, 2, 0, 2); av.recorded(); });
const searchMeals = () => { const searchText = document.getElementById('search-field').value; const url = `https://www.themealdb.com/api/json/v1/1/search.php?s=${searchText}`; fetch(url) .then(res => res.json()) .then(data => disPlayMeals(data.meals)) } const disPlayMeals = meals => { const mealContainer = document.getElementById("meal-container"); meals.forEach(meal => { const mealDiv = document.createElement("div"); mealDiv.className = "single-result row my-3 p-3"; mealDiv.innerHTML = ` <img src="${meal.strMealThumb}" class="card-img-top" alt="..."> <div class="card-body"> <h4 class="card-text">${meal.strMeal}</h4> </div> `; mealContainer.appendChild(mealDiv); }); }
var dnsTxt = require('dns-txt')() module.exports = Service function Service() { this.name = ''; this.type = ''; this.fqdn = ''; this.host = ''; this.port = ''; this.ipv4 = []; this.ipv6 = []; this.txt = {}; this.status = true; } Service.prototype.serialize = function (answers, opt, callback) { var self = this; this.host = opt.host; this.ipv4 = opt.ipv4.slice(0); this.ipv6 = opt.ipv6.slice(0); answers.forEach(function (ans) { switch (ans.type) { case 'PTR': self.fqdn = ans.data; self.name = ans.data.split('.', 1)[0]; self.type = ans.name.slice(0, -6); break; case 'TXT': self.txt = dnsTxt.decode(ans.data); break; case 'SRV': self.port = ans.data.port; break; } }); if (!opt.host) { callback('Required info not given', self.fqdn) } else { callback(null, self) } };
export const APP_THEME_COLOR = '#000'; export const APP_ORANGE_COLOR = '#B58D37'; export const APP_ORANGE_TEXT_COLOR = 'rgba(255,155,0,1.0)'; export const APP_YELLOW_COLOR = '#f4e282'; export const APP_BLACK_COLOR = 'rgba(33,33,33,1)'; export const APP_WHITE_COLOR = '#FFF'; export const APP_RED_COLOR = '#A80B02'; export const APP_LIGHT_WHITE_COLOR = '#CCC'; export const APP_LIGHT_GREY_COLOR = '#999'; export const APP_BACKGROUND_COLOR = '#1E1E1E'; export const APP_CARD_BACKGROUND_COLOR = '#353535'; export const APP_BLUE_COLOR = '#2eb6ef'; export const APP_REDUCED_ALPHA_COLOR = 'rgba(255, 255, 255, 0.5)'; export const APP_SEMI_TRANSPARENT_COLOR = 'rgba(0, 0, 0, 0.4)'; export const APP_DARK_BLUE_COLOR = 'rgba(30,45,104, 1.0)'; export const APP_DARK_PINK_COLOR = 'rgba(99,34,99, 1.0)'; export const APP_OFF_WHITE_COLOR = 'rgba(241,242,244, 1.0)'; export const APP_SIDE_MENU_COLOR = 'rgba(97,97,115, 1.0)' export const APP_GREY_LIGHT_TAB_COLOR = 'rgba(255, 255, 255, 0.5)' export const APP_BROWN_COLOR = 'rgba(107,39,63,1.0)' export const APP_GREEN_COLOR = 'rgba(27,176,94,1.0)' export const APP_QUESTION_COLOR = 'rgba(39,53,63,1.0)' // export const APP_GREEN_COLOR = '#39b54a';
import { SET_USER_PUBLIC_KEY, GENERATE_BITCOIN_ADDRESS, GET_ECKEY, LOAD, } from '../actions/redux'; export default (state = {}, action) => { switch (action.type) { case SET_USER_PUBLIC_KEY: return { ...state, userPublicKey: action.payload.userPublicKey }; case GENERATE_BITCOIN_ADDRESS: return { ...state, publicKey: action.payload.publicKey, privateKey: action.payload.privateKey, }; case GET_ECKEY: return { ...state, bitcoinAddress: action.payload.bitcoinAddress, privateKeyWif: action.payload.privateKeyWif, publicKeyHex: action.payload.publicKeyHex, }; case LOAD: return { ...state, load: action.payload, }; default: return state; } };
const CONFIG = { introTitle: 'Babe à!', introDesc:“Có biết anh nhớ em đến mức nào không? Có biết anh phiền muộn đến thế nào không? Em không cần biết, vì những điều này chỉ nên để anh chịu đựng, anh chỉ cần trong lòng em có anh, chỉ có anh, còn lại tất cả đều giao cho anh gánh vác.” btnIntro: 'hihi', title: 'Phải chăng em đã yêu ngay từ cái nhìn đầu tiên 😙', desc: 'Phải chăng em đã say ngay từ lúc thấy nụ cười ấy ', btnYes: 'Vẫn cứ là thích anh <33', btnNo: 'Không, Anh trai à :3', question:'Trên thế giới hơn 7 tỉ người mà sao em lại yêu anh <3', btnReply: 'Gửi cho anh <3', reply: 'Yêu thì yêu mà không yêu thì yêu <33333333', mess: 'Anh biết mà 🥰. Yêu em nhiều nhiều 😘😘', messDesc: 'Tối nay 7h anh qua đón nhé công chúa.', btnAccept: 'Okiiiii lun <333', messLink: 'http://fb.com/27042003s' //link mess của các bạn. VD: https://m.me/nam.nodemy }
// JavaScript - Node v8.1.3 describe('class Labrador', _ => { it('should instantiate objects as expected', _ => { var spitsy = new Labrador('Spitsy', 10, 'Male', 'Donald'); Test.assertEquals(spitsy.name, 'Spitsy'); Test.assertEquals(spitsy.age, 10); Test.assertEquals(spitsy.gender, 'Male'); Test.assertEquals(spitsy.species, 'Labrador'); Test.assertEquals(spitsy.legs, 4); Test.assertEquals(spitsy.size, 'Large'); Test.assertEquals(spitsy.master, 'Donald'); Test.assertEquals(spitsy.loyal, true); var edward = new Labrador('Edward', 3, 'Male', 'Emma'); Test.assertEquals(edward.name, 'Edward'); Test.assertEquals(edward.age, 3); Test.assertEquals(edward.gender, 'Male'); Test.assertEquals(edward.species, 'Labrador'); Test.assertEquals(edward.legs, 4); Test.assertEquals(edward.size, 'Large'); Test.assertEquals(edward.master, 'Emma'); Test.assertEquals(edward.loyal, true); }); });
// Copyright (C) 2018-Present Masato Nomiyama import React from 'react' import { withStyles } from '@material-ui/core/styles' import Typography from '@material-ui/core/Typography' import { style } from '../theme' const customStyle = theme => { return { ...style, title: { margin: '24px 0 0', }, body: { margin: '8px 0', }, } } const renderItem = (props, item) => { return ( <div className={`${props.className}-item`}> <Typography variant='subheading' className={[ `${props.className}-item-title`, props.classes.title, ].join(' ')} > {item.title} </Typography> {item.link ? ( <a href={item.link} target='_blank'> <Typography className={[ `${props.className}-item-body`, props.classes.body, props.classes.highlightBody, ].join(' ')} variant='body2' > {item.body} </Typography> </a> ) : ( <Typography variant='body2' className={[ `${props.className}-item-body`, props.classes.body, ].join(' ')} > {item.body} </Typography> )} </div> ) } const Contact = props => { return ( <div className={props.className}> {renderItem(props, { title: 'Email', body: 'nomy[at]takram.com', })} {renderItem(props, { title: 'Twitter', link: 'https://twitter.com/masatonomiyama', body: '@masatonomiyama', })} </div> ) } export default withStyles(customStyle)(Contact)
let titleText = 'Привет, мой друг! Добро пожаловать на сайт группы отелей Selly Hotels!'; let promoTitle = document.getElementById('promoTitle'); // получаем заголовок страницы promoTitle.innerText = titleText; // заменяем текст в заголовке let button = document.getElementById('showAllFeedbacks'); button.addEventListener('click', showAllFeedbacks); function showAllFeedbacks() { button.style.display = 'none'; let hiddenFeedbacks = document.getElementById('hiddenFeedbacks'); hiddenFeedbacks.classList.remove('hidden'); }
self.__precacheManifest = (self.__precacheManifest || []).concat([ { "revision": "877af318d1175c80c6a2d58adbd164f6", "url": "/index.html" }, { "revision": "e434d131dc04a2e28398", "url": "/static/css/2.6aabea0b.chunk.css" }, { "revision": "a52d2a920e71151d7419", "url": "/static/css/main.5d8c393f.chunk.css" }, { "revision": "e434d131dc04a2e28398", "url": "/static/js/2.85dc8766.chunk.js" }, { "revision": "05e75de1046ab39e656119651fe111e2", "url": "/static/js/2.85dc8766.chunk.js.LICENSE" }, { "revision": "a52d2a920e71151d7419", "url": "/static/js/main.b9a04cf3.chunk.js" }, { "revision": "c12b51fc1de9110fcb24", "url": "/static/js/runtime-main.049aaef5.js" }, { "revision": "6b2156a42424f8088ed8769cb9ca4760", "url": "/static/media/aprs_color.6b2156a4.svg" }, { "revision": "8bcafe5cb32ed6ceae914411fbed49c2", "url": "/static/media/blog.8bcafe5c.svg" }, { "revision": "693951cf33c30b84d00cc8d1c7befdf0", "url": "/static/media/camera2.693951cf.svg" }, { "revision": "541217a95b229cf5a9432b0111aa8fdb", "url": "/static/media/catalina.541217a9.jpg" }, { "revision": "75a13e73068a1d6f28cea77e57c84a72", "url": "/static/media/extra_300.75a13e73.jpg" }, { "revision": "5ed546502c45dc6ffd322fd5f5f13eee", "url": "/static/media/first_solo.5ed54650.jpg" }, { "revision": "d626a3062284d490c6a6f8b9c3582031", "url": "/static/media/fishing.d626a306.svg" }, { "revision": "ffa4d41eb49243e144a1e7981fb11398", "url": "/static/media/icon_transparent.ffa4d41e.png" }, { "revision": "dbd89b63658ead533c62ec394f090ee1", "url": "/static/media/id.dbd89b63.svg" }, { "revision": "f35e9c66877cbc0938b88720abdcf5af", "url": "/static/media/kernville.f35e9c66.jpg" }, { "revision": "915e749c48663aa9c4b56cd3998e6dba", "url": "/static/media/mooney.915e749c.jpg" }, { "revision": "dc5abf3ee3e1b340f1e6ba0bbbc82632", "url": "/static/media/n5777v_mit1.dc5abf3e.jpg" }, { "revision": "100e25a68cd9acfed596adc5f4eeefd8", "url": "/static/media/paragliding.100e25a6.svg" }, { "revision": "ca0a4782d4078f81ac8708244a775f5d", "url": "/static/media/private_pilot.ca0a4782.jpg" }, { "revision": "8aed1197171339ae6311684601a24e22", "url": "/static/media/pumpjack.8aed1197.svg" }, { "revision": "3d079333fdfa585a61dce396c4089b6a", "url": "/static/media/rfid.3d079333.svg" }, { "revision": "440b915e62db5c81677c3e12bb271c7a", "url": "/static/media/rv.440b915e.svg" }, { "revision": "387ceec2364efa7fd1038ada6045e268", "url": "/static/media/salinas.387ceec2.jpg" }, { "revision": "e4e7da3b6a29ae807219bda789621ba7", "url": "/static/media/satellite.e4e7da3b.svg" }, { "revision": "d94c387630dcd51cd2fd65a5aa33275c", "url": "/static/media/scuba.d94c3876.svg" }, { "revision": "6a57389ef256f5c953d1d04cfa7555c0", "url": "/static/media/super_decathlon.6a57389e.jpg" }, { "revision": "28b2c7c48ae1f48c2515252e4ae01424", "url": "/static/media/tehachapi.28b2c7c4.jpg" }, { "revision": "6d8bdc4806e968f51a5016db29c0ace4", "url": "/static/media/temperature.6d8bdc48.svg" } ]);
export { default } from 'ember-cli-amplify/services/amplify';
(function($) { "use strict"; $(".main-menu a").click(function(){ var id = $(this).attr('class'); id = id.split('-'); $('a.active').removeClass('active'); $(this).addClass('active'); $("#menu-container .content").slideUp('slow'); $("#menu-container #menu-"+id[1]).slideDown('slow'); $("#menu-container .homepage").slideUp('slow'); return false; }); $(".main-menu a.homebutton").click(function(){ $("#menu-container .content").slideUp('slow'); $("#menu-container .homepage").slideDown('slow'); $(".logo-top-margin").animate({marginLeft:'45%'}, "slow"); $(".logo-top-margin").animate({marginTop:'120px'}, "slow"); return false; }); $(".main-menu a.registerbutton").click(function(){ $("#menu-container .content").slideUp('slow'); $("#menu-container .register-section").slideDown('slow'); $(".logo-top-margin").animate({marginTop:'0'}, "slow"); $(".logo-top-margin").animate({marginLeft:'0'}, "slow"); return false; }); $(".main-menu a.loginbutton").click(function(){ $("#menu-container .content").slideUp('slow'); $("#menu-container .login-section").slideDown('slow'); $(".logo-top-margin").animate({marginTop:'0'}, "slow"); $(".logo-top-margin").animate({marginLeft:'0'}, "slow"); return false; }); $(".main-menu a.contactbutton").click(function(){ $("#menu-container .content").fadeOut(); $("#menu-container .contact-section").slideDown('slow'); $(".logo-top-margin").animate({marginTop:'0'}, "slow"); $(".logo-top-margin").animate({marginLeft:'0'}, "slow"); return false; }); $('.toggle-menu').click(function(){ $('.show-menu').stop(true,true).slideToggle(); return false; }); $('.show-menu a').click(function() { $('.show-menu').fadeOut('slow'); }); } )(jQuery);
const { config } = require('./wdio.local.dev.tools.desktop.conf') // ============ // Capabilities // ============ config.specs = ['./tests/specs/init.spec.js'] exports.config = config
import React, {useState, useEffect} from 'react'; import {StyleSheet, View, TouchableOpacity, Image, Modal} from 'react-native'; import {Button} from 'native-base'; import Toast from 'react-native-toast-message'; import {FlatGrid} from 'react-native-super-grid'; import axios from 'axios'; import {useSelector} from 'react-redux'; import {API_URL} from '@env'; import {colors} from '../../../utils'; import {Text} from '../../../components'; const ProductSeller = ({navigation}) => { // const {itemId} = route.params; const [product, setProduct] = useState([]); const [modalVisible, setModalVisible] = useState(false); const token = useSelector((state) => state.authReducer.token); useEffect(() => { getProductsSeller(); }, []); useEffect(() => { const unsubscribe = navigation.addListener('focus', () => { getProductsSeller(); }); return unsubscribe; }, [navigation]); const getProductsSeller = () => { axios .get(`${API_URL}/products/user?keyword=created_at DESC`, { headers: { 'x-access-token': 'Bearer ' + token, }, }) .then((res) => { const product = res.data.data; setProduct(product); }) .catch((err) => { console.log(err); }); }; const deleteProduct = async (id) => { await axios .delete(`${API_URL}/products/${id}`, { headers: { 'x-access-token': 'Bearer ' + token, }, }) .then((res) => { Toast.show({ type: 'success', position: 'top', text1: 'You delete product', visibilityTime: 4000, autoHide: true, }); console.log('SUCCESS DELETE', res.data); getProductsSeller(); }) .catch((err) => { console.log(err); }); }; return ( <> <FlatGrid itemDimension={130} data={product} style={styles.gridView} spacing={10} renderItem={({item}) => ( <> <View style={styles.containerCard}> <TouchableOpacity onPress={() => navigation.navigate('DetailProduct', { itemId: item.id, categories: item.category_name, }) }> <View style={[styles.itemContainer, {backgroundColor: 'white'}]}> <Image source={{ uri: `${API_URL}${JSON.parse( item.product_photo, ).shift()}`, }} style={{ borderRadius: 10, width: '100%', height: 100, }} resizeMode="contain" /> <View style={{marginVertical: 5}}> <Text style={styles.itemName}>{item.product_name}</Text> <Text style={styles.itemCode}>Rp.{item.product_price}</Text> </View> </View> </TouchableOpacity> <View style={{ flexDirection: 'row', justifyContent: 'space-around', marginVertical: 5, }}> <TouchableOpacity onPress={() => { navigation.navigate('UpdateProductSeller', { itemId: item.id, }); }} style={[styles.btnEditDelete, {backgroundColor: '#77ff0e'}]}> <Text color="black" size="l"> Edit </Text> </TouchableOpacity> <TouchableOpacity style={styles.btnEditDelete} onPress={() => { setModalVisible(true); // deleteProduct(item.id); }}> <Text color="white" size="l"> Delete </Text> </TouchableOpacity> </View> </View> <Modal animationType="fade" transparent={true} // hardwareAccelerated={true} statusBarTranslucent={true} visible={modalVisible}> <View style={styles.centeredView}> <View style={styles.modalView}> <Text style={styles.modalText}> Are you sure want to delete product? </Text> <View style={{ marginTop: 20, flexDirection: 'row', width: 250, justifyContent: 'space-between', }}> <Button style={{ ...styles.closeButton, backgroundColor: colors.white, borderColor: colors.red, borderWidth: 1, }} onPress={() => { setModalVisible(!modalVisible); }}> <Text style={{...styles.textStyle, color: colors.red}}> No </Text> </Button> <Button style={{ ...styles.closeButton, backgroundColor: colors.red, }} onPress={() => { deleteProduct(item.id); setModalVisible(!modalVisible); }}> <Text style={styles.textStyle}>Yes</Text> </Button> </View> </View> </View> </Modal> </> )} /> <TouchableOpacity // activeOpacity={0.2} onPress={() => navigation.navigate('AddProduct')} style={styles.TouchableOpacityStyle}> <Image source={{ uri: 'https://raw.githubusercontent.com/AboutReact/sampleresource/master/plus_icon.png', }} style={styles.FloatingButtonStyle} /> </TouchableOpacity> </> ); }; const styles = StyleSheet.create({ gridView: { marginTop: 10, flex: 1, }, containerCard: { backgroundColor: 'white', borderRadius: 10, }, btnEditDelete: { backgroundColor: colors.red, paddingHorizontal: 20, paddingVertical: 5, justifyContent: 'center', borderRadius: 50, }, itemContainer: { // justifyContent: 'flex-end', borderRadius: 10, padding: 10, height: 180, // marginTop: 30, // marginBottom: 20, }, itemName: { fontSize: 16, color: '#000000', fontWeight: 'bold', // paddingHorizontal: 7, }, itemCode: { fontWeight: '600', fontSize: 12, color: '#000000', }, TouchableOpacityStyle: { position: 'absolute', width: 50, height: 50, alignItems: 'center', justifyContent: 'center', right: 30, bottom: 30, }, FloatingButtonStyle: { resizeMode: 'contain', width: 50, height: 50, //backgroundColor:'black' }, centeredView: { flex: 1, justifyContent: 'center', alignItems: 'center', marginTop: 22, backgroundColor: 'rgba(0, 0, 0, 0.1)', }, modalView: { height: 200, width: 300, margin: 20, backgroundColor: 'white', borderRadius: 20, padding: 35, alignItems: 'center', shadowColor: '#000', shadowOffset: { width: 0, height: 2, }, shadowOpacity: 0.25, shadowRadius: 3.84, elevation: 5, }, closeButton: { backgroundColor: '#6379F4', height: 40, width: 100, borderRadius: 20, padding: 10, elevation: 2, justifyContent: 'center', alignItems: 'center', flexDirection: 'column', }, textStyle: { color: 'white', fontWeight: 'bold', textAlign: 'center', }, modalText: { marginBottom: 15, textAlign: 'center', fontSize: 25, }, }); export default ProductSeller;
const $ = window.$ var swup = new Swup({ animateScroll: false, preload: false, // plugins: [new SwupGaPlugin()] }) Delighters.config({ start: 0.95 }) var alertCookies = { init: function () { this.show() }, show: function (duration) { $('.alert').slideDown(duration) }, close: function (duration) { $('.alert').slideUp(duration) } } alertCookies.init() var dialogComponent = { init: function () { window.setTimeout(function () { $('.dialog').addClass('is-open') }, 2000) $('.dialog__media a').click(function () { $('.dialog').removeClass('is-open') }) }, initFast: function () { $('.dialog').addClass('is-open') }, close: function () { $('.dialog').removeClass('is-open') Cookies.set('hide-div', true, { expires: 1 }) }, initTrigger: function () { $('.dialog-tab__trigger').click(function (event) { event.preventDefault() dialogComponent.initFast() }) } } // dialogComponent.initTrigger() // if ( !Cookies.get('hide-div') ) { // dialogComponent.init() // } $(document).keyup(function (e) { if (e.keyCode === 27) { dialogComponent.close() } }) $(document).ready(function () { $('.swipebox').swipebox() $('.button--menu').click(function () { $(this).find('.hamburger').toggleClass('active') //$body.toggleClass('menu-is-open') $('.menu-principal-inner').slideToggle() gtag('event','mobile - menu open',{ 'event_category': 'navigation', 'event_label': $(i).attr('href') }); }) var carousels = { init: function () { var $carousel = $("[class$='-carousel']") var $cardCarousel = $('.media-carousel--card') var $contentCarousel = $('.media-carousel--content') var $autoplayCarousel = $('.media-carousel--autoplay') var $testimonisCarousel = $('.media-carousel--testimonis') var $heroCarousel = $('.media-carousel--hero') function itemCount (event) { var items = event.item.count var item = event.item.index $(this).parents('.card, .content').find('.media-info__span').html(item + 1 + '/' + items) } $carousel.on('initialized.owl.carousel', itemCount) $carousel.on('changed.owl.carousel', itemCount) $cardCarousel.owlCarousel({ items: 1, dots: false, lazyLoad: true, nav: true, navText: '' }).on('changed.owl.carousel', function(event) { gtag('event','card slide',{ 'event_category': 'navigation', 'event_label': $(event.currentTarget).parent().parent().attr('data-name') }); }) $contentCarousel.owlCarousel({ items: 1, dots: false, lazyLoad: true, margin: 0, thumbs: true, thumbsPrerendered: true, nav: true, navText: '' }).on('changed.owl.carousel', function(event) { gtag('event','slide detall',{ 'event_category': 'navigation', 'event_label': $(event.currentTarget).attr('data-name') }); }) $autoplayCarousel.owlCarousel({ items: 1, dots: false, loop: true, margin: 0, nav: true, navText: '', autoplay: true, autoplayTimeout: 2000 }).on('changed.owl.carousel', function(event) { gtag('event','slide autoplay',{ 'event_category': 'navigation', 'event_label': $(event.currentTarget).attr('data-name') }); }) $testimonisCarousel.owlCarousel({ items: 1, dots: false, loop: true, margin: 0, nav: true, navText: '', autoplay: true, autoplayTimeout: 2000 }) $heroCarousel.owlCarousel({ items: 1, dots: false, loop: true, margin: 0, nav: false, navText: '', autoplay: true, autoplayTimeout: 5000, animateOut: 'fadeOut' }) } } carousels.init() document.addEventListener('swup:contentReplaced', event => { window.dataLayer.push({ event: 'VirtualPageview', virtualPageURL: window.location.pathname + window.location.search, virtualPageTitle: document.title }); window.gtag('config', 'UA-118311392-1', { 'page_title' : document.title, 'page_path': window.location.pathname + window.location.search }); carousels.init() $('.swipebox').swipebox() pageDetall.init() toHashes.init() Delighters.init() CalcularFinanciacion.init() AnalyticsTracking.init() if ($('.page_expositor').length == 1) { if ( !Cookies.get('hide-div') ) { dialogComponent.init() dialogComponent.initTrigger() } } if ($('.page_home').length == 0) { $('.button--goBack').fadeIn(100) } else { $('.button--goBack').fadeOut(100) } }); }) if ($('.page_expositor').length == 1) { if ( !Cookies.get('hide-div') ) { dialogComponent.init() } } var toHashes = { init: function () { // Select all links with hashes $('a[href*="#"]') // Remove links that don't actually link to anything .not('[href="#"]') .not('[href="#0"]') .click(function (event) { // On-page links if (location.pathname.replace(/^\//, '') === this.pathname.replace(/^\//, '') && location.hostname === this.hostname) { // Figure out element to scroll to var target = $(this.hash) target = target.length ? target : $('[name=' + this.hash.slice(1) + ']') // Does a scroll target exist? if (target.length) { gtag('event','detail menu',{ 'event_category': 'navigation', 'event_label': this.hash.slice(1) }); // Only prevent default if animation is actually gonna happen event.preventDefault() $('html, body').animate({ scrollTop: target.offset().top - 230 }, 1000, function () { // Callback after animation // Must change focus! var $target = $(target) $target.focus() if ($target.is(':focus')) { // Checking if the target was focused return false } else { $target.attr('tabindex', '-1') // Adding tabindex for elements not focusable $target.focus() // Set focus again } }) } } }) } } toHashes.init() // Google Maps function initialize () { var map = L.map('map-canvas').setView([41.5689845, 2.2443539], 14); L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { // attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors' }).addTo(map); L.marker([41.5689845, 2.2443539]).addTo(map); } // google.maps.event.addDomListener(window, 'load', initialize) $(window).on("load", initialize ); // Set Font Size Based On Word Count // var $cardTitleModelo = $(".title-modelo") // $cardTitleModelo.each(function() { // var $numWords = $(this).text().split(" ").length // if ( $numWords > 5 ) { // $(this).css("font-size", ".97em") // } // }) var CalcularFinanciacion = { init: function () { $('.jsCalcularFinanciacion').click(function (event) { event.preventDefault() var $alertFinaciacion = $('.alert_financiacion') var val = $('.financiacion__form .form__import').val() val = val.replace('.', '').replace(',', '.') val = parseFloat(val) if (!isNaN(val)) { gtag('event','financiancion calc',{ 'event_category': 'contact', 'event_label': val }); var $opt = $('.financiacion__form select option:selected') var coef = parseFloat($opt.attr('data-rel')) var num = $('.financiacion__form select').first().val() var result = (val * coef) $alertFinaciacion.find('span.calculat').text(result.toFixed(2).replace('.', ',')) $alertFinaciacion.fadeIn() } else { $('.financiacion__form .form__import').addClass('error') $alertFinaciacion.fadeOut() } }) } } CalcularFinanciacion.init() $('.form__import').on('keydown', function () { $('.alert_financiacion').fadeOut() }) $('.financiacion__form select').on('change', function () { $('.alert_financiacion').fadeOut() }) var $menu = $('.menu'), $menuItem = $('.menu__item'), $menuItemA = $('.menu__item a'), $menuSubmenuTrigger = $('.menu__submenu-trigger'), $menuSubmenu = $('.menu__submenu') $menuSubmenuTrigger.click(function (event) { event.preventDefault() gtag('event','menu toggle',{ 'event_category': 'navigation', 'event_label': $(this).parent().text().trim() }); $(this).toggleClass('-active') $(this).parent().next($menuSubmenu).slideToggle() }) $('.menu__item, .menu__item a, .main__branding a, .button--goBack').click(function () { if ($('.hamburger.active').length == 1 && !$(this).hasClass("menu__item--submenu")) { $('.button--menu').click() } }) $('.main__branding a').click(function () { $('.menu--principal').find('.menu__item').removeClass('-current') }) $menuItem.click(function () { if (!$(this).hasClass("menu__item--submenu")) { $(this).parents('.menu--principal').find('.menu__item').removeClass('-current') $(this).addClass('-current').addClass('-active') } }) $menuItemA.click(function () { $(this).parents('.menu--principal').find('.menu__item').removeClass('-current') $(this).parents('.menu__item--submenu').addClass('-current').addClass('-active') }) var pageDetall = { init: function () { if ( $('.page_detall').length) { $('*').click(function () { if ( $('.form__item').is(":focus") ) { gtag('event','focus form',{ 'event_category': 'contactar', 'event_label': 'focus in missatge' }); $('.informacion__inputs-hided').slideDown(); } else if ( $(window).width() > 500 ) { $('.informacion__inputs-hided').slideUp(); } }) $('.informacion__form-toggle').on('click touchstart', function (event) { event.preventDefault(); gtag('event','mobile - open form',{ 'event_category': 'contactar', 'event_label': 'open contact form' }); $('.inner-mobile').slideToggle() $('.informacion').toggleClass('-open') }) $('.inner-mobile__close').on('click', function (event) { $('.inner-mobile').slideUp() }) $('.informacion__telefono').on('click',function(){ gtag('event','call',{ 'event_category': 'contactar', 'event_label': 'call phone' }); }); } } } pageDetall.init() // analytics tracking var AnalyticsTracking = { init: function () { $('.breadcrumb__item').each(function(k,i){ $(i).on('click',function(){ gtag('event','breadcrumb',{ 'event_category': 'navigation', 'event_label': $(i).attr('href') }); }); }); $('.breadcrumb__item').each(function(k,i){ $(i).on('click',function(){ gtag('event','breadcrumb',{ 'event_category': 'navigation', 'event_label': $(i).attr('href') }); }); }); $('.footer_contacte_link').each(function(k,i){ $(i).on("click",function(){ var rel = $(i).attr('data-rel'); gtag('event', 'footer',{ 'event_category': 'contactar', 'event_label': rel }); }); }); $('.links_marques .menu__link').each(function(k,i){ $(i).on("click",function(){ var rel = $(i).attr('data-rel'); gtag('event', 'footer link',{ 'event_category': 'navigation', 'event_label': $(i).text().trim() }); }); }); } } AnalyticsTracking.init()
import React, {Component} from 'react'; import {Platform, StyleSheet, Text, View,Image,ImageBackground,TouchableOpacity} from 'react-native'; import { Input,Button } from 'react-native-elements'; import Icon from 'react-native-vector-icons/FontAwesome'; export default class Savings extends React.Component{ static navigationOptions = { title: 'ඉතිරිකිරීම් ගණකය',headerTintColor: '#fff', headerStyle: {backgroundColor: '#6897e2',}, headerTitleStyle: {fontSize: 18,}, }; constructor(props) { super(props) this.state = { initDeposit: "",rate:"",months:"",total:"0",interest:"0" }; } buttonClick = () =>{ const { initDeposit,rate,months} = this.state ; tot=Number(initDeposit)*Math.pow(1+((Number(rate)*0.01)/12),Number(months)); if (initDeposit!="" && rate!="" && months!="") { this.setState({ total: (Number(tot)).toFixed(2), interest:(Number(tot)-Number(initDeposit)).toFixed(2) }); } } render(){ return( <View> <View style={styles.inputs}> <Input label='ආරම්භක තැන්පතුව' labelStyle={styles.txtInput} leftIcon={ <Icon name='money' size={20} color='black' /> } keyboardType={'numeric'} onChangeText={initDeposit => this.setState({initDeposit})} /> </View> <View style={styles.inputs}> <Input style={styles.inputs} label='පොලී අනුපාතය(% වසරකට)' labelStyle={styles.txtInput} leftIcon={ <Icon name='percent' size={20} color='black' /> } keyboardType={'numeric'} onChangeText={rate => this.setState({rate})} /> </View> <View style={styles.inputs}> <Input style={styles.inputs} label='තැන්පතු කාලය(මාස)' labelStyle={styles.txtInput} leftIcon={ <Icon name='calendar' size={20} color='black' /> } keyboardType={'numeric'} onChangeText={months => this.setState({months})} /> </View> <View style={styles.inputs}> <TouchableOpacity style={styles.center}> <Button title="ගණනය කරන්න" raised onPress={this.buttonClick} containerStyle={styles.butt} /> </TouchableOpacity> </View> <Text style={styles.text}>කාලසීමාව අවසානයේ මුළු තැන්පතු මුදල :<Text style={styles.text1}> රු.{this.state.total}</Text></Text> <Text style={styles.text2}>ලබාගත් මුළු පොලිය :<Text style={styles.text1}> රු.{this.state.interest}</Text></Text> </View> ); } } const styles = StyleSheet.create({ inputs:{ marginTop:15, }, text:{ color:'#000',fontSize: 15,marginTop:25,marginLeft:10 }, text1:{ color:'#415ddb',fontSize: 18, }, text2:{ color:'#000',fontSize: 15,marginTop:5,marginLeft:10 }, txtInput:{ fontSize:13,marginBottom:-10 }, butt:{ width:340, }, center:{ alignItems:'center' }, txtInput:{ fontSize:15, } });
import React, { Component } from 'react'; import './App.css'; import { Route } from 'react-router-dom'; import ShelvesList from './ShelvesList' import BookSearch from './BookSearch' import * as BooksAPI from './BooksAPI' class App extends Component { state = { books: [] } componentDidMount(){ const books = BooksAPI.getAll() .then((books) => { this.setState(()=>({ books })) }) } switchShelf = (book, shelf) => { BooksAPI.update(book, shelf) .then(() => { book.shelf = shelf this.setState((currentState) => ({ books: currentState.books.filter((b) => { return b.id !== book.id }).concat([{...book, shelf: shelf}]) })) }) } addBook = (book, shelf) => { } render() { return ( <div className="app"> <Route exact path='/' render={() => ( <ShelvesList books={this.state.books} onSelectShelf={this.switchShelf} /> )}/> <Route path='/search' render={() => ( <BookSearch onSelectShelf={this.switchShelf} booksOnShelf={this.state.books} /> )}/> </div> ); } } export default App;
import $ from 'jquery'; $('body').css({color: 'green'});
import { faChevronLeft, faChevronRight } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import * as React from 'react'; import styled from 'styled-components'; import { obterMes } from '../lib/formatadorDeString'; const Div = styled.div` display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; margin-bottom: 20px; `; const BotaoEsquerdo = styled.a` border: none; text-decoration: none; cursor: pointer; font-size: 30px; justify-self: left; `; const BotaoDireito = styled.a` border: none; text-decoration: none; cursor: pointer; font-size: 30px; justify-self: right; `; export default function FiltroDeReferencia({ filtroDeReferencia, buscarAnterior, buscarProximo }) { return ( <Div> <BotaoEsquerdo onClick={() => buscarAnterior()}> <FontAwesomeIcon icon={faChevronLeft}></FontAwesomeIcon> </BotaoEsquerdo> <h1>{obterMes(filtroDeReferencia.mesReferencia)} / {filtroDeReferencia.anoReferencia}</h1> <BotaoDireito onClick={() => buscarProximo()}> <FontAwesomeIcon icon={faChevronRight}></FontAwesomeIcon> </BotaoDireito> </Div> ); };
'use strict'; /* Controllers */ angular.module('ssApp.controllers') .controller('homeController', function($scope, $routeParams, $location, $route) { $scope.cities = [ {'class': 'ny', 'name': 'Devs', 'endpoint' :'nyc'}, {'class': 'au', 'name': 'Designers', 'endpoint' :'atx' }, {'class': 'la', 'name': 'Negocio', 'endpoint' :'la'}, {'class': 'ba', 'name': 'Monstruos', 'endpoint' :'ba'} ]; });
var MenuItem = require('./MenuItem').MenuItem; var config = require('./config'); var Hamburger = function (size, stuffing) { MenuItem.call(this, size); this.size = size; this.stuffing = stuffing; this.price += stuffing.price; this.calories += stuffing.calories; } Hamburger.prototype = Object.create(MenuItem.prototype); Hamburger.prototype.constructor = Hamburger; Hamburger.prototype.getSize = function () { return this.size; } Hamburger.prototype.getStuffing = function () { return this.stuffing; } Hamburger.SIZE_SMALL = { name: config.SIZE_SMALL_NAME, price: config.SIZE_SMALL_PRICE, calories: config.SIZE_SMALL_CALORIES }; Hamburger.SIZE_LARGE = { name: config.SIZE_LARGE_NAME, price: config.SIZE_LARGE_PRICE, calories: config.SIZE_LARGE_CALORIES }; Hamburger.STUFFING_CHEESE = { name: config.STUFFING_CHEESE_NAME, price: config.STUFFING_CHEESE_PRICE, calories: config.STUFFING_CHEESE_CALORIES }; Hamburger.STUFFING_SALAD = { name: config.STUFFING_SALAD_NAME, price: config.STUFFING_SALAD_PRICE, calories: config.STUFFING_SALAD_CALORIES }; Hamburger.STUFFING_POTATO = { name: config.STUFFING_POTATO_NAME, price: config.STUFFING_POTATO_PRICE, calories: config.STUFFING_POTATO_CALORIES }; module.exports = Hamburger;
const shell = require('shelljs'), path = require('path'), fs = require('fs'); const bdd = require('./bddUtils'), random = require('./monkeyUtils'), mutant = require('./mutantUtils'); const strategiesPath = path.join(process.cwd(), 'strategies'); const public = {}; /* { appId: Number // Id of the app in the device manager appVersion: Number // Number of the app version that this startegy applies to name: String, description: String, package: String, avds: [String] //Array with the names of the avds you want to run the tests on tests: { bdd: { enabled: Boolean //If you will run this tests in the following execution }, random: { enabled: Boolean //If you will run this tests in the following execution executions: Number // Number of executions per avd events: Number // Number of events per execution }, mutant: { enabled: Boolean //If you will run this tests in the following execution } } } */ public.saveStrategy = (appId, appVersion, strategy) => { strategy.appVersion = appVersion; strategy.appId = appId; const strategyString = JSON.stringify(strategy); const strategyPath = path.join(strategiesPath, appId, appVersion); shell.mkdir('-p', strategyPath); fs.writeFileSync(path.join(strategyPath, 'strategy.json'), strategyString); } public.runStrategy = async (appId, appVersion) => { const strategy = await getStrategy(appId, appVersion); if(!strategy) return; const tests = strategy.tests const finalReport = {} if(tests.bdd && tests.bdd.enabled) { const bddReportDir = await bdd.runBDD( {appId, version: appVersion}, strategy.avds ) finalReport.bdd = bddReportDir } if(tests.random && tests.random.enabled) { const randomReportDir = await random.runMonkey(appId, strategy.package, tests.random.events, tests.random.executions, strategy.avds, appVersion); finalReport.random = randomReportDir; } if(tests.mutant && tests.mutant.enabled) { const mutantReportDir = await mutant.runMutants(appId, appVersion, strategy.avds); finalReport.mutant = mutantReportDir; } const strategyReportPath = path.join(strategiesPath, appId, appVersion, 'strategy-report.json'); fs.writeFileSync(strategyReportPath, JSON.stringify(finalReport)) } function getStrategy(appId, appVersion) { const strategyPath = path.join(strategiesPath, appId, appVersion, 'strategy.json'); return new Promise((resolve, reject) => { if(!shell.test('-f', strategyPath)) return; fs.readFile(strategyPath, (err, data) => { if(err) { reject(err); } resolve(JSON.parse(data)); }) }) } module.exports = public
module.exports = { common: { ids_cancel: "str_cancel", ids_apply: "str_apply", ids_note: "str_note", ids_success: "str_success", ids_fail: "str_fail", ids_error: "str_error", ids_ok: "str_ok", ids_confirm: "str_confirm", ids_delete: "str_delete", ids_back: "str_back" }, menu: { ids_menu_security: "str_wlan_security", ids_menu_status: "str_status" }, sim: { ids_sim_enterPin: "str_status_enterPin", }, mobileConnection: { ids_network_Mobconn: "str_network_Mobconn", ids_netwrok_connnectIpMode: "str_netwrok_connnectIpMode" }, monthlyPlan: { ids_monthlyPlan_dataPlan: "str_monthlyPlan_dataPlan", ids_monthlyPlan_pageTitle: "str_monthlyPlan_pageTitle", ids_monthlyPlan_autoDisconnet: "str_monthlyPlan_autoDisconnet", ids_dataConsuption: "str_dataConsuption", ids_monthlyPlan_setTimeLimit: "str_monthlyPlan_setTimeLimit", ids_isTimeLimit: "str_isTimeLimit", ids_monthlyPlan_timePass: "str_monthlyPlan_timePass", ids_monthlyPlan_totalUsageInvalid: "str_monthlyPlan_totalUsageInvalid", ids_monthlyPlan_overtimeInvalid: "str_monthlyPlan_overtimeInvalid", ids_kb: "str_kb", ids_mb: "str_mb", ids_gb: "str_gb" }, networkSettings: { ids_netwrok_Title: "str_netwrok_Title", ids_networkSearchMode: "str_networkSearchMode", ids_netwrok_search: "str_netwrok_search" }, profileManagement: { ids_profile_pageTitle: "str_profile_pageTitle", ids_profile_profileManagement: "str_profile_pageTitle", ids_profile_name: "str_profile_name", ids_profile_dialNumber: "str_profile_dialNumber", ids_profile_dialNumberInvalid: "str_profile_dialNumberInvalid", ids_profile_apn: "str_profile_apn", ids_profile_apnInvalid: "str_profile_apnInvalid", ids_profile_userName: "str_profile_userName", ids_profile_userNameInvalid: "str_profile_userNameInvalid", ids_profile_password: "str_profile_password", ids_profile_nameInvalid: "str_profile_nameInvalid", ids_profile_nameRepeatPrompt: "str_profile_nameRepeatPrompt", ids_profile_pwdInvalid: "str_profile_pwdInvalid", ids_profile_Note: "str_profile_Note", ids_profile_setDefault: "str_profile_setDefault", ids_profile_delete: "str_profile_delete", ids_profile_numRule: "str_profile_numRule" }, macClone: { ids_macClone_menuMacClone: "str_ethWan_menuMacClone", ids_macClone_currentMACAddress: "str_ethWan_currentMACAddress", ids_macClone_hostMACAddress: "str_ethWan_hostMACAddress", ids_macClone_clone: "str_ethWan_clone", ids_macClone_reset: "str_reset", ids_macClone_restartWarn: "str_lan_restartWarn", ids_macClone_macInvalid: "str_ethWan_macInvalid", }, wanConfigure: { ids_wanConfigure_restartWarn: "str_lan_restartWarn", ids_wanConfigure_connectionMode: "str_netwrok_connectionMode", ids_wanConfigure_Title: "str_wan_configureTitle", ids_wanConfigure_ipAddress: "str_ipAddress", ids_wanConfigure_subnetMark: "str_subnetMark", ids_wanConfigure_defaultGateway: "str_ethWan_defaultGateway", ids_wanConfigure_Mtu: "str_ethWan_Mtu", ids_wanConfigure_MtuNote: "str_ethWan_MtuNote", ids_wanConfigure_mtuInvalid: "str_ethWan_mtuInvalid", ids_wanConfigure_primaryDNS: "str_ethWan_primaryDNS", ids_wanConfigure_secondaryDNS: "str_ethWan_secondaryDNS", ids_wanConfigure_userName: "str_profile_userName", ids_wanConfigure_password: "str_profile_password", ids_wanConfigure_dhcp: "str_ethWan_dhcp", ids_wanConfigure_pppoe: "str_ethWan_pppoe", ids_wanConfigure_staticIp: "str_ethWan_staticIp" }, wanStatus: { ids_wanStatus_menuWanStatus: "str_ethWan_menuWanStatus", ids_wanStatus_duration: "str_duration", ids_wanStatus_conStatus: "str_lan_conStatus", ids_wanStatus_macAdress: "str_lan_macAdress", ids_wanStatus_connectionMode: "str_netwrok_connectionMode", ids_wanStatus_ipAddress: "str_ipAddress", ids_wanStatus_subnetMark: "str_subnetMark", ids_wanStatus_defaultGateway: "str_ethWan_defaultGateway", ids_wanStatus_primaryDNS: "str_ethWan_primaryDNS", ids_wanStatus_secondaryDNS: "str_ethWan_secondaryDNS", ids_wanStatus_connected: "str_connected", ids_wanStatus_disconnected: "str_disconnected", }, setupWizard: { ids_quicksetup_wlanSecurity: "str_quicksetup_wlanSecurity", ids_quicksetup_done: "str_quicksetup_done", }, wlan: { ids_wlan_advanced: "str_wlan_advanced", ids_wlan_basic: "str_wlan_basic", //ids_wlan_2ghz: "str_wlan_2ghz", //ids_wlan_5ghz: "str_wlan_5ghz", //ids_wlan_ssidBroadcast: "str_wlan_ssidBroadcast", //ids_wlan_security: "str_wlan_security", ids_wlan_wlan2g: "str_quicksetup_wlan2g", ids_wlan_wlan5g: "str_quicksetup_wlan5g", ids_wlan_ssid: "str_wifi_ssid", ids_wlan_wlanPassword: "str_quicksetup_wlanPassword", ids_wlan_showPw: "str_wlan_showPw", ids_wlan_restartWarn: "str_lan_restartWarn", ids_wlan_disabled: "str_disabled", ids_wlan_countryRegion: "str_wlan_countryRegion", ids_wlan_channel: "str_wlan_channel", ids_wlan_802Mode: "str_wlan_802Mode", ids_wlan_apIsolation: "str_wlan_apIsolation", ids_wlan_bandwidth: "str_wlan_bandwidth", }, basic: { }, advanced: { }, wps: { ids_wps_wpsPin: "str_wlan_wpsPin", ids_wps_InvalidWpsPinTips: "str_wlan_InvalidWpsPinTips", ids_wps_title_wps: "str_title_wps", ids_wps_wpsMode: "str_wlan_wpsMode", ids_wps_enableWpsPinStep1: "str_wifi_enableWpsPinStep1", ids_wps_enableWpsPinStep2: "str_wifi_enableWpsPinStep2", ids_wps_enableWpsPinStep3: "str_wifi_enableWpsPinStep3", ids_wps_enablePbcStep1: "str_wifi_enablePbcStep1", ids_wps_enablePbcStep2: "str_wifi_enablePbcStep2", ids_wps_enablePbcStep3: "str_wifi_enablePbcStep3", ids_wps_notSuppotWepWpa: "str_wifi_notSuppotWepWpa", ids_wps_wpsActive: "str_wifi_wpsActive", ids_wps_pbc: "str_wifi_pbc", ids_wps_wlanOff: "str_wifi_cannotSet", ids_wps_notSuppotSSIDHidden: "str_wifi_wpsNotSuppotSSIDHidden", ids_wps_notSuppotMacFilter: "str_wifi_notSuppotMacFilter" }, macFilter: { }, wanPing: { }, pinManagement: { ids_pinManagement_pinManagement: "str_sim_pinManagement", ids_pinManagement_pinStatus: "str_sim_pinOperation", ids_pinManagement_changePin: "str_pinManagement_change", ids_pinManagement_pinCode: "str_sim_pinCode", ids_pinManagement_remaining: "str_sim_remaining", ids_pinManagement_oldPinCode: "str_sim_oldPinCode", ids_pinManagement_newPinCode: "str_sim_newPinCode", ids_pinManagement_autoValidation: "str_sim_autoValidation", ids_pinManagement_newPinRule: "str_sim_newPinRule", ids_pinManagement_confirmedPin: "str_sim_confirmedPin", }, routingRules: { }, ipFilter: { }, urlFilter: { }, parentalControl: { }, lanSettings: { ids_lanSettings_lanSettings: "str_lan_lanSettings", ids_lanSettings_gatewayAddress: "str_wlan_gatewayAddress", ids_lanSettings_subnetMark: "str_subnetMark", ids_lanSettings_dhcpServer: "str_lan_dhcpServer", ids_lanSettings_startIpAddress: "str_lan_startIpAddress", ids_lanSettings_dhcpLeaseTime: "str_lan_dhcpLeaseTime", ids_lanSettings_endIpAddress: "str_lan_endIpAddress", ids_lanSettings_hours: "str_hours", ids_lanSettings_subnetInvalid: "str_router_subnetInvalid", ids_lanSettings_ipInvalid: "str_qos_ipInvalid", ids_lanSettings_startToEnd: "str_lan_startToEnd", ids_lanSettings_endToStartIp: "str_lan_endToStartIp", ids_lanSettings_endToStart: "str_lan_endToStart", ids_lanSettings_endIpRule: "str_lan_endIpRule", ids_lanSettings_DHCPIpRule: "str_lan_DHCPIpRule", }, changePassword: { ids_changePassword_loginPwd: "str_login_loginPwd", ids_changePassword_userName: "str_profile_userName", ids_changePassword_currPwd: "str_admin_currPwd", ids_changePassword_newPwd: "str_admin_newPwd", ids_changePassword_confPwd: "str_admin_confPwd", ids_changePassword_inputCurrPwd: "str_login_inputCurrPwd", ids_changePassword_changeDefaultPass: "str_changePassword_changeDefaultPass", ids_changePassword_passwordRulePrompt: "str_admin_passwordRulePrompt", ids_changePassword_confirmPdwNotSame: "str_admin_confirmPdwNotSame" }, backup: { }, deviceInfo: { }, localUpgrade: { ids_localUpgrade_packageError:'str_localUpgrade_packageError', ids_localUpgrade_packageLower:'str_localUpgrade_packageLower', ids_localUpgrade_versionLatest:'str_localUpgrade_versionLatest', ids_localUpgrade_NoUpdatableFile:'str_localUpgrade_NoUpdatableFile', ids_localUpgrade_search:'str_localUpgrade_search', ids_localUpgrade_StopSearch:'str_localUpgrade_StopSearch', ids_localUpgrade_update:'str_localUpgrade_update', ids_localUpgrade_name:'str_localUpgrade_name' }, onlineUpgrade: { }, reboot: { ids_system_restartDevice: "str_system_restartDevice", ids_reboot_factory_settings: "str_reboot_factory_settings", }, reset: { ids_system_resetTips1: "str_system_resetTips1", ids_system_resetTips2: "str_system_resetTips2", ids_system_resetTips3: "str_system_resetTips3", ids_system_resetDescription: "str_system_resetDescription" }, resetReboot: { }, restore: { ids_restore_backup: "str_backup", ids_restore_backupDescription: "str_system_backupDescription", ids_restore_evice_restored: "str_restore_evice_restored", ids_restore_factory_settings: "str_restore_factory_settings", ids_restore_device_restoration: "str_restore_device_restoration", }, systemSettings: { ids_systemSettings_pageTitle: "str_system_pageTitle", ids_systemSettings_languageSettings: "str_system_languageSettings", ids_systemSettings_timeZone: "str_system_timeZone", ids_systemSettings_currentTime: "str_system_currentTime" }, ntpServer: { }, tr069: { }, alg: { ids_alg_Title: "str_alg_Title", ids_alg_iptSipInvalidPrompt: "str_alg_iptSipInvalidPrompt", ids_alg_sipPort: "str_alg_sipPort", ids_alg_title: "str_alg_title", ids_alg_h323Status: "str_alg_h323Status", ids_alg_sipStatus: "str_alg_sipStatus", ids_alg_sipPortNote: "str_alg_sipPortNote", ids_alg_Note: "str_alg_Note" }, dmz: { ids_dmz_dmzTitle: "str_security_dmzTitle", ids_dmz_dmzHostIP: "str_security_dmzHostIP", ids_dmz_dmzNote: "str_security_dmzNote" }, upnp: { ids_upnp_upnpTitle: "str_security_upnp", ids_upnp_upnpNote: "str_upnp_Note" }, virtualServer: { ids_vtServer_lanIp: "str_vtServer_lanIp", //ids_vtServer_lanPort: "str_vtServer_lanPort", ids_vtServer_titleVirtualServer: "str_vtServer_titleVirtualServer", //ids_vtServer_wanPort: "str_vtServer_wanPort", ids_vtServer_Note: "str_virtualServer_Note", ids_vtServer_name: "str_name", ids_vtServer_protocol: "str_protocol", ids_vtServer_status: "str_status", ids_vtServer_operation: "str_netwrok_operation", ids_vtServer_deleteConfirm: "str_delete_confirm", }, qos: { }, internetStatistics: { }, lanStatistics: { }, wlanStatistics: { }, internetStatus: { ids_internetStatus_simCardStatus: "str_sim_simCardStatus", ids_internetStatus_enterPin: "str_status_enterPin", ids_internetStatus_ipv4Address: "str_netwrok_ipv4Address", ids_internetStatus_ipv6Address: "str_netwrok_ipv6Address", ids_internetStatus_usbStatus: "str_usbStatus", ids_internetStatus_conStatus: "str_lan_conStatus" }, lanStatus: { ids_lanStatus_Lan1: "str_lan_Lan1", ids_lanStatus_Lan2: "str_lan_Lan2", ids_lanStatus_conStatus: "str_lan_conStatus", ids_lanStatus_dhcpServer: "str_lan_dhcpServer" }, wlanStatus: { ids_wlanStatus_change: "str_wlan_change", ids_wlanStatus_connectedUsers: "str_wlan_connectedUsers", ids_wlanStatus_gatewayAddress: "str_wlan_gatewayAddress" }, usb: { ids_usb_Title: "str_usb_Title", ids_usb_sambaEnableStep1: "str_usb_sambaEnableStep1", ids_usb_sambaEnableStep2: "str_usb_sambaEnableStep2", ids_usb_printerStep2: "str_usb_printerStep2", ids_usb_storageStep2: "str_usb_storageStep2", ids_usb_printerStep2Note: "str_usb_printerStep2Note", ids_usb_printerStep3: "str_usb_printerStep3", ids_usb_printerStep4: "str_usb_printerStep4", ids_usb_storage: "str_usb_storage", ids_usb_print: "str_usb_print", ids_usb_notInsert: "str_Wan_usbNotInsert", ids_usb_hardDisk: "str_samba_storageUsb" }, storageShare: { ids_storageShare_Title: "str_storageShare" }, samaba: { ids_samba_storage: "str_share_storage", ids_samba_Title: "str_samba_menuSamba", ids_samba_readOnly: "str_samba_readOnly", ids_samba_readWrite: "str_samba_readWrite", ids_samba_anonymous: "str_samba_anonymous", ids_samba_rights: "str_samba_rights", ids_samba_anonymousEnableTips: "str_anonymousEnableTips", ids_samba_anonymousDisableTips1: "str_anonymousDisableTips1", ids_samba_anonymousDisableTips2: "str_anonymousDisableTips2", ids_samba_anonymousDisableTips3: "str_anonymousDisableTips3", ids_samba_hardDisk: "str_samba_storageUsb" }, ftp: { ids_ftp_storage: "str_share_storage", ids_ftp_Title: "str_samba_menuFtp", ids_ftp_readOnly: "str_samba_readOnly", ids_ftp_readWrite: "str_samba_readWrite", ids_ftp_anonymous: "str_samba_anonymous", ids_ftp_rights: "str_samba_rights", ids_ftp_anonymousEnableTips: "str_anonymousEnableTips", ids_ftp_anonymousDisableTips1: "str_anonymousDisableTips1", ids_ftp_anonymousDisableTips2: "str_anonymousDisableTips2", ids_ftp_anonymousDisableTips3: "str_anonymousDisableTips3", ids_ftp_hardDisk: "str_samba_storageUsb" }, dlna: { ids_dlna_menuDlna: "str_samba_menuDlna" }, userSettings: { ids_user_connectDevice: "str_menu_connectDeviceAlfr", ids_user_macAdress: "str_lan_macAdress", ids_user_duration: "str_duration", ids_user_device: "str_device", ids_user_operation: "str_netwrok_operation", ids_user_deviceName: "str_system_deviceName", ids_user_blockedDevice: "str_title_blockDeviceAlfr", ids_user_btnBlock: "str_btn_block", ids_user_btnUnblock: "str_btn_unblock", ids_user_edit: "str_edit", ids_user_accessInternet: "str_user_accessInternet", ids_user_accessStorage: "str_user_accessStorage", ids_user_IP: "str_user_IP", ids_user_defaultForNew: "str_user_defaultForNew", ids_user_deviceAccess: "str_user_deviceAccess" }, draft: { ids_draft_draft: "str_sms_draft", ids_draft_storageStatus: "str_sms_storageStatus", ids_draft_phoneNumber: "str_sms_phoneNumber", ids_draft_content: "str_sms_content", ids_draft_time: "str_time", ids_draft_deleteSmsPrompt: "str_sms_deleteSmsPrompt", }, inbox: { ids_inbox_inbox: "str_sms_inbox", ids_inbox_storageStatus: "str_sms_storageStatus", ids_inbox_state: "str_state", ids_inbox_phoneNumber: "str_sms_phoneNumber", ids_inbox_content: "str_sms_content", ids_inbox_time: "str_time", ids_inbox_go: "str_go", ids_inbox_from: "str_sms_from", ids_inbox_reply: "str_sms_buttonReply", ids_inbox_forward: "str_sms_buttonForward", ids_inbox_deleteSmsPrompt: "str_sms_deleteSmsPrompt" }, newSMS: { ids_newSMS_newMessage: "str_sms_newMessage", ids_newSMS_to: "str_sms_to", ids_newSMS_inputNumber: "str_sms_inputNumber", ids_newSMS_numberRule: "str_sms_numberRule", ids_newSMS_contentRule: "str_sms_contentRule", ids_newSMS_send: "str_send", ids_newSMS_save: "str_save", ids_newSMS_sendingPrompt: "str_sms_sendingPrompt", ids_newSMS_boxFullPrompt: "str_sms_boxFullPrompt", ids_newSMS_message: "str_message", }, outbox: { ids_outbox_outbox: "str_sms_outbox", ids_outbox_storageStatus: "str_sms_storageStatus", ids_outbox_phoneNumber: "str_sms_phoneNumber", ids_outbox_content: "str_sms_content", ids_outbox_time: "str_time", ids_outbox_from: "str_sms_from", ids_outbox_reply: "str_sms_buttonReply", ids_outbox_forward: "str_sms_buttonForward", ids_outbox_deleteSmsPrompt: "str_sms_deleteSmsPrompt", }, smsForwarding: { ids_smsForwarding_smsForwarding: "str_sms_smsForwarding", ids_smsForwarding_autoForward: "str_sms_autoForward", ids_smsForwarding_recipient: "str_sms_recipient", }, smsSettings: { ids_smsSettings_smsSettings: "str_menu_smsSettings", ids_smsSettings_storagePath: "str_sms_storagePath", ids_smsSettings_settingSmsReport: "str_sms_settingSmsReport", ids_smsSettings_centerNum: "str_sms_centerNum", ids_smsSettings_modeSimCard: "str_sms_modeSimCard", ids_smsSettings_device: "str_device" }, smsReport: { ids_smsReport_deliveryReport: "str_sms_deliveryReport", ids_smsReport_successfullyDeliveredReport: "str_sms_successfullyDeliveredReport" }, login: { ids_login_loginPwd: "str_login_loginPwd", ids_login_placeHolder: "str_login_placeHolder", ids_login_rememberPassword: "str_login_rememberPassword", ids_login: "str_login", ids_login_wrongPwd: "str_login_wrongPwd", ids_login_otherLogin: "str_login_otherLogin", ids_login_timeuseout: "str_login_timeuseout", ids_login_changePasswordTips: "str_login_changePasswordTips", ids_login_changeNow: "str_login_changeNow", ids_login_forgotPassword:'str_login_forgotPassword', ids_login_forgotPassContentInfo:'str_login_forgotPassContentInfo' }, callLogs: { ids_callLogs_number: "str_number", ids_callLogs_time: "str_time", ids_callLogs_duration: "str_duration", ids_callLogs_Incoming: "str_call_Incoming", ids_callLogs_Outgoing: "str_call_Outgoing", ids_callLogs_Missed: "str_call_Missed", ids_callLogs_deleteCallRecord: "str_call_deleteCallRecord" }, index: { }, ids_help: "str_help", ids_home: "str_home", ids_internet: "str_internet", ids_lan_Lan: "str_lan_Lan", ids_logout: "str_logout", ids_network: "str_network", ids_settings: "str_settings", ids_signal: "str_signal", ids_statistics: "str_statistics", ids_system: "str_system", ids_system_copyright: "str_system_copyright", ids_sim_remainTime: "str_sim_remainTime", ids_loginTimeout: "str_loginTimeout", ids_notSupportTips: "str_notSupportTips", ids_managerAPP: "str_managerAPP", ids_required: "str_required", ids_call_pageTitle: "str_call_pageTitle", ids_NAT_Title: "str_NAT_Title", ids_connect: "str_connect", ids_connected: "str_connected", ids_connecting: "str_connecting", ids_disconnect: "str_disconnect", ids_disconnected: "str_disconnected", ids_disconnecting: "str_disconnecting", ids_lan_macAdress: "str_lan_macAdress", ids_sim_invalidSim: "str_sim_invalidSim", ids_sim_noSimCard: "str_sim_noSimCard", ids_sim_simReady: "str_sim_simReady", ids_wan_usageHistoryOverflow: "str_wan_usageHistoryOverflow", ids_wlan_off: "str_wlan_off", ids_sim_pinRequired: "str_sim_pinRequired", ids_sim_pukRequired: "str_sim_pukRequired", ids_sim_locked: "str_sim_locked", ids_sim_initializing: "str_sim_initializing", ids_wlan_2ghz: "str_wlan_2ghz", ids_wlan_5ghz: "str_wlan_5ghz", ids_download: "str_download", ids_netwrok_currentVolume: "str_netwrok_currentVolume", ids_total: "str_total", ids_type: "str_type", ids_upload: "str_upload", ids_byte: "str_byte", ids_packet: "str_packet", ids_discarded: "str_discarded", ids_lan_interface: "str_lan_interface", ids_wlan_received: "str_wlan_received", ids_netwrok_totalVolumeMonthly: "str_netwrok_totalVolumeMonthly", ids_network_resetStatistics: "str_network_resetStatistics", ids_netwrok_statisticsDescription: "str_netwrok_statisticsDescription", ids_2gOnly: "str_2gOnly", ids_3gOnly: "str_3gOnly", ids_4gOnly: "str_4gOnly", ids_auto: "str_auto", ids_disable: "str_disable", ids_enable: "str_enable", ids_pinManagement_enable: "str_enable", ids_manual: "str_manual", ids_netwrok_connectionMode: "str_netwrok_connectionMode", ids_netwrok_netMode: "str_netwrok_netMode", ids_netwrok_roamingEnable: "str_netwrok_roamingEnable", ids_next: "str_next", ids_setupWizard: "str_setupWizard", ids_wlan_security: "str_wlan_security", ids_wlan_ssidBroadcast: "str_wlan_ssidBroadcast", ids_wifi_on: "str_wifi_on", ids_wifi_off: "str_wifi_off", ids_wifi_ssid: "str_wifi_ssid", ids_wlan_encryption: "str_wifi_encryption", ids_wifi_wepOpen: "str_wifi_wepOpen", ids_wifi_wepShare: "str_wifi_wepShare", ids_wifi_WiFiTitle: "str_wifi_WiFiTitle", ids_profile_default: "str_profile_default", ids_sim_Title: "str_sim_Title", ids_sms_titleSms: "str_sms_titleSms", ids_save: "str_save", ids_sms_selectSmsPrompt: "str_sms_selectSmsPrompt", ids_sms_reprotHasBeenDeliveredTo: "str_sms_reprotHasBeenDeliveredTo", ids_sms_titleReport: "str_sms_titleReport", ids_sms_sendFail: "str_sms_sendFail", ids_invalid: "str_invalid", ids_call_noList: "str_call_noList", ids_services: "str_services", ids_netwrok_operation: "str_netwrok_operation", ids_system_deviceName: "str_system_deviceName", ids_menu_connectDevice: "str_menu_connectDeviceAlfr", ids_day: "str_day", ids_dialUp: "str_dialUp", ids_mins: "str_mins", ids_monthlyPlan_billingDay: "str_monthlyPlan_billingDay", ids_monthlyPlan_dayInvalid: "str_monthlyPlan_dayInvalid", ids_monthlyPlan_deleteRecords: "str_monthlyPlan_deleteRecords", ids_monthlyPlan_timeLimit: "str_monthlyPlan_timeLimit", ids_netwrok_available: "str_netwrok_available", ids_netwrok_current: "str_netwrok_current", ids_netwrok_forbidden: "str_netwrok_forbidden", ids_netwrok_networkName: "str_netwrok_networkName", ids_netwrok_networkType: "str_netwrok_networkType", ids_netwrok_noService: "str_netwrok_noService", ids_netwrok_register: "str_netwrok_register", ids_netwrok_registerFail: "str_netwrok_registerFail", ids_netwrok_registerSucceeded: "str_netwrok_registerSucceeded", ids_netwrok_registing: "str_netwrok_registing", ids_netwrok_roaming: "str_netwrok_roaming", ids_netwrok_searching: "str_netwrok_searching", ids_new: "str_new", ids_profile_authType: "str_profile_authType", ids_protocol: "str_protocol", ids_state: "str_state", ids_none: "str_none", ids_dialUp_Unavailable: "str_dialUp_Unavailable", ids_dialUp_Activate: "str_dialUp_Activate", ids_ethWan_macInvalid: "str_ethWan_macInvalid", ids_ethWan_wan: "str_ethWan_wan", ids_subnetMark: "str_subnetMark", ids_lan_DHCPIpRule: "str_lan_DHCPIpRule", ids_wlan_rebootConfirm: "str_wlan_rebootConfirm", ids_wlan_securityDisabled: "str_wlan_securityDisabled", ids_wlan_ssidRule: "str_wlan_ssidRule", ids_wlan_wepKeyRule: "str_wlan_wepKeyRule", ids_wlan_wpaKeyRule: "str_wlan_wpaKeyRule", ids_filter_ipFilter: "str_filter_ipFilter", ids_filter_macFilter: "str_filter_macFilter", ids_filter_macRuleMsg: "str_filter_macRuleMsg", ids_filter_urlAddress: "str_filter_urlAddress", ids_filter_urlFilter: "str_filter_urlFilter", ids_filter_urlRuleMsg: "str_filter_urlRuleMsg", ids_filter_wanIpAddress: "str_filter_wanIpAddress", ids_filter_wanPort: "str_filter_wanPort", ids_filter_wanPortPing: "str_filter_wanPortPing", ids_index: "str_index", ids_ipAddress: "str_ipAddress", ids_router_desIp: "str_router_desIp", ids_router_desIpInvalid: "str_router_desIpInvalid", ids_router_rip: "str_router_rip", ids_router_ripV1: "str_router_ripV1", ids_router_ripV1V2: "str_router_ripV1V2", ids_router_ripV2: "str_router_ripV2", ids_router_rooterIpInvalid: "str_router_rooterIpInvalid", ids_router_rounterIp: "str_router_rounterIp", ids_router_subnetInvalid: "str_router_subnetInvalid", ids_router_Title: "str_router_Title", ids_router_titleDynamicRouting: "str_router_titleDynamicRouting", ids_router_titleStaticRouting: "str_router_titleStaticRouting", ids_sim_changePinFailMsg: "str_sim_changePinFailMsg", ids_sim_confirmedPin: "str_sim_confirmedPin", ids_sim_pinCode: "str_sim_pinCode", ids_sim_pinRule: "str_sim_pinRule", ids_sim_pinStateError: "str_sim_pinStateError", ids_sim_pukCode: "str_sim_pukCode", ids_sim_pukRule: "str_sim_pukRule", ids_sim_simlockCode: "str_sim_simlockCode", ids_sim_simlockForbidden: "str_sim_simlockForbidden", ids_sim_simlockRule: "str_sim_simlockRule", ids_sim_simlockType: "str_sim_simlockType", ids_sim_verifyPinFailMsg: "str_sim_verifyPinFailMsg", ids_sim_verifyPukFailMsg: "str_sim_verifyPukFailMsg", ids_sim_confirmPINCode: "str_sim_confirmPINCode", ids_sim_Validation: "str_sim_Validation", ids_security_wanPing: "str_security_wanPing", ids_security_wanPingNote: "str_security_wanPingNote", ids_verison: "str_verison", ids_vtServer_lanPort: "str_vtServer_lanPort", ids_vtServer_wanPort: "str_vtServer_wanPort", ids_qos_ipInvalid: "str_qos_ipInvalid", ids_qos_portInvalid: "str_qos_portInvalid", ids_qos_priority: "str_qos_priority", ids_qos_titleQos: "str_qos_titleQos", ids_qos_express: "str_qos_express", ids_qos_high: "str_qos_high", ids_qos_normal: "str_qos_normal", ids_qos_low: "str_qos_low", ids_qos_stateControl: "str_qos_stateControl", ids_qos_userUpBand: "str_qos_userUpBand", ids_qos_userDownBand: "str_qos_userDownBand", ids_qos_prioritizeType_Webpages: "str_qos_prioritizeType_Webpages", ids_qos_prioritizeType_Games: "str_qos_prioritizeType_Games", ids_qos_prioritizeType_Video: "str_qos_prioritizeType_Video", ids_qos_deviceSpeedLimit: "str_qos_deviceSpeedLimit", ids_qos_prioritizNnetwork: "str_qos_prioritizNnetwork", ids_kbps: "str_kbps", ids_qos_noLimit: "str_qos_noLimit", ids_id: "str_id", ids_service: "str_service", ids_port: "str_port", ids_all: "str_all", ids_qos_deleteTips: "str_qos_deleteTips", ids_system_imei: "str_system_imei", ids_system_imsi: "str_system_imsi", ids_system_myNumber: "str_system_myNumber", ids_system_hardwareVersion: "str_system_hardwareVersion", ids_system_softwareVersion: "str_system_softwareVersion", ids_system_deviceInfo: "str_system_deviceInfo", ids_rebooting: "str_rebooting", ids_system_reboot: "str_system_reboot", ids_reset: "str_reset", ids_system_rebootingTips: "str_system_rebootingTips", ids_system_rebootReset: "str_system_rebootReset", ids_update_checkFail: "str_update_checkFail", ids_update_checking: "str_update_checking", ids_update_download: "str_update_download", ids_update_downloadFail: "str_update_downloadFail", ids_update_downloadStopMsg: "str_update_downloadStopMsg", ids_update_errorFileFormatTips: "str_update_errorFileFormatTips", ids_update_InternetDisabledMsg: "str_update_InternetDisabledMsg", ids_update_localUpgrade: "str_update_localUpgrade", ids_update_noNewSoft: "str_update_noNewSoft", ids_update_onlineUpgrade: "str_update_onlineUpgrade", ids_update_updateConfirm: "str_update_updateConfirm", ids_update_updateFail: "str_update_updateFail", ids_update_Updating: "str_update_Updating", ids_update_upgrade: "str_update_upgrade", ids_tr069_inform: "str_tr069_inform", ids_tr069_informInterval: "str_tr069_informInterval", ids_tr069_acsUsername: "str_tr069_acsUsername", ids_tr069_acsPw: "str_tr069_acsPw", ids_tr069_connRqAuth: "str_tr069_connRqAuth", ids_tr069_connRqUsername: "str_tr069_connRqUsername", ids_tr069_connRqPw: "str_tr069_connRqPw", ids_pb_local: "str_pb_local", ids_title_tr069: "str_title_tr069", ids_tr069_acsUrl: "str_tr069_acsUrl", ids_update_Browse: "str_update_Browse", ids_update_upgradingWarning: "str_update_upgradingWarning", ids_update_Online: "str_update_Online", ids_update_checkBtn: "str_update_checkBtn", ids_update_upToDate: "str_update_upToDate", ids_update_newVersion: "str_update_newVersion", ids_update_newVersionAvailable: "str_update_newVersionAvailable", ids_update_Size: "str_update_Size", ids_tr069_Client: "str_tr069_Client", ids_eg: "str_eg", ids_restore: "str_restore", ids_system_deviceMamt: "str_system_deviceMamt", ids_system_ntpServer1: "str_system_ntpServer1", ids_system_ntpServer2: "str_system_ntpServer2", ids_system_ntpServerPrompt: "str_system_ntpServerPrompt", ids_system_restore_error: "str_system_restore_error", ids_system_timeEg: "str_system_timeEg", ids_system_backupRestore: "str_system_backupRestore", ids_sim_simLocked: "str_sim_simLocked", ids_sim_simlockError: "str_sim_simlockError", ids_url: "str_url", ids_edit: "str_edit", ids_add: "str_add", ids_security_urlAddrNameWarn: "str_security_urlAddrNameWarn", ids_blacklist: "str_blacklist", ids_whitelist: "str_whitelist", ids_security_lanport: "str_security_lanport", ids_security_macAddrNameWarn: "str_security_macAddrNameWarn", ids_security_ipFilterWarn: "str_security_ipFilterWarn", ids_verion: "str_verion", ids_delete_confirm: "str_delete_confirm", ids_stop: "str_stop", ids_unknown: "str_unknown", ids_wlan_wpsPinRule: "str_wlan_wpsPinRule", ids_finish: "str_finish", ids_tr069_informIntervalRule: "str_tr069_informIntervalRule", ids_tr069_acsUrlRule: "str_tr069_acsUrlRule", ids_vtServer_paramsInvalid: "str_vtServer_paramsInvalid", ids_noservice: "str_noservice", ids_disabled: "str_disabled", ids_share: "str_share", ids_system_modemVersion: "str_system_modemVersion", ids_enabled: "str_enabled", ids_statistics_duration: "str_duration", ids_statistics_error: "str_error", ids_statistics_send: "str_send", ids_system_ntpServer: "str_system_ntpServer", ids_network_dataRoaming: "str_network_dataRoaming", ids_lan_interface_ssid: "str_lan_interface", ids_parentalControl_title: "str_parentalControl_title", ids_parentalControl_deviceUnder: "str_parentalControl_deviceUnder", ids_parentalControl_time: "str_parentalControl_time", ids_parentalControl_macaddress: "str_parentalControl_macaddress", ids_parentalControl_devicename: "str_parentalControl_devicename", ids_parentalControl_devicelist: "str_parentalControl_devicelist", ids_parentalControl_url: "str_parentalControl_url", ids_parentalControl_status: "str_parentalControl_status", ids_parentalControl_operation: "str_parentalControl_operation", ids_parentalControl_id: "str_parentalControl_id", ids_parentalControl_startime: "str_parentalControl_startime", ids_parentalControl_endtime: "str_parentalControl_endtime", ids_parentalControl_other: "str_parentalControl_other", ids_parentalControl_select: "str_parentalControl_select", ids_parentalControl_URLaddressNote: "str_parentalControl_URLaddressNote", ids_parentalControl_macWarn:"str_parentalControl_macWarn", ids_update_downloadcomplete:"str_update_downloadcomplete", ids_onlineUpgrade_currentVersion:"str_onlineUpgrade_currentVersion", ids_parentalControl_notetips1:"str_parentalControl_notetips1", ids_parentalControl_notetips2:"str_parentalControl_notetips2", ids_portRule:"str_security_ipPortRule", ids_IpRule:"str_router_ipAddrInvalid" }